@abyss-project/reflex 1.1.0 → 2.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.
Files changed (53) hide show
  1. package/dist/api/function-test.api.d.ts +2 -2
  2. package/dist/api/function-test.api.js +2 -2
  3. package/dist/api/function-test.api.js.map +1 -1
  4. package/dist/types/interface/api/requests/function-test.request.d.ts +1 -0
  5. package/dist/types/interface/api/responses/function-settings.response.d.ts +2 -1
  6. package/dist/types/interface/models/index.d.ts +1 -0
  7. package/dist/types/interface/models/index.js +1 -0
  8. package/dist/types/interface/models/index.js.map +1 -1
  9. package/dist/types/interface/models/reflex-definition.model.d.ts +2 -0
  10. package/dist/types/interface/models/reflex-definition.model.js +3 -0
  11. package/dist/types/interface/models/reflex-definition.model.js.map +1 -1
  12. package/dist/types/interface/models/reflex-execution-settings.model.d.ts +0 -1
  13. package/dist/types/interface/models/reflex-execution-settings.model.js +0 -1
  14. package/dist/types/interface/models/reflex-execution-settings.model.js.map +1 -1
  15. package/dist/types/interface/models/reflex-price-list.model.d.ts +13 -0
  16. package/dist/types/interface/models/reflex-price-list.model.js +3 -0
  17. package/dist/types/interface/models/reflex-price-list.model.js.map +1 -0
  18. package/dist/types/interface/models/reflex-run.model.d.ts +1 -1
  19. package/package.json +1 -1
  20. package/src/api/function-promotion.api.ts +42 -42
  21. package/src/api/function-run.api.ts +38 -38
  22. package/src/api/function-settings.api.ts +59 -59
  23. package/src/api/function-test.api.ts +34 -33
  24. package/src/api/function-version.api.ts +56 -56
  25. package/src/api/function.api.test.ts +17 -7
  26. package/src/api/index.ts +9 -9
  27. package/src/index.ts +152 -152
  28. package/src/types/enum/execution-mode.enum.ts +9 -9
  29. package/src/types/enum/execution-profile.enum.ts +20 -20
  30. package/src/types/enum/execution-settings-source.enum.ts +9 -9
  31. package/src/types/enum/index.ts +14 -14
  32. package/src/types/enum/reflex-error-code.enum.ts +19 -19
  33. package/src/types/enum/run-log-level.enum.ts +6 -6
  34. package/src/types/enum/run-status.enum.ts +11 -11
  35. package/src/types/enum/run-step-status.enum.ts +7 -7
  36. package/src/types/enum/trace-effect-type.enum.ts +12 -12
  37. package/src/types/interface/api/requests/function-promotion.request.ts +25 -25
  38. package/src/types/interface/api/requests/function-run.request.ts +26 -26
  39. package/src/types/interface/api/requests/function-settings.request.ts +1 -1
  40. package/src/types/interface/api/requests/function-test.request.ts +24 -19
  41. package/src/types/interface/api/requests/function-version.request.ts +1 -1
  42. package/src/types/interface/api/requests/index.ts +8 -8
  43. package/src/types/interface/api/responses/function-run.response.ts +18 -18
  44. package/src/types/interface/api/responses/function-settings.response.ts +4 -1
  45. package/src/types/interface/api/responses/function-version.response.ts +36 -36
  46. package/src/types/interface/api/responses/index.ts +8 -8
  47. package/src/types/interface/models/index.ts +10 -9
  48. package/src/types/interface/models/reflex-definition.model.ts +8 -0
  49. package/src/types/interface/models/reflex-environment-pointer.model.ts +18 -18
  50. package/src/types/interface/models/reflex-execution-settings.model.ts +3 -6
  51. package/src/types/interface/models/reflex-price-list.model.ts +20 -0
  52. package/src/types/interface/models/reflex-run.model.ts +10 -5
  53. package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
@@ -6,6 +6,8 @@ import {
6
6
  ExecutionMode,
7
7
  ExecutionProfile,
8
8
  REFLEX_EXECUTION_SETTINGS_LIMITS,
9
+ RESPOND_STATUS_MAX,
10
+ RESPOND_STATUS_MIN,
9
11
  } from '..';
10
12
 
11
13
  const APP = 'app-1';
@@ -13,7 +15,6 @@ const FN = 'fn-1';
13
15
  const BASE = `api/function/${APP}/${FN}`;
