@devvit/protos 0.11.10 → 0.11.11-next-2025-03-18-8a91fd0df.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 (253) hide show
  1. package/community.d.ts +2 -0
  2. package/community.d.ts.map +1 -1
  3. package/community.js +3 -0
  4. package/meta.min.json +7838 -0
  5. package/package.json +6 -6
  6. package/protos.min.js +2 -0
  7. package/protos.min.js.map +7 -0
  8. package/schema/.snootobuf/deps/buf/validate/expression.proto +92 -0
  9. package/schema/.snootobuf/deps/buf/validate/priv/private.proto +41 -0
  10. package/schema/.snootobuf/deps/buf/validate/validate.proto +4130 -0
  11. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/audit.proto +72 -0
  12. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/auth.proto +49 -0
  13. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/organization.proto +54 -0
  14. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/service.proto +46 -0
  15. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/subscription.proto +72 -0
  16. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/ui.proto +20 -0
  17. package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/user.proto +45 -0
  18. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/admin.proto +54 -0
  19. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/delivery.proto +773 -0
  20. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/filter.proto +66 -0
  21. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/firehose.proto +100 -0
  22. package/schema/.snootobuf/deps/devvit/data/api/v1alpha/intake.proto +19 -0
  23. package/schema/.snootobuf/deps/devvit/events/v1alpha/events.proto +446 -0
  24. package/schema/.snootobuf/deps/devvit/gateway/v1alpha/payments.proto +24 -0
  25. package/schema/.snootobuf/deps/devvit/options/options.proto +98 -0
  26. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/commentv2.proto +29 -0
  27. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/flair.proto +25 -0
  28. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/modaction.proto +53 -0
  29. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/modmail.proto +56 -0
  30. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/postv2.proto +107 -0
  31. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/subredditv2.proto +41 -0
  32. package/schema/.snootobuf/deps/devvit/reddit/v2alpha/userv2.proto +23 -0
  33. package/schema/.snootobuf/deps/devvit/triggers/v1alpha/triggers.proto +162 -0
  34. package/schema/.snootobuf/deps/enum/account_gender_category.proto +14 -0
  35. package/schema/.snootobuf/deps/enum/approval_status.proto +15 -0
  36. package/schema/.snootobuf/deps/enum/automated_reporting_level.proto +12 -0
  37. package/schema/.snootobuf/deps/enum/ban_evasion_threshold.proto +13 -0
  38. package/schema/.snootobuf/deps/enum/ban_info_action.proto +12 -0
  39. package/schema/.snootobuf/deps/enum/block_relation_type.proto +11 -0
  40. package/schema/.snootobuf/deps/enum/comment_sort.proto +18 -0
  41. package/schema/.snootobuf/deps/enum/comment_type.proto +11 -0
  42. package/schema/.snootobuf/deps/enum/crowd_control_level.proto +12 -0
  43. package/schema/.snootobuf/deps/enum/discussion_type.proto +10 -0
  44. package/schema/.snootobuf/deps/enum/distinguish_type.proto +14 -0
  45. package/schema/.snootobuf/deps/enum/flair_position.proto +11 -0
  46. package/schema/.snootobuf/deps/enum/hateful_content_threshold.proto +12 -0
  47. package/schema/.snootobuf/deps/enum/link_content_type.proto +11 -0
  48. package/schema/.snootobuf/deps/enum/link_type.proto +11 -0
  49. package/schema/.snootobuf/deps/enum/link_visibility.proto +11 -0
  50. package/schema/.snootobuf/deps/enum/prediction_leaderboard_entry_type.proto +11 -0
  51. package/schema/.snootobuf/deps/enum/promo_layout.proto +11 -0
  52. package/schema/.snootobuf/deps/enum/removed_by_type.proto +18 -0
  53. package/schema/.snootobuf/deps/enum/spam_level.proto +11 -0
  54. package/schema/.snootobuf/deps/enum/subreddit_type.proto +16 -0
  55. package/schema/.snootobuf/deps/enum/verdict.proto +14 -0
  56. package/schema/.snootobuf/deps/enum/vote.proto +12 -0
  57. package/schema/.snootobuf/deps/enum/whitelist_status.proto +17 -0
  58. package/schema/.snootobuf/deps/enum/wiki_edit_mode.proto +12 -0
  59. package/schema/.snootobuf/deps/evaluator/evaluator.proto +203 -0
  60. package/schema/.snootobuf/deps/google/api/annotations.proto +31 -0
  61. package/schema/.snootobuf/deps/google/api/apikeys/v2/apikeys.proto +288 -0
  62. package/schema/.snootobuf/deps/google/api/apikeys/v2/resources.proto +175 -0
  63. package/schema/.snootobuf/deps/google/api/auth.proto +237 -0
  64. package/schema/.snootobuf/deps/google/api/backend.proto +185 -0
  65. package/schema/.snootobuf/deps/google/api/billing.proto +77 -0
  66. package/schema/.snootobuf/deps/google/api/client.proto +431 -0
  67. package/schema/.snootobuf/deps/google/api/cloudquotas/v1/cloudquotas.proto +322 -0
  68. package/schema/.snootobuf/deps/google/api/cloudquotas/v1/resources.proto +315 -0
  69. package/schema/.snootobuf/deps/google/api/config_change.proto +84 -0
  70. package/schema/.snootobuf/deps/google/api/consumer.proto +82 -0
  71. package/schema/.snootobuf/deps/google/api/context.proto +92 -0
  72. package/schema/.snootobuf/deps/google/api/control.proto +41 -0
  73. package/schema/.snootobuf/deps/google/api/distribution.proto +213 -0
  74. package/schema/.snootobuf/deps/google/api/documentation.proto +168 -0
  75. package/schema/.snootobuf/deps/google/api/endpoint.proto +69 -0
  76. package/schema/.snootobuf/deps/google/api/error_reason.proto +589 -0
  77. package/schema/.snootobuf/deps/google/api/expr/conformance/v1alpha1/conformance_service.proto +183 -0
  78. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/checked.proto +343 -0
  79. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/eval.proto +118 -0
  80. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/explain.proto +53 -0
  81. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/syntax.proto +438 -0
  82. package/schema/.snootobuf/deps/google/api/expr/v1alpha1/value.proto +115 -0
  83. package/schema/.snootobuf/deps/google/api/expr/v1beta1/decl.proto +84 -0
  84. package/schema/.snootobuf/deps/google/api/expr/v1beta1/eval.proto +125 -0
  85. package/schema/.snootobuf/deps/google/api/expr/v1beta1/expr.proto +265 -0
  86. package/schema/.snootobuf/deps/google/api/expr/v1beta1/source.proto +62 -0
  87. package/schema/.snootobuf/deps/google/api/expr/v1beta1/value.proto +114 -0
  88. package/schema/.snootobuf/deps/google/api/field_behavior.proto +104 -0
  89. package/schema/.snootobuf/deps/google/api/field_info.proto +106 -0
  90. package/schema/.snootobuf/deps/google/api/http.proto +371 -0
  91. package/schema/.snootobuf/deps/google/api/httpbody.proto +81 -0
  92. package/schema/.snootobuf/deps/google/api/label.proto +48 -0
  93. package/schema/.snootobuf/deps/google/api/launch_stage.proto +72 -0
  94. package/schema/.snootobuf/deps/google/api/log.proto +54 -0
  95. package/schema/.snootobuf/deps/google/api/logging.proto +81 -0
  96. package/schema/.snootobuf/deps/google/api/metric.proto +268 -0
  97. package/schema/.snootobuf/deps/google/api/monitored_resource.proto +130 -0
  98. package/schema/.snootobuf/deps/google/api/monitoring.proto +107 -0
  99. package/schema/.snootobuf/deps/google/api/policy.proto +85 -0
  100. package/schema/.snootobuf/deps/google/api/quota.proto +184 -0
  101. package/schema/.snootobuf/deps/google/api/resource.proto +243 -0
  102. package/schema/.snootobuf/deps/google/api/routing.proto +461 -0
  103. package/schema/.snootobuf/deps/google/api/service.proto +191 -0
  104. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/check_error.proto +124 -0
  105. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/distribution.proto +166 -0
  106. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/http_request.proto +93 -0
  107. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/log_entry.proto +126 -0
  108. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/metric_value.proto +81 -0
  109. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/operation.proto +123 -0
  110. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/quota_controller.proto +245 -0
  111. package/schema/.snootobuf/deps/google/api/servicecontrol/v1/service_controller.proto +260 -0
  112. package/schema/.snootobuf/deps/google/api/servicecontrol/v2/service_controller.proto +196 -0
  113. package/schema/.snootobuf/deps/google/api/servicemanagement/v1/resources.proto +295 -0
  114. package/schema/.snootobuf/deps/google/api/servicemanagement/v1/servicemanager.proto +508 -0
  115. package/schema/.snootobuf/deps/google/api/serviceusage/v1/resources.proto +130 -0
  116. package/schema/.snootobuf/deps/google/api/serviceusage/v1/serviceusage.proto +305 -0
  117. package/schema/.snootobuf/deps/google/api/serviceusage/v1beta1/resources.proto +458 -0
  118. package/schema/.snootobuf/deps/google/api/serviceusage/v1beta1/serviceusage.proto +793 -0
  119. package/schema/.snootobuf/deps/google/api/source_info.proto +31 -0
  120. package/schema/.snootobuf/deps/google/api/system_parameter.proto +96 -0
  121. package/schema/.snootobuf/deps/google/api/usage.proto +96 -0
  122. package/schema/.snootobuf/deps/google/api/visibility.proto +113 -0
  123. package/schema/.snootobuf/deps/google/cloud/extended_operations.proto +150 -0
  124. package/schema/.snootobuf/deps/google/iam/admin/v1/iam.proto +1087 -0
  125. package/schema/.snootobuf/deps/google/iam/v1/iam_policy.proto +145 -0
  126. package/schema/.snootobuf/deps/google/iam/v1/logging/audit_data.proto +34 -0
  127. package/schema/.snootobuf/deps/google/iam/v1/options.proto +41 -0
  128. package/schema/.snootobuf/deps/google/iam/v1/policy.proto +240 -0
  129. package/schema/.snootobuf/deps/google/logging/type/http_request.proto +92 -0
  130. package/schema/.snootobuf/deps/google/logging/type/log_severity.proto +72 -0
  131. package/schema/.snootobuf/deps/google/longrunning/operations.proto +247 -0
  132. package/schema/.snootobuf/deps/google/protobuf/any.proto +158 -0
  133. package/schema/.snootobuf/deps/google/protobuf/api.proto +208 -0
  134. package/schema/.snootobuf/deps/google/protobuf/compiler/plugin.proto +183 -0
  135. package/schema/.snootobuf/deps/google/protobuf/descriptor.proto +921 -0
  136. package/schema/.snootobuf/deps/google/protobuf/duration.proto +116 -0
  137. package/schema/.snootobuf/deps/google/protobuf/empty.proto +51 -0
  138. package/schema/.snootobuf/deps/google/protobuf/field_mask.proto +245 -0
  139. package/schema/.snootobuf/deps/google/protobuf/source_context.proto +48 -0
  140. package/schema/.snootobuf/deps/google/protobuf/struct.proto +95 -0
  141. package/schema/.snootobuf/deps/google/protobuf/timestamp.proto +147 -0
  142. package/schema/.snootobuf/deps/google/protobuf/type.proto +187 -0
  143. package/schema/.snootobuf/deps/google/protobuf/wrappers.proto +123 -0
  144. package/schema/.snootobuf/deps/google/rpc/code.proto +186 -0
  145. package/schema/.snootobuf/deps/google/rpc/context/attribute_context.proto +287 -0
  146. package/schema/.snootobuf/deps/google/rpc/error_details.proto +246 -0
  147. package/schema/.snootobuf/deps/google/rpc/status.proto +47 -0
  148. package/schema/.snootobuf/deps/google/type/calendar_period.proto +57 -0
  149. package/schema/.snootobuf/deps/google/type/color.proto +170 -0
  150. package/schema/.snootobuf/deps/google/type/date.proto +50 -0
  151. package/schema/.snootobuf/deps/google/type/datetime.proto +97 -0
  152. package/schema/.snootobuf/deps/google/type/dayofweek.proto +51 -0
  153. package/schema/.snootobuf/deps/google/type/expr.proto +51 -0
  154. package/schema/.snootobuf/deps/google/type/fraction.proto +34 -0
  155. package/schema/.snootobuf/deps/google/type/latlng.proto +37 -0
  156. package/schema/.snootobuf/deps/google/type/money.proto +43 -0
  157. package/schema/.snootobuf/deps/google/type/month.proto +66 -0
  158. package/schema/.snootobuf/deps/google/type/postal_address.proto +135 -0
  159. package/schema/.snootobuf/deps/google/type/quaternion.proto +95 -0
  160. package/schema/.snootobuf/deps/google/type/timeofday.proto +44 -0
  161. package/schema/.snootobuf/deps/openapi/helper.proto +20 -0
  162. package/schema/.snootobuf/deps/products-api/protos/reddit/xpaymentsplatform/payproducts/v1/currencies.proto +189 -0
  163. package/schema/.snootobuf/deps/products-api/protos/reddit/xpaymentsplatform/payproducts/v1/payproducts.proto +118 -0
  164. package/schema/.snootobuf/deps/reddit/api/metadata/v1/metadata.proto +55 -0
  165. package/schema/.snootobuf/deps/reddit/coreplatform/account/v1/account.proto +579 -0
  166. package/schema/.snootobuf/deps/reddit/coreplatform/account/v1/account_relations.proto +43 -0
  167. package/schema/.snootobuf/deps/reddit/coreplatform/api/metadata/v1/metadata.proto +82 -0
  168. package/schema/.snootobuf/deps/reddit/coreplatform/blocking/v1/user_blocking_service.proto +221 -0
  169. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree.proto +78 -0
  170. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree_service.proto +189 -0
  171. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree_structure.proto +29 -0
  172. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comments.proto +417 -0
  173. package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comments_service.proto +72 -0
  174. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/auth.proto +25 -0
  175. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/features.proto +52 -0
  176. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/lang.proto +16 -0
  177. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/legal.proto +20 -0
  178. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/media.proto +149 -0
  179. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/moderation.proto +197 -0
  180. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/safety.proto +116 -0
  181. package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/time.proto +25 -0
  182. package/schema/.snootobuf/deps/reddit/coreplatform/domains/v1/domains_metadata_service.proto +101 -0
  183. package/schema/.snootobuf/deps/reddit/coreplatform/grpc_thrift/v1/grpc_thrift_options.proto +34 -0
  184. package/schema/.snootobuf/deps/reddit/coreplatform/links/v1/links.proto +798 -0
  185. package/schema/.snootobuf/deps/reddit/coreplatform/links/v1/links_service.proto +186 -0
  186. package/schema/.snootobuf/deps/reddit/coreplatform/messages/v1/messages.proto +110 -0
  187. package/schema/.snootobuf/deps/reddit/coreplatform/sensitive/v1/wrappers.proto +51 -0
  188. package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit.proto +1202 -0
  189. package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_member_relations.proto +85 -0
  190. package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_moderator_service.proto +363 -0
  191. package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_service.proto +301 -0
  192. package/schema/.snootobuf/deps/reddit/coreplatform/thing/v0/thing.proto +2869 -0
  193. package/schema/.snootobuf/deps/reddit/devvit/custom_post/v1/custom_post.proto +15 -0
  194. package/schema/.snootobuf/deps/reddit/devvit/custom_post/v1/service.proto +11 -0
  195. package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/context_action.proto +48 -0
  196. package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/manifest.proto +70 -0
  197. package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/service.proto +11 -0
  198. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/acknowledge_order_delivery.proto +17 -0
  199. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/checkout.proto +89 -0
  200. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/common.proto +322 -0
  201. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/delete_products.proto +17 -0
  202. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/events.proto +14 -0
  203. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_batch_products.proto +15 -0
  204. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_gold_balances.proto +48 -0
  205. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_order.proto +31 -0
  206. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_orders.proto +26 -0
  207. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_orders_by_user.proto +15 -0
  208. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_payout_info_batch.proto +52 -0
  209. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_products.proto +23 -0
  210. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_user_profiles.proto +28 -0
  211. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/refund_order.proto +17 -0
  212. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/service.proto +49 -0
  213. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/service_data_compliance.proto +20 -0
  214. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/upsert_products.proto +17 -0
  215. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paygatewaypsps/v1/paygatewaypsps.proto +158 -0
  216. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payorders/v1/payments_data_compliance.proto +18 -0
  217. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payorders/v1/payorders.proto +195 -0
  218. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/admin.proto +44 -0
  219. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/ledger.proto +200 -0
  220. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/payments_data_compliance.proto +18 -0
  221. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/paypayments.proto +210 -0
  222. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payproducts/v1/currencies.proto +189 -0
  223. package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payproducts/v1/payproducts.proto +135 -0
  224. package/schema/.snootobuf/deps/snooron_sources/text_classification/text_classification.proto +29 -0
  225. package/schema/.snootobuf/deps/snooron_sources/v2_event/v2_event.proto +3292 -0
  226. package/schema/.snootobuf/deps/validate/validate.proto +862 -0
  227. package/schema/devvit/dev_portal/admin_portal.proto +12 -0
  228. package/schema/devvit/plugin/redditapi/common/common_msg.proto +14 -0
  229. package/schema/devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.proto +7 -0
  230. package/schema/snootobuf.devenv.lock +760 -398
  231. package/schema/snootobuf.lock +760 -398
  232. package/schema/snootobuf.redditapi.lock +760 -398
  233. package/schema/snootobuf.ts.lock +8254 -7731
  234. package/twirp-server.d.ts +1 -0
  235. package/twirp-server.d.ts.map +1 -1
  236. package/twirp-server.js +2 -0
  237. package/types/devvit/dev_portal/admin_portal.d.ts +240 -0
  238. package/types/devvit/dev_portal/admin_portal.d.ts.map +1 -0
  239. package/types/devvit/dev_portal/admin_portal.js +49 -0
  240. package/types/devvit/dev_portal/admin_portal.twirp-client.d.ts +22 -0
  241. package/types/devvit/dev_portal/admin_portal.twirp-client.d.ts.map +1 -0
  242. package/types/devvit/dev_portal/admin_portal.twirp-client.js +35 -0
  243. package/types/devvit/dev_portal/admin_portal.twirp.d.ts +14 -0
  244. package/types/devvit/dev_portal/admin_portal.twirp.d.ts.map +1 -0
  245. package/types/devvit/dev_portal/admin_portal.twirp.js +156 -0
  246. package/types/devvit/plugin/redditapi/common/common_msg.d.ts +24 -0
  247. package/types/devvit/plugin/redditapi/common/common_msg.d.ts.map +1 -1
  248. package/types/devvit/plugin/redditapi/common/common_msg.js +102 -0
  249. package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.d.ts +7 -0
  250. package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.d.ts.map +1 -1
  251. package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.js +50 -1
  252. package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_svc.d.ts +31 -1
  253. package/types/devvit/plugin/redditapi/linksandcomments/linksandcomments_svc.d.ts.map +1 -1
