@abyss-project/reflex 3.0.0 → 5.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 (151) hide show
  1. package/dist/api/index.d.ts +2 -1
  2. package/dist/api/index.js +2 -1
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/service-configuration.api.d.ts +2 -0
  5. package/dist/api/service-configuration.api.js +7 -0
  6. package/dist/api/service-configuration.api.js.map +1 -0
  7. package/dist/api/service-discord.api.d.ts +14 -0
  8. package/dist/api/service-discord.api.js +38 -0
  9. package/dist/api/service-discord.api.js.map +1 -0
  10. package/dist/index.d.ts +25 -6
  11. package/dist/index.js +25 -6
  12. package/dist/index.js.map +1 -1
  13. package/dist/types/enum/configuration-read-as.enum.d.ts +4 -0
  14. package/dist/types/enum/configuration-read-as.enum.js +9 -0
  15. package/dist/types/enum/configuration-read-as.enum.js.map +1 -0
  16. package/dist/types/enum/discord-component-kind.enum.d.ts +4 -0
  17. package/dist/types/enum/discord-component-kind.enum.js +9 -0
  18. package/dist/types/enum/discord-component-kind.enum.js.map +1 -0
  19. package/dist/types/enum/discord-option-type.enum.d.ts +11 -0
  20. package/dist/types/enum/discord-option-type.enum.js +16 -0
  21. package/dist/types/enum/discord-option-type.enum.js.map +1 -0
  22. package/dist/types/enum/discord-sync-status.enum.d.ts +5 -0
  23. package/dist/types/enum/discord-sync-status.enum.js +10 -0
  24. package/dist/types/enum/discord-sync-status.enum.js.map +1 -0
  25. package/dist/types/enum/discord-token-state.enum.d.ts +6 -0
  26. package/dist/types/enum/discord-token-state.enum.js +11 -0
  27. package/dist/types/enum/discord-token-state.enum.js.map +1 -0
  28. package/dist/types/enum/index.d.ts +7 -1
  29. package/dist/types/enum/index.js +7 -1
  30. package/dist/types/enum/index.js.map +1 -1
  31. package/dist/types/enum/reflex-error-code.enum.d.ts +7 -1
  32. package/dist/types/enum/reflex-error-code.enum.js +6 -0
  33. package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
  34. package/dist/types/enum/service-type.enum.d.ts +2 -1
  35. package/dist/types/enum/service-type.enum.js +1 -0
  36. package/dist/types/enum/service-type.enum.js.map +1 -1
  37. package/dist/types/enum/vault-value-source.enum.d.ts +6 -0
  38. package/dist/types/enum/vault-value-source.enum.js +11 -0
  39. package/dist/types/enum/vault-value-source.enum.js.map +1 -0
  40. package/dist/types/enum/vault-visibility.enum.d.ts +4 -0
  41. package/dist/types/enum/vault-visibility.enum.js +9 -0
  42. package/dist/types/enum/vault-visibility.enum.js.map +1 -0
  43. package/dist/types/interface/api/requests/index.d.ts +2 -1
  44. package/dist/types/interface/api/requests/index.js +2 -1
  45. package/dist/types/interface/api/requests/index.js.map +1 -1
  46. package/dist/types/interface/api/requests/service-configuration.request.d.ts +4 -0
  47. package/dist/types/interface/{models/reflex-service-variable.model.js → api/requests/service-configuration.request.js} +1 -1
  48. package/dist/types/interface/api/requests/service-configuration.request.js.map +1 -0
  49. package/dist/types/interface/api/requests/service-discord.request.d.ts +94 -0
  50. package/dist/types/interface/api/requests/{service-variable.request.js → service-discord.request.js} +1 -1
  51. package/dist/types/interface/api/requests/service-discord.request.js.map +1 -0
  52. package/dist/types/interface/api/requests/service.request.d.ts +2 -0
  53. package/dist/types/interface/api/responses/index.d.ts +2 -1
  54. package/dist/types/interface/api/responses/index.js +2 -1
  55. package/dist/types/interface/api/responses/index.js.map +1 -1
  56. package/dist/types/interface/api/responses/service-configuration.response.d.ts +6 -0
  57. package/dist/types/interface/api/responses/service-configuration.response.js +3 -0
  58. package/dist/types/interface/api/responses/service-configuration.response.js.map +1 -0
  59. package/dist/types/interface/api/responses/service-discord.response.d.ts +50 -0
  60. package/dist/types/interface/api/responses/{service-variable.response.js → service-discord.response.js} +1 -1
  61. package/dist/types/interface/api/responses/service-discord.response.js.map +1 -0
  62. package/dist/types/interface/api/responses/service-version.response.d.ts +15 -1
  63. package/dist/types/interface/models/index.d.ts +2 -1
  64. package/dist/types/interface/models/index.js +2 -1
  65. package/dist/types/interface/models/index.js.map +1 -1
  66. package/dist/types/interface/models/reflex-discord.model.d.ts +69 -0
  67. package/dist/types/interface/models/reflex-discord.model.js +13 -0
  68. package/dist/types/interface/models/reflex-discord.model.js.map +1 -0
  69. package/dist/types/interface/models/reflex-run.model.d.ts +3 -0
  70. package/dist/types/interface/models/reflex-service-configuration.model.d.ts +9 -0
  71. package/dist/types/interface/models/reflex-service-configuration.model.js +3 -0
  72. package/dist/types/interface/models/reflex-service-configuration.model.js.map +1 -0
  73. package/dist/types/interface/models/reflex-service-deployment.model.d.ts +5 -1
  74. package/dist/types/interface/models/reflex-service-version.model.d.ts +6 -0
  75. package/dist/types/interface/models/reflex-service.model.d.ts +1 -2
  76. package/dist/types/interface/models/reflex-service.model.js +0 -2
  77. package/dist/types/interface/models/reflex-service.model.js.map +1 -1
  78. package/package.json +1 -1
  79. package/src/api/function-run.api.ts +38 -38
  80. package/src/api/function-version.api.ts +48 -48
  81. package/src/api/function.api.test.ts +249 -249
  82. package/src/api/index.ts +13 -12
  83. package/src/api/service-configuration.api.ts +16 -0
  84. package/src/api/service-deployment.api.ts +79 -79
  85. package/src/api/service-discord.api.test.ts +170 -0
  86. package/src/api/service-discord.api.ts +203 -0
  87. package/src/api/service-route.api.ts +72 -72
  88. package/src/api/service-version.api.ts +39 -39
  89. package/src/api/service.api.test.ts +209 -234
  90. package/src/api/service.api.ts +55 -55
  91. package/src/index.ts +50 -11
  92. package/src/types/enum/configuration-read-as.enum.ts +5 -0
  93. package/src/types/enum/discord-component-kind.enum.ts +7 -0
  94. package/src/types/enum/discord-option-type.enum.ts +12 -0
  95. package/src/types/enum/discord-sync-status.enum.ts +6 -0
  96. package/src/types/enum/discord-token-state.enum.ts +11 -0
  97. package/src/types/enum/execution-mode.enum.ts +9 -9
  98. package/src/types/enum/index.ts +25 -19
  99. package/src/types/enum/reflex-error-code.enum.ts +37 -25
  100. package/src/types/enum/route-method.enum.ts +9 -9
  101. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  102. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  103. package/src/types/enum/service-type.enum.ts +9 -7
  104. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  105. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  106. package/src/types/enum/vault-value-source.enum.ts +12 -0
  107. package/src/types/enum/vault-visibility.enum.ts +5 -0
  108. package/src/types/interface/api/requests/function-run.request.ts +26 -26
  109. package/src/types/interface/api/requests/function-version.request.ts +20 -20
  110. package/src/types/interface/api/requests/function.request.ts +36 -36
  111. package/src/types/interface/api/requests/index.ts +12 -11
  112. package/src/types/interface/api/requests/service-configuration.request.ts +4 -0
  113. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  114. package/src/types/interface/api/requests/service-discord.request.ts +118 -0
  115. package/src/types/interface/api/requests/service-route.request.ts +44 -44
  116. package/src/types/interface/api/requests/service-version.request.ts +19 -19
  117. package/src/types/interface/api/requests/service.request.ts +46 -39
  118. package/src/types/interface/api/responses/function-version.response.ts +31 -31
  119. package/src/types/interface/api/responses/index.ts +12 -11
  120. package/src/types/interface/api/responses/service-configuration.response.ts +8 -0
  121. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  122. package/src/types/interface/api/responses/service-discord.response.ts +72 -0
  123. package/src/types/interface/api/responses/service-route.response.ts +31 -31
  124. package/src/types/interface/api/responses/service-version.response.ts +30 -1
  125. package/src/types/interface/api/responses/service.response.ts +31 -31
  126. package/src/types/interface/models/index.ts +14 -13
  127. package/src/types/interface/models/reflex-discord.model.ts +117 -0
  128. package/src/types/interface/models/reflex-function.model.ts +16 -16
  129. package/src/types/interface/models/reflex-route.model.ts +19 -19
  130. package/src/types/interface/models/reflex-run.model.ts +10 -1
  131. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -0
  132. package/src/types/interface/models/reflex-service-deployment.model.ts +40 -29
  133. package/src/types/interface/models/reflex-service-version.model.ts +55 -43
  134. package/src/types/interface/models/reflex-service.model.ts +45 -46
  135. package/dist/api/service-variable.api.d.ts +0 -5
  136. package/dist/api/service-variable.api.js +0 -16
  137. package/dist/api/service-variable.api.js.map +0 -1
  138. package/dist/types/enum/secret-source.enum.d.ts +0 -5
  139. package/dist/types/enum/secret-source.enum.js +0 -10
  140. package/dist/types/enum/secret-source.enum.js.map +0 -1
  141. package/dist/types/interface/api/requests/service-variable.request.d.ts +0 -23
  142. package/dist/types/interface/api/requests/service-variable.request.js.map +0 -1
  143. package/dist/types/interface/api/responses/service-variable.response.d.ts +0 -22
  144. package/dist/types/interface/api/responses/service-variable.response.js.map +0 -1
  145. package/dist/types/interface/models/reflex-service-variable.model.d.ts +0 -10
  146. package/dist/types/interface/models/reflex-service-variable.model.js.map +0 -1
  147. package/src/api/service-variable.api.ts +0 -58
  148. package/src/types/enum/secret-source.enum.ts +0 -9
  149. package/src/types/interface/api/requests/service-variable.request.ts +0 -29
  150. package/src/types/interface/api/responses/service-variable.response.ts +0 -31
  151. package/src/types/interface/models/reflex-service-variable.model.ts +0 -16
