@devvit/protos 0.11.6 → 0.11.7-next-2025-01-28-641048aff.0
Sign up to get free protection for your applications and to get access to all the features.
- package/meta.min.json +7820 -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/buildpack/buildpack_common.proto +6 -1
- package/schema/snootobuf.devenv.lock +210 -102
- package/schema/snootobuf.lock +210 -102
- package/schema/snootobuf.redditapi.lock +210 -102
- package/schema/snootobuf.ts.lock +210 -102
- package/types/devvit/dev_portal/dev_portal.d.ts +2 -0
- package/types/devvit/dev_portal/dev_portal.d.ts.map +1 -1
- package/types/devvit/plugin/builder/builder.d.ts +4 -0
- package/types/devvit/plugin/builder/builder.d.ts.map +1 -1
- package/types/devvit/plugin/buildpack/buildpack.d.ts +8 -0
- package/types/devvit/plugin/buildpack/buildpack.d.ts.map +1 -1
- package/types/devvit/plugin/buildpack/buildpack_common.d.ts +3 -0
- package/types/devvit/plugin/buildpack/buildpack_common.d.ts.map +1 -1
- package/types/devvit/plugin/buildpack/buildpack_common.js +37 -1
- package/types/devvit/plugin/linker/linker.d.ts +2 -0
- package/types/devvit/plugin/linker/linker.d.ts.map +1 -1
- package/types/devvit/plugin/linker/resolver.d.ts +2 -0
- package/types/devvit/plugin/linker/resolver.d.ts.map +1 -1
@@ -0,0 +1,85 @@
|
|
1
|
+
// Copyright 2024 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.api;
|
18
|
+
|
19
|
+
import "google/protobuf/descriptor.proto";
|
20
|
+
|
21
|
+
option cc_enable_arenas = true;
|
22
|
+
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
23
|
+
option java_multiple_files = true;
|
24
|
+
option java_outer_classname = "PolicyProto";
|
25
|
+
option java_package = "com.google.api";
|
26
|
+
option objc_class_prefix = "GAPI";
|
27
|
+
|
28
|
+
// Provides `google.api.field_policy` annotation at proto fields.
|
29
|
+
extend google.protobuf.FieldOptions {
|
30
|
+
// See [FieldPolicy][].
|
31
|
+
FieldPolicy field_policy = 158361448;
|
32
|
+
}
|
33
|
+
|
34
|
+
// Provides `google.api.method_policy` annotation at proto methods.
|
35
|
+
extend google.protobuf.MethodOptions {
|
36
|
+
// See [MethodPolicy][].
|
37
|
+
MethodPolicy method_policy = 161893301;
|
38
|
+
}
|
39
|
+
|
40
|
+
// Google API Policy Annotation
|
41
|
+
//
|
42
|
+
// This message defines a simple API policy annotation that can be used to
|
43
|
+
// annotate API request and response message fields with applicable policies.
|
44
|
+
// One field may have multiple applicable policies that must all be satisfied
|
45
|
+
// before a request can be processed. This policy annotation is used to
|
46
|
+
// generate the overall policy that will be used for automatic runtime
|
47
|
+
// policy enforcement and documentation generation.
|
48
|
+
message FieldPolicy {
|
49
|
+
// Selects one or more request or response message fields to apply this
|
50
|
+
// `FieldPolicy`.
|
51
|
+
//
|
52
|
+
// When a `FieldPolicy` is used in proto annotation, the selector must
|
53
|
+
// be left as empty. The service config generator will automatically fill
|
54
|
+
// the correct value.
|
55
|
+
//
|
56
|
+
// When a `FieldPolicy` is used in service config, the selector must be a
|
57
|
+
// comma-separated string with valid request or response field paths,
|
58
|
+
// such as "foo.bar" or "foo.bar,foo.baz".
|
59
|
+
string selector = 1;
|
60
|
+
|
61
|
+
// Specifies the required permission(s) for the resource referred to by the
|
62
|
+
// field. It requires the field contains a valid resource reference, and
|
63
|
+
// the request must pass the permission checks to proceed. For example,
|
64
|
+
// "resourcemanager.projects.get".
|
65
|
+
string resource_permission = 2;
|
66
|
+
|
67
|
+
// Specifies the resource type for the resource referred to by the field.
|
68
|
+
string resource_type = 3;
|
69
|
+
}
|
70
|
+
|
71
|
+
// Defines policies applying to an RPC method.
|
72
|
+
message MethodPolicy {
|
73
|
+
// Selects a method to which these policies should be enforced, for example,
|
74
|
+
// "google.pubsub.v1.Subscriber.CreateSubscription".
|
75
|
+
//
|
76
|
+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
77
|
+
// details.
|
78
|
+
//
|
79
|
+
// NOTE: This field must not be set in the proto annotation. It will be
|
80
|
+
// automatically filled by the service config compiler .
|
81
|
+
string selector = 9;
|
82
|
+
|
83
|
+
// Policies that are applicable to the request message.
|
84
|
+
repeated FieldPolicy request_policies = 2;
|
85
|
+
}
|
@@ -0,0 +1,184 @@
|
|
1
|
+
// Copyright 2024 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.api;
|
18
|
+
|
19
|
+
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
20
|
+
option java_multiple_files = true;
|
21
|
+
option java_outer_classname = "QuotaProto";
|
22
|
+
option java_package = "com.google.api";
|
23
|
+
option objc_class_prefix = "GAPI";
|
24
|
+
|
25
|
+
// Quota configuration helps to achieve fairness and budgeting in service
|
26
|
+
// usage.
|
27
|
+
//
|
28
|
+
// The metric based quota configuration works this way:
|
29
|
+
// - The service configuration defines a set of metrics.
|
30
|
+
// - For API calls, the quota.metric_rules maps methods to metrics with
|
31
|
+
// corresponding costs.
|
32
|
+
// - The quota.limits defines limits on the metrics, which will be used for
|
33
|
+
// quota checks at runtime.
|
34
|
+
//
|
35
|
+
// An example quota configuration in yaml format:
|
36
|
+
//
|
37
|
+
// quota:
|
38
|
+
// limits:
|
39
|
+
//
|
40
|
+
// - name: apiWriteQpsPerProject
|
41
|
+
// metric: library.googleapis.com/write_calls
|
42
|
+
// unit: "1/min/{project}" # rate limit for consumer projects
|
43
|
+
// values:
|
44
|
+
// STANDARD: 10000
|
45
|
+
//
|
46
|
+
//
|
47
|
+
// (The metric rules bind all methods to the read_calls metric,
|
48
|
+
// except for the UpdateBook and DeleteBook methods. These two methods
|
49
|
+
// are mapped to the write_calls metric, with the UpdateBook method
|
50
|
+
// consuming at twice rate as the DeleteBook method.)
|
51
|
+
// metric_rules:
|
52
|
+
// - selector: "*"
|
53
|
+
// metric_costs:
|
54
|
+
// library.googleapis.com/read_calls: 1
|
55
|
+
// - selector: google.example.library.v1.LibraryService.UpdateBook
|
56
|
+
// metric_costs:
|
57
|
+
// library.googleapis.com/write_calls: 2
|
58
|
+
// - selector: google.example.library.v1.LibraryService.DeleteBook
|
59
|
+
// metric_costs:
|
60
|
+
// library.googleapis.com/write_calls: 1
|
61
|
+
//
|
62
|
+
// Corresponding Metric definition:
|
63
|
+
//
|
64
|
+
// metrics:
|
65
|
+
// - name: library.googleapis.com/read_calls
|
66
|
+
// display_name: Read requests
|
67
|
+
// metric_kind: DELTA
|
68
|
+
// value_type: INT64
|
69
|
+
//
|
70
|
+
// - name: library.googleapis.com/write_calls
|
71
|
+
// display_name: Write requests
|
72
|
+
// metric_kind: DELTA
|
73
|
+
// value_type: INT64
|
74
|
+
//
|
75
|
+
//
|
76
|
+
message Quota {
|
77
|
+
// List of QuotaLimit definitions for the service.
|
78
|
+
repeated QuotaLimit limits = 3;
|
79
|
+
|
80
|
+
// List of MetricRule definitions, each one mapping a selected method to one
|
81
|
+
// or more metrics.
|
82
|
+
repeated MetricRule metric_rules = 4;
|
83
|
+
}
|
84
|
+
|
85
|
+
// Bind API methods to metrics. Binding a method to a metric causes that
|
86
|
+
// metric's configured quota behaviors to apply to the method call.
|
87
|
+
message MetricRule {
|
88
|
+
// Selects the methods to which this rule applies.
|
89
|
+
//
|
90
|
+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
91
|
+
// details.
|
92
|
+
string selector = 1;
|
93
|
+
|
94
|
+
// Metrics to update when the selected methods are called, and the associated
|
95
|
+
// cost applied to each metric.
|
96
|
+
//
|
97
|
+
// The key of the map is the metric name, and the values are the amount
|
98
|
+
// increased for the metric against which the quota limits are defined.
|
99
|
+
// The value must not be negative.
|
100
|
+
map<string, int64> metric_costs = 2;
|
101
|
+
}
|
102
|
+
|
103
|
+
// `QuotaLimit` defines a specific limit that applies over a specified duration
|
104
|
+
// for a limit type. There can be at most one limit for a duration and limit
|
105
|
+
// type combination defined within a `QuotaGroup`.
|
106
|
+
message QuotaLimit {
|
107
|
+
// Name of the quota limit.
|
108
|
+
//
|
109
|
+
// The name must be provided, and it must be unique within the service. The
|
110
|
+
// name can only include alphanumeric characters as well as '-'.
|
111
|
+
//
|
112
|
+
// The maximum length of the limit name is 64 characters.
|
113
|
+
string name = 6;
|
114
|
+
|
115
|
+
// Optional. User-visible, extended description for this quota limit.
|
116
|
+
// Should be used only when more context is needed to understand this limit
|
117
|
+
// than provided by the limit's display name (see: `display_name`).
|
118
|
+
string description = 2;
|
119
|
+
|
120
|
+
// Default number of tokens that can be consumed during the specified
|
121
|
+
// duration. This is the number of tokens assigned when a client
|
122
|
+
// application developer activates the service for his/her project.
|
123
|
+
//
|
124
|
+
// Specifying a value of 0 will block all requests. This can be used if you
|
125
|
+
// are provisioning quota to selected consumers and blocking others.
|
126
|
+
// Similarly, a value of -1 will indicate an unlimited quota. No other
|
127
|
+
// negative values are allowed.
|
128
|
+
//
|
129
|
+
// Used by group-based quotas only.
|
130
|
+
int64 default_limit = 3;
|
131
|
+
|
132
|
+
// Maximum number of tokens that can be consumed during the specified
|
133
|
+
// duration. Client application developers can override the default limit up
|
134
|
+
// to this maximum. If specified, this value cannot be set to a value less
|
135
|
+
// than the default limit. If not specified, it is set to the default limit.
|
136
|
+
//
|
137
|
+
// To allow clients to apply overrides with no upper bound, set this to -1,
|
138
|
+
// indicating unlimited maximum quota.
|
139
|
+
//
|
140
|
+
// Used by group-based quotas only.
|
141
|
+
int64 max_limit = 4;
|
142
|
+
|
143
|
+
// Free tier value displayed in the Developers Console for this limit.
|
144
|
+
// The free tier is the number of tokens that will be subtracted from the
|
145
|
+
// billed amount when billing is enabled.
|
146
|
+
// This field can only be set on a limit with duration "1d", in a billable
|
147
|
+
// group; it is invalid on any other limit. If this field is not set, it
|
148
|
+
// defaults to 0, indicating that there is no free tier for this service.
|
149
|
+
//
|
150
|
+
// Used by group-based quotas only.
|
151
|
+
int64 free_tier = 7;
|
152
|
+
|
153
|
+
// Duration of this limit in textual notation. Must be "100s" or "1d".
|
154
|
+
//
|
155
|
+
// Used by group-based quotas only.
|
156
|
+
string duration = 5;
|
157
|
+
|
158
|
+
// The name of the metric this quota limit applies to. The quota limits with
|
159
|
+
// the same metric will be checked together during runtime. The metric must be
|
160
|
+
// defined within the service config.
|
161
|
+
string metric = 8;
|
162
|
+
|
163
|
+
// Specify the unit of the quota limit. It uses the same syntax as
|
164
|
+
// [Metric.unit][]. The supported unit kinds are determined by the quota
|
165
|
+
// backend system.
|
166
|
+
//
|
167
|
+
// Here are some examples:
|
168
|
+
// * "1/min/{project}" for quota per minute per project.
|
169
|
+
//
|
170
|
+
// Note: the order of unit components is insignificant.
|
171
|
+
// The "1" at the beginning is required to follow the metric unit syntax.
|
172
|
+
string unit = 9;
|
173
|
+
|
174
|
+
// Tiered limit values. You must specify this as a key:value pair, with an
|
175
|
+
// integer value that is the maximum number of requests allowed for the
|
176
|
+
// specified unit. Currently only STANDARD is supported.
|
177
|
+
map<string, int64> values = 10;
|
178
|
+
|
179
|
+
// User-visible display name for this limit.
|
180
|
+
// Optional. If not set, the UI will provide a default display name based on
|
181
|
+
// the quota configuration. This field can be used to override the default
|
182
|
+
// display name generated from the configuration.
|
183
|
+
string display_name = 12;
|
184
|
+
}
|
@@ -0,0 +1,243 @@
|
|
1
|
+
// Copyright 2024 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.api;
|
18
|
+
|
19
|
+
import "google/protobuf/descriptor.proto";
|
20
|
+
|
21
|
+
option cc_enable_arenas = true;
|
22
|
+
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
|
23
|
+
option java_multiple_files = true;
|
24
|
+
option java_outer_classname = "ResourceProto";
|
25
|
+
option java_package = "com.google.api";
|
26
|
+
option objc_class_prefix = "GAPI";
|
27
|
+
|
28
|
+
extend google.protobuf.FieldOptions {
|
29
|
+
// An annotation that describes a resource reference, see
|
30
|
+
// [ResourceReference][].
|
31
|
+
google.api.ResourceReference resource_reference = 1055;
|
32
|
+
}
|
33
|
+
|
34
|
+
extend google.protobuf.FileOptions {
|
35
|
+
// An annotation that describes a resource definition without a corresponding
|
36
|
+
// message; see [ResourceDescriptor][].
|
37
|
+
repeated google.api.ResourceDescriptor resource_definition = 1053;
|
38
|
+
}
|
39
|
+
|
40
|
+
extend google.protobuf.MessageOptions {
|
41
|
+
// An annotation that describes a resource definition, see
|
42
|
+
// [ResourceDescriptor][].
|
43
|
+
google.api.ResourceDescriptor resource = 1053;
|
44
|
+
}
|
45
|
+
|
46
|
+
// A simple descriptor of a resource type.
|
47
|
+
//
|
48
|
+
// ResourceDescriptor annotates a resource message (either by means of a
|
49
|
+
// protobuf annotation or use in the service config), and associates the
|
50
|
+
// resource's schema, the resource type, and the pattern of the resource name.
|
51
|
+
//
|
52
|
+
// Example:
|
53
|
+
//
|
54
|
+
// message Topic {
|
55
|
+
// // Indicates this message defines a resource schema.
|
56
|
+
// // Declares the resource type in the format of {service}/{kind}.
|
57
|
+
// // For Kubernetes resources, the format is {api group}/{kind}.
|
58
|
+
// option (google.api.resource) = {
|
59
|
+
// type: "pubsub.googleapis.com/Topic"
|
60
|
+
// pattern: "projects/{project}/topics/{topic}"
|
61
|
+
// };
|
62
|
+
// }
|
63
|
+
//
|
64
|
+
// The ResourceDescriptor Yaml config will look like:
|
65
|
+
//
|
66
|
+
// resources:
|
67
|
+
// - type: "pubsub.googleapis.com/Topic"
|
68
|
+
// pattern: "projects/{project}/topics/{topic}"
|
69
|
+
//
|
70
|
+
// Sometimes, resources have multiple patterns, typically because they can
|
71
|
+
// live under multiple parents.
|
72
|
+
//
|
73
|
+
// Example:
|
74
|
+
//
|
75
|
+
// message LogEntry {
|
76
|
+
// option (google.api.resource) = {
|
77
|
+
// type: "logging.googleapis.com/LogEntry"
|
78
|
+
// pattern: "projects/{project}/logs/{log}"
|
79
|
+
// pattern: "folders/{folder}/logs/{log}"
|
80
|
+
// pattern: "organizations/{organization}/logs/{log}"
|
81
|
+
// pattern: "billingAccounts/{billing_account}/logs/{log}"
|
82
|
+
// };
|
83
|
+
// }
|
84
|
+
//
|
85
|
+
// The ResourceDescriptor Yaml config will look like:
|
86
|
+
//
|
87
|
+
// resources:
|
88
|
+
// - type: 'logging.googleapis.com/LogEntry'
|
89
|
+
// pattern: "projects/{project}/logs/{log}"
|
90
|
+
// pattern: "folders/{folder}/logs/{log}"
|
91
|
+
// pattern: "organizations/{organization}/logs/{log}"
|
92
|
+
// pattern: "billingAccounts/{billing_account}/logs/{log}"
|
93
|
+
message ResourceDescriptor {
|
94
|
+
// A description of the historical or future-looking state of the
|
95
|
+
// resource pattern.
|
96
|
+
enum History {
|
97
|
+
// The "unset" value.
|
98
|
+
HISTORY_UNSPECIFIED = 0;
|
99
|
+
|
100
|
+
// The resource originally had one pattern and launched as such, and
|
101
|
+
// additional patterns were added later.
|
102
|
+
ORIGINALLY_SINGLE_PATTERN = 1;
|
103
|
+
|
104
|
+
// The resource has one pattern, but the API owner expects to add more
|
105
|
+
// later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
106
|
+
// that from being necessary once there are multiple patterns.)
|
107
|
+
FUTURE_MULTI_PATTERN = 2;
|
108
|
+
}
|
109
|
+
|
110
|
+
// A flag representing a specific style that a resource claims to conform to.
|
111
|
+
enum Style {
|
112
|
+
// The unspecified value. Do not use.
|
113
|
+
STYLE_UNSPECIFIED = 0;
|
114
|
+
|
115
|
+
// This resource is intended to be "declarative-friendly".
|
116
|
+
//
|
117
|
+
// Declarative-friendly resources must be more strictly consistent, and
|
118
|
+
// setting this to true communicates to tools that this resource should
|
119
|
+
// adhere to declarative-friendly expectations.
|
120
|
+
//
|
121
|
+
// Note: This is used by the API linter (linter.aip.dev) to enable
|
122
|
+
// additional checks.
|
123
|
+
DECLARATIVE_FRIENDLY = 1;
|
124
|
+
}
|
125
|
+
|
126
|
+
// The resource type. It must be in the format of
|
127
|
+
// {service_name}/{resource_type_kind}. The `resource_type_kind` must be
|
128
|
+
// singular and must not include version numbers.
|
129
|
+
//
|
130
|
+
// Example: `storage.googleapis.com/Bucket`
|
131
|
+
//
|
132
|
+
// The value of the resource_type_kind must follow the regular expression
|
133
|
+
// /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
134
|
+
// should use PascalCase (UpperCamelCase). The maximum number of
|
135
|
+
// characters allowed for the `resource_type_kind` is 100.
|
136
|
+
string type = 1;
|
137
|
+
|
138
|
+
// Optional. The relative resource name pattern associated with this resource
|
139
|
+
// type. The DNS prefix of the full resource name shouldn't be specified here.
|
140
|
+
//
|
141
|
+
// The path pattern must follow the syntax, which aligns with HTTP binding
|
142
|
+
// syntax:
|
143
|
+
//
|
144
|
+
// Template = Segment { "/" Segment } ;
|
145
|
+
// Segment = LITERAL | Variable ;
|
146
|
+
// Variable = "{" LITERAL "}" ;
|
147
|
+
//
|
148
|
+
// Examples:
|
149
|
+
//
|
150
|
+
// - "projects/{project}/topics/{topic}"
|
151
|
+
// - "projects/{project}/knowledgeBases/{knowledge_base}"
|
152
|
+
//
|
153
|
+
// The components in braces correspond to the IDs for each resource in the
|
154
|
+
// hierarchy. It is expected that, if multiple patterns are provided,
|
155
|
+
// the same component name (e.g. "project") refers to IDs of the same
|
156
|
+
// type of resource.
|
157
|
+
repeated string pattern = 2;
|
158
|
+
|
159
|
+
// Optional. The field on the resource that designates the resource name
|
160
|
+
// field. If omitted, this is assumed to be "name".
|
161
|
+
string name_field = 3;
|
162
|
+
|
163
|
+
// Optional. The historical or future-looking state of the resource pattern.
|
164
|
+
//
|
165
|
+
// Example:
|
166
|
+
//
|
167
|
+
// // The InspectTemplate message originally only supported resource
|
168
|
+
// // names with organization, and project was added later.
|
169
|
+
// message InspectTemplate {
|
170
|
+
// option (google.api.resource) = {
|
171
|
+
// type: "dlp.googleapis.com/InspectTemplate"
|
172
|
+
// pattern:
|
173
|
+
// "organizations/{organization}/inspectTemplates/{inspect_template}"
|
174
|
+
// pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
175
|
+
// history: ORIGINALLY_SINGLE_PATTERN
|
176
|
+
// };
|
177
|
+
// }
|
178
|
+
History history = 4;
|
179
|
+
|
180
|
+
// The plural name used in the resource name and permission names, such as
|
181
|
+
// 'projects' for the resource name of 'projects/{project}' and the permission
|
182
|
+
// name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
|
183
|
+
// to this is for Nested Collections that have stuttering names, as defined
|
184
|
+
// in [AIP-122](https://google.aip.dev/122#nested-collections), where the
|
185
|
+
// collection ID in the resource name pattern does not necessarily directly
|
186
|
+
// match the `plural` value.
|
187
|
+
//
|
188
|
+
// It is the same concept of the `plural` field in k8s CRD spec
|
189
|
+
// https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
190
|
+
//
|
191
|
+
// Note: The plural form is required even for singleton resources. See
|
192
|
+
// https://aip.dev/156
|
193
|
+
string plural = 5;
|
194
|
+
|
195
|
+
// The same concept of the `singular` field in k8s CRD spec
|
196
|
+
// https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
197
|
+
// Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
198
|
+
string singular = 6;
|
199
|
+
|
200
|
+
// Style flag(s) for this resource.
|
201
|
+
// These indicate that a resource is expected to conform to a given
|
202
|
+
// style. See the specific style flags for additional information.
|
203
|
+
repeated Style style = 10;
|
204
|
+
}
|
205
|
+
|
206
|
+
// Defines a proto annotation that describes a string field that refers to
|
207
|
+
// an API resource.
|
208
|
+
message ResourceReference {
|
209
|
+
// The resource type that the annotated field references.
|
210
|
+
//
|
211
|
+
// Example:
|
212
|
+
//
|
213
|
+
// message Subscription {
|
214
|
+
// string topic = 2 [(google.api.resource_reference) = {
|
215
|
+
// type: "pubsub.googleapis.com/Topic"
|
216
|
+
// }];
|
217
|
+
// }
|
218
|
+
//
|
219
|
+
// Occasionally, a field may reference an arbitrary resource. In this case,
|
220
|
+
// APIs use the special value * in their resource reference.
|
221
|
+
//
|
222
|
+
// Example:
|
223
|
+
//
|
224
|
+
// message GetIamPolicyRequest {
|
225
|
+
// string resource = 2 [(google.api.resource_reference) = {
|
226
|
+
// type: "*"
|
227
|
+
// }];
|
228
|
+
// }
|
229
|
+
string type = 1;
|
230
|
+
|
231
|
+
// The resource type of a child collection that the annotated field
|
232
|
+
// references. This is useful for annotating the `parent` field that
|
233
|
+
// doesn't have a fixed resource type.
|
234
|
+
//
|
235
|
+
// Example:
|
236
|
+
//
|
237
|
+
// message ListLogEntriesRequest {
|
238
|
+
// string parent = 1 [(google.api.resource_reference) = {
|
239
|
+
// child_type: "logging.googleapis.com/LogEntry"
|
240
|
+
// };
|
241
|
+
// }
|
242
|
+
string child_type = 2;
|
243
|
+
}
|