@abyss-project/reflex 6.4.0 → 6.5.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 (232) hide show
  1. package/dist/api/code-environment.api.d.ts +2 -0
  2. package/dist/api/code-environment.api.js +7 -0
  3. package/dist/api/code-environment.api.js.map +1 -0
  4. package/dist/api/index.d.ts +2 -0
  5. package/dist/api/index.js +2 -0
  6. package/dist/api/index.js.map +1 -1
  7. package/dist/api/service-template.api.d.ts +2 -0
  8. package/dist/api/service-template.api.js +7 -0
  9. package/dist/api/service-template.api.js.map +1 -0
  10. package/dist/code/index.d.ts +1 -0
  11. package/dist/code/index.js +18 -0
  12. package/dist/code/index.js.map +1 -0
  13. package/dist/code/reflex-code-declarations.d.ts +1 -0
  14. package/dist/code/reflex-code-declarations.js +644 -0
  15. package/dist/code/reflex-code-declarations.js.map +1 -0
  16. package/dist/index.d.ts +9 -0
  17. package/dist/index.js +9 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/types/enum/index.d.ts +4 -0
  20. package/dist/types/enum/index.js +4 -0
  21. package/dist/types/enum/index.js.map +1 -1
  22. package/dist/types/enum/reflex-code-diagnostic-category.enum.d.ts +6 -0
  23. package/dist/types/enum/reflex-code-diagnostic-category.enum.js +11 -0
  24. package/dist/types/enum/reflex-code-diagnostic-category.enum.js.map +1 -0
  25. package/dist/types/enum/reflex-error-code.enum.d.ts +1 -0
  26. package/dist/types/enum/reflex-error-code.enum.js +1 -0
  27. package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
  28. package/dist/types/enum/service-template-follow-up-kind.enum.d.ts +10 -0
  29. package/dist/types/enum/service-template-follow-up-kind.enum.js +15 -0
  30. package/dist/types/enum/service-template-follow-up-kind.enum.js.map +1 -0
  31. package/dist/types/enum/service-template-id.enum.d.ts +10 -0
  32. package/dist/types/enum/service-template-id.enum.js +15 -0
  33. package/dist/types/enum/service-template-id.enum.js.map +1 -0
  34. package/dist/types/enum/service-template-parameter-kind.enum.d.ts +4 -0
  35. package/dist/types/enum/service-template-parameter-kind.enum.js +9 -0
  36. package/dist/types/enum/service-template-parameter-kind.enum.js.map +1 -0
  37. package/dist/types/enum/trigger-access-mode.enum.d.ts +2 -1
  38. package/dist/types/enum/trigger-access-mode.enum.js +1 -0
  39. package/dist/types/enum/trigger-access-mode.enum.js.map +1 -1
  40. package/dist/types/interface/api/requests/code-environment.request.d.ts +3 -0
  41. package/dist/types/interface/api/requests/code-environment.request.js +3 -0
  42. package/dist/types/interface/api/requests/code-environment.request.js.map +1 -0
  43. package/dist/types/interface/api/requests/index.d.ts +2 -0
  44. package/dist/types/interface/api/requests/index.js +2 -0
  45. package/dist/types/interface/api/requests/index.js.map +1 -1
  46. package/dist/types/interface/api/requests/service-template.request.d.ts +3 -0
  47. package/dist/types/interface/api/requests/service-template.request.js +3 -0
  48. package/dist/types/interface/api/requests/service-template.request.js.map +1 -0
  49. package/dist/types/interface/api/requests/service.request.d.ts +2 -1
  50. package/dist/types/interface/api/responses/code-environment.response.d.ts +6 -0
  51. package/dist/types/interface/api/responses/code-environment.response.js +3 -0
  52. package/dist/types/interface/api/responses/code-environment.response.js.map +1 -0
  53. package/dist/types/interface/api/responses/index.d.ts +2 -0
  54. package/dist/types/interface/api/responses/index.js +2 -0
  55. package/dist/types/interface/api/responses/index.js.map +1 -1
  56. package/dist/types/interface/api/responses/service-template.response.d.ts +6 -0
  57. package/dist/types/interface/api/responses/service-template.response.js +3 -0
  58. package/dist/types/interface/api/responses/service-template.response.js.map +1 -0
  59. package/dist/types/interface/models/index.d.ts +3 -0
  60. package/dist/types/interface/models/index.js +3 -0
  61. package/dist/types/interface/models/index.js.map +1 -1
  62. package/dist/types/interface/models/reflex-code-diagnostic.model.d.ts +10 -0
  63. package/dist/types/interface/models/reflex-code-diagnostic.model.js +5 -0
  64. package/dist/types/interface/models/reflex-code-diagnostic.model.js.map +1 -0
  65. package/dist/types/interface/models/reflex-code-environment.model.d.ts +9 -0
  66. package/dist/types/interface/models/reflex-code-environment.model.js +3 -0
  67. package/dist/types/interface/models/reflex-code-environment.model.js.map +1 -0
  68. package/dist/types/interface/models/reflex-service-template.model.d.ts +33 -0
  69. package/dist/types/interface/models/reflex-service-template.model.js +3 -0
  70. package/dist/types/interface/models/reflex-service-template.model.js.map +1 -0
  71. package/package.json +1 -1
  72. package/src/api/application-run-settings.api.test.ts +62 -62
  73. package/src/api/code-environment.api.ts +15 -0
  74. package/src/api/function-run.api.ts +53 -53
  75. package/src/api/function-settings.api.ts +96 -96
  76. package/src/api/function.api.test.ts +346 -346
  77. package/src/api/index.ts +2 -0
  78. package/src/api/service-route.api.ts +74 -74
  79. package/src/api/service-template.api.test.ts +41 -0
  80. package/src/api/service-template.api.ts +12 -0
  81. package/src/api/service.api.test.ts +220 -220
  82. package/src/api/storage-surplus.admin.api.test.ts +66 -66
  83. package/src/api/storage-surplus.admin.api.ts +45 -45
  84. package/src/code/index.ts +1 -0
  85. package/src/code/reflex-code-declarations.ts +646 -0
  86. package/src/index.ts +497 -480
  87. package/src/types/enum/access-grant-status.enum.ts +12 -12
  88. package/src/types/enum/access-kind.enum.ts +7 -7
  89. package/src/types/enum/access-request-status.enum.ts +11 -11
  90. package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
  91. package/src/types/enum/completion-delivery-status.enum.ts +9 -9
  92. package/src/types/enum/configuration-read-as.enum.ts +5 -5
  93. package/src/types/enum/discord-activity-type.enum.ts +9 -9
  94. package/src/types/enum/discord-channel-type.enum.ts +11 -11
  95. package/src/types/enum/discord-component-kind.enum.ts +7 -7
  96. package/src/types/enum/discord-event-drop-reason.enum.ts +13 -13
  97. package/src/types/enum/discord-event-filter-name.enum.ts +11 -11
  98. package/src/types/enum/discord-event-status.enum.ts +13 -13
  99. package/src/types/enum/discord-event-type.enum.ts +7 -7
  100. package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -11
  101. package/src/types/enum/discord-gateway-state.enum.ts +11 -11
  102. package/src/types/enum/discord-locale.enum.ts +35 -35
  103. package/src/types/enum/discord-option-type.enum.ts +12 -12
  104. package/src/types/enum/discord-presence-status.enum.ts +8 -8
  105. package/src/types/enum/discord-sync-status.enum.ts +6 -6
  106. package/src/types/enum/discord-token-state.enum.ts +11 -11
  107. package/src/types/enum/execution-mode.enum.ts +9 -9
  108. package/src/types/enum/execution-profile.enum.ts +20 -20
  109. package/src/types/enum/execution-settings-source.enum.ts +9 -9
  110. package/src/types/enum/health-status.enum.ts +4 -4
  111. package/src/types/enum/index.ts +55 -51
  112. package/src/types/enum/insights-period.enum.ts +8 -8
  113. package/src/types/enum/log-cap-mode.enum.ts +6 -6
  114. package/src/types/enum/log-drop-cause.enum.ts +8 -8
  115. package/src/types/enum/reflex-alert-metric.enum.ts +5 -5
  116. package/src/types/enum/reflex-alert-notification-state.enum.ts +6 -6
  117. package/src/types/enum/reflex-alert-scope.enum.ts +6 -6
  118. package/src/types/enum/reflex-code-diagnostic-category.enum.ts +11 -0
  119. package/src/types/enum/reflex-error-code.enum.ts +93 -88
  120. package/src/types/enum/route-method.enum.ts +9 -9
  121. package/src/types/enum/run-log-level.enum.ts +6 -6
  122. package/src/types/enum/run-mode.enum.ts +11 -11
  123. package/src/types/enum/run-status.enum.ts +16 -16
  124. package/src/types/enum/run-step-status.enum.ts +7 -7
  125. package/src/types/enum/schedule-sync-status.enum.ts +6 -6
  126. package/src/types/enum/scheduled-run-failure-code.enum.ts +14 -14
  127. package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
  128. package/src/types/enum/scheduled-run-status.enum.ts +17 -17
  129. package/src/types/enum/service-block-reason.enum.ts +13 -13
  130. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  131. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  132. package/src/types/enum/service-template-follow-up-kind.enum.ts +19 -0
  133. package/src/types/enum/service-template-id.enum.ts +19 -0
  134. package/src/types/enum/service-template-parameter-kind.enum.ts +7 -0
  135. package/src/types/enum/service-type.enum.ts +9 -9
  136. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  137. package/src/types/enum/trace-effect-type.enum.ts +12 -12
  138. package/src/types/enum/trigger-access-mode.enum.ts +4 -0
  139. package/src/types/enum/trigger-kind.enum.ts +8 -8
  140. package/src/types/enum/vault-value-source.enum.ts +12 -12
  141. package/src/types/enum/vault-visibility.enum.ts +5 -5
  142. package/src/types/index.ts +2 -2
  143. package/src/types/interface/api/index.ts +3 -3
  144. package/src/types/interface/api/requests/alert-rule.request.ts +53 -53
  145. package/src/types/interface/api/requests/application-insights.request.ts +18 -18
  146. package/src/types/interface/api/requests/application-run-settings.request.ts +13 -13
  147. package/src/types/interface/api/requests/code-environment.request.ts +3 -0
  148. package/src/types/interface/api/requests/function-access.request.ts +51 -51
  149. package/src/types/interface/api/requests/function-run.request.ts +42 -42
  150. package/src/types/interface/api/requests/function-settings.request.ts +50 -50
  151. package/src/types/interface/api/requests/function-template.request.ts +29 -29
  152. package/src/types/interface/api/requests/function-test.request.ts +44 -44
  153. package/src/types/interface/api/requests/function-version.request.ts +38 -38
  154. package/src/types/interface/api/requests/function.request.ts +36 -36
  155. package/src/types/interface/api/requests/index.ts +27 -25
  156. package/src/types/interface/api/requests/route-stats.request.ts +22 -22
  157. package/src/types/interface/api/requests/service-completion-webhook.request.ts +11 -11
  158. package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
  159. package/src/types/interface/api/requests/service-consumer.request.ts +51 -51
  160. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  161. package/src/types/interface/api/requests/service-discord-event.request.ts +68 -68
  162. package/src/types/interface/api/requests/service-insights.request.ts +31 -31
  163. package/src/types/interface/api/requests/service-limits.request.ts +28 -28
  164. package/src/types/interface/api/requests/service-openapi.request.ts +10 -10
  165. package/src/types/interface/api/requests/service-route.request.ts +52 -52
  166. package/src/types/interface/api/requests/service-task.request.ts +80 -80
  167. package/src/types/interface/api/requests/service-template.request.ts +3 -0
  168. package/src/types/interface/api/requests/service-version.request.ts +24 -24
  169. package/src/types/interface/api/requests/service.request.ts +54 -48
  170. package/src/types/interface/api/requests/storage-surplus.admin.request.ts +12 -12
  171. package/src/types/interface/api/response.ts +4 -4
  172. package/src/types/interface/api/responses/alert-rule.response.ts +24 -24
  173. package/src/types/interface/api/responses/application-insights.response.ts +11 -11
  174. package/src/types/interface/api/responses/application-run-settings.response.ts +8 -8
  175. package/src/types/interface/api/responses/code-environment.response.ts +7 -0
  176. package/src/types/interface/api/responses/function-access.response.ts +45 -45
  177. package/src/types/interface/api/responses/function-run.response.ts +23 -23
  178. package/src/types/interface/api/responses/function-settings.response.ts +57 -57
  179. package/src/types/interface/api/responses/function-template.response.ts +21 -21
  180. package/src/types/interface/api/responses/function-test.response.ts +19 -19
  181. package/src/types/interface/api/responses/function-version.response.ts +42 -42
  182. package/src/types/interface/api/responses/function.response.ts +25 -25
  183. package/src/types/interface/api/responses/index.ts +27 -25
  184. package/src/types/interface/api/responses/route-stats.response.ts +15 -15
  185. package/src/types/interface/api/responses/service-completion-webhook.response.ts +13 -13
  186. package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
  187. package/src/types/interface/api/responses/service-consumer.response.ts +33 -33
  188. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  189. package/src/types/interface/api/responses/service-discord-event.response.ts +24 -24
  190. package/src/types/interface/api/responses/service-discord.response.ts +110 -110
  191. package/src/types/interface/api/responses/service-insights.response.ts +11 -11
  192. package/src/types/interface/api/responses/service-limits.response.ts +13 -13
  193. package/src/types/interface/api/responses/service-openapi.response.ts +7 -7
  194. package/src/types/interface/api/responses/service-route.response.ts +2 -2
  195. package/src/types/interface/api/responses/service-task.response.ts +57 -57
  196. package/src/types/interface/api/responses/service-template.response.ts +8 -0
  197. package/src/types/interface/api/responses/service-version.response.ts +112 -112
  198. package/src/types/interface/api/responses/service.response.ts +31 -31
  199. package/src/types/interface/api/responses/storage-surplus.admin.response.ts +10 -10
  200. package/src/types/interface/health.response.ts +7 -7
  201. package/src/types/interface/index.ts +3 -3
  202. package/src/types/interface/models/index.ts +32 -29
  203. package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
  204. package/src/types/interface/models/reflex-access-request.model.ts +15 -15
  205. package/src/types/interface/models/reflex-alert-rule.model.ts +56 -56
  206. package/src/types/interface/models/reflex-bot-limits.model.ts +53 -53
  207. package/src/types/interface/models/reflex-code-diagnostic.model.ts +15 -0
  208. package/src/types/interface/models/reflex-code-environment.model.ts +17 -0
  209. package/src/types/interface/models/reflex-completion-webhook.model.ts +111 -111
  210. package/src/types/interface/models/reflex-consumer.model.ts +50 -50
  211. package/src/types/interface/models/reflex-definition.model.ts +31 -31
  212. package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -58
  213. package/src/types/interface/models/reflex-discord-event.model.ts +79 -79
  214. package/src/types/interface/models/reflex-execution-settings.model.ts +57 -57
  215. package/src/types/interface/models/reflex-function-template.model.ts +18 -18
  216. package/src/types/interface/models/reflex-function-version.model.ts +19 -19
  217. package/src/types/interface/models/reflex-function.model.ts +30 -30
  218. package/src/types/interface/models/reflex-insights.model.ts +215 -215
  219. package/src/types/interface/models/reflex-route-contract.model.ts +46 -46
  220. package/src/types/interface/models/reflex-route.model.ts +23 -23
  221. package/src/types/interface/models/reflex-run-retention.model.ts +24 -24
  222. package/src/types/interface/models/reflex-run-settings.model.ts +39 -39
  223. package/src/types/interface/models/reflex-run.model.ts +309 -309
  224. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
  225. package/src/types/interface/models/reflex-service-deployment.model.ts +48 -48
  226. package/src/types/interface/models/reflex-service-limits.model.ts +92 -92
  227. package/src/types/interface/models/reflex-service-template.model.ts +55 -0
  228. package/src/types/interface/models/reflex-service-version.model.ts +64 -64
  229. package/src/types/interface/models/reflex-service.model.ts +47 -47
  230. package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
  231. package/src/types/interface/models/reflex-storage-surplus.model.ts +23 -23
  232. package/src/types/interface/models/reflex-task.model.ts +97 -97