14
16
  const SETTINGS = {
15
17
  profile: ExecutionProfile.L,
16
- guaranteedCpu: true,
17
18
  responseTimeoutMs: 10_000,
18
19
  maxDurationMs: 600_000,
19
20
  mode: ExecutionMode.ASYNC,
@@ -90,15 +91,19 @@ const calls: Call[] = [
90
91
  label: 'test.simulate',
91
92
  method: 'post',
92
93
  url: `${BASE}/test/simulate`,
93
- body: { input: { a: 1 } },
94
- run: () => sdk().test.simulate({ applicationId: APP, functionId: FN }, { input: { a: 1 } }),
94
+ body: { environmentId: 'e-1', input: { a: 1 } },
95
+ run: () =>
96
+ sdk().test.simulate(
97
+ { applicationId: APP, functionId: FN },
98
+ { environmentId: 'e-1', input: { a: 1 } },
99
+ ),
95
100
  },
96
101
  {
97
102
  label: 'test.dryRun',
98
103
  method: 'post',
99
104
  url: `${BASE}/test/dry-run`,
100
- body: {},
101
- run: () => sdk().test.dryRun({ applicationId: APP, functionId: FN }),
105
+ body: { environmentId: 'e-1' },
106
+ run: () => sdk().test.dryRun({ applicationId: APP, functionId: FN }, { environmentId: 'e-1' }),
102
107
  },
103
108
  {
104
109
  label: 'version.list',
@@ -285,10 +290,9 @@ describe('execution settings constants', () => {
285
290
  ]);
286
291
  });
287
292
 
