@abyss-project/reflex 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/dist/api/function-version.api.d.ts +1 -2
  2. package/dist/api/function-version.api.js +1 -3
  3. package/dist/api/function-version.api.js.map +1 -1
  4. package/dist/api/index.d.ts +5 -2
  5. package/dist/api/index.js +5 -2
  6. package/dist/api/index.js.map +1 -1
  7. package/dist/api/service-deployment.api.d.ts +6 -0
  8. package/dist/api/service-deployment.api.js +19 -0
  9. package/dist/api/service-deployment.api.js.map +1 -0
  10. package/dist/api/service-route.api.d.ts +6 -0
  11. package/dist/api/service-route.api.js +16 -0
  12. package/dist/api/service-route.api.js.map +1 -0
  13. package/dist/api/service-variable.api.d.ts +5 -0
  14. package/dist/api/service-variable.api.js +16 -0
  15. package/dist/api/service-variable.api.js.map +1 -0
  16. package/dist/api/service-version.api.d.ts +4 -0
  17. package/dist/api/service-version.api.js +12 -0
  18. package/dist/api/service-version.api.js.map +1 -0
  19. package/dist/api/service.api.d.ts +6 -0
  20. package/dist/api/service.api.js +17 -0
  21. package/dist/api/service.api.js.map +1 -0
  22. package/dist/index.d.ts +37 -14
  23. package/dist/index.js +37 -14
  24. package/dist/index.js.map +1 -1
  25. package/dist/types/enum/index.d.ts +6 -1
  26. package/dist/types/enum/index.js +6 -1
  27. package/dist/types/enum/index.js.map +1 -1
  28. package/dist/types/enum/reflex-error-code.enum.d.ts +5 -2
  29. package/dist/types/enum/reflex-error-code.enum.js +4 -1
  30. package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
  31. package/dist/types/enum/route-method.enum.d.ts +8 -0
  32. package/dist/types/enum/route-method.enum.js +13 -0
  33. package/dist/types/enum/route-method.enum.js.map +1 -0
  34. package/dist/types/enum/secret-source.enum.d.ts +5 -0
  35. package/dist/types/enum/secret-source.enum.js +10 -0
  36. package/dist/types/enum/secret-source.enum.js.map +1 -0
  37. package/dist/types/enum/service-deployment-action.enum.d.ts +6 -0
  38. package/dist/types/enum/service-deployment-action.enum.js +11 -0
  39. package/dist/types/enum/service-deployment-action.enum.js.map +1 -0
  40. package/dist/types/enum/service-deployment-status.enum.d.ts +4 -0
  41. package/dist/types/enum/service-deployment-status.enum.js +9 -0
  42. package/dist/types/enum/service-deployment-status.enum.js.map +1 -0
  43. package/dist/types/enum/service-type.enum.d.ts +4 -0
  44. package/dist/types/enum/service-type.enum.js +9 -0
  45. package/dist/types/enum/service-type.enum.js.map +1 -0
  46. package/dist/types/enum/service-version-change-kind.enum.d.ts +5 -0
  47. package/dist/types/enum/service-version-change-kind.enum.js +10 -0
  48. package/dist/types/enum/service-version-change-kind.enum.js.map +1 -0
  49. package/dist/types/interface/api/requests/function-version.request.d.ts +0 -4
  50. package/dist/types/interface/api/requests/function.request.d.ts +1 -0
  51. package/dist/types/interface/api/requests/index.d.ts +5 -2
  52. package/dist/types/interface/api/requests/index.js +5 -2
  53. package/dist/types/interface/api/requests/index.js.map +1 -1
  54. package/dist/types/interface/api/requests/service-deployment.request.d.ts +39 -0
  55. package/dist/types/interface/api/requests/{function-promotion.request.js → service-deployment.request.js} +1 -1
  56. package/dist/types/interface/api/requests/service-deployment.request.js.map +1 -0
  57. package/dist/types/interface/api/requests/service-route.request.d.ts +36 -0
  58. package/dist/types/interface/api/requests/{function-trigger.request.js → service-route.request.js} +1 -1
  59. package/dist/types/interface/api/requests/service-route.request.js.map +1 -0
  60. package/dist/types/interface/api/requests/service-variable.request.d.ts +23 -0
  61. package/dist/types/interface/api/{responses/function-trigger.response.js → requests/service-variable.request.js} +1 -1
  62. package/dist/types/interface/api/requests/service-variable.request.js.map +1 -0
  63. package/dist/types/interface/api/requests/service-version.request.d.ts +16 -0
  64. package/dist/types/interface/api/requests/service-version.request.js +3 -0
  65. package/dist/types/interface/api/requests/service-version.request.js.map +1 -0
  66. package/dist/types/interface/api/requests/service.request.d.ts +30 -0
  67. package/dist/types/interface/{models/reflex-trigger.model.js → api/requests/service.request.js} +1 -1
  68. package/dist/types/interface/api/requests/service.request.js.map +1 -0
  69. package/dist/types/interface/api/responses/function-version.response.d.ts +0 -4
  70. package/dist/types/interface/api/responses/index.d.ts +5 -2
  71. package/dist/types/interface/api/responses/index.js +5 -2
  72. package/dist/types/interface/api/responses/index.js.map +1 -1
  73. package/dist/types/interface/api/responses/service-deployment.response.d.ts +24 -0
  74. package/dist/types/interface/api/responses/{function-promotion.response.js → service-deployment.response.js} +1 -1
  75. package/dist/types/interface/api/responses/service-deployment.response.js.map +1 -0
  76. package/dist/types/interface/api/responses/service-route.response.d.ts +23 -0
  77. package/dist/types/interface/api/responses/service-route.response.js +3 -0
  78. package/dist/types/interface/api/responses/service-route.response.js.map +1 -0
  79. package/dist/types/interface/api/responses/service-variable.response.d.ts +22 -0
  80. package/dist/types/interface/api/responses/service-variable.response.js +3 -0
  81. package/dist/types/interface/api/responses/service-variable.response.js.map +1 -0
  82. package/dist/types/interface/api/responses/service-version.response.d.ts +23 -0
  83. package/dist/types/interface/api/responses/service-version.response.js +3 -0
  84. package/dist/types/interface/api/responses/service-version.response.js.map +1 -0
  85. package/dist/types/interface/api/responses/service.response.d.ts +23 -0
  86. package/dist/types/interface/api/responses/service.response.js +3 -0
  87. package/dist/types/interface/api/responses/service.response.js.map +1 -0
  88. package/dist/types/interface/models/index.d.ts +5 -2
  89. package/dist/types/interface/models/index.js +5 -2
  90. package/dist/types/interface/models/index.js.map +1 -1
  91. package/dist/types/interface/models/reflex-function.model.d.ts +1 -0
  92. package/dist/types/interface/models/reflex-route.model.d.ts +12 -0
  93. package/dist/types/interface/models/reflex-route.model.js +3 -0
  94. package/dist/types/interface/models/reflex-route.model.js.map +1 -0
  95. package/dist/types/interface/models/reflex-run.model.d.ts +1 -1
  96. package/dist/types/interface/models/reflex-service-deployment.model.d.ts +20 -0
  97. package/dist/types/interface/models/reflex-service-deployment.model.js +3 -0
  98. package/dist/types/interface/models/reflex-service-deployment.model.js.map +1 -0
  99. package/dist/types/interface/models/reflex-service-variable.model.d.ts +10 -0
  100. package/dist/types/interface/models/reflex-service-variable.model.js +3 -0
  101. package/dist/types/interface/models/reflex-service-variable.model.js.map +1 -0
  102. package/dist/types/interface/models/reflex-service-version.model.d.ts +30 -0
  103. package/dist/types/interface/models/reflex-service-version.model.js +3 -0
  104. package/dist/types/interface/models/reflex-service-version.model.js.map +1 -0
  105. package/dist/types/interface/models/reflex-service.model.d.ts +33 -0
  106. package/dist/types/interface/models/reflex-service.model.js +15 -0
  107. package/dist/types/interface/models/reflex-service.model.js.map +1 -0
  108. package/package.json +1 -1
  109. package/src/api/function-run.api.ts +38 -38
  110. package/src/api/function-test.api.ts +34 -34
  111. package/src/api/function-version.api.ts +48 -56
  112. package/src/api/function.api.test.ts +2 -64
  113. package/src/api/index.ts +12 -9
  114. package/src/api/service-deployment.api.ts +79 -0
  115. package/src/api/service-route.api.ts +72 -0
  116. package/src/api/service-variable.api.ts +58 -0
  117. package/src/api/service-version.api.ts +39 -0
  118. package/src/api/service.api.test.ts +234 -0
  119. package/src/api/service.api.ts +55 -0
  120. package/src/index.ts +196 -152
  121. package/src/types/enum/execution-mode.enum.ts +9 -9
  122. package/src/types/enum/index.ts +19 -14
  123. package/src/types/enum/reflex-error-code.enum.ts +8 -2
  124. package/src/types/enum/route-method.enum.ts +9 -0
  125. package/src/types/enum/secret-source.enum.ts +9 -0
  126. package/src/types/enum/service-deployment-action.enum.ts +11 -0
  127. package/src/types/enum/service-deployment-status.enum.ts +5 -0
  128. package/src/types/enum/service-type.enum.ts +7 -0
  129. package/src/types/enum/service-version-change-kind.enum.ts +6 -0
  130. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  131. package/src/types/interface/api/requests/function-run.request.ts +26 -26
  132. package/src/types/interface/api/requests/function-settings.request.ts +27 -27
  133. package/src/types/interface/api/requests/function-test.request.ts +24 -24
  134. package/src/types/interface/api/requests/function-version.request.ts +0 -5
  135. package/src/types/interface/api/requests/function.request.ts +36 -34
  136. package/src/types/interface/api/requests/index.ts +11 -8
  137. package/src/types/interface/api/requests/service-deployment.request.ts +49 -0
  138. package/src/types/interface/api/requests/service-route.request.ts +44 -0
  139. package/src/types/interface/api/requests/service-variable.request.ts +29 -0
  140. package/src/types/interface/api/requests/service-version.request.ts +19 -0
  141. package/src/types/interface/api/requests/service.request.ts +39 -0
  142. package/src/types/interface/api/responses/function-settings.response.ts +36 -36
  143. package/src/types/interface/api/responses/function-version.response.ts +31 -36
  144. package/src/types/interface/api/responses/index.ts +11 -8
  145. package/src/types/interface/api/responses/service-deployment.response.ts +32 -0
  146. package/src/types/interface/api/responses/service-route.response.ts +31 -0
  147. package/src/types/interface/api/responses/service-variable.response.ts +31 -0
  148. package/src/types/interface/api/responses/service-version.response.ts +33 -0
  149. package/src/types/interface/api/responses/service.response.ts +31 -0
  150. package/src/types/interface/models/index.ts +13 -10
  151. package/src/types/interface/models/reflex-execution-settings.model.ts +50 -50
  152. package/src/types/interface/models/reflex-function.model.ts +16 -14
  153. package/src/types/interface/models/reflex-route.model.ts +19 -0
  154. package/src/types/interface/models/reflex-run.model.ts +5 -5
  155. package/src/types/interface/models/reflex-service-deployment.model.ts +29 -0
  156. package/src/types/interface/models/reflex-service-variable.model.ts +16 -0
  157. package/src/types/interface/models/reflex-service-version.model.ts +43 -0
  158. package/src/types/interface/models/reflex-service.model.ts +46 -0
  159. package/dist/api/function-promotion.api.d.ts +0 -4
  160. package/dist/api/function-promotion.api.js +0 -12
  161. package/dist/api/function-promotion.api.js.map +0 -1
  162. package/dist/api/function-trigger.api.d.ts +0 -5
  163. package/dist/api/function-trigger.api.js +0 -14
  164. package/dist/api/function-trigger.api.js.map +0 -1
  165. package/dist/types/enum/trigger-type.enum.d.ts +0 -3
  166. package/dist/types/enum/trigger-type.enum.js +0 -8
  167. package/dist/types/enum/trigger-type.enum.js.map +0 -1
  168. package/dist/types/interface/api/requests/function-promotion.request.d.ts +0 -20
  169. package/dist/types/interface/api/requests/function-promotion.request.js.map +0 -1
  170. package/dist/types/interface/api/requests/function-trigger.request.d.ts +0 -23
  171. package/dist/types/interface/api/requests/function-trigger.request.js.map +0 -1
  172. package/dist/types/interface/api/responses/function-promotion.response.d.ts +0 -14
  173. package/dist/types/interface/api/responses/function-promotion.response.js.map +0 -1
  174. package/dist/types/interface/api/responses/function-trigger.response.d.ts +0 -18
  175. package/dist/types/interface/api/responses/function-trigger.response.js.map +0 -1
  176. package/dist/types/interface/models/reflex-environment-pointer.model.d.ts +0 -13
  177. package/dist/types/interface/models/reflex-environment-pointer.model.js +0 -3
  178. package/dist/types/interface/models/reflex-environment-pointer.model.js.map +0 -1
  179. package/dist/types/interface/models/reflex-trigger.model.d.ts +0 -13
  180. package/dist/types/interface/models/reflex-trigger.model.js.map +0 -1
  181. package/src/api/function-promotion.api.ts +0 -42
  182. package/src/api/function-trigger.api.ts +0 -52
  183. package/src/types/enum/trigger-type.enum.ts +0 -4
  184. package/src/types/interface/api/requests/function-promotion.request.ts +0 -25
  185. package/src/types/interface/api/requests/function-trigger.request.ts +0 -28
  186. package/src/types/interface/api/responses/function-promotion.response.ts +0 -18
  187. package/src/types/interface/api/responses/function-trigger.response.ts +0 -24
  188. package/src/types/interface/models/reflex-environment-pointer.model.ts +0 -18
  189. package/src/types/interface/models/reflex-trigger.model.ts +0 -17
