@devvit/protos 0.11.6 → 0.11.7-next-2025-01-28-9b10510e8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. package/meta.min.json +7820 -0
  2. package/package.json +4 -4
  3. package/protos.min.js +2 -0
  4. package/protos.min.js.map +7 -0
  5. package/schema/.snootobuf/deps/buf/validate/expression.proto +92 -0
  6. package/schema/.snootobuf/deps/buf/validate/priv/private.proto +41 -0
  7. package/schema/.snootobuf/deps/buf/validate/validate.proto +4130 -0
  8. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/audit.proto +72 -0
  9. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/auth.proto +49 -0
  10. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/organization.proto +54 -0
  11. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/service.proto +46 -0
  12. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/subscription.proto +72 -0
  13. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/ui.proto +20 -0
  14. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/user.proto +45 -0
  15. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/admin.proto +54 -0
  16. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/delivery.proto +773 -0
  17. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/filter.proto +66 -0
  18. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/firehose.proto +100 -0
  19. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/intake.proto +19 -0
  20. package/schema/.snootobuf/deps/devvit/events/v1alpha/events.proto +446 -0
  21. package/schema/.snootobuf/deps/devvit/gateway/v1alpha/payments.proto +24 -0
  22. package/schema/.snootobuf/deps/devvit/options/options.proto +98 -0
  23. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/commentv2.proto +29 -0
  24. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/flair.proto +25 -0
  25. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/modaction.proto +53 -0
  26. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/modmail.proto +56 -0
  27. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/postv2.proto +107 -0
  28. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/subredditv2.proto +41 -0
  29. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/userv2.proto +23 -0
  30. package/schema/.snootobuf/deps/devvit/triggers/v1alpha/triggers.proto +162 -0
  31. package/schema/.snootobuf/deps/enum/account_gender_category.proto +14 -0
  32. package/schema/.snootobuf/deps/enum/approval_status.proto +15 -0
  33. package/schema/.snootobuf/deps/enum/automated_reporting_level.proto +12 -0
  34. package/schema/.snootobuf/deps/enum/ban_evasion_threshold.proto +13 -0
  35. package/schema/.snootobuf/deps/enum/ban_info_action.proto +12 -0
  36. package/schema/.snootobuf/deps/enum/block_relation_type.proto +11 -0
  37. package/schema/.snootobuf/deps/enum/comment_sort.proto +18 -0
  38. package/schema/.snootobuf/deps/enum/comment_type.proto +11 -0
  39. package/schema/.snootobuf/deps/enum/crowd_control_level.proto +12 -0
  40. package/schema/.snootobuf/deps/enum/discussion_type.proto +10 -0
  41. package/schema/.snootobuf/deps/enum/distinguish_type.proto +14 -0
  42. package/schema/.snootobuf/deps/enum/flair_position.proto +11 -0
  43. package/schema/.snootobuf/deps/enum/hateful_content_threshold.proto +12 -0
  44. package/schema/.snootobuf/deps/enum/link_content_type.proto +11 -0
  45. package/schema/.snootobuf/deps/enum/link_type.proto +11 -0
  46. package/schema/.snootobuf/deps/enum/link_visibility.proto +11 -0
  47. package/schema/.snootobuf/deps/enum/prediction_leaderboard_entry_type.proto +11 -0
  48. package/schema/.snootobuf/deps/enum/promo_layout.proto +11 -0
  49. package/schema/.snootobuf/deps/enum/removed_by_type.proto +18 -0
  50. package/schema/.snootobuf/deps/enum/spam_level.proto +11 -0
  51. package/schema/.snootobuf/deps/enum/subreddit_type.proto +16 -0
  52. package/schema/.snootobuf/deps/enum/verdict.proto +14 -0
  53. package/schema/.snootobuf/deps/enum/vote.proto +12 -0
  54. package/schema/.snootobuf/deps/enum/whitelist_status.proto +17 -0
  55. package/schema/.snootobuf/deps/enum/wiki_edit_mode.proto +12 -0
  56. package/schema/.snootobuf/deps/evaluator/evaluator.proto +203 -0
  57. package/schema/.snootobuf/deps/google/api/annotations.proto +31 -0
  58. package/schema/.snootobuf/deps/google/api/apikeys/v2/apikeys.proto +288 -0
  59. package/schema/.snootobuf/deps/google/api/apikeys/v2/resources.proto +175 -0
  60. package/schema/.snootobuf/deps/google/api/auth.proto +237 -0
  61. package/schema/.snootobuf/deps/google/api/backend.proto +185 -0
  62. package/schema/.snootobuf/deps/google/api/billing.proto +77 -0
  63. package/schema/.snootobuf/deps/google/api/client.proto +431 -0
  64. package/schema/.snootobuf/deps/google/api/cloudquotas/v1/cloudquotas.proto +322 -0
  65. package/schema/.snootobuf/deps/google/api/cloudquotas/v1/resources.proto +315 -0
  66. package/schema/.snootobuf/deps/google/api/config_change.proto +84 -0
  67. package/schema/.snootobuf/deps/google/api/consumer.proto +82 -0
  68. package/schema/.snootobuf/deps/google/api/context.proto +92 -0
  69. package/schema/.snootobuf/deps/google/api/control.proto +41 -0
  70. package/schema/.snootobuf/deps/google/api/distribution.proto +213 -0
  71. package/schema/.snootobuf/deps/google/api/documentation.proto +168 -0
  72. package/schema/.snootobuf/deps/google/api/endpoint.proto +69 -0
  73. package/schema/.snootobuf/deps/google/api/error_reason.proto +589 -0
  74. package/schema/.snootobuf/deps/google/api/expr/conformance/v1alpha1/conformance_service.proto +183 -0
  75. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/checked.proto +343 -0
  76. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/eval.proto +118 -0
  77. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/explain.proto +53 -0
  78. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/syntax.proto +438 -0
  79. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/value.proto +115 -0
  80. package/schema/.snootobuf/deps/google/api/expr/v1beta1/decl.proto +84 -0
  81. package/schema/.snootobuf/deps/google/api/expr/v1beta1/eval.proto +125 -0
  82. package/schema/.snootobuf/deps/google/api/expr/v1beta1/expr.proto +265 -0
  83. package/schema/.snootobuf/deps/google/api/expr/v1beta1/source.proto +62 -0
  84. package/schema/.snootobuf/deps/google/api/expr/v1beta1/value.proto +114 -0
  85. package/schema/.snootobuf/deps/google/api/field_behavior.proto +104 -0
  86. package/schema/.snootobuf/deps/google/api/field_info.proto +106 -0
  87. package/schema/.snootobuf/deps/google/api/http.proto +371 -0
  88. package/schema/.snootobuf/deps/google/api/httpbody.proto +81 -0
  89. package/schema/.snootobuf/deps/google/api/label.proto +48 -0
  90. package/schema/.snootobuf/deps/google/api/launch_stage.proto +72 -0
  91. package/schema/.snootobuf/deps/google/api/log.proto +54 -0
  92. package/schema/.snootobuf/deps/google/api/logging.proto +81 -0
  93. package/schema/.snootobuf/deps/google/api/metric.proto +268 -0
  94. package/schema/.snootobuf/deps/google/api/monitored_resource.proto +130 -0
  95. package/schema/.snootobuf/deps/google/api/monitoring.proto +107 -0
  96. package/schema/.snootobuf/deps/google/api/policy.proto +85 -0
  97. package/schema/.snootobuf/deps/google/api/quota.proto +184 -0
  98. package/schema/.snootobuf/deps/google/api/resource.proto +243 -0
  99. package/schema/.snootobuf/deps/google/api/routing.proto +461 -0
  100. package/schema/.snootobuf/deps/google/api/service.proto +191 -0
  101. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/check_error.proto +124 -0
  102. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/distribution.proto +166 -0
  103. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/http_request.proto +93 -0
  104. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/log_entry.proto +126 -0
  105. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/metric_value.proto +81 -0
  106. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/operation.proto +123 -0
  107. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/quota_controller.proto +245 -0
  108. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/service_controller.proto +260 -0
  109. package/schema/.snootobuf/deps/google/api/servicecontrol/v2/service_controller.proto +196 -0
  110. package/schema/.snootobuf/deps/google/api/servicemanagement/v1/resources.proto +295 -0
  111. package/schema/.snootobuf/deps/google/api/servicemanagement/v1/servicemanager.proto +508 -0
  112. package/schema/.snootobuf/deps/google/api/serviceusage/v1/resources.proto +130 -0
  113. package/schema/.snootobuf/deps/google/api/serviceusage/v1/serviceusage.proto +305 -0
  114. package/schema/.snootobuf/deps/google/api/serviceusage/v1beta1/resources.proto +458 -0
  115. package/schema/.snootobuf/deps/google/api/serviceusage/v1beta1/serviceusage.proto +793 -0
  116. package/schema/.snootobuf/deps/google/api/source_info.proto +31 -0
  117. package/schema/.snootobuf/deps/google/api/system_parameter.proto +96 -0
  118. package/schema/.snootobuf/deps/google/api/usage.proto +96 -0
  119. package/schema/.snootobuf/deps/google/api/visibility.proto +113 -0
  120. package/schema/.snootobuf/deps/google/cloud/extended_operations.proto +150 -0
  121. package/schema/.snootobuf/deps/google/iam/admin/v1/iam.proto +1087 -0
  122. package/schema/.snootobuf/deps/google/iam/v1/iam_policy.proto +145 -0
  123. package/schema/.snootobuf/deps/google/iam/v1/logging/audit_data.proto +34 -0
  124. package/schema/.snootobuf/deps/google/iam/v1/options.proto +41 -0
  125. package/schema/.snootobuf/deps/google/iam/v1/policy.proto +240 -0
  126. package/schema/.snootobuf/deps/google/logging/type/http_request.proto +92 -0
  127. package/schema/.snootobuf/deps/google/logging/type/log_severity.proto +72 -0
  128. package/schema/.snootobuf/deps/google/longrunning/operations.proto +247 -0
  129. package/schema/.snootobuf/deps/google/protobuf/any.proto +158 -0
  130. package/schema/.snootobuf/deps/google/protobuf/api.proto +208 -0
  131. package/schema/.snootobuf/deps/google/protobuf/compiler/plugin.proto +183 -0
  132. package/schema/.snootobuf/deps/google/protobuf/descriptor.proto +921 -0
  133. package/schema/.snootobuf/deps/google/protobuf/duration.proto +116 -0
  134. package/schema/.snootobuf/deps/google/protobuf/empty.proto +51 -0
  135. package/schema/.snootobuf/deps/google/protobuf/field_mask.proto +245 -0
  136. package/schema/.snootobuf/deps/google/protobuf/source_context.proto +48 -0
  137. package/schema/.snootobuf/deps/google/protobuf/struct.proto +95 -0
  138. package/schema/.snootobuf/deps/google/protobuf/timestamp.proto +147 -0
  139. package/schema/.snootobuf/deps/google/protobuf/type.proto +187 -0
  140. package/schema/.snootobuf/deps/google/protobuf/wrappers.proto +123 -0
  141. package/schema/.snootobuf/deps/google/rpc/code.proto +186 -0
  142. package/schema/.snootobuf/deps/google/rpc/context/attribute_context.proto +287 -0
  143. package/schema/.snootobuf/deps/google/rpc/error_details.proto +246 -0
  144. package/schema/.snootobuf/deps/google/rpc/status.proto +47 -0
  145. package/schema/.snootobuf/deps/google/type/calendar_period.proto +57 -0
  146. package/schema/.snootobuf/deps/google/type/color.proto +170 -0
  147. package/schema/.snootobuf/deps/google/type/date.proto +50 -0
  148. package/schema/.snootobuf/deps/google/type/datetime.proto +97 -0
  149. package/schema/.snootobuf/deps/google/type/dayofweek.proto +51 -0
  150. package/schema/.snootobuf/deps/google/type/expr.proto +51 -0
  151. package/schema/.snootobuf/deps/google/type/fraction.proto +34 -0
  152. package/schema/.snootobuf/deps/google/type/latlng.proto +37 -0
  153. package/schema/.snootobuf/deps/google/type/money.proto +43 -0
  154. package/schema/.snootobuf/deps/google/type/month.proto +66 -0
  155. package/schema/.snootobuf/deps/google/type/postal_address.proto +135 -0
  156. package/schema/.snootobuf/deps/google/type/quaternion.proto +95 -0
  157. package/schema/.snootobuf/deps/google/type/timeofday.proto +44 -0
  158. package/schema/.snootobuf/deps/openapi/helper.proto +20 -0
  159. package/schema/.snootobuf/deps/products-api/protos/reddit/xpaymentsplatform/payproducts/v1/currencies.proto +189 -0
  160. package/schema/.snootobuf/deps/products-api/protos/reddit/xpaymentsplatform/payproducts/v1/payproducts.proto +118 -0
  161. package/schema/.snootobuf/deps/reddit/api/metadata/v1/metadata.proto +55 -0
  162. package/schema/.snootobuf/deps/reddit/coreplatform/account/v1/account.proto +579 -0
  163. package/schema/.snootobuf/deps/reddit/coreplatform/account/v1/account_relations.proto +43 -0
  164. package/schema/.snootobuf/deps/reddit/coreplatform/api/metadata/v1/metadata.proto +82 -0
  165. package/schema/.snootobuf/deps/reddit/coreplatform/blocking/v1/user_blocking_service.proto +221 -0
  166. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree.proto +78 -0
  167. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree_service.proto +189 -0
  168. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree_structure.proto +29 -0
  169. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comments.proto +417 -0
  170. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comments_service.proto +72 -0
  171. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/auth.proto +25 -0
  172. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/features.proto +52 -0
  173. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/lang.proto +16 -0
  174. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/legal.proto +20 -0
  175. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/media.proto +149 -0
  176. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/moderation.proto +197 -0
  177. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/safety.proto +116 -0
  178. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/time.proto +25 -0
  179. package/schema/.snootobuf/deps/reddit/coreplatform/domains/v1/domains_metadata_service.proto +101 -0
  180. package/schema/.snootobuf/deps/reddit/coreplatform/grpc_thrift/v1/grpc_thrift_options.proto +34 -0
  181. package/schema/.snootobuf/deps/reddit/coreplatform/links/v1/links.proto +798 -0
  182. package/schema/.snootobuf/deps/reddit/coreplatform/links/v1/links_service.proto +186 -0
  183. package/schema/.snootobuf/deps/reddit/coreplatform/messages/v1/messages.proto +110 -0
  184. package/schema/.snootobuf/deps/reddit/coreplatform/sensitive/v1/wrappers.proto +51 -0
  185. package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit.proto +1202 -0
  186. package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_member_relations.proto +85 -0
  187. package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_moderator_service.proto +363 -0
  188. package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_service.proto +301 -0
  189. package/schema/.snootobuf/deps/reddit/coreplatform/thing/v0/thing.proto +2869 -0
  190. package/schema/.snootobuf/deps/reddit/devvit/custom_post/v1/custom_post.proto +15 -0
  191. package/schema/.snootobuf/deps/reddit/devvit/custom_post/v1/service.proto +11 -0
  192. package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/context_action.proto +48 -0
  193. package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/manifest.proto +70 -0
  194. package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/service.proto +11 -0
  195. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/acknowledge_order_delivery.proto +17 -0
  196. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/checkout.proto +89 -0
  197. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/common.proto +322 -0
  198. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/delete_products.proto +17 -0
  199. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/events.proto +14 -0
  200. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_batch_products.proto +15 -0
  201. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_gold_balances.proto +48 -0
  202. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_order.proto +31 -0
  203. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_orders.proto +26 -0
  204. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_orders_by_user.proto +15 -0
  205. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_payout_info_batch.proto +52 -0
  206. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_products.proto +23 -0
  207. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_user_profiles.proto +28 -0
  208. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/refund_order.proto +17 -0
  209. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/service.proto +49 -0
  210. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/service_data_compliance.proto +20 -0
  211. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/upsert_products.proto +17 -0
  212. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paygatewaypsps/v1/paygatewaypsps.proto +158 -0
  213. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payorders/v1/payments_data_compliance.proto +18 -0
  214. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payorders/v1/payorders.proto +195 -0
  215. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/admin.proto +44 -0
  216. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/ledger.proto +200 -0
  217. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/payments_data_compliance.proto +18 -0
  218. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/paypayments.proto +210 -0
  219. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payproducts/v1/currencies.proto +189 -0
  220. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payproducts/v1/payproducts.proto +135 -0
  221. package/schema/.snootobuf/deps/snooron_sources/text_classification/text_classification.proto +29 -0
  222. package/schema/.snootobuf/deps/snooron_sources/v2_event/v2_event.proto +3292 -0
  223. package/schema/.snootobuf/deps/validate/validate.proto +862 -0
  224. package/schema/devvit/plugin/buildpack/buildpack_common.proto +6 -1
  225. package/schema/snootobuf.devenv.lock +210 -102
  226. package/schema/snootobuf.lock +210 -102
  227. package/schema/snootobuf.redditapi.lock +210 -102
  228. package/schema/snootobuf.ts.lock +210 -102
  229. package/types/devvit/dev_portal/dev_portal.d.ts +2 -0
  230. package/types/devvit/dev_portal/dev_portal.d.ts.map +1 -1
  231. package/types/devvit/plugin/builder/builder.d.ts +4 -0
  232. package/types/devvit/plugin/builder/builder.d.ts.map +1 -1
  233. package/types/devvit/plugin/buildpack/buildpack.d.ts +8 -0
  234. package/types/devvit/plugin/buildpack/buildpack.d.ts.map +1 -1
  235. package/types/devvit/plugin/buildpack/buildpack_common.d.ts +3 -0
  236. package/types/devvit/plugin/buildpack/buildpack_common.d.ts.map +1 -1
  237. package/types/devvit/plugin/buildpack/buildpack_common.js +37 -1
  238. package/types/devvit/plugin/linker/linker.d.ts +2 -0
  239. package/types/devvit/plugin/linker/linker.d.ts.map +1 -1
  240. package/types/devvit/plugin/linker/resolver.d.ts +2 -0
  241. package/types/devvit/plugin/linker/resolver.d.ts.map +1 -1
