@abyss-project/reflex 6.0.3 → 6.0.5

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 (154) 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-completion-webhook.model.d.ts +9 -0
  5. package/dist/types/interface/models/reflex-completion-webhook.model.js +10 -1
  6. package/dist/types/interface/models/reflex-completion-webhook.model.js.map +1 -1
  7. package/dist/types/interface/models/reflex-service-limits.model.d.ts +5 -2
  8. package/jest.config.ts +11 -11
  9. package/package.json +1 -1
  10. package/src/api/alert-rule.api.test.ts +72 -72
  11. package/src/api/alert-rule.api.ts +57 -57
  12. package/src/api/application-insights.api.test.ts +42 -42
  13. package/src/api/application-insights.api.ts +38 -38
  14. package/src/api/application-run-settings.api.test.ts +51 -51
  15. package/src/api/application-run-settings.api.ts +30 -30
  16. package/src/api/function-access.api.ts +87 -87
  17. package/src/api/function-insights.api.test.ts +27 -27
  18. package/src/api/function-insights.api.ts +18 -18
  19. package/src/api/function-run.api.ts +38 -38
  20. package/src/api/function-settings.api.ts +74 -74
  21. package/src/api/function-template.api.test.ts +72 -72
  22. package/src/api/function-template.api.ts +52 -52
  23. package/src/api/function-test.api.ts +34 -34
  24. package/src/api/function-version.api.ts +66 -66
  25. package/src/api/function.api.ts +62 -62
  26. package/src/api/health.api.ts +10 -10
  27. package/src/api/route-stats.api.test.ts +45 -45
  28. package/src/api/route-stats.api.ts +36 -36
  29. package/src/api/service-completion-webhook.api.test.ts +10 -0
  30. package/src/api/service-configuration.api.ts +16 -16
  31. package/src/api/service-deployment.api.ts +79 -79
  32. package/src/api/service-discord-event.api.test.ts +106 -106
  33. package/src/api/service-discord-event.api.ts +78 -78
  34. package/src/api/service-insights.api.test.ts +36 -36
  35. package/src/api/service-insights.api.ts +42 -42
  36. package/src/api/service-task.api.test.ts +140 -140
  37. package/src/api/service-task.api.ts +141 -141
  38. package/src/api/service-version.api.ts +54 -54
  39. package/src/api/service.api.test.ts +215 -215
  40. package/src/api/service.api.ts +55 -55
  41. package/src/discord/discord-event-filter-cases.ts +261 -261
  42. package/src/discord/discord-event-filters.test.ts +91 -91
  43. package/src/discord/discord-event-filters.ts +95 -95
  44. package/src/discord/discord-event-intents.test.ts +112 -112
  45. package/src/discord/discord-event-intents.ts +55 -55
  46. package/src/discord/index.ts +3 -3
  47. package/src/insights/index.ts +1 -1
  48. package/src/insights/percentiles.test.ts +75 -75
  49. package/src/insights/percentiles.ts +37 -37
  50. package/src/types/enum/access-grant-status.enum.ts +12 -12
  51. package/src/types/enum/access-kind.enum.ts +7 -7
  52. package/src/types/enum/access-request-status.enum.ts +11 -11
  53. package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
  54. package/src/types/enum/configuration-read-as.enum.ts +5 -5
  55. package/src/types/enum/discord-activity-type.enum.ts +9 -9
  56. package/src/types/enum/discord-channel-type.enum.ts +11 -11
  57. package/src/types/enum/discord-component-kind.enum.ts +7 -7
  58. package/src/types/enum/discord-event-drop-reason.enum.ts +13 -13
  59. package/src/types/enum/discord-event-filter-name.enum.ts +11 -11
  60. package/src/types/enum/discord-event-status.enum.ts +13 -13
  61. package/src/types/enum/discord-event-type.enum.ts +7 -7
  62. package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -11
  63. package/src/types/enum/discord-gateway-state.enum.ts +11 -11
  64. package/src/types/enum/discord-host-action.enum.ts +35 -35
  65. package/src/types/enum/discord-locale.enum.ts +35 -35
  66. package/src/types/enum/discord-option-type.enum.ts +12 -12
  67. package/src/types/enum/discord-presence-status.enum.ts +8 -8
  68. package/src/types/enum/discord-sync-status.enum.ts +6 -6
  69. package/src/types/enum/discord-token-state.enum.ts +11 -11
  70. package/src/types/enum/execution-mode.enum.ts +9 -9
  71. package/src/types/enum/execution-profile.enum.ts +20 -20
  72. package/src/types/enum/execution-settings-source.enum.ts +9 -9
  73. package/src/types/enum/health-status.enum.ts +4 -4
  74. package/src/types/enum/insights-period.enum.ts +8 -8
  75. package/src/types/enum/log-cap-mode.enum.ts +6 -6
  76. package/src/types/enum/log-drop-cause.enum.ts +8 -8
  77. package/src/types/enum/reflex-alert-metric.enum.ts +5 -5
  78. package/src/types/enum/reflex-alert-notification-state.enum.ts +6 -6
  79. package/src/types/enum/reflex-alert-scope.enum.ts +6 -6
  80. package/src/types/enum/route-method.enum.ts +9 -9
  81. package/src/types/enum/run-log-level.enum.ts +6 -6
  82. package/src/types/enum/run-mode.enum.ts +11 -11
  83. package/src/types/enum/run-step-status.enum.ts +7 -7
  84. package/src/types/enum/schedule-sync-status.enum.ts +6 -6
  85. package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
  86. package/src/types/enum/scheduled-run-status.enum.ts +17 -17
  87. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  88. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  89. package/src/types/enum/service-type.enum.ts +9 -9
  90. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  91. package/src/types/enum/trace-effect-type.enum.ts +12 -12
  92. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  93. package/src/types/enum/trigger-kind.enum.ts +8 -8
  94. package/src/types/enum/vault-value-source.enum.ts +12 -12
  95. package/src/types/enum/vault-visibility.enum.ts +5 -5
  96. package/src/types/index.ts +2 -2
  97. package/src/types/interface/api/index.ts +3 -3
  98. package/src/types/interface/api/requests/alert-rule.request.ts +53 -53
  99. package/src/types/interface/api/requests/application-insights.request.ts +18 -18
  100. package/src/types/interface/api/requests/application-run-settings.request.ts +11 -11
  101. package/src/types/interface/api/requests/function-access.request.ts +51 -51
  102. package/src/types/interface/api/requests/function-settings.request.ts +34 -34
  103. package/src/types/interface/api/requests/function-template.request.ts +29 -29
  104. package/src/types/interface/api/requests/function-version.request.ts +38 -38
  105. package/src/types/interface/api/requests/function.request.ts +36 -36
  106. package/src/types/interface/api/requests/route-stats.request.ts +22 -22
  107. package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
  108. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  109. package/src/types/interface/api/requests/service-discord-event.request.ts +68 -68
  110. package/src/types/interface/api/requests/service-insights.request.ts +31 -31
  111. package/src/types/interface/api/requests/service-task.request.ts +80 -80
  112. package/src/types/interface/api/requests/service-version.request.ts +24 -24
  113. package/src/types/interface/api/requests/service.request.ts +46 -46
  114. package/src/types/interface/api/response.ts +4 -4
  115. package/src/types/interface/api/responses/alert-rule.response.ts +24 -24
  116. package/src/types/interface/api/responses/application-insights.response.ts +11 -11
  117. package/src/types/interface/api/responses/application-run-settings.response.ts +8 -8
  118. package/src/types/interface/api/responses/function-access.response.ts +45 -45
  119. package/src/types/interface/api/responses/function-run.response.ts +18 -18
  120. package/src/types/interface/api/responses/function-template.response.ts +21 -21
  121. package/src/types/interface/api/responses/function-version.response.ts +42 -42
  122. package/src/types/interface/api/responses/function.response.ts +25 -25
  123. package/src/types/interface/api/responses/route-stats.response.ts +15 -15
  124. package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
  125. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  126. package/src/types/interface/api/responses/service-discord-event.response.ts +24 -24
  127. package/src/types/interface/api/responses/service-insights.response.ts +11 -11
  128. package/src/types/interface/api/responses/service-task.response.ts +57 -57
  129. package/src/types/interface/api/responses/service-version.response.ts +112 -112
  130. package/src/types/interface/api/responses/service.response.ts +31 -31
  131. package/src/types/interface/health.response.ts +7 -7
  132. package/src/types/interface/index.ts +3 -3
  133. package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
  134. package/src/types/interface/models/reflex-access-request.model.ts +15 -15
  135. package/src/types/interface/models/reflex-alert-rule.model.ts +56 -56
  136. package/src/types/interface/models/reflex-completion-webhook.model.ts +26 -0
  137. package/src/types/interface/models/reflex-definition.model.ts +31 -31
  138. package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -58
  139. package/src/types/interface/models/reflex-discord-event.model.ts +79 -79
  140. package/src/types/interface/models/reflex-discord.model.ts +196 -196
  141. package/src/types/interface/models/reflex-function-template.model.ts +18 -18
  142. package/src/types/interface/models/reflex-function-version.model.ts +19 -19
  143. package/src/types/interface/models/reflex-function.model.ts +30 -30
  144. package/src/types/interface/models/reflex-insights.model.ts +215 -215
  145. package/src/types/interface/models/reflex-price-list.model.ts +20 -20
  146. package/src/types/interface/models/reflex-run-settings.model.ts +28 -28
  147. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
  148. package/src/types/interface/models/reflex-service-deployment.model.ts +46 -46
  149. package/src/types/interface/models/reflex-service-limits.model.ts +17 -8
  150. package/src/types/interface/models/reflex-service.model.ts +45 -45
  151. package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
  152. package/src/types/interface/models/reflex-task.model.ts +97 -97
  153. package/tsconfig.check.json +15 -15
  154. package/tsconfig.json +35 -35