@@ -1,24 +1,24 @@
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
- export interface ISimulateFunctionBody {
14
- /**
15
- * The environment of the application the run takes place in (abyss-main's id): a dry run reads its
16
- * Store, the run is measured with its effective settings and recorded with it.
17
- */
18
- environmentId: string;
19
- /** The event the function receives, as the edge builds it: `{method, path, query, headers, body}`. */
20
- input?: unknown;
21
- /** Simulated responses of HTTP steps, by step id. */
22
- httpStubs?: Record<string, IReflexHttpStub>;
23
- }
24
- 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
+ export interface ISimulateFunctionBody {
14
+ /**
15
+ * The environment of the application the run takes place in (abyss-main's id): a dry run reads its
16
+ * Store, the run is measured with its effective settings and recorded with it.
17
+ */
18
+ environmentId: string;
19
+ /** The event the function receives, as the edge builds it: `{method, path, query, headers, body}`. */
20
+ input?: unknown;
21
+ /** Simulated responses of HTTP steps, by step id. */
22
+ httpStubs?: Record<string, IReflexHttpStub>;
23
+ }
24
+ export type IDryRunFunctionBody = ISimulateFunctionBody;
@@ -3,11 +3,6 @@ export interface IListFunctionVersionParams {
3
3
  functionId: string;
4
4
  }
