@abyss-project/reflex 6.0.4 → 6.0.5

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 (149) hide show
  1. package/.eslintrc.js +32 -32
  2. package/.prettierrc +5 -5
  3. package/README.md +15 -15
  4. package/dist/types/interface/models/reflex-service-limits.model.d.ts +5 -2
  5. package/jest.config.ts +11 -11
  6. package/package.json +1 -1
  7. package/src/api/alert-rule.api.test.ts +72 -72
  8. package/src/api/alert-rule.api.ts +57 -57
  9. package/src/api/application-insights.api.test.ts +42 -42
  10. package/src/api/application-insights.api.ts +38 -38
  11. package/src/api/application-run-settings.api.test.ts +51 -51
  12. package/src/api/application-run-settings.api.ts +30 -30
  13. package/src/api/function-access.api.ts +87 -87
  14. package/src/api/function-insights.api.test.ts +27 -27
  15. package/src/api/function-insights.api.ts +18 -18
  16. package/src/api/function-run.api.ts +38 -38
  17. package/src/api/function-settings.api.ts +74 -74
  18. package/src/api/function-template.api.test.ts +72 -72
  19. package/src/api/function-template.api.ts +52 -52
  20. package/src/api/function-test.api.ts +34 -34
  21. package/src/api/function-version.api.ts +66 -66
  22. package/src/api/function.api.ts +62 -62
  23. package/src/api/health.api.ts +10 -10
  24. package/src/api/route-stats.api.test.ts +45 -45
  25. package/src/api/route-stats.api.ts +36 -36
  26. package/src/api/service-configuration.api.ts +16 -16
  27. package/src/api/service-deployment.api.ts +79 -79
  28. package/src/api/service-discord-event.api.test.ts +106 -106
  29. package/src/api/service-discord-event.api.ts +78 -78
  30. package/src/api/service-insights.api.test.ts +36 -36
  31. package/src/api/service-insights.api.ts +42 -42
  32. package/src/api/service-task.api.test.ts +140 -140
  33. package/src/api/service-task.api.ts +141 -141
  34. package/src/api/service-version.api.ts +54 -54
  35. package/src/api/service.api.test.ts +215 -215
  36. package/src/api/service.api.ts +55 -55
  37. package/src/discord/discord-event-filter-cases.ts +261 -261
  38. package/src/discord/discord-event-filters.test.ts +91 -91
  39. package/src/discord/discord-event-filters.ts +95 -95
  40. package/src/discord/discord-event-intents.test.ts +112 -112
  41. package/src/discord/discord-event-intents.ts +55 -55
  42. package/src/discord/index.ts +3 -3
  43. package/src/insights/index.ts +1 -1
  44. package/src/insights/percentiles.test.ts +75 -75
  45. package/src/insights/percentiles.ts +37 -37
  46. package/src/types/enum/access-grant-status.enum.ts +12 -12
  47. package/src/types/enum/access-kind.enum.ts +7 -7
  48. package/src/types/enum/access-request-status.enum.ts +11 -11
  49. package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
  50. package/src/types/enum/configuration-read-as.enum.ts +5 -5
  51. package/src/types/enum/discord-activity-type.enum.ts +9 -9
  52. package/src/types/enum/discord-channel-type.enum.ts +11 -11
  53. package/src/types/enum/discord-component-kind.enum.ts +7 -7
  54. package/src/types/enum/discord-event-drop-reason.enum.ts +13 -13
  55. package/src/types/enum/discord-event-filter-name.enum.ts +11 -11
  56. package/src/types/enum/discord-event-status.enum.ts +13 -13
  57. package/src/types/enum/discord-event-type.enum.ts +7 -7
  58. package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -11
  59. package/src/types/enum/discord-gateway-state.enum.ts +11 -11
  60. package/src/types/enum/discord-host-action.enum.ts +35 -35
  61. package/src/types/enum/discord-locale.enum.ts +35 -35
  62. package/src/types/enum/discord-option-type.enum.ts +12 -12
  63. package/src/types/enum/discord-presence-status.enum.ts +8 -8
  64. package/src/types/enum/discord-sync-status.enum.ts +6 -6
  65. package/src/types/enum/discord-token-state.enum.ts +11 -11
  66. package/src/types/enum/execution-mode.enum.ts +9 -9
  67. package/src/types/enum/execution-profile.enum.ts +20 -20
  68. package/src/types/enum/execution-settings-source.enum.ts +9 -9
  69. package/src/types/enum/health-status.enum.ts +4 -4
  70. package/src/types/enum/insights-period.enum.ts +8 -8
  71. package/src/types/enum/log-cap-mode.enum.ts +6 -6
  72. package/src/types/enum/log-drop-cause.enum.ts +8 -8
  73. package/src/types/enum/reflex-alert-metric.enum.ts +5 -5
  74. package/src/types/enum/reflex-alert-notification-state.enum.ts +6 -6
  75. package/src/types/enum/reflex-alert-scope.enum.ts +6 -6
  76. package/src/types/enum/route-method.enum.ts +9 -9
  77. package/src/types/enum/run-log-level.enum.ts +6 -6
  78. package/src/types/enum/run-mode.enum.ts +11 -11
  79. package/src/types/enum/run-step-status.enum.ts +7 -7
  80. package/src/types/enum/schedule-sync-status.enum.ts +6 -6
  81. package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
  82. package/src/types/enum/scheduled-run-status.enum.ts +17 -17
  83. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  84. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  85. package/src/types/enum/service-type.enum.ts +9 -9
  86. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  87. package/src/types/enum/trace-effect-type.enum.ts +12 -12
  88. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  89. package/src/types/enum/trigger-kind.enum.ts +8 -8
  90. package/src/types/enum/vault-value-source.enum.ts +12 -12
  91. package/src/types/enum/vault-visibility.enum.ts +5 -5
  92. package/src/types/index.ts +2 -2
  93. package/src/types/interface/api/index.ts +3 -3
  94. package/src/types/interface/api/requests/alert-rule.request.ts +53 -53
  95. package/src/types/interface/api/requests/application-insights.request.ts +18 -18
  96. package/src/types/interface/api/requests/application-run-settings.request.ts +11 -11
  97. package/src/types/interface/api/requests/function-access.request.ts +51 -51
  98. package/src/types/interface/api/requests/function-settings.request.ts +34 -34
  99. package/src/types/interface/api/requests/function-template.request.ts +29 -29
  100. package/src/types/interface/api/requests/function-version.request.ts +38 -38
  101. package/src/types/interface/api/requests/function.request.ts +36 -36
  102. package/src/types/interface/api/requests/route-stats.request.ts +22 -22
  103. package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
  104. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  105. package/src/types/interface/api/requests/service-discord-event.request.ts +68 -68
  106. package/src/types/interface/api/requests/service-insights.request.ts +31 -31
  107. package/src/types/interface/api/requests/service-task.request.ts +80 -80
  108. package/src/types/interface/api/requests/service-version.request.ts +24 -24
  109. package/src/types/interface/api/requests/service.request.ts +46 -46
  110. package/src/types/interface/api/response.ts +4 -4
  111. package/src/types/interface/api/responses/alert-rule.response.ts +24 -24
  112. package/src/types/interface/api/responses/application-insights.response.ts +11 -11
  113. package/src/types/interface/api/responses/application-run-settings.response.ts +8 -8
  114. package/src/types/interface/api/responses/function-access.response.ts +45 -45
  115. package/src/types/interface/api/responses/function-run.response.ts +18 -18
  116. package/src/types/interface/api/responses/function-template.response.ts +21 -21
  117. package/src/types/interface/api/responses/function-version.response.ts +42 -42
  118. package/src/types/interface/api/responses/function.response.ts +25 -25
  119. package/src/types/interface/api/responses/route-stats.response.ts +15 -15
  120. package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
  121. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  122. package/src/types/interface/api/responses/service-discord-event.response.ts +24 -24
  123. package/src/types/interface/api/responses/service-insights.response.ts +11 -11
  124. package/src/types/interface/api/responses/service-task.response.ts +57 -57
  125. package/src/types/interface/api/responses/service-version.response.ts +112 -112
  126. package/src/types/interface/api/responses/service.response.ts +31 -31
  127. package/src/types/interface/health.response.ts +7 -7
  128. package/src/types/interface/index.ts +3 -3
  129. package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
  130. package/src/types/interface/models/reflex-access-request.model.ts +15 -15
  131. package/src/types/interface/models/reflex-alert-rule.model.ts +56 -56
  132. package/src/types/interface/models/reflex-definition.model.ts +31 -31
  133. package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -58
  134. package/src/types/interface/models/reflex-discord-event.model.ts +79 -79
  135. package/src/types/interface/models/reflex-discord.model.ts +196 -196
  136. package/src/types/interface/models/reflex-function-template.model.ts +18 -18
  137. package/src/types/interface/models/reflex-function-version.model.ts +19 -19
  138. package/src/types/interface/models/reflex-function.model.ts +30 -30
  139. package/src/types/interface/models/reflex-insights.model.ts +215 -215
  140. package/src/types/interface/models/reflex-price-list.model.ts +20 -20
  141. package/src/types/interface/models/reflex-run-settings.model.ts +28 -28
  142. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
  143. package/src/types/interface/models/reflex-service-deployment.model.ts +46 -46
  144. package/src/types/interface/models/reflex-service-limits.model.ts +17 -8
  145. package/src/types/interface/models/reflex-service.model.ts +45 -45
  146. package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
  147. package/src/types/interface/models/reflex-task.model.ts +97 -97
  148. package/tsconfig.check.json +15 -15
  149. package/tsconfig.json +35 -35
