@devvit/protos 0.11.7 → 0.11.8-next-2025-02-10-c496a14e8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/meta.min.json +7825 -0
- package/package.json +4 -4
- package/protos.min.js +2 -0
- package/protos.min.js.map +7 -0
- package/schema/.snootobuf/deps/buf/validate/expression.proto +92 -0
- package/schema/.snootobuf/deps/buf/validate/priv/private.proto +41 -0
- package/schema/.snootobuf/deps/buf/validate/validate.proto +4130 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/audit.proto +72 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/auth.proto +49 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/organization.proto +54 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/service.proto +46 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/subscription.proto +72 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/ui.proto +20 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/user.proto +45 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/admin.proto +54 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/delivery.proto +773 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/filter.proto +66 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/firehose.proto +100 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/intake.proto +19 -0
- package/schema/.snootobuf/deps/devvit/events/v1alpha/events.proto +446 -0
- package/schema/.snootobuf/deps/devvit/gateway/v1alpha/payments.proto +24 -0
- package/schema/.snootobuf/deps/devvit/options/options.proto +98 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/commentv2.proto +29 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/flair.proto +25 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/modaction.proto +53 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/modmail.proto +56 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/postv2.proto +107 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/subredditv2.proto +41 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/userv2.proto +23 -0
- package/schema/.snootobuf/deps/devvit/triggers/v1alpha/triggers.proto +162 -0
- package/schema/.snootobuf/deps/enum/account_gender_category.proto +14 -0
- package/schema/.snootobuf/deps/enum/approval_status.proto +15 -0
- package/schema/.snootobuf/deps/enum/automated_reporting_level.proto +12 -0
- package/schema/.snootobuf/deps/enum/ban_evasion_threshold.proto +13 -0
- package/schema/.snootobuf/deps/enum/ban_info_action.proto +12 -0
- package/schema/.snootobuf/deps/enum/block_relation_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/comment_sort.proto +18 -0
- package/schema/.snootobuf/deps/enum/comment_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/crowd_control_level.proto +12 -0
- package/schema/.snootobuf/deps/enum/discussion_type.proto +10 -0
- package/schema/.snootobuf/deps/enum/distinguish_type.proto +14 -0
- package/schema/.snootobuf/deps/enum/flair_position.proto +11 -0
- package/schema/.snootobuf/deps/enum/hateful_content_threshold.proto +12 -0
- package/schema/.snootobuf/deps/enum/link_content_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/link_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/link_visibility.proto +11 -0
- package/schema/.snootobuf/deps/enum/prediction_leaderboard_entry_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/promo_layout.proto +11 -0
- package/schema/.snootobuf/deps/enum/removed_by_type.proto +18 -0
- package/schema/.snootobuf/deps/enum/spam_level.proto +11 -0
- package/schema/.snootobuf/deps/enum/subreddit_type.proto +16 -0
- package/schema/.snootobuf/deps/enum/verdict.proto +14 -0
- package/schema/.snootobuf/deps/enum/vote.proto +12 -0
- package/schema/.snootobuf/deps/enum/whitelist_status.proto +17 -0
- package/schema/.snootobuf/deps/enum/wiki_edit_mode.proto +12 -0
- package/schema/.snootobuf/deps/evaluator/evaluator.proto +203 -0
- package/schema/.snootobuf/deps/google/api/annotations.proto +31 -0
- package/schema/.snootobuf/deps/google/api/apikeys/v2/apikeys.proto +288 -0
- package/schema/.snootobuf/deps/google/api/apikeys/v2/resources.proto +175 -0
- package/schema/.snootobuf/deps/google/api/auth.proto +237 -0
- package/schema/.snootobuf/deps/google/api/backend.proto +185 -0
- package/schema/.snootobuf/deps/google/api/billing.proto +77 -0
- package/schema/.snootobuf/deps/google/api/client.proto +431 -0
- package/schema/.snootobuf/deps/google/api/cloudquotas/v1/cloudquotas.proto +322 -0
- package/schema/.snootobuf/deps/google/api/cloudquotas/v1/resources.proto +315 -0
- package/schema/.snootobuf/deps/google/api/config_change.proto +84 -0
- package/schema/.snootobuf/deps/google/api/consumer.proto +82 -0
- package/schema/.snootobuf/deps/google/api/context.proto +92 -0
- package/schema/.snootobuf/deps/google/api/control.proto +41 -0
- package/schema/.snootobuf/deps/google/api/distribution.proto +213 -0
- package/schema/.snootobuf/deps/google/api/documentation.proto +168 -0
- package/schema/.snootobuf/deps/google/api/endpoint.proto +69 -0
- package/schema/.snootobuf/deps/google/api/error_reason.proto +589 -0
- package/schema/.snootobuf/deps/google/api/expr/conformance/v1alpha1/conformance_service.proto +183 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/checked.proto +343 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/eval.proto +118 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/explain.proto +53 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/syntax.proto +438 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/value.proto +115 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/decl.proto +84 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/eval.proto +125 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/expr.proto +265 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/source.proto +62 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/value.proto +114 -0
- package/schema/.snootobuf/deps/google/api/field_behavior.proto +104 -0
- package/schema/.snootobuf/deps/google/api/field_info.proto +106 -0
- package/schema/.snootobuf/deps/google/api/http.proto +371 -0
- package/schema/.snootobuf/deps/google/api/httpbody.proto +81 -0
- package/schema/.snootobuf/deps/google/api/label.proto +48 -0
- package/schema/.snootobuf/deps/google/api/launch_stage.proto +72 -0
- package/schema/.snootobuf/deps/google/api/log.proto +54 -0
- package/schema/.snootobuf/deps/google/api/logging.proto +81 -0
- package/schema/.snootobuf/deps/google/api/metric.proto +268 -0
- package/schema/.snootobuf/deps/google/api/monitored_resource.proto +130 -0
- package/schema/.snootobuf/deps/google/api/monitoring.proto +107 -0
- package/schema/.snootobuf/deps/google/api/policy.proto +85 -0
- package/schema/.snootobuf/deps/google/api/quota.proto +184 -0
- package/schema/.snootobuf/deps/google/api/resource.proto +243 -0
- package/schema/.snootobuf/deps/google/api/routing.proto +461 -0
- package/schema/.snootobuf/deps/google/api/service.proto +191 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/check_error.proto +124 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/distribution.proto +166 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/http_request.proto +93 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/log_entry.proto +126 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/metric_value.proto +81 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/operation.proto +123 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/quota_controller.proto +245 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/service_controller.proto +260 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v2/service_controller.proto +196 -0
- package/schema/.snootobuf/deps/google/api/servicemanagement/v1/resources.proto +295 -0
- package/schema/.snootobuf/deps/google/api/servicemanagement/v1/servicemanager.proto +508 -0
- package/schema/.snootobuf/deps/google/api/serviceusage/v1/resources.proto +130 -0
- package/schema/.snootobuf/deps/google/api/serviceusage/v1/serviceusage.proto +305 -0
- package/schema/.snootobuf/deps/google/api/serviceusage/v1beta1/resources.proto +458 -0
- package/schema/.snootobuf/deps/google/api/serviceusage/v1beta1/serviceusage.proto +793 -0
- package/schema/.snootobuf/deps/google/api/source_info.proto +31 -0
- package/schema/.snootobuf/deps/google/api/system_parameter.proto +96 -0
- package/schema/.snootobuf/deps/google/api/usage.proto +96 -0
- package/schema/.snootobuf/deps/google/api/visibility.proto +113 -0
- package/schema/.snootobuf/deps/google/cloud/extended_operations.proto +150 -0
- package/schema/.snootobuf/deps/google/iam/admin/v1/iam.proto +1087 -0
- package/schema/.snootobuf/deps/google/iam/v1/iam_policy.proto +145 -0
- package/schema/.snootobuf/deps/google/iam/v1/logging/audit_data.proto +34 -0
- package/schema/.snootobuf/deps/google/iam/v1/options.proto +41 -0
- package/schema/.snootobuf/deps/google/iam/v1/policy.proto +240 -0
- package/schema/.snootobuf/deps/google/logging/type/http_request.proto +92 -0
- package/schema/.snootobuf/deps/google/logging/type/log_severity.proto +72 -0
- package/schema/.snootobuf/deps/google/longrunning/operations.proto +247 -0
- package/schema/.snootobuf/deps/google/protobuf/any.proto +158 -0
- package/schema/.snootobuf/deps/google/protobuf/api.proto +208 -0
- package/schema/.snootobuf/deps/google/protobuf/compiler/plugin.proto +183 -0
- package/schema/.snootobuf/deps/google/protobuf/descriptor.proto +921 -0
- package/schema/.snootobuf/deps/google/protobuf/duration.proto +116 -0
- package/schema/.snootobuf/deps/google/protobuf/empty.proto +51 -0
- package/schema/.snootobuf/deps/google/protobuf/field_mask.proto +245 -0
- package/schema/.snootobuf/deps/google/protobuf/source_context.proto +48 -0
- package/schema/.snootobuf/deps/google/protobuf/struct.proto +95 -0
- package/schema/.snootobuf/deps/google/protobuf/timestamp.proto +147 -0
- package/schema/.snootobuf/deps/google/protobuf/type.proto +187 -0
- package/schema/.snootobuf/deps/google/protobuf/wrappers.proto +123 -0
- package/schema/.snootobuf/deps/google/rpc/code.proto +186 -0
- package/schema/.snootobuf/deps/google/rpc/context/attribute_context.proto +287 -0
- package/schema/.snootobuf/deps/google/rpc/error_details.proto +246 -0
- package/schema/.snootobuf/deps/google/rpc/status.proto +47 -0
- package/schema/.snootobuf/deps/google/type/calendar_period.proto +57 -0
- package/schema/.snootobuf/deps/google/type/color.proto +170 -0
- package/schema/.snootobuf/deps/google/type/date.proto +50 -0
- package/schema/.snootobuf/deps/google/type/datetime.proto +97 -0
- package/schema/.snootobuf/deps/google/type/dayofweek.proto +51 -0
- package/schema/.snootobuf/deps/google/type/expr.proto +51 -0
- package/schema/.snootobuf/deps/google/type/fraction.proto +34 -0
- package/schema/.snootobuf/deps/google/type/latlng.proto +37 -0
- package/schema/.snootobuf/deps/google/type/money.proto +43 -0
- package/schema/.snootobuf/deps/google/type/month.proto +66 -0
- package/schema/.snootobuf/deps/google/type/postal_address.proto +135 -0
- package/schema/.snootobuf/deps/google/type/quaternion.proto +95 -0
- package/schema/.snootobuf/deps/google/type/timeofday.proto +44 -0
- package/schema/.snootobuf/deps/openapi/helper.proto +20 -0
- package/schema/.snootobuf/deps/products-api/protos/reddit/xpaymentsplatform/payproducts/v1/currencies.proto +189 -0
- package/schema/.snootobuf/deps/products-api/protos/reddit/xpaymentsplatform/payproducts/v1/payproducts.proto +118 -0
- package/schema/.snootobuf/deps/reddit/api/metadata/v1/metadata.proto +55 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/account/v1/account.proto +579 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/account/v1/account_relations.proto +43 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/api/metadata/v1/metadata.proto +82 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/blocking/v1/user_blocking_service.proto +221 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree.proto +78 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree_service.proto +189 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree_structure.proto +29 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comments.proto +417 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comments_service.proto +72 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/auth.proto +25 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/features.proto +52 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/lang.proto +16 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/legal.proto +20 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/media.proto +149 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/moderation.proto +197 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/safety.proto +116 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/time.proto +25 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/domains/v1/domains_metadata_service.proto +101 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/grpc_thrift/v1/grpc_thrift_options.proto +34 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/links/v1/links.proto +798 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/links/v1/links_service.proto +186 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/messages/v1/messages.proto +110 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/sensitive/v1/wrappers.proto +51 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit.proto +1202 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_member_relations.proto +85 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_moderator_service.proto +363 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_service.proto +301 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/thing/v0/thing.proto +2869 -0
- package/schema/.snootobuf/deps/reddit/devvit/custom_post/v1/custom_post.proto +15 -0
- package/schema/.snootobuf/deps/reddit/devvit/custom_post/v1/service.proto +11 -0
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/context_action.proto +48 -0
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/manifest.proto +70 -0
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/service.proto +11 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/acknowledge_order_delivery.proto +17 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/checkout.proto +89 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/common.proto +322 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/delete_products.proto +17 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/events.proto +14 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_batch_products.proto +15 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_gold_balances.proto +48 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_order.proto +31 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_orders.proto +26 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_orders_by_user.proto +15 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_payout_info_batch.proto +52 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_products.proto +23 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_user_profiles.proto +28 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/refund_order.proto +17 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/service.proto +49 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/service_data_compliance.proto +20 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/upsert_products.proto +17 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paygatewaypsps/v1/paygatewaypsps.proto +158 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payorders/v1/payments_data_compliance.proto +18 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payorders/v1/payorders.proto +195 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/admin.proto +44 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/ledger.proto +200 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/payments_data_compliance.proto +18 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/paypayments.proto +210 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payproducts/v1/currencies.proto +189 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payproducts/v1/payproducts.proto +135 -0
- package/schema/.snootobuf/deps/snooron_sources/text_classification/text_classification.proto +29 -0
- package/schema/.snootobuf/deps/snooron_sources/v2_event/v2_event.proto +3292 -0
- package/schema/.snootobuf/deps/validate/validate.proto +862 -0
- package/schema/devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.proto +3 -0
- package/schema/snootobuf.devenv.lock +444 -388
- package/schema/snootobuf.lock +444 -388
- package/schema/snootobuf.redditapi.lock +444 -388
- package/schema/snootobuf.ts.lock +444 -388
- package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.d.ts +2 -0
- package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.d.ts.map +1 -1
- package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.js +16 -0
- package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_svc.d.ts +4 -0
- package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_svc.d.ts.map +1 -1
@@ -0,0 +1,301 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package reddit.coreplatform.subreddit.v1;
|
4
|
+
|
5
|
+
import "google/protobuf/field_mask.proto";
|
6
|
+
import "google/rpc/status.proto";
|
7
|
+
import "reddit/coreplatform/subreddit/v1/subreddit.proto";
|
8
|
+
import "validate/validate.proto";
|
9
|
+
|
10
|
+
option go_package = "github.snooguts.net/reddit/thing-api/go/grpc/subreddit/v1;subreddit";
|
11
|
+
option java_multiple_files = true;
|
12
|
+
option java_outer_classname = "SubredditServiceProto";
|
13
|
+
option java_package = "com.reddit.coreplatform.api.subreddit.v1";
|
14
|
+
|
15
|
+
// RPC Service for working with core Subreddit data
|
16
|
+
service SubredditService {
|
17
|
+
// Checks whether or not an account has access to view a subreddit
|
18
|
+
rpc CanAccountViewSubreddit(CanAccountViewSubredditRequest) returns (CanAccountViewSubredditResponse) {
|
19
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
20
|
+
}
|
21
|
+
// Checks accounts related to a subreddit, e.g. moderators, invited moderators, contributors, or banned
|
22
|
+
rpc AccountRelationsForSubreddits(AccountRelationsForSubredditsRequest) returns (AccountRelationsForSubredditsResponse) {
|
23
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
24
|
+
}
|
25
|
+
|
26
|
+
// Subscribes a given account to a given subreddit, asynchronous
|
27
|
+
rpc SubscribeToSubreddit(SubscribeToSubredditRequest) returns (SubscribeToSubredditResponse) {
|
28
|
+
option idempotency_level = IDEMPOTENT;
|
29
|
+
}
|
30
|
+
|
31
|
+
// Unsubscribes a given account from a given subreddit, asynchronous
|
32
|
+
rpc UnsubscribeFromSubreddit(UnsubscribeFromSubredditRequest) returns (UnsubscribeFromSubredditResponse) {
|
33
|
+
option idempotency_level = IDEMPOTENT;
|
34
|
+
}
|
35
|
+
|
36
|
+
// Get the list of accounts banned from this subreddit, with metadata
|
37
|
+
rpc GetBannedUsersBySubreddit(GetBannedUsersBySubredditRequest) returns (GetBannedUsersBySubredditResponse) {
|
38
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
39
|
+
}
|
40
|
+
|
41
|
+
// Get a count of subreddits each member in a list of users is banned from.
|
42
|
+
// Restricted to admin and service actors
|
43
|
+
rpc SubredditBanCountForAccountIDs(SubredditBanCountForAccountIDsRequest) returns (SubredditBanCountForAccountIDsResponse) {
|
44
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
45
|
+
}
|
46
|
+
|
47
|
+
// Get a map of Account ID to active ban information for the specified Subreddit and Account IDs
|
48
|
+
rpc GetBansForAccountIDsForSubreddit(GetBansForAccountIDsForSubredditRequest) returns (GetBansForAccountIDsForSubredditResponse) {
|
49
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
50
|
+
}
|
51
|
+
|
52
|
+
// Retrieve AMA Settings for a given subreddit
|
53
|
+
rpc GetAMASettings(GetAMASettingsRequest) returns (GetAMASettingsResponse) {
|
54
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Update AMA Settings for a given subreddit
|
58
|
+
rpc UpdateAMASettings(UpdateAMASettingsRequest) returns (UpdateAMASettingsResponse) {
|
59
|
+
option idempotency_level = IDEMPOTENT;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
// Request arguments for subreddit access checks.
|
64
|
+
message CanAccountViewSubredditRequest {
|
65
|
+
// The account id of the user we are checking visibility permissions against.
|
66
|
+
// The id must be in a valid `t2_{}` thing id format.
|
67
|
+
string account_id = 1 [(validate.rules).string = {
|
68
|
+
pattern: "^t2_[a-zA-Z0-9]+$",
|
69
|
+
ignore_empty: true,
|
70
|
+
}];
|
71
|
+
|
72
|
+
// A list of subreddit ids to check if the supplied account id has permission to view
|
73
|
+
// Each subreddit id must be in a valid `t5_{}` thing id format.
|
74
|
+
repeated string subreddit_ids = 2 [(validate.rules).repeated = {
|
75
|
+
min_items: 1,
|
76
|
+
max_items: 100,
|
77
|
+
items: {
|
78
|
+
string: {pattern: "^t5_[a-zA-Z0-9]+$"}
|
79
|
+
}
|
80
|
+
}];
|
81
|
+
}
|
82
|
+
|
83
|
+
// Response payload for a subreddit visibility check.
|
84
|
+
message CanAccountViewSubredditResponse {
|
85
|
+
// A list which is a subset of subreddits the requested account has permission to view.
|
86
|
+
repeated string visible_subreddit_ids = 1;
|
87
|
+
}
|
88
|
+
|
89
|
+
// Request arguments for a subreddit account relations check.
|
90
|
+
message AccountRelationsForSubredditsRequest {
|
91
|
+
// The account ID of the user we're checking account relations for.
|
92
|
+
// The id must be in a valid `t2_{}` thing id format.
|
93
|
+
string account_id = 1 [(validate.rules).string = {pattern: "^t2_[a-zA-Z0-9]+$"}];
|
94
|
+
|
95
|
+
// An optional list of relation types to check against for the supplied account and subreddits.
|
96
|
+
// Each relation type must be a valid SrRelationType enum value, excluding "UNKNOWN".
|
97
|
+
repeated RelationType relation_types = 2 [(validate.rules).repeated = {
|
98
|
+
min_items: 0,
|
99
|
+
max_items: 6,
|
100
|
+
items: {
|
101
|
+
enum: {
|
102
|
+
defined_only: true,
|
103
|
+
not_in: [0]
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}];
|
107
|
+
|
108
|
+
// A list of subreddit ids to check relations against for the supplied account id.
|
109
|
+
// Each subreddit id must be in a valid `t5_{}` thing id format.
|
110
|
+
repeated string subreddit_ids = 3 [(validate.rules).repeated = {
|
111
|
+
min_items: 1,
|
112
|
+
max_items: 1000,
|
113
|
+
items: {
|
114
|
+
string: {pattern: "^t5_[a-zA-Z0-9]+$"}
|
115
|
+
}
|
116
|
+
}];
|
117
|
+
}
|
118
|
+
|
119
|
+
// Response payload for a subreddit account relations check.
|
120
|
+
message AccountRelationsForSubredditsResponse {
|
121
|
+
// A map of subreddit IDs to relations that the user has with that subreddit.
|
122
|
+
map<string, RelationTypeList> relations = 1;
|
123
|
+
}
|
124
|
+
|
125
|
+
// Request payload to subscribe to a subreddit
|
126
|
+
// The account must be able to view a subreddit in order to subscribe to it,
|
127
|
+
// otherwise, a `FAILED_PRECONDITION` status is returned to the caller.
|
128
|
+
// If the account is already subscribed to the subreddit, an operation_id is returned in this response too.
|
129
|
+
message SubscribeToSubredditRequest {
|
130
|
+
// The account ID of the user requesting to subscribe to the given subreddit.
|
131
|
+
// The ID must be in a valid `t2_{}` thing ID format.
|
132
|
+
string account_id = 1 [(validate.rules).string = {pattern: "^t2_[a-zA-Z0-9]+$"}];
|
133
|
+
|
134
|
+
// The subreddit ID being subscribed to.
|
135
|
+
// The ID must be in a valid `t5_{}` thing ID format.
|
136
|
+
string subreddit_id = 2 [(validate.rules).string = {pattern: "^t5_[a-zA-Z0-9]+$"}];
|
137
|
+
}
|
138
|
+
|
139
|
+
// Response payload to subscribe to a subreddit
|
140
|
+
message SubscribeToSubredditResponse {
|
141
|
+
// The operation ID, a unique identifier of the subscribe request that the client can use to track progress.
|
142
|
+
// A valid UUID (via RFC 4122)
|
143
|
+
string operation_id = 1 [(validate.rules).string.uuid = true];
|
144
|
+
}
|
145
|
+
|
146
|
+
// Request payload to unsubscribe to a subreddit
|
147
|
+
// The account must be able to view a subreddit in order to unsubscribe from it,
|
148
|
+
// otherwise, a `FAILED_PRECONDITION` status is returned to the caller.
|
149
|
+
// If the account is already unsubscribed from the subreddit, an operation_id is returned in this response too.
|
150
|
+
message UnsubscribeFromSubredditRequest {
|
151
|
+
// The account ID of the user requesting to unsubscribe from the given subreddit.
|
152
|
+
// The id must be in a valid `t2_{}` thing id format.
|
153
|
+
string account_id = 1 [(validate.rules).string = {pattern: "^t2_[a-zA-Z0-9]+$"}];
|
154
|
+
|
155
|
+
// The subreddit ID being unsubscribed from.
|
156
|
+
// The ID must be in a valid `t5_{}` thing ID format.
|
157
|
+
string subreddit_id = 2 [(validate.rules).string = {pattern: "^t5_[a-zA-Z0-9]+$"}];
|
158
|
+
}
|
159
|
+
|
160
|
+
// Response payload to unsubscribe to a subreddit
|
161
|
+
message UnsubscribeFromSubredditResponse {
|
162
|
+
// The operation ID, a unique identifier of the unsubscribe request that the client can use to track progress.
|
163
|
+
// A valid UUID (via RFC 4122)
|
164
|
+
string operation_id = 1 [(validate.rules).string.uuid = true];
|
165
|
+
}
|
166
|
+
|
167
|
+
// Request the list of users that are banned from a given subreddit, with metadata
|
168
|
+
message GetBannedUsersBySubredditRequest {
|
169
|
+
// Subreddit identifier to request list of banned users from.
|
170
|
+
// Specified subreddit id should be a valid thing identifier with t5 prefix.
|
171
|
+
string subreddit_id = 1 [(validate.rules).string = {pattern: "^t5_[a-zA-Z0-9]+$"}];
|
172
|
+
|
173
|
+
// Cursor for the start index of the result set. When empty, the results start from the first page.
|
174
|
+
// The sort order is descending, so the first page will be the most recently banned users.
|
175
|
+
// This API may be updated to allow that sort order to be specified, but the default will remain as descending.
|
176
|
+
string cursor = 2 [(validate.rules).string = {
|
177
|
+
ignore_empty: true,
|
178
|
+
min_len: 1,
|
179
|
+
}];
|
180
|
+
|
181
|
+
// Optional maximum page size limit (defaults to and capped at 1000).
|
182
|
+
optional int32 limit = 3 [(validate.rules).int32 = {
|
183
|
+
gte: 1,
|
184
|
+
lte: 1000,
|
185
|
+
}];
|
186
|
+
}
|
187
|
+
|
188
|
+
// The response message for querying users banned from a subreddit
|
189
|
+
message GetBannedUsersBySubredditResponse {
|
190
|
+
// The list of users banned from the subreddit.
|
191
|
+
repeated BannedUser banned_user = 1;
|
192
|
+
|
193
|
+
// The cursor for the next page of results. If empty, then the end of the result set has been reached.
|
194
|
+
string cursor = 2;
|
195
|
+
}
|
196
|
+
|
197
|
+
// Request payload specifying which account IDs to get ban counts for
|
198
|
+
message SubredditBanCountForAccountIDsRequest {
|
199
|
+
// A list of up to 100 account IDs to get ban counts for.
|
200
|
+
// Each account ID must be in a valid `t2_{}` thing ID format.
|
201
|
+
// Note that this endpoint does not check for an account's existence before querying bans.
|
202
|
+
repeated string account_ids = 1 [(validate.rules).repeated = {
|
203
|
+
min_items: 1,
|
204
|
+
max_items: 100,
|
205
|
+
items: {
|
206
|
+
string: {pattern: "^t2_[a-zA-Z0-9]+$"}
|
207
|
+
}
|
208
|
+
}];
|
209
|
+
}
|
210
|
+
|
211
|
+
// The response message for querying subreddit ban counts for account IDs
|
212
|
+
message SubredditBanCountForAccountIDsResponse {
|
213
|
+
// A map of account IDs to the number of subreddits each user is banned from.
|
214
|
+
// If an account ID shows a ban count of 0, that either means no ban relations were found
|
215
|
+
// or the user does not exist.
|
216
|
+
map<string, int32> ban_counts = 1;
|
217
|
+
}
|
218
|
+
|
219
|
+
// Request active ban information for the provided account IDs in the specified subreddit.
|
220
|
+
message GetBansForAccountIDsForSubredditRequest {
|
221
|
+
// Subreddit ID to query account bans from.
|
222
|
+
// Specified subreddit ID should be a valid thing identifier with a t5 prefix.
|
223
|
+
string subreddit_id = 1 [(validate.rules).string = {pattern: "^t5_[a-zA-Z0-9]+$"}];
|
224
|
+
|
225
|
+
// Account identifiers to request bans against.
|
226
|
+
// Specified account IDs should be valid thing identifiers with a t2 prefix.
|
227
|
+
// There should be between 1 and 100 account IDs specified.
|
228
|
+
repeated string account_ids = 2 [(validate.rules).repeated = {
|
229
|
+
min_items: 1,
|
230
|
+
max_items: 100,
|
231
|
+
items: {
|
232
|
+
string: {pattern: "^t2_[a-zA-Z0-9]+$"}
|
233
|
+
}
|
234
|
+
}];
|
235
|
+
}
|
236
|
+
|
237
|
+
// A map of all requested account IDs with active ban information for the requested subreddit.
|
238
|
+
// A request with a non-existent subreddit ID will return an empty map.
|
239
|
+
message GetBansForAccountIDsForSubredditResponse {
|
240
|
+
// Map of account ID to active ban information for the requested subreddit.
|
241
|
+
// A missing account ID indicates the account does not exist or the account is not actively banned from the subreddit.
|
242
|
+
map<string, BannedUser> bans_by_account_id = 1;
|
243
|
+
}
|
244
|
+
|
245
|
+
// Request to get AMA settings for a given subreddit
|
246
|
+
message GetAMASettingsRequest {
|
247
|
+
// Subreddit Identifier
|
248
|
+
repeated string subreddit_ids = 1 [(validate.rules).repeated = {
|
249
|
+
min_items: 1,
|
250
|
+
max_items: 100,
|
251
|
+
items: {
|
252
|
+
string: {pattern: "^t5_[a-zA-Z0-9]+$"}
|
253
|
+
}
|
254
|
+
}];
|
255
|
+
}
|
256
|
+
|
257
|
+
// Response of AMA settings for a given Subreddit
|
258
|
+
message GetAMASettingsResponse {
|
259
|
+
// A map of the requested AMA Settings keyed by Subreddit ID.
|
260
|
+
// Subreddit IDs present in this map will never be present in the errors_by_subreddit_id field.
|
261
|
+
map<string, AMASettings> ama_settings_by_subreddit_id = 1;
|
262
|
+
|
263
|
+
// A map of errors produced when looking up AMA Settings for given Subreddit IDs.
|
264
|
+
// Subreddit IDs present in this map will never be present in the ama_settings_by_subreddit_id field.
|
265
|
+
// The status can be set to NotFound, indicating that we do not have AMASettings set for the indicated subreddit
|
266
|
+
map<string, google.rpc.Status> errors_by_subreddit_id = 2;
|
267
|
+
}
|
268
|
+
|
269
|
+
// Request to update AMA Settings for a given subreddit
|
270
|
+
message UpdateAMASettingsRequest {
|
271
|
+
// Subreddit Identifier
|
272
|
+
string subreddit_id = 1 [(validate.rules).string = {pattern: "^t5_[a-zA-Z0-9]+$"}];
|
273
|
+
// AMA Settings to be updated for the given subreddit
|
274
|
+
AMASettings ama_settings = 2;
|
275
|
+
// The list of fields to be updated with the values found in ama_settings.
|
276
|
+
// This is REQUIRED and an error will be returned if it is not set.
|
277
|
+
// * is a special value that indicates that ALL fields are to be updated, setting them to their empty value if not set in ama_settings.
|
278
|
+
google.protobuf.FieldMask update_mask = 3;
|
279
|
+
}
|
280
|
+
|
281
|
+
// Response from updating AMA settings for a subreddit
|
282
|
+
message UpdateAMASettingsResponse {}
|
283
|
+
|
284
|
+
// This message describes AMA settings for a Subreddit
|
285
|
+
message AMASettings {
|
286
|
+
// List of permission settings describing which groups of users can create AMA posts on a subreddit
|
287
|
+
// An empty list indicates that there are no Permissions for this subreddit, indicating that no one can make AMA posts
|
288
|
+
repeated PostPermissions post_permissions = 1;
|
289
|
+
|
290
|
+
// Enum describing which types of user can create AMA posts on a subreddit
|
291
|
+
enum PostPermissions {
|
292
|
+
// Default value, should not be used directly
|
293
|
+
POST_PERMISSIONS_UNSPECIFIED = 0;
|
294
|
+
// Logged-in users can create AMA posts
|
295
|
+
POST_PERMISSIONS_USERS = 1;
|
296
|
+
// Contributors can create AMA posts
|
297
|
+
POST_PERMISSIONS_CONTRIBUTORS = 2;
|
298
|
+
// Mods can create AMA posts
|
299
|
+
POST_PERMISSIONS_MODS = 3;
|
300
|
+
}
|
301
|
+
}
|