@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.
- package/dist/api/code-environment.api.d.ts +2 -0
- package/dist/api/code-environment.api.js +7 -0
- package/dist/api/code-environment.api.js.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/service-template.api.d.ts +2 -0
- package/dist/api/service-template.api.js +7 -0
- package/dist/api/service-template.api.js.map +1 -0
- package/dist/code/index.d.ts +1 -0
- package/dist/code/index.js +18 -0
- package/dist/code/index.js.map +1 -0
- package/dist/code/reflex-code-declarations.d.ts +1 -0
- package/dist/code/reflex-code-declarations.js +644 -0
- package/dist/code/reflex-code-declarations.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/types/enum/index.d.ts +4 -0
- package/dist/types/enum/index.js +4 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/reflex-code-diagnostic-category.enum.d.ts +6 -0
- package/dist/types/enum/reflex-code-diagnostic-category.enum.js +11 -0
- package/dist/types/enum/reflex-code-diagnostic-category.enum.js.map +1 -0
- package/dist/types/enum/reflex-error-code.enum.d.ts +1 -0
- package/dist/types/enum/reflex-error-code.enum.js +1 -0
- package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
- package/dist/types/enum/service-template-follow-up-kind.enum.d.ts +10 -0
- package/dist/types/enum/service-template-follow-up-kind.enum.js +15 -0
- package/dist/types/enum/service-template-follow-up-kind.enum.js.map +1 -0
- package/dist/types/enum/service-template-id.enum.d.ts +10 -0
- package/dist/types/enum/service-template-id.enum.js +15 -0
- package/dist/types/enum/service-template-id.enum.js.map +1 -0
- package/dist/types/enum/service-template-parameter-kind.enum.d.ts +4 -0
- package/dist/types/enum/service-template-parameter-kind.enum.js +9 -0
- package/dist/types/enum/service-template-parameter-kind.enum.js.map +1 -0
- package/dist/types/enum/trigger-access-mode.enum.d.ts +2 -1
- package/dist/types/enum/trigger-access-mode.enum.js +1 -0
- package/dist/types/enum/trigger-access-mode.enum.js.map +1 -1
- package/dist/types/interface/api/requests/code-environment.request.d.ts +3 -0
- package/dist/types/interface/api/requests/code-environment.request.js +3 -0
- package/dist/types/interface/api/requests/code-environment.request.js.map +1 -0
- package/dist/types/interface/api/requests/index.d.ts +2 -0
- package/dist/types/interface/api/requests/index.js +2 -0
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/service-template.request.d.ts +3 -0
- package/dist/types/interface/api/requests/service-template.request.js +3 -0
- package/dist/types/interface/api/requests/service-template.request.js.map +1 -0
- package/dist/types/interface/api/requests/service.request.d.ts +2 -1
- package/dist/types/interface/api/responses/code-environment.response.d.ts +6 -0
- package/dist/types/interface/api/responses/code-environment.response.js +3 -0
- package/dist/types/interface/api/responses/code-environment.response.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +2 -0
- package/dist/types/interface/api/responses/index.js +2 -0
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/service-template.response.d.ts +6 -0
- package/dist/types/interface/api/responses/service-template.response.js +3 -0
- package/dist/types/interface/api/responses/service-template.response.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +3 -0
- package/dist/types/interface/models/index.js +3 -0
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/reflex-code-diagnostic.model.d.ts +10 -0
- package/dist/types/interface/models/reflex-code-diagnostic.model.js +5 -0
- package/dist/types/interface/models/reflex-code-diagnostic.model.js.map +1 -0
- package/dist/types/interface/models/reflex-code-environment.model.d.ts +9 -0
- package/dist/types/interface/models/reflex-code-environment.model.js +3 -0
- package/dist/types/interface/models/reflex-code-environment.model.js.map +1 -0
- package/dist/types/interface/models/reflex-service-template.model.d.ts +33 -0
- package/dist/types/interface/models/reflex-service-template.model.js +3 -0
- package/dist/types/interface/models/reflex-service-template.model.js.map +1 -0
- package/package.json +1 -1
- package/src/api/application-run-settings.api.test.ts +62 -62
- package/src/api/code-environment.api.ts +15 -0
- package/src/api/function-run.api.ts +53 -53
- package/src/api/function-settings.api.ts +96 -96
- package/src/api/function.api.test.ts +346 -346
- package/src/api/index.ts +2 -0
- package/src/api/service-route.api.ts +74 -74
- package/src/api/service-template.api.test.ts +41 -0
- package/src/api/service-template.api.ts +12 -0
- package/src/api/service.api.test.ts +220 -220
- package/src/api/storage-surplus.admin.api.test.ts +66 -66
- package/src/api/storage-surplus.admin.api.ts +45 -45
- package/src/code/index.ts +1 -0
- package/src/code/reflex-code-declarations.ts +646 -0
- package/src/index.ts +497 -480
- 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/access-request-status.enum.ts +11 -11
- package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
- package/src/types/enum/completion-delivery-status.enum.ts +9 -9
- 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-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/index.ts +55 -51
- 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-code-diagnostic-category.enum.ts +11 -0
- package/src/types/enum/reflex-error-code.enum.ts +93 -88
- 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 +16 -16
- 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 +14 -14
- 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-block-reason.enum.ts +13 -13
- 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-template-follow-up-kind.enum.ts +19 -0
- package/src/types/enum/service-template-id.enum.ts +19 -0
- package/src/types/enum/service-template-parameter-kind.enum.ts +7 -0
- 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 +4 -0
- 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/requests/alert-rule.request.ts +53 -53
- package/src/types/interface/api/requests/application-insights.request.ts +18 -18
- package/src/types/interface/api/requests/application-run-settings.request.ts +13 -13
- package/src/types/interface/api/requests/code-environment.request.ts +3 -0
- package/src/types/interface/api/requests/function-access.request.ts +51 -51
- package/src/types/interface/api/requests/function-run.request.ts +42 -42
- package/src/types/interface/api/requests/function-settings.request.ts +50 -50
- package/src/types/interface/api/requests/function-template.request.ts +29 -29
- package/src/types/interface/api/requests/function-test.request.ts +44 -44
- package/src/types/interface/api/requests/function-version.request.ts +38 -38
- package/src/types/interface/api/requests/function.request.ts +36 -36
- package/src/types/interface/api/requests/index.ts +27 -25
- package/src/types/interface/api/requests/route-stats.request.ts +22 -22
- package/src/types/interface/api/requests/service-completion-webhook.request.ts +11 -11
- package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
- package/src/types/interface/api/requests/service-consumer.request.ts +51 -51
- package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
- package/src/types/interface/api/requests/service-discord-event.request.ts +68 -68
- package/src/types/interface/api/requests/service-insights.request.ts +31 -31
- package/src/types/interface/api/requests/service-limits.request.ts +28 -28
- package/src/types/interface/api/requests/service-openapi.request.ts +10 -10
- package/src/types/interface/api/requests/service-route.request.ts +52 -52
- package/src/types/interface/api/requests/service-task.request.ts +80 -80
- package/src/types/interface/api/requests/service-template.request.ts +3 -0
- package/src/types/interface/api/requests/service-version.request.ts +24 -24
- package/src/types/interface/api/requests/service.request.ts +54 -48
- package/src/types/interface/api/requests/storage-surplus.admin.request.ts +12 -12
- package/src/types/interface/api/response.ts +4 -4
- package/src/types/interface/api/responses/alert-rule.response.ts +24 -24
- package/src/types/interface/api/responses/application-insights.response.ts +11 -11
- package/src/types/interface/api/responses/application-run-settings.response.ts +8 -8
- package/src/types/interface/api/responses/code-environment.response.ts +7 -0
- package/src/types/interface/api/responses/function-access.response.ts +45 -45
- package/src/types/interface/api/responses/function-run.response.ts +23 -23
- package/src/types/interface/api/responses/function-settings.response.ts +57 -57
- package/src/types/interface/api/responses/function-template.response.ts +21 -21
- package/src/types/interface/api/responses/function-test.response.ts +19 -19
- package/src/types/interface/api/responses/function-version.response.ts +42 -42
- package/src/types/interface/api/responses/function.response.ts +25 -25
- package/src/types/interface/api/responses/index.ts +27 -25
- package/src/types/interface/api/responses/route-stats.response.ts +15 -15
- package/src/types/interface/api/responses/service-completion-webhook.response.ts +13 -13
- package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
- package/src/types/interface/api/responses/service-consumer.response.ts +33 -33
- package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
- package/src/types/interface/api/responses/service-discord-event.response.ts +24 -24
- package/src/types/interface/api/responses/service-discord.response.ts +110 -110
- package/src/types/interface/api/responses/service-insights.response.ts +11 -11
- package/src/types/interface/api/responses/service-limits.response.ts +13 -13
- package/src/types/interface/api/responses/service-openapi.response.ts +7 -7
- package/src/types/interface/api/responses/service-route.response.ts +2 -2
- package/src/types/interface/api/responses/service-task.response.ts +57 -57
- package/src/types/interface/api/responses/service-template.response.ts +8 -0
- package/src/types/interface/api/responses/service-version.response.ts +112 -112
- package/src/types/interface/api/responses/service.response.ts +31 -31
- package/src/types/interface/api/responses/storage-surplus.admin.response.ts +10 -10
- package/src/types/interface/health.response.ts +7 -7
- package/src/types/interface/index.ts +3 -3
- package/src/types/interface/models/index.ts +32 -29
- package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
- package/src/types/interface/models/reflex-access-request.model.ts +15 -15
- package/src/types/interface/models/reflex-alert-rule.model.ts +56 -56
- package/src/types/interface/models/reflex-bot-limits.model.ts +53 -53
- package/src/types/interface/models/reflex-code-diagnostic.model.ts +15 -0
- package/src/types/interface/models/reflex-code-environment.model.ts +17 -0
- package/src/types/interface/models/reflex-completion-webhook.model.ts +111 -111
- package/src/types/interface/models/reflex-consumer.model.ts +50 -50
- package/src/types/interface/models/reflex-definition.model.ts +31 -31
- package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -58
- package/src/types/interface/models/reflex-discord-event.model.ts +79 -79
- package/src/types/interface/models/reflex-execution-settings.model.ts +57 -57
- package/src/types/interface/models/reflex-function-template.model.ts +18 -18
- package/src/types/interface/models/reflex-function-version.model.ts +19 -19
- package/src/types/interface/models/reflex-function.model.ts +30 -30
- package/src/types/interface/models/reflex-insights.model.ts +215 -215
- package/src/types/interface/models/reflex-route-contract.model.ts +46 -46
- package/src/types/interface/models/reflex-route.model.ts +23 -23
- package/src/types/interface/models/reflex-run-retention.model.ts +24 -24
- package/src/types/interface/models/reflex-run-settings.model.ts +39 -39
- package/src/types/interface/models/reflex-run.model.ts +309 -309
- package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
- package/src/types/interface/models/reflex-service-deployment.model.ts +48 -48
- package/src/types/interface/models/reflex-service-limits.model.ts +92 -92
- package/src/types/interface/models/reflex-service-template.model.ts +55 -0
- package/src/types/interface/models/reflex-service-version.model.ts +64 -64
- package/src/types/interface/models/reflex-service.model.ts +47 -47
- package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
- package/src/types/interface/models/reflex-storage-surplus.model.ts +23 -23
- package/src/types/interface/models/reflex-task.model.ts +97 -97
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** What a member still has to do after creating a Service from a template, before publishing it. */
|
|
2
|
+
export enum ServiceTemplateFollowUpKind {
|
|
3
|
+
/** Set the configuration value named by `key` (read by the code as `config.<key>`). */
|
|
4
|
+
CONFIG_VALUE = 'CONFIG_VALUE',
|
|
5
|
+
/** Set the secret named by `key` (read by the code as `secrets.<key>`). */
|
|
6
|
+
SECRET_VALUE = 'SECRET_VALUE',
|
|
7
|
+
/** Grant the accesses the functions declare. */
|
|
8
|
+
GRANT_ACCESSES = 'GRANT_ACCESSES',
|
|
9
|
+
/** Connect the Discord bot to the Service. */
|
|
10
|
+
CONNECT_BOT = 'CONNECT_BOT',
|
|
11
|
+
/** Create an API key for a consumer: the routes protected by a key refuse every call until then. */
|
|
12
|
+
CREATE_API_KEY = 'CREATE_API_KEY',
|
|
13
|
+
/** Reveal the signing secret of the route and paste it in the settings of the GitHub webhook. */
|
|
14
|
+
PASTE_GITHUB_SECRET = 'PASTE_GITHUB_SECRET',
|
|
15
|
+
/** Put the role of the bot above the role it gives, in the Discord server settings. */
|
|
16
|
+
BOT_ROLE_ABOVE = 'BOT_ROLE_ABOVE',
|
|
17
|
+
/** The template writes to the Store at every message it counts: read the cost before publishing. */
|
|
18
|
+
STORE_WRITE_PER_MESSAGE = 'STORE_WRITE_PER_MESSAGE',
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** A starter template of a Service: what `POST /service/:applicationId` creates from when it carries `template`. */
|
|
2
|
+
export enum ServiceTemplateId {
|
|
3
|
+
/** HTTP_API: counts visits per day and in total, and reports the last 30 days. */
|
|
4
|
+
VISIT_LOG = 'visit-log',
|
|
5
|
+
/** HTTP_API: relays the events of a GitHub repository to a Discord webhook. */
|
|
6
|
+
GITHUB_TO_DISCORD = 'github-to-discord',
|
|
7
|
+
/** DISCORD_BOT: private ticket channels opened by `/ticket` and closed by a button. */
|
|
8
|
+
TICKETS = 'tickets',
|
|
9
|
+
/** DISCORD_BOT: a role and a message for each member who joins. */
|
|
10
|
+
WELCOME = 'welcome',
|
|
11
|
+
/** DISCORD_BOT: `/sondage` with buttons, one vote per member. */
|
|
12
|
+
BUTTON_POLL = 'button-poll',
|
|
13
|
+
/** DISCORD_BOT: `/rappel` sends a private message after a delay. */
|
|
14
|
+
REMINDERS = 'reminders',
|
|
15
|
+
/** FUNCTIONS: checks a site every five minutes and alerts a Discord webhook when it changes state. */
|
|
16
|
+
SITE_CHECK = 'site-check',
|
|
17
|
+
/** DISCORD_BOT: experience and levels earned by talking, `/rang` and `/classement`. */
|
|
18
|
+
LEVELS_XP = 'levels-xp',
|
|
19
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/** The kind of effect one trace entry records. */
|
|
2
|
-
export enum TraceEffectType {
|
|
3
|
-
/**
|
|
4
|
-
* An evaluation of expressions or code. Only in test runs recorded before Reflex lot 0 (#773), which
|
|
5
|
-
* the retention still keeps: evaluations now happen inside the runner's isolate and are not traced.
|
|
6
|
-
*/
|
|
7
|
-
EVALUATE = 'EVALUATE',
|
|
8
|
-
/** An HTTP call: an HTTP step or `fetch()`. */
|
|
9
|
-
HTTP = 'HTTP',
|
|
10
|
-
/** A call to the host: `store.*`, `secret.get`, `http.respond`, `wait` (its `action`). */
|
|
11
|
-
HOST = 'HOST',
|
|
12
|
-
}
|
|
1
|
+
/** The kind of effect one trace entry records. */
|
|
2
|
+
export enum TraceEffectType {
|
|
3
|
+
/**
|
|
4
|
+
* An evaluation of expressions or code. Only in test runs recorded before Reflex lot 0 (#773), which
|
|
5
|
+
* the retention still keeps: evaluations now happen inside the runner's isolate and are not traced.
|
|
6
|
+
*/
|
|
7
|
+
EVALUATE = 'EVALUATE',
|
|
8
|
+
/** An HTTP call: an HTTP step or `fetch()`. */
|
|
9
|
+
HTTP = 'HTTP',
|
|
10
|
+
/** A call to the host: `store.*`, `secret.get`, `http.respond`, `wait` (its `action`). */
|
|
11
|
+
HOST = 'HOST',
|
|
12
|
+
}
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
* - API_KEY: the caller sends the key in `x-api-key`.
|
|
5
5
|
* - SIGNATURE: the caller signs the raw body: `x-reflex-signature: sha256=<hex HMAC-SHA256(secret,
|
|
6
6
|
* "<timestamp>." + body)>` with `x-reflex-timestamp` in Unix seconds, within 300 s of the edge's clock.
|
|
7
|
+
* - GITHUB_SIGNATURE: the caller is GitHub (or signs like it): `X-Hub-Signature-256: sha256=<hex
|
|
8
|
+
* HMAC-SHA256(secret, raw body)>`. There is no timestamp, so no replay window: a function that must not
|
|
9
|
+
* process a delivery twice deduplicates with the `X-GitHub-Delivery` header.
|
|
7
10
|
*/
|
|
8
11
|
export enum TriggerAccessMode {
|
|
9
12
|
PUBLIC = 'PUBLIC',
|
|
10
13
|
API_KEY = 'API_KEY',
|
|
11
14
|
SIGNATURE = 'SIGNATURE',
|
|
15
|
+
GITHUB_SIGNATURE = 'GITHUB_SIGNATURE',
|
|
12
16
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/** What started an execution of a Service. */
|
|
2
|
-
export enum TriggerKind {
|
|
3
|
-
COMMAND = 'COMMAND',
|
|
4
|
-
COMPONENT = 'COMPONENT',
|
|
5
|
-
EVENT = 'EVENT',
|
|
6
|
-
TASK = 'TASK',
|
|
7
|
-
ROUTE = 'ROUTE',
|
|
8
|
-
}
|
|
1
|
+
/** What started an execution of a Service. */
|
|
2
|
+
export enum TriggerKind {
|
|
3
|
+
COMMAND = 'COMMAND',
|
|
4
|
+
COMPONENT = 'COMPONENT',
|
|
5
|
+
EVENT = 'EVENT',
|
|
6
|
+
TASK = 'TASK',
|
|
7
|
+
ROUTE = 'ROUTE',
|
|
8
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Where the value a Console vault entry gives to an environment comes from, in the order of the
|
|
3
|
-
* resolution: the value of the environment, the entry's default value, the value of the entry's default
|
|
4
|
-
* environment, or nothing (the entry is absent for the environment). Mirrors Console's enum of the
|
|
5
|
-
* same name, so the SDK needs no dependency on it.
|
|
6
|
-
*/
|
|
7
|
-
export enum VaultValueSource {
|
|
8
|
-
ENVIRONMENT = 'ENVIRONMENT',
|
|
9
|
-
DEFAULT = 'DEFAULT',
|
|
10
|
-
DEFAULT_ENVIRONMENT = 'DEFAULT_ENVIRONMENT',
|
|
11
|
-
ABSENT = 'ABSENT',
|
|
12
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Where the value a Console vault entry gives to an environment comes from, in the order of the
|
|
3
|
+
* resolution: the value of the environment, the entry's default value, the value of the entry's default
|
|
4
|
+
* environment, or nothing (the entry is absent for the environment). Mirrors Console's enum of the
|
|
5
|
+
* same name, so the SDK needs no dependency on it.
|
|
6
|
+
*/
|
|
7
|
+
export enum VaultValueSource {
|
|
8
|
+
ENVIRONMENT = 'ENVIRONMENT',
|
|
9
|
+
DEFAULT = 'DEFAULT',
|
|
10
|
+
DEFAULT_ENVIRONMENT = 'DEFAULT_ENVIRONMENT',
|
|
11
|
+
ABSENT = 'ABSENT',
|
|
12
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** Whether a Console vault entry hides its value. Mirrors Console's `SecretVisibility`. */
|
|
2
|
-
export enum VaultVisibility {
|
|
3
|
-
SECRET = 'SECRET',
|
|
4
|
-
VISIBLE = 'VISIBLE',
|
|
5
|
-
}
|
|
1
|
+
/** Whether a Console vault entry hides its value. Mirrors Console's `SecretVisibility`. */
|
|
2
|
+
export enum VaultVisibility {
|
|
3
|
+
SECRET = 'SECRET',
|
|
4
|
+
VISIBLE = 'VISIBLE',
|
|
5
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './enum';
|
|
2
|
-
export * from './interface';
|
|
1
|
+
export * from './enum';
|
|
2
|
+
export * from './interface';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './response';
|
|
2
|
-
export * from './requests';
|
|
3
|
-
export * from './responses';
|
|
1
|
+
export * from './response';
|
|
2
|
+
export * from './requests';
|
|
3
|
+
export * from './responses';
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import type { ReflexAlertMetric, ReflexAlertScope } from '../../../enum';
|
|
2
|
-
|
|
3
|
-
export interface IListAlertRuleParams {
|
|
4
|
-
applicationId: string;
|
|
5
|
-
}
|
|
6
|
-
export interface IListAlertRuleQuery {
|
|
7
|
-
/** Only the rules of this environment of the application (abyss-main's id). */
|
|
8
|
-
environmentId?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface ICreateAlertRuleParams {
|
|
12
|
-
applicationId: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ICreateAlertRuleBody {
|
|
15
|
-
/** The environment the rule watches (abyss-main's id). */
|
|
16
|
-
environmentId: string;
|
|
17
|
-
scope: ReflexAlertScope;
|
|
18
|
-
/** Required for the scopes SERVICE and ROUTE; forbidden for FUNCTION. */
|
|
19
|
-
serviceId?: string;
|
|
20
|
-
/** Required for the scope ROUTE; forbidden otherwise. */
|
|
21
|
-
routeId?: string;
|
|
22
|
-
/** Required for the scope FUNCTION; forbidden otherwise. */
|
|
23
|
-
functionId?: string;
|
|
24
|
-
metric: ReflexAlertMetric;
|
|
25
|
-
/** Within the bounds of the metric (`REFLEX_ALERT_RULE_LIMITS.threshold`). */
|
|
26
|
-
threshold: number;
|
|
27
|
-
/** One of `REFLEX_ALERT_RULE_LIMITS.windowMinutes`. */
|
|
28
|
-
windowMinutes: number;
|
|
29
|
-
/** `REFLEX_ALERT_RULE_LIMITS.minRuns.default` when omitted. */
|
|
30
|
-
minRuns?: number;
|
|
31
|
-
/** True when omitted. */
|
|
32
|
-
enabled?: boolean;
|
|
33
|
-
/** 1 to 64 characters. */
|
|
34
|
-
name: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface IUpdateAlertRuleParams {
|
|
38
|
-
applicationId: string;
|
|
39
|
-
ruleId: string;
|
|
40
|
-
}
|
|
41
|
-
/** The environment, the scope, the target and the metric of a rule never change. Every value is required. */
|
|
42
|
-
export interface IUpdateAlertRuleBody {
|
|
43
|
-
threshold: number;
|
|
44
|
-
windowMinutes: number;
|
|
45
|
-
minRuns: number;
|
|
46
|
-
enabled: boolean;
|
|
47
|
-
name: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface IDeleteAlertRuleParams {
|
|
51
|
-
applicationId: string;
|
|
52
|
-
ruleId: string;
|
|
53
|
-
}
|
|
1
|
+
import type { ReflexAlertMetric, ReflexAlertScope } from '../../../enum';
|
|
2
|
+
|
|
3
|
+
export interface IListAlertRuleParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IListAlertRuleQuery {
|
|
7
|
+
/** Only the rules of this environment of the application (abyss-main's id). */
|
|
8
|
+
environmentId?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ICreateAlertRuleParams {
|
|
12
|
+
applicationId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ICreateAlertRuleBody {
|
|
15
|
+
/** The environment the rule watches (abyss-main's id). */
|
|
16
|
+
environmentId: string;
|
|
17
|
+
scope: ReflexAlertScope;
|
|
18
|
+
/** Required for the scopes SERVICE and ROUTE; forbidden for FUNCTION. */
|
|
19
|
+
serviceId?: string;
|
|
20
|
+
/** Required for the scope ROUTE; forbidden otherwise. */
|
|
21
|
+
routeId?: string;
|
|
22
|
+
/** Required for the scope FUNCTION; forbidden otherwise. */
|
|
23
|
+
functionId?: string;
|
|
24
|
+
metric: ReflexAlertMetric;
|
|
25
|
+
/** Within the bounds of the metric (`REFLEX_ALERT_RULE_LIMITS.threshold`). */
|
|
26
|
+
threshold: number;
|
|
27
|
+
/** One of `REFLEX_ALERT_RULE_LIMITS.windowMinutes`. */
|
|
28
|
+
windowMinutes: number;
|
|
29
|
+
/** `REFLEX_ALERT_RULE_LIMITS.minRuns.default` when omitted. */
|
|
30
|
+
minRuns?: number;
|
|
31
|
+
/** True when omitted. */
|
|
32
|
+
enabled?: boolean;
|
|
33
|
+
/** 1 to 64 characters. */
|
|
34
|
+
name: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface IUpdateAlertRuleParams {
|
|
38
|
+
applicationId: string;
|
|
39
|
+
ruleId: string;
|
|
40
|
+
}
|
|
41
|
+
/** The environment, the scope, the target and the metric of a rule never change. Every value is required. */
|
|
42
|
+
export interface IUpdateAlertRuleBody {
|
|
43
|
+
threshold: number;
|
|
44
|
+
windowMinutes: number;
|
|
45
|
+
minRuns: number;
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
name: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface IDeleteAlertRuleParams {
|
|
51
|
+
applicationId: string;
|
|
52
|
+
ruleId: string;
|
|
53
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { InsightsPeriod } from '../../../enum';
|
|
2
|
-
|
|
3
|
-
export interface IGetApplicationInsightsParams {
|
|
4
|
-
applicationId: string;
|
|
5
|
-
}
|
|
6
|
-
export interface IGetApplicationInsightsQuery {
|
|
7
|
-
/** The environment of the application (abyss-main's id). */
|
|
8
|
-
environmentId: string;
|
|
9
|
-
period: InsightsPeriod;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface IGetApplicationCalendarParams {
|
|
13
|
-
applicationId: string;
|
|
14
|
-
}
|
|
15
|
-
export interface IGetApplicationCalendarQuery {
|
|
16
|
-
/** The environment of the application (abyss-main's id). */
|
|
17
|
-
environmentId: string;
|
|
18
|
-
}
|
|
1
|
+
import type { InsightsPeriod } from '../../../enum';
|
|
2
|
+
|
|
3
|
+
export interface IGetApplicationInsightsParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IGetApplicationInsightsQuery {
|
|
7
|
+
/** The environment of the application (abyss-main's id). */
|
|
8
|
+
environmentId: string;
|
|
9
|
+
period: InsightsPeriod;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface IGetApplicationCalendarParams {
|
|
13
|
+
applicationId: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IGetApplicationCalendarQuery {
|
|
16
|
+
/** The environment of the application (abyss-main's id). */
|
|
17
|
+
environmentId: string;
|
|
18
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export interface IGetApplicationRunSettingsParams {
|
|
2
|
-
applicationId: string;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export interface ISetApplicationRunSettingsParams {
|
|
6
|
-
applicationId: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ISetApplicationRunSettingsBody {
|
|
9
|
-
/** Cap of log lines per run, 1 to 10 000; null for no cap. */
|
|
10
|
-
maxLogLinesPerRun: number | null;
|
|
11
|
-
/** The retention tier of the runs, one of `REFLEX_RUN_RETENTION_TIER_DAYS`; null to follow the plan. Left alone when absent. */
|
|
12
|
-
runRetentionDays?: number | null;
|
|
13
|
-
}
|
|
1
|
+
export interface IGetApplicationRunSettingsParams {
|
|
2
|
+
applicationId: string;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface ISetApplicationRunSettingsParams {
|
|
6
|
+
applicationId: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ISetApplicationRunSettingsBody {
|
|
9
|
+
/** Cap of log lines per run, 1 to 10 000; null for no cap. */
|
|
10
|
+
maxLogLinesPerRun: number | null;
|
|
11
|
+
/** The retention tier of the runs, one of `REFLEX_RUN_RETENTION_TIER_DAYS`; null to follow the plan. Left alone when absent. */
|
|
12
|
+
runRetentionDays?: number | null;
|
|
13
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import type { IReflexAccessDeclaration } from '../../models';
|
|
2
|
-
|
|
3
|
-
export interface IListFunctionAccessParams {
|
|
4
|
-
applicationId: string;
|
|
5
|
-
functionId: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface IGrantFunctionAccessParams {
|
|
9
|
-
applicationId: string;
|
|
10
|
-
functionId: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The declaration must be one the draft makes. The member who grants must hold the right the access
|
|
14
|
-
* needs: REFLEX_FUNCTION_UPDATE for hosts, STORAGE_STORE_READ (`store.get`) or STORAGE_STORE_UPDATE
|
|
15
|
-
* (`store.set`, `store.increment`) for the Store, SECRET_READ on the project for `secret.get`.
|
|
16
|
-
*/
|
|
17
|
-
export interface IGrantFunctionAccessBody {
|
|
18
|
-
declaration: IReflexAccessDeclaration;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface IRevokeFunctionAccessParams {
|
|
22
|
-
applicationId: string;
|
|
23
|
-
functionId: string;
|
|
24
|
-
grantId: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface IGrantAllFunctionAccessParams {
|
|
28
|
-
applicationId: string;
|
|
29
|
-
functionId: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface IRequestFunctionAccessParams {
|
|
33
|
-
applicationId: string;
|
|
34
|
-
functionId: string;
|
|
35
|
-
}
|
|
36
|
-
/** The declaration must be one the saved draft makes (`409 ACCESS_NOT_DECLARED` otherwise). */
|
|
37
|
-
export interface IRequestFunctionAccessBody {
|
|
38
|
-
declaration: IReflexAccessDeclaration;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface IGrantFunctionAccessRequestParams {
|
|
42
|
-
applicationId: string;
|
|
43
|
-
functionId: string;
|
|
44
|
-
requestId: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface IDismissFunctionAccessRequestParams {
|
|
48
|
-
applicationId: string;
|
|
49
|
-
functionId: string;
|
|
50
|
-
requestId: string;
|
|
51
|
-
}
|
|
1
|
+
import type { IReflexAccessDeclaration } from '../../models';
|
|
2
|
+
|
|
3
|
+
export interface IListFunctionAccessParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
functionId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IGrantFunctionAccessParams {
|
|
9
|
+
applicationId: string;
|
|
10
|
+
functionId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The declaration must be one the draft makes. The member who grants must hold the right the access
|
|
14
|
+
* needs: REFLEX_FUNCTION_UPDATE for hosts, STORAGE_STORE_READ (`store.get`) or STORAGE_STORE_UPDATE
|
|
15
|
+
* (`store.set`, `store.increment`) for the Store, SECRET_READ on the project for `secret.get`.
|
|
16
|
+
*/
|
|
17
|
+
export interface IGrantFunctionAccessBody {
|
|
18
|
+
declaration: IReflexAccessDeclaration;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IRevokeFunctionAccessParams {
|
|
22
|
+
applicationId: string;
|
|
23
|
+
functionId: string;
|
|
24
|
+
grantId: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IGrantAllFunctionAccessParams {
|
|
28
|
+
applicationId: string;
|
|
29
|
+
functionId: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface IRequestFunctionAccessParams {
|
|
33
|
+
applicationId: string;
|
|
34
|
+
functionId: string;
|
|
35
|
+
}
|
|
36
|
+
/** The declaration must be one the saved draft makes (`409 ACCESS_NOT_DECLARED` otherwise). */
|
|
37
|
+
export interface IRequestFunctionAccessBody {
|
|
38
|
+
declaration: IReflexAccessDeclaration;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface IGrantFunctionAccessRequestParams {
|
|
42
|
+
applicationId: string;
|
|
43
|
+
functionId: string;
|
|
44
|
+
requestId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface IDismissFunctionAccessRequestParams {
|
|
48
|
+
applicationId: string;
|
|
49
|
+
functionId: string;
|
|
50
|
+
requestId: string;
|
|
51
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import type { RunMode } from '../../../enum';
|
|
2
|
-
|
|
3
|
-
export interface IListFunctionRunParams {
|
|
4
|
-
applicationId: string;
|
|
5
|
-
functionId: string;
|
|
6
|
-
}
|
|
7
|
-
export interface IListFunctionRunQuery {
|
|
8
|
-
mode?: RunMode;
|
|
9
|
-
/** 1 to 100, 50 by default. */
|
|
10
|
-
limit?: number;
|
|
11
|
-
/** Runs skipped, newest first; 0 by default. */
|
|
12
|
-
offset?: number;
|
|
13
|
-
/** Only the live runs this task started (a tick of its cron or a delayed run); test runs have no task. */
|
|
14
|
-
taskId?: string;
|
|
15
|
-
/** Only the runs of this environment of the application (abyss-main's id). */
|
|
16
|
-
environmentId?: string;
|
|
17
|
-
/** Only the live runs this consumer of the Service called; test runs have no consumer. */
|
|
18
|
-
consumerId?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface IGetFunctionRunParams {
|
|
22
|
-
applicationId: string;
|
|
23
|
-
functionId: string;
|
|
24
|
-
runId: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface IGetFunctionRunStateParams {
|
|
28
|
-
applicationId: string;
|
|
29
|
-
functionId: string;
|
|
30
|
-
/** The `executionId` an async route answered with: the id of the live run. */
|
|
31
|
-
runId: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface ISetFunctionRunFavoriteParams {
|
|
35
|
-
applicationId: string;
|
|
36
|
-
functionId: string;
|
|
37
|
-
runId: string;
|
|
38
|
-
}
|
|
39
|
-
export interface ISetFunctionRunFavoriteBody {
|
|
40
|
-
/** A favorite run is never purged. */
|
|
41
|
-
isFavorite: boolean;
|
|
42
|
-
}
|
|
1
|
+
import type { RunMode } from '../../../enum';
|
|
2
|
+
|
|
3
|
+
export interface IListFunctionRunParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
functionId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IListFunctionRunQuery {
|
|
8
|
+
mode?: RunMode;
|
|
9
|
+
/** 1 to 100, 50 by default. */
|
|
10
|
+
limit?: number;
|
|
11
|
+
/** Runs skipped, newest first; 0 by default. */
|
|
12
|
+
offset?: number;
|
|
13
|
+
/** Only the live runs this task started (a tick of its cron or a delayed run); test runs have no task. */
|
|
14
|
+
taskId?: string;
|
|
15
|
+
/** Only the runs of this environment of the application (abyss-main's id). */
|
|
16
|
+
environmentId?: string;
|
|
17
|
+
/** Only the live runs this consumer of the Service called; test runs have no consumer. */
|
|
18
|
+
consumerId?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IGetFunctionRunParams {
|
|
22
|
+
applicationId: string;
|
|
23
|
+
functionId: string;
|
|
24
|
+
runId: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IGetFunctionRunStateParams {
|
|
28
|
+
applicationId: string;
|
|
29
|
+
functionId: string;
|
|
30
|
+
/** The `executionId` an async route answered with: the id of the live run. */
|
|
31
|
+
runId: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ISetFunctionRunFavoriteParams {
|
|
35
|
+
applicationId: string;
|
|
36
|
+
functionId: string;
|
|
37
|
+
runId: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ISetFunctionRunFavoriteBody {
|
|
40
|
+
/** A favorite run is never purged. */
|
|
41
|
+
isFavorite: boolean;
|
|
42
|
+
}
|