@@ -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
- /**
2
- * The `discord.*` actions a function of a Discord bot Service can declare in its accesses. Same values
3
- * as the runtime's `DiscordCapability`, which a parity test keeps equal: the Access screen lists them all.
4
- */
5
- export enum DiscordHostAction {
6
- REPLY = 'discord.reply',
7
- UPDATE = 'discord.update',
8
- SHOW_MODAL = 'discord.showModal',
9
- FOLLOW_UP = 'discord.followUp',
10
- SEND_MESSAGE = 'discord.sendMessage',
11
- EDIT_MESSAGE = 'discord.editMessage',
12
- DELETE_MESSAGE = 'discord.deleteMessage',
13
- ADD_ROLE = 'discord.addRole',
14
- REMOVE_ROLE = 'discord.removeRole',
15
- SEND_DIRECT_MESSAGE = 'discord.sendDirectMessage',
16
- GET_MEMBER = 'discord.getMember',
17
- GET_GUILD_ROLES = 'discord.getGuildRoles',
18
- GET_CHANNEL = 'discord.getChannel',
19
- GET_GUILD = 'discord.getGuild',
20
- KICK_MEMBER = 'discord.kickMember',
21
- BAN_MEMBER = 'discord.banMember',
22
- UNBAN_MEMBER = 'discord.unbanMember',
23
- TIMEOUT_MEMBER = 'discord.timeoutMember',
24
- BULK_DELETE_MESSAGES = 'discord.bulkDeleteMessages',
25
- ADD_REACTION = 'discord.addReaction',
26
- REMOVE_REACTION = 'discord.removeReaction',
27
- CREATE_CHANNEL = 'discord.createChannel',
28
- DELETE_CHANNEL = 'discord.deleteChannel',
29
- SET_CHANNEL_PERMISSION = 'discord.setChannelPermission',
30
- REMOVE_CHANNEL_PERMISSION = 'discord.removeChannelPermission',
31
- CREATE_ROLE = 'discord.createRole',
32
- DELETE_ROLE = 'discord.deleteRole',
33
- CREATE_THREAD = 'discord.createThread',
34
- END_POLL = 'discord.endPoll',
35
- }
1
+ /**
2
+ * The `discord.*` actions a function of a Discord bot Service can declare in its accesses. Same values
3
+ * as the runtime's `DiscordCapability`, which a parity test keeps equal: the Access screen lists them all.
4
+ */
5
+ export enum DiscordHostAction {
6
+ REPLY = 'discord.reply',
7
+ UPDATE = 'discord.update',
8
+ SHOW_MODAL = 'discord.showModal',
9
+ FOLLOW_UP = 'discord.followUp',
10
+ SEND_MESSAGE = 'discord.sendMessage',
11
+ EDIT_MESSAGE = 'discord.editMessage',
12
+ DELETE_MESSAGE = 'discord.deleteMessage',
13
+ ADD_ROLE = 'discord.addRole',
14
+ REMOVE_ROLE = 'discord.removeRole',
15
+ SEND_DIRECT_MESSAGE = 'discord.sendDirectMessage',
16
+ GET_MEMBER = 'discord.getMember',
17
+ GET_GUILD_ROLES = 'discord.getGuildRoles',
18
+ GET_CHANNEL = 'discord.getChannel',
19
+ GET_GUILD = 'discord.getGuild',
20
+ KICK_MEMBER = 'discord.kickMember',
21
+ BAN_MEMBER = 'discord.banMember',
22
+ UNBAN_MEMBER = 'discord.unbanMember',
23
+ TIMEOUT_MEMBER = 'discord.timeoutMember',
24
+ BULK_DELETE_MESSAGES = 'discord.bulkDeleteMessages',
25
+ ADD_REACTION = 'discord.addReaction',
26
+ REMOVE_REACTION = 'discord.removeReaction',
27
+ CREATE_CHANNEL = 'discord.createChannel',
28
+ DELETE_CHANNEL = 'discord.deleteChannel',
29
+ SET_CHANNEL_PERMISSION = 'discord.setChannelPermission',
30
+ REMOVE_CHANNEL_PERMISSION = 'discord.removeChannelPermission',
31
+ CREATE_ROLE = 'discord.createRole',
32
+ DELETE_ROLE = 'discord.deleteRole',
33
+ CREATE_THREAD = 'discord.createThread',
34
+ END_POLL = 'discord.endPoll',
35
+ }
@@ -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
+ }
@@ -1,8 +1,8 @@
1
- /** The period a dashboard covers; the value is what the query string carries. */
2
- export enum InsightsPeriod {
3
- HOUR_1 = '1h',
4
- HOURS_24 = '24h',
5
- DAYS_7 = '7d',
6
- DAYS_30 = '30d',
7
- DAYS_90 = '90d',
8
- }
1
+ /** The period a dashboard covers; the value is what the query string carries. */
2
+ export enum InsightsPeriod {
3
+ HOUR_1 = '1h',
4
+ HOURS_24 = '24h',
5
+ DAYS_7 = '7d',
6
+ DAYS_30 = '30d',
7
+ DAYS_90 = '90d',
8
+ }
@@ -1,6 +1,6 @@
1
- /** How a function caps the log lines it keeps per run: follow its application, no cap, or its own cap. */
2
- export enum LogCapMode {
3
- INHERIT = 'INHERIT',
4
- NONE = 'NONE',
5
- LIMIT = 'LIMIT',
6
- }
1
+ /** How a function caps the log lines it keeps per run: follow its application, no cap, or its own cap. */
2
+ export enum LogCapMode {
3
+ INHERIT = 'INHERIT',
4
+ NONE = 'NONE',
5
+ LIMIT = 'LIMIT',
6
+ }
@@ -1,8 +1,8 @@
1
- /**
2
- * Why a run kept fewer log lines than it wrote: the cap in force for the run (the function's own, or its
3
- * application's), or the technical bound every run has (10 000 lines, 4 MiB).
4
- */
5
- export enum LogDropCause {
6
- CAP = 'CAP',
7
- TECHNICAL = 'TECHNICAL',
8
- }
1
+ /**
2
+ * Why a run kept fewer log lines than it wrote: the cap in force for the run (the function's own, or its
3
+ * application's), or the technical bound every run has (10 000 lines, 4 MiB).
4
+ */
5
+ export enum LogDropCause {
6
+ CAP = 'CAP',
7
+ TECHNICAL = 'TECHNICAL',
8
+ }
@@ -1,5 +1,5 @@
1
- /** What an alert rule measures over its window: the error rate in percent, or the 95th percentile of the duration in ms. */
2
- export enum ReflexAlertMetric {
3
- ERROR_RATE = 'ERROR_RATE',
4
- LATENCY_P95 = 'LATENCY_P95',
5
- }
1
+ /** What an alert rule measures over its window: the error rate in percent, or the 95th percentile of the duration in ms. */
2
+ export enum ReflexAlertMetric {
3
+ ERROR_RATE = 'ERROR_RATE',
4
+ LATENCY_P95 = 'LATENCY_P95',
5
+ }
@@ -1,6 +1,6 @@
1
- /** What became of the last incident report of an alert rule. */
2
- export enum ReflexAlertNotificationState {
3
- SENT = 'SENT',
4
- MONITOR_NOT_ACTIVATED = 'MONITOR_NOT_ACTIVATED',
5
- FAILED = 'FAILED',
6
- }
1
+ /** What became of the last incident report of an alert rule. */
2
+ export enum ReflexAlertNotificationState {
3
+ SENT = 'SENT',
4
+ MONITOR_NOT_ACTIVATED = 'MONITOR_NOT_ACTIVATED',
5
+ FAILED = 'FAILED',
6
+ }
@@ -1,6 +1,6 @@
1
- /** What an alert rule watches: a whole Service, one route of a Service, or one function. */
2
- export enum ReflexAlertScope {
3
- SERVICE = 'SERVICE',
4
- ROUTE = 'ROUTE',
5
- FUNCTION = 'FUNCTION',
6
- }
1
+ /** What an alert rule watches: a whole Service, one route of a Service, or one function. */
2
+ export enum ReflexAlertScope {
3
+ SERVICE = 'SERVICE',
4
+ ROUTE = 'ROUTE',
5
+ FUNCTION = 'FUNCTION',
6
+ }
@@ -1,9 +1,9 @@
1
- /** The HTTP method a route answers. `ANY` answers every method; a `FUNCTIONS` Service only has `ANY` routes. */
2
- export enum RouteMethod {
3
- GET = 'GET',
4
- POST = 'POST',
5
- PUT = 'PUT',
6
- PATCH = 'PATCH',
7
- DELETE = 'DELETE',
8
- ANY = 'ANY',
9
- }
1
+ /** The HTTP method a route answers. `ANY` answers every method; a `FUNCTIONS` Service only has `ANY` routes. */
2
+ export enum RouteMethod {
3
+ GET = 'GET',
4
+ POST = 'POST',
5
+ PUT = 'PUT',
6
+ PATCH = 'PATCH',
7
+ DELETE = 'DELETE',
8
+ ANY = 'ANY',
9
+ }
@@ -1,6 +1,6 @@
1
- /** The level of a log line an execution wrote (LOG step, `abyss.log.*`, `console.*`). */
2
- export enum RunLogLevel {
3
- INFO = 'info',
4
- WARN = 'warn',
5
- ERROR = 'error',
6
- }
1
+ /** The level of a log line an execution wrote (LOG step, `abyss.log.*`, `console.*`). */
2
+ export enum RunLogLevel {
3
+ INFO = 'info',
4
+ WARN = 'warn',
5
+ ERROR = 'error',
6
+ }
@@ -1,11 +1,11 @@
1
- /**
2
- * How a run was made.
3
- * - SIMULATION: nothing is executed, effects are recorded, the Store is a scratch copy thrown away.
4
- * - DRY_RUN: Store reads are real, writes are recorded and not executed.
5
- * - LIVE: an execution of the edge on a promoted version.
6
- */
7
- export enum RunMode {
8
- SIMULATION = 'SIMULATION',
9
- DRY_RUN = 'DRY_RUN',
10
- LIVE = 'LIVE',
11
- }
1
+ /**
2
+ * How a run was made.
3
+ * - SIMULATION: nothing is executed, effects are recorded, the Store is a scratch copy thrown away.
4
+ * - DRY_RUN: Store reads are real, writes are recorded and not executed.
5
+ * - LIVE: an execution of the edge on a promoted version.
6
+ */
7
+ export enum RunMode {
8
+ SIMULATION = 'SIMULATION',
9
+ DRY_RUN = 'DRY_RUN',
10
+ LIVE = 'LIVE',
11
+ }
@@ -1,7 +1,7 @@
1
- /** How one step of a live execution ended. */
2
- export enum RunStepStatus {
3
- SUCCEEDED = 'SUCCEEDED',
4
- FAILED = 'FAILED',
5
- /** The step was running when the pod of the edge or of the runner stopped. */
6
- INTERRUPTED = 'INTERRUPTED',
7
- }
1
+ /** How one step of a live execution ended. */
2
+ export enum RunStepStatus {
3
+ SUCCEEDED = 'SUCCEEDED',
4
+ FAILED = 'FAILED',
5
+ /** The step was running when the pod of the edge or of the runner stopped. */
6
+ INTERRUPTED = 'INTERRUPTED',
7
+ }
@@ -1,6 +1,6 @@
1
- /** State of the synchronization of the cron tasks of the version in service with Flow, per environment. */
2
- export enum ScheduleSyncStatus {
3
- PENDING = 'PENDING',
4
- SYNCED = 'SYNCED',
5
- FAILED = 'FAILED',
6
- }
1
+ /** State of the synchronization of the cron tasks of the version in service with Flow, per environment. */
2
+ export enum ScheduleSyncStatus {
3
+ PENDING = 'PENDING',
4
+ SYNCED = 'SYNCED',
5
+ FAILED = 'FAILED',
6
+ }
@@ -1,5 +1,5 @@
1
- /** What queued a scheduled run of a task: a tick of its cron (sent by Flow), or a delayed run the code scheduled. */
2
- export enum ScheduledRunOrigin {
3
- RECURRING = 'RECURRING',
4
- DELAYED = 'DELAYED',
5
- }
1
+ /** What queued a scheduled run of a task: a tick of its cron (sent by Flow), or a delayed run the code scheduled. */
2
+ export enum ScheduledRunOrigin {
3
+ RECURRING = 'RECURRING',
4
+ DELAYED = 'DELAYED',
5
+ }
@@ -1,17 +1,17 @@
1
- /** Where a scheduled run of a task stands (`scheduled_runs.status` of the execution plane). */
2
- export enum ScheduledRunStatus {
3
- /** Waiting for its due date, or due and not yet taken by an edge. */
4
- PENDING = 'PENDING',
5
- /** An edge runs it. */
6
- CLAIMED = 'CLAIMED',
7
- /** Ran to its end. */
8
- DONE = 'DONE',
9
- /** Did not run to its end: `failureCode` says why. */
10
- FAILED = 'FAILED',
11
- /** Cancelled before it ran (`abyss.schedule.cancel` or the screen). */
12
- CANCELLED = 'CANCELLED',
13
- /** Taken too late, past the tolerance (after a pause or an outage): ran nothing, cost nothing. */
14
- EXPIRED = 'EXPIRED',
15
- /** A tick of a cron that came while the previous one still ran: ran nothing, cost nothing. */
16
- SKIPPED = 'SKIPPED',
17
- }
1
+ /** Where a scheduled run of a task stands (`scheduled_runs.status` of the execution plane). */
2
+ export enum ScheduledRunStatus {
3
+ /** Waiting for its due date, or due and not yet taken by an edge. */
4
+ PENDING = 'PENDING',
5
+ /** An edge runs it. */
6
+ CLAIMED = 'CLAIMED',
7
+ /** Ran to its end. */
8
+ DONE = 'DONE',
9
+ /** Did not run to its end: `failureCode` says why. */
10
+ FAILED = 'FAILED',
11
+ /** Cancelled before it ran (`abyss.schedule.cancel` or the screen). */
12
+ CANCELLED = 'CANCELLED',
13
+ /** Taken too late, past the tolerance (after a pause or an outage): ran nothing, cost nothing. */
14
+ EXPIRED = 'EXPIRED',
15
+ /** A tick of a cron that came while the previous one still ran: ran nothing, cost nothing. */
16
+ SKIPPED = 'SKIPPED',
17
+ }
@@ -1,11 +1,11 @@
1
- /** The gesture a deployment row records, one row per gesture in an environment. */
2
- export enum ServiceDeploymentAction {
3
- /** A version of the Service put in service. */
4
- GO_LIVE = 'GO_LIVE',
5
- /** A version deployed before put back in service. */
6
- ROLLBACK = 'ROLLBACK',
7
- /** The Service stops answering (503 SERVICE_PAUSED), its version kept. */
8
- PAUSE = 'PAUSE',
9
- /** The paused Service answers again, with the same version. */
10
- RESUME = 'RESUME',
11
- }
1
+ /** The gesture a deployment row records, one row per gesture in an environment. */
2
+ export enum ServiceDeploymentAction {
3
+ /** A version of the Service put in service. */
4
+ GO_LIVE = 'GO_LIVE',
5
+ /** A version deployed before put back in service. */
6
+ ROLLBACK = 'ROLLBACK',
7
+ /** The Service stops answering (503 SERVICE_PAUSED), its version kept. */
8
+ PAUSE = 'PAUSE',
9
+ /** The paused Service answers again, with the same version. */
10
+ RESUME = 'RESUME',
11
+ }
@@ -1,5 +1,5 @@
1
- /** State of the Service in an environment after a deployment gesture. */
2
- export enum ServiceDeploymentStatus {
3
- ACTIVE = 'ACTIVE',
4
- PAUSED = 'PAUSED',
5
- }
1
+ /** State of the Service in an environment after a deployment gesture. */
2
+ export enum ServiceDeploymentStatus {
3
+ ACTIVE = 'ACTIVE',
4
+ PAUSED = 'PAUSED',
5
+ }
@@ -1,9 +1,9 @@
1
- /** What a Service exposes. */
2
- export enum ServiceType {
3
- /** Routes of a method and a path, each calling one function of the Service. */
4
- HTTP_API = 'HTTP_API',
5
- /** Functions, each at a path, answering every method (routes of method `ANY` only). */
6
- FUNCTIONS = 'FUNCTIONS',
7
- /** A Discord bot: commands and components, each calling one function of the Service. No routes. */
8
- DISCORD_BOT = 'DISCORD_BOT',
9
- }
1
+ /** What a Service exposes. */
2
+ export enum ServiceType {
3
+ /** Routes of a method and a path, each calling one function of the Service. */
4
+ HTTP_API = 'HTTP_API',
5
+ /** Functions, each at a path, answering every method (routes of method `ANY` only). */
6
+ FUNCTIONS = 'FUNCTIONS',
7
+ /** A Discord bot: commands and components, each calling one function of the Service. No routes. */
8
+ DISCORD_BOT = 'DISCORD_BOT',
9
+ }
@@ -1,6 +1,6 @@
1
- /** How a route differs between a version of a Service and the previous one. */
2
- export enum ServiceVersionChangeKind {
3
- ADDED = 'ADDED',
4
- REMOVED = 'REMOVED',
5
- MODIFIED = 'MODIFIED',
6
- }
1
+ /** How a route differs between a version of a Service and the previous one. */
2
+ export enum ServiceVersionChangeKind {
3
+ ADDED = 'ADDED',
4
+ REMOVED = 'REMOVED',
5
+ MODIFIED = 'MODIFIED',
6
+ }