@abyss-project/reflex 5.5.0 → 5.7.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/enum/reflex-error-code.enum.d.ts +3 -1
- package/dist/types/enum/reflex-error-code.enum.js +2 -0
- package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
- package/dist/types/interface/api/responses/service-discord.response.d.ts +2 -2
- package/dist/types/interface/models/reflex-discord-event.model.d.ts +1 -1
- package/dist/types/interface/models/reflex-discord-event.model.js +1 -1
- package/dist/types/interface/models/reflex-discord-event.model.js.map +1 -1
- package/jest.config.ts +11 -11
- package/package.json +1 -1
- package/src/api/function-access.api.ts +36 -36
- package/src/api/function-run.api.ts +38 -38
- package/src/api/function-settings.api.ts +59 -59
- package/src/api/function-test.api.ts +34 -34
- package/src/api/function-version.api.ts +48 -48
- package/src/api/function.api.test.ts +249 -249
- package/src/api/function.api.ts +62 -62
- package/src/api/health.api.ts +10 -10
- package/src/api/service-configuration.api.ts +16 -16
- package/src/api/service-deployment.api.ts +79 -79
- 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/types/enum/access-grant-status.enum.ts +12 -12
- package/src/types/enum/access-kind.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-component-kind.enum.ts +7 -7
- package/src/types/enum/discord-gateway-state.enum.ts +11 -11
- 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/reflex-error-code.enum.ts +43 -39
- 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-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/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/function-access.request.ts +25 -25
- package/src/types/interface/api/requests/function-run.request.ts +30 -30
- package/src/types/interface/api/requests/function-settings.request.ts +27 -27
- package/src/types/interface/api/requests/function-test.request.ts +39 -39
- package/src/types/interface/api/requests/function-version.request.ts +20 -20
- package/src/types/interface/api/requests/function.request.ts +36 -36
- package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
- package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
- package/src/types/interface/api/requests/service-route.request.ts +44 -44
- package/src/types/interface/api/requests/service-task.request.ts +80 -80
- package/src/types/interface/api/requests/service-version.request.ts +24 -24
- package/src/types/interface/api/requests/service.request.ts +46 -46
- package/src/types/interface/api/response.ts +4 -4
- package/src/types/interface/api/responses/function-access.response.ts +17 -17
- package/src/types/interface/api/responses/function-run.response.ts +18 -18
- package/src/types/interface/api/responses/function-settings.response.ts +36 -36
- package/src/types/interface/api/responses/function-test.response.ts +12 -12
- package/src/types/interface/api/responses/function-version.response.ts +31 -31
- package/src/types/interface/api/responses/function.response.ts +25 -25
- package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
- package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
- package/src/types/interface/api/responses/service-discord.response.ts +7 -4
- package/src/types/interface/api/responses/service-route.response.ts +31 -31
- package/src/types/interface/api/responses/service-task.response.ts +57 -57
- package/src/types/interface/api/responses/service.response.ts +31 -31
- package/src/types/interface/health.response.ts +7 -7
- package/src/types/interface/index.ts +3 -3
- package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
- package/src/types/interface/models/reflex-definition.model.ts +31 -31
- package/src/types/interface/models/reflex-discord-event.model.ts +7 -6
- package/src/types/interface/models/reflex-discord.model.ts +146 -146
- package/src/types/interface/models/reflex-execution-settings.model.ts +50 -50
- package/src/types/interface/models/reflex-function-version.model.ts +14 -14
- package/src/types/interface/models/reflex-function.model.ts +16 -16
- package/src/types/interface/models/reflex-price-list.model.ts +20 -20
- package/src/types/interface/models/reflex-route.model.ts +19 -19
- package/src/types/interface/models/reflex-run.model.ts +4 -1
- package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
- package/src/types/interface/models/reflex-service-deployment.model.ts +46 -46
- package/src/types/interface/models/reflex-service.model.ts +45 -45
- package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
- package/src/types/interface/models/reflex-task.model.ts +97 -97
- package/tsconfig.check.json +15 -15
- package/tsconfig.json +35 -35
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import type { IReflexServiceDeployment } from '../../models';
|
|
2
|
-
import type { IResponse } from '../response';
|
|
3
|
-
|
|
4
|
-
export interface IListServiceDeploymentData {
|
|
5
|
-
/** The current deployment of each environment. */
|
|
6
|
-
current: IReflexServiceDeployment[];
|
|
7
|
-
/** Every gesture, newest first, one page of it. */
|
|
8
|
-
history: IReflexServiceDeployment[];
|
|
9
|
-
/** Gestures in the history, every page. */
|
|
10
|
-
total: number;
|
|
11
|
-
}
|
|
12
|
-
export type IListServiceDeploymentResponse = IResponse<IListServiceDeploymentData>;
|
|
13
|
-
|
|
14
|
-
export interface IGoLiveServiceData {
|
|
15
|
-
deployment: IReflexServiceDeployment;
|
|
16
|
-
}
|
|
17
|
-
export type IGoLiveServiceResponse = IResponse<IGoLiveServiceData>;
|
|
18
|
-
|
|
19
|
-
export interface IRollbackServiceData {
|
|
20
|
-
deployment: IReflexServiceDeployment;
|
|
21
|
-
}
|
|
22
|
-
export type IRollbackServiceResponse = IResponse<IRollbackServiceData>;
|
|
23
|
-
|
|
24
|
-
export interface IPauseServiceData {
|
|
25
|
-
deployment: IReflexServiceDeployment;
|
|
26
|
-
}
|
|
27
|
-
export type IPauseServiceResponse = IResponse<IPauseServiceData>;
|
|
28
|
-
|
|
29
|
-
export interface IResumeServiceData {
|
|
30
|
-
deployment: IReflexServiceDeployment;
|
|
31
|
-
}
|
|
32
|
-
export type IResumeServiceResponse = IResponse<IResumeServiceData>;
|
|
1
|
+
import type { IReflexServiceDeployment } from '../../models';
|
|
2
|
+
import type { IResponse } from '../response';
|
|
3
|
+
|
|
4
|
+
export interface IListServiceDeploymentData {
|
|
5
|
+
/** The current deployment of each environment. */
|
|
6
|
+
current: IReflexServiceDeployment[];
|
|
7
|
+
/** Every gesture, newest first, one page of it. */
|
|
8
|
+
history: IReflexServiceDeployment[];
|
|
9
|
+
/** Gestures in the history, every page. */
|
|
10
|
+
total: number;
|
|
11
|
+
}
|
|
12
|
+
export type IListServiceDeploymentResponse = IResponse<IListServiceDeploymentData>;
|
|
13
|
+
|
|
14
|
+
export interface IGoLiveServiceData {
|
|
15
|
+
deployment: IReflexServiceDeployment;
|
|
16
|
+
}
|
|
17
|
+
export type IGoLiveServiceResponse = IResponse<IGoLiveServiceData>;
|
|
18
|
+
|
|
19
|
+
export interface IRollbackServiceData {
|
|
20
|
+
deployment: IReflexServiceDeployment;
|
|
21
|
+
}
|
|
22
|
+
export type IRollbackServiceResponse = IResponse<IRollbackServiceData>;
|
|
23
|
+
|
|
24
|
+
export interface IPauseServiceData {
|
|
25
|
+
deployment: IReflexServiceDeployment;
|
|
26
|
+
}
|
|
27
|
+
export type IPauseServiceResponse = IResponse<IPauseServiceData>;
|
|
28
|
+
|
|
29
|
+
export interface IResumeServiceData {
|
|
30
|
+
deployment: IReflexServiceDeployment;
|
|
31
|
+
}
|
|
32
|
+
export type IResumeServiceResponse = IResponse<IResumeServiceData>;
|
|
@@ -21,12 +21,15 @@ export interface IServiceDiscordEnvironmentEvents {
|
|
|
21
21
|
privilegedIntentsRequested: number[];
|
|
22
22
|
/** Since when Discord refuses the intents (`INTENTS_DISALLOWED`, close code 4014); null otherwise. */
|
|
23
23
|
intentsDisallowedSince: Date | null;
|
|
24
|
-
/**
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Events per minute, concurrency and the lots of the reserve; null while abyss-main, which holds the plan and the
|
|
26
|
+
* reserve, does not answer (the screen shows them as unknown).
|
|
27
|
+
*/
|
|
28
|
+
rate: IReflexBotEventRate | null;
|
|
26
29
|
/** Minutes above the alert percent, peak and minutes at the cap. */
|
|
27
30
|
rateExcess: IReflexBotRateExcess;
|
|
28
|
-
/** Credits of the month and the overage setting. */
|
|
29
|
-
credits: IReflexBotCredits;
|
|
31
|
+
/** Credits of the month and the overage setting; null while abyss-main does not answer. */
|
|
32
|
+
credits: IReflexBotCredits | null;
|
|
30
33
|
monthlySpendCap: IReflexBotMonthlySpendCap;
|
|
31
34
|
alerts: IReflexBotAlerts;
|
|
32
35
|
/** What stops the events at the Gateway; null when nothing does. */
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type { IReflexRoute } from '../../models';
|
|
2
|
-
import type { IResponse } from '../response';
|
|
3
|
-
|
|
4
|
-
export interface IListServiceRouteData {
|
|
5
|
-
routes: IReflexRoute[];
|
|
6
|
-
}
|
|
7
|
-
export type IListServiceRouteResponse = IResponse<IListServiceRouteData>;
|
|
8
|
-
|
|
9
|
-
export interface ICreateServiceRouteData {
|
|
10
|
-
route: IReflexRoute;
|
|
11
|
-
/** The API key (API_KEY) or the signing secret (SIGNATURE), in clear, ONCE. `null` for PUBLIC. */
|
|
12
|
-
secret: string | null;
|
|
13
|
-
}
|
|
14
|
-
export type ICreateServiceRouteResponse = IResponse<ICreateServiceRouteData>;
|
|
15
|
-
|
|
16
|
-
export interface IUpdateServiceRouteData {
|
|
17
|
-
route: IReflexRoute;
|
|
18
|
-
/** A new key or signing secret, in clear, ONCE, when the change of `accessMode` needs one; `null` otherwise. */
|
|
19
|
-
secret: string | null;
|
|
20
|
-
}
|
|
21
|
-
export type IUpdateServiceRouteResponse = IResponse<IUpdateServiceRouteData>;
|
|
22
|
-
|
|
23
|
-
export type IDeleteServiceRouteData = Record<string, never>;
|
|
24
|
-
export type IDeleteServiceRouteResponse = IResponse<IDeleteServiceRouteData>;
|
|
25
|
-
|
|
26
|
-
export interface IRotateServiceRouteData {
|
|
27
|
-
route: IReflexRoute;
|
|
28
|
-
/** The new key or signing secret, in clear, ONCE; the previous one stops working at once. */
|
|
29
|
-
secret: string;
|
|
30
|
-
}
|
|
31
|
-
export type IRotateServiceRouteResponse = IResponse<IRotateServiceRouteData>;
|
|
1
|
+
import type { IReflexRoute } from '../../models';
|
|
2
|
+
import type { IResponse } from '../response';
|
|
3
|
+
|
|
4
|
+
export interface IListServiceRouteData {
|
|
5
|
+
routes: IReflexRoute[];
|
|
6
|
+
}
|
|
7
|
+
export type IListServiceRouteResponse = IResponse<IListServiceRouteData>;
|
|
8
|
+
|
|
9
|
+
export interface ICreateServiceRouteData {
|
|
10
|
+
route: IReflexRoute;
|
|
11
|
+
/** The API key (API_KEY) or the signing secret (SIGNATURE), in clear, ONCE. `null` for PUBLIC. */
|
|
12
|
+
secret: string | null;
|
|
13
|
+
}
|
|
14
|
+
export type ICreateServiceRouteResponse = IResponse<ICreateServiceRouteData>;
|
|
15
|
+
|
|
16
|
+
export interface IUpdateServiceRouteData {
|
|
17
|
+
route: IReflexRoute;
|
|
18
|
+
/** A new key or signing secret, in clear, ONCE, when the change of `accessMode` needs one; `null` otherwise. */
|
|
19
|
+
secret: string | null;
|
|
20
|
+
}
|
|
21
|
+
export type IUpdateServiceRouteResponse = IResponse<IUpdateServiceRouteData>;
|
|
22
|
+
|
|
23
|
+
export type IDeleteServiceRouteData = Record<string, never>;
|
|
24
|
+
export type IDeleteServiceRouteResponse = IResponse<IDeleteServiceRouteData>;
|
|
25
|
+
|
|
26
|
+
export interface IRotateServiceRouteData {
|
|
27
|
+
route: IReflexRoute;
|
|
28
|
+
/** The new key or signing secret, in clear, ONCE; the previous one stops working at once. */
|
|
29
|
+
secret: string;
|
|
30
|
+
}
|
|
31
|
+
export type IRotateServiceRouteResponse = IResponse<IRotateServiceRouteData>;
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IReflexDelayedRun,
|
|
3
|
-
IReflexRun,
|
|
4
|
-
IReflexScheduledRun,
|
|
5
|
-
IReflexServiceDeployment,
|
|
6
|
-
IReflexTask,
|
|
7
|
-
} from '../../models';
|
|
8
|
-
import type { IResponse } from '../response';
|
|
9
|
-
|
|
10
|
-
export interface IListServiceTaskData {
|
|
11
|
-
/** By name. */
|
|
12
|
-
tasks: IReflexTask[];
|
|
13
|
-
}
|
|
14
|
-
export type IListServiceTaskResponse = IResponse<IListServiceTaskData>;
|
|
15
|
-
|
|
16
|
-
export interface ICreateServiceTaskData {
|
|
17
|
-
task: IReflexTask;
|
|
18
|
-
}
|
|
19
|
-
export type ICreateServiceTaskResponse = IResponse<ICreateServiceTaskData>;
|
|
20
|
-
|
|
21
|
-
export interface IUpdateServiceTaskData {
|
|
22
|
-
task: IReflexTask;
|
|
23
|
-
}
|
|
24
|
-
export type IUpdateServiceTaskResponse = IResponse<IUpdateServiceTaskData>;
|
|
25
|
-
|
|
26
|
-
export type IDeleteServiceTaskData = Record<string, never>;
|
|
27
|
-
export type IDeleteServiceTaskResponse = IResponse<IDeleteServiceTaskData>;
|
|
28
|
-
|
|
29
|
-
export interface ITestRunServiceTaskData {
|
|
30
|
-
run: IReflexRun;
|
|
31
|
-
}
|
|
32
|
-
export type ITestRunServiceTaskResponse = IResponse<ITestRunServiceTaskData>;
|
|
33
|
-
|
|
34
|
-
export interface IListServiceDelayedRunData {
|
|
35
|
-
/** The first 100 pending delayed runs of the environment, soonest due first. */
|
|
36
|
-
delayedRuns: IReflexDelayedRun[];
|
|
37
|
-
/** Pending delayed runs of the environment, all of them. */
|
|
38
|
-
total: number;
|
|
39
|
-
}
|
|
40
|
-
export type IListServiceDelayedRunResponse = IResponse<IListServiceDelayedRunData>;
|
|
41
|
-
|
|
42
|
-
export type ICancelServiceDelayedRunData = Record<string, never>;
|
|
43
|
-
export type ICancelServiceDelayedRunResponse = IResponse<ICancelServiceDelayedRunData>;
|
|
44
|
-
|
|
45
|
-
export interface IRetryServiceScheduleSyncData {
|
|
46
|
-
/** The current deployment of the environment, with the new state of the synchronization. */
|
|
47
|
-
deployment: IReflexServiceDeployment;
|
|
48
|
-
}
|
|
49
|
-
export type IRetryServiceScheduleSyncResponse = IResponse<IRetryServiceScheduleSyncData>;
|
|
50
|
-
|
|
51
|
-
export interface IListServiceTaskScheduledRunData {
|
|
52
|
-
/** The runs of the task in the environment, every status, newest due first, paged by `limit`/`offset`. */
|
|
53
|
-
scheduledRuns: IReflexScheduledRun[];
|
|
54
|
-
/** Runs of the task in the environment, all of them (kept 7 days after their end). */
|
|
55
|
-
total: number;
|
|
56
|
-
}
|
|
57
|
-
export type IListServiceTaskScheduledRunResponse = IResponse<IListServiceTaskScheduledRunData>;
|
|
1
|
+
import type {
|
|
2
|
+
IReflexDelayedRun,
|
|
3
|
+
IReflexRun,
|
|
4
|
+
IReflexScheduledRun,
|
|
5
|
+
IReflexServiceDeployment,
|
|
6
|
+
IReflexTask,
|
|
7
|
+
} from '../../models';
|
|
8
|
+
import type { IResponse } from '../response';
|
|
9
|
+
|
|
10
|
+
export interface IListServiceTaskData {
|
|
11
|
+
/** By name. */
|
|
12
|
+
tasks: IReflexTask[];
|
|
13
|
+
}
|
|
14
|
+
export type IListServiceTaskResponse = IResponse<IListServiceTaskData>;
|
|
15
|
+
|
|
16
|
+
export interface ICreateServiceTaskData {
|
|
17
|
+
task: IReflexTask;
|
|
18
|
+
}
|
|
19
|
+
export type ICreateServiceTaskResponse = IResponse<ICreateServiceTaskData>;
|
|
20
|
+
|
|
21
|
+
export interface IUpdateServiceTaskData {
|
|
22
|
+
task: IReflexTask;
|
|
23
|
+
}
|
|
24
|
+
export type IUpdateServiceTaskResponse = IResponse<IUpdateServiceTaskData>;
|
|
25
|
+
|
|
26
|
+
export type IDeleteServiceTaskData = Record<string, never>;
|
|
27
|
+
export type IDeleteServiceTaskResponse = IResponse<IDeleteServiceTaskData>;
|
|
28
|
+
|
|
29
|
+
export interface ITestRunServiceTaskData {
|
|
30
|
+
run: IReflexRun;
|
|
31
|
+
}
|
|
32
|
+
export type ITestRunServiceTaskResponse = IResponse<ITestRunServiceTaskData>;
|
|
33
|
+
|
|
34
|
+
export interface IListServiceDelayedRunData {
|
|
35
|
+
/** The first 100 pending delayed runs of the environment, soonest due first. */
|
|
36
|
+
delayedRuns: IReflexDelayedRun[];
|
|
37
|
+
/** Pending delayed runs of the environment, all of them. */
|
|
38
|
+
total: number;
|
|
39
|
+
}
|
|
40
|
+
export type IListServiceDelayedRunResponse = IResponse<IListServiceDelayedRunData>;
|
|
41
|
+
|
|
42
|
+
export type ICancelServiceDelayedRunData = Record<string, never>;
|
|
43
|
+
export type ICancelServiceDelayedRunResponse = IResponse<ICancelServiceDelayedRunData>;
|
|
44
|
+
|
|
45
|
+
export interface IRetryServiceScheduleSyncData {
|
|
46
|
+
/** The current deployment of the environment, with the new state of the synchronization. */
|
|
47
|
+
deployment: IReflexServiceDeployment;
|
|
48
|
+
}
|
|
49
|
+
export type IRetryServiceScheduleSyncResponse = IResponse<IRetryServiceScheduleSyncData>;
|
|
50
|
+
|
|
51
|
+
export interface IListServiceTaskScheduledRunData {
|
|
52
|
+
/** The runs of the task in the environment, every status, newest due first, paged by `limit`/`offset`. */
|
|
53
|
+
scheduledRuns: IReflexScheduledRun[];
|
|
54
|
+
/** Runs of the task in the environment, all of them (kept 7 days after their end). */
|
|
55
|
+
total: number;
|
|
56
|
+
}
|
|
57
|
+
export type IListServiceTaskScheduledRunResponse = IResponse<IListServiceTaskScheduledRunData>;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type { IReflexService, IReflexServiceDeployment } from '../../models';
|
|
2
|
-
import type { IResponse } from '../response';
|
|
3
|
-
|
|
4
|
-
/** A Service with what runs in each environment of the application. */
|
|
5
|
-
export interface IReflexServiceListItem extends IReflexService {
|
|
6
|
-
/** The current deployment of each environment where the Service was ever put in service. */
|
|
7
|
-
currentDeployments: IReflexServiceDeployment[];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface IListServiceData {
|
|
11
|
-
services: IReflexServiceListItem[];
|
|
12
|
-
}
|
|
13
|
-
export type IListServiceResponse = IResponse<IListServiceData>;
|
|
14
|
-
|
|
15
|
-
export interface ICreateServiceData {
|
|
16
|
-
service: IReflexService;
|
|
17
|
-
}
|
|
18
|
-
export type ICreateServiceResponse = IResponse<ICreateServiceData>;
|
|
19
|
-
|
|
20
|
-
export interface IGetServiceData {
|
|
21
|
-
service: IReflexService;
|
|
22
|
-
}
|
|
23
|
-
export type IGetServiceResponse = IResponse<IGetServiceData>;
|
|
24
|
-
|
|
25
|
-
export interface IUpdateServiceData {
|
|
26
|
-
service: IReflexService;
|
|
27
|
-
}
|
|
28
|
-
export type IUpdateServiceResponse = IResponse<IUpdateServiceData>;
|
|
29
|
-
|
|
30
|
-
export type IDeleteServiceData = Record<string, never>;
|
|
31
|
-
export type IDeleteServiceResponse = IResponse<IDeleteServiceData>;
|
|
1
|
+
import type { IReflexService, IReflexServiceDeployment } from '../../models';
|
|
2
|
+
import type { IResponse } from '../response';
|
|
3
|
+
|
|
4
|
+
/** A Service with what runs in each environment of the application. */
|
|
5
|
+
export interface IReflexServiceListItem extends IReflexService {
|
|
6
|
+
/** The current deployment of each environment where the Service was ever put in service. */
|
|
7
|
+
currentDeployments: IReflexServiceDeployment[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IListServiceData {
|
|
11
|
+
services: IReflexServiceListItem[];
|
|
12
|
+
}
|
|
13
|
+
export type IListServiceResponse = IResponse<IListServiceData>;
|
|
14
|
+
|
|
15
|
+
export interface ICreateServiceData {
|
|
16
|
+
service: IReflexService;
|
|
17
|
+
}
|
|
18
|
+
export type ICreateServiceResponse = IResponse<ICreateServiceData>;
|
|
19
|
+
|
|
20
|
+
export interface IGetServiceData {
|
|
21
|
+
service: IReflexService;
|
|
22
|
+
}
|
|
23
|
+
export type IGetServiceResponse = IResponse<IGetServiceData>;
|
|
24
|
+
|
|
25
|
+
export interface IUpdateServiceData {
|
|
26
|
+
service: IReflexService;
|
|
27
|
+
}
|
|
28
|
+
export type IUpdateServiceResponse = IResponse<IUpdateServiceData>;
|
|
29
|
+
|
|
30
|
+
export type IDeleteServiceData = Record<string, never>;
|
|
31
|
+
export type IDeleteServiceResponse = IResponse<IDeleteServiceData>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { HealthStatus } from '../enum';
|
|
2
|
-
|
|
3
|
-
/** Body of `GET /health`: `200` when both components are up, `503` with the same shape otherwise. */
|
|
4
|
-
export interface IHealthResponse {
|
|
5
|
-
database: HealthStatus;
|
|
6
|
-
redis: HealthStatus;
|
|
7
|
-
}
|
|
1
|
+
import type { HealthStatus } from '../enum';
|
|
2
|
+
|
|
3
|
+
/** Body of `GET /health`: `200` when both components are up, `503` with the same shape otherwise. */
|
|
4
|
+
export interface IHealthResponse {
|
|
5
|
+
database: HealthStatus;
|
|
6
|
+
redis: HealthStatus;
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './health.response';
|
|
2
|
-
export * from './models';
|
|
3
|
-
export * from './api';
|
|
1
|
+
export * from './health.response';
|
|
2
|
+
export * from './models';
|
|
3
|
+
export * from './api';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { AccessGrantStatus } from '../../enum';
|
|
2
|
-
import type { IReflexAccessDeclaration } from './reflex-definition.model';
|
|
3
|
-
|
|
4
|
-
export interface IReflexAccessGrant {
|
|
5
|
-
id: string;
|
|
6
|
-
functionId: string;
|
|
7
|
-
declaration: IReflexAccessDeclaration;
|
|
8
|
-
status: AccessGrantStatus;
|
|
9
|
-
grantedByUserId: string;
|
|
10
|
-
grantedAt: Date;
|
|
11
|
-
suspendedAt: Date | null;
|
|
12
|
-
revokedByUserId: string | null;
|
|
13
|
-
revokedAt: Date | null;
|
|
14
|
-
}
|
|
1
|
+
import type { AccessGrantStatus } from '../../enum';
|
|
2
|
+
import type { IReflexAccessDeclaration } from './reflex-definition.model';
|
|
3
|
+
|
|
4
|
+
export interface IReflexAccessGrant {
|
|
5
|
+
id: string;
|
|
6
|
+
functionId: string;
|
|
7
|
+
declaration: IReflexAccessDeclaration;
|
|
8
|
+
status: AccessGrantStatus;
|
|
9
|
+
grantedByUserId: string;
|
|
10
|
+
grantedAt: Date;
|
|
11
|
+
suspendedAt: Date | null;
|
|
12
|
+
revokedByUserId: string | null;
|
|
13
|
+
revokedAt: Date | null;
|
|
14
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type { ReflexAccessKind } from '../../enum';
|
|
2
|
-
|
|
3
|
-
export interface IReflexHttpAccess {
|
|
4
|
-
kind: ReflexAccessKind.HTTP;
|
|
5
|
-
hosts: string[];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface IReflexHostActionAccess {
|
|
9
|
-
kind: ReflexAccessKind.HOST_ACTION;
|
|
10
|
-
action: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type IReflexAccessDeclaration = IReflexHttpAccess | IReflexHostActionAccess;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* A function's definition, in the format of @abyss-project/runtime (`formatVersion` 1). The steps are
|
|
17
|
-
* the core's own and validated by the API; the SDK only carries them.
|
|
18
|
-
*/
|
|
19
|
-
export interface IReflexDefinition {
|
|
20
|
-
formatVersion: number;
|
|
21
|
-
accesses: IReflexAccessDeclaration[];
|
|
22
|
-
steps: Array<Record<string, unknown>>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Bounds of the status a RESPOND step (or `abyss.respond`) may answer with, both included: the
|
|
27
|
-
* runtime's `MIN_RESPONSE_STATUS` and `MAX_RESPONSE_STATUS`, which publication and the edge apply.
|
|
28
|
-
* The API's tests check that they are equal.
|
|
29
|
-
*/
|
|
30
|
-
export const RESPOND_STATUS_MIN = 200;
|
|
31
|
-
export const RESPOND_STATUS_MAX = 599;
|
|
1
|
+
import type { ReflexAccessKind } from '../../enum';
|
|
2
|
+
|
|
3
|
+
export interface IReflexHttpAccess {
|
|
4
|
+
kind: ReflexAccessKind.HTTP;
|
|
5
|
+
hosts: string[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IReflexHostActionAccess {
|
|
9
|
+
kind: ReflexAccessKind.HOST_ACTION;
|
|
10
|
+
action: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type IReflexAccessDeclaration = IReflexHttpAccess | IReflexHostActionAccess;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A function's definition, in the format of @abyss-project/runtime (`formatVersion` 1). The steps are
|
|
17
|
+
* the core's own and validated by the API; the SDK only carries them.
|
|
18
|
+
*/
|
|
19
|
+
export interface IReflexDefinition {
|
|
20
|
+
formatVersion: number;
|
|
21
|
+
accesses: IReflexAccessDeclaration[];
|
|
22
|
+
steps: Array<Record<string, unknown>>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Bounds of the status a RESPOND step (or `abyss.respond`) may answer with, both included: the
|
|
27
|
+
* runtime's `MIN_RESPONSE_STATUS` and `MAX_RESPONSE_STATUS`, which publication and the edge apply.
|
|
28
|
+
* The API's tests check that they are equal.
|
|
29
|
+
*/
|
|
30
|
+
export const RESPOND_STATUS_MIN = 200;
|
|
31
|
+
export const RESPOND_STATUS_MAX = 599;
|
|
@@ -21,19 +21,20 @@ export const REFLEX_DISCORD_EVENT_LIMITS = {
|
|
|
21
21
|
} as const;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* What one bot can take in (decision 6 of the J2 spec).
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* What one bot can take in (decision 6 of the J2 spec, ADR-0302). Measured on staging (C1, run 2, 24/11/2026, after
|
|
25
|
+
* the per-bot claim and the sharded rollups): a bot sustains about 3 000 events per minute, bounded by the database
|
|
26
|
+
* (WAL and the `execution_counters` row), not by its slots. `lotsMax` is
|
|
27
|
+
* `min(lotsMaxCeiling, floor((maxConcurrencyPerBot * runsPerSlotPerMinute - base) / 500))` for the largest base.
|
|
27
28
|
*/
|
|
28
29
|
export const REFLEX_BOT_EVENT_CAPACITY = {
|
|
29
|
-
/** Events per minute one execution slot
|
|
30
|
+
/** Events per minute one execution slot sustains: the measured 3 000 per bot spread over its 30 slots. */
|
|
30
31
|
runsPerSlotPerMinute: 100,
|
|
31
32
|
/** `maxReplicas` (3) times the ceiling per pod (10) of the edge fleet. */
|
|
32
33
|
maxConcurrencyPerBot: 30,
|
|
33
34
|
/** The most lots of 500 events per minute a bot can be allocated, whatever the measure says. */
|
|
34
35
|
lotsMaxCeiling: 40,
|
|
35
|
-
/**
|
|
36
|
-
lotsMax:
|
|
36
|
+
/** The most lots a bot can be allocated: floor((30 × 100 − 500) / 500) = 5. */
|
|
37
|
+
lotsMax: 5,
|
|
37
38
|
} as const;
|
|
38
39
|
|
|
39
40
|
/** Optional filters of a trigger, combined with AND. An absent or empty list is no filter. */
|