@devvit/protos 0.11.4 → 0.11.5-next-2024-12-09-8401a61d8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/meta.min.json +7814 -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/dev_portal/app/app.proto +3 -0
  225. package/schema/devvit/dev_portal/app/info/app_info.proto +13 -1
  226. package/schema/devvit/dev_portal/dev_portal.proto +9 -0
  227. package/schema/devvit/dev_portal/payments/payments_verification.proto +31 -0
  228. package/schema/devvit/ui/block_kit/v1beta/ui.proto +1 -1
  229. package/schema/devvit/ui/effects/web_view/v1alpha/fullscreen.proto +7 -1
  230. package/schema/snootobuf.devenv.lock +1227 -662
  231. package/schema/snootobuf.lock +1228 -662
  232. package/schema/snootobuf.redditapi.lock +1226 -662
  233. package/schema/snootobuf.ts.lock +1227 -662
  234. package/types/devvit/dev_portal/app/app.d.ts +2 -0
  235. package/types/devvit/dev_portal/app/app.d.ts.map +1 -1
  236. package/types/devvit/dev_portal/app/app.js +17 -0
  237. package/types/devvit/dev_portal/app/info/app_info.d.ts +13 -0
  238. package/types/devvit/dev_portal/app/info/app_info.d.ts.map +1 -1
  239. package/types/devvit/dev_portal/app/info/app_info.js +17 -0
  240. package/types/devvit/dev_portal/dev_portal.d.ts +113 -3
  241. package/types/devvit/dev_portal/dev_portal.d.ts.map +1 -1
  242. package/types/devvit/dev_portal/dev_portal.js +32 -0
  243. package/types/devvit/dev_portal/dev_portal.twirp-client.d.ts +17 -0
  244. package/types/devvit/dev_portal/dev_portal.twirp-client.d.ts.map +1 -1
  245. package/types/devvit/dev_portal/dev_portal.twirp-client.js +23 -0
  246. package/types/devvit/dev_portal/dev_portal.twirp.d.ts +9 -0
  247. package/types/devvit/dev_portal/dev_portal.twirp.d.ts.map +1 -1
  248. package/types/devvit/dev_portal/dev_portal.twirp.js +89 -0
  249. package/types/devvit/dev_portal/payments/payments_verification.d.ts +59 -0
  250. package/types/devvit/dev_portal/payments/payments_verification.d.ts.map +1 -0
  251. package/types/devvit/dev_portal/payments/payments_verification.js +163 -0
  252. package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts +4 -0
  253. package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts.map +1 -1
  254. package/types/devvit/ui/effects/web_view/v1alpha/fullscreen.d.ts +8 -1
  255. package/types/devvit/ui/effects/web_view/v1alpha/fullscreen.d.ts.map +1 -1
  256. package/types/devvit/ui/effects/web_view/v1alpha/fullscreen.js +15 -1