288
- it('default to S, shared CPU, 30 s, 30 s and SYNC, within the bounds', () => {
293
+ it('default to S, 30 s, 30 s and SYNC, within the bounds', () => {
289
294
  expect(DEFAULT_REFLEX_EXECUTION_SETTINGS).toEqual({
290
295
  profile: ExecutionProfile.S,
291
- guaranteedCpu: false,
292
296
  responseTimeoutMs: 30_000,
293
297
  maxDurationMs: 30_000,
294
298
  mode: ExecutionMode.SYNC,
@@ -299,3 +303,9 @@ describe('execution settings constants', () => {
299
303
  });
300
304
  });
301
305
  });
306
+
307
+ describe('respond status bounds', () => {
308
+ it('are 200 to 599, the bounds of the runtime', () => {
309
+ expect([RESPOND_STATUS_MIN, RESPOND_STATUS_MAX]).toEqual([200, 599]);
310
+ });
311
+ });
package/src/api/index.ts CHANGED
@@ -1,9 +1,9 @@
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';
9
- export * from './function-settings.api';
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';
9
+ export * from './function-settings.api';
package/src/index.ts CHANGED
@@ -1,152 +1,152 @@
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
- import * as functionSettingsApi from './api/function-settings.api';
11
-
12
- export * from './api';
13
- export * from './types';
14
-
15
- const DEFAULT_BASE_URL = 'https://reflex-api.abyss-project.fr/';
16
-
17
- type CoreConfig = {
18
- baseURL?: string;
19
- /** The session token of the member (`Authorization: Bearer`). Every route but `health` needs it. */
20
- token?: string;
21
- };
22
-
23
- type AbyssReflexCoreSDK = {
24
- /** `GET /health` — status of the database and Redis behind the API. */
25
- health: typeof healthApi.health;
26
- function: {
27
- list: typeof functionApi.listFunction;
28
- create: typeof functionApi.createFunction;
29
- get: typeof functionApi.getFunction;
30
- update: typeof functionApi.updateFunction;
31
- delete: typeof functionApi.deleteFunction;
32
- access: {
33
- list: typeof functionAccessApi.listFunctionAccess;
34
- grant: typeof functionAccessApi.grantFunctionAccess;
35
- revoke: typeof functionAccessApi.revokeFunctionAccess;
36
- };
37
- test: {
38
- simulate: typeof functionTestApi.simulateFunction;
39
- dryRun: typeof functionTestApi.dryRunFunction;
40
- };
41
- version: {
42
- list: typeof functionVersionApi.listFunctionVersion;
43
- publish: typeof functionVersionApi.publishFunctionVersion;
44
- get: typeof functionVersionApi.getFunctionVersion;
45
- stepStats: typeof functionVersionApi.getFunctionVersionStepStats;
46
- };
47
- promotion: {
48
- list: typeof functionPromotionApi.listFunctionPromotion;
49
- promote: typeof functionPromotionApi.promoteFunction;
50
- rollback: typeof functionPromotionApi.rollbackFunction;
51
- };
52
- trigger: {
53
- list: typeof functionTriggerApi.listFunctionTrigger;
54
- create: typeof functionTriggerApi.createFunctionTrigger;
55
- rotate: typeof functionTriggerApi.rotateFunctionTrigger;
56
- delete: typeof functionTriggerApi.deleteFunctionTrigger;
57
- };
58
- run: {
59
- list: typeof functionRunApi.listFunctionRun;
60
- get: typeof functionRunApi.getFunctionRun;
61
- state: typeof functionRunApi.getFunctionRunState;
62
- };
63
- settings: {
64
- get: typeof functionSettingsApi.getFunctionSettings;
65
- setDefault: typeof functionSettingsApi.setFunctionDefaultSettings;
66
- setEnvironment: typeof functionSettingsApi.setFunctionEnvironmentSettings;
67
- removeEnvironment: typeof functionSettingsApi.removeFunctionEnvironmentSettings;
68
- };
69
- };
70
- };
71
-
72
- export class AbyssReflexCore {
73
- private static config: CoreConfig = {
74
- baseURL: DEFAULT_BASE_URL,
75
- };
76
- static axios = axios.create({
77
- baseURL: DEFAULT_BASE_URL,
78
- });
79
-
80
- private static _sdk: AbyssReflexCoreSDK | null = null;
81
-
82
- public static get sdk(): AbyssReflexCoreSDK {
83
- if (!AbyssReflexCore._sdk) {
84
- AbyssReflexCore._sdk = {
85
- health: healthApi.health,
86
- function: {
87
- list: functionApi.listFunction,
88
- create: functionApi.createFunction,
89
- get: functionApi.getFunction,
90
- update: functionApi.updateFunction,
91
- delete: functionApi.deleteFunction,
92
- access: {
93
- list: functionAccessApi.listFunctionAccess,
94
- grant: functionAccessApi.grantFunctionAccess,
95
- revoke: functionAccessApi.revokeFunctionAccess,
96
- },
97
- test: {
98
- simulate: functionTestApi.simulateFunction,
99
- dryRun: functionTestApi.dryRunFunction,
100
- },
101
- version: {
102
- list: functionVersionApi.listFunctionVersion,
103
- publish: functionVersionApi.publishFunctionVersion,
104
- get: functionVersionApi.getFunctionVersion,
105
- stepStats: functionVersionApi.getFunctionVersionStepStats,
106
- },
107
- promotion: {
108
- list: functionPromotionApi.listFunctionPromotion,
109
- promote: functionPromotionApi.promoteFunction,
110
- rollback: functionPromotionApi.rollbackFunction,
111
- },
112
- trigger: {
113
- list: functionTriggerApi.listFunctionTrigger,
114
- create: functionTriggerApi.createFunctionTrigger,
115
- rotate: functionTriggerApi.rotateFunctionTrigger,
116
- delete: functionTriggerApi.deleteFunctionTrigger,
117
- },
118
- run: {
119
- list: functionRunApi.listFunctionRun,
120
- get: functionRunApi.getFunctionRun,
121
- state: functionRunApi.getFunctionRunState,
122
- },
123
- settings: {
124
- get: functionSettingsApi.getFunctionSettings,
125
- setDefault: functionSettingsApi.setFunctionDefaultSettings,
126
- setEnvironment: functionSettingsApi.setFunctionEnvironmentSettings,
127
- removeEnvironment: functionSettingsApi.removeFunctionEnvironmentSettings,
128
- },
129
- },
130
- };
131
- }
132
- return AbyssReflexCore._sdk;
133
- }
134
-
135
- public static setConfig(config: CoreConfig): void {
136
- AbyssReflexCore._sdk = null;
137
-
138
- AbyssReflexCore.config = { ...AbyssReflexCore.config, ...config };
139
-
140
- if (config.baseURL) {
141
- AbyssReflexCore.axios.defaults.baseURL = config.baseURL;
142
- }
143
-
144
- if (config.token) {
145
- AbyssReflexCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
146
- }
147
- }
148
-
149
- public static getConfig(): CoreConfig {
150
- return AbyssReflexCore.config;
151
- }
152
- }
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
+ import * as functionSettingsApi from './api/function-settings.api';
11
+
12
+ export * from './api';
13
+ export * from './types';
14
+
15
+ const DEFAULT_BASE_URL = 'https://reflex-api.abyss-project.fr/';
16
+
17
+ type CoreConfig = {
18
+ baseURL?: string;
19
+ /** The session token of the member (`Authorization: Bearer`). Every route but `health` needs it. */
20
+ token?: string;
21
+ };
22
+
23
+ type AbyssReflexCoreSDK = {
24
+ /** `GET /health` — status of the database and Redis behind the API. */
25
+ health: typeof healthApi.health;
26
+ function: {
27
+ list: typeof functionApi.listFunction;
28
+ create: typeof functionApi.createFunction;
29
+ get: typeof functionApi.getFunction;
30
+ update: typeof functionApi.updateFunction;
31
+ delete: typeof functionApi.deleteFunction;
32
+ access: {
33
+ list: typeof functionAccessApi.listFunctionAccess;
34
+ grant: typeof functionAccessApi.grantFunctionAccess;
35
+ revoke: typeof functionAccessApi.revokeFunctionAccess;
36
+ };
37
+ test: {
38
+ simulate: typeof functionTestApi.simulateFunction;
39
+ dryRun: typeof functionTestApi.dryRunFunction;
40
+ };
41
+ version: {
42
+ list: typeof functionVersionApi.listFunctionVersion;
43
+ publish: typeof functionVersionApi.publishFunctionVersion;
44
+ get: typeof functionVersionApi.getFunctionVersion;
45
+ stepStats: typeof functionVersionApi.getFunctionVersionStepStats;
46
+ };
47
+ promotion: {
48
+ list: typeof functionPromotionApi.listFunctionPromotion;
49
+ promote: typeof functionPromotionApi.promoteFunction;
50
+ rollback: typeof functionPromotionApi.rollbackFunction;
51
+ };
52
+ trigger: {
53
+ list: typeof functionTriggerApi.listFunctionTrigger;
54
+ create: typeof functionTriggerApi.createFunctionTrigger;
55
+ rotate: typeof functionTriggerApi.rotateFunctionTrigger;
56
+ delete: typeof functionTriggerApi.deleteFunctionTrigger;
57
+ };
58
+ run: {
59
+ list: typeof functionRunApi.listFunctionRun;
60
+ get: typeof functionRunApi.getFunctionRun;
61
+ state: typeof functionRunApi.getFunctionRunState;
62
+ };
63
+ settings: {
64
+ get: typeof functionSettingsApi.getFunctionSettings;
65
+ setDefault: typeof functionSettingsApi.setFunctionDefaultSettings;
66
+ setEnvironment: typeof functionSettingsApi.setFunctionEnvironmentSettings;
67
+ removeEnvironment: typeof functionSettingsApi.removeFunctionEnvironmentSettings;
68
+ };
69
+ };
70
+ };
71
+
72
+ export class AbyssReflexCore {
73
+ private static config: CoreConfig = {
74
+ baseURL: DEFAULT_BASE_URL,
75
+ };
76
+ static axios = axios.create({
77
+ baseURL: DEFAULT_BASE_URL,
78
+ });
79
+
80
+ private static _sdk: AbyssReflexCoreSDK | null = null;
81
+
82
+ public static get sdk(): AbyssReflexCoreSDK {
83
+ if (!AbyssReflexCore._sdk) {
84
+ AbyssReflexCore._sdk = {
85
+ health: healthApi.health,
86
+ function: {
87
+ list: functionApi.listFunction,
88
+ create: functionApi.createFunction,
89
+ get: functionApi.getFunction,
90
+ update: functionApi.updateFunction,
91
+ delete: functionApi.deleteFunction,
92
+ access: {
93
+ list: functionAccessApi.listFunctionAccess,
94
+ grant: functionAccessApi.grantFunctionAccess,
95
+ revoke: functionAccessApi.revokeFunctionAccess,
96
+ },
97
+ test: {
98
+ simulate: functionTestApi.simulateFunction,
99
+ dryRun: functionTestApi.dryRunFunction,
100
+ },
101
+ version: {
102
+ list: functionVersionApi.listFunctionVersion,
103
+ publish: functionVersionApi.publishFunctionVersion,
104
+ get: functionVersionApi.getFunctionVersion,
105
+ stepStats: functionVersionApi.getFunctionVersionStepStats,
106
+ },
107
+ promotion: {
108
+ list: functionPromotionApi.listFunctionPromotion,
109
+ promote: functionPromotionApi.promoteFunction,
110
+ rollback: functionPromotionApi.rollbackFunction,
111
+ },
112
+ trigger: {
113
+ list: functionTriggerApi.listFunctionTrigger,
114
+ create: functionTriggerApi.createFunctionTrigger,
115
+ rotate: functionTriggerApi.rotateFunctionTrigger,
116
+ delete: functionTriggerApi.deleteFunctionTrigger,
117
+ },
118
+ run: {
119
+ list: functionRunApi.listFunctionRun,
120
+ get: functionRunApi.getFunctionRun,
121
+ state: functionRunApi.getFunctionRunState,
122
+ },
123
+ settings: {
124
+ get: functionSettingsApi.getFunctionSettings,
125
+ setDefault: functionSettingsApi.setFunctionDefaultSettings,
126
+ setEnvironment: functionSettingsApi.setFunctionEnvironmentSettings,
127
+ removeEnvironment: functionSettingsApi.removeFunctionEnvironmentSettings,
128
+ },
129
+ },
130
+ };
131
+ }
132
+ return AbyssReflexCore._sdk;
133
+ }
134
+
135
+ public static setConfig(config: CoreConfig): void {
136
+ AbyssReflexCore._sdk = null;
137
+
138
+ AbyssReflexCore.config = { ...AbyssReflexCore.config, ...config };
139
+
140
+ if (config.baseURL) {
141
+ AbyssReflexCore.axios.defaults.baseURL = config.baseURL;
142
+ }
143
+
144
+ if (config.token) {
145
+ AbyssReflexCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
146
+ }
147
+ }
148
+
149
+ public static getConfig(): CoreConfig {
150
+ return AbyssReflexCore.config;
151
+ }
152
+ }
@@ -1,9 +1,9 @@
1
- /**
2
- * How an HTTP trigger answers its caller.
3
- * - SYNC: the caller waits for the Respond step, or gets 504 past the response timeout.
4
- * - ASYNC: the caller gets `202 {executionId}` before the execution starts, and reads its state.
5
- */
6
- export enum ExecutionMode {
7
- SYNC = 'SYNC',
8
- ASYNC = 'ASYNC',
9
- }
1
+ /**
2
+ * How an HTTP trigger answers its caller.
3
+ * - SYNC: the caller waits for the Respond step, or gets 504 past the response timeout.
4
+ * - ASYNC: the caller gets `202 {executionId}` before the execution starts, and reads its state.
5
+ */
6
+ export enum ExecutionMode {
7
+ SYNC = 'SYNC',
8
+ ASYNC = 'ASYNC',
9
+ }
@@ -1,20 +1,20 @@
1
- /**
2
- * Memory of the isolate an execution runs in (ADR-0239). The CPU part of the cost grows with the
3
- * profile: S x1, M x1.05, L x1.10, XL x1.20, XXL x1.35.
4
- */
5
- export enum ExecutionProfile {
6
- S = 'S',
7
- M = 'M',
8
- L = 'L',
9
- XL = 'XL',
10
- XXL = 'XXL',
11
- }
12
-
13
- /** Memory limit of each profile, in MB (1 GB = 1024 MB). */
14
- export const EXECUTION_PROFILE_MEMORY_MB: Readonly<Record<ExecutionProfile, number>> = {
15
- [ExecutionProfile.S]: 128,
16
- [ExecutionProfile.M]: 256,
17
- [ExecutionProfile.L]: 512,
18
- [ExecutionProfile.XL]: 1024,
19
- [ExecutionProfile.XXL]: 2048,
20
- };
1
+ /**
2
+ * Memory of the isolate an execution runs in (ADR-0244). The CPU part of the cost grows with the
3
+ * profile: S x1, M x1.05, L x1.10, XL x1.20, XXL x1.35.
4
+ */
5
+ export enum ExecutionProfile {
6
+ S = 'S',
7
+ M = 'M',
8
+ L = 'L',
9
+ XL = 'XL',
10
+ XXL = 'XXL',
11
+ }
12
+
13
+ /** Memory limit of each profile, in MB (1 GB = 1024 MB). */
14
+ export const EXECUTION_PROFILE_MEMORY_MB: Readonly<Record<ExecutionProfile, number>> = {
15
+ [ExecutionProfile.S]: 128,
16
+ [ExecutionProfile.M]: 256,
17
+ [ExecutionProfile.L]: 512,
18
+ [ExecutionProfile.XL]: 1024,
19
+ [ExecutionProfile.XXL]: 2048,
20
+ };
@@ -1,9 +1,9 @@
1
- /** Where the effective settings of an environment come from. */
2
- export enum ExecutionSettingsSource {
3
- /** The override of this environment. */
4
- ENVIRONMENT = 'ENVIRONMENT',
5
- /** The default of the function, for every environment without an override. */
6
- DEFAULT = 'DEFAULT',
7
- /** Nothing is set: the built-in defaults. */
8
- BUILT_IN = 'BUILT_IN',
9
- }
1
+ /** Where the effective settings of an environment come from. */
2
+ export enum ExecutionSettingsSource {
3
+ /** The override of this environment. */
4
+ ENVIRONMENT = 'ENVIRONMENT',
5
+ /** The default of the function, for every environment without an override. */
6
+ DEFAULT = 'DEFAULT',
7
+ /** Nothing is set: the built-in defaults. */
8
+ BUILT_IN = 'BUILT_IN',
9
+ }
@@ -1,14 +1,14 @@
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';
10
- export * from './execution-profile.enum';
11
- export * from './execution-mode.enum';
12
- export * from './execution-settings-source.enum';
13
- export * from './run-step-status.enum';
14
- export * from './run-log-level.enum';
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';
10
+ export * from './execution-profile.enum';
11
+ export * from './execution-mode.enum';
12
+ export * from './execution-settings-source.enum';
13
+ export * from './run-step-status.enum';
14
+ export * from './run-log-level.enum';
@@ -1,19 +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
- }
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 environments (abyss-main). */
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
+ }
@@ -1,6 +1,6 @@
1
- /** The level of a log line an execution wrote (LOG step, `abyss.log.*`, `console.*`). */
2
- export enum RunLogLevel {
3
- INFO = 'info',
4
- WARN = 'warn',
5
- ERROR = 'error',
6
- }
1
+ /** The level of a log line an execution wrote (LOG step, `abyss.log.*`, `console.*`). */
2
+ export enum RunLogLevel {
3
+ INFO = 'info',
4
+ WARN = 'warn',
5
+ ERROR = 'error',
6
+ }
@@ -1,11 +1,11 @@
1
- export enum RunStatus {
2
- /** A live execution accepted and not finished yet (an async caller reads it by its id). */
3
- RUNNING = 'RUNNING',
4
- SUCCEEDED = 'SUCCEEDED',
5
- FAILED = 'FAILED',
6
- /**
7
- * A live execution stopped by the end of a pod of the edge or of the runner: offered (cost 0), kept in
8
- * the journal with its measures up to the interruption, left out of every statistic.
9
- */
10
- INTERRUPTED = 'INTERRUPTED',
11
- }
1
+ export enum RunStatus {
2
+ /** A live execution accepted and not finished yet (an async caller reads it by its id). */
3
+ RUNNING = 'RUNNING',
4
+ SUCCEEDED = 'SUCCEEDED',
5
+ FAILED = 'FAILED',
6
+ /**
7
+ * A live execution stopped by the end of a pod of the edge or of the runner: offered (cost 0), kept in
8
+ * the journal with its measures up to the interruption, left out of every statistic.
9
+ */
10
+ INTERRUPTED = 'INTERRUPTED',
11
+ }
@@ -1,7 +1,7 @@
1
- /** How one step of a live execution ended. */
2
- export enum RunStepStatus {
3
- SUCCEEDED = 'SUCCEEDED',
4
- FAILED = 'FAILED',
5
- /** The step was running when the pod of the edge or of the runner stopped. */
6
- INTERRUPTED = 'INTERRUPTED',
7
- }
1
+ /** How one step of a live execution ended. */
2
+ export enum RunStepStatus {
3
+ SUCCEEDED = 'SUCCEEDED',
4
+ FAILED = 'FAILED',
5
+ /** The step was running when the pod of the edge or of the runner stopped. */
6
+ INTERRUPTED = 'INTERRUPTED',
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
+ }