@abyss-project/reflex 1.2.0 → 3.0.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/function-test.api.d.ts +2 -2
- package/dist/api/function-test.api.js +2 -2
- package/dist/api/function-test.api.js.map +1 -1
- package/dist/api/function-version.api.d.ts +1 -2
- package/dist/api/function-version.api.js +1 -3
- package/dist/api/function-version.api.js.map +1 -1
- package/dist/api/index.d.ts +5 -2
- package/dist/api/index.js +5 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/service-deployment.api.d.ts +6 -0
- package/dist/api/service-deployment.api.js +19 -0
- package/dist/api/service-deployment.api.js.map +1 -0
- package/dist/api/service-route.api.d.ts +6 -0
- package/dist/api/service-route.api.js +16 -0
- package/dist/api/service-route.api.js.map +1 -0
- package/dist/api/service-variable.api.d.ts +5 -0
- package/dist/api/service-variable.api.js +16 -0
- package/dist/api/service-variable.api.js.map +1 -0
- package/dist/api/service-version.api.d.ts +4 -0
- package/dist/api/service-version.api.js +12 -0
- package/dist/api/service-version.api.js.map +1 -0
- package/dist/api/service.api.d.ts +6 -0
- package/dist/api/service.api.js +17 -0
- package/dist/api/service.api.js.map +1 -0
- package/dist/index.d.ts +37 -14
- package/dist/index.js +37 -14
- package/dist/index.js.map +1 -1
- package/dist/types/enum/index.d.ts +6 -1
- package/dist/types/enum/index.js +6 -1
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/reflex-error-code.enum.d.ts +5 -2
- package/dist/types/enum/reflex-error-code.enum.js +4 -1
- package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
- package/dist/types/enum/route-method.enum.d.ts +8 -0
- package/dist/types/enum/route-method.enum.js +13 -0
- package/dist/types/enum/route-method.enum.js.map +1 -0
- package/dist/types/enum/secret-source.enum.d.ts +5 -0
- package/dist/types/enum/secret-source.enum.js +10 -0
- package/dist/types/enum/secret-source.enum.js.map +1 -0
- package/dist/types/enum/service-deployment-action.enum.d.ts +6 -0
- package/dist/types/enum/service-deployment-action.enum.js +11 -0
- package/dist/types/enum/service-deployment-action.enum.js.map +1 -0
- package/dist/types/enum/service-deployment-status.enum.d.ts +4 -0
- package/dist/types/enum/service-deployment-status.enum.js +9 -0
- package/dist/types/enum/service-deployment-status.enum.js.map +1 -0
- package/dist/types/enum/service-type.enum.d.ts +4 -0
- package/dist/types/enum/service-type.enum.js +9 -0
- package/dist/types/enum/service-type.enum.js.map +1 -0
- package/dist/types/enum/service-version-change-kind.enum.d.ts +5 -0
- package/dist/types/enum/service-version-change-kind.enum.js +10 -0
- package/dist/types/enum/service-version-change-kind.enum.js.map +1 -0
- package/dist/types/interface/api/requests/function-test.request.d.ts +1 -0
- package/dist/types/interface/api/requests/function-version.request.d.ts +0 -4
- package/dist/types/interface/api/requests/function.request.d.ts +1 -0
- package/dist/types/interface/api/requests/index.d.ts +5 -2
- package/dist/types/interface/api/requests/index.js +5 -2
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/service-deployment.request.d.ts +39 -0
- package/dist/types/interface/api/requests/{function-promotion.request.js → service-deployment.request.js} +1 -1
- package/dist/types/interface/api/requests/service-deployment.request.js.map +1 -0
- package/dist/types/interface/api/requests/service-route.request.d.ts +36 -0
- package/dist/types/interface/api/requests/{function-trigger.request.js → service-route.request.js} +1 -1
- package/dist/types/interface/api/requests/service-route.request.js.map +1 -0
- package/dist/types/interface/api/requests/service-variable.request.d.ts +23 -0
- package/dist/types/interface/api/{responses/function-trigger.response.js → requests/service-variable.request.js} +1 -1
- package/dist/types/interface/api/requests/service-variable.request.js.map +1 -0
- package/dist/types/interface/api/requests/service-version.request.d.ts +16 -0
- package/dist/types/interface/api/requests/service-version.request.js +3 -0
- package/dist/types/interface/api/requests/service-version.request.js.map +1 -0
- package/dist/types/interface/api/requests/service.request.d.ts +30 -0
- package/dist/types/interface/{models/reflex-trigger.model.js → api/requests/service.request.js} +1 -1
- package/dist/types/interface/api/requests/service.request.js.map +1 -0
- package/dist/types/interface/api/responses/function-version.response.d.ts +0 -4
- package/dist/types/interface/api/responses/index.d.ts +5 -2
- package/dist/types/interface/api/responses/index.js +5 -2
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/service-deployment.response.d.ts +24 -0
- package/dist/types/interface/api/responses/{function-promotion.response.js → service-deployment.response.js} +1 -1
- package/dist/types/interface/api/responses/service-deployment.response.js.map +1 -0
- package/dist/types/interface/api/responses/service-route.response.d.ts +23 -0
- package/dist/types/interface/api/responses/service-route.response.js +3 -0
- package/dist/types/interface/api/responses/service-route.response.js.map +1 -0
- package/dist/types/interface/api/responses/service-variable.response.d.ts +22 -0
- package/dist/types/interface/api/responses/service-variable.response.js +3 -0
- package/dist/types/interface/api/responses/service-variable.response.js.map +1 -0
- package/dist/types/interface/api/responses/service-version.response.d.ts +23 -0
- package/dist/types/interface/api/responses/service-version.response.js +3 -0
- package/dist/types/interface/api/responses/service-version.response.js.map +1 -0
- package/dist/types/interface/api/responses/service.response.d.ts +23 -0
- package/dist/types/interface/api/responses/service.response.js +3 -0
- package/dist/types/interface/api/responses/service.response.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +5 -2
- package/dist/types/interface/models/index.js +5 -2
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/reflex-function.model.d.ts +1 -0
- package/dist/types/interface/models/reflex-route.model.d.ts +12 -0
- package/dist/types/interface/models/reflex-route.model.js +3 -0
- package/dist/types/interface/models/reflex-route.model.js.map +1 -0
- package/dist/types/interface/models/reflex-run.model.d.ts +1 -1
- package/dist/types/interface/models/reflex-service-deployment.model.d.ts +20 -0
- package/dist/types/interface/models/reflex-service-deployment.model.js +3 -0
- package/dist/types/interface/models/reflex-service-deployment.model.js.map +1 -0
- package/dist/types/interface/models/reflex-service-variable.model.d.ts +10 -0
- package/dist/types/interface/models/reflex-service-variable.model.js +3 -0
- package/dist/types/interface/models/reflex-service-variable.model.js.map +1 -0
- package/dist/types/interface/models/reflex-service-version.model.d.ts +30 -0
- package/dist/types/interface/models/reflex-service-version.model.js +3 -0
- package/dist/types/interface/models/reflex-service-version.model.js.map +1 -0
- package/dist/types/interface/models/reflex-service.model.d.ts +33 -0
- package/dist/types/interface/models/reflex-service.model.js +15 -0
- package/dist/types/interface/models/reflex-service.model.js.map +1 -0
- package/package.json +1 -1
- package/src/api/function-run.api.ts +1 -1
- package/src/api/function-settings.api.ts +59 -59
- package/src/api/function-test.api.ts +7 -6
- package/src/api/function-version.api.ts +4 -12
- package/src/api/function.api.test.ts +10 -68
- package/src/api/index.ts +5 -2
- package/src/api/service-deployment.api.ts +79 -0
- package/src/api/service-route.api.ts +72 -0
- package/src/api/service-variable.api.ts +58 -0
- package/src/api/service-version.api.ts +39 -0
- package/src/api/service.api.test.ts +234 -0
- package/src/api/service.api.ts +55 -0
- package/src/index.ts +70 -26
- package/src/types/enum/execution-mode.enum.ts +1 -1
- 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/index.ts +6 -1
- package/src/types/enum/reflex-error-code.enum.ts +25 -19
- package/src/types/enum/route-method.enum.ts +9 -0
- package/src/types/enum/run-log-level.enum.ts +6 -6
- 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/secret-source.enum.ts +9 -0
- package/src/types/enum/service-deployment-action.enum.ts +11 -0
- package/src/types/enum/service-deployment-status.enum.ts +5 -0
- package/src/types/enum/service-type.enum.ts +7 -0
- package/src/types/enum/service-version-change-kind.enum.ts +6 -0
- 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/interface/api/requests/function-run.request.ts +1 -1
- package/src/types/interface/api/requests/function-settings.request.ts +27 -27
- package/src/types/interface/api/requests/function-test.request.ts +5 -0
- package/src/types/interface/api/requests/function-version.request.ts +1 -6
- package/src/types/interface/api/requests/function.request.ts +36 -34
- package/src/types/interface/api/requests/index.ts +5 -2
- package/src/types/interface/api/requests/service-deployment.request.ts +49 -0
- package/src/types/interface/api/requests/service-route.request.ts +44 -0
- package/src/types/interface/api/requests/service-variable.request.ts +29 -0
- package/src/types/interface/api/requests/service-version.request.ts +19 -0
- package/src/types/interface/api/requests/service.request.ts +39 -0
- 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-version.response.ts +0 -5
- package/src/types/interface/api/responses/index.ts +5 -2
- package/src/types/interface/api/responses/service-deployment.response.ts +32 -0
- package/src/types/interface/api/responses/service-route.response.ts +31 -0
- package/src/types/interface/api/responses/service-variable.response.ts +31 -0
- package/src/types/interface/api/responses/service-version.response.ts +33 -0
- package/src/types/interface/api/responses/service.response.ts +31 -0
- package/src/types/interface/models/index.ts +5 -2
- package/src/types/interface/models/reflex-definition.model.ts +31 -31
- package/src/types/interface/models/reflex-execution-settings.model.ts +50 -50
- package/src/types/interface/models/reflex-function.model.ts +16 -14
- package/src/types/interface/models/reflex-price-list.model.ts +20 -20
- package/src/types/interface/models/reflex-route.model.ts +19 -0
- package/src/types/interface/models/reflex-run.model.ts +11 -7
- package/src/types/interface/models/reflex-service-deployment.model.ts +29 -0
- package/src/types/interface/models/reflex-service-variable.model.ts +16 -0
- package/src/types/interface/models/reflex-service-version.model.ts +43 -0
- package/src/types/interface/models/reflex-service.model.ts +46 -0
- package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
- package/dist/api/function-promotion.api.d.ts +0 -4
- package/dist/api/function-promotion.api.js +0 -12
- package/dist/api/function-promotion.api.js.map +0 -1
- package/dist/api/function-trigger.api.d.ts +0 -5
- package/dist/api/function-trigger.api.js +0 -14
- package/dist/api/function-trigger.api.js.map +0 -1
- package/dist/types/enum/trigger-type.enum.d.ts +0 -3
- package/dist/types/enum/trigger-type.enum.js +0 -8
- package/dist/types/enum/trigger-type.enum.js.map +0 -1
- package/dist/types/interface/api/requests/function-promotion.request.d.ts +0 -20
- package/dist/types/interface/api/requests/function-promotion.request.js.map +0 -1
- package/dist/types/interface/api/requests/function-trigger.request.d.ts +0 -23
- package/dist/types/interface/api/requests/function-trigger.request.js.map +0 -1
- package/dist/types/interface/api/responses/function-promotion.response.d.ts +0 -14
- package/dist/types/interface/api/responses/function-promotion.response.js.map +0 -1
- package/dist/types/interface/api/responses/function-trigger.response.d.ts +0 -18
- package/dist/types/interface/api/responses/function-trigger.response.js.map +0 -1
- package/dist/types/interface/models/reflex-environment-pointer.model.d.ts +0 -13
- package/dist/types/interface/models/reflex-environment-pointer.model.js +0 -3
- package/dist/types/interface/models/reflex-environment-pointer.model.js.map +0 -1
- package/dist/types/interface/models/reflex-trigger.model.d.ts +0 -13
- package/dist/types/interface/models/reflex-trigger.model.js.map +0 -1
- package/src/api/function-promotion.api.ts +0 -42
- package/src/api/function-trigger.api.ts +0 -52
- package/src/types/enum/trigger-type.enum.ts +0 -4
- package/src/types/interface/api/requests/function-promotion.request.ts +0 -25
- package/src/types/interface/api/requests/function-trigger.request.ts +0 -28
- package/src/types/interface/api/responses/function-promotion.response.ts +0 -18
- package/src/types/interface/api/responses/function-trigger.response.ts +0 -24
- package/src/types/interface/models/reflex-environment-pointer.model.ts +0 -18
- package/src/types/interface/models/reflex-trigger.model.ts +0 -17
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SecretSource } from '../../../enum';
|
|
2
|
+
import type { IReflexServiceVariable } from '../../models';
|
|
3
|
+
import type { IResponse } from '../response';
|
|
4
|
+
|
|
5
|
+
export interface IListServiceVariableData {
|
|
6
|
+
/** Every variable of the Service, in every environment. */
|
|
7
|
+
variables: IReflexServiceVariable[];
|
|
8
|
+
}
|
|
9
|
+
export type IListServiceVariableResponse = IResponse<IListServiceVariableData>;
|
|
10
|
+
|
|
11
|
+
export interface ISetServiceVariableData {
|
|
12
|
+
variable: IReflexServiceVariable;
|
|
13
|
+
}
|
|
14
|
+
export type ISetServiceVariableResponse = IResponse<ISetServiceVariableData>;
|
|
15
|
+
|
|
16
|
+
export type IDeleteServiceVariableData = Record<string, never>;
|
|
17
|
+
export type IDeleteServiceVariableResponse = IResponse<IDeleteServiceVariableData>;
|
|
18
|
+
|
|
19
|
+
/** A secret the functions of the Service use, and where its value comes from in each environment. Never the value. */
|
|
20
|
+
export interface IReflexServiceSecretStatus {
|
|
21
|
+
name: string;
|
|
22
|
+
/** The Console vault entry of that name in the project; null when there is none. */
|
|
23
|
+
secretId: string | null;
|
|
24
|
+
/** By environment id of the application. */
|
|
25
|
+
sources: Record<string, SecretSource>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IGetServiceSecretStatusData {
|
|
29
|
+
secrets: IReflexServiceSecretStatus[];
|
|
30
|
+
}
|
|
31
|
+
export type IGetServiceSecretStatusResponse = IResponse<IGetServiceSecretStatusData>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ServiceVersionChangeKind } from '../../../enum';
|
|
2
|
+
import type { IReflexServiceVersion, IReflexServiceVersionRoute } from '../../models';
|
|
3
|
+
import type { IResponse } from '../response';
|
|
4
|
+
|
|
5
|
+
/** How one route differs from the previous version, matched by route id. */
|
|
6
|
+
export interface IReflexServiceVersionRouteChange {
|
|
7
|
+
routeId: string;
|
|
8
|
+
kind: ServiceVersionChangeKind;
|
|
9
|
+
/** The route in the previous version; null when ADDED. */
|
|
10
|
+
before: IReflexServiceVersionRoute | null;
|
|
11
|
+
/** The route in this version; null when REMOVED. */
|
|
12
|
+
after: IReflexServiceVersionRoute | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IListServiceVersionData {
|
|
16
|
+
/** Newest first. */
|
|
17
|
+
versions: IReflexServiceVersion[];
|
|
18
|
+
}
|
|
19
|
+
export type IListServiceVersionResponse = IResponse<IListServiceVersionData>;
|
|
20
|
+
|
|
21
|
+
export interface ICreateServiceVersionData {
|
|
22
|
+
version: IReflexServiceVersion;
|
|
23
|
+
}
|
|
24
|
+
export type ICreateServiceVersionResponse = IResponse<ICreateServiceVersionData>;
|
|
25
|
+
|
|
26
|
+
export interface IGetServiceVersionData {
|
|
27
|
+
version: IReflexServiceVersion;
|
|
28
|
+
/** The version just before; null for the first one. */
|
|
29
|
+
previousVersion: IReflexServiceVersion | null;
|
|
30
|
+
/** The routes added, removed or modified since `previousVersion` (every route is ADDED for the first one). */
|
|
31
|
+
routeChanges: IReflexServiceVersionRouteChange[];
|
|
32
|
+
}
|
|
33
|
+
export type IGetServiceVersionResponse = IResponse<IGetServiceVersionData>;
|
|
@@ -0,0 +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,10 +1,13 @@
|
|
|
1
1
|
export * from './reflex-definition.model';
|
|
2
2
|
export * from './reflex-function.model';
|
|
3
3
|
export * from './reflex-function-version.model';
|
|
4
|
-
export * from './reflex-environment-pointer.model';
|
|
5
|
-
export * from './reflex-trigger.model';
|
|
6
4
|
export * from './reflex-access-grant.model';
|
|
7
5
|
export * from './reflex-run.model';
|
|
8
6
|
export * from './reflex-execution-settings.model';
|
|
9
7
|
export * from './reflex-step-stats.model';
|
|
10
8
|
export * from './reflex-price-list.model';
|
|
9
|
+
export * from './reflex-service.model';
|
|
10
|
+
export * from './reflex-route.model';
|
|
11
|
+
export * from './reflex-service-version.model';
|
|
12
|
+
export * from './reflex-service-deployment.model';
|
|
13
|
+
export * from './reflex-service-variable.model';
|
|
@@ -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;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { ExecutionMode, ExecutionProfile } from '../../enum';
|
|
2
|
-
import type { ExecutionSettingsSource } from '../../enum';
|
|
3
|
-
|
|
4
|
-
/** The execution settings of a function in an environment. */
|
|
5
|
-
export interface IReflexExecutionSettingsValues {
|
|
6
|
-
profile: ExecutionProfile;
|
|
7
|
-
/** Past this, a synchronous caller that got no answer receives 504 and the execution goes on. */
|
|
8
|
-
responseTimeoutMs: number;
|
|
9
|
-
/** Past this, the execution is stopped with TIMEOUT. */
|
|
10
|
-
maxDurationMs: number;
|
|
11
|
-
mode: ExecutionMode;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** Bounds of the settings, in milliseconds. */
|
|
15
|
-
export const REFLEX_EXECUTION_SETTINGS_LIMITS = {
|
|
16
|
-
responseTimeoutMs: { min: 1_000, max: 100_000 },
|
|
17
|
-
maxDurationMs: { min: 1_000, max: 3_600_000 },
|
|
18
|
-
} as const;
|
|
19
|
-
|
|
20
|
-
/** What a function runs with when nothing is set. */
|
|
21
|
-
export const DEFAULT_REFLEX_EXECUTION_SETTINGS: Readonly<IReflexExecutionSettingsValues> = {
|
|
22
|
-
profile: ExecutionProfile.S,
|
|
23
|
-
responseTimeoutMs: 30_000,
|
|
24
|
-
maxDurationMs: 30_000,
|
|
25
|
-
mode: ExecutionMode.SYNC,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/** A row of settings: the default of the function (`environmentId` null) or the override of one environment. */
|
|
29
|
-
export interface IReflexExecutionSettings extends IReflexExecutionSettingsValues {
|
|
30
|
-
id: string;
|
|
31
|
-
functionId: string;
|
|
32
|
-
/**
|
|
33
|
-
environmentId: string | null;
|
|
34
|
-
updatedByUserId: string;
|
|
35
|
-
createdAt: Date;
|
|
36
|
-
updatedAt: Date;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** What one
|
|
40
|
-
export interface IReflexEffectiveExecutionSettings {
|
|
41
|
-
environmentId: string;
|
|
42
|
-
/** The name of the environment
|
|
43
|
-
environmentSlug: string;
|
|
44
|
-
/** Changing what a production environment runs with needs REFLEX_PUBLISH_PRODUCTION. */
|
|
45
|
-
isProduction: boolean;
|
|
46
|
-
source: ExecutionSettingsSource;
|
|
47
|
-
settings: IReflexExecutionSettingsValues;
|
|
48
|
-
/** The version promoted in this environment, whose step statistics drive the profile warning; null when none. */
|
|
49
|
-
runningVersionId: string | null;
|
|
50
|
-
}
|
|
1
|
+
import { ExecutionMode, ExecutionProfile } from '../../enum';
|
|
2
|
+
import type { ExecutionSettingsSource } from '../../enum';
|
|
3
|
+
|
|
4
|
+
/** The execution settings of a function in an environment. */
|
|
5
|
+
export interface IReflexExecutionSettingsValues {
|
|
6
|
+
profile: ExecutionProfile;
|
|
7
|
+
/** Past this, a synchronous caller that got no answer receives 504 and the execution goes on. */
|
|
8
|
+
responseTimeoutMs: number;
|
|
9
|
+
/** Past this, the execution is stopped with TIMEOUT. */
|
|
10
|
+
maxDurationMs: number;
|
|
11
|
+
mode: ExecutionMode;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Bounds of the settings, in milliseconds. */
|
|
15
|
+
export const REFLEX_EXECUTION_SETTINGS_LIMITS = {
|
|
16
|
+
responseTimeoutMs: { min: 1_000, max: 100_000 },
|
|
17
|
+
maxDurationMs: { min: 1_000, max: 3_600_000 },
|
|
18
|
+
} as const;
|
|
19
|
+
|
|
20
|
+
/** What a function runs with when nothing is set. */
|
|
21
|
+
export const DEFAULT_REFLEX_EXECUTION_SETTINGS: Readonly<IReflexExecutionSettingsValues> = {
|
|
22
|
+
profile: ExecutionProfile.S,
|
|
23
|
+
responseTimeoutMs: 30_000,
|
|
24
|
+
maxDurationMs: 30_000,
|
|
25
|
+
mode: ExecutionMode.SYNC,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** A row of settings: the default of the function (`environmentId` null) or the override of one environment. */
|
|
29
|
+
export interface IReflexExecutionSettings extends IReflexExecutionSettingsValues {
|
|
30
|
+
id: string;
|
|
31
|
+
functionId: string;
|
|
32
|
+
/** An environment of the application (abyss-main's id); null for the default of every environment. */
|
|
33
|
+
environmentId: string | null;
|
|
34
|
+
updatedByUserId: string;
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
updatedAt: Date;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** What one environment of the application runs with. */
|
|
40
|
+
export interface IReflexEffectiveExecutionSettings {
|
|
41
|
+
environmentId: string;
|
|
42
|
+
/** The name of the environment (abyss-main), immutable. */
|
|
43
|
+
environmentSlug: string;
|
|
44
|
+
/** Changing what a production environment runs with needs REFLEX_PUBLISH_PRODUCTION. */
|
|
45
|
+
isProduction: boolean;
|
|
46
|
+
source: ExecutionSettingsSource;
|
|
47
|
+
settings: IReflexExecutionSettingsValues;
|
|
48
|
+
/** The version promoted in this environment, whose step statistics drive the profile warning; null when none. */
|
|
49
|
+
runningVersionId: string | null;
|
|
50
|
+
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import type { IReflexDefinition } from './reflex-definition.model';
|
|
2
|
-
|
|
3
|
-
export interface IReflexFunction {
|
|
4
|
-
id: string;
|
|
5
|
-
applicationId: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import type { IReflexDefinition } from './reflex-definition.model';
|
|
2
|
+
|
|
3
|
+
export interface IReflexFunction {
|
|
4
|
+
id: string;
|
|
5
|
+
applicationId: string;
|
|
6
|
+
/** The Service the function belongs to; deleting the Service deletes it. */
|
|
7
|
+
serviceId: string;
|
|
8
|
+
projectId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
/** The definition being edited; a publication freezes a copy of it. */
|
|
11
|
+
draftDefinition: IReflexDefinition;
|
|
12
|
+
createdByUserId: string;
|
|
13
|
+
updatedByUserId: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { ExecutionProfile } from '../../enum';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The price list an execution is billed with (ADR-
|
|
5
|
-
* `COST_RATES` and `RESOURCE_PROFILES`, so that a screen that estimates a cost never holds a copy of it.
|
|
6
|
-
* Prices are in millicredits (thousandths of a credit).
|
|
7
|
-
*/
|
|
8
|
-
export interface IReflexPriceList {
|
|
9
|
-
/** Once per execution; 0 for an interrupted or refused execution. */
|
|
10
|
-
executionMillicredits: number;
|
|
11
|
-
cpuMillicreditsPerSecond: number;
|
|
12
|
-
/** Per GB-second of the memory the profile allocates, GB = 1024 MB. */
|
|
13
|
-
memoryMillicreditsPerGbSecond: number;
|
|
14
|
-
/** Per MB sent out, MB = 1024 x 1024 bytes. */
|
|
15
|
-
networkOutMillicreditsPerMb: number;
|
|
16
|
-
httpCallMillicredits: number;
|
|
17
|
-
storeWriteMillicredits: number;
|
|
18
|
-
/** The memory of each profile, and the coefficient its CPU part is multiplied by. */
|
|
19
|
-
profiles: Record<ExecutionProfile, { memoryMb: number; cpuCoefficient: number }>;
|
|
20
|
-
}
|
|
1
|
+
import type { ExecutionProfile } from '../../enum';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The price list an execution is billed with (ADR-0244), served by the API from the runtime's
|
|
5
|
+
* `COST_RATES` and `RESOURCE_PROFILES`, so that a screen that estimates a cost never holds a copy of it.
|
|
6
|
+
* Prices are in millicredits (thousandths of a credit).
|
|
7
|
+
*/
|
|
8
|
+
export interface IReflexPriceList {
|
|
9
|
+
/** Once per execution; 0 for an interrupted or refused execution. */
|
|
10
|
+
executionMillicredits: number;
|
|
11
|
+
cpuMillicreditsPerSecond: number;
|
|
12
|
+
/** Per GB-second of the memory the profile allocates, GB = 1024 MB. */
|
|
13
|
+
memoryMillicreditsPerGbSecond: number;
|
|
14
|
+
/** Per MB sent out, MB = 1024 x 1024 bytes. */
|
|
15
|
+
networkOutMillicreditsPerMb: number;
|
|
16
|
+
httpCallMillicredits: number;
|
|
17
|
+
storeWriteMillicredits: number;
|
|
18
|
+
/** The memory of each profile, and the coefficient its CPU part is multiplied by. */
|
|
19
|
+
profiles: Record<ExecutionProfile, { memoryMb: number; cpuCoefficient: number }>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RouteMethod, TriggerAccessMode } from '../../enum';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A route of the draft of a Service: callable only once a version that holds it is in service in the
|
|
5
|
+
* environment. Never carries the key or the signing secret: they are shown once, when created or rotated.
|
|
6
|
+
*/
|
|
7
|
+
export interface IReflexRoute {
|
|
8
|
+
id: string;
|
|
9
|
+
serviceId: string;
|
|
10
|
+
/** A function of the same Service. */
|
|
11
|
+
functionId: string;
|
|
12
|
+
method: RouteMethod;
|
|
13
|
+
/** Segments of `[a-z0-9._~-]` or `:param` joined by `/`, without leading or trailing slash; 20 at most. */
|
|
14
|
+
path: string;
|
|
15
|
+
accessMode: TriggerAccessMode;
|
|
16
|
+
createdByUserId: string;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
}
|
|
@@ -28,7 +28,7 @@ export interface IReflexTraceEntry {
|
|
|
28
28
|
recorded: boolean;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
/** What the RESPOND step (or `abyss.respond`) built: the response the caller of the
|
|
31
|
+
/** What the RESPOND step (or `abyss.respond`) built: the response the caller of the route would get. */
|
|
32
32
|
export interface IReflexTraceResponse {
|
|
33
33
|
status: number;
|
|
34
34
|
headers: Record<string, string>;
|
|
@@ -54,25 +54,29 @@ export interface IReflexRun {
|
|
|
54
54
|
id: string;
|
|
55
55
|
functionId: string;
|
|
56
56
|
versionId: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The environment the run took place in: the promoted version's for a LIVE run, the one named in the
|
|
59
|
+
* request for a test run. Null only for a test run recorded before test runs named an environment.
|
|
60
|
+
*/
|
|
57
61
|
environmentId: string | null;
|
|
58
62
|
mode: RunMode;
|
|
59
63
|
status: RunStatus;
|
|
60
64
|
durationMs: number;
|
|
61
65
|
/** The effects of a test run; null for a LIVE run, which records no trace (nothing of the caller is kept). */
|
|
62
66
|
trace: IReflexRunTrace | null;
|
|
63
|
-
/** The
|
|
64
|
-
|
|
67
|
+
/** The route that started a LIVE run; null for a test run. */
|
|
68
|
+
routeId: string | null;
|
|
65
69
|
/** The HTTP status the caller of a LIVE run got; null for a test run. */
|
|
66
70
|
httpStatus: number | null;
|
|
67
71
|
/** The code of the error a failed LIVE run answered (FUNCTION_FAILED, FUNCTION_TIMEOUT, RUNNER_UNAVAILABLE, RUNNER_SATURATED, INTERNAL_ERROR); null otherwise, an interrupted run included. */
|
|
68
72
|
errorCode: string | null;
|
|
69
|
-
/** The mode of the
|
|
73
|
+
/** The execution mode of the function when a LIVE run started; null for a test run. */
|
|
70
74
|
executionMode: ExecutionMode | null;
|
|
71
75
|
/** When the caller of a LIVE run got its answer; null for a test run, or before any answer. */
|
|
72
76
|
responseSentAt: Date | null;
|
|
73
77
|
/**
|
|
74
78
|
* What the run consumed and cost: measured by the runner for a live run and for a test run (with the
|
|
75
|
-
* function's
|
|
79
|
+
* function's effective settings in the run's environment, and the network of its stubs); null for a running execution, or a run
|
|
76
80
|
* recorded before the measures.
|
|
77
81
|
*/
|
|
78
82
|
metrics: IReflexRunMetrics | null;
|
|
@@ -80,7 +84,7 @@ export interface IReflexRun {
|
|
|
80
84
|
createdAt: Date;
|
|
81
85
|
}
|
|
82
86
|
|
|
83
|
-
/** What a live execution consumed, and what it costs (ADR-
|
|
87
|
+
/** What a live execution consumed, and what it costs (ADR-0244). */
|
|
84
88
|
export interface IReflexRunMetrics {
|
|
85
89
|
/** The profile it ran with, and the memory that profile allocates. */
|
|
86
90
|
profile: ExecutionProfile;
|
|
@@ -141,7 +145,7 @@ export interface IReflexRunDetail extends IReflexRun {
|
|
|
141
145
|
droppedLogLines: number;
|
|
142
146
|
}
|
|
143
147
|
|
|
144
|
-
/** The state of a live execution, read by its id (the `executionId` an async
|
|
148
|
+
/** The state of a live execution, read by its id (the `executionId` an async route answers with). */
|
|
145
149
|
export interface IReflexExecutionState {
|
|
146
150
|
id: string;
|
|
147
151
|
status: RunStatus;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ServiceDeploymentAction, ServiceDeploymentStatus } from '../../enum';
|
|
2
|
+
import type { IReflexAccessDeclaration } from './reflex-definition.model';
|
|
3
|
+
|
|
4
|
+
/** The accesses granted to one member function when the gesture was made: what the execution plane holds. */
|
|
5
|
+
export interface IReflexServiceDeploymentGrant {
|
|
6
|
+
functionId: string;
|
|
7
|
+
grants: IReflexAccessDeclaration[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* One gesture on the Service in an environment of the application. The `isCurrent` row is what runs (or
|
|
12
|
+
* is paused) there; the others are the history a rollback reads.
|
|
13
|
+
*/
|
|
14
|
+
export interface IReflexServiceDeployment {
|
|
15
|
+
id: string;
|
|
16
|
+
serviceId: string;
|
|
17
|
+
/** The environment of the application (abyss-main's id). */
|
|
18
|
+
environmentId: string;
|
|
19
|
+
/** The name of that environment, second segment of the address. */
|
|
20
|
+
environmentSlug: string;
|
|
21
|
+
serviceVersionId: string;
|
|
22
|
+
serviceVersionNumber: number;
|
|
23
|
+
action: ServiceDeploymentAction;
|
|
24
|
+
status: ServiceDeploymentStatus;
|
|
25
|
+
grants: IReflexServiceDeploymentGrant[];
|
|
26
|
+
isCurrent: boolean;
|
|
27
|
+
byUserId: string;
|
|
28
|
+
at: Date;
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A non-secret value of a Service in one environment, read as `{{ config.NAME }}` in a field and
|
|
3
|
+
* `config.NAME` in code. Not versioned: a change applies to the next executions.
|
|
4
|
+
*/
|
|
5
|
+
export interface IReflexServiceVariable {
|
|
6
|
+
id: string;
|
|
7
|
+
serviceId: string;
|
|
8
|
+
environmentId: string;
|
|
9
|
+
/** `^[A-Z][A-Z0-9_]{0,63}$`, unique per Service and environment. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** 4096 characters at most. */
|
|
12
|
+
value: string;
|
|
13
|
+
updatedByUserId: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { RouteMethod, TriggerAccessMode } from '../../enum';
|
|
2
|
+
import type { IReflexServiceCors } from './reflex-service.model';
|
|
3
|
+
|
|
4
|
+
/** A route as a version of the Service froze it. */
|
|
5
|
+
export interface IReflexServiceVersionRoute {
|
|
6
|
+
routeId: string;
|
|
7
|
+
method: RouteMethod;
|
|
8
|
+
path: string;
|
|
9
|
+
functionId: string;
|
|
10
|
+
accessMode: TriggerAccessMode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** The version of a member function a version of the Service runs. */
|
|
14
|
+
export interface IReflexServiceVersionFunction {
|
|
15
|
+
functionId: string;
|
|
16
|
+
functionVersionId: string;
|
|
17
|
+
functionVersionNumber: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* What a version of the Service freezes. Routes sorted by path then method, functions by id: the same
|
|
22
|
+
* Service always gives the same snapshot, and the same `hash`.
|
|
23
|
+
*/
|
|
24
|
+
export interface IReflexServiceVersionSnapshot {
|
|
25
|
+
routes: IReflexServiceVersionRoute[];
|
|
26
|
+
functions: IReflexServiceVersionFunction[];
|
|
27
|
+
cors: IReflexServiceCors;
|
|
28
|
+
rateLimitPerIpPerMinute: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface IReflexServiceVersion {
|
|
32
|
+
id: string;
|
|
33
|
+
serviceId: string;
|
|
34
|
+
/** 1, 2, 3...: counted per Service. */
|
|
35
|
+
number: number;
|
|
36
|
+
/** 500 characters at most. */
|
|
37
|
+
message: string | null;
|
|
38
|
+
snapshot: IReflexServiceVersionSnapshot;
|
|
39
|
+
/** SHA-256 of the snapshot as canonical JSON (keys sorted), lowercase hex. */
|
|
40
|
+
hash: string;
|
|
41
|
+
publishedByUserId: string;
|
|
42
|
+
publishedAt: Date;
|
|
43
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ServiceType } from '../../enum';
|
|
2
|
+
|
|
3
|
+
/** Bounds of a Service, its routes, versions and variables; the API and its database apply the same ones. */
|
|
4
|
+
export const REFLEX_SERVICE_LIMITS = {
|
|
5
|
+
/** `^[a-z0-9][a-z0-9-]{0,39}$`: the third segment of the address, immutable. */
|
|
6
|
+
slugPattern: /^[a-z0-9][a-z0-9-]{0,39}$/,
|
|
7
|
+
nameMaxLength: 100,
|
|
8
|
+
corsAllowedOriginsMax: 20,
|
|
9
|
+
rateLimitPerIpPerMinute: { min: 1, max: 6000, default: 60 },
|
|
10
|
+
/** Segments of `[a-z0-9._~-]` or `:param`, joined by `/`, without leading or trailing slash. */
|
|
11
|
+
routePathMaxSegments: 20,
|
|
12
|
+
routePathMaxLength: 255,
|
|
13
|
+
versionMessageMaxLength: 500,
|
|
14
|
+
/** `^[A-Z][A-Z0-9_]{0,63}$`: read as `{{ config.NAME }}` in a field and `config.NAME` in code. */
|
|
15
|
+
variableNamePattern: /^[A-Z][A-Z0-9_]{0,63}$/,
|
|
16
|
+
variableValueMaxLength: 4096,
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Origins a browser may call the Service from. Each is `https://host` or `https://*.domain`; `*` (any
|
|
21
|
+
* origin) is refused when a route of the Service is not PUBLIC.
|
|
22
|
+
*/
|
|
23
|
+
export interface IReflexServiceCors {
|
|
24
|
+
allowedOrigins: string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** A group of functions versioned, put in service and paused as one, in an application. */
|
|
28
|
+
export interface IReflexService {
|
|
29
|
+
id: string;
|
|
30
|
+
applicationId: string;
|
|
31
|
+
/** First segment of the address, `app-<8 hex>`, fixed for the application. */
|
|
32
|
+
applicationSlug: string;
|
|
33
|
+
/** Unique within the application. */
|
|
34
|
+
name: string;
|
|
35
|
+
/** Unique within the application, immutable: `/<application>/<environment>/<slug>/<route path>`. */
|
|
36
|
+
slug: string;
|
|
37
|
+
type: ServiceType;
|
|
38
|
+
/** Draft: frozen by the next version. */
|
|
39
|
+
cors: IReflexServiceCors;
|
|
40
|
+
/** Draft: frozen by the next version. Calls per minute and per client IP, in each environment. */
|
|
41
|
+
rateLimitPerIpPerMinute: number;
|
|
42
|
+
createdByUserId: string;
|
|
43
|
+
updatedByUserId: string;
|
|
44
|
+
createdAt: Date;
|
|
45
|
+
updatedAt: Date;
|
|
46
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
/** Median and 95th percentile of a measure, over the executions of the window. */
|
|
2
|
-
export interface IReflexPercentiles {
|
|
3
|
-
median: number;
|
|
4
|
-
p95: number;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The measured consumption of one step of a version, over the retention window. Interrupted and running
|
|
9
|
-
* executions are left out.
|
|
10
|
-
*/
|
|
11
|
-
export interface IReflexStepStats {
|
|
12
|
-
stepId: string;
|
|
13
|
-
/** Executions in which the step ran. */
|
|
14
|
-
executions: number;
|
|
15
|
-
durationMs: IReflexPercentiles;
|
|
16
|
-
cpuMs: IReflexPercentiles;
|
|
17
|
-
heapPeakBytes: IReflexPercentiles;
|
|
18
|
-
costMillicredits: IReflexPercentiles;
|
|
19
|
-
/** 99th percentile of the heap peak: what a smaller profile is compared to. */
|
|
20
|
-
heapPeakP99Bytes: number;
|
|
21
|
-
/** Share of the cost of the executions that this step makes, from 0 to 1; null when they cost nothing. */
|
|
22
|
-
costShare: number | null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** The p99 heap peak of one step of the version running in an environment. */
|
|
26
|
-
export interface IReflexStepHeapPeak {
|
|
27
|
-
stepId: string;
|
|
28
|
-
heapPeakP99Bytes: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** What the settings screen compares a smaller profile to: the version running in the environment. */
|
|
32
|
-
export interface IReflexRunningVersionHeapPeaks {
|
|
33
|
-
versionId: string;
|
|
34
|
-
steps: IReflexStepHeapPeak[];
|
|
35
|
-
}
|
|
1
|
+
/** Median and 95th percentile of a measure, over the executions of the window. */
|
|
2
|
+
export interface IReflexPercentiles {
|
|
3
|
+
median: number;
|
|
4
|
+
p95: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The measured consumption of one step of a version, over the retention window. Interrupted and running
|
|
9
|
+
* executions are left out.
|
|
10
|
+
*/
|
|
11
|
+
export interface IReflexStepStats {
|
|
12
|
+
stepId: string;
|
|
13
|
+
/** Executions in which the step ran. */
|
|
14
|
+
executions: number;
|
|
15
|
+
durationMs: IReflexPercentiles;
|
|
16
|
+
cpuMs: IReflexPercentiles;
|
|
17
|
+
heapPeakBytes: IReflexPercentiles;
|
|
18
|
+
costMillicredits: IReflexPercentiles;
|
|
19
|
+
/** 99th percentile of the heap peak: what a smaller profile is compared to. */
|
|
20
|
+
heapPeakP99Bytes: number;
|
|
21
|
+
/** Share of the cost of the executions that this step makes, from 0 to 1; null when they cost nothing. */
|
|
22
|
+
costShare: number | null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** The p99 heap peak of one step of the version running in an environment. */
|
|
26
|
+
export interface IReflexStepHeapPeak {
|
|
27
|
+
stepId: string;
|
|
28
|
+
heapPeakP99Bytes: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** What the settings screen compares a smaller profile to: the version running in the environment. */
|
|
32
|
+
export interface IReflexRunningVersionHeapPeaks {
|
|
33
|
+
versionId: string;
|
|
34
|
+
steps: IReflexStepHeapPeak[];
|
|
35
|
+
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { IListFunctionPromotionParams, IListFunctionPromotionResponse, IPromoteFunctionBody, IPromoteFunctionParams, IPromoteFunctionResponse, IRollbackFunctionBody, IRollbackFunctionParams, IRollbackFunctionResponse } from '../types';
|
|
2
|
-
export declare const listFunctionPromotion: (params: IListFunctionPromotionParams) => Promise<IListFunctionPromotionResponse>;
|
|
3
|
-
export declare const promoteFunction: (params: IPromoteFunctionParams, body: IPromoteFunctionBody) => Promise<IPromoteFunctionResponse>;
|
|
4
|
-
export declare const rollbackFunction: (params: IRollbackFunctionParams, body: IRollbackFunctionBody) => Promise<IRollbackFunctionResponse>;
|