@@ -1,12 +1,12 @@
1
- /** The kind of effect one trace entry records. */
2
- export enum TraceEffectType {
3
- /**
4
- * An evaluation of expressions or code. Only in test runs recorded before Reflex lot 0 (#773), which
5
- * the retention still keeps: evaluations now happen inside the runner's isolate and are not traced.
6
- */
7
- EVALUATE = 'EVALUATE',
8
- /** An HTTP call: an HTTP step or `fetch()`. */
9
- HTTP = 'HTTP',
10
- /** A call to the host: `store.*`, `secret.get`, `http.respond`, `wait` (its `action`). */
11
- HOST = 'HOST',
12
- }
1
+ /** The kind of effect one trace entry records. */
2
+ export enum TraceEffectType {
3
+ /**
4
+ * An evaluation of expressions or code. Only in test runs recorded before Reflex lot 0 (#773), which
5
+ * the retention still keeps: evaluations now happen inside the runner's isolate and are not traced.
6
+ */
7
+ EVALUATE = 'EVALUATE',
8
+ /** An HTTP call: an HTTP step or `fetch()`. */
9
+ HTTP = 'HTTP',
10
+ /** A call to the host: `store.*`, `secret.get`, `http.respond`, `wait` (its `action`). */
11
+ HOST = 'HOST',
12
+ }
@@ -1,12 +1,12 @@
1
- /**
2
- * Who may call a route of a Service.
3
- * - PUBLIC: anyone.
4
- * - API_KEY: the caller sends the key in `x-api-key`.
5
- * - SIGNATURE: the caller signs the raw body: `x-reflex-signature: sha256=<hex HMAC-SHA256(secret,
6
- * "<timestamp>." + body)>` with `x-reflex-timestamp` in Unix seconds, within 300 s of the edge's clock.
7
- */
8
- export enum TriggerAccessMode {
9
- PUBLIC = 'PUBLIC',
10
- API_KEY = 'API_KEY',
11
- SIGNATURE = 'SIGNATURE',
12
- }
1
+ /**
2
+ * Who may call a route of a Service.
3
+ * - PUBLIC: anyone.
4
+ * - API_KEY: the caller sends the key in `x-api-key`.
5
+ * - SIGNATURE: the caller signs the raw body: `x-reflex-signature: sha256=<hex HMAC-SHA256(secret,
6
+ * "<timestamp>." + body)>` with `x-reflex-timestamp` in Unix seconds, within 300 s of the edge's clock.
7
+ */
8
+ export enum TriggerAccessMode {
9
+ PUBLIC = 'PUBLIC',
10
+ API_KEY = 'API_KEY',
11
+ SIGNATURE = 'SIGNATURE',
12
+ }
@@ -1,8 +1,8 @@
1
- /** What started an execution of a Service. */
2
- export enum TriggerKind {
3
- COMMAND = 'COMMAND',
4
- COMPONENT = 'COMPONENT',
5
- EVENT = 'EVENT',
6
- TASK = 'TASK',
7
- ROUTE = 'ROUTE',
8
- }
1
+ /** What started an execution of a Service. */
2
+ export enum TriggerKind {
3
+ COMMAND = 'COMMAND',
4
+ COMPONENT = 'COMPONENT',
5
+ EVENT = 'EVENT',
6
+ TASK = 'TASK',
7
+ ROUTE = 'ROUTE',
8
+ }
@@ -1,12 +1,12 @@
1
- /**
2
- * Where the value a Console vault entry gives to an environment comes from, in the order of the
3
- * resolution: the value of the environment, the entry's default value, the value of the entry's default
4
- * environment, or nothing (the entry is absent for the environment). Mirrors Console's enum of the
5
- * same name, so the SDK needs no dependency on it.
6
- */
7
- export enum VaultValueSource {
8
- ENVIRONMENT = 'ENVIRONMENT',
9
- DEFAULT = 'DEFAULT',
10
- DEFAULT_ENVIRONMENT = 'DEFAULT_ENVIRONMENT',
11
- ABSENT = 'ABSENT',
12
- }
1
+ /**
2
+ * Where the value a Console vault entry gives to an environment comes from, in the order of the
3
+ * resolution: the value of the environment, the entry's default value, the value of the entry's default
4
+ * environment, or nothing (the entry is absent for the environment). Mirrors Console's enum of the
5
+ * same name, so the SDK needs no dependency on it.
6
+ */
7
+ export enum VaultValueSource {
8
+ ENVIRONMENT = 'ENVIRONMENT',
9
+ DEFAULT = 'DEFAULT',
10
+ DEFAULT_ENVIRONMENT = 'DEFAULT_ENVIRONMENT',
11
+ ABSENT = 'ABSENT',
12
+ }
@@ -1,5 +1,5 @@
1
- /** Whether a Console vault entry hides its value. Mirrors Console's `SecretVisibility`. */
2
- export enum VaultVisibility {
3
- SECRET = 'SECRET',
4
- VISIBLE = 'VISIBLE',
5
- }
1
+ /** Whether a Console vault entry hides its value. Mirrors Console's `SecretVisibility`. */
2
+ export enum VaultVisibility {
3
+ SECRET = 'SECRET',
4
+ VISIBLE = 'VISIBLE',
5
+ }
@@ -1,2 +1,2 @@
1
- export * from './enum';
2
- export * from './interface';
1
+ export * from './enum';
2
+ export * from './interface';
@@ -1,3 +1,3 @@
1
- export * from './response';
2
- export * from './requests';
3
- export * from './responses';
1
+ export * from './response';
2
+ export * from './requests';
3
+ export * from './responses';
@@ -1,53 +1,53 @@
1
- import type { ReflexAlertMetric, ReflexAlertScope } from '../../../enum';
2
-
3
- export interface IListAlertRuleParams {
4
- applicationId: string;
5
- }
6
- export interface IListAlertRuleQuery {
7
- /** Only the rules of this environment of the application (abyss-main's id). */
8
- environmentId?: string;
9
- }
10
-
11
- export interface ICreateAlertRuleParams {
12
- applicationId: string;
13
- }
14
- export interface ICreateAlertRuleBody {
15
- /** The environment the rule watches (abyss-main's id). */
16
- environmentId: string;
17
- scope: ReflexAlertScope;
18
- /** Required for the scopes SERVICE and ROUTE; forbidden for FUNCTION. */
19
- serviceId?: string;
20
- /** Required for the scope ROUTE; forbidden otherwise. */
21
- routeId?: string;
22
- /** Required for the scope FUNCTION; forbidden otherwise. */
23
- functionId?: string;
24
- metric: ReflexAlertMetric;
25
- /** Within the bounds of the metric (`REFLEX_ALERT_RULE_LIMITS.threshold`). */
26
- threshold: number;
27
- /** One of `REFLEX_ALERT_RULE_LIMITS.windowMinutes`. */
28
- windowMinutes: number;
29
- /** `REFLEX_ALERT_RULE_LIMITS.minRuns.default` when omitted. */
30
- minRuns?: number;
31
- /** True when omitted. */
32
- enabled?: boolean;
33
- /** 1 to 64 characters. */
34
- name: string;
35
- }
36
-
37
- export interface IUpdateAlertRuleParams {
38
- applicationId: string;
39
- ruleId: string;
40
- }
41
- /** The environment, the scope, the target and the metric of a rule never change. Every value is required. */
42
- export interface IUpdateAlertRuleBody {
43
- threshold: number;
44
- windowMinutes: number;
45
- minRuns: number;
46
- enabled: boolean;
47
- name: string;
48
- }
49
-
50
- export interface IDeleteAlertRuleParams {
51
- applicationId: string;
52
- ruleId: string;
53
- }
1
+ import type { ReflexAlertMetric, ReflexAlertScope } from '../../../enum';
2
+
3
+ export interface IListAlertRuleParams {
4
+ applicationId: string;
5
+ }
6
+ export interface IListAlertRuleQuery {
7
+ /** Only the rules of this environment of the application (abyss-main's id). */
8
+ environmentId?: string;
9
+ }
10
+
11
+ export interface ICreateAlertRuleParams {
12
+ applicationId: string;
13
+ }
14
+ export interface ICreateAlertRuleBody {
15
+ /** The environment the rule watches (abyss-main's id). */
16
+ environmentId: string;
17
+ scope: ReflexAlertScope;
18
+ /** Required for the scopes SERVICE and ROUTE; forbidden for FUNCTION. */
19
+ serviceId?: string;
20
+ /** Required for the scope ROUTE; forbidden otherwise. */
21
+ routeId?: string;
22
+ /** Required for the scope FUNCTION; forbidden otherwise. */
23
+ functionId?: string;
24
+ metric: ReflexAlertMetric;
25
+ /** Within the bounds of the metric (`REFLEX_ALERT_RULE_LIMITS.threshold`). */
26
+ threshold: number;
27
+ /** One of `REFLEX_ALERT_RULE_LIMITS.windowMinutes`. */
28
+ windowMinutes: number;
29
+ /** `REFLEX_ALERT_RULE_LIMITS.minRuns.default` when omitted. */
30
+ minRuns?: number;
31
+ /** True when omitted. */
32
+ enabled?: boolean;
33
+ /** 1 to 64 characters. */
34
+ name: string;
35
+ }
36
+
37
+ export interface IUpdateAlertRuleParams {
38
+ applicationId: string;
39
+ ruleId: string;
40
+ }
41
+ /** The environment, the scope, the target and the metric of a rule never change. Every value is required. */
42
+ export interface IUpdateAlertRuleBody {
43
+ threshold: number;
44
+ windowMinutes: number;
45
+ minRuns: number;
46
+ enabled: boolean;
47
+ name: string;
48
+ }
49
+
50
+ export interface IDeleteAlertRuleParams {
51
+ applicationId: string;
52
+ ruleId: string;
53
+ }
@@ -1,18 +1,18 @@
1
- import type { InsightsPeriod } from '../../../enum';
2
-
3
- export interface IGetApplicationInsightsParams {
4
- applicationId: string;
5
- }
6
- export interface IGetApplicationInsightsQuery {
7
- /** The environment of the application (abyss-main's id). */
8
- environmentId: string;
9
- period: InsightsPeriod;
10
- }
11
-
12
- export interface IGetApplicationCalendarParams {
13
- applicationId: string;
14
- }
15
- export interface IGetApplicationCalendarQuery {
16
- /** The environment of the application (abyss-main's id). */
17
- environmentId: string;
18
- }
1
+ import type { InsightsPeriod } from '../../../enum';
2
+
3
+ export interface IGetApplicationInsightsParams {
4
+ applicationId: string;
5
+ }
6
+ export interface IGetApplicationInsightsQuery {
7
+ /** The environment of the application (abyss-main's id). */
8
+ environmentId: string;
9
+ period: InsightsPeriod;
10
+ }
11
+
12
+ export interface IGetApplicationCalendarParams {
13
+ applicationId: string;
14
+ }
15
+ export interface IGetApplicationCalendarQuery {
16
+ /** The environment of the application (abyss-main's id). */
17
+ environmentId: string;
18
+ }
@@ -1,11 +1,11 @@
1
- export interface IGetApplicationRunSettingsParams {
2
- applicationId: string;
3
- }
4
-
5
- export interface ISetApplicationRunSettingsParams {
6
- applicationId: string;
7
- }
8
- export interface ISetApplicationRunSettingsBody {
9
- /** Cap of log lines per run, 1 to 10 000; null for no cap. */
10
- maxLogLinesPerRun: number | null;
11
- }
1
+ export interface IGetApplicationRunSettingsParams {
2
+ applicationId: string;
3
+ }
4
+
5
+ export interface ISetApplicationRunSettingsParams {
6
+ applicationId: string;
7
+ }
8
+ export interface ISetApplicationRunSettingsBody {
9
+ /** Cap of log lines per run, 1 to 10 000; null for no cap. */
10
+ maxLogLinesPerRun: number | null;
11
+ }
@@ -1,51 +1,51 @@
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
- }
26
-
27
- export interface IGrantAllFunctionAccessParams {
28
- applicationId: string;
29
- functionId: string;
30
- }
31
-
32
- export interface IRequestFunctionAccessParams {
33
- applicationId: string;
34
- functionId: string;
35
- }
36
- /** The declaration must be one the saved draft makes (`409 ACCESS_NOT_DECLARED` otherwise). */
37
- export interface IRequestFunctionAccessBody {
38
- declaration: IReflexAccessDeclaration;
39
- }
40
-
41
- export interface IGrantFunctionAccessRequestParams {
42
- applicationId: string;
43
- functionId: string;
44
- requestId: string;
45
- }
46
-
47
- export interface IDismissFunctionAccessRequestParams {
48
- applicationId: string;
49
- functionId: string;
50
- requestId: string;
51
- }
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
+ }
26
+
27
+ export interface IGrantAllFunctionAccessParams {
28
+ applicationId: string;
29
+ functionId: string;
30
+ }
31
+
32
+ export interface IRequestFunctionAccessParams {
33
+ applicationId: string;
34
+ functionId: string;
35
+ }
36
+ /** The declaration must be one the saved draft makes (`409 ACCESS_NOT_DECLARED` otherwise). */
37
+ export interface IRequestFunctionAccessBody {
38
+ declaration: IReflexAccessDeclaration;
39
+ }
40
+
41
+ export interface IGrantFunctionAccessRequestParams {
42
+ applicationId: string;
43
+ functionId: string;
44
+ requestId: string;
45
+ }
46
+
47
+ export interface IDismissFunctionAccessRequestParams {
48
+ applicationId: string;
49
+ functionId: string;
50
+ requestId: string;
51
+ }
@@ -1,34 +1,34 @@
1
- import type { IReflexExecutionSettingsValues, IReflexFunctionLogCap } 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
- }
28
-
29
- export interface ISetFunctionLogCapParams {
30
- applicationId: string;
31
- functionId: string;
32
- }
33
- /** `lines` is required, 1 to 10 000, when `mode` is LIMIT, and forbidden otherwise. */
34
- export type ISetFunctionLogCapBody = IReflexFunctionLogCap;
1
+ import type { IReflexExecutionSettingsValues, IReflexFunctionLogCap } 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
+ }
28
+
29
+ export interface ISetFunctionLogCapParams {
30
+ applicationId: string;
31
+ functionId: string;
32
+ }
33
+ /** `lines` is required, 1 to 10 000, when `mode` is LIMIT, and forbidden otherwise. */
34
+ export type ISetFunctionLogCapBody = IReflexFunctionLogCap;
@@ -1,29 +1,29 @@
1
- export interface IListFunctionTemplateParams {
2
- applicationId: string;
3
- }
4
-
5
- export interface ICreateFunctionTemplateParams {
6
- applicationId: string;
7
- }
8
- export interface ICreateFunctionTemplateBody {
9
- /** Unique within the application, 1 to 100 characters. */
10
- name: string;
11
- /** 500 characters at most. */
12
- description?: string;
13
- /** The function whose saved draft becomes the template. */
14
- functionId: string;
15
- }
16
-
17
- export interface IUpdateFunctionTemplateParams {
18
- applicationId: string;
19
- templateId: string;
20
- }
21
- export interface IUpdateFunctionTemplateBody {
22
- name?: string;
23
- description?: string;
24
- }
25
-
26
- export interface IDeleteFunctionTemplateParams {
27
- applicationId: string;
28
- templateId: string;
29
- }
1
+ export interface IListFunctionTemplateParams {
2
+ applicationId: string;
3
+ }
4
+
5
+ export interface ICreateFunctionTemplateParams {
6
+ applicationId: string;
7
+ }
8
+ export interface ICreateFunctionTemplateBody {
9
+ /** Unique within the application, 1 to 100 characters. */
10
+ name: string;
11
+ /** 500 characters at most. */
12
+ description?: string;
13
+ /** The function whose saved draft becomes the template. */
14
+ functionId: string;
15
+ }
16
+
17
+ export interface IUpdateFunctionTemplateParams {
18
+ applicationId: string;
19
+ templateId: string;
20
+ }
21
+ export interface IUpdateFunctionTemplateBody {
22
+ name?: string;
23
+ description?: string;
24
+ }
25
+
26
+ export interface IDeleteFunctionTemplateParams {
27
+ applicationId: string;
28
+ templateId: string;
29
+ }
@@ -1,38 +1,38 @@
1
- export interface IListFunctionVersionParams {
2
- applicationId: string;
3
- functionId: string;
4
- }
5
- export interface IListFunctionVersionQuery {
6
- /** 1 by default. */
7
- page?: number;
8
- /** 1 to 50. */
9
- limit?: number;
10
- /** Only the version of this number. */
11
- number?: number;
12
- /** Only the versions published by this user. */
13
- publishedByUserId?: string;
14
- /** true: only versions a Service version put in service; false: only the others. */
15
- deployed?: boolean;
16
- }
17
-
18
- export interface IGetFunctionVersionParams {
19
- applicationId: string;
20
- functionId: string;
21
- versionId: string;
22
- }
23
-
24
- export interface IGetFunctionVersionStepStatsParams {
25
- applicationId: string;
26
- functionId: string;
27
- versionId: string;
28
- }
29
- export interface IGetFunctionVersionStepStatsQuery {
30
- /** Only the executions of this environment; every environment when absent. */
31
- environmentId?: string;
32
- }
33
-
34
- export interface IOpenFunctionVersionParams {
35
- applicationId: string;
36
- functionId: string;
37
- versionId: string;
38
- }
1
+ export interface IListFunctionVersionParams {
2
+ applicationId: string;
3
+ functionId: string;
4
+ }
5
+ export interface IListFunctionVersionQuery {
6
+ /** 1 by default. */
7
+ page?: number;
8
+ /** 1 to 50. */
9
+ limit?: number;
10
+ /** Only the version of this number. */
11
+ number?: number;
12
+ /** Only the versions published by this user. */
13
+ publishedByUserId?: string;
14
+ /** true: only versions a Service version put in service; false: only the others. */
15
+ deployed?: boolean;
16
+ }
17
+
18
+ export interface IGetFunctionVersionParams {
19
+ applicationId: string;
20
+ functionId: string;
21
+ versionId: string;
22
+ }
23
+
24
+ export interface IGetFunctionVersionStepStatsParams {
25
+ applicationId: string;
26
+ functionId: string;
27
+ versionId: string;
28
+ }
29
+ export interface IGetFunctionVersionStepStatsQuery {
30
+ /** Only the executions of this environment; every environment when absent. */
31
+ environmentId?: string;
32
+ }
33
+
34
+ export interface IOpenFunctionVersionParams {
35
+ applicationId: string;
36
+ functionId: string;
37
+ versionId: string;
38
+ }