@@ -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
+ }
@@ -0,0 +1,118 @@
1
+ import type { DiscordComponentKind } from '../../../enum';
2
+ import type { IReflexDiscordCommandOption } from '../../models';
3
+
4
+ export interface IListServiceDiscordCommandParams {
5
+ applicationId: string;
6
+ serviceId: string;
7
+ }
8
+
9
+ export interface ICreateServiceDiscordCommandParams {
10
+ applicationId: string;
11
+ serviceId: string;
12
+ }
13
+ export interface ICreateServiceDiscordCommandBody {
14
+ /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
15
+ name: string;
16
+ /** 1 to 100 characters. */
17
+ description: string;
18
+ /** 25 at most, required options first; empty by default. */
19
+ options?: IReflexDiscordCommandOption[];
20
+ /** A function of the same Service. */
21
+ functionId: string;
22
+ /** Discord permission bits as a decimal string; null (default) for everyone. */
23
+ defaultMemberPermissions?: string | null;
24
+ /** `true` by default. */
25
+ allowedInDirectMessages?: boolean;
26
+ }
27
+
28
+ export interface IUpdateServiceDiscordCommandParams {
29
+ applicationId: string;
30
+ serviceId: string;
31
+ commandId: string;
32
+ }
33
+ export interface IUpdateServiceDiscordCommandBody {
34
+ name?: string;
35
+ description?: string;
36
+ options?: IReflexDiscordCommandOption[];
37
+ functionId?: string;
38
+ defaultMemberPermissions?: string | null;
39
+ allowedInDirectMessages?: boolean;
40
+ }
41
+
42
+ export interface IDeleteServiceDiscordCommandParams {
43
+ applicationId: string;
44
+ serviceId: string;
45
+ commandId: string;
46
+ }
47
+
48
+ export interface IListServiceDiscordComponentParams {
49
+ applicationId: string;
50
+ serviceId: string;
51
+ }
52
+
53
+ export interface ICreateServiceDiscordComponentParams {
54
+ applicationId: string;
55
+ serviceId: string;
56
+ }
57
+ export interface ICreateServiceDiscordComponentBody {
58
+ /** `^[a-z0-9_-]{1,40}$`; no prefix of the Service equals, starts or is started by another one. */
59
+ customIdPrefix: string;
60
+ kind: DiscordComponentKind;
61
+ /** A function of the same Service. */
62
+ functionId: string;
63
+ }
64
+
65
+ export interface IUpdateServiceDiscordComponentParams {
66
+ applicationId: string;
67
+ serviceId: string;
68
+ componentId: string;
69
+ }
70
+ export interface IUpdateServiceDiscordComponentBody {
71
+ customIdPrefix?: string;
72
+ kind?: DiscordComponentKind;
73
+ functionId?: string;
74
+ }
75
+
76
+ export interface IDeleteServiceDiscordComponentParams {
77
+ applicationId: string;
78
+ serviceId: string;
79
+ componentId: string;
80
+ }
81
+
82
+ export interface IGetServiceDiscordConnectionParams {
83
+ applicationId: string;
84
+ serviceId: string;
85
+ }
86
+
87
+ export interface ISetServiceDiscordTokenSecretParams {
88
+ applicationId: string;
89
+ serviceId: string;
90
+ }
91
+ export interface ISetServiceDiscordTokenSecretBody {
92
+ /** The Vault entry (a secret of the project) that holds the bot token, one value per environment. */
93
+ discordTokenSecretId: string;
94
+ }
95
+
96
+ export interface ISetServiceDiscordEnvironmentParams {
97
+ applicationId: string;
98
+ serviceId: string;
99
+ environmentId: string;
100
+ }
101
+ export interface ISetServiceDiscordEnvironmentBody {
102
+ /** Discord server (snowflake) the commands are pushed to outside production; null removes it. */
103
+ testGuildId?: string | null;
104
+ /** Discord permission bits as a decimal string, put in the invitation link. */
105
+ invitePermissions: string;
106
+ }
107
+
108
+ export interface ICheckServiceDiscordConnectionParams {
109
+ applicationId: string;
110
+ serviceId: string;
111
+ environmentId: string;
112
+ }
113
+
114
+ export interface IRetryServiceDiscordSyncParams {
115
+ applicationId: string;
116
+ serviceId: string;
117
+ environmentId: string;
118
+ }
@@ -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,19 +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
- }
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
+ }
@@ -1,39 +1,46 @@
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
+ 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
+ /** Not for a `DISCORD_BOT` Service: `400 SERVICE_TYPE_FIELD_REFUSED`. */
18
+ cors?: IReflexServiceCors;
19
+ /** 1 to 6000. Not for a `DISCORD_BOT` Service: `400 SERVICE_TYPE_FIELD_REFUSED`. */
20
+ rateLimitPerIpPerMinute?: number;
21
+ }
22
+
23
+ export interface IGetServiceParams {
24
+ applicationId: string;
25
+ serviceId: string;
26
+ }
27
+
28
+ export interface IUpdateServiceParams {
29
+ applicationId: string;
30
+ serviceId: string;
31
+ }
32
+ /**
33
+ * Changes the draft: the next version freezes `cors` and `rateLimitPerIpPerMinute`. Neither exists for a
34
+ * `DISCORD_BOT` Service (`400 SERVICE_TYPE_FIELD_REFUSED`).
35
+ */
36
+ export interface IUpdateServiceBody {
37
+ name?: string;
38
+ cors?: IReflexServiceCors;
39
+ /** 1 to 6000. */
40
+ rateLimitPerIpPerMinute?: number;
41
+ }
42
+
43
+ export interface IDeleteServiceParams {
44
+ applicationId: string;
45
+ serviceId: string;
46
+ }
@@ -1,31 +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 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
+ 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,11 +1,12 @@
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';
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-configuration.response';
12
+ export * from './service-discord.response';
@@ -0,0 +1,8 @@
1
+ import type { IReflexServiceConfigurationEntry } from '../../models';
2
+ import type { IResponse } from '../response';
3
+
4
+ export interface IListServiceConfigurationData {
5
+ /** One entry per key and way of reading it, by key then `readAs`. */
6
+ configuration: IReflexServiceConfigurationEntry[];
7
+ }
8
+ export type IListServiceConfigurationResponse = IResponse<IListServiceConfigurationData>;
@@ -1,32 +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>;
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,72 @@
1
+ import type {
2
+ IReflexDiscordCommand,
3
+ IReflexDiscordComponent,
4
+ IReflexDiscordConnection,
5
+ IReflexDiscordEnvironmentConnection,
6
+ IReflexServiceDeployment,
7
+ } from '../../models';
8
+ import type { IResponse } from '../response';
9
+
10
+ export interface IListServiceDiscordCommandData {
11
+ /** By name. */
12
+ commands: IReflexDiscordCommand[];
13
+ }
14
+ export type IListServiceDiscordCommandResponse = IResponse<IListServiceDiscordCommandData>;
15
+
16
+ export interface ICreateServiceDiscordCommandData {
17
+ command: IReflexDiscordCommand;
18
+ }
19
+ export type ICreateServiceDiscordCommandResponse = IResponse<ICreateServiceDiscordCommandData>;
20
+
21
+ export interface IUpdateServiceDiscordCommandData {
22
+ command: IReflexDiscordCommand;
23
+ }
24
+ export type IUpdateServiceDiscordCommandResponse = IResponse<IUpdateServiceDiscordCommandData>;
25
+
26
+ export type IDeleteServiceDiscordCommandData = Record<string, never>;
27
+ export type IDeleteServiceDiscordCommandResponse = IResponse<IDeleteServiceDiscordCommandData>;
28
+
29
+ export interface IListServiceDiscordComponentData {
30
+ /** By prefix. */
31
+ components: IReflexDiscordComponent[];
32
+ }
33
+ export type IListServiceDiscordComponentResponse = IResponse<IListServiceDiscordComponentData>;
34
+
35
+ export interface ICreateServiceDiscordComponentData {
36
+ component: IReflexDiscordComponent;
37
+ }
38
+ export type ICreateServiceDiscordComponentResponse = IResponse<ICreateServiceDiscordComponentData>;
39
+
40
+ export interface IUpdateServiceDiscordComponentData {
41
+ component: IReflexDiscordComponent;
42
+ }
43
+ export type IUpdateServiceDiscordComponentResponse = IResponse<IUpdateServiceDiscordComponentData>;
44
+
45
+ export type IDeleteServiceDiscordComponentData = Record<string, never>;
46
+ export type IDeleteServiceDiscordComponentResponse = IResponse<IDeleteServiceDiscordComponentData>;
47
+
48
+ export interface IGetServiceDiscordConnectionData {
49
+ connection: IReflexDiscordConnection;
50
+ }
51
+ export type IGetServiceDiscordConnectionResponse = IResponse<IGetServiceDiscordConnectionData>;
52
+
53
+ export interface ISetServiceDiscordTokenSecretData {
54
+ connection: IReflexDiscordConnection;
55
+ }
56
+ export type ISetServiceDiscordTokenSecretResponse = IResponse<ISetServiceDiscordTokenSecretData>;
57
+
58
+ export interface ISetServiceDiscordEnvironmentData {
59
+ environment: IReflexDiscordEnvironmentConnection;
60
+ }
61
+ export type ISetServiceDiscordEnvironmentResponse = IResponse<ISetServiceDiscordEnvironmentData>;
62
+
63
+ export interface ICheckServiceDiscordConnectionData {
64
+ environment: IReflexDiscordEnvironmentConnection;
65
+ }
66
+ export type ICheckServiceDiscordConnectionResponse = IResponse<ICheckServiceDiscordConnectionData>;
67
+
68
+ export interface IRetryServiceDiscordSyncData {
69
+ /** The current deployment of the environment, with the new state of the synchronization. */
70
+ deployment: IReflexServiceDeployment;
71
+ }
72
+ export type IRetryServiceDiscordSyncResponse = IResponse<IRetryServiceDiscordSyncData>;