@@ -0,0 +1,31 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "google/protobuf/timestamp.proto";
6
+ import "reddit/xpaymentsplatform/payapi/v1/checkout.proto";
7
+ import "reddit/xpaymentsplatform/payapi/v1/common.proto";
8
+
9
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
10
+
11
+ message Order {
12
+ string id = 1;
13
+ OrderStatus status = 2;
14
+ google.protobuf.Timestamp created_at = 3;
15
+ google.protobuf.Timestamp updated_at = 4;
16
+ repeated OrderItem items = 5;
17
+ CheckoutAction checkout_action = 6;
18
+ StatusReason status_reason = 7;
19
+ Environment environment = 8;
20
+ string seller_id = 9;
21
+ string buyer_id = 10;
22
+ map<string, string> metadata = 11; // Recorded at order creation
23
+ }
24
+
25
+ message GetOrderResponse {
26
+ Order order = 1;
27
+ }
28
+
29
+ message GetOrderRequest {
30
+ string order_id = 1;
31
+ }
@@ -0,0 +1,26 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "google/protobuf/timestamp.proto";
6
+ import "reddit/xpaymentsplatform/payapi/v1/common.proto";
7
+ import "reddit/xpaymentsplatform/payapi/v1/get_order.proto";
8
+
9
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
10
+
11
+ message GetOrdersRequest {
12
+ CallerID caller_id = 1;
13
+ string seller_id = 2; // t2_id of the seller
14
+ string buyer_id = 3; // t2_id of the buyer
15
+ repeated string order_ids = 4; // the order ids filter
16
+ OrderStatus status = 5; // the status filter of the order
17
+ google.protobuf.Timestamp create_at_start = 6; // the start of the time range filter
18
+ google.protobuf.Timestamp create_at_end = 7; // the end of the time range filter
19
+ Environment environment = 8; // the environment filter of the order
20
+ PageInfo page_info = 20;
21
+ }
22
+
23
+ message GetOrdersResponse {
24
+ repeated Order orders = 1;
25
+ PageInfo next_page = 2;
26
+ }
@@ -0,0 +1,15 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "reddit/xpaymentsplatform/payapi/v1/get_order.proto";
6
+
7
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
8
+
9
+ message GetOrdersByUserRequest {
10
+ string user_id = 1;
11
+ }
12
+
13
+ message GetOrdersByUserResponse {
14
+ repeated Order orders = 1;
15
+ }
@@ -0,0 +1,52 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "google/protobuf/timestamp.proto";
6
+ import "reddit/xpaymentsplatform/payapi/v1/common.proto";
7
+ import "reddit/xpaymentsplatform/payapi/v1/get_gold_balances.proto";
8
+
9
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
10
+
11
+ message PayoutContext {
12
+ Environment environment = 1;
13
+ string user_id = 2;
14
+ }
15
+
16
+ message GetPayoutInfoBatchRequest {
17
+ repeated PayoutContext requests = 1;
18
+ }
19
+
20
+ message GetPayoutInfoBatchResponse {
21
+ repeated PayoutInfo payout_infos = 1;
22
+ }
23
+
24
+ message PayoutInfo {
25
+ ProductPrice current_earnings = 1;
26
+ ProductPrice all_time_earnings = 2;
27
+ PayoutTransactionsConnection transactions_connection = 3;
28
+ Environment environment = 4;
29
+ }
30
+
31
+ message PayoutTransactionsConnection {
32
+ repeated PayoutTransaction transactions = 1;
33
+ PageInfo page_info = 2;
34
+ }
35
+
36
+ message PayoutTransaction {
37
+ // string id = 1; // Reserved to support pagination
38
+ // Earnings for this payout, in the Redditor's currency
39
+ ProductPrice earnings = 2;
40
+ // Amount of earned gold that was (or will be) paid out
41
+ int32 gold = 3;
42
+ ContributorPayoutStatus status = 4;
43
+ google.protobuf.Timestamp date = 5;
44
+ }
45
+
46
+ enum ContributorPayoutStatus {
47
+ CONTRIBUTOR_PAYOUT_STATUS_UNSPECIFIED = 0;
48
+
49
+ CONTRIBUTOR_PAYOUT_STATUS_PROCESSING = 1;
50
+ CONTRIBUTOR_PAYOUT_STATUS_COMPLETE = 2;
51
+ CONTRIBUTOR_PAYOUT_STATUS_FAILED = 3;
52
+ }
@@ -0,0 +1,23 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "reddit/xpaymentsplatform/payapi/v1/common.proto";
6
+
7
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
8
+
9
+ message GetProductsRequest {
10
+ CallerID caller_id = 1;
11
+ Environment environment = 2;
12
+ repeated PaymentProvider payment_providers = 3;
13
+ Currency currency = 4;
14
+ ClientInfo client_info = 5;
15
+ string calling_user_id = 6; // Reddit user calling the API
16
+ string owner_id = 7;
17
+ repeated string product_ids = 8;
18
+ map<string, string> metadata = 9; // Free-form metadata filter
19
+ }
20
+
21
+ message GetProductsResponse {
22
+ repeated Product products = 1;
23
+ }
@@ -0,0 +1,28 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "reddit/xpaymentsplatform/payapi/v1/common.proto";
6
+
7
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
8
+
9
+ message GetUserProfilesRequest {
10
+ repeated string user_ids = 1;
11
+ }
12
+
13
+ message UserProfileList {
14
+ repeated UserProfile user_profiles = 1;
15
+ }
16
+
17
+ message UserProfile {
18
+ Environment environment = 1;
19
+ StripeProfile stripe_profile = 2;
20
+ }
21
+
22
+ message StripeProfile {
23
+ string stripe_account_id = 1;
24
+ }
25
+
26
+ message GetUserProfilesResponse {
27
+ map<string, UserProfileList> user_profiles = 1;
28
+ }
@@ -0,0 +1,17 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "reddit/xpaymentsplatform/payapi/v1/common.proto";
6
+
7
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
8
+
9
+ message RefundOrderRequest {
10
+ string order_id = 1;
11
+ StatusReason reason = 2;
12
+
13
+ string initiator_id = 98; // t2_id of the user initiating the refund.
14
+ CallerID caller_id = 99; // This is the ID of the service that is calling this API.
15
+ }
16
+
17
+ message RefundOrderResponse {}
@@ -0,0 +1,49 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "reddit/xpaymentsplatform/payapi/v1/acknowledge_order_delivery.proto";
6
+ import "reddit/xpaymentsplatform/payapi/v1/checkout.proto";
7
+ import "reddit/xpaymentsplatform/payapi/v1/delete_products.proto";
8
+ import "reddit/xpaymentsplatform/payapi/v1/get_batch_products.proto";
9
+ import "reddit/xpaymentsplatform/payapi/v1/get_gold_balances.proto";
10
+ import "reddit/xpaymentsplatform/payapi/v1/get_order.proto";
11
+ import "reddit/xpaymentsplatform/payapi/v1/get_orders.proto";
12
+ import "reddit/xpaymentsplatform/payapi/v1/get_orders_by_user.proto";
13
+ import "reddit/xpaymentsplatform/payapi/v1/get_payout_info_batch.proto";
14
+ import "reddit/xpaymentsplatform/payapi/v1/get_products.proto";
15
+ import "reddit/xpaymentsplatform/payapi/v1/get_user_profiles.proto";
16
+ import "reddit/xpaymentsplatform/payapi/v1/refund_order.proto";
17
+ import "reddit/xpaymentsplatform/payapi/v1/upsert_products.proto";
18
+
19
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
20
+
21
+ service PayApiService {
22
+ rpc AcknowledgeOrderDelivery(AcknowledgeOrderDeliveryRequest) returns (AcknowledgeOrderDeliveryResponse) {}
23
+
24
+ rpc Checkout(CheckoutRequest) returns (CheckoutResponse) {}
25
+
26
+ rpc CheckoutDevvitProducts(CheckoutDevvitProductsRequest) returns (CheckoutDevvitProductsResponse) {}
27
+
28
+ rpc DeleteProducts(DeleteProductsRequest) returns (DeleteProductsResponse) {}
29
+
30
+ rpc GetBatchProducts(GetBatchProductsRequest) returns (GetBatchProductsResponse) {}
31
+
32
+ rpc GetGoldBalances(GetGoldBalancesRequest) returns (GetGoldBalancesResponse) {}
33
+
34
+ rpc GetOrder(GetOrderRequest) returns (GetOrderResponse) {}
35
+
36
+ rpc GetPayoutInfoBatch(GetPayoutInfoBatchRequest) returns (GetPayoutInfoBatchResponse) {}
37
+
38
+ rpc GetProducts(GetProductsRequest) returns (GetProductsResponse) {}
39
+
40
+ rpc GetUserProfiles(GetUserProfilesRequest) returns (GetUserProfilesResponse) {}
41
+
42
+ rpc GetOrders(GetOrdersRequest) returns (GetOrdersResponse) {}
43
+
44
+ rpc GetOrdersByUser(GetOrdersByUserRequest) returns (GetOrdersByUserResponse) {}
45
+
46
+ rpc RefundOrder(RefundOrderRequest) returns (RefundOrderResponse) {}
47
+
48
+ rpc UpsertProducts(UpsertProductsRequest) returns (UpsertProductsResponse) {}
49
+ }
@@ -0,0 +1,20 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "reddit/xpaymentsplatform/payapi/v1/common.proto";
6
+
7
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
8
+
9
+ message DeleteUsersDataRequest {
10
+ repeated string user_ids = 1; // The user IDs to delete data for
11
+ CallerID caller_id = 99;
12
+ }
13
+
14
+ message DeleteUsersDataResponse {
15
+ repeated string user_ids = 1; // The user IDs that were successfully deleted
16
+ }
17
+
18
+ service DataComplianceService {
19
+ rpc DeleteUsersData(DeleteUsersDataRequest) returns (DeleteUsersDataResponse) {}
20
+ }
@@ -0,0 +1,17 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payapi.v1;
4
+
5
+ import "reddit/xpaymentsplatform/payapi/v1/common.proto";
6
+
7
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-api/api/xpaymentsplatform/payapipb/v1;payapipb";
8
+
9
+ message UpsertProductsRequest {
10
+ CallerID caller_id = 1;
11
+ Environment environment = 2; // It must match the environment of the products.
12
+ repeated Product products = 3;
13
+ }
14
+
15
+ message UpsertProductsResponse {
16
+ repeated Product products = 1; // These are the products that were successfully upserted.
17
+ }
@@ -0,0 +1,158 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.paygatewaypsps.v1;
4
+
5
+ import "google/protobuf/timestamp.proto";
6
+ import "products-api/protos/reddit/xpaymentsplatform/payproducts/v1/currencies.proto";
7
+
8
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-gateway-psps/gateway-api/api/xpaymentsplatform/paygatewaypspspb/v1;paygatewaypspspb";
9
+
10
+ enum PaymentProvider {
11
+ PAYMENT_PROVIDER_UNSPECIFIED = 0;
12
+ PAYMENT_PROVIDER_GOOGLE = 1;
13
+ PAYMENT_PROVIDER_STRIPE = 2;
14
+ }
15
+
16
+ enum Environment {
17
+ ENVIRONMENT_UNSPECIFIED = 0;
18
+ ENVIRONMENT_SANDBOX = 1;
19
+ ENVIRONMENT_PRODUCTION = 2;
20
+ }
21
+
22
+ enum PaymentStatus {
23
+ PAYMENT_STATUS_UNSPECIFIED = 0;
24
+ PAYMENT_STATUS_SUCCESS = 1;
25
+ PAYMENT_STATUS_CANCELED = 2;
26
+ PAYMENT_STATUS_PROCESSING = 3;
27
+ PAYMENT_STATUS_REQUIRES_PAYMENT_METHOD = 4;
28
+ }
29
+
30
+ enum RefundStatus {
31
+ REFUND_STATUS_UNSPECIFIED = 0;
32
+ REFUND_STATUS_PENDING = 1;
33
+ REFUND_STATUS_REQUIRES_ACTION = 2;
34
+ REFUND_STATUS_SUCCEEDED = 3;
35
+ REFUND_STATUS_FAILED = 4;
36
+ REFUND_STATUS_CANCELED = 5;
37
+ }
38
+
39
+ enum AcknowledgementState {
40
+ ACKNOWLEDGEMENT_STATE_UNSPECIFIED = 0;
41
+ ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED = 1;
42
+ ACKNOWLEDGEMENT_STATE_UNACKNOWLEDGED = 2;
43
+ }
44
+
45
+ message AcknowledgeDeliveryRequest {
46
+ PaymentProvider provider = 1;
47
+ Environment environment = 2;
48
+
49
+ string package_name = 3;
50
+ string product_id = 4;
51
+ string purchase_token = 5;
52
+ }
53
+
54
+ message AcknowledgeDeliveryResponse {}
55
+
56
+ message CreateProfileRequest {
57
+ PaymentProvider provider = 1;
58
+ Environment environment = 2;
59
+
60
+ string email = 3;
61
+ string metadata = 4; // JSON to attach to the profile TODO: currently unused
62
+ }
63
+
64
+ message CreateProfileResponse {
65
+ string profile_id = 1;
66
+ }
67
+
68
+ message CreateClientTokenRequest {
69
+ PaymentProvider provider = 1;
70
+ Environment environment = 2;
71
+
72
+ string payment_unit_id = 3; // idempotency key
73
+ int64 price = 4;
74
+ string statement_descriptor = 5;
75
+ PaymentProfile profile = 6;
76
+ string metadata = 7; // JSON to attach to the receipt TODO: currently unused
77
+ reddit.xpaymentsplatform.payproducts.v1.Currency currency = 8;
78
+ }
79
+
80
+ message PaymentProfile {
81
+ string email = 1;
82
+ string provider_id = 2;
83
+ }
84
+
85
+ message CreateClientTokenResponse {
86
+ string payment_id = 1;
87
+ string token = 2;
88
+ PaymentStatus status = 3;
89
+ }
90
+
91
+ message GetPaymentStatusRequest {
92
+ PaymentProvider provider = 1;
93
+ Environment environment = 2;
94
+
95
+ string payment_id = 3;
96
+ string package_name = 4;
97
+ string product_id = 5;
98
+ string purchase_token = 6;
99
+ }
100
+
101
+ message GetPaymentStatusResponse {
102
+ PaymentStatus status = 1;
103
+ }
104
+
105
+ message RefundRequest {
106
+ PaymentProvider provider = 1;
107
+ Environment environment = 2;
108
+
109
+ string payment_id = 3;
110
+ }
111
+
112
+ message RefundResponse {
113
+ string refund_id = 1;
114
+ RefundStatus status = 2;
115
+ }
116
+
117
+ message GetProductPurchaseRequest {
118
+ PaymentProvider provider = 1;
119
+ Environment environment = 2;
120
+
121
+ string package_name = 3;
122
+ string product_id = 4;
123
+ string purchase_token = 5;
124
+ }
125
+
126
+ message GetProductPurchaseResponse {
127
+ string order_id = 1;
128
+ PaymentStatus purchase_state = 2;
129
+ google.protobuf.Timestamp purchase_time = 3;
130
+ AcknowledgementState acknowledgement_state = 4;
131
+ string purchase_token = 5;
132
+ string product_id = 6;
133
+ string region_code = 7; // ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted
134
+ }
135
+
136
+ message GetProductRequest {
137
+ PaymentProvider provider = 1;
138
+ Environment environment = 2;
139
+
140
+ string package_name = 3;
141
+ string product_id = 4;
142
+ }
143
+
144
+ message GetProductResponse {
145
+ string product_id = 1;
146
+ string price = 2; // Price in 1/million of the currency base unit, represented as a string
147
+ reddit.xpaymentsplatform.payproducts.v1.Currency currency = 3;
148
+ }
149
+
150
+ service PayGatewayPSPsService {
151
+ rpc AcknowledgeDelivery(AcknowledgeDeliveryRequest) returns (AcknowledgeDeliveryResponse) {}
152
+ rpc CreateProfile(CreateProfileRequest) returns (CreateProfileResponse) {}
153
+ rpc CreateClientToken(CreateClientTokenRequest) returns (CreateClientTokenResponse) {}
154
+ rpc GetPaymentStatus(GetPaymentStatusRequest) returns (GetPaymentStatusResponse) {}
155
+ rpc Refund(RefundRequest) returns (RefundResponse) {}
156
+ rpc GetProductPurchase(GetProductPurchaseRequest) returns (GetProductPurchaseResponse) {}
157
+ rpc GetProduct(GetProductRequest) returns (GetProductResponse) {}
158
+ }
@@ -0,0 +1,18 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payorders.v1;
4
+
5
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-orders/orders-api/api/xpaymentsplatform/payorderspb/v1;payorderspb";
6
+
7
+ message DeleteUsersDataRequest {
8
+ string requester_id = 1;
9
+ repeated string user_ids = 2;
10
+ }
11
+
12
+ message DeleteUsersDataResponse {
13
+ repeated string user_ids = 1;
14
+ }
15
+
16
+ service DataComplianceService {
17
+ rpc DeleteUsersData(DeleteUsersDataRequest) returns (DeleteUsersDataResponse) {}
18
+ }
@@ -0,0 +1,195 @@
1
+ syntax = "proto3";
2
+
3
+ package reddit.xpaymentsplatform.payorders.v1;
4
+
5
+ import "google/protobuf/timestamp.proto";
6
+ import "reddit/xpaymentsplatform/paypayments/v1/paypayments.proto";
7
+ import "reddit/xpaymentsplatform/payproducts/v1/payproducts.proto";
8
+
9
+ option go_package = "github.snooguts.net/reddit/reddit-service-pay-orders/orders-api/api/xpaymentsplatform/payorderspb/v1;payorderspb";
10
+
11
+ enum OrderStatus {
12
+ ORDER_STATUS_UNSPECIFIED = 0;
13
+
14
+ NEW = 1;
15
+ CREATED = 2;
16
+ PAID = 3;
17
+ DELIVERED = 4;
18
+ CANCELED = 5; // [Before payment] Reddit decides to cancel a checkout before it was paid.
19
+ REVERTED = 6; // [After payment] Refund, chargeback.
20
+ }
21
+
22
+ enum StatusReason {
23
+ STATUS_REASON_UNSPECIFIED = 0;
24
+
25
+ REFUND_REDDIT_ADMIN = 1;
26
+ REFUND_PAYMENT_PLATFORM_INTERNAL = 2;
27
+ REFUND_PRODUCT_OWNER = 3;
28
+
29
+ CHARGEBACK = 4;
30
+
31
+ EXPIRED_INTERNAL_ERROR = 5;
32
+ EXPIRED_NOT_PAID = 6;
33
+ EXPIRED_NOT_DELIVERED = 7;
34
+
35
+ ECON_BLOCKER_VALIDATION_FAILED = 8;
36
+ }
37
+
38
+ message CheckoutAction {
39
+ reddit.xpaymentsplatform.paypayments.v1.PaymentMode mode = 1;
40
+ reddit.xpaymentsplatform.payproducts.v1.PaymentProvider payment_provider = 2;
41
+ string client_token = 3;
42
+ }
43
+
44
+ message ProductCheckoutMetadata {
45
+ bool is_anonymous = 1; // If the true, buyer info can't be shown to the seller.
46
+ string raw_client_metadata = 100; // The raw metadata sent by the client. Payment Platform will not interpret it.
47
+ }
48
+
49
+ message CartItem {
50
+ reddit.xpaymentsplatform.payproducts.v1.Product product = 1;
51
+ ProductCheckoutMetadata product_checkout_metadata = 2;
52
+ }
53
+
54
+ message Order {
55
+ string id = 1;
56
+ OrderStatus status = 2;
57
+ google.protobuf.Timestamp created_at = 3;
58
+ google.protobuf.Timestamp updated_at = 4;
59
+
60
+ repeated CartItem cart_items = 5;
61
+
62
+ CheckoutAction checkout_action = 6; // Each order has only one checkout possible
63
+ optional StatusReason status_reason = 7; // Set only if status == CANCELED or REVERTED
64
+
65
+ reddit.xpaymentsplatform.payproducts.v1.Environment env = 8;
66
+ }
67
+
68
+ message GetOrderRequest {
69
+ string order_id = 1;
70
+ }
71
+
72
+ message GetOrderResponse {
73
+ Order order = 1;
74
+ }
75
+
76
+ message GetOrdersRequest {
77
+ repeated string order_ids = 1; // the order ids filter
78
+ string seller_id = 2; // t2_id of the app account
79
+ string buyer_id = 3; // t2_id of the buyer
80
+ google.protobuf.Timestamp created_at_start = 4; // the start of the time range
81
+ google.protobuf.Timestamp created_at_end = 5; // the end of the time range
82
+ OrderStatus status = 6; // the status filter of the order
83
+ map<string, string> checkout_metadata = 7; // the metadata filter of the order
84
+ PageInfo page_info = 20;
85
+ }
86
+
87
+ message GetOrdersResponse {
88
+ repeated Order orders = 1;
89
+ PageInfo next_page = 2;
90
+ }
91
+
92
+ // Required to support pagination of GetOrders.
93
+ message PageInfo {
94
+ string start_cursor = 1; // if empty, start from the most recent transaction
95
+ int32 page_size = 2;
96
+ bool has_next_page = 3;
97
+ }
98
+
99
+ message CreateOrderRequest {
100
+ // Optional ID for a new order if client wants to use its own,
101
+ // otherwise new UUID will be generated and lower-case string representation will
102
+ // be used as an order ID.
103
+ // If order with provided ID already exists, check if:
104
+ // - buyerID is present, and it matches the one in the order
105
+ // - products are present, and they match the ones in the order
106
+ // return the stored order if all checks are positive. == Implementation of Order Idempotency
107
+ string order_id = 1;
108
+
109
+ string buyer_id = 2; // t2_Id
110
+
111
+ // It can only be [NEW, PAID]
112
+ // [NEW]: a new order is being created. It will require a payment
113
+ // [PAID]: a new order is being created. It will not require a payment
114
+ OrderStatus status = 3;
115
+
116
+ repeated CartItem cart_items = 4;
117
+
118
+ reddit.xpaymentsplatform.payproducts.v1.Environment env = 5;
119
+ // [P3] The order will expire at the given time
120
+ // required google.protobuf.Timestamp expiresAt = 4;
121
+
122
+ // User-scoped (buyer_id) idempotency key to provide instead of order_id if
123
+ // client wants to get server-generated order ID.
124
+ string reference_id = 6;
125
+ }
126
+
127
+ message MigrateOrdersRequest {
128
+ repeated MigrationOrder orders = 1;
129
+ }
130
+
131
+ message MigrationOrder {
132
+ string order_id = 1;
133
+ string buyer_id = 2;
134
+ OrderStatus status = 3;
135
+ repeated CartItem cart_items = 4;
136
+ reddit.xpaymentsplatform.payproducts.v1.Environment env = 5;
137
+ string reference_id = 6;
138
+ google.protobuf.Timestamp created_at = 7;
139
+ }
140
+
141
+ message MigrateOrdersResponse {}
142
+
143
+ message CreateOrderResponse {
144
+ Order order = 1;
145
+ }
146
+
147
+ message UpdateOrderRequest {
148
+ string order_id = 1;
149
+
150
+ // The new status of the order. Check the state machine for allowed transitions
151
+ OrderStatus status = 2;
152
+
153
+ CheckoutAction checkout_action = 3;
154
+ optional StatusReason reason = 4;
155
+ repeated CartItem cart_items = 5;
156
+ }
157
+
158
+ message UpdateOrderResponse {
159
+ Order order = 1;
160
+ }
161
+
162
+ message AcknowledgeOrderDeliveryRequest {
163
+ string order_id = 1;
164
+ }
165
+
166
+ message AcknowledgeOrderDeliveryResponse {}
167
+
168
+ message GetOrdersByUserRequest {
169
+ string user_id = 1;
170
+ optional int32 limit = 2;
171
+ }
172
+
173
+ message GetOrdersByUserResponse {
174
+ repeated Order orders = 1;
175
+ }
176
+
177
+ service PayOrdersService {
178
+ // Same as public APIs
179
+ rpc GetOrder(GetOrderRequest) returns (GetOrderResponse) {}
180
+
181
+ rpc GetOrders(GetOrdersRequest) returns (GetOrdersResponse) {}
182
+
183
+ rpc CreateOrder(CreateOrderRequest) returns (CreateOrderResponse) {}
184
+
185
+ rpc MigrateOrders(MigrateOrdersRequest) returns (MigrateOrdersResponse) {}
186
+
187
+ // The update will be executed only if the update complies with the state machine
188
+ // To be used for CANCELATION and REFUND
189
+ rpc UpdateOrder(UpdateOrderRequest) returns (UpdateOrderResponse) {}
190
+
191
+ rpc AcknowledgeOrderDelivery(AcknowledgeOrderDeliveryRequest) returns (AcknowledgeOrderDeliveryResponse) {}
192
+
193
+ // should only be used by admin panel
194
+ rpc GetOrdersByUser(GetOrdersByUserRequest) returns (GetOrdersByUserResponse) {}
195
+ }