@abyss-project/reflex 0.0.0-stage → 1.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/.eslintrc.js +32 -0
- package/.prettierrc +5 -0
- package/README.md +15 -3
- package/dist/api/function-access.api.d.ts +4 -0
- package/dist/api/function-access.api.js +12 -0
- package/dist/api/function-access.api.js.map +1 -0
- package/dist/api/function-promotion.api.d.ts +4 -0
- package/dist/api/function-promotion.api.js +12 -0
- package/dist/api/function-promotion.api.js.map +1 -0
- package/dist/api/function-run.api.d.ts +3 -0
- package/dist/api/function-run.api.js +12 -0
- package/dist/api/function-run.api.js.map +1 -0
- package/dist/api/function-test.api.d.ts +3 -0
- package/dist/api/function-test.api.js +12 -0
- package/dist/api/function-test.api.js.map +1 -0
- package/dist/api/function-trigger.api.d.ts +5 -0
- package/dist/api/function-trigger.api.js +14 -0
- package/dist/api/function-trigger.api.js.map +1 -0
- package/dist/api/function-version.api.d.ts +4 -0
- package/dist/api/function-version.api.js +12 -0
- package/dist/api/function-version.api.js.map +1 -0
- package/dist/api/function.api.d.ts +6 -0
- package/dist/api/function.api.js +16 -0
- package/dist/api/function.api.js.map +1 -0
- package/dist/api/health.api.d.ts +2 -0
- package/dist/api/health.api.js +7 -0
- package/dist/api/health.api.js.map +1 -0
- package/dist/api/index.d.ts +8 -0
- package/dist/api/index.js +25 -0
- package/dist/api/index.js.map +1 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.js +122 -0
- package/dist/index.js.map +1 -0
- package/dist/types/enum/access-grant-status.enum.d.ts +5 -0
- package/dist/types/enum/access-grant-status.enum.js +10 -0
- package/dist/types/enum/access-grant-status.enum.js.map +1 -0
- package/dist/types/enum/access-kind.enum.d.ts +4 -0
- package/dist/types/enum/access-kind.enum.js +9 -0
- package/dist/types/enum/access-kind.enum.js.map +1 -0
- package/dist/types/enum/health-status.enum.d.ts +4 -0
- package/dist/types/enum/health-status.enum.js +9 -0
- package/dist/types/enum/health-status.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +9 -0
- package/dist/types/enum/index.js +26 -0
- package/dist/types/enum/index.js.map +1 -0
- package/dist/types/enum/reflex-error-code.enum.d.ts +10 -0
- package/dist/types/enum/reflex-error-code.enum.js +15 -0
- package/dist/types/enum/reflex-error-code.enum.js.map +1 -0
- package/dist/types/enum/run-mode.enum.d.ts +5 -0
- package/dist/types/enum/run-mode.enum.js +10 -0
- package/dist/types/enum/run-mode.enum.js.map +1 -0
- package/dist/types/enum/run-status.enum.d.ts +4 -0
- package/dist/types/enum/run-status.enum.js +9 -0
- package/dist/types/enum/run-status.enum.js.map +1 -0
- package/dist/types/enum/trace-effect-type.enum.d.ts +5 -0
- package/dist/types/enum/trace-effect-type.enum.js +10 -0
- package/dist/types/enum/trace-effect-type.enum.js.map +1 -0
- package/dist/types/enum/trigger-access-mode.enum.d.ts +5 -0
- package/dist/types/enum/trigger-access-mode.enum.js +10 -0
- package/dist/types/enum/trigger-access-mode.enum.js.map +1 -0
- package/dist/types/enum/trigger-type.enum.d.ts +3 -0
- package/dist/types/enum/trigger-type.enum.js +8 -0
- package/dist/types/enum/trigger-type.enum.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/interface/api/index.d.ts +3 -0
- package/dist/types/interface/api/index.js +20 -0
- package/dist/types/interface/api/index.js.map +1 -0
- package/dist/types/interface/api/requests/function-access.request.d.ts +17 -0
- package/dist/types/interface/api/requests/function-access.request.js +3 -0
- package/dist/types/interface/api/requests/function-access.request.js.map +1 -0
- package/dist/types/interface/api/requests/function-promotion.request.d.ts +20 -0
- package/dist/types/interface/api/requests/function-promotion.request.js +3 -0
- package/dist/types/interface/api/requests/function-promotion.request.js.map +1 -0
- package/dist/types/interface/api/requests/function-run.request.d.ts +15 -0
- package/dist/types/interface/api/requests/function-run.request.js +3 -0
- package/dist/types/interface/api/requests/function-run.request.js.map +1 -0
- package/dist/types/interface/api/requests/function-test.request.d.ts +14 -0
- package/dist/types/interface/api/requests/function-test.request.js +3 -0
- package/dist/types/interface/api/requests/function-test.request.js.map +1 -0
- package/dist/types/interface/api/requests/function-trigger.request.d.ts +23 -0
- package/dist/types/interface/api/requests/function-trigger.request.js +3 -0
- package/dist/types/interface/api/requests/function-trigger.request.js.map +1 -0
- package/dist/types/interface/api/requests/function-version.request.d.ts +13 -0
- package/dist/types/interface/api/requests/function-version.request.js +3 -0
- package/dist/types/interface/api/requests/function-version.request.js.map +1 -0
- package/dist/types/interface/api/requests/function.request.d.ts +27 -0
- package/dist/types/interface/api/requests/function.request.js +3 -0
- package/dist/types/interface/api/requests/function.request.js.map +1 -0
- package/dist/types/interface/api/requests/index.d.ts +7 -0
- package/dist/types/interface/api/requests/index.js +24 -0
- package/dist/types/interface/api/requests/index.js.map +1 -0
- package/dist/types/interface/api/response.d.ts +3 -0
- package/dist/types/interface/api/response.js +3 -0
- package/dist/types/interface/api/response.js.map +1 -0
- package/dist/types/interface/api/responses/function-access.response.d.ts +14 -0
- package/dist/types/interface/api/responses/function-access.response.js +3 -0
- package/dist/types/interface/api/responses/function-access.response.js.map +1 -0
- package/dist/types/interface/api/responses/function-promotion.response.d.ts +14 -0
- package/dist/types/interface/api/responses/function-promotion.response.js +3 -0
- package/dist/types/interface/api/responses/function-promotion.response.js.map +1 -0
- package/dist/types/interface/api/responses/function-run.response.d.ts +10 -0
- package/dist/types/interface/api/responses/function-run.response.js +3 -0
- package/dist/types/interface/api/responses/function-run.response.js.map +1 -0
- package/dist/types/interface/api/responses/function-test.response.d.ts +10 -0
- package/dist/types/interface/api/responses/function-test.response.js +3 -0
- package/dist/types/interface/api/responses/function-test.response.js.map +1 -0
- package/dist/types/interface/api/responses/function-trigger.response.d.ts +18 -0
- package/dist/types/interface/api/responses/function-trigger.response.js +3 -0
- package/dist/types/interface/api/responses/function-trigger.response.js.map +1 -0
- package/dist/types/interface/api/responses/function-version.response.d.ts +14 -0
- package/dist/types/interface/api/responses/function-version.response.js +3 -0
- package/dist/types/interface/api/responses/function-version.response.js.map +1 -0
- package/dist/types/interface/api/responses/function.response.d.ts +20 -0
- package/dist/types/interface/api/responses/function.response.js +3 -0
- package/dist/types/interface/api/responses/function.response.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +7 -0
- package/dist/types/interface/api/responses/index.js +24 -0
- package/dist/types/interface/api/responses/index.js.map +1 -0
- package/dist/types/interface/health.response.d.ts +5 -0
- package/dist/types/interface/health.response.js +3 -0
- package/dist/types/interface/health.response.js.map +1 -0
- package/dist/types/interface/index.d.ts +3 -0
- package/dist/types/interface/index.js +20 -0
- package/dist/types/interface/index.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +7 -0
- package/dist/types/interface/models/index.js +24 -0
- package/dist/types/interface/models/index.js.map +1 -0
- package/dist/types/interface/models/reflex-access-grant.model.d.ts +13 -0
- package/dist/types/interface/models/reflex-access-grant.model.js +3 -0
- package/dist/types/interface/models/reflex-access-grant.model.js.map +1 -0
- package/dist/types/interface/models/reflex-definition.model.d.ts +15 -0
- package/dist/types/interface/models/reflex-definition.model.js +3 -0
- package/dist/types/interface/models/reflex-definition.model.js.map +1 -0
- package/dist/types/interface/models/reflex-environment-pointer.model.d.ts +13 -0
- package/dist/types/interface/models/reflex-environment-pointer.model.js +3 -0
- package/dist/types/interface/models/reflex-environment-pointer.model.js.map +1 -0
- package/dist/types/interface/models/reflex-function-version.model.d.ts +10 -0
- package/dist/types/interface/models/reflex-function-version.model.js +3 -0
- package/dist/types/interface/models/reflex-function-version.model.js.map +1 -0
- package/dist/types/interface/models/reflex-function.model.d.ts +12 -0
- package/dist/types/interface/models/reflex-function.model.js +3 -0
- package/dist/types/interface/models/reflex-function.model.js.map +1 -0
- package/dist/types/interface/models/reflex-run.model.d.ts +46 -0
- package/dist/types/interface/models/reflex-run.model.js +3 -0
- package/dist/types/interface/models/reflex-run.model.js.map +1 -0
- package/dist/types/interface/models/reflex-trigger.model.d.ts +13 -0
- package/dist/types/interface/models/reflex-trigger.model.js +3 -0
- package/dist/types/interface/models/reflex-trigger.model.js.map +1 -0
- package/jest.config.ts +11 -0
- package/package.json +41 -3
- package/src/api/function-access.api.ts +36 -0
- package/src/api/function-promotion.api.ts +42 -0
- package/src/api/function-run.api.ts +26 -0
- package/src/api/function-test.api.ts +33 -0
- package/src/api/function-trigger.api.ts +52 -0
- package/src/api/function-version.api.ts +37 -0
- package/src/api/function.api.test.ts +212 -0
- package/src/api/function.api.ts +62 -0
- package/src/api/health.api.ts +10 -0
- package/src/api/index.ts +8 -0
- package/src/index.test.ts +50 -0
- package/src/index.ts +135 -0
- package/src/types/enum/access-grant-status.enum.ts +12 -0
- package/src/types/enum/access-kind.enum.ts +7 -0
- package/src/types/enum/health-status.enum.ts +4 -0
- package/src/types/enum/index.ts +9 -0
- package/src/types/enum/reflex-error-code.enum.ts +19 -0
- package/src/types/enum/run-mode.enum.ts +11 -0
- package/src/types/enum/run-status.enum.ts +4 -0
- package/src/types/enum/trace-effect-type.enum.ts +6 -0
- package/src/types/enum/trigger-access-mode.enum.ts +12 -0
- package/src/types/enum/trigger-type.enum.ts +4 -0
- package/src/types/index.ts +2 -0
- package/src/types/interface/api/index.ts +3 -0
- package/src/types/interface/api/requests/function-access.request.ts +25 -0
- package/src/types/interface/api/requests/function-promotion.request.ts +25 -0
- package/src/types/interface/api/requests/function-run.request.ts +19 -0
- package/src/types/interface/api/requests/function-test.request.ts +19 -0
- package/src/types/interface/api/requests/function-trigger.request.ts +28 -0
- package/src/types/interface/api/requests/function-version.request.ts +15 -0
- package/src/types/interface/api/requests/function.request.ts +34 -0
- package/src/types/interface/api/requests/index.ts +7 -0
- package/src/types/interface/api/response.ts +4 -0
- package/src/types/interface/api/responses/function-access.response.ts +17 -0
- package/src/types/interface/api/responses/function-promotion.response.ts +18 -0
- package/src/types/interface/api/responses/function-run.response.ts +13 -0
- package/src/types/interface/api/responses/function-test.response.ts +12 -0
- package/src/types/interface/api/responses/function-trigger.response.ts +24 -0
- package/src/types/interface/api/responses/function-version.response.ts +17 -0
- package/src/types/interface/api/responses/function.response.ts +25 -0
- package/src/types/interface/api/responses/index.ts +7 -0
- package/src/types/interface/health.response.ts +7 -0
- package/src/types/interface/index.ts +3 -0
- package/src/types/interface/models/index.ts +7 -0
- package/src/types/interface/models/reflex-access-grant.model.ts +14 -0
- package/src/types/interface/models/reflex-definition.model.ts +23 -0
- package/src/types/interface/models/reflex-environment-pointer.model.ts +18 -0
- package/src/types/interface/models/reflex-function-version.model.ts +14 -0
- package/src/types/interface/models/reflex-function.model.ts +14 -0
- package/src/types/interface/models/reflex-run.model.ts +57 -0
- package/src/types/interface/models/reflex-trigger.model.ts +17 -0
- package/tsconfig.check.json +15 -0
- package/tsconfig.json +35 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { AxiosAdapter, InternalAxiosRequestConfig } from 'axios';
|
|
2
|
+
import { AbyssReflexCore } from '..';
|
|
3
|
+
|
|
4
|
+
const APP = 'app-1';
|
|
5
|
+
const FN = 'fn-1';
|
|
6
|
+
const BASE = `api/function/${APP}/${FN}`;
|
|
7
|
+
|
|
8
|
+
interface Call {
|
|
9
|
+
label: string;
|
|
10
|
+
method: string;
|
|
11
|
+
url: string;
|
|
12
|
+
body?: unknown;
|
|
13
|
+
params?: unknown;
|
|
14
|
+
run: () => Promise<unknown>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const sdk = () => AbyssReflexCore.sdk.function;
|
|
18
|
+
|
|
19
|
+
const calls: Call[] = [
|
|
20
|
+
{
|
|
21
|
+
label: 'list',
|
|
22
|
+
method: 'get',
|
|
23
|
+
url: `api/function/${APP}`,
|
|
24
|
+
run: () => sdk().list({ applicationId: APP }),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'create',
|
|
28
|
+
method: 'post',
|
|
29
|
+
url: `api/function/${APP}`,
|
|
30
|
+
body: { name: 'hello' },
|
|
31
|
+
run: () => sdk().create({ applicationId: APP }, { name: 'hello' }),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: 'get',
|
|
35
|
+
method: 'get',
|
|
36
|
+
url: BASE,
|
|
37
|
+
run: () => sdk().get({ applicationId: APP, functionId: FN }),
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'update',
|
|
41
|
+
method: 'put',
|
|
42
|
+
url: BASE,
|
|
43
|
+
body: { name: 'renamed' },
|
|
44
|
+
run: () => sdk().update({ applicationId: APP, functionId: FN }, { name: 'renamed' }),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'delete',
|
|
48
|
+
method: 'delete',
|
|
49
|
+
url: BASE,
|
|
50
|
+
run: () => sdk().delete({ applicationId: APP, functionId: FN }),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'access.list',
|
|
54
|
+
method: 'get',
|
|
55
|
+
url: `${BASE}/access`,
|
|
56
|
+
run: () => sdk().access.list({ applicationId: APP, functionId: FN }),
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
label: 'access.grant',
|
|
60
|
+
method: 'post',
|
|
61
|
+
url: `${BASE}/access`,
|
|
62
|
+
body: { declaration: { kind: 'HOST_ACTION', action: 'store.get' } },
|
|
63
|
+
run: () =>
|
|
64
|
+
sdk().access.grant(
|
|
65
|
+
{ applicationId: APP, functionId: FN },
|
|
66
|
+
{ declaration: { kind: 'HOST_ACTION', action: 'store.get' } as never },
|
|
67
|
+
),
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: 'access.revoke',
|
|
71
|
+
method: 'delete',
|
|
72
|
+
url: `${BASE}/access/g-1`,
|
|
73
|
+
run: () => sdk().access.revoke({ applicationId: APP, functionId: FN, grantId: 'g-1' }),
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: 'test.simulate',
|
|
77
|
+
method: 'post',
|
|
78
|
+
url: `${BASE}/test/simulate`,
|
|
79
|
+
body: { input: { a: 1 } },
|
|
80
|
+
run: () => sdk().test.simulate({ applicationId: APP, functionId: FN }, { input: { a: 1 } }),
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: 'test.dryRun',
|
|
84
|
+
method: 'post',
|
|
85
|
+
url: `${BASE}/test/dry-run`,
|
|
86
|
+
body: {},
|
|
87
|
+
run: () => sdk().test.dryRun({ applicationId: APP, functionId: FN }),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: 'version.list',
|
|
91
|
+
method: 'get',
|
|
92
|
+
url: `${BASE}/version`,
|
|
93
|
+
run: () => sdk().version.list({ applicationId: APP, functionId: FN }),
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: 'version.publish',
|
|
97
|
+
method: 'post',
|
|
98
|
+
url: `${BASE}/version`,
|
|
99
|
+
body: {},
|
|
100
|
+
run: () => sdk().version.publish({ applicationId: APP, functionId: FN }),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: 'version.get',
|
|
104
|
+
method: 'get',
|
|
105
|
+
url: `${BASE}/version/v-1`,
|
|
106
|
+
run: () => sdk().version.get({ applicationId: APP, functionId: FN, versionId: 'v-1' }),
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
label: 'promotion.list',
|
|
110
|
+
method: 'get',
|
|
111
|
+
url: `${BASE}/promotion`,
|
|
112
|
+
run: () => sdk().promotion.list({ applicationId: APP, functionId: FN }),
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label: 'promotion.promote',
|
|
116
|
+
method: 'post',
|
|
117
|
+
url: `${BASE}/promotion`,
|
|
118
|
+
body: { versionId: 'v-1', environmentId: 'e-1' },
|
|
119
|
+
run: () =>
|
|
120
|
+
sdk().promotion.promote(
|
|
121
|
+
{ applicationId: APP, functionId: FN },
|
|
122
|
+
{ versionId: 'v-1', environmentId: 'e-1' },
|
|
123
|
+
),
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label: 'promotion.rollback',
|
|
127
|
+
method: 'post',
|
|
128
|
+
url: `${BASE}/promotion/rollback`,
|
|
129
|
+
body: { environmentId: 'e-1' },
|
|
130
|
+
run: () =>
|
|
131
|
+
sdk().promotion.rollback({ applicationId: APP, functionId: FN }, { environmentId: 'e-1' }),
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: 'trigger.list',
|
|
135
|
+
method: 'get',
|
|
136
|
+
url: `${BASE}/trigger`,
|
|
137
|
+
run: () => sdk().trigger.list({ applicationId: APP, functionId: FN }),
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
label: 'trigger.create',
|
|
141
|
+
method: 'post',
|
|
142
|
+
url: `${BASE}/trigger`,
|
|
143
|
+
body: { path: 'hello', accessMode: 'PUBLIC' },
|
|
144
|
+
run: () =>
|
|
145
|
+
sdk().trigger.create(
|
|
146
|
+
{ applicationId: APP, functionId: FN },
|
|
147
|
+
{ path: 'hello', accessMode: 'PUBLIC' as never },
|
|
148
|
+
),
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
label: 'trigger.rotate',
|
|
152
|
+
method: 'post',
|
|
153
|
+
url: `${BASE}/trigger/t-1/rotate`,
|
|
154
|
+
body: {},
|
|
155
|
+
run: () => sdk().trigger.rotate({ applicationId: APP, functionId: FN, triggerId: 't-1' }),
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: 'trigger.delete',
|
|
159
|
+
method: 'delete',
|
|
160
|
+
url: `${BASE}/trigger/t-1`,
|
|
161
|
+
run: () => sdk().trigger.delete({ applicationId: APP, functionId: FN, triggerId: 't-1' }),
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
label: 'run.list',
|
|
165
|
+
method: 'get',
|
|
166
|
+
url: `${BASE}/run`,
|
|
167
|
+
params: { limit: 5 },
|
|
168
|
+
run: () => sdk().run.list({ applicationId: APP, functionId: FN }, { limit: 5 }),
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label: 'run.get',
|
|
172
|
+
method: 'get',
|
|
173
|
+
url: `${BASE}/run/r-1`,
|
|
174
|
+
run: () => sdk().run.get({ applicationId: APP, functionId: FN, runId: 'r-1' }),
|
|
175
|
+
},
|
|
176
|
+
];
|
|
177
|
+
|
|
178
|
+
describe('AbyssReflexCore function routes', () => {
|
|
179
|
+
const adapter = jest.fn<ReturnType<AxiosAdapter>, [InternalAxiosRequestConfig]>(
|
|
180
|
+
async (config) => ({ data: { data: {} }, status: 200, statusText: '', headers: {}, config }),
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
beforeAll(() => {
|
|
184
|
+
AbyssReflexCore.setConfig({ baseURL: 'http://reflex.test/', token: 'session-token' });
|
|
185
|
+
AbyssReflexCore.axios.defaults.adapter = adapter;
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
beforeEach(() => adapter.mockClear());
|
|
189
|
+
|
|
190
|
+
it.each(calls)('$label calls $method $url', async (call) => {
|
|
191
|
+
await call.run();
|
|
192
|
+
|
|
193
|
+
const config = adapter.mock.calls[0][0];
|
|
194
|
+
expect(config.method).toBe(call.method);
|
|
195
|
+
expect(config.url).toBe(call.url);
|
|
196
|
+
expect(config.baseURL).toBe('http://reflex.test/');
|
|
197
|
+
expect(config.params).toEqual(call.params);
|
|
198
|
+
if (call.body !== undefined) {
|
|
199
|
+
expect(JSON.parse(config.data)).toEqual(call.body);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
it('sends the session token of the member as a bearer token', async () => {
|
|
204
|
+
await calls[0].run();
|
|
205
|
+
|
|
206
|
+
expect(adapter.mock.calls[0][0].headers.get('Authorization')).toBe('Bearer session-token');
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it('exposes no route twice', () => {
|
|
210
|
+
expect(new Set(calls.map((call) => `${call.method} ${call.url}`)).size).toBe(calls.length);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AbyssReflexCore } from '..';
|
|
2
|
+
import type {
|
|
3
|
+
ICreateFunctionBody,
|
|
4
|
+
ICreateFunctionParams,
|
|
5
|
+
ICreateFunctionResponse,
|
|
6
|
+
IDeleteFunctionParams,
|
|
7
|
+
IDeleteFunctionResponse,
|
|
8
|
+
IGetFunctionParams,
|
|
9
|
+
IGetFunctionResponse,
|
|
10
|
+
IListFunctionParams,
|
|
11
|
+
IListFunctionResponse,
|
|
12
|
+
IUpdateFunctionBody,
|
|
13
|
+
IUpdateFunctionParams,
|
|
14
|
+
IUpdateFunctionResponse,
|
|
15
|
+
} from '../types';
|
|
16
|
+
|
|
17
|
+
/** `GET /api/function/:applicationId`: needs REFLEX_READ. */
|
|
18
|
+
export const listFunction = async (params: IListFunctionParams): Promise<IListFunctionResponse> =>
|
|
19
|
+
(await AbyssReflexCore.axios.get<IListFunctionResponse>(`api/function/${params.applicationId}`))
|
|
20
|
+
.data;
|
|
21
|
+
|
|
22
|
+
/** `POST /api/function/:applicationId`: needs REFLEX_FUNCTION_CREATE. A definition that breaks the format is a `400` naming the path of each fault. */
|
|
23
|
+
export const createFunction = async (
|
|
24
|
+
params: ICreateFunctionParams,
|
|
25
|
+
body: ICreateFunctionBody,
|
|
26
|
+
): Promise<ICreateFunctionResponse> =>
|
|
27
|
+
(
|
|
28
|
+
await AbyssReflexCore.axios.post<ICreateFunctionResponse>(
|
|
29
|
+
`api/function/${params.applicationId}`,
|
|
30
|
+
body,
|
|
31
|
+
)
|
|
32
|
+
).data;
|
|
33
|
+
|
|
34
|
+
/** `GET /api/function/:applicationId/:functionId`: needs REFLEX_READ. */
|
|
35
|
+
export const getFunction = async (params: IGetFunctionParams): Promise<IGetFunctionResponse> =>
|
|
36
|
+
(
|
|
37
|
+
await AbyssReflexCore.axios.get<IGetFunctionResponse>(
|
|
38
|
+
`api/function/${params.applicationId}/${params.functionId}`,
|
|
39
|
+
)
|
|
40
|
+
).data;
|
|
41
|
+
|
|
42
|
+
/** `PUT /api/function/:applicationId/:functionId`: needs REFLEX_FUNCTION_UPDATE. */
|
|
43
|
+
export const updateFunction = async (
|
|
44
|
+
params: IUpdateFunctionParams,
|
|
45
|
+
body: IUpdateFunctionBody,
|
|
46
|
+
): Promise<IUpdateFunctionResponse> =>
|
|
47
|
+
(
|
|
48
|
+
await AbyssReflexCore.axios.put<IUpdateFunctionResponse>(
|
|
49
|
+
`api/function/${params.applicationId}/${params.functionId}`,
|
|
50
|
+
body,
|
|
51
|
+
)
|
|
52
|
+
).data;
|
|
53
|
+
|
|
54
|
+
/** `DELETE /api/function/:applicationId/:functionId`: needs REFLEX_FUNCTION_DELETE. Takes the function off every environment. */
|
|
55
|
+
export const deleteFunction = async (
|
|
56
|
+
params: IDeleteFunctionParams,
|
|
57
|
+
): Promise<IDeleteFunctionResponse> =>
|
|
58
|
+
(
|
|
59
|
+
await AbyssReflexCore.axios.delete<IDeleteFunctionResponse>(
|
|
60
|
+
`api/function/${params.applicationId}/${params.functionId}`,
|
|
61
|
+
)
|
|
62
|
+
).data;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbyssReflexCore } from '..';
|
|
2
|
+
import type { IHealthResponse } from '../types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `GET /health` — status of the database and Redis behind the API. Resolves on `200`; a `503`
|
|
6
|
+
* (a component down) rejects as an axios error whose `response.data` is the same
|
|
7
|
+
* {@link IHealthResponse}, naming the component that failed.
|
|
8
|
+
*/
|
|
9
|
+
export const health = async (): Promise<IHealthResponse> =>
|
|
10
|
+
(await AbyssReflexCore.axios.get<IHealthResponse>('health')).data;
|
package/src/api/index.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './health.api';
|
|
2
|
+
export * from './function.api';
|
|
3
|
+
export * from './function-access.api';
|
|
4
|
+
export * from './function-test.api';
|
|
5
|
+
export * from './function-version.api';
|
|
6
|
+
export * from './function-promotion.api';
|
|
7
|
+
export * from './function-trigger.api';
|
|
8
|
+
export * from './function-run.api';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { AxiosAdapter, AxiosError, InternalAxiosRequestConfig } from 'axios';
|
|
2
|
+
import { AbyssReflexCore, HealthStatus, IHealthResponse } from '.';
|
|
3
|
+
|
|
4
|
+
const answer =
|
|
5
|
+
(status: number, data: IHealthResponse): AxiosAdapter =>
|
|
6
|
+
async (config: InternalAxiosRequestConfig) => {
|
|
7
|
+
const response = { data, status, statusText: '', headers: {}, config };
|
|
8
|
+
if (status >= 400) {
|
|
9
|
+
throw new AxiosError('failed', 'ERR_BAD_RESPONSE', config, null, response);
|
|
10
|
+
}
|
|
11
|
+
return response;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
describe('AbyssReflexCore', () => {
|
|
15
|
+
it('points at the production API until setConfig says otherwise', () => {
|
|
16
|
+
expect(AbyssReflexCore.getConfig().baseURL).toBe('https://reflex-api.abyss-project.fr/');
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('setConfig changes the base URL of the axios instance', () => {
|
|
20
|
+
AbyssReflexCore.setConfig({ baseURL: 'http://localhost:10141/' });
|
|
21
|
+
expect(AbyssReflexCore.axios.defaults.baseURL).toBe('http://localhost:10141/');
|
|
22
|
+
expect(AbyssReflexCore.getConfig().baseURL).toBe('http://localhost:10141/');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('health() calls GET /health on the configured URL and returns the typed body', async () => {
|
|
26
|
+
const adapter = jest.fn(answer(200, { database: HealthStatus.UP, redis: HealthStatus.UP }));
|
|
27
|
+
AbyssReflexCore.setConfig({ baseURL: 'http://reflex.test/' });
|
|
28
|
+
AbyssReflexCore.axios.defaults.adapter = adapter;
|
|
29
|
+
|
|
30
|
+
const body = await AbyssReflexCore.sdk.health();
|
|
31
|
+
|
|
32
|
+
expect(body).toEqual({ database: 'up', redis: 'up' });
|
|
33
|
+
const config = adapter.mock.calls[0][0];
|
|
34
|
+
expect(config.method).toBe('get');
|
|
35
|
+
expect(config.url).toBe('health');
|
|
36
|
+
expect(config.baseURL).toBe('http://reflex.test/');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('health() rejects on a 503 and the error carries the component that is down', async () => {
|
|
40
|
+
AbyssReflexCore.axios.defaults.adapter = answer(503, {
|
|
41
|
+
database: HealthStatus.DOWN,
|
|
42
|
+
redis: HealthStatus.UP,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const error = await AbyssReflexCore.sdk.health().catch((e: AxiosError<IHealthResponse>) => e);
|
|
46
|
+
|
|
47
|
+
expect((error as AxiosError<IHealthResponse>).response?.status).toBe(503);
|
|
48
|
+
expect((error as AxiosError<IHealthResponse>).response?.data.database).toBe(HealthStatus.DOWN);
|
|
49
|
+
});
|
|
50
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import * as healthApi from './api/health.api';
|
|
3
|
+
import * as functionApi from './api/function.api';
|
|
4
|
+
import * as functionAccessApi from './api/function-access.api';
|
|
5
|
+
import * as functionTestApi from './api/function-test.api';
|
|
6
|
+
import * as functionVersionApi from './api/function-version.api';
|
|
7
|
+
import * as functionPromotionApi from './api/function-promotion.api';
|
|
8
|
+
import * as functionTriggerApi from './api/function-trigger.api';
|
|
9
|
+
import * as functionRunApi from './api/function-run.api';
|
|
10
|
+
|
|
11
|
+
export * from './api';
|
|
12
|
+
export * from './types';
|
|
13
|
+
|
|
14
|
+
const DEFAULT_BASE_URL = 'https://reflex-api.abyss-project.fr/';
|
|
15
|
+
|
|
16
|
+
type CoreConfig = {
|
|
17
|
+
baseURL?: string;
|
|
18
|
+
/** The session token of the member (`Authorization: Bearer`). Every route but `health` needs it. */
|
|
19
|
+
token?: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type AbyssReflexCoreSDK = {
|
|
23
|
+
/** `GET /health` — status of the database and Redis behind the API. */
|
|
24
|
+
health: typeof healthApi.health;
|
|
25
|
+
function: {
|
|
26
|
+
list: typeof functionApi.listFunction;
|
|
27
|
+
create: typeof functionApi.createFunction;
|
|
28
|
+
get: typeof functionApi.getFunction;
|
|
29
|
+
update: typeof functionApi.updateFunction;
|
|
30
|
+
delete: typeof functionApi.deleteFunction;
|
|
31
|
+
access: {
|
|
32
|
+
list: typeof functionAccessApi.listFunctionAccess;
|
|
33
|
+
grant: typeof functionAccessApi.grantFunctionAccess;
|
|
34
|
+
revoke: typeof functionAccessApi.revokeFunctionAccess;
|
|
35
|
+
};
|
|
36
|
+
test: {
|
|
37
|
+
simulate: typeof functionTestApi.simulateFunction;
|
|
38
|
+
dryRun: typeof functionTestApi.dryRunFunction;
|
|
39
|
+
};
|
|
40
|
+
version: {
|
|
41
|
+
list: typeof functionVersionApi.listFunctionVersion;
|
|
42
|
+
publish: typeof functionVersionApi.publishFunctionVersion;
|
|
43
|
+
get: typeof functionVersionApi.getFunctionVersion;
|
|
44
|
+
};
|
|
45
|
+
promotion: {
|
|
46
|
+
list: typeof functionPromotionApi.listFunctionPromotion;
|
|
47
|
+
promote: typeof functionPromotionApi.promoteFunction;
|
|
48
|
+
rollback: typeof functionPromotionApi.rollbackFunction;
|
|
49
|
+
};
|
|
50
|
+
trigger: {
|
|
51
|
+
list: typeof functionTriggerApi.listFunctionTrigger;
|
|
52
|
+
create: typeof functionTriggerApi.createFunctionTrigger;
|
|
53
|
+
rotate: typeof functionTriggerApi.rotateFunctionTrigger;
|
|
54
|
+
delete: typeof functionTriggerApi.deleteFunctionTrigger;
|
|
55
|
+
};
|
|
56
|
+
run: {
|
|
57
|
+
list: typeof functionRunApi.listFunctionRun;
|
|
58
|
+
get: typeof functionRunApi.getFunctionRun;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export class AbyssReflexCore {
|
|
64
|
+
private static config: CoreConfig = {
|
|
65
|
+
baseURL: DEFAULT_BASE_URL,
|
|
66
|
+
};
|
|
67
|
+
static axios = axios.create({
|
|
68
|
+
baseURL: DEFAULT_BASE_URL,
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
private static _sdk: AbyssReflexCoreSDK | null = null;
|
|
72
|
+
|
|
73
|
+
public static get sdk(): AbyssReflexCoreSDK {
|
|
74
|
+
if (!AbyssReflexCore._sdk) {
|
|
75
|
+
AbyssReflexCore._sdk = {
|
|
76
|
+
health: healthApi.health,
|
|
77
|
+
function: {
|
|
78
|
+
list: functionApi.listFunction,
|
|
79
|
+
create: functionApi.createFunction,
|
|
80
|
+
get: functionApi.getFunction,
|
|
81
|
+
update: functionApi.updateFunction,
|
|
82
|
+
delete: functionApi.deleteFunction,
|
|
83
|
+
access: {
|
|
84
|
+
list: functionAccessApi.listFunctionAccess,
|
|
85
|
+
grant: functionAccessApi.grantFunctionAccess,
|
|
86
|
+
revoke: functionAccessApi.revokeFunctionAccess,
|
|
87
|
+
},
|
|
88
|
+
test: {
|
|
89
|
+
simulate: functionTestApi.simulateFunction,
|
|
90
|
+
dryRun: functionTestApi.dryRunFunction,
|
|
91
|
+
},
|
|
92
|
+
version: {
|
|
93
|
+
list: functionVersionApi.listFunctionVersion,
|
|
94
|
+
publish: functionVersionApi.publishFunctionVersion,
|
|
95
|
+
get: functionVersionApi.getFunctionVersion,
|
|
96
|
+
},
|
|
97
|
+
promotion: {
|
|
98
|
+
list: functionPromotionApi.listFunctionPromotion,
|
|
99
|
+
promote: functionPromotionApi.promoteFunction,
|
|
100
|
+
rollback: functionPromotionApi.rollbackFunction,
|
|
101
|
+
},
|
|
102
|
+
trigger: {
|
|
103
|
+
list: functionTriggerApi.listFunctionTrigger,
|
|
104
|
+
create: functionTriggerApi.createFunctionTrigger,
|
|
105
|
+
rotate: functionTriggerApi.rotateFunctionTrigger,
|
|
106
|
+
delete: functionTriggerApi.deleteFunctionTrigger,
|
|
107
|
+
},
|
|
108
|
+
run: {
|
|
109
|
+
list: functionRunApi.listFunctionRun,
|
|
110
|
+
get: functionRunApi.getFunctionRun,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return AbyssReflexCore._sdk;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
public static setConfig(config: CoreConfig): void {
|
|
119
|
+
AbyssReflexCore._sdk = null;
|
|
120
|
+
|
|
121
|
+
AbyssReflexCore.config = { ...AbyssReflexCore.config, ...config };
|
|
122
|
+
|
|
123
|
+
if (config.baseURL) {
|
|
124
|
+
AbyssReflexCore.axios.defaults.baseURL = config.baseURL;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (config.token) {
|
|
128
|
+
AbyssReflexCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
public static getConfig(): CoreConfig {
|
|
133
|
+
return AbyssReflexCore.config;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State of an access granted to a function.
|
|
3
|
+
* - ACTIVE: the grantor still holds the right the access needs.
|
|
4
|
+
* - SUSPENDED: a publication found the grantor without that right. Publishing is refused
|
|
5
|
+
* (`GRANT_SUSPENDED`) until the access is revoked and granted again; what is already promoted keeps running.
|
|
6
|
+
* - REVOKED: withdrawn on purpose; the row stays as the journal.
|
|
7
|
+
*/
|
|
8
|
+
export enum AccessGrantStatus {
|
|
9
|
+
ACTIVE = 'ACTIVE',
|
|
10
|
+
SUSPENDED = 'SUSPENDED',
|
|
11
|
+
REVOKED = 'REVOKED',
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The kinds of access a definition declares and a member grants (the format of @abyss-project/runtime). */
|
|
2
|
+
export enum ReflexAccessKind {
|
|
3
|
+
/** Outbound HTTP to a list of host names (exact, or `*.domain` for any sub-domain). */
|
|
4
|
+
HTTP = 'HTTP',
|
|
5
|
+
/** One action of the host catalog (`store.get`, `store.set`, `store.increment`, `secret.get`, `http.respond`). */
|
|
6
|
+
HOST_ACTION = 'HOST_ACTION',
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './health-status.enum';
|
|
2
|
+
export * from './trigger-type.enum';
|
|
3
|
+
export * from './trigger-access-mode.enum';
|
|
4
|
+
export * from './access-grant-status.enum';
|
|
5
|
+
export * from './run-mode.enum';
|
|
6
|
+
export * from './run-status.enum';
|
|
7
|
+
export * from './trace-effect-type.enum';
|
|
8
|
+
export * from './reflex-error-code.enum';
|
|
9
|
+
export * from './access-kind.enum';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** `error.code` of the refusals a client acts on. */
|
|
2
|
+
export enum ReflexErrorCode {
|
|
3
|
+
/** 400: the definition does not match the format; `error.details` holds the path of each fault. */
|
|
4
|
+
INVALID_DEFINITION = 'INVALID_DEFINITION',
|
|
5
|
+
/** 409: an access granted to the function is suspended; revoke it and grant it again. */
|
|
6
|
+
GRANT_SUSPENDED = 'GRANT_SUSPENDED',
|
|
7
|
+
/** 409: the function has no frozen version of its own draft yet, or none to go back to. */
|
|
8
|
+
NO_VERSION = 'NO_VERSION',
|
|
9
|
+
/** 409: the access to grant is not declared by the draft of the function. */
|
|
10
|
+
ACCESS_NOT_DECLARED = 'ACCESS_NOT_DECLARED',
|
|
11
|
+
/** 409: the draft has not changed since the last published version. */
|
|
12
|
+
NOTHING_TO_PUBLISH = 'NOTHING_TO_PUBLISH',
|
|
13
|
+
/** 404: the environment is not one of the application's Monitor environments. */
|
|
14
|
+
ENVIRONMENT_NOT_FOUND = 'ENVIRONMENT_NOT_FOUND',
|
|
15
|
+
/** 409: a name, a path or an access already exists. */
|
|
16
|
+
ALREADY_EXISTS = 'ALREADY_EXISTS',
|
|
17
|
+
/** 403: the function is promoted in a production environment and the member lacks REFLEX_PUBLISH_PRODUCTION. */
|
|
18
|
+
PUBLISH_PRODUCTION_REQUIRED = 'PUBLISH_PRODUCTION_REQUIRED',
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a run was made.
|
|
3
|
+
* - SIMULATION: nothing is executed, effects are recorded, the Store is a scratch copy thrown away.
|
|
4
|
+
* - DRY_RUN: Store reads are real, writes are recorded and not executed.
|
|
5
|
+
* - LIVE: an execution of the edge on a promoted version.
|
|
6
|
+
*/
|
|
7
|
+
export enum RunMode {
|
|
8
|
+
SIMULATION = 'SIMULATION',
|
|
9
|
+
DRY_RUN = 'DRY_RUN',
|
|
10
|
+
LIVE = 'LIVE',
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who may call an HTTP trigger.
|
|
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
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IReflexAccessDeclaration } from '../../models';
|
|
2
|
+
|
|
3
|
+
export interface IListFunctionAccessParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
functionId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IGrantFunctionAccessParams {
|
|
9
|
+
applicationId: string;
|
|
10
|
+
functionId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The declaration must be one the draft makes. The member who grants must hold the right the access
|
|
14
|
+
* needs: REFLEX_FUNCTION_UPDATE for hosts, STORAGE_STORE_READ (`store.get`) or STORAGE_STORE_UPDATE
|
|
15
|
+
* (`store.set`, `store.increment`) for the Store, SECRET_READ on the project for `secret.get`.
|
|
16
|
+
*/
|
|
17
|
+
export interface IGrantFunctionAccessBody {
|
|
18
|
+
declaration: IReflexAccessDeclaration;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IRevokeFunctionAccessParams {
|
|
22
|
+
applicationId: string;
|
|
23
|
+
functionId: string;
|
|
24
|
+
grantId: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface IListFunctionPromotionParams {
|
|
2
|
+
applicationId: string;
|
|
3
|
+
functionId: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface IPromoteFunctionParams {
|
|
7
|
+
applicationId: string;
|
|
8
|
+
functionId: string;
|
|
9
|
+
}
|
|
10
|
+
/** A PRODUCTION environment needs REFLEX_PUBLISH_PRODUCTION on top of REFLEX_PUBLISH. */
|
|
11
|
+
export interface IPromoteFunctionBody {
|
|
12
|
+
versionId: string;
|
|
13
|
+
/** A Monitor environment of the application. */
|
|
14
|
+
environmentId: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IRollbackFunctionParams {
|
|
18
|
+
applicationId: string;
|
|
19
|
+
functionId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IRollbackFunctionBody {
|
|
22
|
+
environmentId: string;
|
|
23
|
+
/** A version promoted before in this environment. Absent: the one promoted just before the current one. */
|
|
24
|
+
versionId?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RunMode } from '../../../enum';
|
|
2
|
+
|
|
3
|
+
export interface IListFunctionRunParams {
|
|
4
|
+
applicationId: string;
|
|
5
|
+
functionId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IListFunctionRunQuery {
|
|
8
|
+
mode?: RunMode;
|
|
9
|
+
/** 1 to 100, 50 by default. */
|
|
10
|
+
limit?: number;
|
|
11
|
+
/** Runs skipped, newest first; 0 by default. */
|
|
12
|
+
offset?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IGetFunctionRunParams {
|
|
16
|
+
applicationId: string;
|
|
17
|
+
functionId: string;
|
|
18
|
+
runId: string;
|
|
19
|
+
}
|