@abyss-project/reflex 5.6.0 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/.eslintrc.js +32 -32
  2. package/.prettierrc +5 -5
  3. package/README.md +15 -15
  4. package/dist/types/interface/models/reflex-discord-event.model.d.ts +1 -1
  5. package/dist/types/interface/models/reflex-discord-event.model.js +1 -1
  6. package/dist/types/interface/models/reflex-discord-event.model.js.map +1 -1
  7. package/jest.config.ts +11 -11
  8. package/package.json +1 -1
  9. package/src/api/function-access.api.ts +36 -36
  10. package/src/api/function-run.api.ts +38 -38
  11. package/src/api/function-settings.api.ts +59 -59
  12. package/src/api/function-test.api.ts +34 -34
  13. package/src/api/function-version.api.ts +48 -48
  14. package/src/api/function.api.test.ts +249 -249
  15. package/src/api/function.api.ts +62 -62
  16. package/src/api/health.api.ts +10 -10
  17. package/src/api/service-configuration.api.ts +16 -16
  18. package/src/api/service-deployment.api.ts +79 -79
  19. package/src/api/service-route.api.ts +72 -72
  20. package/src/api/service-task.api.test.ts +140 -140
  21. package/src/api/service-task.api.ts +141 -141
  22. package/src/api/service-version.api.ts +54 -54
  23. package/src/api/service.api.test.ts +215 -215
  24. package/src/api/service.api.ts +55 -55
  25. package/src/types/enum/access-grant-status.enum.ts +12 -12
  26. package/src/types/enum/access-kind.enum.ts +7 -7
  27. package/src/types/enum/configuration-read-as.enum.ts +5 -5
  28. package/src/types/enum/discord-activity-type.enum.ts +9 -9
  29. package/src/types/enum/discord-component-kind.enum.ts +7 -7
  30. package/src/types/enum/discord-gateway-state.enum.ts +11 -11
  31. package/src/types/enum/discord-option-type.enum.ts +12 -12
  32. package/src/types/enum/discord-presence-status.enum.ts +8 -8
  33. package/src/types/enum/discord-sync-status.enum.ts +6 -6
  34. package/src/types/enum/discord-token-state.enum.ts +11 -11
  35. package/src/types/enum/execution-mode.enum.ts +9 -9
  36. package/src/types/enum/execution-profile.enum.ts +20 -20
  37. package/src/types/enum/execution-settings-source.enum.ts +9 -9
  38. package/src/types/enum/health-status.enum.ts +4 -4
  39. package/src/types/enum/route-method.enum.ts +9 -9
  40. package/src/types/enum/run-log-level.enum.ts +6 -6
  41. package/src/types/enum/run-mode.enum.ts +11 -11
  42. package/src/types/enum/run-status.enum.ts +11 -11
  43. package/src/types/enum/run-step-status.enum.ts +7 -7
  44. package/src/types/enum/schedule-sync-status.enum.ts +6 -6
  45. package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
  46. package/src/types/enum/scheduled-run-status.enum.ts +17 -17
  47. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  48. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  49. package/src/types/enum/service-type.enum.ts +9 -9
  50. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  51. package/src/types/enum/trace-effect-type.enum.ts +12 -12
  52. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  53. package/src/types/enum/vault-value-source.enum.ts +12 -12
  54. package/src/types/enum/vault-visibility.enum.ts +5 -5
  55. package/src/types/index.ts +2 -2
  56. package/src/types/interface/api/index.ts +3 -3
  57. package/src/types/interface/api/requests/function-access.request.ts +25 -25
  58. package/src/types/interface/api/requests/function-run.request.ts +30 -30
  59. package/src/types/interface/api/requests/function-settings.request.ts +27 -27
  60. package/src/types/interface/api/requests/function-test.request.ts +39 -39
  61. package/src/types/interface/api/requests/function-version.request.ts +20 -20
  62. package/src/types/interface/api/requests/function.request.ts +36 -36
  63. package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
  64. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  65. package/src/types/interface/api/requests/service-route.request.ts +44 -44
  66. package/src/types/interface/api/requests/service-task.request.ts +80 -80
  67. package/src/types/interface/api/requests/service-version.request.ts +24 -24
  68. package/src/types/interface/api/requests/service.request.ts +46 -46
  69. package/src/types/interface/api/response.ts +4 -4
  70. package/src/types/interface/api/responses/function-access.response.ts +17 -17
  71. package/src/types/interface/api/responses/function-run.response.ts +18 -18
  72. package/src/types/interface/api/responses/function-settings.response.ts +36 -36
  73. package/src/types/interface/api/responses/function-test.response.ts +12 -12
  74. package/src/types/interface/api/responses/function-version.response.ts +31 -31
  75. package/src/types/interface/api/responses/function.response.ts +25 -25
  76. package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
  77. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  78. package/src/types/interface/api/responses/service-route.response.ts +31 -31
  79. package/src/types/interface/api/responses/service-task.response.ts +57 -57
  80. package/src/types/interface/api/responses/service.response.ts +31 -31
  81. package/src/types/interface/health.response.ts +7 -7
  82. package/src/types/interface/index.ts +3 -3
  83. package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
  84. package/src/types/interface/models/reflex-definition.model.ts +31 -31
  85. package/src/types/interface/models/reflex-discord-event.model.ts +7 -6
  86. package/src/types/interface/models/reflex-discord.model.ts +146 -146
  87. package/src/types/interface/models/reflex-execution-settings.model.ts +50 -50
  88. package/src/types/interface/models/reflex-function-version.model.ts +14 -14
  89. package/src/types/interface/models/reflex-function.model.ts +16 -16
  90. package/src/types/interface/models/reflex-price-list.model.ts +20 -20
  91. package/src/types/interface/models/reflex-route.model.ts +19 -19
  92. package/src/types/interface/models/reflex-run.model.ts +4 -1
  93. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
  94. package/src/types/interface/models/reflex-service-deployment.model.ts +46 -46
  95. package/src/types/interface/models/reflex-service.model.ts +45 -45
  96. package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
  97. package/src/types/interface/models/reflex-task.model.ts +97 -97
  98. package/tsconfig.check.json +15 -15
  99. package/tsconfig.json +35 -35