5
5
 
6
- export interface IPublishFunctionVersionParams {
7
- applicationId: string;
8
- functionId: string;
9
- }
10
-
11
6
  export interface IGetFunctionVersionParams {
12
7
  applicationId: string;
13
8
  functionId: string;
@@ -1,34 +1,36 @@
1
- import type { IReflexDefinition } from '../../models';
2
-
3
- export interface IListFunctionParams {
4
- applicationId: string;
5
- }
6
-
7
- export interface ICreateFunctionParams {
8
- applicationId: string;
9
- }
10
- export interface ICreateFunctionBody {
11
- /** Unique within the application, 1 to 100 characters. */
12
- name: string;
13
- /** Absent: a function without access or step, to fill in. */
14
- definition?: IReflexDefinition;
15
- }
16
-
17
- export interface IGetFunctionParams {
18
- applicationId: string;
19
- functionId: string;
20
- }
21
-
22
- export interface IUpdateFunctionParams {
23
- applicationId: string;
24
- functionId: string;
25
- }
26
- export interface IUpdateFunctionBody {
27
- name?: string;
28
- definition?: IReflexDefinition;
29
- }
30
-
31
- export interface IDeleteFunctionParams {
32
- applicationId: string;
33
- functionId: string;
34
- }
1
+ import type { IReflexDefinition } from '../../models';
2
+
3
+ export interface IListFunctionParams {
4
+ applicationId: string;
5
+ }
6
+
7
+ export interface ICreateFunctionParams {
8
+ applicationId: string;
9
+ }
10
+ export interface ICreateFunctionBody {
11
+ /** A Service of the application, which the function joins. */
12
+ serviceId: string;
13
+ /** Unique within the application, 1 to 100 characters. */
14
+ name: string;
15
+ /** Absent: a function without access or step, to fill in. */
16
+ definition?: IReflexDefinition;
17
+ }
18
+
19
+ export interface IGetFunctionParams {
20
+ applicationId: string;
21
+ functionId: string;
22
+ }
23
+
24
+ export interface IUpdateFunctionParams {
25
+ applicationId: string;
26
+ functionId: string;
27
+ }
28
+ export interface IUpdateFunctionBody {
29
+ name?: string;
30
+ definition?: IReflexDefinition;
31
+ }
32
+
33
+ export interface IDeleteFunctionParams {
34
+ applicationId: string;
35
+ functionId: string;
36
+ }
@@ -1,8 +1,11 @@
1
- export * from './function.request';
2
- export * from './function-access.request';
3
- export * from './function-test.request';
4
- export * from './function-version.request';
5
- export * from './function-promotion.request';
6
- export * from './function-trigger.request';
7
- export * from './function-run.request';
8
- export * from './function-settings.request';
1
+ export * from './function.request';
2
+ export * from './function-access.request';
3
+ export * from './function-test.request';
4
+ export * from './function-version.request';
5
+ export * from './function-run.request';
6
+ export * from './function-settings.request';
7
+ export * from './service.request';
8
+ export * from './service-route.request';
9
+ export * from './service-version.request';
10
+ export * from './service-deployment.request';
11
+ export * from './service-variable.request';
@@ -0,0 +1,49 @@
1
+ export interface IListServiceDeploymentParams {
2
+ applicationId: string;
3
+ serviceId: string;
4
+ }
5
+ export interface IListServiceDeploymentQuery {
6
+ /** Only the history of this environment; every environment when absent. */
7
+ environmentId?: string;
8
+ /** 1 to 100, 50 by default. */
9
+ limit?: number;
10
+ /** Gestures skipped, newest first; 0 by default. */
11
+ offset?: number;
12
+ }
13
+
14
+ export interface IGoLiveServiceParams {
15
+ applicationId: string;
16
+ serviceId: string;
17
+ }
18
+ /** A production environment needs REFLEX_PUBLISH_PRODUCTION, any other REFLEX_PUBLISH. */
19
+ export interface IGoLiveServiceBody {
20
+ /** An environment of the application (abyss-main's id). */
21
+ environmentId: string;
22
+ serviceVersionId: string;
23
+ }
24
+
25
+ export interface IRollbackServiceParams {
26
+ applicationId: string;
27
+ serviceId: string;
28
+ }
29
+ export interface IRollbackServiceBody {
30
+ environmentId: string;
31
+ /** A deployment of this environment, from the history: its version is put back in service. */
32
+ deploymentId: string;
33
+ }
34
+
35
+ export interface IPauseServiceParams {
36
+ applicationId: string;
37
+ serviceId: string;
38
+ }
39
+ export interface IPauseServiceBody {
40
+ environmentId: string;
41
+ }
42
+
43
+ export interface IResumeServiceParams {
44
+ applicationId: string;
45
+ serviceId: string;
46
+ }
47
+ export interface IResumeServiceBody {
48
+ environmentId: string;
49
+ }
@@ -0,0 +1,44 @@
1
+ import type { RouteMethod, TriggerAccessMode } from '../../../enum';
2
+
3
+ export interface IListServiceRouteParams {
4
+ applicationId: string;
5
+ serviceId: string;
6
+ }
7
+
8
+ export interface ICreateServiceRouteParams {
9
+ applicationId: string;
10
+ serviceId: string;
11
+ }
12
+ export interface ICreateServiceRouteBody {
13
+ /** `ANY` only in a `FUNCTIONS` Service. */
14
+ method: RouteMethod;
15
+ /** Segments of `[a-z0-9._~-]` or `:param` joined by `/`, 20 at most; must not hide another route. */
16
+ path: string;
17
+ /** A function of the same Service. */
18
+ functionId: string;
19
+ accessMode: TriggerAccessMode;
20
+ }
21
+
22
+ export interface IUpdateServiceRouteParams {
23
+ applicationId: string;
24
+ serviceId: string;
25
+ routeId: string;
26
+ }
27
+ export interface IUpdateServiceRouteBody {
28
+ method?: RouteMethod;
29
+ path?: string;
30
+ functionId?: string;
31
+ accessMode?: TriggerAccessMode;
32
+ }
33
+
34
+ export interface IDeleteServiceRouteParams {
35
+ applicationId: string;
36
+ serviceId: string;
37
+ routeId: string;
38
+ }
39
+
40
+ export interface IRotateServiceRouteParams {
41
+ applicationId: string;
42
+ serviceId: string;
43
+ routeId: string;
44
+ }
@@ -0,0 +1,29 @@
1
+ export interface IListServiceVariableParams {
2
+ applicationId: string;
3
+ serviceId: string;
4
+ }
5
+
6
+ export interface ISetServiceVariableParams {
7
+ applicationId: string;
8
+ serviceId: string;
9
+ environmentId: string;
10
+ /** `^[A-Z][A-Z0-9_]{0,63}$`. */
11
+ name: string;
12
+ }
13
+ /** A production environment needs REFLEX_PUBLISH_PRODUCTION, any other REFLEX_FUNCTION_UPDATE. */
14
+ export interface ISetServiceVariableBody {
15
+ /** 4096 characters at most. */
16
+ value: string;
17
+ }
18
+
19
+ export interface IDeleteServiceVariableParams {
20
+ applicationId: string;
21
+ serviceId: string;
22
+ environmentId: string;
23
+ name: string;
24
+ }
25
+
26
+ export interface IGetServiceSecretStatusParams {
27
+ applicationId: string;
28
+ serviceId: string;
29
+ }
@@ -0,0 +1,19 @@
1
+ export interface IListServiceVersionParams {
2
+ applicationId: string;
3
+ serviceId: string;
4
+ }
5
+
6
+ export interface ICreateServiceVersionParams {
7
+ applicationId: string;
8
+ serviceId: string;
9
+ }
10
+ export interface ICreateServiceVersionBody {
11
+ /** 500 characters at most. */
12
+ message?: string;
13
+ }
14
+
15
+ export interface IGetServiceVersionParams {
16
+ applicationId: string;
17
+ serviceId: string;
18
+ versionId: string;
19
+ }
@@ -0,0 +1,39 @@
1
+ import type { ServiceType } from '../../../enum';
2
+ import type { IReflexServiceCors } from '../../models';
3
+
4
+ export interface IListServiceParams {
5
+ applicationId: string;
6
+ }
7
+
8
+ export interface ICreateServiceParams {
9
+ applicationId: string;
10
+ }
11
+ export interface ICreateServiceBody {
12
+ /** Unique within the application, 1 to 100 characters. */
13
+ name: string;
14
+ /** `^[a-z0-9][a-z0-9-]{0,39}$`, unique within the application, immutable. */
15
+ slug: string;
16
+ type: ServiceType;
17
+ }
18
+
19
+ export interface IGetServiceParams {
20
+ applicationId: string;
21
+ serviceId: string;
22
+ }
23
+
24
+ export interface IUpdateServiceParams {
25
+ applicationId: string;
26
+ serviceId: string;
27
+ }
28
+ /** Changes the draft: the next version freezes `cors` and `rateLimitPerIpPerMinute`. */
29
+ export interface IUpdateServiceBody {
30
+ name?: string;
31
+ cors?: IReflexServiceCors;
32
+ /** 1 to 6000. */
33
+ rateLimitPerIpPerMinute?: number;
34
+ }
35
+
36
+ export interface IDeleteServiceParams {
37
+ applicationId: string;
38
+ serviceId: string;
39
+ }
@@ -1,36 +1,36 @@
1
- import type {
2
- IReflexEffectiveExecutionSettings,
3
- IReflexExecutionSettings,
4
- IReflexExecutionSettingsValues,
5
- IReflexPriceList,
6
- } from '../../models';
7
- import type { IResponse } from '../response';
8
-
9
- export interface IGetFunctionSettingsData {
10
- /** The default of the function; null when none is set. */
11
- default: IReflexExecutionSettings | null;
12
- /** The override of each environment that has one. */
13
- environments: IReflexExecutionSettings[];
14
- /** What each environment of the application runs with. */
15
- effective: IReflexEffectiveExecutionSettings[];
16
- /** What applies when neither the environment nor the function sets anything. */
17
- builtIn: IReflexExecutionSettingsValues;
18
- /** The price list an execution is billed with, to estimate the cost of a setting. */
19
- priceList: IReflexPriceList;
20
- }
21
- export type IGetFunctionSettingsResponse = IResponse<IGetFunctionSettingsData>;
22
-
23
- export interface ISetFunctionDefaultSettingsData {
24
- settings: IReflexExecutionSettings;
25
- }
26
- export type ISetFunctionDefaultSettingsResponse = IResponse<ISetFunctionDefaultSettingsData>;
27
-
28
- export interface ISetFunctionEnvironmentSettingsData {
29
- settings: IReflexExecutionSettings;
30
- }
31
- export type ISetFunctionEnvironmentSettingsResponse =
32
- IResponse<ISetFunctionEnvironmentSettingsData>;
33
-
34
- export type IRemoveFunctionEnvironmentSettingsData = Record<string, never>;
35
- export type IRemoveFunctionEnvironmentSettingsResponse =
36
- IResponse<IRemoveFunctionEnvironmentSettingsData>;
1
+ import type {
2
+ IReflexEffectiveExecutionSettings,
3
+ IReflexExecutionSettings,
4
+ IReflexExecutionSettingsValues,
5
+ IReflexPriceList,
6
+ } from '../../models';
7
+ import type { IResponse } from '../response';
8
+
9
+ export interface IGetFunctionSettingsData {
10
+ /** The default of the function; null when none is set. */
11
+ default: IReflexExecutionSettings | null;
12
+ /** The override of each environment that has one. */
13
+ environments: IReflexExecutionSettings[];
14
+ /** What each environment of the application runs with. */
15
+ effective: IReflexEffectiveExecutionSettings[];
16
+ /** What applies when neither the environment nor the function sets anything. */
17
+ builtIn: IReflexExecutionSettingsValues;
18
+ /** The price list an execution is billed with, to estimate the cost of a setting. */
19
+ priceList: IReflexPriceList;
20
+ }
21
+ export type IGetFunctionSettingsResponse = IResponse<IGetFunctionSettingsData>;
22
+
23
+ export interface ISetFunctionDefaultSettingsData {
24
+ settings: IReflexExecutionSettings;
25
+ }
26
+ export type ISetFunctionDefaultSettingsResponse = IResponse<ISetFunctionDefaultSettingsData>;
27
+
28
+ export interface ISetFunctionEnvironmentSettingsData {
29
+ settings: IReflexExecutionSettings;
30
+ }
31
+ export type ISetFunctionEnvironmentSettingsResponse =
32
+ IResponse<ISetFunctionEnvironmentSettingsData>;
33
+
34
+ export type IRemoveFunctionEnvironmentSettingsData = Record<string, never>;
35
+ export type IRemoveFunctionEnvironmentSettingsResponse =
36
+ IResponse<IRemoveFunctionEnvironmentSettingsData>;
@@ -1,36 +1,31 @@
1
- import type {
2
- IReflexFunctionVersion,
3
- IReflexRunningVersionHeapPeaks,
4
- IReflexStepStats,
5
- } from '../../models';
6
- import type { IResponse } from '../response';
7
-
8
- export interface IListFunctionVersionData {
9
- versions: IReflexFunctionVersion[];
10
- }
11
- export type IListFunctionVersionResponse = IResponse<IListFunctionVersionData>;
12
-
13
- export interface IPublishFunctionVersionData {
14
- version: IReflexFunctionVersion;
15
- }
16
- export type IPublishFunctionVersionResponse = IResponse<IPublishFunctionVersionData>;
17
-
18
- export interface IGetFunctionVersionData {
19
- version: IReflexFunctionVersion;
20
- }
21
- export type IGetFunctionVersionResponse = IResponse<IGetFunctionVersionData>;
22
-
23
- export interface IGetFunctionVersionStepStatsData {
24
- versionId: string;
25
- /** The environment asked for; null for every environment. */
26
- environmentId: string | null;
27
- /** The window the statistics cover: the retention of the live runs. */
28
- windowDays: number;
29
- /** Executions of the version in the window, interrupted and running ones left out. */
30
- executions: number;
31
- /** One entry per step that ran, most costly first. */
32
- steps: IReflexStepStats[];
33
- /** The p99 heap peak per step of the version running in `environmentId`; null without an environment or when nothing runs there. */
34
- runningVersion: IReflexRunningVersionHeapPeaks | null;
35
- }
36
- export type IGetFunctionVersionStepStatsResponse = IResponse<IGetFunctionVersionStepStatsData>;
1
+ import type {
2
+ IReflexFunctionVersion,
3
+ IReflexRunningVersionHeapPeaks,
4
+ IReflexStepStats,
5
+ } from '../../models';
6
+ import type { IResponse } from '../response';
7
+
8
+ export interface IListFunctionVersionData {
9
+ versions: IReflexFunctionVersion[];
10
+ }
11
+ export type IListFunctionVersionResponse = IResponse<IListFunctionVersionData>;
12
+
13
+ export interface IGetFunctionVersionData {
14
+ version: IReflexFunctionVersion;
15
+ }
16
+ export type IGetFunctionVersionResponse = IResponse<IGetFunctionVersionData>;
17
+
18
+ export interface IGetFunctionVersionStepStatsData {
19
+ versionId: string;
20
+ /** The environment asked for; null for every environment. */
21
+ environmentId: string | null;
22
+ /** The window the statistics cover: the retention of the live runs. */
23
+ windowDays: number;
24
+ /** Executions of the version in the window, interrupted and running ones left out. */
25
+ executions: number;
26
+ /** One entry per step that ran, most costly first. */
27
+ steps: IReflexStepStats[];
28
+ /** The p99 heap peak per step of the version running in `environmentId`; null without an environment or when nothing runs there. */
29
+ runningVersion: IReflexRunningVersionHeapPeaks | null;
30
+ }
31
+ export type IGetFunctionVersionStepStatsResponse = IResponse<IGetFunctionVersionStepStatsData>;
@@ -1,8 +1,11 @@
1
- export * from './function.response';
2
- export * from './function-access.response';
3
- export * from './function-test.response';
4
- export * from './function-version.response';
5
- export * from './function-promotion.response';
6
- export * from './function-trigger.response';
7
- export * from './function-run.response';
8
- export * from './function-settings.response';
1
+ export * from './function.response';
2
+ export * from './function-access.response';
3
+ export * from './function-test.response';
4
+ export * from './function-version.response';
5
+ export * from './function-run.response';
6
+ export * from './function-settings.response';
7
+ export * from './service.response';
8
+ export * from './service-route.response';
9
+ export * from './service-version.response';
10
+ export * from './service-deployment.response';
11
+ export * from './service-variable.response';
@@ -0,0 +1,32 @@
1
+ import type { IReflexServiceDeployment } from '../../models';
2
+ import type { IResponse } from '../response';
3
+
4
+ export interface IListServiceDeploymentData {
5
+ /** The current deployment of each environment. */
6
+ current: IReflexServiceDeployment[];
7
+ /** Every gesture, newest first, one page of it. */
8
+ history: IReflexServiceDeployment[];
9
+ /** Gestures in the history, every page. */
10
+ total: number;
11
+ }
12
+ export type IListServiceDeploymentResponse = IResponse<IListServiceDeploymentData>;
13
+
14
+ export interface IGoLiveServiceData {
15
+ deployment: IReflexServiceDeployment;
16
+ }
17
+ export type IGoLiveServiceResponse = IResponse<IGoLiveServiceData>;
18
+
19
+ export interface IRollbackServiceData {
20
+ deployment: IReflexServiceDeployment;
21
+ }
22
+ export type IRollbackServiceResponse = IResponse<IRollbackServiceData>;
23
+
24
+ export interface IPauseServiceData {
25
+ deployment: IReflexServiceDeployment;
26
+ }
27
+ export type IPauseServiceResponse = IResponse<IPauseServiceData>;
28
+
29
+ export interface IResumeServiceData {
30
+ deployment: IReflexServiceDeployment;
31
+ }
32
+ export type IResumeServiceResponse = IResponse<IResumeServiceData>;
@@ -0,0 +1,31 @@
1
+ import type { IReflexRoute } from '../../models';
2
+ import type { IResponse } from '../response';
3
+
4
+ export interface IListServiceRouteData {
5
+ routes: IReflexRoute[];
6
+ }
7
+ export type IListServiceRouteResponse = IResponse<IListServiceRouteData>;
8
+
9
+ export interface ICreateServiceRouteData {
10
+ route: IReflexRoute;
11
+ /** The API key (API_KEY) or the signing secret (SIGNATURE), in clear, ONCE. `null` for PUBLIC. */
12
+ secret: string | null;
13
+ }
14
+ export type ICreateServiceRouteResponse = IResponse<ICreateServiceRouteData>;
15
+
16
+ export interface IUpdateServiceRouteData {
17
+ route: IReflexRoute;
18
+ /** A new key or signing secret, in clear, ONCE, when the change of `accessMode` needs one; `null` otherwise. */
19
+ secret: string | null;
20
+ }
21
+ export type IUpdateServiceRouteResponse = IResponse<IUpdateServiceRouteData>;
22
+
23
+ export type IDeleteServiceRouteData = Record<string, never>;
24
+ export type IDeleteServiceRouteResponse = IResponse<IDeleteServiceRouteData>;
25
+
26
+ export interface IRotateServiceRouteData {
27
+ route: IReflexRoute;
28
+ /** The new key or signing secret, in clear, ONCE; the previous one stops working at once. */
29
+ secret: string;
30
+ }
31
+ export type IRotateServiceRouteResponse = IResponse<IRotateServiceRouteData>;
@@ -0,0 +1,31 @@
1
+ import type { SecretSource } from '../../../enum';
2
+ import type { IReflexServiceVariable } from '../../models';
3
+ import type { IResponse } from '../response';
4
+
5
+ export interface IListServiceVariableData {
6
+ /** Every variable of the Service, in every environment. */
7
+ variables: IReflexServiceVariable[];
8
+ }
9
+ export type IListServiceVariableResponse = IResponse<IListServiceVariableData>;
10
+
11
+ export interface ISetServiceVariableData {
12
+ variable: IReflexServiceVariable;
13
+ }
14
+ export type ISetServiceVariableResponse = IResponse<ISetServiceVariableData>;
15
+
16
+ export type IDeleteServiceVariableData = Record<string, never>;
17
+ export type IDeleteServiceVariableResponse = IResponse<IDeleteServiceVariableData>;
18
+
19
+ /** A secret the functions of the Service use, and where its value comes from in each environment. Never the value. */
20
+ export interface IReflexServiceSecretStatus {
21
+ name: string;
22
+ /** The Console vault entry of that name in the project; null when there is none. */
23
+ secretId: string | null;
24
+ /** By environment id of the application. */
25
+ sources: Record<string, SecretSource>;
26
+ }
27
+
28
+ export interface IGetServiceSecretStatusData {
29
+ secrets: IReflexServiceSecretStatus[];
30
+ }
31
+ export type IGetServiceSecretStatusResponse = IResponse<IGetServiceSecretStatusData>;
@@ -0,0 +1,33 @@
1
+ import type { ServiceVersionChangeKind } from '../../../enum';
2
+ import type { IReflexServiceVersion, IReflexServiceVersionRoute } from '../../models';
3
+ import type { IResponse } from '../response';
4
+
5
+ /** How one route differs from the previous version, matched by route id. */
6
+ export interface IReflexServiceVersionRouteChange {
7
+ routeId: string;
8
+ kind: ServiceVersionChangeKind;
9
+ /** The route in the previous version; null when ADDED. */
10
+ before: IReflexServiceVersionRoute | null;
11
+ /** The route in this version; null when REMOVED. */
12
+ after: IReflexServiceVersionRoute | null;
13
+ }
14
+
15
+ export interface IListServiceVersionData {
16
+ /** Newest first. */
17
+ versions: IReflexServiceVersion[];
18
+ }
19
+ export type IListServiceVersionResponse = IResponse<IListServiceVersionData>;
20
+
21
+ export interface ICreateServiceVersionData {
22
+ version: IReflexServiceVersion;
23
+ }
24
+ export type ICreateServiceVersionResponse = IResponse<ICreateServiceVersionData>;
25
+
26
+ export interface IGetServiceVersionData {
27
+ version: IReflexServiceVersion;
28
+ /** The version just before; null for the first one. */
29
+ previousVersion: IReflexServiceVersion | null;
30
+ /** The routes added, removed or modified since `previousVersion` (every route is ADDED for the first one). */
31
+ routeChanges: IReflexServiceVersionRouteChange[];
32
+ }
33
+ export type IGetServiceVersionResponse = IResponse<IGetServiceVersionData>;
@@ -0,0 +1,31 @@
1
+ import type { IReflexService, IReflexServiceDeployment } from '../../models';
2
+ import type { IResponse } from '../response';
3
+
4
+ /** A Service with what runs in each environment of the application. */
5
+ export interface IReflexServiceListItem extends IReflexService {
6
+ /** The current deployment of each environment where the Service was ever put in service. */
7
+ currentDeployments: IReflexServiceDeployment[];
8
+ }
9
+
10
+ export interface IListServiceData {
11
+ services: IReflexServiceListItem[];
12
+ }
13
+ export type IListServiceResponse = IResponse<IListServiceData>;
14
+
15
+ export interface ICreateServiceData {
16
+ service: IReflexService;
17
+ }
18
+ export type ICreateServiceResponse = IResponse<ICreateServiceData>;
19
+
20
+ export interface IGetServiceData {
21
+ service: IReflexService;
22
+ }
23
+ export type IGetServiceResponse = IResponse<IGetServiceData>;
24
+
25
+ export interface IUpdateServiceData {
26
+ service: IReflexService;
27
+ }
28
+ export type IUpdateServiceResponse = IResponse<IUpdateServiceData>;
29
+
30
+ export type IDeleteServiceData = Record<string, never>;
31
+ export type IDeleteServiceResponse = IResponse<IDeleteServiceData>;