@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,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
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Who may call
|
|
3
|
-
* - PUBLIC: anyone.
|
|
4
|
-
* - API_KEY: the caller sends the key in `x-api-key`.
|
|
5
|
-
* - SIGNATURE: the caller signs the raw body: `x-reflex-signature: sha256=<hex HMAC-SHA256(secret,
|
|
6
|
-
* "<timestamp>." + body)>` with `x-reflex-timestamp` in Unix seconds, within 300 s of the edge's clock.
|
|
7
|
-
*/
|
|
8
|
-
export enum TriggerAccessMode {
|
|
9
|
-
PUBLIC = 'PUBLIC',
|
|
10
|
-
API_KEY = 'API_KEY',
|
|
11
|
-
SIGNATURE = 'SIGNATURE',
|
|
12
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Who may call a route of a Service.
|
|
3
|
+
* - PUBLIC: anyone.
|
|
4
|
+
* - API_KEY: the caller sends the key in `x-api-key`.
|
|
5
|
+
* - SIGNATURE: the caller signs the raw body: `x-reflex-signature: sha256=<hex HMAC-SHA256(secret,
|
|
6
|
+
* "<timestamp>." + body)>` with `x-reflex-timestamp` in Unix seconds, within 300 s of the edge's clock.
|
|
7
|
+
*/
|
|
8
|
+
export enum TriggerAccessMode {
|
|
9
|
+
PUBLIC = 'PUBLIC',
|
|
10
|
+
API_KEY = 'API_KEY',
|
|
11
|
+
SIGNATURE = 'SIGNATURE',
|
|
12
|
+
}
|
|
@@ -21,6 +21,6 @@ export interface IGetFunctionRunParams {
|
|
|
21
21
|
export interface IGetFunctionRunStateParams {
|
|
22
22
|
applicationId: string;
|
|
23
23
|
functionId: string;
|
|
24
|
-
/** The `executionId` an async
|
|
24
|
+
/** The `executionId` an async route answered with: the id of the live run. */
|
|
25
25
|
runId: string;
|
|
26
26
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { IReflexExecutionSettingsValues } from '../../models';
|
|
2
|
-
|
|
3
|
-
export interface IGetFunctionSettingsParams {
|
|
4
|
-
applicationId: string;
|
|
5
|
-
functionId: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface ISetFunctionDefaultSettingsParams {
|
|
9
|
-
applicationId: string;
|
|
10
|
-
functionId: string;
|
|
11
|
-
}
|
|
12
|
-
/** Every value is required: a row of settings is whole. */
|
|
13
|
-
export type ISetFunctionDefaultSettingsBody = IReflexExecutionSettingsValues;
|
|
14
|
-
|
|
15
|
-
export interface ISetFunctionEnvironmentSettingsParams {
|
|
16
|
-
applicationId: string;
|
|
17
|
-
functionId: string;
|
|
18
|
-
/**
|
|
19
|
-
environmentId: string;
|
|
20
|
-
}
|
|
21
|
-
export type ISetFunctionEnvironmentSettingsBody = IReflexExecutionSettingsValues;
|
|
22
|
-
|
|
23
|
-
export interface IRemoveFunctionEnvironmentSettingsParams {
|
|
24
|
-
applicationId: string;
|
|
25
|
-
functionId: string;
|
|
26
|
-
environmentId: string;
|
|
27
|
-
}
|
|
1
|
+
import type { IReflexExecutionSettingsValues } from '../../models';
|
|
2
|
+
|
|
3
|
+
export interface IGetFunctionSettingsParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
functionId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ISetFunctionDefaultSettingsParams {
|
|
9
|
+
applicationId: string;
|
|
10
|
+
functionId: string;
|
|
11
|
+
}
|
|
12
|
+
/** Every value is required: a row of settings is whole. */
|
|
13
|
+
export type ISetFunctionDefaultSettingsBody = IReflexExecutionSettingsValues;
|
|
14
|
+
|
|
15
|
+
export interface ISetFunctionEnvironmentSettingsParams {
|
|
16
|
+
applicationId: string;
|
|
17
|
+
functionId: string;
|
|
18
|
+
/** An environment of the application (abyss-main's id). */
|
|
19
|
+
environmentId: string;
|
|
20
|
+
}
|
|
21
|
+
export type ISetFunctionEnvironmentSettingsBody = IReflexExecutionSettingsValues;
|
|
22
|
+
|
|
23
|
+
export interface IRemoveFunctionEnvironmentSettingsParams {
|
|
24
|
+
applicationId: string;
|
|
25
|
+
functionId: string;
|
|
26
|
+
environmentId: string;
|
|
27
|
+
}
|
|
@@ -11,6 +11,11 @@ export interface IReflexHttpStub {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export interface ISimulateFunctionBody {
|
|
14
|
+
/**
|
|
15
|
+
* The environment of the application the run takes place in (abyss-main's id): a dry run reads its
|
|
16
|
+
* Store, the run is measured with its effective settings and recorded with it.
|
|
17
|
+
*/
|
|
18
|
+
environmentId: string;
|
|
14
19
|
/** The event the function receives, as the edge builds it: `{method, path, query, headers, body}`. */
|
|
15
20
|
input?: unknown;
|
|
16
21
|
/** Simulated responses of HTTP steps, by step id. */
|
|
@@ -3,11 +3,6 @@ export interface IListFunctionVersionParams {
|
|
|
3
3
|
functionId: string;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
export interface IPublishFunctionVersionParams {
|
|
7
|
-
applicationId: string;
|
|
8
|
-
functionId: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
export interface IGetFunctionVersionParams {
|
|
12
7
|
applicationId: string;
|
|
13
8
|
functionId: string;
|
|
@@ -20,6 +15,6 @@ export interface IGetFunctionVersionStepStatsParams {
|
|
|
20
15
|
versionId: string;
|
|
21
16
|
}
|
|
22
17
|
export interface IGetFunctionVersionStepStatsQuery {
|
|
23
|
-
/** Only the executions of this
|
|
18
|
+
/** Only the executions of this environment; every environment when absent. */
|
|
24
19
|
environmentId?: string;
|
|
25
20
|
}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import type { IReflexDefinition } from '../../models';
|
|
2
|
-
|
|
3
|
-
export interface IListFunctionParams {
|
|
4
|
-
applicationId: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface ICreateFunctionParams {
|
|
8
|
-
applicationId: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ICreateFunctionBody {
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import type { IReflexDefinition } from '../../models';
|
|
2
|
+
|
|
3
|
+
export interface IListFunctionParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface ICreateFunctionParams {
|
|
8
|
+
applicationId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICreateFunctionBody {
|
|
11
|
+
/** A Service of the application, which the function joins. */
|
|
12
|
+
serviceId: string;
|
|
13
|
+
/** Unique within the application, 1 to 100 characters. */
|
|
14
|
+
name: string;
|
|
15
|
+
/** Absent: a function without access or step, to fill in. */
|
|
16
|
+
definition?: IReflexDefinition;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IGetFunctionParams {
|
|
20
|
+
applicationId: string;
|
|
21
|
+
functionId: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IUpdateFunctionParams {
|
|
25
|
+
applicationId: string;
|
|
26
|
+
functionId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IUpdateFunctionBody {
|
|
29
|
+
name?: string;
|
|
30
|
+
definition?: IReflexDefinition;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IDeleteFunctionParams {
|
|
34
|
+
applicationId: string;
|
|
35
|
+
functionId: string;
|
|
36
|
+
}
|
|
@@ -2,7 +2,10 @@ export * from './function.request';
|
|
|
2
2
|
export * from './function-access.request';
|
|
3
3
|
export * from './function-test.request';
|
|
4
4
|
export * from './function-version.request';
|
|
5
|
-
export * from './function-promotion.request';
|
|
6
|
-
export * from './function-trigger.request';
|
|
7
5
|
export * from './function-run.request';
|
|
8
6
|
export * from './function-settings.request';
|
|
7
|
+
export * from './service.request';
|
|
8
|
+
export * from './service-route.request';
|
|
9
|
+
export * from './service-version.request';
|
|
10
|
+
export * from './service-deployment.request';
|
|
11
|
+
export * from './service-variable.request';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface IListServiceDeploymentParams {
|
|
2
|
+
applicationId: string;
|
|
3
|
+
serviceId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface IListServiceDeploymentQuery {
|
|
6
|
+
/** Only the history of this environment; every environment when absent. */
|
|
7
|
+
environmentId?: string;
|
|
8
|
+
/** 1 to 100, 50 by default. */
|
|
9
|
+
limit?: number;
|
|
10
|
+
/** Gestures skipped, newest first; 0 by default. */
|
|
11
|
+
offset?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IGoLiveServiceParams {
|
|
15
|
+
applicationId: string;
|
|
16
|
+
serviceId: string;
|
|
17
|
+
}
|
|
18
|
+
/** A production environment needs REFLEX_PUBLISH_PRODUCTION, any other REFLEX_PUBLISH. */
|
|
19
|
+
export interface IGoLiveServiceBody {
|
|
20
|
+
/** An environment of the application (abyss-main's id). */
|
|
21
|
+
environmentId: string;
|
|
22
|
+
serviceVersionId: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IRollbackServiceParams {
|
|
26
|
+
applicationId: string;
|
|
27
|
+
serviceId: string;
|
|
28
|
+
}
|
|
29
|
+
export interface IRollbackServiceBody {
|
|
30
|
+
environmentId: string;
|
|
31
|
+
/** A deployment of this environment, from the history: its version is put back in service. */
|
|
32
|
+
deploymentId: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IPauseServiceParams {
|
|
36
|
+
applicationId: string;
|
|
37
|
+
serviceId: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IPauseServiceBody {
|
|
40
|
+
environmentId: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface IResumeServiceParams {
|
|
44
|
+
applicationId: string;
|
|
45
|
+
serviceId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IResumeServiceBody {
|
|
48
|
+
environmentId: string;
|
|
49
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RouteMethod, TriggerAccessMode } from '../../../enum';
|
|
2
|
+
|
|
3
|
+
export interface IListServiceRouteParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
serviceId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ICreateServiceRouteParams {
|
|
9
|
+
applicationId: string;
|
|
10
|
+
serviceId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ICreateServiceRouteBody {
|
|
13
|
+
/** `ANY` only in a `FUNCTIONS` Service. */
|
|
14
|
+
method: RouteMethod;
|
|
15
|
+
/** Segments of `[a-z0-9._~-]` or `:param` joined by `/`, 20 at most; must not hide another route. */
|
|
16
|
+
path: string;
|
|
17
|
+
/** A function of the same Service. */
|
|
18
|
+
functionId: string;
|
|
19
|
+
accessMode: TriggerAccessMode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IUpdateServiceRouteParams {
|
|
23
|
+
applicationId: string;
|
|
24
|
+
serviceId: string;
|
|
25
|
+
routeId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IUpdateServiceRouteBody {
|
|
28
|
+
method?: RouteMethod;
|
|
29
|
+
path?: string;
|
|
30
|
+
functionId?: string;
|
|
31
|
+
accessMode?: TriggerAccessMode;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IDeleteServiceRouteParams {
|
|
35
|
+
applicationId: string;
|
|
36
|
+
serviceId: string;
|
|
37
|
+
routeId: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface IRotateServiceRouteParams {
|
|
41
|
+
applicationId: string;
|
|
42
|
+
serviceId: string;
|
|
43
|
+
routeId: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface IListServiceVariableParams {
|
|
2
|
+
applicationId: string;
|
|
3
|
+
serviceId: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface ISetServiceVariableParams {
|
|
7
|
+
applicationId: string;
|
|
8
|
+
serviceId: string;
|
|
9
|
+
environmentId: string;
|
|
10
|
+
/** `^[A-Z][A-Z0-9_]{0,63}$`. */
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
/** A production environment needs REFLEX_PUBLISH_PRODUCTION, any other REFLEX_FUNCTION_UPDATE. */
|
|
14
|
+
export interface ISetServiceVariableBody {
|
|
15
|
+
/** 4096 characters at most. */
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IDeleteServiceVariableParams {
|
|
20
|
+
applicationId: string;
|
|
21
|
+
serviceId: string;
|
|
22
|
+
environmentId: string;
|
|
23
|
+
name: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IGetServiceSecretStatusParams {
|
|
27
|
+
applicationId: string;
|
|
28
|
+
serviceId: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IListServiceVersionParams {
|
|
2
|
+
applicationId: string;
|
|
3
|
+
serviceId: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface ICreateServiceVersionParams {
|
|
7
|
+
applicationId: string;
|
|
8
|
+
serviceId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICreateServiceVersionBody {
|
|
11
|
+
/** 500 characters at most. */
|
|
12
|
+
message?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IGetServiceVersionParams {
|
|
16
|
+
applicationId: string;
|
|
17
|
+
serviceId: string;
|
|
18
|
+
versionId: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ServiceType } from '../../../enum';
|
|
2
|
+
import type { IReflexServiceCors } from '../../models';
|
|
3
|
+
|
|
4
|
+
export interface IListServiceParams {
|
|
5
|
+
applicationId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ICreateServiceParams {
|
|
9
|
+
applicationId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ICreateServiceBody {
|
|
12
|
+
/** Unique within the application, 1 to 100 characters. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** `^[a-z0-9][a-z0-9-]{0,39}$`, unique within the application, immutable. */
|
|
15
|
+
slug: string;
|
|
16
|
+
type: ServiceType;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IGetServiceParams {
|
|
20
|
+
applicationId: string;
|
|
21
|
+
serviceId: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IUpdateServiceParams {
|
|
25
|
+
applicationId: string;
|
|
26
|
+
serviceId: string;
|
|
27
|
+
}
|
|
28
|
+
/** Changes the draft: the next version freezes `cors` and `rateLimitPerIpPerMinute`. */
|
|
29
|
+
export interface IUpdateServiceBody {
|
|
30
|
+
name?: string;
|
|
31
|
+
cors?: IReflexServiceCors;
|
|
32
|
+
/** 1 to 6000. */
|
|
33
|
+
rateLimitPerIpPerMinute?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface IDeleteServiceParams {
|
|
37
|
+
applicationId: string;
|
|
38
|
+
serviceId: string;
|
|
39
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { IReflexExecutionState, IReflexRun, IReflexRunDetail } from '../../models';
|
|
2
|
-
import type { IResponse } from '../response';
|
|
3
|
-
|
|
4
|
-
export interface IListFunctionRunData {
|
|
5
|
-
/** Newest first. */
|
|
6
|
-
runs: IReflexRun[];
|
|
7
|
-
}
|
|
8
|
-
export type IListFunctionRunResponse = IResponse<IListFunctionRunData>;
|
|
9
|
-
|
|
10
|
-
export interface IGetFunctionRunData {
|
|
11
|
-
run: IReflexRunDetail;
|
|
12
|
-
}
|
|
13
|
-
export type IGetFunctionRunResponse = IResponse<IGetFunctionRunData>;
|
|
14
|
-
|
|
15
|
-
export interface IGetFunctionRunStateData {
|
|
16
|
-
state: IReflexExecutionState;
|
|
17
|
-
}
|
|
18
|
-
export type IGetFunctionRunStateResponse = IResponse<IGetFunctionRunStateData>;
|
|
1
|
+
import type { IReflexExecutionState, IReflexRun, IReflexRunDetail } from '../../models';
|
|
2
|
+
import type { IResponse } from '../response';
|
|
3
|
+
|
|
4
|
+
export interface IListFunctionRunData {
|
|
5
|
+
/** Newest first. */
|
|
6
|
+
runs: IReflexRun[];
|
|
7
|
+
}
|
|
8
|
+
export type IListFunctionRunResponse = IResponse<IListFunctionRunData>;
|
|
9
|
+
|
|
10
|
+
export interface IGetFunctionRunData {
|
|
11
|
+
run: IReflexRunDetail;
|
|
12
|
+
}
|
|
13
|
+
export type IGetFunctionRunResponse = IResponse<IGetFunctionRunData>;
|
|
14
|
+
|
|
15
|
+
export interface IGetFunctionRunStateData {
|
|
16
|
+
state: IReflexExecutionState;
|
|
17
|
+
}
|
|
18
|
+
export type IGetFunctionRunStateResponse = IResponse<IGetFunctionRunStateData>;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IReflexEffectiveExecutionSettings,
|
|
3
|
-
IReflexExecutionSettings,
|
|
4
|
-
IReflexExecutionSettingsValues,
|
|
5
|
-
IReflexPriceList,
|
|
6
|
-
} from '../../models';
|
|
7
|
-
import type { IResponse } from '../response';
|
|
8
|
-
|
|
9
|
-
export interface IGetFunctionSettingsData {
|
|
10
|
-
/** The default of the function; null when none is set. */
|
|
11
|
-
default: IReflexExecutionSettings | null;
|
|
12
|
-
/** The override of each environment that has one. */
|
|
13
|
-
environments: IReflexExecutionSettings[];
|
|
14
|
-
/** What each
|
|
15
|
-
effective: IReflexEffectiveExecutionSettings[];
|
|
16
|
-
/** What applies when neither the environment nor the function sets anything. */
|
|
17
|
-
builtIn: IReflexExecutionSettingsValues;
|
|
18
|
-
/** The price list an execution is billed with, to estimate the cost of a setting. */
|
|
19
|
-
priceList: IReflexPriceList;
|
|
20
|
-
}
|
|
21
|
-
export type IGetFunctionSettingsResponse = IResponse<IGetFunctionSettingsData>;
|
|
22
|
-
|
|
23
|
-
export interface ISetFunctionDefaultSettingsData {
|
|
24
|
-
settings: IReflexExecutionSettings;
|
|
25
|
-
}
|
|
26
|
-
export type ISetFunctionDefaultSettingsResponse = IResponse<ISetFunctionDefaultSettingsData>;
|
|
27
|
-
|
|
28
|
-
export interface ISetFunctionEnvironmentSettingsData {
|
|
29
|
-
settings: IReflexExecutionSettings;
|
|
30
|
-
}
|
|
31
|
-
export type ISetFunctionEnvironmentSettingsResponse =
|
|
32
|
-
IResponse<ISetFunctionEnvironmentSettingsData>;
|
|
33
|
-
|
|
34
|
-
export type IRemoveFunctionEnvironmentSettingsData = Record<string, never>;
|
|
35
|
-
export type IRemoveFunctionEnvironmentSettingsResponse =
|
|
36
|
-
IResponse<IRemoveFunctionEnvironmentSettingsData>;
|
|
1
|
+
import type {
|
|
2
|
+
IReflexEffectiveExecutionSettings,
|
|
3
|
+
IReflexExecutionSettings,
|
|
4
|
+
IReflexExecutionSettingsValues,
|
|
5
|
+
IReflexPriceList,
|
|
6
|
+
} from '../../models';
|
|
7
|
+
import type { IResponse } from '../response';
|
|
8
|
+
|
|
9
|
+
export interface IGetFunctionSettingsData {
|
|
10
|
+
/** The default of the function; null when none is set. */
|
|
11
|
+
default: IReflexExecutionSettings | null;
|
|
12
|
+
/** The override of each environment that has one. */
|
|
13
|
+
environments: IReflexExecutionSettings[];
|
|
14
|
+
/** What each environment of the application runs with. */
|
|
15
|
+
effective: IReflexEffectiveExecutionSettings[];
|
|
16
|
+
/** What applies when neither the environment nor the function sets anything. */
|
|
17
|
+
builtIn: IReflexExecutionSettingsValues;
|
|
18
|
+
/** The price list an execution is billed with, to estimate the cost of a setting. */
|
|
19
|
+
priceList: IReflexPriceList;
|
|
20
|
+
}
|
|
21
|
+
export type IGetFunctionSettingsResponse = IResponse<IGetFunctionSettingsData>;
|
|
22
|
+
|
|
23
|
+
export interface ISetFunctionDefaultSettingsData {
|
|
24
|
+
settings: IReflexExecutionSettings;
|
|
25
|
+
}
|
|
26
|
+
export type ISetFunctionDefaultSettingsResponse = IResponse<ISetFunctionDefaultSettingsData>;
|
|
27
|
+
|
|
28
|
+
export interface ISetFunctionEnvironmentSettingsData {
|
|
29
|
+
settings: IReflexExecutionSettings;
|
|
30
|
+
}
|
|
31
|
+
export type ISetFunctionEnvironmentSettingsResponse =
|
|
32
|
+
IResponse<ISetFunctionEnvironmentSettingsData>;
|
|
33
|
+
|
|
34
|
+
export type IRemoveFunctionEnvironmentSettingsData = Record<string, never>;
|
|
35
|
+
export type IRemoveFunctionEnvironmentSettingsResponse =
|
|
36
|
+
IResponse<IRemoveFunctionEnvironmentSettingsData>;
|
|
@@ -10,11 +10,6 @@ export interface IListFunctionVersionData {
|
|
|
10
10
|
}
|
|
11
11
|
export type IListFunctionVersionResponse = IResponse<IListFunctionVersionData>;
|
|
12
12
|
|
|
13
|
-
export interface IPublishFunctionVersionData {
|
|
14
|
-
version: IReflexFunctionVersion;
|
|
15
|
-
}
|
|
16
|
-
export type IPublishFunctionVersionResponse = IResponse<IPublishFunctionVersionData>;
|
|
17
|
-
|
|
18
13
|
export interface IGetFunctionVersionData {
|
|
19
14
|
version: IReflexFunctionVersion;
|
|
20
15
|
}
|
|
@@ -2,7 +2,10 @@ export * from './function.response';
|
|
|
2
2
|
export * from './function-access.response';
|
|
3
3
|
export * from './function-test.response';
|
|
4
4
|
export * from './function-version.response';
|
|
5
|
-
export * from './function-promotion.response';
|
|
6
|
-
export * from './function-trigger.response';
|
|
7
5
|
export * from './function-run.response';
|
|
8
6
|
export * from './function-settings.response';
|
|
7
|
+
export * from './service.response';
|
|
8
|
+
export * from './service-route.response';
|
|
9
|
+
export * from './service-version.response';
|
|
10
|
+
export * from './service-deployment.response';
|
|
11
|
+
export * from './service-variable.response';
|
|
@@ -0,0 +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>;
|
|
@@ -0,0 +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>;
|