package/twirp-server.d.ts CHANGED
@@ -8,4 +8,5 @@ export * from './types/devvit/dev_portal/waitlist/waitlist.twirp.js';
8
8
  export * from './types/devvit/plugin/logger/logger.twirp.js';
9
9
  export * from './types/devvit/plugin/settings/v1alpha/settings.twirp.js';
10
10
  export * from './types/devvit/remote_logger/remote_logger.twirp.js';
11
+ export * from './types/devvit/dev_portal/admin_portal.twirp.js';
11
12
  //# sourceMappingURL=twirp-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"twirp-server.d.ts","sourceRoot":"","sources":["../src/twirp-server.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,yDAAyD,CAAC;AACxE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iFAAiF,CAAC;AAChG,cAAc,0EAA0E,CAAC;AACzF,cAAc,yDAAyD,CAAC;AACxE,cAAc,sDAAsD,CAAC;AACrE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0DAA0D,CAAC;AACzE,cAAc,qDAAqD,CAAC"}
1
+ {"version":3,"file":"twirp-server.d.ts","sourceRoot":"","sources":["../src/twirp-server.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,yDAAyD,CAAC;AACxE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iFAAiF,CAAC;AAChG,cAAc,0EAA0E,CAAC;AACzF,cAAc,yDAAyD,CAAC;AACxE,cAAc,sDAAsD,CAAC;AACrE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0DAA0D,CAAC;AACzE,cAAc,qDAAqD,CAAC;AAGpE,cAAc,iDAAiD,CAAC"}
package/twirp-server.js CHANGED
@@ -8,3 +8,5 @@ export * from './types/devvit/dev_portal/waitlist/waitlist.twirp.js';
8
8
  export * from './types/devvit/plugin/logger/logger.twirp.js';
9
9
  export * from './types/devvit/plugin/settings/v1alpha/settings.twirp.js';
10
10
  export * from './types/devvit/remote_logger/remote_logger.twirp.js';
11
+ // admin
12
+ export * from './types/devvit/dev_portal/admin_portal.twirp.js';
@@ -0,0 +1,240 @@
1
+ /**
2
+ * #admin_portal.ts
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ import _m0 from "protobufjs/minimal.js";
7
+ import { Metadata } from "../../../lib/Types.js";
8
+ import { FullInstallationInfo, InstallationUpgradeManyRequest, InstallationUpgradeManyResponse, InstallationUpgradeRequest } from "./installation/installation.js";
9
+ export interface AdminInstallation {
10
+ Upgrade(request: InstallationUpgradeRequest, metadata?: Metadata): Promise<FullInstallationInfo>;
11
+ UpgradeMany(request: InstallationUpgradeManyRequest, metadata?: Metadata): Promise<InstallationUpgradeManyResponse>;
12
+ }
13
+ export declare const AdminInstallationServiceName = "devvit.dev_portal.AdminInstallation";
14
+ export declare class AdminInstallationClientImpl implements AdminInstallation {
15
+ private readonly rpc;
16
+ private readonly service;
17
+ constructor(rpc: Rpc, opts?: {
18
+ service?: string;
19
+ });
20
+ Upgrade(request: InstallationUpgradeRequest, metadata?: Metadata): Promise<FullInstallationInfo>;
21
+ UpgradeMany(request: InstallationUpgradeManyRequest, metadata?: Metadata): Promise<InstallationUpgradeManyResponse>;
22
+ }
23
+ export type AdminInstallationDefinition = typeof AdminInstallationDefinition;
24
+ export declare const AdminInstallationDefinition: {
25
+ readonly name: "AdminInstallation";
26
+ readonly fullName: "devvit.dev_portal.AdminInstallation";
27
+ readonly methods: {
28
+ readonly upgrade: {
29
+ readonly name: "Upgrade";
30
+ readonly requestType: {
31
+ $type: "devvit.dev_portal.installation.InstallationUpgradeRequest";
32
+ encode(message: InstallationUpgradeRequest, writer?: _m0.Writer): _m0.Writer;
33
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): InstallationUpgradeRequest;
34
+ fromJSON(object: any): InstallationUpgradeRequest;
35
+ toJSON(message: InstallationUpgradeRequest): unknown;
36
+ create(base?: {
37
+ id?: string;
38
+ appVersionId?: string | undefined;
39
+ } | undefined): InstallationUpgradeRequest;
40
+ fromPartial(object: {
41
+ id?: string;
42
+ appVersionId?: string | undefined;
43
+ }): InstallationUpgradeRequest;
44
+ };
45
+ readonly requestStream: false;
46
+ readonly responseType: {
47
+ $type: "devvit.dev_portal.installation.FullInstallationInfo";
48
+ encode(message: FullInstallationInfo, writer?: _m0.Writer): _m0.Writer;
49
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): FullInstallationInfo;
50
+ fromJSON(object: any): FullInstallationInfo;
51
+ toJSON(message: FullInstallationInfo): unknown;
52
+ create(base?: {
53
+ installation?: {
54
+ id?: string;
55
+ upgradeStrategy?: import("./installation/installation.js").UpgradeStrategy;
56
+ upgradeStrategyConfig?: {
57
+ [x: string]: any;
58
+ } | undefined;
59
+ runAs?: string | undefined;
60
+ type?: import("./app_version/info/app_version_info.js").InstallationType;
61
+ location?: {
62
+ id?: string;
63
+ name?: string;
64
+ type?: import("../reddit/thing_type.js").ThingType;
65
+ icon?: string | undefined;
66
+ isNsfw?: boolean;
67
+ isUnavailable?: boolean;
68
+ } | undefined;
69
+ isEnabled?: boolean;
70
+ } | undefined;
71
+ appVersion?: {
72
+ id?: string;
73
+ visibility?: import("./app_version/info/app_version_info.js").VersionVisibility;
74
+ validInstallTypes?: import("./app_version/info/app_version_info.js").InstallationType[];
75
+ majorVersion?: number;
76
+ minorVersion?: number;
77
+ patchVersion?: number;
78
+ prereleaseVersion?: number | undefined;
79
+ uploadedAt?: Date | undefined;
80
+ buildStatus?: import("./app_version/info/app_version_info.js").BuildStatus;
81
+ builtAt?: Date | undefined;
82
+ about?: string;
83
+ hasCustomSettings?: boolean;
84
+ pool?: import("./app_version/info/app_version_info.js").ComputePool;
85
+ appCapabilities?: import("./nutrition/nutrition.js").NutritionCategory[];
86
+ } | undefined;
87
+ app?: {
88
+ id?: string;
89
+ slug?: string;
90
+ name?: string;
91
+ description?: string;
92
+ appAccount?: {
93
+ id?: string;
94
+ displayName?: string;
95
+ snoovatarIconUrl?: string;
96
+ } | undefined;
97
+ isNsfw?: boolean;
98
+ isDelisted?: boolean;
99
+ isFirstParty?: boolean;
100
+ isArchived?: boolean;
101
+ isWebviewEnabled?: boolean;
102
+ createdAt?: Date | undefined;
103
+ owner?: {
104
+ id?: string;
105
+ displayName?: string;
106
+ snoovatarIconUrl?: string;
107
+ } | undefined;
108
+ categories?: import("./app/categories/categories.js").Categories[];
109
+ stats?: {
110
+ installCount?: number;
111
+ versionsCount?: number;
112
+ } | undefined;
113
+ termsAndConditions?: string;
114
+ privacyPolicy?: string;
115
+ defaultPool?: import("./app_version/info/app_version_info.js").ComputePool;
116
+ isDisabled?: boolean;
117
+ minSubredditSizeRestrictionEnabled?: boolean;
118
+ } | undefined;
119
+ } | undefined): FullInstallationInfo;
120
+ fromPartial(object: {
121
+ installation?: {
122
+ id?: string;
123
+ upgradeStrategy?: import("./installation/installation.js").UpgradeStrategy;
124
+ upgradeStrategyConfig?: {
125
+ [x: string]: any;
126
+ } | undefined;
127
+ runAs?: string | undefined;
128
+ type?: import("./app_version/info/app_version_info.js").InstallationType;
129
+ location?: {
130
+ id?: string;
131
+ name?: string;
132
+ type?: import("../reddit/thing_type.js").ThingType;
133
+ icon?: string | undefined;
134
+ isNsfw?: boolean;
135
+ isUnavailable?: boolean;
136
+ } | undefined;
137
+ isEnabled?: boolean;
138
+ } | undefined;
139
+ appVersion?: {
140
+ id?: string;
141
+ visibility?: import("./app_version/info/app_version_info.js").VersionVisibility;
142
+ validInstallTypes?: import("./app_version/info/app_version_info.js").InstallationType[];
143
+ majorVersion?: number;
144
+ minorVersion?: number;
145
+ patchVersion?: number;
146
+ prereleaseVersion?: number | undefined;
147
+ uploadedAt?: Date | undefined;
148
+ buildStatus?: import("./app_version/info/app_version_info.js").BuildStatus;
149
+ builtAt?: Date | undefined;
150
+ about?: string;
151
+ hasCustomSettings?: boolean;
152
+ pool?: import("./app_version/info/app_version_info.js").ComputePool;
153
+ appCapabilities?: import("./nutrition/nutrition.js").NutritionCategory[];
154
+ } | undefined;
155
+ app?: {
156
+ id?: string;
157
+ slug?: string;
158
+ name?: string;
159
+ description?: string;
160
+ appAccount?: {
161
+ id?: string;
162
+ displayName?: string;
163
+ snoovatarIconUrl?: string;
164
+ } | undefined;
165
+ isNsfw?: boolean;
166
+ isDelisted?: boolean;
167
+ isFirstParty?: boolean;
168
+ isArchived?: boolean;
169
+ isWebviewEnabled?: boolean;
170
+ createdAt?: Date | undefined;
171
+ owner?: {
172
+ id?: string;
173
+ displayName?: string;
174
+ snoovatarIconUrl?: string;
175
+ } | undefined;
176
+ categories?: import("./app/categories/categories.js").Categories[];
177
+ stats?: {
178
+ installCount?: number;
179
+ versionsCount?: number;
180
+ } | undefined;
181
+ termsAndConditions?: string;
182
+ privacyPolicy?: string;
183
+ defaultPool?: import("./app_version/info/app_version_info.js").ComputePool;
184
+ isDisabled?: boolean;
185
+ minSubredditSizeRestrictionEnabled?: boolean;
186
+ } | undefined;
187
+ }): FullInstallationInfo;
188
+ };
189
+ readonly responseStream: false;
190
+ readonly options: {};
191
+ };
192
+ readonly upgradeMany: {
193
+ readonly name: "UpgradeMany";
194
+ readonly requestType: {
195
+ $type: "devvit.dev_portal.installation.InstallationUpgradeManyRequest";
196
+ encode(message: InstallationUpgradeManyRequest, writer?: _m0.Writer): _m0.Writer;
197
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): InstallationUpgradeManyRequest;
198
+ fromJSON(object: any): InstallationUpgradeManyRequest;
199
+ toJSON(message: InstallationUpgradeManyRequest): unknown;
200
+ create(base?: {
201
+ ids?: string[];
202
+ appVersionId?: string;
203
+ } | undefined): InstallationUpgradeManyRequest;
204
+ fromPartial(object: {
205
+ ids?: string[];
206
+ appVersionId?: string;
207
+ }): InstallationUpgradeManyRequest;
208
+ };
209
+ readonly requestStream: false;
210
+ readonly responseType: {
211
+ $type: "devvit.dev_portal.installation.InstallationUpgradeManyResponse";
212
+ encode(message: InstallationUpgradeManyResponse, writer?: _m0.Writer): _m0.Writer;
213
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): InstallationUpgradeManyResponse;
214
+ fromJSON(object: any): InstallationUpgradeManyResponse;
215
+ toJSON(message: InstallationUpgradeManyResponse): unknown;
216
+ create(base?: {
217
+ details?: {
218
+ id?: string;
219
+ success?: boolean;
220
+ error?: string | undefined;
221
+ }[];
222
+ } | undefined): InstallationUpgradeManyResponse;
223
+ fromPartial(object: {
224
+ details?: {
225
+ id?: string;
226
+ success?: boolean;
227
+ error?: string | undefined;
228
+ }[];
229
+ }): InstallationUpgradeManyResponse;
230
+ };
231
+ readonly responseStream: false;
232
+ readonly options: {};
233
+ };
234
+ };
235
+ };
236
+ interface Rpc {
237
+ request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
238
+ }
239
+ export {};
240
+ //# sourceMappingURL=admin_portal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin_portal.d.ts","sourceRoot":"","sources":["../../../../src/types/devvit/dev_portal/admin_portal.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,EAC3B,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,OAAO,EAAE,0BAA0B,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjG,WAAW,CAAC,OAAO,EAAE,8BAA8B,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;CACrH;AAED,eAAO,MAAM,4BAA4B,wCAAwC,CAAC;AAClF,qBAAa,2BAA4B,YAAW,iBAAiB;IACnE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBACrB,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAMjD,OAAO,CAAC,OAAO,EAAE,0BAA0B,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMhG,WAAW,CAAC,OAAO,EAAE,8BAA8B,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,+BAA+B,CAAC;CAKpH;AAED,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAC;AAC7E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAC;AAEX,UAAU,GAAG;IACX,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtG"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * #admin_portal.ts
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ /* eslint-disable */
7
+ import _m0 from "protobufjs/minimal.js";
8
+ import { FullInstallationInfo, InstallationUpgradeManyRequest, InstallationUpgradeManyResponse, InstallationUpgradeRequest, } from "./installation/installation.js";
9
+ export const AdminInstallationServiceName = "devvit.dev_portal.AdminInstallation";
10
+ export class AdminInstallationClientImpl {
11
+ constructor(rpc, opts) {
12
+ this.service = opts?.service || AdminInstallationServiceName;
13
+ this.rpc = rpc;
14
+ this.Upgrade = this.Upgrade.bind(this);
15
+ this.UpgradeMany = this.UpgradeMany.bind(this);
16
+ }
17
+ Upgrade(request, metadata) {
18
+ const data = InstallationUpgradeRequest.encode(request).finish();
19
+ const promise = this.rpc.request(this.service, "Upgrade", data, metadata);
20
+ return promise.then((data) => FullInstallationInfo.decode(_m0.Reader.create(data)));
21
+ }
22
+ UpgradeMany(request, metadata) {
23
+ const data = InstallationUpgradeManyRequest.encode(request).finish();
24
+ const promise = this.rpc.request(this.service, "UpgradeMany", data, metadata);
25
+ return promise.then((data) => InstallationUpgradeManyResponse.decode(_m0.Reader.create(data)));
26
+ }
27
+ }
28
+ export const AdminInstallationDefinition = {
29
+ name: "AdminInstallation",
30
+ fullName: "devvit.dev_portal.AdminInstallation",
31
+ methods: {
32
+ upgrade: {
33
+ name: "Upgrade",
34
+ requestType: InstallationUpgradeRequest,
35
+ requestStream: false,
36
+ responseType: FullInstallationInfo,
37
+ responseStream: false,
38
+ options: {},
39
+ },
40
+ upgradeMany: {
41
+ name: "UpgradeMany",
42
+ requestType: InstallationUpgradeManyRequest,
43
+ requestStream: false,
44
+ responseType: InstallationUpgradeManyResponse,
45
+ responseStream: false,
46
+ options: {},
47
+ },
48
+ },
49
+ };
@@ -0,0 +1,22 @@
1
+ import { InstallationUpgradeRequest, FullInstallationInfo, InstallationUpgradeManyRequest, InstallationUpgradeManyResponse } from './installation/installation.js';
2
+ interface Rpc {
3
+ request(service: string, method: string, contentType: 'application/json' | 'application/protobuf', data: object | Uint8Array): Promise<object | Uint8Array>;
4
+ }
5
+ export interface AdminInstallationClient {
6
+ Upgrade(request: InstallationUpgradeRequest): Promise<FullInstallationInfo>;
7
+ UpgradeMany(request: InstallationUpgradeManyRequest): Promise<InstallationUpgradeManyResponse>;
8
+ }
9
+ export declare class AdminInstallationClientJSON implements AdminInstallationClient {
10
+ private readonly rpc;
11
+ constructor(rpc: Rpc);
12
+ Upgrade(request: InstallationUpgradeRequest): Promise<FullInstallationInfo>;
13
+ UpgradeMany(request: InstallationUpgradeManyRequest): Promise<InstallationUpgradeManyResponse>;
14
+ }
15
+ export declare class AdminInstallationClientProtobuf implements AdminInstallationClient {
16
+ private readonly rpc;
17
+ constructor(rpc: Rpc);
18
+ Upgrade(request: InstallationUpgradeRequest): Promise<FullInstallationInfo>;
19
+ UpgradeMany(request: InstallationUpgradeManyRequest): Promise<InstallationUpgradeManyResponse>;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=admin_portal.twirp-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin_portal.twirp-client.d.ts","sourceRoot":"","sources":["../../../../src/types/devvit/dev_portal/admin_portal.twirp-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,gCAAgC,CAAC;AAMxC,UAAU,GAAG;IACX,OAAO,CACL,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,kBAAkB,GAAG,sBAAsB,EACxD,IAAI,EAAE,MAAM,GAAG,UAAU,GACxB,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC5E,WAAW,CACT,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,CAAC,CAAC;CAC7C;AAED,qBAAa,2BAA4B,YAAW,uBAAuB;IACzE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAKpB,OAAO,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAW3E,WAAW,CACT,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,CAAC;CAY5C;AAED,qBAAa,+BACX,YAAW,uBAAuB;IAElC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAKpB,OAAO,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAa3E,WAAW,CACT,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,CAAC;CAY5C"}
@@ -0,0 +1,35 @@
1
+ import { InstallationUpgradeRequest, FullInstallationInfo, InstallationUpgradeManyRequest, InstallationUpgradeManyResponse, } from './installation/installation.js';
2
+ export class AdminInstallationClientJSON {
3
+ constructor(rpc) {
4
+ this.rpc = rpc;
5
+ this.Upgrade.bind(this);
6
+ this.UpgradeMany.bind(this);
7
+ }
8
+ Upgrade(request) {
9
+ const data = InstallationUpgradeRequest.toJSON(request);
10
+ const promise = this.rpc.request('devvit.dev_portal.AdminInstallation', 'Upgrade', 'application/json', data);
11
+ return promise.then((data) => FullInstallationInfo.fromJSON(data));
12
+ }
13
+ UpgradeMany(request) {
14
+ const data = InstallationUpgradeManyRequest.toJSON(request);
15
+ const promise = this.rpc.request('devvit.dev_portal.AdminInstallation', 'UpgradeMany', 'application/json', data);
16
+ return promise.then((data) => InstallationUpgradeManyResponse.fromJSON(data));
17
+ }
18
+ }
19
+ export class AdminInstallationClientProtobuf {
20
+ constructor(rpc) {
21
+ this.rpc = rpc;
22
+ this.Upgrade.bind(this);
23
+ this.UpgradeMany.bind(this);
24
+ }
25
+ Upgrade(request) {
26
+ const data = InstallationUpgradeRequest.encode(request).finish();
27
+ const promise = this.rpc.request('devvit.dev_portal.AdminInstallation', 'Upgrade', 'application/protobuf', data);
28
+ return promise.then((data) => FullInstallationInfo.decode(data));
29
+ }
30
+ UpgradeMany(request) {
31
+ const data = InstallationUpgradeManyRequest.encode(request).finish();
32
+ const promise = this.rpc.request('devvit.dev_portal.AdminInstallation', 'UpgradeMany', 'application/protobuf', data);
33
+ return promise.then((data) => InstallationUpgradeManyResponse.decode(data));
34
+ }
35
+ }
@@ -0,0 +1,14 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import { TwirpContext, TwirpServer } from 'twirp-ts';
3
+ import { InstallationUpgradeRequest, FullInstallationInfo, InstallationUpgradeManyRequest, InstallationUpgradeManyResponse } from './installation/installation.js';
4
+ export interface AdminInstallationTwirp<T extends TwirpContext = TwirpContext> {
5
+ Upgrade(ctx: T, request: InstallationUpgradeRequest): Promise<FullInstallationInfo>;
6
+ UpgradeMany(ctx: T, request: InstallationUpgradeManyRequest): Promise<InstallationUpgradeManyResponse>;
7
+ }
8
+ export declare enum AdminInstallationMethod {
9
+ Upgrade = "Upgrade",
10
+ UpgradeMany = "UpgradeMany"
11
+ }
12
+ export declare const AdminInstallationMethodList: AdminInstallationMethod[];
13
+ export declare function createAdminInstallationServer<T extends TwirpContext = TwirpContext>(service: AdminInstallationTwirp<T>): TwirpServer<AdminInstallationTwirp<TwirpContext<import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>>>, T>;
14
+ //# sourceMappingURL=admin_portal.twirp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin_portal.twirp.d.ts","sourceRoot":"","sources":["../../../../src/types/devvit/dev_portal/admin_portal.twirp.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EAOZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,gCAAgC,CAAC;AAMxC,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IAC3E,OAAO,CACL,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjC,WAAW,CACT,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,CAAC,CAAC;CAC7C;AAED,oBAAY,uBAAuB;IACjC,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC5B;AAED,eAAO,MAAM,2BAA2B,2BAGvC,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,CAAC,SAAS,YAAY,GAAG,YAAY,EACrC,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,uJAQnC"}
@@ -0,0 +1,156 @@
1
+ import { TwirpServer, TwirpError, TwirpErrorCode, TwirpContentType, chainInterceptors, } from 'twirp-ts';
2
+ import { InstallationUpgradeRequest, FullInstallationInfo, InstallationUpgradeManyRequest, InstallationUpgradeManyResponse, } from './installation/installation.js';
3
+ export var AdminInstallationMethod;
4
+ (function (AdminInstallationMethod) {
5
+ AdminInstallationMethod["Upgrade"] = "Upgrade";
6
+ AdminInstallationMethod["UpgradeMany"] = "UpgradeMany";
7
+ })(AdminInstallationMethod || (AdminInstallationMethod = {}));
8
+ export const AdminInstallationMethodList = [
9
+ AdminInstallationMethod.Upgrade,
10
+ AdminInstallationMethod.UpgradeMany,
11
+ ];
12
+ export function createAdminInstallationServer(service) {
13
+ return new TwirpServer({
14
+ service,
15
+ packageName: 'devvit.dev_portal',
16
+ serviceName: 'AdminInstallation',
17
+ methodList: AdminInstallationMethodList,
18
+ matchRoute: matchAdminInstallationRoute,
19
+ });
20
+ }
21
+ function matchAdminInstallationRoute(method, events) {
22
+ switch (method) {
23
+ case 'Upgrade':
24
+ return async (ctx, service, data, interceptors) => {
25
+ ctx = { ...ctx, methodName: 'Upgrade' };
26
+ await events.onMatch(ctx);
27
+ return handleAdminInstallationUpgradeRequest(ctx, service, data, interceptors);
28
+ };
29
+ case 'UpgradeMany':
30
+ return async (ctx, service, data, interceptors) => {
31
+ ctx = { ...ctx, methodName: 'UpgradeMany' };
32
+ await events.onMatch(ctx);
33
+ return handleAdminInstallationUpgradeManyRequest(ctx, service, data, interceptors);
34
+ };
35
+ default:
36
+ events.onNotFound();
37
+ const msg = `no handler found`;
38
+ throw new TwirpError(TwirpErrorCode.BadRoute, msg);
39
+ }
40
+ }
41
+ function handleAdminInstallationUpgradeRequest(ctx, service, data, interceptors) {
42
+ switch (ctx.contentType) {
43
+ case TwirpContentType.JSON:
44
+ return handleAdminInstallationUpgradeJSON(ctx, service, data, interceptors);
45
+ case TwirpContentType.Protobuf:
46
+ return handleAdminInstallationUpgradeProtobuf(ctx, service, data, interceptors);
47
+ default:
48
+ const msg = 'unexpected Content-Type';
49
+ throw new TwirpError(TwirpErrorCode.BadRoute, msg);
50
+ }
51
+ }
52
+ function handleAdminInstallationUpgradeManyRequest(ctx, service, data, interceptors) {
53
+ switch (ctx.contentType) {
54
+ case TwirpContentType.JSON:
55
+ return handleAdminInstallationUpgradeManyJSON(ctx, service, data, interceptors);
56
+ case TwirpContentType.Protobuf:
57
+ return handleAdminInstallationUpgradeManyProtobuf(ctx, service, data, interceptors);
58
+ default:
59
+ const msg = 'unexpected Content-Type';
60
+ throw new TwirpError(TwirpErrorCode.BadRoute, msg);
61
+ }
62
+ }
63
+ async function handleAdminInstallationUpgradeJSON(ctx, service, data, interceptors) {
64
+ let request;
65
+ let response;
66
+ try {
67
+ const body = JSON.parse(data.toString() || '{}');
68
+ request = InstallationUpgradeRequest.fromJSON(body);
69
+ }
70
+ catch (e) {
71
+ if (e instanceof Error) {
72
+ const msg = 'the json request could not be decoded';
73
+ throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
74
+ }
75
+ }
76
+ if (interceptors && interceptors.length > 0) {
77
+ const interceptor = chainInterceptors(...interceptors);
78
+ response = await interceptor(ctx, request, (ctx, inputReq) => {
79
+ return service.Upgrade(ctx, inputReq);
80
+ });
81
+ }
82
+ else {
83
+ response = await service.Upgrade(ctx, request);
84
+ }
85
+ return JSON.stringify(FullInstallationInfo.toJSON(response));
86
+ }
87
+ async function handleAdminInstallationUpgradeManyJSON(ctx, service, data, interceptors) {
88
+ let request;
89
+ let response;
90
+ try {
91
+ const body = JSON.parse(data.toString() || '{}');
92
+ request = InstallationUpgradeManyRequest.fromJSON(body);
93
+ }
94
+ catch (e) {
95
+ if (e instanceof Error) {
96
+ const msg = 'the json request could not be decoded';
97
+ throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
98
+ }
99
+ }
100
+ if (interceptors && interceptors.length > 0) {
101
+ const interceptor = chainInterceptors(...interceptors);
102
+ response = await interceptor(ctx, request, (ctx, inputReq) => {
103
+ return service.UpgradeMany(ctx, inputReq);
104
+ });
105
+ }
106
+ else {
107
+ response = await service.UpgradeMany(ctx, request);
108
+ }
109
+ return JSON.stringify(InstallationUpgradeManyResponse.toJSON(response));
110
+ }
111
+ async function handleAdminInstallationUpgradeProtobuf(ctx, service, data, interceptors) {
112
+ let request;
113
+ let response;
114
+ try {
115
+ request = InstallationUpgradeRequest.decode(data);
116
+ }
117
+ catch (e) {
118
+ if (e instanceof Error) {
119
+ const msg = 'the protobuf request could not be decoded';
120
+ throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
121
+ }
122
+ }
123
+ if (interceptors && interceptors.length > 0) {
124
+ const interceptor = chainInterceptors(...interceptors);
125
+ response = await interceptor(ctx, request, (ctx, inputReq) => {
126
+ return service.Upgrade(ctx, inputReq);
127
+ });
128
+ }
129
+ else {
130
+ response = await service.Upgrade(ctx, request);
131
+ }
132
+ return Buffer.from(FullInstallationInfo.encode(response).finish());
133
+ }
134
+ async function handleAdminInstallationUpgradeManyProtobuf(ctx, service, data, interceptors) {
135
+ let request;
136
+ let response;
137
+ try {
138
+ request = InstallationUpgradeManyRequest.decode(data);
139
+ }
140
+ catch (e) {
141
+ if (e instanceof Error) {
142
+ const msg = 'the protobuf request could not be decoded';
143
+ throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
144
+ }
145
+ }
146
+ if (interceptors && interceptors.length > 0) {
147
+ const interceptor = chainInterceptors(...interceptors);
148
+ response = await interceptor(ctx, request, (ctx, inputReq) => {
149
+ return service.UpgradeMany(ctx, inputReq);
150
+ });
151
+ }
152
+ else {
153
+ response = await service.UpgradeMany(ctx, request);
154
+ }
155
+ return Buffer.from(InstallationUpgradeManyResponse.encode(response).finish());
156
+ }
@@ -6,6 +6,14 @@
6
6
  import _m0 from "protobufjs/minimal.js";
7
7
  import { Any } from "../../../../google/protobuf/any.js";
8
8
  import { User } from "../../../reddit/user.js";
9
+ /** Indicates who the request should be made on behalf of. Currently, only 'APP' or 'USER' types are supported. */
10
+ export declare enum RunAs {
11
+ APP = 0,
12
+ USER = 1,
13
+ UNRECOGNIZED = -1
14
+ }
15
+ export declare function runAsFromJSON(object: any): RunAs;
16
+ export declare function runAsToJSON(object: RunAs): number;
9
17
  /** A Listing is a paginated list of Things such as Subreddits, Posts, or Comments */
10
18
  export interface Listing {
11
19
  /** String value: "Listing" */
@@ -758,6 +766,13 @@ export declare enum ApiClientConfig_BodyType {
758
766
  }
759
767
  export declare function apiClientConfig_BodyTypeFromJSON(object: any): ApiClientConfig_BodyType;
760
768
  export declare function apiClientConfig_BodyTypeToJSON(object: ApiClientConfig_BodyType): number;
769
+ /** Represents data on the user's content submission */
770
+ export interface UserGeneratedContent {
771
+ /** The text body of the content */
772
+ text: string;
773
+ /** The imageUrls attached to the content, if any */
774
+ imageUrls: string[];
775
+ }
761
776
  export declare const Listing: {
762
777
  $type: "devvit.plugin.redditapi.common.Listing";
763
778
  encode(message: Listing, writer?: _m0.Writer): _m0.Writer;
@@ -911,6 +926,15 @@ export declare const ApiClientConfig: {
911
926
  create(base?: DeepPartial<ApiClientConfig>): ApiClientConfig;
912
927
  fromPartial(object: DeepPartial<ApiClientConfig>): ApiClientConfig;
913
928
  };
929
+ export declare const UserGeneratedContent: {
930
+ $type: "devvit.plugin.redditapi.common.UserGeneratedContent";
931
+ encode(message: UserGeneratedContent, writer?: _m0.Writer): _m0.Writer;
932
+ decode(input: _m0.Reader | Uint8Array, length?: number): UserGeneratedContent;
933
+ fromJSON(object: any): UserGeneratedContent;
934
+ toJSON(message: UserGeneratedContent): unknown;
935
+ create(base?: DeepPartial<UserGeneratedContent>): UserGeneratedContent;
936
+ fromPartial(object: DeepPartial<UserGeneratedContent>): UserGeneratedContent;
937
+ };
914
938
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
915
939
  type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
916
940
  [K in keyof T]?: DeepPartial<T[K]>;