@@ -1,12 +1,12 @@
1
- /**
2
- * State of an access granted to a function.
3
- * - ACTIVE: the grantor still holds the right the access needs.
4
- * - SUSPENDED: a publication found the grantor without that right. Publishing is refused
5
- * (`GRANT_SUSPENDED`) until the access is revoked and granted again; what is already promoted keeps running.
6
- * - REVOKED: withdrawn on purpose; the row stays as the journal.
7
- */
8
- export enum AccessGrantStatus {
9
- ACTIVE = 'ACTIVE',
10
- SUSPENDED = 'SUSPENDED',
11
- REVOKED = 'REVOKED',
12
- }
1
+ /**
2
+ * State of an access granted to a function.
3
+ * - ACTIVE: the grantor still holds the right the access needs.
4
+ * - SUSPENDED: a publication found the grantor without that right. Publishing is refused
5
+ * (`GRANT_SUSPENDED`) until the access is revoked and granted again; what is already promoted keeps running.
6
+ * - REVOKED: withdrawn on purpose; the row stays as the journal.
7
+ */
8
+ export enum AccessGrantStatus {
9
+ ACTIVE = 'ACTIVE',
10
+ SUSPENDED = 'SUSPENDED',
11
+ REVOKED = 'REVOKED',
12
+ }
@@ -1,7 +1,7 @@
1
- /** The kinds of access a definition declares and a member grants (the format of @abyss-project/runtime). */
2
- export enum ReflexAccessKind {
3
- /** Outbound HTTP to a list of host names (exact, or `*.domain` for any sub-domain). */
4
- HTTP = 'HTTP',
5
- /** One action of the host catalog (`store.get`, `store.set`, `store.increment`, `secret.get`, `http.respond`). */
6
- HOST_ACTION = 'HOST_ACTION',
7
- }
1
+ /** The kinds of access a definition declares and a member grants (the format of @abyss-project/runtime). */
2
+ export enum ReflexAccessKind {
3
+ /** Outbound HTTP to a list of host names (exact, or `*.domain` for any sub-domain). */
4
+ HTTP = 'HTTP',
5
+ /** One action of the host catalog (`store.get`, `store.set`, `store.increment`, `secret.get`, `http.respond`). */
6
+ HOST_ACTION = 'HOST_ACTION',
7
+ }
@@ -1,11 +1,11 @@
1
- /**
2
- * State of a request to grant an access a function declares.
3
- * - PENDING: waiting for a member who holds the right the access needs.
4
- * - GRANTED: the access was granted (by the request or by another gesture).
5
- * - DISMISSED: set aside by a member with the right, or because the draft no longer declares the access.
6
- */
7
- export enum AccessRequestStatus {
8
- PENDING = 'PENDING',
9
- GRANTED = 'GRANTED',
10
- DISMISSED = 'DISMISSED',
11
- }
1
+ /**
2
+ * State of a request to grant an access a function declares.
3
+ * - PENDING: waiting for a member who holds the right the access needs.
4
+ * - GRANTED: the access was granted (by the request or by another gesture).
5
+ * - DISMISSED: set aside by a member with the right, or because the draft no longer declares the access.
6
+ */
7
+ export enum AccessRequestStatus {
8
+ PENDING = 'PENDING',
9
+ GRANTED = 'GRANTED',
10
+ DISMISSED = 'DISMISSED',
11
+ }
@@ -1,7 +1,7 @@
1
- /** Why the events of a bot are rejected at the Gateway. */
2
- export enum BotEventBlockReason {
3
- /** The monthly spend cap of the bot is reached. */
4
- MONTHLY_CAP = 'MONTHLY_CAP',
5
- /** The credits of the organization are spent and the bot has no overage. */
6
- CREDITS_EXHAUSTED = 'CREDITS_EXHAUSTED',
7
- }
1
+ /** Why the events of a bot are rejected at the Gateway. */
2
+ export enum BotEventBlockReason {
3
+ /** The monthly spend cap of the bot is reached. */
4
+ MONTHLY_CAP = 'MONTHLY_CAP',
5
+ /** The credits of the organization are spent and the bot has no overage. */
6
+ CREDITS_EXHAUSTED = 'CREDITS_EXHAUSTED',
7
+ }
@@ -1,9 +1,9 @@
1
- /** Where the completion webhook of an async execution stands. */
2
- export enum CompletionDeliveryStatus {
3
- /** Not sent yet, or waiting for its next attempt. */
4
- PENDING = 'PENDING',
5
- /** The receiver answered 2xx. */
6
- DELIVERED = 'DELIVERED',
7
- /** Given up: every attempt failed, or the receiver answered a status that is not retried. */
8
- FAILED = 'FAILED',
9
- }
1
+ /** Where the completion webhook of an async execution stands. */
2
+ export enum CompletionDeliveryStatus {
3
+ /** Not sent yet, or waiting for its next attempt. */
4
+ PENDING = 'PENDING',
5
+ /** The receiver answered 2xx. */
6
+ DELIVERED = 'DELIVERED',
7
+ /** Given up: every attempt failed, or the receiver answered a status that is not retried. */
8
+ FAILED = 'FAILED',
9
+ }
@@ -1,5 +1,5 @@
1
- /** How a function reads a vault key: `config.NAME` (a VISIBLE entry) or `secrets.NAME` (a SECRET entry). */
2
- export enum ConfigurationReadAs {
3
- CONFIG = 'config',
4
- SECRETS = 'secrets',
5
- }
1
+ /** How a function reads a vault key: `config.NAME` (a VISIBLE entry) or `secrets.NAME` (a SECRET entry). */
2
+ export enum ConfigurationReadAs {
3
+ CONFIG = 'config',
4
+ SECRETS = 'secrets',
5
+ }
@@ -1,9 +1,9 @@
1
- /** What the activity of a Discord bot says it does ("Playing", "Listening to", "Watching", "Competing in", or a free text). */
2
- export enum DiscordActivityType {
3
- PLAYING = 'PLAYING',
4
- LISTENING = 'LISTENING',
5
- WATCHING = 'WATCHING',
6
- COMPETING = 'COMPETING',
7
- /** The text alone, shown as it is written. */
8
- CUSTOM = 'CUSTOM',
9
- }
1
+ /** What the activity of a Discord bot says it does ("Playing", "Listening to", "Watching", "Competing in", or a free text). */
2
+ export enum DiscordActivityType {
3
+ PLAYING = 'PLAYING',
4
+ LISTENING = 'LISTENING',
5
+ WATCHING = 'WATCHING',
6
+ COMPETING = 'COMPETING',
7
+ /** The text alone, shown as it is written. */
8
+ CUSTOM = 'CUSTOM',
9
+ }
@@ -1,11 +1,11 @@
1
- /**
2
- * Type of a Discord channel a CHANNEL option may be limited to (Discord's names; the API sends their
3
- * numbers). Same set as the runtime's `DiscordChannelType`, which a parity test keeps equal.
4
- */
5
- export enum DiscordChannelType {
6
- TEXT = 'TEXT',
7
- VOICE = 'VOICE',
8
- CATEGORY = 'CATEGORY',
9
- ANNOUNCEMENT = 'ANNOUNCEMENT',
10
- FORUM = 'FORUM',
11
- }
1
+ /**
2
+ * Type of a Discord channel a CHANNEL option may be limited to (Discord's names; the API sends their
3
+ * numbers). Same set as the runtime's `DiscordChannelType`, which a parity test keeps equal.
4
+ */
5
+ export enum DiscordChannelType {
6
+ TEXT = 'TEXT',
7
+ VOICE = 'VOICE',
8
+ CATEGORY = 'CATEGORY',
9
+ ANNOUNCEMENT = 'ANNOUNCEMENT',
10
+ FORUM = 'FORUM',
11
+ }
@@ -1,7 +1,7 @@
1
- /** What a component prefix of a Discord bot routes. */
2
- export enum DiscordComponentKind {
3
- /** A button or a select menu: interactions of type MESSAGE_COMPONENT. */
4
- BUTTON_OR_SELECT = 'BUTTON_OR_SELECT',
5
- /** A form: interactions of type MODAL_SUBMIT. */
6
- MODAL = 'MODAL',
7
- }
1
+ /** What a component prefix of a Discord bot routes. */
2
+ export enum DiscordComponentKind {
3
+ /** A button or a select menu: interactions of type MESSAGE_COMPONENT. */
4
+ BUTTON_OR_SELECT = 'BUTTON_OR_SELECT',
5
+ /** A form: interactions of type MODAL_SUBMIT. */
6
+ MODAL = 'MODAL',
7
+ }
@@ -1,13 +1,13 @@
1
- /** Why a Discord event the Gateway received was not kept for execution. */
2
- export enum DiscordEventDropReason {
3
- /** A filter of the trigger rejected it (see `DiscordEventFilterName`). */
4
- FILTERED = 'FILTERED',
5
- /** The bot went past its events per minute. */
6
- RATE = 'RATE',
7
- /** The monthly spend cap of the bot is reached. */
8
- MONTHLY_CAP = 'MONTHLY_CAP',
9
- /** The credits of the organization are spent and the bot has no overage. */
10
- CREDITS_EXHAUSTED = 'CREDITS_EXHAUSTED',
11
- /** It waited in the inbox past the tolerance. */
12
- EXPIRED = 'EXPIRED',
13
- }
1
+ /** Why a Discord event the Gateway received was not kept for execution. */
2
+ export enum DiscordEventDropReason {
3
+ /** A filter of the trigger rejected it (see `DiscordEventFilterName`). */
4
+ FILTERED = 'FILTERED',
5
+ /** The bot went past its events per minute. */
6
+ RATE = 'RATE',
7
+ /** The monthly spend cap of the bot is reached. */
8
+ MONTHLY_CAP = 'MONTHLY_CAP',
9
+ /** The credits of the organization are spent and the bot has no overage. */
10
+ CREDITS_EXHAUSTED = 'CREDITS_EXHAUSTED',
11
+ /** It waited in the inbox past the tolerance. */
12
+ EXPIRED = 'EXPIRED',
13
+ }
@@ -1,11 +1,11 @@
1
- /** A filter of a Discord event trigger; the value is its key in `IReflexDiscordEventFilters` (and the name reported when it rejects an event), except `guildOnly`. */
2
- export enum DiscordEventFilterName {
3
- GUILD_IDS = 'guildIds',
4
- CHANNEL_IDS = 'channelIds',
5
- ROLE_IDS = 'roleIds',
6
- CONTENT_PREFIX = 'contentPrefix',
7
- IGNORE_BOTS = 'ignoreBots',
8
- IGNORE_SELF = 'ignoreSelf',
9
- /** Not a setting: events outside a server (direct messages) are always ignored. */
10
- GUILD_ONLY = 'guildOnly',
11
- }
1
+ /** A filter of a Discord event trigger; the value is its key in `IReflexDiscordEventFilters` (and the name reported when it rejects an event), except `guildOnly`. */
2
+ export enum DiscordEventFilterName {
3
+ GUILD_IDS = 'guildIds',
4
+ CHANNEL_IDS = 'channelIds',
5
+ ROLE_IDS = 'roleIds',
6
+ CONTENT_PREFIX = 'contentPrefix',
7
+ IGNORE_BOTS = 'ignoreBots',
8
+ IGNORE_SELF = 'ignoreSelf',
9
+ /** Not a setting: events outside a server (direct messages) are always ignored. */
10
+ GUILD_ONLY = 'guildOnly',
11
+ }
@@ -1,13 +1,13 @@
1
- /** Where a retained Discord event is in the inbox of the execution plane. */
2
- export enum DiscordEventStatus {
3
- /** Waiting to be taken by an edge. */
4
- PENDING = 'PENDING',
5
- /** Taken by an edge, running. */
6
- CLAIMED = 'CLAIMED',
7
- /** The function ran to its end. */
8
- DONE = 'DONE',
9
- /** The function failed, or the trigger left the version in service: never retried. */
10
- FAILED = 'FAILED',
11
- /** Not taken within the tolerance: never run, never billed. */
12
- EXPIRED = 'EXPIRED',
13
- }
1
+ /** Where a retained Discord event is in the inbox of the execution plane. */
2
+ export enum DiscordEventStatus {
3
+ /** Waiting to be taken by an edge. */
4
+ PENDING = 'PENDING',
5
+ /** Taken by an edge, running. */
6
+ CLAIMED = 'CLAIMED',
7
+ /** The function ran to its end. */
8
+ DONE = 'DONE',
9
+ /** The function failed, or the trigger left the version in service: never retried. */
10
+ FAILED = 'FAILED',
11
+ /** Not taken within the tolerance: never run, never billed. */
12
+ EXPIRED = 'EXPIRED',
13
+ }
@@ -1,7 +1,7 @@
1
- /** A Discord Gateway event a function of a bot Service can be triggered by. */
2
- export enum DiscordEventType {
3
- GUILD_MEMBER_ADD = 'GUILD_MEMBER_ADD',
4
- GUILD_MEMBER_REMOVE = 'GUILD_MEMBER_REMOVE',
5
- MESSAGE_CREATE = 'MESSAGE_CREATE',
6
- MESSAGE_REACTION_ADD = 'MESSAGE_REACTION_ADD',
7
- }
1
+ /** A Discord Gateway event a function of a bot Service can be triggered by. */
2
+ export enum DiscordEventType {
3
+ GUILD_MEMBER_ADD = 'GUILD_MEMBER_ADD',
4
+ GUILD_MEMBER_REMOVE = 'GUILD_MEMBER_REMOVE',
5
+ MESSAGE_CREATE = 'MESSAGE_CREATE',
6
+ MESSAGE_REACTION_ADD = 'MESSAGE_REACTION_ADD',
7
+ }
@@ -1,11 +1,11 @@
1
- /** Why a Gateway connection is `FAILED`. */
2
- export enum DiscordGatewayFailureCode {
3
- /** Discord rejected the token (close code 4004). */
4
- TOKEN_REJECTED = 'TOKEN_REJECTED',
5
- /** The bot spent its identifications of the UTC day. */
6
- IDENTIFY_BUDGET = 'IDENTIFY_BUDGET',
7
- /** Discord refused the connection (close codes 4010 to 4013: invalid shard, sharding required, invalid API version, invalid intents). */
8
- DISCORD_REFUSED = 'DISCORD_REFUSED',
9
- /** Discord refused the intents the version in service asks for (close code 4014): a privileged intent is not enabled in the Discord portal. */
10
- INTENTS_DISALLOWED = 'INTENTS_DISALLOWED',
11
- }
1
+ /** Why a Gateway connection is `FAILED`. */
2
+ export enum DiscordGatewayFailureCode {
3
+ /** Discord rejected the token (close code 4004). */
4
+ TOKEN_REJECTED = 'TOKEN_REJECTED',
5
+ /** The bot spent its identifications of the UTC day. */
6
+ IDENTIFY_BUDGET = 'IDENTIFY_BUDGET',
7
+ /** Discord refused the connection (close codes 4010 to 4013: invalid shard, sharding required, invalid API version, invalid intents). */
8
+ DISCORD_REFUSED = 'DISCORD_REFUSED',
9
+ /** Discord refused the intents the version in service asks for (close code 4014): a privileged intent is not enabled in the Discord portal. */
10
+ INTENTS_DISALLOWED = 'INTENTS_DISALLOWED',
11
+ }
@@ -1,11 +1,11 @@
1
- /** The state of the Gateway connection that keeps a Discord bot online in one environment. */
2
- export enum DiscordGatewayState {
3
- /** Connecting, identifying or resuming. */
4
- CONNECTING = 'CONNECTING',
5
- /** Connected: the bot is online. */
6
- CONNECTED = 'CONNECTED',
7
- /** No connection: the bot is paused or out of service, or the connection is between two owners. */
8
- DISCONNECTED = 'DISCONNECTED',
9
- /** The connection cannot be kept; `DiscordGatewayFailureCode` says why. */
10
- FAILED = 'FAILED',
11
- }
1
+ /** The state of the Gateway connection that keeps a Discord bot online in one environment. */
2
+ export enum DiscordGatewayState {
3
+ /** Connecting, identifying or resuming. */
4
+ CONNECTING = 'CONNECTING',
5
+ /** Connected: the bot is online. */
6
+ CONNECTED = 'CONNECTED',
7
+ /** No connection: the bot is paused or out of service, or the connection is between two owners. */
8
+ DISCONNECTED = 'DISCONNECTED',
9
+ /** The connection cannot be kept; `DiscordGatewayFailureCode` says why. */
10
+ FAILED = 'FAILED',
11
+ }
@@ -1,35 +1,35 @@
1
- /** The locales Discord translates a command, an option or a choice into (Discord's own codes). */
2
- export enum DiscordLocale {
3
- ID = 'id',
4
- DA = 'da',
5
- DE = 'de',
6
- EN_GB = 'en-GB',
7
- EN_US = 'en-US',
8
- ES_ES = 'es-ES',
9
- ES_419 = 'es-419',
10
- FR = 'fr',
11
- HR = 'hr',
12
- IT = 'it',
13
- LT = 'lt',
14
- HU = 'hu',
15
- NL = 'nl',
16
- NO = 'no',
17
- PL = 'pl',
18
- PT_BR = 'pt-BR',
19
- RO = 'ro',
20
- FI = 'fi',
21
- SV_SE = 'sv-SE',
22
- VI = 'vi',
23
- TR = 'tr',
24
- CS = 'cs',
25
- EL = 'el',
26
- BG = 'bg',
27
- RU = 'ru',
28
- UK = 'uk',
29
- HI = 'hi',
30
- TH = 'th',
31
- ZH_CN = 'zh-CN',
32
- JA = 'ja',
33
- ZH_TW = 'zh-TW',
34
- KO = 'ko',
35
- }
1
+ /** The locales Discord translates a command, an option or a choice into (Discord's own codes). */
2
+ export enum DiscordLocale {
3
+ ID = 'id',
4
+ DA = 'da',
5
+ DE = 'de',
6
+ EN_GB = 'en-GB',
7
+ EN_US = 'en-US',
8
+ ES_ES = 'es-ES',
9
+ ES_419 = 'es-419',
10
+ FR = 'fr',
11
+ HR = 'hr',
12
+ IT = 'it',
13
+ LT = 'lt',
14
+ HU = 'hu',
15
+ NL = 'nl',
16
+ NO = 'no',
17
+ PL = 'pl',
18
+ PT_BR = 'pt-BR',
19
+ RO = 'ro',
20
+ FI = 'fi',
21
+ SV_SE = 'sv-SE',
22
+ VI = 'vi',
23
+ TR = 'tr',
24
+ CS = 'cs',
25
+ EL = 'el',
26
+ BG = 'bg',
27
+ RU = 'ru',
28
+ UK = 'uk',
29
+ HI = 'hi',
30
+ TH = 'th',
31
+ ZH_CN = 'zh-CN',
32
+ JA = 'ja',
33
+ ZH_TW = 'zh-TW',
34
+ KO = 'ko',
35
+ }
@@ -1,12 +1,12 @@
1
- /** Type of an option of a Discord command (same names as the options Discord documents). */
2
- export enum DiscordOptionType {
3
- STRING = 'STRING',
4
- INTEGER = 'INTEGER',
5
- NUMBER = 'NUMBER',
6
- BOOLEAN = 'BOOLEAN',
7
- USER = 'USER',
8
- CHANNEL = 'CHANNEL',
9
- ROLE = 'ROLE',
10
- MENTIONABLE = 'MENTIONABLE',
11
- ATTACHMENT = 'ATTACHMENT',
12
- }
1
+ /** Type of an option of a Discord command (same names as the options Discord documents). */
2
+ export enum DiscordOptionType {
3
+ STRING = 'STRING',
4
+ INTEGER = 'INTEGER',
5
+ NUMBER = 'NUMBER',
6
+ BOOLEAN = 'BOOLEAN',
7
+ USER = 'USER',
8
+ CHANNEL = 'CHANNEL',
9
+ ROLE = 'ROLE',
10
+ MENTIONABLE = 'MENTIONABLE',
11
+ ATTACHMENT = 'ATTACHMENT',
12
+ }
@@ -1,8 +1,8 @@
1
- /** The status a Discord bot shows while connected to the Gateway. */
2
- export enum DiscordPresenceStatus {
3
- ONLINE = 'ONLINE',
4
- /** Away. */
5
- IDLE = 'IDLE',
6
- /** Do not disturb. */
7
- DND = 'DND',
8
- }
1
+ /** The status a Discord bot shows while connected to the Gateway. */
2
+ export enum DiscordPresenceStatus {
3
+ ONLINE = 'ONLINE',
4
+ /** Away. */
5
+ IDLE = 'IDLE',
6
+ /** Do not disturb. */
7
+ DND = 'DND',
8
+ }
@@ -1,6 +1,6 @@
1
- /** State of the push of the interactions address and the commands to Discord, per environment. */
2
- export enum DiscordSyncStatus {
3
- PENDING = 'PENDING',
4
- SYNCED = 'SYNCED',
5
- FAILED = 'FAILED',
6
- }
1
+ /** State of the push of the interactions address and the commands to Discord, per environment. */
2
+ export enum DiscordSyncStatus {
3
+ PENDING = 'PENDING',
4
+ SYNCED = 'SYNCED',
5
+ FAILED = 'FAILED',
6
+ }
@@ -1,11 +1,11 @@
1
- /** What Reflex knows of the bot token of an environment. */
2
- export enum DiscordTokenState {
3
- /** Discord accepted the token at the last check. */
4
- VALID = 'VALID',
5
- /** Discord answered 401 to the token. */
6
- REJECTED = 'REJECTED',
7
- /** The Vault entry has no value in this environment. */
8
- MISSING = 'MISSING',
9
- /** The token has not been checked yet. */
10
- UNCHECKED = 'UNCHECKED',
11
- }
1
+ /** What Reflex knows of the bot token of an environment. */
2
+ export enum DiscordTokenState {
3
+ /** Discord accepted the token at the last check. */
4
+ VALID = 'VALID',
5
+ /** Discord answered 401 to the token. */
6
+ REJECTED = 'REJECTED',
7
+ /** The Vault entry has no value in this environment. */
8
+ MISSING = 'MISSING',
9
+ /** The token has not been checked yet. */
10
+ UNCHECKED = 'UNCHECKED',
11
+ }
@@ -1,9 +1,9 @@
1
- /**
2
- * How a route answers its caller.
3
- * - SYNC: the caller waits for the Respond step, or gets 504 past the response timeout.
4
- * - ASYNC: the caller gets `202 {executionId}` before the execution starts, and reads its state.
5
- */
6
- export enum ExecutionMode {
7
- SYNC = 'SYNC',
8
- ASYNC = 'ASYNC',
9
- }
1
+ /**
2
+ * How a route answers its caller.
3
+ * - SYNC: the caller waits for the Respond step, or gets 504 past the response timeout.
4
+ * - ASYNC: the caller gets `202 {executionId}` before the execution starts, and reads its state.
5
+ */
6
+ export enum ExecutionMode {
7
+ SYNC = 'SYNC',
8
+ ASYNC = 'ASYNC',
9
+ }
@@ -1,20 +1,20 @@
1
- /**
2
- * Memory of the isolate an execution runs in (ADR-0244). The CPU part of the cost grows with the
3
- * profile: S x1, M x1.05, L x1.10, XL x1.20, XXL x1.35.
4
- */
5
- export enum ExecutionProfile {
6
- S = 'S',
7
- M = 'M',
8
- L = 'L',
9
- XL = 'XL',
10
- XXL = 'XXL',
11
- }
12
-
13
- /** Memory limit of each profile, in MB (1 GB = 1024 MB). */
14
- export const EXECUTION_PROFILE_MEMORY_MB: Readonly<Record<ExecutionProfile, number>> = {
15
- [ExecutionProfile.S]: 128,
16
- [ExecutionProfile.M]: 256,
17
- [ExecutionProfile.L]: 512,
18
- [ExecutionProfile.XL]: 1024,
19
- [ExecutionProfile.XXL]: 2048,
20
- };
1
+ /**
2
+ * Memory of the isolate an execution runs in (ADR-0244). The CPU part of the cost grows with the
3
+ * profile: S x1, M x1.05, L x1.10, XL x1.20, XXL x1.35.
4
+ */
5
+ export enum ExecutionProfile {
6
+ S = 'S',
7
+ M = 'M',
8
+ L = 'L',
9
+ XL = 'XL',
10
+ XXL = 'XXL',
11
+ }
12
+
13
+ /** Memory limit of each profile, in MB (1 GB = 1024 MB). */
14
+ export const EXECUTION_PROFILE_MEMORY_MB: Readonly<Record<ExecutionProfile, number>> = {
15
+ [ExecutionProfile.S]: 128,
16
+ [ExecutionProfile.M]: 256,
17
+ [ExecutionProfile.L]: 512,
18
+ [ExecutionProfile.XL]: 1024,
19
+ [ExecutionProfile.XXL]: 2048,
20
+ };
@@ -1,9 +1,9 @@
1
- /** Where the effective settings of an environment come from. */
2
- export enum ExecutionSettingsSource {
3
- /** The override of this environment. */
4
- ENVIRONMENT = 'ENVIRONMENT',
5
- /** The default of the function, for every environment without an override. */
6
- DEFAULT = 'DEFAULT',
7
- /** Nothing is set: the built-in defaults. */
8
- BUILT_IN = 'BUILT_IN',
9
- }
1
+ /** Where the effective settings of an environment come from. */
2
+ export enum ExecutionSettingsSource {
3
+ /** The override of this environment. */
4
+ ENVIRONMENT = 'ENVIRONMENT',
5
+ /** The default of the function, for every environment without an override. */
6
+ DEFAULT = 'DEFAULT',
7
+ /** Nothing is set: the built-in defaults. */
8
+ BUILT_IN = 'BUILT_IN',
9
+ }
@@ -1,4 +1,4 @@
1
- export enum HealthStatus {
2
- UP = 'up',
3
- DOWN = 'down',
4
- }
1
+ export enum HealthStatus {
2
+ UP = 'up',
3
+ DOWN = 'down',
4
+ }