@abyss-project/reflex 5.11.0 → 5.12.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.
- package/.eslintrc.js +32 -32
- package/.prettierrc +5 -5
- package/README.md +15 -15
- package/dist/types/interface/api/responses/service-version.response.d.ts +1 -0
- package/jest.config.ts +11 -11
- package/package.json +15 -10
- package/src/api/alert-rule.api.test.ts +72 -72
- package/src/api/alert-rule.api.ts +57 -57
- package/src/api/application-insights.api.test.ts +42 -42
- package/src/api/application-insights.api.ts +38 -38
- package/src/api/application-run-settings.api.test.ts +51 -51
- package/src/api/application-run-settings.api.ts +30 -30
- package/src/api/function-insights.api.test.ts +27 -27
- package/src/api/function-insights.api.ts +18 -18
- package/src/api/function-run.api.ts +38 -38
- package/src/api/function-settings.api.ts +74 -74
- package/src/api/function-test.api.ts +34 -34
- package/src/api/function.api.ts +62 -62
- package/src/api/health.api.ts +10 -10
- package/src/api/route-stats.api.test.ts +45 -45
- package/src/api/route-stats.api.ts +36 -36
- package/src/api/service-configuration.api.ts +16 -16
- package/src/api/service-deployment.api.ts +79 -79
- package/src/api/service-discord-event.api.test.ts +106 -106
- package/src/api/service-discord-event.api.ts +78 -78
- package/src/api/service-discord.api.test.ts +197 -197
- package/src/api/service-discord.api.ts +241 -241
- package/src/api/service-insights.api.test.ts +36 -36
- package/src/api/service-insights.api.ts +42 -42
- package/src/api/service-route.api.ts +72 -72
- package/src/api/service-task.api.test.ts +140 -140
- package/src/api/service-task.api.ts +141 -141
- package/src/api/service-version.api.ts +54 -54
- package/src/api/service.api.test.ts +215 -215
- package/src/api/service.api.ts +55 -55
- package/src/discord/discord-event-filter-cases.ts +261 -261
- package/src/discord/discord-event-filters.test.ts +91 -91
- package/src/discord/discord-event-filters.ts +95 -95
- package/src/discord/discord-event-intents.test.ts +112 -112
- package/src/discord/discord-event-intents.ts +55 -55
- package/src/discord/index.ts +3 -3
- package/src/index.test.ts +87 -87
- package/src/insights/index.ts +1 -1
- package/src/insights/percentiles.test.ts +75 -75
- package/src/insights/percentiles.ts +37 -37
- package/src/types/enum/access-grant-status.enum.ts +12 -12
- package/src/types/enum/access-kind.enum.ts +7 -7
- package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
- package/src/types/enum/configuration-read-as.enum.ts +5 -5
- package/src/types/enum/discord-activity-type.enum.ts +9 -9
- package/src/types/enum/discord-channel-type.enum.ts +11 -11
- package/src/types/enum/discord-component-kind.enum.ts +7 -7
- package/src/types/enum/discord-event-drop-reason.enum.ts +13 -13
- package/src/types/enum/discord-event-filter-name.enum.ts +11 -11
- package/src/types/enum/discord-event-status.enum.ts +13 -13
- package/src/types/enum/discord-event-type.enum.ts +7 -7
- package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -11
- package/src/types/enum/discord-gateway-state.enum.ts +11 -11
- package/src/types/enum/discord-host-action.enum.ts +35 -35
- package/src/types/enum/discord-locale.enum.ts +35 -35
- package/src/types/enum/discord-option-type.enum.ts +12 -12
- package/src/types/enum/discord-presence-status.enum.ts +8 -8
- package/src/types/enum/discord-sync-status.enum.ts +6 -6
- package/src/types/enum/discord-token-state.enum.ts +11 -11
- package/src/types/enum/execution-mode.enum.ts +9 -9
- package/src/types/enum/execution-profile.enum.ts +20 -20
- package/src/types/enum/execution-settings-source.enum.ts +9 -9
- package/src/types/enum/health-status.enum.ts +4 -4
- package/src/types/enum/insights-period.enum.ts +8 -8
- package/src/types/enum/log-cap-mode.enum.ts +6 -6
- package/src/types/enum/log-drop-cause.enum.ts +8 -8
- package/src/types/enum/reflex-alert-metric.enum.ts +5 -5
- package/src/types/enum/reflex-alert-notification-state.enum.ts +6 -6
- package/src/types/enum/reflex-alert-scope.enum.ts +6 -6
- package/src/types/enum/reflex-error-code.enum.ts +43 -43
- package/src/types/enum/route-method.enum.ts +9 -9
- package/src/types/enum/run-log-level.enum.ts +6 -6
- package/src/types/enum/run-mode.enum.ts +11 -11
- package/src/types/enum/run-status.enum.ts +11 -11
- package/src/types/enum/run-step-status.enum.ts +7 -7
- package/src/types/enum/schedule-sync-status.enum.ts +6 -6
- package/src/types/enum/scheduled-run-failure-code.enum.ts +12 -12
- package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
- package/src/types/enum/scheduled-run-status.enum.ts +17 -17
- package/src/types/enum/service-deployment-action.enum.ts +11 -11
- package/src/types/enum/service-deployment-status.enum.ts +5 -5
- package/src/types/enum/service-type.enum.ts +9 -9
- package/src/types/enum/service-version-change-kind.enum.ts +6 -6
- package/src/types/enum/trace-effect-type.enum.ts +12 -12
- package/src/types/enum/trigger-access-mode.enum.ts +12 -12
- package/src/types/enum/trigger-kind.enum.ts +8 -8
- package/src/types/enum/vault-value-source.enum.ts +12 -12
- package/src/types/enum/vault-visibility.enum.ts +5 -5
- package/src/types/index.ts +2 -2
- package/src/types/interface/api/index.ts +3 -3
- package/src/types/interface/api/response.ts +4 -4
- package/src/types/interface/api/responses/service-version.response.ts +6 -0
- package/src/types/interface/health.response.ts +7 -7
- package/src/types/interface/index.ts +3 -3
- package/tsconfig.check.json +15 -15
- package/tsconfig.json +35 -35
|
@@ -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
|
-
/**
|
|
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
|
+
}
|