@@ -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
- /** 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
- }
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
+ }
@@ -1,39 +1,39 @@
1
- export interface IFunctionTestParams {
2
- applicationId: string;
3
- functionId: string;
4
- }
5
-
6
- /** The answer an HTTP step gets in a test; nothing is sent. Defaults to `200` with no body. */
7
- export interface IReflexHttpStub {
8
- status: number;
9
- headers?: Record<string, string>;
10
- body?: unknown;
11
- }
12
-
13
- /**
14
- * The answer a `discord.*` call of a step gets in a test; nothing reaches Discord. Without a stub the
15
- * call gets a simulated answer of the shape the edge returns (`{ id }` of a message, a member, a channel...).
16
- */
17
- export interface IReflexDiscordStub {
18
- /** What the call returns: `null` for `getMember` reads as a user who is not a member. */
19
- response: unknown;
20
- }
21
-
22
- export interface ISimulateFunctionBody {
23
- /**
24
- * The environment of the application the run takes place in (abyss-main's id): a dry run reads its
25
- * Store, the run is measured with its effective settings and recorded with it.
26
- */
27
- environmentId: string;
28
- /**
29
- * The event the function receives, as the edge builds it: `{method, path, query, headers, body}`, or the
30
- * input of a run of a task (`ScheduledRunInput` of `@abyss-project/runtime`, `kind` SCHEDULE or DELAYED),
31
- * which no interaction started: `discord.reply`, `update`, `showModal` and `followUp` then reject with `NO_INTERACTION`.
32
- */
33
- input?: unknown;
34
- /** Simulated responses of HTTP steps, by step id. */
35
- httpStubs?: Record<string, IReflexHttpStub>;
36
- /** Answers of the `discord.*` calls of a step, by step id (a Discord bot Service only). */
37
- discordStubs?: Record<string, IReflexDiscordStub>;
38
- }
39
- export type IDryRunFunctionBody = ISimulateFunctionBody;
1
+ export interface IFunctionTestParams {
2
+ applicationId: string;
3
+ functionId: string;
4
+ }
5
+
6
+ /** The answer an HTTP step gets in a test; nothing is sent. Defaults to `200` with no body. */
7
+ export interface IReflexHttpStub {
8
+ status: number;
9
+ headers?: Record<string, string>;
10
+ body?: unknown;
11
+ }
12
+
13
+ /**
14
+ * The answer a `discord.*` call of a step gets in a test; nothing reaches Discord. Without a stub the
15
+ * call gets a simulated answer of the shape the edge returns (`{ id }` of a message, a member, a channel...).
16
+ */
17
+ export interface IReflexDiscordStub {
18
+ /** What the call returns: `null` for `getMember` reads as a user who is not a member. */
19
+ response: unknown;
20
+ }
21
+
22
+ export interface ISimulateFunctionBody {
23
+ /**
24
+ * The environment of the application the run takes place in (abyss-main's id): a dry run reads its
25
+ * Store, the run is measured with its effective settings and recorded with it.
26
+ */
27
+ environmentId: string;
28
+ /**
29
+ * The event the function receives, as the edge builds it: `{method, path, query, headers, body}`, or the
30
+ * input of a run of a task (`ScheduledRunInput` of `@abyss-project/runtime`, `kind` SCHEDULE or DELAYED),
31
+ * which no interaction started: `discord.reply`, `update`, `showModal` and `followUp` then reject with `NO_INTERACTION`.
32
+ */
33
+ input?: unknown;
34
+ /** Simulated responses of HTTP steps, by step id. */
35
+ httpStubs?: Record<string, IReflexHttpStub>;
36
+ /** Answers of the `discord.*` calls of a step, by step id (a Discord bot Service only). */
37
+ discordStubs?: Record<string, IReflexDiscordStub>;
38
+ }
39
+ export type IDryRunFunctionBody = ISimulateFunctionBody;
@@ -1,20 +1,20 @@
1
- export interface IListFunctionVersionParams {
2
- applicationId: string;
3
- functionId: string;
4
- }
5
-
6
- export interface IGetFunctionVersionParams {
7
- applicationId: string;
8
- functionId: string;
9
- versionId: string;
10
- }
11
-
12
- export interface IGetFunctionVersionStepStatsParams {
13
- applicationId: string;
14
- functionId: string;
15
- versionId: string;
16
- }
17
- export interface IGetFunctionVersionStepStatsQuery {
18
- /** Only the executions of this environment; every environment when absent. */
19
- environmentId?: string;
20
- }
1
+ export interface IListFunctionVersionParams {
2
+ applicationId: string;
3
+ functionId: string;
4
+ }
5
+
6
+ export interface IGetFunctionVersionParams {
7
+ applicationId: string;
8
+ functionId: string;
9
+ versionId: string;
10
+ }
11
+
12
+ export interface IGetFunctionVersionStepStatsParams {
13
+ applicationId: string;
14
+ functionId: string;
15
+ versionId: string;
16
+ }
17
+ export interface IGetFunctionVersionStepStatsQuery {
18
+ /** Only the executions of this environment; every environment when absent. */
19
+ environmentId?: string;
20
+ }
@@ -1,36 +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
- /** 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
- }
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
+ }
@@ -1,4 +1,4 @@
1
- export interface IListServiceConfigurationParams {
2
- applicationId: string;
3
- serviceId: string;
4
- }
1
+ export interface IListServiceConfigurationParams {
2
+ applicationId: string;
3
+ serviceId: string;
4
+ }
@@ -1,49 +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
- }
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
+ }
@@ -1,44 +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
- }
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
+ }
@@ -1,80 +1,80 @@
1
- export interface IListServiceTaskParams {
2
- applicationId: string;
3
- serviceId: string;
4
- }
5
-
6
- export interface ICreateServiceTaskParams {
7
- applicationId: string;
8
- serviceId: string;
9
- }
10
- export interface ICreateServiceTaskBody {
11
- /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
12
- name: string;
13
- /** A function of the same Service. */
14
- functionId: string;
15
- /** A cron of 5 fields, at most one tick a minute; null (default) for a task only delayed runs start. */
16
- schedule?: string | null;
17
- /** IANA time zone the cron is read in; `Etc/UTC` by default. */
18
- timezone?: string;
19
- }
20
-
21
- export interface IUpdateServiceTaskParams {
22
- applicationId: string;
23
- serviceId: string;
24
- taskId: string;
25
- }
26
- export interface IUpdateServiceTaskBody {
27
- name?: string;
28
- functionId?: string;
29
- schedule?: string | null;
30
- timezone?: string;
31
- }
32
-
33
- export interface IDeleteServiceTaskParams {
34
- applicationId: string;
35
- serviceId: string;
36
- taskId: string;
37
- }
38
-
39
- export interface ITestRunServiceTaskParams {
40
- applicationId: string;
41
- serviceId: string;
42
- taskId: string;
43
- }
44
- export interface ITestRunServiceTaskBody {
45
- /** The environment of the application the test run takes place in (abyss-main's id). */
46
- environmentId: string;
47
- }
48
-
49
- export interface IListServiceDelayedRunParams {
50
- applicationId: string;
51
- serviceId: string;
52
- environmentId: string;
53
- }
54
-
55
- export interface ICancelServiceDelayedRunParams {
56
- applicationId: string;
57
- serviceId: string;
58
- environmentId: string;
59
- delayedRunId: string;
60
- }
61
-
62
- export interface IRetryServiceScheduleSyncParams {
63
- applicationId: string;
64
- serviceId: string;
65
- environmentId: string;
66
- }
67
-
68
- export interface IListServiceTaskScheduledRunParams {
69
- applicationId: string;
70
- serviceId: string;
71
- taskId: string;
72
- /** The environment of the application whose runs are read (abyss-main's id). */
73
- environmentId: string;
74
- }
75
- export interface IListServiceTaskScheduledRunQuery {
76
- /** 1 to `REFLEX_TASK_LIMITS.scheduledRunPageMax` (50), 50 by default. */
77
- limit?: number;
78
- /** Runs skipped, newest first; 0 by default. */
79
- offset?: number;
80
- }
1
+ export interface IListServiceTaskParams {
2
+ applicationId: string;
3
+ serviceId: string;
4
+ }
5
+
6
+ export interface ICreateServiceTaskParams {
7
+ applicationId: string;
8
+ serviceId: string;
9
+ }
10
+ export interface ICreateServiceTaskBody {
11
+ /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
12
+ name: string;
13
+ /** A function of the same Service. */
14
+ functionId: string;
15
+ /** A cron of 5 fields, at most one tick a minute; null (default) for a task only delayed runs start. */
16
+ schedule?: string | null;
17
+ /** IANA time zone the cron is read in; `Etc/UTC` by default. */
18
+ timezone?: string;
19
+ }
20
+
21
+ export interface IUpdateServiceTaskParams {
22
+ applicationId: string;
23
+ serviceId: string;
24
+ taskId: string;
25
+ }
26
+ export interface IUpdateServiceTaskBody {
27
+ name?: string;
28
+ functionId?: string;
29
+ schedule?: string | null;
30
+ timezone?: string;
31
+ }
32
+
33
+ export interface IDeleteServiceTaskParams {
34
+ applicationId: string;
35
+ serviceId: string;
36
+ taskId: string;
37
+ }
38
+
39
+ export interface ITestRunServiceTaskParams {
40
+ applicationId: string;
41
+ serviceId: string;
42
+ taskId: string;
43
+ }
44
+ export interface ITestRunServiceTaskBody {
45
+ /** The environment of the application the test run takes place in (abyss-main's id). */
46
+ environmentId: string;
47
+ }
48
+
49
+ export interface IListServiceDelayedRunParams {
50
+ applicationId: string;
51
+ serviceId: string;
52
+ environmentId: string;
53
+ }
54
+
55
+ export interface ICancelServiceDelayedRunParams {
56
+ applicationId: string;
57
+ serviceId: string;
58
+ environmentId: string;
59
+ delayedRunId: string;
60
+ }
61
+
62
+ export interface IRetryServiceScheduleSyncParams {
63
+ applicationId: string;
64
+ serviceId: string;
65
+ environmentId: string;
66
+ }
67
+
68
+ export interface IListServiceTaskScheduledRunParams {
69
+ applicationId: string;
70
+ serviceId: string;
71
+ taskId: string;
72
+ /** The environment of the application whose runs are read (abyss-main's id). */
73
+ environmentId: string;
74
+ }
75
+ export interface IListServiceTaskScheduledRunQuery {
76
+ /** 1 to `REFLEX_TASK_LIMITS.scheduledRunPageMax` (50), 50 by default. */
77
+ limit?: number;
78
+ /** Runs skipped, newest first; 0 by default. */
79
+ offset?: number;
80
+ }
@@ -1,24 +1,24 @@
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 IGetServiceVersionDraftStatusParams {
16
- applicationId: string;
17
- serviceId: string;
18
- }
19
-
20
- export interface IGetServiceVersionParams {
21
- applicationId: string;
22
- serviceId: string;
23
- versionId: string;
24
- }
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 IGetServiceVersionDraftStatusParams {
16
+ applicationId: string;
17
+ serviceId: string;
18
+ }
19
+
20
+ export interface IGetServiceVersionParams {
21
+ applicationId: string;
22
+ serviceId: string;
23
+ versionId: string;
24
+ }