@@ -0,0 +1,125 @@
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
+
16
+ syntax = "proto3";
17
+
18
+ package google.api.expr.v1beta1;
19
+
20
+ import "google/api/expr/v1beta1/value.proto";
21
+ import "google/rpc/status.proto";
22
+
23
+ option cc_enable_arenas = true;
24
+ option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "EvalProto";
27
+ option java_package = "com.google.api.expr.v1beta1";
28
+
29
+ // The state of an evaluation.
30
+ //
31
+ // Can represent an initial, partial, or completed state of evaluation.
32
+ message EvalState {
33
+ // A single evaluation result.
34
+ message Result {
35
+ // The expression this result is for.
36
+ IdRef expr = 1;
37
+
38
+ // The index in `values` of the resulting value.
39
+ int32 value = 2;
40
+ }
41
+
42
+ // The unique values referenced in this message.
43
+ repeated ExprValue values = 1;
44
+
45
+ // An ordered list of results.
46
+ //
47
+ // Tracks the flow of evaluation through the expression.
48
+ // May be sparse.
49
+ repeated Result results = 3;
50
+ }
51
+
52
+ // The value of an evaluated expression.
53
+ message ExprValue {
54
+ // An expression can resolve to a value, error or unknown.
55
+ oneof kind {
56
+ // A concrete value.
57
+ Value value = 1;
58
+
59
+ // The set of errors in the critical path of evalution.
60
+ //
61
+ // Only errors in the critical path are included. For example,
62
+ // `(<error1> || true) && <error2>` will only result in `<error2>`,
63
+ // while `<error1> || <error2>` will result in both `<error1>` and
64
+ // `<error2>`.
65
+ //
66
+ // Errors cause by the presence of other errors are not included in the
67
+ // set. For example `<error1>.foo`, `foo(<error1>)`, and `<error1> + 1` will
68
+ // only result in `<error1>`.
69
+ //
70
+ // Multiple errors *might* be included when evaluation could result
71
+ // in different errors. For example `<error1> + <error2>` and
72
+ // `foo(<error1>, <error2>)` may result in `<error1>`, `<error2>` or both.
73
+ // The exact subset of errors included for this case is unspecified and
74
+ // depends on the implementation details of the evaluator.
75
+ ErrorSet error = 2;
76
+
77
+ // The set of unknowns in the critical path of evaluation.
78
+ //
79
+ // Unknown behaves identically to Error with regards to propagation.
80
+ // Specifically, only unknowns in the critical path are included, unknowns
81
+ // caused by the presence of other unknowns are not included, and multiple
82
+ // unknowns *might* be included included when evaluation could result in
83
+ // different unknowns. For example:
84
+ //
85
+ // (<unknown[1]> || true) && <unknown[2]> -> <unknown[2]>
86
+ // <unknown[1]> || <unknown[2]> -> <unknown[1,2]>
87
+ // <unknown[1]>.foo -> <unknown[1]>
88
+ // foo(<unknown[1]>) -> <unknown[1]>
89
+ // <unknown[1]> + <unknown[2]> -> <unknown[1]> or <unknown[2[>
90
+ //
91
+ // Unknown takes precidence over Error in cases where a `Value` can short
92
+ // circuit the result:
93
+ //
94
+ // <error> || <unknown> -> <unknown>
95
+ // <error> && <unknown> -> <unknown>
96
+ //
97
+ // Errors take precidence in all other cases:
98
+ //
99
+ // <unknown> + <error> -> <error>
100
+ // foo(<unknown>, <error>) -> <error>
101
+ UnknownSet unknown = 3;
102
+ }
103
+ }
104
+
105
+ // A set of errors.
106
+ //
107
+ // The errors included depend on the context. See `ExprValue.error`.
108
+ message ErrorSet {
109
+ // The errors in the set.
110
+ repeated google.rpc.Status errors = 1;
111
+ }
112
+
113
+ // A set of expressions for which the value is unknown.
114
+ //
115
+ // The unknowns included depend on the context. See `ExprValue.unknown`.
116
+ message UnknownSet {
117
+ // The ids of the expressions with unknown values.
118
+ repeated IdRef exprs = 1;
119
+ }
120
+
121
+ // A reference to an expression id.
122
+ message IdRef {
123
+ // The expression id.
124
+ int32 id = 1;
125
+ }
@@ -0,0 +1,265 @@
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
+
16
+ syntax = "proto3";
17
+
18
+ package google.api.expr.v1beta1;
19
+
20
+ import "google/api/expr/v1beta1/source.proto";
21
+ import "google/protobuf/struct.proto";
22
+
23
+ option cc_enable_arenas = true;
24
+ option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "ExprProto";
27
+ option java_package = "com.google.api.expr.v1beta1";
28
+
29
+ // An expression together with source information as returned by the parser.
30
+ message ParsedExpr {
31
+ // The parsed expression.
32
+ Expr expr = 2;
33
+
34
+ // The source info derived from input that generated the parsed `expr`.
35
+ SourceInfo source_info = 3;
36
+
37
+ // The syntax version of the source, e.g. `cel1`.
38
+ string syntax_version = 4;
39
+ }
40
+
41
+ // An abstract representation of a common expression.
42
+ //
43
+ // Expressions are abstractly represented as a collection of identifiers,
44
+ // select statements, function calls, literals, and comprehensions. All
45
+ // operators with the exception of the '.' operator are modelled as function
46
+ // calls. This makes it easy to represent new operators into the existing AST.
47
+ //
48
+ // All references within expressions must resolve to a [Decl][google.api.expr.v1beta1.Decl] provided at
49
+ // type-check for an expression to be valid. A reference may either be a bare
50
+ // identifier `name` or a qualified identifier `google.api.name`. References
51
+ // may either refer to a value or a function declaration.
52
+ //
53
+ // For example, the expression `google.api.name.startsWith('expr')` references
54
+ // the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression, and
55
+ // the function declaration `startsWith`.
56
+ message Expr {
57
+ // An identifier expression. e.g. `request`.
58
+ message Ident {
59
+ // Required. Holds a single, unqualified identifier, possibly preceded by a
60
+ // '.'.
61
+ //
62
+ // Qualified names are represented by the [Expr.Select][google.api.expr.v1beta1.Expr.Select] expression.
63
+ string name = 1;
64
+ }
65
+
66
+ // A field selection expression. e.g. `request.auth`.
67
+ message Select {
68
+ // Required. The target of the selection expression.
69
+ //
70
+ // For example, in the select expression `request.auth`, the `request`
71
+ // portion of the expression is the `operand`.
72
+ Expr operand = 1;
73
+
74
+ // Required. The name of the field to select.
75
+ //
76
+ // For example, in the select expression `request.auth`, the `auth` portion
77
+ // of the expression would be the `field`.
78
+ string field = 2;
79
+
80
+ // Whether the select is to be interpreted as a field presence test.
81
+ //
82
+ // This results from the macro `has(request.auth)`.
83
+ bool test_only = 3;
84
+ }
85
+
86
+ // A call expression, including calls to predefined functions and operators.
87
+ //
88
+ // For example, `value == 10`, `size(map_value)`.
89
+ message Call {
90
+ // The target of an method call-style expression. For example, `x` in
91
+ // `x.f()`.
92
+ Expr target = 1;
93
+
94
+ // Required. The name of the function or method being called.
95
+ string function = 2;
96
+
97
+ // The arguments.
98
+ repeated Expr args = 3;
99
+ }
100
+
101
+ // A list creation expression.
102
+ //
103
+ // Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogenous, e.g.
104
+ // `dyn([1, 'hello', 2.0])`
105
+ message CreateList {
106
+ // The elements part of the list.
107
+ repeated Expr elements = 1;
108
+ }
109
+
110
+ // A map or message creation expression.
111
+ //
112
+ // Maps are constructed as `{'key_name': 'value'}`. Message construction is
113
+ // similar, but prefixed with a type name and composed of field ids:
114
+ // `types.MyType{field_id: 'value'}`.
115
+ message CreateStruct {
116
+ // Represents an entry.
117
+ message Entry {
118
+ // Required. An id assigned to this node by the parser which is unique
119
+ // in a given expression tree. This is used to associate type
120
+ // information and other attributes to the node.
121
+ int32 id = 1;
122
+
123
+ // The `Entry` key kinds.
124
+ oneof key_kind {
125
+ // The field key for a message creator statement.
126
+ string field_key = 2;
127
+
128
+ // The key expression for a map creation statement.
129
+ Expr map_key = 3;
130
+ }
131
+
132
+ // Required. The value assigned to the key.
133
+ Expr value = 4;
134
+ }
135
+
136
+ // The type name of the message to be created, empty when creating map
137
+ // literals.
138
+ string type = 1;
139
+
140
+ // The entries in the creation expression.
141
+ repeated Entry entries = 2;
142
+ }
143
+
144
+ // A comprehension expression applied to a list or map.
145
+ //
146
+ // Comprehensions are not part of the core syntax, but enabled with macros.
147
+ // A macro matches a specific call signature within a parsed AST and replaces
148
+ // the call with an alternate AST block. Macro expansion happens at parse
149
+ // time.
150
+ //
151
+ // The following macros are supported within CEL:
152
+ //
153
+ // Aggregate type macros may be applied to all elements in a list or all keys
154
+ // in a map:
155
+ //
156
+ // * `all`, `exists`, `exists_one` - test a predicate expression against
157
+ // the inputs and return `true` if the predicate is satisfied for all,
158
+ // any, or only one value `list.all(x, x < 10)`.
159
+ // * `filter` - test a predicate expression against the inputs and return
160
+ // the subset of elements which satisfy the predicate:
161
+ // `payments.filter(p, p > 1000)`.
162
+ // * `map` - apply an expression to all elements in the input and return the
163
+ // output aggregate type: `[1, 2, 3].map(i, i * i)`.
164
+ //
165
+ // The `has(m.x)` macro tests whether the property `x` is present in struct
166
+ // `m`. The semantics of this macro depend on the type of `m`. For proto2
167
+ // messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
168
+ // macro tests whether the property is set to its default. For map and struct
169
+ // types, the macro tests whether the property `x` is defined on `m`.
170
+ message Comprehension {
171
+ // The name of the iteration variable.
172
+ string iter_var = 1;
173
+
174
+ // The range over which var iterates.
175
+ Expr iter_range = 2;
176
+
177
+ // The name of the variable used for accumulation of the result.
178
+ string accu_var = 3;
179
+
180
+ // The initial value of the accumulator.
181
+ Expr accu_init = 4;
182
+
183
+ // An expression which can contain iter_var and accu_var.
184
+ //
185
+ // Returns false when the result has been computed and may be used as
186
+ // a hint to short-circuit the remainder of the comprehension.
187
+ Expr loop_condition = 5;
188
+
189
+ // An expression which can contain iter_var and accu_var.
190
+ //
191
+ // Computes the next value of accu_var.
192
+ Expr loop_step = 6;
193
+
194
+ // An expression which can contain accu_var.
195
+ //
196
+ // Computes the result.
197
+ Expr result = 7;
198
+ }
199
+
200
+ // Required. An id assigned to this node by the parser which is unique in a
201
+ // given expression tree. This is used to associate type information and other
202
+ // attributes to a node in the parse tree.
203
+ int32 id = 2;
204
+
205
+ // Required. Variants of expressions.
206
+ oneof expr_kind {
207
+ // A literal expression.
208
+ Literal literal_expr = 3;
209
+
210
+ // An identifier expression.
211
+ Ident ident_expr = 4;
212
+
213
+ // A field selection expression, e.g. `request.auth`.
214
+ Select select_expr = 5;
215
+
216
+ // A call expression, including calls to predefined functions and operators.
217
+ Call call_expr = 6;
218
+
219
+ // A list creation expression.
220
+ CreateList list_expr = 7;
221
+
222
+ // A map or object creation expression.
223
+ CreateStruct struct_expr = 8;
224
+
225
+ // A comprehension expression.
226
+ Comprehension comprehension_expr = 9;
227
+ }
228
+ }
229
+
230
+ // Represents a primitive literal.
231
+ //
232
+ // This is similar to the primitives supported in the well-known type
233
+ // `google.protobuf.Value`, but richer so it can represent CEL's full range of
234
+ // primitives.
235
+ //
236
+ // Lists and structs are not included as constants as these aggregate types may
237
+ // contain [Expr][google.api.expr.v1beta1.Expr] elements which require evaluation and are thus not constant.
238
+ //
239
+ // Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
240
+ // `true`, `null`.
241
+ message Literal {
242
+ // Required. The valid constant kinds.
243
+ oneof constant_kind {
244
+ // null value.
245
+ google.protobuf.NullValue null_value = 1;
246
+
247
+ // boolean value.
248
+ bool bool_value = 2;
249
+
250
+ // int64 value.
251
+ int64 int64_value = 3;
252
+
253
+ // uint64 value.
254
+ uint64 uint64_value = 4;
255
+
256
+ // double value.
257
+ double double_value = 5;
258
+
259
+ // string value.
260
+ string string_value = 6;
261
+
262
+ // bytes value.
263
+ bytes bytes_value = 7;
264
+ }
265
+ }
@@ -0,0 +1,62 @@
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
+
16
+ syntax = "proto3";
17
+
18
+ package google.api.expr.v1beta1;
19
+
20
+ option cc_enable_arenas = true;
21
+ option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "SourceProto";
24
+ option java_package = "com.google.api.expr.v1beta1";
25
+
26
+ // Source information collected at parse time.
27
+ message SourceInfo {
28
+ // The location name. All position information attached to an expression is
29
+ // relative to this location.
30
+ //
31
+ // The location could be a file, UI element, or similar. For example,
32
+ // `acme/app/AnvilPolicy.cel`.
33
+ string location = 2;
34
+
35
+ // Monotonically increasing list of character offsets where newlines appear.
36
+ //
37
+ // The line number of a given position is the index `i` where for a given
38
+ // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
39
+ // column may be derivd from `id_positions[id] - line_offsets[i]`.
40
+ repeated int32 line_offsets = 3;
41
+
42
+ // A map from the parse node id (e.g. `Expr.id`) to the character offset
43
+ // within source.
44
+ map<int32, int32> positions = 4;
45
+ }
46
+
47
+ // A specific position in source.
48
+ message SourcePosition {
49
+ // The soucre location name (e.g. file name).
50
+ string location = 1;
51
+
52
+ // The character offset.
53
+ int32 offset = 2;
54
+
55
+ // The 1-based index of the starting line in the source text
56
+ // where the issue occurs, or 0 if unknown.
57
+ int32 line = 3;
58
+
59
+ // The 0-based index of the starting position within the line of source text
60
+ // where the issue occurs. Only meaningful if line is nonzer..
61
+ int32 column = 4;
62
+ }
@@ -0,0 +1,114 @@
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
+
16
+ syntax = "proto3";
17
+
18
+ package google.api.expr.v1beta1;
19
+
20
+ import "google/protobuf/any.proto";
21
+ import "google/protobuf/struct.proto";
22
+
23
+ option cc_enable_arenas = true;
24
+ option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "ValueProto";
27
+ option java_package = "com.google.api.expr.v1beta1";
28
+
29
+ // Represents a CEL value.
30
+ //
31
+ // This is similar to `google.protobuf.Value`, but can represent CEL's full
32
+ // range of values.
33
+ message Value {
34
+ // Required. The valid kinds of values.
35
+ oneof kind {
36
+ // Null value.
37
+ google.protobuf.NullValue null_value = 1;
38
+
39
+ // Boolean value.
40
+ bool bool_value = 2;
41
+
42
+ // Signed integer value.
43
+ int64 int64_value = 3;
44
+
45
+ // Unsigned integer value.
46
+ uint64 uint64_value = 4;
47
+
48
+ // Floating point value.
49
+ double double_value = 5;
50
+
51
+ // UTF-8 string value.
52
+ string string_value = 6;
53
+
54
+ // Byte string value.
55
+ bytes bytes_value = 7;
56
+
57
+ // An enum value.
58
+ EnumValue enum_value = 9;
59
+
60
+ // The proto message backing an object value.
61
+ google.protobuf.Any object_value = 10;
62
+
63
+ // Map value.
64
+ MapValue map_value = 11;
65
+
66
+ // List value.
67
+ ListValue list_value = 12;
68
+
69
+ // A Type value represented by the fully qualified name of the type.
70
+ string type_value = 15;
71
+ }
72
+ }
73
+
74
+ // An enum value.
75
+ message EnumValue {
76
+ // The fully qualified name of the enum type.
77
+ string type = 1;
78
+
79
+ // The value of the enum.
80
+ int32 value = 2;
81
+ }
82
+
83
+ // A list.
84
+ //
85
+ // Wrapped in a message so 'not set' and empty can be differentiated, which is
86
+ // required for use in a 'oneof'.
87
+ message ListValue {
88
+ // The ordered values in the list.
89
+ repeated Value values = 1;
90
+ }
91
+
92
+ // A map.
93
+ //
94
+ // Wrapped in a message so 'not set' and empty can be differentiated, which is
95
+ // required for use in a 'oneof'.
96
+ message MapValue {
97
+ // An entry in the map.
98
+ message Entry {
99
+ // The key.
100
+ //
101
+ // Must be unique with in the map.
102
+ // Currently only boolean, int, uint, and string values can be keys.
103
+ Value key = 1;
104
+
105
+ // The value.
106
+ Value value = 2;
107
+ }
108
+
109
+ // The set of map entries.
110
+ //
111
+ // CEL has fewer restrictions on keys, so a protobuf map represenation
112
+ // cannot be used.
113
+ repeated Entry entries = 1;
114
+ }
@@ -0,0 +1,104 @@
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 go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "FieldBehaviorProto";
24
+ option java_package = "com.google.api";
25
+ option objc_class_prefix = "GAPI";
26
+
27
+ extend google.protobuf.FieldOptions {
28
+ // A designation of a specific field behavior (required, output only, etc.)
29
+ // in protobuf messages.
30
+ //
31
+ // Examples:
32
+ //
33
+ // string name = 1 [(google.api.field_behavior) = REQUIRED];
34
+ // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
35
+ // google.protobuf.Duration ttl = 1
36
+ // [(google.api.field_behavior) = INPUT_ONLY];
37
+ // google.protobuf.Timestamp expire_time = 1
38
+ // [(google.api.field_behavior) = OUTPUT_ONLY,
39
+ // (google.api.field_behavior) = IMMUTABLE];
40
+ repeated google.api.FieldBehavior field_behavior = 1052 [packed = false];
41
+ }
42
+
43
+ // An indicator of the behavior of a given field (for example, that a field
44
+ // is required in requests, or given as output but ignored as input).
45
+ // This **does not** change the behavior in protocol buffers itself; it only
46
+ // denotes the behavior and may affect how API tooling handles the field.
47
+ //
48
+ // Note: This enum **may** receive new values in the future.
49
+ enum FieldBehavior {
50
+ // Conventional default for enums. Do not use this.
51
+ FIELD_BEHAVIOR_UNSPECIFIED = 0;
52
+
53
+ // Specifically denotes a field as optional.
54
+ // While all fields in protocol buffers are optional, this may be specified
55
+ // for emphasis if appropriate.
56
+ OPTIONAL = 1;
57
+
58
+ // Denotes a field as required.
59
+ // This indicates that the field **must** be provided as part of the request,
60
+ // and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
61
+ REQUIRED = 2;
62
+
63
+ // Denotes a field as output only.
64
+ // This indicates that the field is provided in responses, but including the
65
+ // field in a request does nothing (the server *must* ignore it and
66
+ // *must not* throw an error as a result of the field's presence).
67
+ OUTPUT_ONLY = 3;
68
+
69
+ // Denotes a field as input only.
70
+ // This indicates that the field is provided in requests, and the
71
+ // corresponding field is not included in output.
72
+ INPUT_ONLY = 4;
73
+
74
+ // Denotes a field as immutable.
75
+ // This indicates that the field may be set once in a request to create a
76
+ // resource, but may not be changed thereafter.
77
+ IMMUTABLE = 5;
78
+
79
+ // Denotes that a (repeated) field is an unordered list.
80
+ // This indicates that the service may provide the elements of the list
81
+ // in any arbitrary order, rather than the order the user originally
82
+ // provided. Additionally, the list's order may or may not be stable.
83
+ UNORDERED_LIST = 6;
84
+
85
+ // Denotes that this field returns a non-empty default value if not set.
86
+ // This indicates that if the user provides the empty value in a request,
87
+ // a non-empty value will be returned. The user will not be aware of what
88
+ // non-empty value to expect.
89
+ NON_EMPTY_DEFAULT = 7;
90
+
91
+ // Denotes that the field in a resource (a message annotated with
92
+ // google.api.resource) is used in the resource name to uniquely identify the
93
+ // resource. For AIP-compliant APIs, this should only be applied to the
94
+ // `name` field on the resource.
95
+ //
96
+ // This behavior should not be applied to references to other resources within
97
+ // the message.
98
+ //
99
+ // The identifier field of resources often have different field behavior
100
+ // depending on the request it is embedded in (e.g. for Create methods name
101
+ // is optional and unused, while for Update methods it is required). Instead
102
+ // of method-specific annotations, only `IDENTIFIER` is required.
103
+ IDENTIFIER = 8;
104
+ }