@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,438 @@
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.expr.v1alpha1;
18
+
19
+ import "google/protobuf/duration.proto";
20
+ import "google/protobuf/struct.proto";
21
+ import "google/protobuf/timestamp.proto";
22
+
23
+ option cc_enable_arenas = true;
24
+ option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "SyntaxProto";
27
+ option java_package = "com.google.api.expr.v1alpha1";
28
+
29
+ // A representation of the abstract syntax of the Common Expression Language.
30
+
31
+ // An expression together with source information as returned by the parser.
32
+ message ParsedExpr {
33
+ // The parsed expression.
34
+ Expr expr = 2;
35
+
36
+ // The source info derived from input that generated the parsed `expr`.
37
+ SourceInfo source_info = 3;
38
+ }
39
+
40
+ // An abstract representation of a common expression.
41
+ //
42
+ // Expressions are abstractly represented as a collection of identifiers,
43
+ // select statements, function calls, literals, and comprehensions. All
44
+ // operators with the exception of the '.' operator are modelled as function
45
+ // calls. This makes it easy to represent new operators into the existing AST.
46
+ //
47
+ // All references within expressions must resolve to a
48
+ // [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an
49
+ // expression to be valid. A reference may either be a bare identifier `name` or
50
+ // a qualified identifier `google.api.name`. References may either refer to a
51
+ // 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
55
+ // [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the
56
+ // function declaration `startsWith`.
57
+ message Expr {
58
+ // An identifier expression. e.g. `request`.
59
+ message Ident {
60
+ // Required. Holds a single, unqualified identifier, possibly preceded by a
61
+ // '.'.
62
+ //
63
+ // Qualified names are represented by the
64
+ // [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression.
65
+ string name = 1;
66
+ }
67
+
68
+ // A field selection expression. e.g. `request.auth`.
69
+ message Select {
70
+ // Required. The target of the selection expression.
71
+ //
72
+ // For example, in the select expression `request.auth`, the `request`
73
+ // portion of the expression is the `operand`.
74
+ Expr operand = 1;
75
+
76
+ // Required. The name of the field to select.
77
+ //
78
+ // For example, in the select expression `request.auth`, the `auth` portion
79
+ // of the expression would be the `field`.
80
+ string field = 2;
81
+
82
+ // Whether the select is to be interpreted as a field presence test.
83
+ //
84
+ // This results from the macro `has(request.auth)`.
85
+ bool test_only = 3;
86
+ }
87
+
88
+ // A call expression, including calls to predefined functions and operators.
89
+ //
90
+ // For example, `value == 10`, `size(map_value)`.
91
+ message Call {
92
+ // The target of an method call-style expression. For example, `x` in
93
+ // `x.f()`.
94
+ Expr target = 1;
95
+
96
+ // Required. The name of the function or method being called.
97
+ string function = 2;
98
+
99
+ // The arguments.
100
+ repeated Expr args = 3;
101
+ }
102
+
103
+ // A list creation expression.
104
+ //
105
+ // Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.
106
+ // `dyn([1, 'hello', 2.0])`
107
+ message CreateList {
108
+ // The elements part of the list.
109
+ repeated Expr elements = 1;
110
+
111
+ // The indices within the elements list which are marked as optional
112
+ // elements.
113
+ //
114
+ // When an optional-typed value is present, the value it contains
115
+ // is included in the list. If the optional-typed value is absent, the list
116
+ // element is omitted from the CreateList result.
117
+ repeated int32 optional_indices = 2;
118
+ }
119
+
120
+ // A map or message creation expression.
121
+ //
122
+ // Maps are constructed as `{'key_name': 'value'}`. Message construction is
123
+ // similar, but prefixed with a type name and composed of field ids:
124
+ // `types.MyType{field_id: 'value'}`.
125
+ message CreateStruct {
126
+ // Represents an entry.
127
+ message Entry {
128
+ // Required. An id assigned to this node by the parser which is unique
129
+ // in a given expression tree. This is used to associate type
130
+ // information and other attributes to the node.
131
+ int64 id = 1;
132
+
133
+ // The `Entry` key kinds.
134
+ oneof key_kind {
135
+ // The field key for a message creator statement.
136
+ string field_key = 2;
137
+
138
+ // The key expression for a map creation statement.
139
+ Expr map_key = 3;
140
+ }
141
+
142
+ // Required. The value assigned to the key.
143
+ //
144
+ // If the optional_entry field is true, the expression must resolve to an
145
+ // optional-typed value. If the optional value is present, the key will be
146
+ // set; however, if the optional value is absent, the key will be unset.
147
+ Expr value = 4;
148
+
149
+ // Whether the key-value pair is optional.
150
+ bool optional_entry = 5;
151
+ }
152
+
153
+ // The type name of the message to be created, empty when creating map
154
+ // literals.
155
+ string message_name = 1;
156
+
157
+ // The entries in the creation expression.
158
+ repeated Entry entries = 2;
159
+ }
160
+
161
+ // A comprehension expression applied to a list or map.
162
+ //
163
+ // Comprehensions are not part of the core syntax, but enabled with macros.
164
+ // A macro matches a specific call signature within a parsed AST and replaces
165
+ // the call with an alternate AST block. Macro expansion happens at parse
166
+ // time.
167
+ //
168
+ // The following macros are supported within CEL:
169
+ //
170
+ // Aggregate type macros may be applied to all elements in a list or all keys
171
+ // in a map:
172
+ //
173
+ // * `all`, `exists`, `exists_one` - test a predicate expression against
174
+ // the inputs and return `true` if the predicate is satisfied for all,
175
+ // any, or only one value `list.all(x, x < 10)`.
176
+ // * `filter` - test a predicate expression against the inputs and return
177
+ // the subset of elements which satisfy the predicate:
178
+ // `payments.filter(p, p > 1000)`.
179
+ // * `map` - apply an expression to all elements in the input and return the
180
+ // output aggregate type: `[1, 2, 3].map(i, i * i)`.
181
+ //
182
+ // The `has(m.x)` macro tests whether the property `x` is present in struct
183
+ // `m`. The semantics of this macro depend on the type of `m`. For proto2
184
+ // messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
185
+ // macro tests whether the property is set to its default. For map and struct
186
+ // types, the macro tests whether the property `x` is defined on `m`.
187
+ //
188
+ // Comprehensions for the standard environment macros evaluation can be best
189
+ // visualized as the following pseudocode:
190
+ //
191
+ // ```
192
+ // let `accu_var` = `accu_init`
193
+ // for (let `iter_var` in `iter_range`) {
194
+ // if (!`loop_condition`) {
195
+ // break
196
+ // }
197
+ // `accu_var` = `loop_step`
198
+ // }
199
+ // return `result`
200
+ // ```
201
+ //
202
+ // Comprehensions for the optional V2 macros which support map-to-map
203
+ // translation differ slightly from the standard environment macros in that
204
+ // they expose both the key or index in addition to the value for each list
205
+ // or map entry:
206
+ //
207
+ // ```
208
+ // let `accu_var` = `accu_init`
209
+ // for (let `iter_var`, `iter_var2` in `iter_range`) {
210
+ // if (!`loop_condition`) {
211
+ // break
212
+ // }
213
+ // `accu_var` = `loop_step`
214
+ // }
215
+ // return `result`
216
+ // ```
217
+ message Comprehension {
218
+ // The name of the first iteration variable.
219
+ // When the iter_range is a list, this variable is the list element.
220
+ // When the iter_range is a map, this variable is the map entry key.
221
+ string iter_var = 1;
222
+
223
+ // The name of the second iteration variable, empty if not set.
224
+ // When the iter_range is a list, this variable is the integer index.
225
+ // When the iter_range is a map, this variable is the map entry value.
226
+ // This field is only set for comprehension v2 macros.
227
+ string iter_var2 = 8;
228
+
229
+ // The range over which the comprehension iterates.
230
+ Expr iter_range = 2;
231
+
232
+ // The name of the variable used for accumulation of the result.
233
+ string accu_var = 3;
234
+
235
+ // The initial value of the accumulator.
236
+ Expr accu_init = 4;
237
+
238
+ // An expression which can contain iter_var, iter_var2, and accu_var.
239
+ //
240
+ // Returns false when the result has been computed and may be used as
241
+ // a hint to short-circuit the remainder of the comprehension.
242
+ Expr loop_condition = 5;
243
+
244
+ // An expression which can contain iter_var, iter_var2, and accu_var.
245
+ //
246
+ // Computes the next value of accu_var.
247
+ Expr loop_step = 6;
248
+
249
+ // An expression which can contain accu_var.
250
+ //
251
+ // Computes the result.
252
+ Expr result = 7;
253
+ }
254
+
255
+ // Required. An id assigned to this node by the parser which is unique in a
256
+ // given expression tree. This is used to associate type information and other
257
+ // attributes to a node in the parse tree.
258
+ int64 id = 2;
259
+
260
+ // Required. Variants of expressions.
261
+ oneof expr_kind {
262
+ // A literal expression.
263
+ Constant const_expr = 3;
264
+
265
+ // An identifier expression.
266
+ Ident ident_expr = 4;
267
+
268
+ // A field selection expression, e.g. `request.auth`.
269
+ Select select_expr = 5;
270
+
271
+ // A call expression, including calls to predefined functions and operators.
272
+ Call call_expr = 6;
273
+
274
+ // A list creation expression.
275
+ CreateList list_expr = 7;
276
+
277
+ // A map or message creation expression.
278
+ CreateStruct struct_expr = 8;
279
+
280
+ // A comprehension expression.
281
+ Comprehension comprehension_expr = 9;
282
+ }
283
+ }
284
+
285
+ // Represents a primitive literal.
286
+ //
287
+ // Named 'Constant' here for backwards compatibility.
288
+ //
289
+ // This is similar as the primitives supported in the well-known type
290
+ // `google.protobuf.Value`, but richer so it can represent CEL's full range of
291
+ // primitives.
292
+ //
293
+ // Lists and structs are not included as constants as these aggregate types may
294
+ // contain [Expr][google.api.expr.v1alpha1.Expr] elements which require
295
+ // evaluation and are thus not constant.
296
+ //
297
+ // Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
298
+ // `true`, `null`.
299
+ message Constant {
300
+ // Required. The valid constant kinds.
301
+ oneof constant_kind {
302
+ // null value.
303
+ google.protobuf.NullValue null_value = 1;
304
+
305
+ // boolean value.
306
+ bool bool_value = 2;
307
+
308
+ // int64 value.
309
+ int64 int64_value = 3;
310
+
311
+ // uint64 value.
312
+ uint64 uint64_value = 4;
313
+
314
+ // double value.
315
+ double double_value = 5;
316
+
317
+ // string value.
318
+ string string_value = 6;
319
+
320
+ // bytes value.
321
+ bytes bytes_value = 7;
322
+
323
+ // protobuf.Duration value.
324
+ //
325
+ // Deprecated: duration is no longer considered a builtin cel type.
326
+ google.protobuf.Duration duration_value = 8 [deprecated = true];
327
+
328
+ // protobuf.Timestamp value.
329
+ //
330
+ // Deprecated: timestamp is no longer considered a builtin cel type.
331
+ google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];
332
+ }
333
+ }
334
+
335
+ // Source information collected at parse time.
336
+ message SourceInfo {
337
+ // An extension that was requested for the source expression.
338
+ message Extension {
339
+ // Version
340
+ message Version {
341
+ // Major version changes indicate different required support level from
342
+ // the required components.
343
+ int64 major = 1;
344
+
345
+ // Minor version changes must not change the observed behavior from
346
+ // existing implementations, but may be provided informationally.
347
+ int64 minor = 2;
348
+ }
349
+
350
+ // CEL component specifier.
351
+ enum Component {
352
+ // Unspecified, default.
353
+ COMPONENT_UNSPECIFIED = 0;
354
+
355
+ // Parser. Converts a CEL string to an AST.
356
+ COMPONENT_PARSER = 1;
357
+
358
+ // Type checker. Checks that references in an AST are defined and types
359
+ // agree.
360
+ COMPONENT_TYPE_CHECKER = 2;
361
+
362
+ // Runtime. Evaluates a parsed and optionally checked CEL AST against a
363
+ // context.
364
+ COMPONENT_RUNTIME = 3;
365
+ }
366
+
367
+ // Identifier for the extension. Example: constant_folding
368
+ string id = 1;
369
+
370
+ // If set, the listed components must understand the extension for the
371
+ // expression to evaluate correctly.
372
+ //
373
+ // This field has set semantics, repeated values should be deduplicated.
374
+ repeated Component affected_components = 2;
375
+
376
+ // Version info. May be skipped if it isn't meaningful for the extension.
377
+ // (for example constant_folding might always be v0.0).
378
+ Version version = 3;
379
+ }
380
+
381
+ // The syntax version of the source, e.g. `cel1`.
382
+ string syntax_version = 1;
383
+
384
+ // The location name. All position information attached to an expression is
385
+ // relative to this location.
386
+ //
387
+ // The location could be a file, UI element, or similar. For example,
388
+ // `acme/app/AnvilPolicy.cel`.
389
+ string location = 2;
390
+
391
+ // Monotonically increasing list of code point offsets where newlines
392
+ // `\n` appear.
393
+ //
394
+ // The line number of a given position is the index `i` where for a given
395
+ // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
396
+ // column may be derivd from `id_positions[id] - line_offsets[i]`.
397
+ repeated int32 line_offsets = 3;
398
+
399
+ // A map from the parse node id (e.g. `Expr.id`) to the code point offset
400
+ // within the source.
401
+ map<int64, int32> positions = 4;
402
+
403
+ // A map from the parse node id where a macro replacement was made to the
404
+ // call `Expr` that resulted in a macro expansion.
405
+ //
406
+ // For example, `has(value.field)` is a function call that is replaced by a
407
+ // `test_only` field selection in the AST. Likewise, the call
408
+ // `list.exists(e, e > 10)` translates to a comprehension expression. The key
409
+ // in the map corresponds to the expression id of the expanded macro, and the
410
+ // value is the call `Expr` that was replaced.
411
+ map<int64, Expr> macro_calls = 5;
412
+
413
+ // A list of tags for extensions that were used while parsing or type checking
414
+ // the source expression. For example, optimizations that require special
415
+ // runtime support may be specified.
416
+ //
417
+ // These are used to check feature support between components in separate
418
+ // implementations. This can be used to either skip redundant work or
419
+ // report an error if the extension is unsupported.
420
+ repeated Extension extensions = 6;
421
+ }
422
+
423
+ // A specific position in source.
424
+ message SourcePosition {
425
+ // The soucre location name (e.g. file name).
426
+ string location = 1;
427
+
428
+ // The UTF-8 code unit offset.
429
+ int32 offset = 2;
430
+
431
+ // The 1-based index of the starting line in the source text
432
+ // where the issue occurs, or 0 if unknown.
433
+ int32 line = 3;
434
+
435
+ // The 0-based index of the starting position within the line of source text
436
+ // where the issue occurs. Only meaningful if line is nonzero.
437
+ int32 column = 4;
438
+ }
@@ -0,0 +1,115 @@
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.expr.v1alpha1;
18
+
19
+ import "google/protobuf/any.proto";
20
+ import "google/protobuf/struct.proto";
21
+
22
+ option cc_enable_arenas = true;
23
+ option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
24
+ option java_multiple_files = true;
25
+ option java_outer_classname = "ValueProto";
26
+ option java_package = "com.google.api.expr.v1alpha1";
27
+
28
+ // Contains representations for CEL runtime values.
29
+
30
+ // Represents a CEL value.
31
+ //
32
+ // This is similar to `google.protobuf.Value`, but can represent CEL's full
33
+ // range of values.
34
+ message Value {
35
+ // Required. The valid kinds of values.
36
+ oneof kind {
37
+ // Null value.
38
+ google.protobuf.NullValue null_value = 1;
39
+
40
+ // Boolean value.
41
+ bool bool_value = 2;
42
+
43
+ // Signed integer value.
44
+ int64 int64_value = 3;
45
+
46
+ // Unsigned integer value.
47
+ uint64 uint64_value = 4;
48
+
49
+ // Floating point value.
50
+ double double_value = 5;
51
+
52
+ // UTF-8 string value.
53
+ string string_value = 6;
54
+
55
+ // Byte string value.
56
+ bytes bytes_value = 7;
57
+
58
+ // An enum value.
59
+ EnumValue enum_value = 9;
60
+
61
+ // The proto message backing an object value.
62
+ google.protobuf.Any object_value = 10;
63
+
64
+ // Map value.
65
+ MapValue map_value = 11;
66
+
67
+ // List value.
68
+ ListValue list_value = 12;
69
+
70
+ // Type value.
71
+ string type_value = 15;
72
+ }
73
+ }
74
+
75
+ // An enum value.
76
+ message EnumValue {
77
+ // The fully qualified name of the enum type.
78
+ string type = 1;
79
+
80
+ // The value of the enum.
81
+ int32 value = 2;
82
+ }
83
+
84
+ // A list.
85
+ //
86
+ // Wrapped in a message so 'not set' and empty can be differentiated, which is
87
+ // required for use in a 'oneof'.
88
+ message ListValue {
89
+ // The ordered values in the list.
90
+ repeated Value values = 1;
91
+ }
92
+
93
+ // A map.
94
+ //
95
+ // Wrapped in a message so 'not set' and empty can be differentiated, which is
96
+ // required for use in a 'oneof'.
97
+ message MapValue {
98
+ // An entry in the map.
99
+ message Entry {
100
+ // The key.
101
+ //
102
+ // Must be unique with in the map.
103
+ // Currently only boolean, int, uint, and string values can be keys.
104
+ Value key = 1;
105
+
106
+ // The value.
107
+ Value value = 2;
108
+ }
109
+
110
+ // The set of map entries.
111
+ //
112
+ // CEL has fewer restrictions on keys, so a protobuf map represenation
113
+ // cannot be used.
114
+ repeated Entry entries = 1;
115
+ }
@@ -0,0 +1,84 @@
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/expr.proto";
21
+
22
+ option cc_enable_arenas = true;
23
+ option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr";
24
+ option java_multiple_files = true;
25
+ option java_outer_classname = "DeclProto";
26
+ option java_package = "com.google.api.expr.v1beta1";
27
+
28
+ // A declaration.
29
+ message Decl {
30
+ // The id of the declaration.
31
+ int32 id = 1;
32
+
33
+ // The name of the declaration.
34
+ string name = 2;
35
+
36
+ // The documentation string for the declaration.
37
+ string doc = 3;
38
+
39
+ // The kind of declaration.
40
+ oneof kind {
41
+ // An identifier declaration.
42
+ IdentDecl ident = 4;
43
+
44
+ // A function declaration.
45
+ FunctionDecl function = 5;
46
+ }
47
+ }
48
+
49
+ // The declared type of a variable.
50
+ //
51
+ // Extends runtime type values with extra information used for type checking
52
+ // and dispatching.
53
+ message DeclType {
54
+ // The expression id of the declared type, if applicable.
55
+ int32 id = 1;
56
+
57
+ // The type name, e.g. 'int', 'my.type.Type' or 'T'
58
+ string type = 2;
59
+
60
+ // An ordered list of type parameters, e.g. `<string, int>`.
61
+ // Only applies to a subset of types, e.g. `map`, `list`.
62
+ repeated DeclType type_params = 4;
63
+ }
64
+
65
+ // An identifier declaration.
66
+ message IdentDecl {
67
+ // Optional type of the identifier.
68
+ DeclType type = 3;
69
+
70
+ // Optional value of the identifier.
71
+ Expr value = 4;
72
+ }
73
+
74
+ // A function declaration.
75
+ message FunctionDecl {
76
+ // The function arguments.
77
+ repeated IdentDecl args = 1;
78
+
79
+ // Optional declared return type.
80
+ DeclType return_type = 2;
81
+
82
+ // If the first argument of the function is the receiver.
83
+ bool receiver_function = 3;
84
+ }