@abyss-project/reflex 5.7.0 → 5.8.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 (158) hide show
  1. package/.eslintrc.js +32 -32
  2. package/.prettierrc +5 -5
  3. package/README.md +15 -15
  4. package/dist/types/enum/discord-channel-type.enum.d.ts +7 -0
  5. package/dist/types/enum/discord-channel-type.enum.js +12 -0
  6. package/dist/types/enum/discord-channel-type.enum.js.map +1 -0
  7. package/dist/types/enum/discord-host-action.enum.d.ts +31 -0
  8. package/dist/types/enum/discord-host-action.enum.js +36 -0
  9. package/dist/types/enum/discord-host-action.enum.js.map +1 -0
  10. package/dist/types/enum/discord-locale.enum.d.ts +34 -0
  11. package/dist/types/enum/discord-locale.enum.js +39 -0
  12. package/dist/types/enum/discord-locale.enum.js.map +1 -0
  13. package/dist/types/enum/index.d.ts +3 -0
  14. package/dist/types/enum/index.js +3 -0
  15. package/dist/types/enum/index.js.map +1 -1
  16. package/dist/types/interface/api/requests/service-discord.request.d.ts +7 -1
  17. package/dist/types/interface/models/reflex-discord-event.model.js.map +1 -1
  18. package/dist/types/interface/models/reflex-discord.model.d.ts +20 -2
  19. package/dist/types/interface/models/reflex-discord.model.js +2 -0
  20. package/dist/types/interface/models/reflex-discord.model.js.map +1 -1
  21. package/jest.config.ts +11 -11
  22. package/package.json +1 -1
  23. package/src/api/function-access.api.ts +36 -36
  24. package/src/api/function-insights.api.test.ts +27 -27
  25. package/src/api/function-insights.api.ts +18 -18
  26. package/src/api/function-run.api.ts +38 -38
  27. package/src/api/function-settings.api.ts +59 -59
  28. package/src/api/function-test.api.ts +34 -34
  29. package/src/api/function-version.api.ts +48 -48
  30. package/src/api/function.api.test.ts +249 -249
  31. package/src/api/function.api.ts +62 -62
  32. package/src/api/health.api.ts +10 -10
  33. package/src/api/index.ts +17 -17
  34. package/src/api/service-configuration.api.ts +16 -16
  35. package/src/api/service-deployment.api.ts +79 -79
  36. package/src/api/service-discord-event.api.test.ts +106 -106
  37. package/src/api/service-discord-event.api.ts +78 -78
  38. package/src/api/service-discord.api.test.ts +197 -197
  39. package/src/api/service-discord.api.ts +241 -241
  40. package/src/api/service-insights.api.test.ts +36 -36
  41. package/src/api/service-insights.api.ts +42 -42
  42. package/src/api/service-route.api.ts +72 -72
  43. package/src/api/service-task.api.test.ts +140 -140
  44. package/src/api/service-task.api.ts +141 -141
  45. package/src/api/service-version.api.ts +54 -54
  46. package/src/api/service.api.test.ts +215 -215
  47. package/src/api/service.api.ts +55 -55
  48. package/src/discord/discord-event-filter-cases.ts +261 -261
  49. package/src/discord/discord-event-filters.test.ts +91 -91
  50. package/src/discord/discord-event-filters.ts +95 -95
  51. package/src/discord/discord-event-intents.test.ts +112 -112
  52. package/src/discord/discord-event-intents.ts +55 -55
  53. package/src/discord/index.ts +3 -3
  54. package/src/index.test.ts +75 -75
  55. package/src/index.ts +317 -317
  56. package/src/types/enum/access-grant-status.enum.ts +12 -12
  57. package/src/types/enum/access-kind.enum.ts +7 -7
  58. package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
  59. package/src/types/enum/configuration-read-as.enum.ts +5 -5
  60. package/src/types/enum/discord-activity-type.enum.ts +9 -9
  61. package/src/types/enum/discord-channel-type.enum.ts +11 -0
  62. package/src/types/enum/discord-component-kind.enum.ts +7 -7
  63. package/src/types/enum/discord-event-drop-reason.enum.ts +13 -13
  64. package/src/types/enum/discord-event-filter-name.enum.ts +11 -11
  65. package/src/types/enum/discord-event-status.enum.ts +13 -13
  66. package/src/types/enum/discord-event-type.enum.ts +7 -7
  67. package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -11
  68. package/src/types/enum/discord-gateway-state.enum.ts +11 -11
  69. package/src/types/enum/discord-host-action.enum.ts +35 -0
  70. package/src/types/enum/discord-locale.enum.ts +35 -0
  71. package/src/types/enum/discord-option-type.enum.ts +12 -12
  72. package/src/types/enum/discord-presence-status.enum.ts +8 -8
  73. package/src/types/enum/discord-sync-status.enum.ts +6 -6
  74. package/src/types/enum/discord-token-state.enum.ts +11 -11
  75. package/src/types/enum/execution-mode.enum.ts +9 -9
  76. package/src/types/enum/execution-profile.enum.ts +20 -20
  77. package/src/types/enum/execution-settings-source.enum.ts +9 -9
  78. package/src/types/enum/health-status.enum.ts +4 -4
  79. package/src/types/enum/index.ts +43 -40
  80. package/src/types/enum/insights-period.enum.ts +8 -8
  81. package/src/types/enum/reflex-error-code.enum.ts +43 -43
  82. package/src/types/enum/route-method.enum.ts +9 -9
  83. package/src/types/enum/run-log-level.enum.ts +6 -6
  84. package/src/types/enum/run-mode.enum.ts +11 -11
  85. package/src/types/enum/run-status.enum.ts +11 -11
  86. package/src/types/enum/run-step-status.enum.ts +7 -7
  87. package/src/types/enum/schedule-sync-status.enum.ts +6 -6
  88. package/src/types/enum/scheduled-run-failure-code.enum.ts +12 -12
  89. package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
  90. package/src/types/enum/scheduled-run-status.enum.ts +17 -17
  91. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  92. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  93. package/src/types/enum/service-type.enum.ts +9 -9
  94. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  95. package/src/types/enum/trace-effect-type.enum.ts +12 -12
  96. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  97. package/src/types/enum/trigger-kind.enum.ts +8 -8
  98. package/src/types/enum/vault-value-source.enum.ts +12 -12
  99. package/src/types/enum/vault-visibility.enum.ts +5 -5
  100. package/src/types/index.ts +2 -2
  101. package/src/types/interface/api/index.ts +3 -3
  102. package/src/types/interface/api/requests/function-access.request.ts +25 -25
  103. package/src/types/interface/api/requests/function-run.request.ts +30 -30
  104. package/src/types/interface/api/requests/function-settings.request.ts +27 -27
  105. package/src/types/interface/api/requests/function-test.request.ts +39 -39
  106. package/src/types/interface/api/requests/function-version.request.ts +20 -20
  107. package/src/types/interface/api/requests/function.request.ts +36 -36
  108. package/src/types/interface/api/requests/index.ts +15 -15
  109. package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
  110. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  111. package/src/types/interface/api/requests/service-discord-event.request.ts +68 -68
  112. package/src/types/interface/api/requests/service-discord.request.ts +173 -161
  113. package/src/types/interface/api/requests/service-insights.request.ts +31 -31
  114. package/src/types/interface/api/requests/service-route.request.ts +44 -44
  115. package/src/types/interface/api/requests/service-task.request.ts +80 -80
  116. package/src/types/interface/api/requests/service-version.request.ts +24 -24
  117. package/src/types/interface/api/requests/service.request.ts +46 -46
  118. package/src/types/interface/api/response.ts +4 -4
  119. package/src/types/interface/api/responses/function-access.response.ts +17 -17
  120. package/src/types/interface/api/responses/function-run.response.ts +18 -18
  121. package/src/types/interface/api/responses/function-settings.response.ts +36 -36
  122. package/src/types/interface/api/responses/function-test.response.ts +12 -12
  123. package/src/types/interface/api/responses/function-version.response.ts +31 -31
  124. package/src/types/interface/api/responses/function.response.ts +25 -25
  125. package/src/types/interface/api/responses/index.ts +15 -15
  126. package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
  127. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  128. package/src/types/interface/api/responses/service-discord-event.response.ts +24 -24
  129. package/src/types/interface/api/responses/service-discord.response.ts +122 -122
  130. package/src/types/interface/api/responses/service-insights.response.ts +11 -11
  131. package/src/types/interface/api/responses/service-route.response.ts +31 -31
  132. package/src/types/interface/api/responses/service-task.response.ts +57 -57
  133. package/src/types/interface/api/responses/service-version.response.ts +106 -106
  134. package/src/types/interface/api/responses/service.response.ts +31 -31
  135. package/src/types/interface/health.response.ts +7 -7
  136. package/src/types/interface/index.ts +3 -3
  137. package/src/types/interface/models/index.ts +19 -19
  138. package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
  139. package/src/types/interface/models/reflex-bot-limits.model.ts +92 -92
  140. package/src/types/interface/models/reflex-definition.model.ts +31 -31
  141. package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -58
  142. package/src/types/interface/models/reflex-discord-event.model.ts +79 -78
  143. package/src/types/interface/models/reflex-discord.model.ts +187 -146
  144. package/src/types/interface/models/reflex-execution-settings.model.ts +50 -50
  145. package/src/types/interface/models/reflex-function-version.model.ts +14 -14
  146. package/src/types/interface/models/reflex-function.model.ts +16 -16
  147. package/src/types/interface/models/reflex-insights.model.ts +120 -120
  148. package/src/types/interface/models/reflex-price-list.model.ts +20 -20
  149. package/src/types/interface/models/reflex-route.model.ts +19 -19
  150. package/src/types/interface/models/reflex-run.model.ts +186 -186
  151. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
  152. package/src/types/interface/models/reflex-service-deployment.model.ts +46 -46
  153. package/src/types/interface/models/reflex-service-version.model.ts +61 -61
  154. package/src/types/interface/models/reflex-service.model.ts +45 -45
  155. package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
  156. package/src/types/interface/models/reflex-task.model.ts +97 -97
  157. package/tsconfig.check.json +15 -15
  158. package/tsconfig.json +35 -35
@@ -1,161 +1,173 @@
1
- import type {
2
- DiscordActivityType,
3
- DiscordComponentKind,
4
- DiscordPresenceStatus,
5
- } from '../../../enum';
6
- import type { IReflexBotAlertSettings, IReflexDiscordCommandOption } from '../../models';
7
-
8
- export interface IListServiceDiscordCommandParams {
9
- applicationId: string;
10
- serviceId: string;
11
- }
12
-
13
- export interface ICreateServiceDiscordCommandParams {
14
- applicationId: string;
15
- serviceId: string;
16
- }
17
- export interface ICreateServiceDiscordCommandBody {
18
- /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
19
- name: string;
20
- /** 1 to 100 characters. */
21
- description: string;
22
- /** 25 at most, required options first; empty by default. */
23
- options?: IReflexDiscordCommandOption[];
24
- /** A function of the same Service. */
25
- functionId: string;
26
- /** Discord permission bits as a decimal string; null (default) for everyone. */
27
- defaultMemberPermissions?: string | null;
28
- /** `true` by default. */
29
- allowedInDirectMessages?: boolean;
30
- }
31
-
32
- export interface IUpdateServiceDiscordCommandParams {
33
- applicationId: string;
34
- serviceId: string;
35
- commandId: string;
36
- }
37
- export interface IUpdateServiceDiscordCommandBody {
38
- name?: string;
39
- description?: string;
40
- options?: IReflexDiscordCommandOption[];
41
- functionId?: string;
42
- defaultMemberPermissions?: string | null;
43
- allowedInDirectMessages?: boolean;
44
- }
45
-
46
- export interface IDeleteServiceDiscordCommandParams {
47
- applicationId: string;
48
- serviceId: string;
49
- commandId: string;
50
- }
51
-
52
- export interface IListServiceDiscordComponentParams {
53
- applicationId: string;
54
- serviceId: string;
55
- }
56
-
57
- export interface ICreateServiceDiscordComponentParams {
58
- applicationId: string;
59
- serviceId: string;
60
- }
61
- export interface ICreateServiceDiscordComponentBody {
62
- /** `^[a-z0-9_-]{1,40}$`; no prefix of the Service equals, starts or is started by another one. */
63
- customIdPrefix: string;
64
- kind: DiscordComponentKind;
65
- /** A function of the same Service. */
66
- functionId: string;
67
- }
68
-
69
- export interface IUpdateServiceDiscordComponentParams {
70
- applicationId: string;
71
- serviceId: string;
72
- componentId: string;
73
- }
74
- export interface IUpdateServiceDiscordComponentBody {
75
- customIdPrefix?: string;
76
- kind?: DiscordComponentKind;
77
- functionId?: string;
78
- }
79
-
80
- export interface IDeleteServiceDiscordComponentParams {
81
- applicationId: string;
82
- serviceId: string;
83
- componentId: string;
84
- }
85
-
86
- export interface IGetServiceDiscordConnectionParams {
87
- applicationId: string;
88
- serviceId: string;
89
- }
90
-
91
- export interface ISetServiceDiscordTokenSecretParams {
92
- applicationId: string;
93
- serviceId: string;
94
- }
95
- export interface ISetServiceDiscordTokenSecretBody {
96
- /** The Vault entry (a secret of the project) that holds the bot token, one value per environment. */
97
- discordTokenSecretId: string;
98
- }
99
-
100
- export interface ISetServiceDiscordEnvironmentParams {
101
- applicationId: string;
102
- serviceId: string;
103
- environmentId: string;
104
- }
105
- export interface ISetServiceDiscordEnvironmentBody {
106
- /** Discord server (snowflake) the commands are pushed to outside production; null removes it. */
107
- testGuildId?: string | null;
108
- /** Discord permission bits as a decimal string, put in the invitation link. */
109
- invitePermissions: string;
110
- /** What the bot shows while connected. */
111
- presenceStatus?: DiscordPresenceStatus;
112
- /** The kind of activity; null removes it. */
113
- activityType?: DiscordActivityType | null;
114
- /** 1 to 128 characters, required with an `activityType`, null without. */
115
- activityText?: string | null;
116
- }
117
-
118
- export interface ICheckServiceDiscordConnectionParams {
119
- applicationId: string;
120
- serviceId: string;
121
- environmentId: string;
122
- }
123
-
124
- export interface IRetryServiceDiscordSyncParams {
125
- applicationId: string;
126
- serviceId: string;
127
- environmentId: string;
128
- }
129
-
130
- export interface ISetServiceDiscordAllocationParams {
131
- applicationId: string;
132
- serviceId: string;
133
- environmentId: string;
134
- }
135
- export interface ISetServiceDiscordAllocationBody {
136
- /**
137
- * Lots of 500 events per minute of the reserve of the organization this bot holds in this environment,
138
- * from 0 to `rate.lotsMax`; 0 releases them. The sum over the organization cannot go past its reserve.
139
- */
140
- lots: number;
141
- }
142
-
143
- export interface ISetServiceDiscordBotSettingsParams {
144
- applicationId: string;
145
- serviceId: string;
146
- environmentId: string;
147
- }
148
- export interface ISetServiceDiscordBotSettingsBody {
149
- /**
150
- * Bills the credits of the month past those of the organization. Refused (`CREDIT_OVERAGE_NOT_ALLOWED`)
151
- * when the organization does not allow overage of the credits.
152
- */
153
- creditOverageEnabled?: boolean;
154
- /** Monthly spend cap of the events of the bot, in cents: 100 to 50 000. */
155
- monthlySpendCapCents?: number;
156
- /** Alerts on the rate and on the cap; a key left out keeps its current value. */
157
- alerts?: {
158
- rate?: Partial<IReflexBotAlertSettings>;
159
- monthlySpendCap?: Partial<IReflexBotAlertSettings>;
160
- };
161
- }
1
+ import type {
2
+ DiscordActivityType,
3
+ DiscordComponentKind,
4
+ DiscordPresenceStatus,
5
+ } from '../../../enum';
6
+ import type {
7
+ IReflexBotAlertSettings,
8
+ IReflexDiscordCommandOption,
9
+ ReflexDiscordLocalizations,
10
+ } from '../../models';
11
+
12
+ export interface IListServiceDiscordCommandParams {
13
+ applicationId: string;
14
+ serviceId: string;
15
+ }
16
+
17
+ export interface ICreateServiceDiscordCommandParams {
18
+ applicationId: string;
19
+ serviceId: string;
20
+ }
21
+ export interface ICreateServiceDiscordCommandBody {
22
+ /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
23
+ name: string;
24
+ /** 1 to 100 characters. */
25
+ description: string;
26
+ /** 25 at most, required options first; empty by default. */
27
+ options?: IReflexDiscordCommandOption[];
28
+ /** A function of the same Service. */
29
+ functionId: string;
30
+ /** Discord permission bits as a decimal string; null (default) for everyone. */
31
+ defaultMemberPermissions?: string | null;
32
+ /** `true` by default. */
33
+ allowedInDirectMessages?: boolean;
34
+ /** Null (default) for none. */
35
+ nameLocalizations?: ReflexDiscordLocalizations | null;
36
+ descriptionLocalizations?: ReflexDiscordLocalizations | null;
37
+ /** `false` by default. */
38
+ userInstallable?: boolean;
39
+ }
40
+
41
+ export interface IUpdateServiceDiscordCommandParams {
42
+ applicationId: string;
43
+ serviceId: string;
44
+ commandId: string;
45
+ }
46
+ export interface IUpdateServiceDiscordCommandBody {
47
+ name?: string;
48
+ description?: string;
49
+ options?: IReflexDiscordCommandOption[];
50
+ functionId?: string;
51
+ defaultMemberPermissions?: string | null;
52
+ allowedInDirectMessages?: boolean;
53
+ nameLocalizations?: ReflexDiscordLocalizations | null;
54
+ descriptionLocalizations?: ReflexDiscordLocalizations | null;
55
+ userInstallable?: boolean;
56
+ }
57
+
58
+ export interface IDeleteServiceDiscordCommandParams {
59
+ applicationId: string;
60
+ serviceId: string;
61
+ commandId: string;
62
+ }
63
+
64
+ export interface IListServiceDiscordComponentParams {
65
+ applicationId: string;
66
+ serviceId: string;
67
+ }
68
+
69
+ export interface ICreateServiceDiscordComponentParams {
70
+ applicationId: string;
71
+ serviceId: string;
72
+ }
73
+ export interface ICreateServiceDiscordComponentBody {
74
+ /** `^[a-z0-9_-]{1,40}$`; no prefix of the Service equals, starts or is started by another one. */
75
+ customIdPrefix: string;
76
+ kind: DiscordComponentKind;
77
+ /** A function of the same Service. */
78
+ functionId: string;
79
+ }
80
+
81
+ export interface IUpdateServiceDiscordComponentParams {
82
+ applicationId: string;
83
+ serviceId: string;
84
+ componentId: string;
85
+ }
86
+ export interface IUpdateServiceDiscordComponentBody {
87
+ customIdPrefix?: string;
88
+ kind?: DiscordComponentKind;
89
+ functionId?: string;
90
+ }
91
+
92
+ export interface IDeleteServiceDiscordComponentParams {
93
+ applicationId: string;
94
+ serviceId: string;
95
+ componentId: string;
96
+ }
97
+
98
+ export interface IGetServiceDiscordConnectionParams {
99
+ applicationId: string;
100
+ serviceId: string;
101
+ }
102
+
103
+ export interface ISetServiceDiscordTokenSecretParams {
104
+ applicationId: string;
105
+ serviceId: string;
106
+ }
107
+ export interface ISetServiceDiscordTokenSecretBody {
108
+ /** The Vault entry (a secret of the project) that holds the bot token, one value per environment. */
109
+ discordTokenSecretId: string;
110
+ }
111
+
112
+ export interface ISetServiceDiscordEnvironmentParams {
113
+ applicationId: string;
114
+ serviceId: string;
115
+ environmentId: string;
116
+ }
117
+ export interface ISetServiceDiscordEnvironmentBody {
118
+ /** Discord server (snowflake) the commands are pushed to outside production; null removes it. */
119
+ testGuildId?: string | null;
120
+ /** Discord permission bits as a decimal string, put in the invitation link. */
121
+ invitePermissions: string;
122
+ /** What the bot shows while connected. */
123
+ presenceStatus?: DiscordPresenceStatus;
124
+ /** The kind of activity; null removes it. */
125
+ activityType?: DiscordActivityType | null;
126
+ /** 1 to 128 characters, required with an `activityType`, null without. */
127
+ activityText?: string | null;
128
+ }
129
+
130
+ export interface ICheckServiceDiscordConnectionParams {
131
+ applicationId: string;
132
+ serviceId: string;
133
+ environmentId: string;
134
+ }
135
+
136
+ export interface IRetryServiceDiscordSyncParams {
137
+ applicationId: string;
138
+ serviceId: string;
139
+ environmentId: string;
140
+ }
141
+
142
+ export interface ISetServiceDiscordAllocationParams {
143
+ applicationId: string;
144
+ serviceId: string;
145
+ environmentId: string;
146
+ }
147
+ export interface ISetServiceDiscordAllocationBody {
148
+ /**
149
+ * Lots of 500 events per minute of the reserve of the organization this bot holds in this environment,
150
+ * from 0 to `rate.lotsMax`; 0 releases them. The sum over the organization cannot go past its reserve.
151
+ */
152
+ lots: number;
153
+ }
154
+
155
+ export interface ISetServiceDiscordBotSettingsParams {
156
+ applicationId: string;
157
+ serviceId: string;
158
+ environmentId: string;
159
+ }
160
+ export interface ISetServiceDiscordBotSettingsBody {
161
+ /**
162
+ * Bills the credits of the month past those of the organization. Refused (`CREDIT_OVERAGE_NOT_ALLOWED`)
163
+ * when the organization does not allow overage of the credits.
164
+ */
165
+ creditOverageEnabled?: boolean;
166
+ /** Monthly spend cap of the events of the bot, in cents: 100 to 50 000. */
167
+ monthlySpendCapCents?: number;
168
+ /** Alerts on the rate and on the cap; a key left out keeps its current value. */
169
+ alerts?: {
170
+ rate?: Partial<IReflexBotAlertSettings>;
171
+ monthlySpendCap?: Partial<IReflexBotAlertSettings>;
172
+ };
173
+ }
@@ -1,31 +1,31 @@
1
- import type { InsightsPeriod } from '../../../enum';
2
-
3
- export interface IGetServiceInsightsParams {
4
- applicationId: string;
5
- serviceId: string;
6
- }
7
- export interface IGetServiceInsightsQuery {
8
- /** The environment of the application (abyss-main's id). */
9
- environmentId: string;
10
- period: InsightsPeriod;
11
- }
12
-
13
- export interface IGetServiceEventInsightsParams {
14
- applicationId: string;
15
- serviceId: string;
16
- }
17
- export interface IGetServiceEventInsightsQuery {
18
- /** The environment of the application (abyss-main's id). */
19
- environmentId: string;
20
- period: InsightsPeriod;
21
- }
22
-
23
- export interface IGetFunctionInsightsParams {
24
- applicationId: string;
25
- functionId: string;
26
- }
27
- export interface IGetFunctionInsightsQuery {
28
- /** The environment of the application (abyss-main's id). */
29
- environmentId: string;
30
- period: InsightsPeriod;
31
- }
1
+ import type { InsightsPeriod } from '../../../enum';
2
+
3
+ export interface IGetServiceInsightsParams {
4
+ applicationId: string;
5
+ serviceId: string;
6
+ }
7
+ export interface IGetServiceInsightsQuery {
8
+ /** The environment of the application (abyss-main's id). */
9
+ environmentId: string;
10
+ period: InsightsPeriod;
11
+ }
12
+
13
+ export interface IGetServiceEventInsightsParams {
14
+ applicationId: string;
15
+ serviceId: string;
16
+ }
17
+ export interface IGetServiceEventInsightsQuery {
18
+ /** The environment of the application (abyss-main's id). */
19
+ environmentId: string;
20
+ period: InsightsPeriod;
21
+ }
22
+
23
+ export interface IGetFunctionInsightsParams {
24
+ applicationId: string;
25
+ functionId: string;
26
+ }
27
+ export interface IGetFunctionInsightsQuery {
28
+ /** The environment of the application (abyss-main's id). */
29
+ environmentId: string;
30
+ period: InsightsPeriod;
31
+ }
@@ -1,44 +1,44 @@
1
- import type { RouteMethod, TriggerAccessMode } from '../../../enum';
2
-
3
- export interface IListServiceRouteParams {
4
- applicationId: string;
5
- serviceId: string;
6
- }
7
-
8
- export interface ICreateServiceRouteParams {
9
- applicationId: string;
10
- serviceId: string;
11
- }
12
- export interface ICreateServiceRouteBody {
13
- /** `ANY` only in a `FUNCTIONS` Service. */
14
- method: RouteMethod;
15
- /** Segments of `[a-z0-9._~-]` or `:param` joined by `/`, 20 at most; must not hide another route. */
16
- path: string;
17
- /** A function of the same Service. */
18
- functionId: string;
19
- accessMode: TriggerAccessMode;
20
- }
21
-
22
- export interface IUpdateServiceRouteParams {
23
- applicationId: string;
24
- serviceId: string;
25
- routeId: string;
26
- }
27
- export interface IUpdateServiceRouteBody {
28
- method?: RouteMethod;
29
- path?: string;
30
- functionId?: string;
31
- accessMode?: TriggerAccessMode;
32
- }
33
-
34
- export interface IDeleteServiceRouteParams {
35
- applicationId: string;
36
- serviceId: string;
37
- routeId: string;
38
- }
39
-
40
- export interface IRotateServiceRouteParams {
41
- applicationId: string;
42
- serviceId: string;
43
- routeId: string;
44
- }
1
+ import type { RouteMethod, TriggerAccessMode } from '../../../enum';
2
+
3
+ export interface IListServiceRouteParams {
4
+ applicationId: string;
5
+ serviceId: string;
6
+ }
7
+
8
+ export interface ICreateServiceRouteParams {
9
+ applicationId: string;
10
+ serviceId: string;
11
+ }
12
+ export interface ICreateServiceRouteBody {
13
+ /** `ANY` only in a `FUNCTIONS` Service. */
14
+ method: RouteMethod;
15
+ /** Segments of `[a-z0-9._~-]` or `:param` joined by `/`, 20 at most; must not hide another route. */
16
+ path: string;
17
+ /** A function of the same Service. */
18
+ functionId: string;
19
+ accessMode: TriggerAccessMode;
20
+ }
21
+
22
+ export interface IUpdateServiceRouteParams {
23
+ applicationId: string;
24
+ serviceId: string;
25
+ routeId: string;
26
+ }
27
+ export interface IUpdateServiceRouteBody {
28
+ method?: RouteMethod;
29
+ path?: string;
30
+ functionId?: string;
31
+ accessMode?: TriggerAccessMode;
32
+ }
33
+
34
+ export interface IDeleteServiceRouteParams {
35
+ applicationId: string;
36
+ serviceId: string;
37
+ routeId: string;
38
+ }
39
+
40
+ export interface IRotateServiceRouteParams {
41
+ applicationId: string;
42
+ serviceId: string;
43
+ routeId: string;
44
+ }
@@ -1,80 +1,80 @@
1
- export interface IListServiceTaskParams {
2
- applicationId: string;
3
- serviceId: string;
4
- }
5
-
6
- export interface ICreateServiceTaskParams {
7
- applicationId: string;
8
- serviceId: string;
9
- }
10
- export interface ICreateServiceTaskBody {
11
- /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
12
- name: string;
13
- /** A function of the same Service. */
14
- functionId: string;
15
- /** A cron of 5 fields, at most one tick a minute; null (default) for a task only delayed runs start. */
16
- schedule?: string | null;
17
- /** IANA time zone the cron is read in; `Etc/UTC` by default. */
18
- timezone?: string;
19
- }
20
-
21
- export interface IUpdateServiceTaskParams {
22
- applicationId: string;
23
- serviceId: string;
24
- taskId: string;
25
- }
26
- export interface IUpdateServiceTaskBody {
27
- name?: string;
28
- functionId?: string;
29
- schedule?: string | null;
30
- timezone?: string;
31
- }
32
-
33
- export interface IDeleteServiceTaskParams {
34
- applicationId: string;
35
- serviceId: string;
36
- taskId: string;
37
- }
38
-
39
- export interface ITestRunServiceTaskParams {
40
- applicationId: string;
41
- serviceId: string;
42
- taskId: string;
43
- }
44
- export interface ITestRunServiceTaskBody {
45
- /** The environment of the application the test run takes place in (abyss-main's id). */
46
- environmentId: string;
47
- }
48
-
49
- export interface IListServiceDelayedRunParams {
50
- applicationId: string;
51
- serviceId: string;
52
- environmentId: string;
53
- }
54
-
55
- export interface ICancelServiceDelayedRunParams {
56
- applicationId: string;
57
- serviceId: string;
58
- environmentId: string;
59
- delayedRunId: string;
60
- }
61
-
62
- export interface IRetryServiceScheduleSyncParams {
63
- applicationId: string;
64
- serviceId: string;
65
- environmentId: string;
66
- }
67
-
68
- export interface IListServiceTaskScheduledRunParams {
69
- applicationId: string;
70
- serviceId: string;
71
- taskId: string;
72
- /** The environment of the application whose runs are read (abyss-main's id). */
73
- environmentId: string;
74
- }
75
- export interface IListServiceTaskScheduledRunQuery {
76
- /** 1 to `REFLEX_TASK_LIMITS.scheduledRunPageMax` (50), 50 by default. */
77
- limit?: number;
78
- /** Runs skipped, newest first; 0 by default. */
79
- offset?: number;
80
- }
1
+ export interface IListServiceTaskParams {
2
+ applicationId: string;
3
+ serviceId: string;
4
+ }
5
+
6
+ export interface ICreateServiceTaskParams {
7
+ applicationId: string;
8
+ serviceId: string;
9
+ }
10
+ export interface ICreateServiceTaskBody {
11
+ /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
12
+ name: string;
13
+ /** A function of the same Service. */
14
+ functionId: string;
15
+ /** A cron of 5 fields, at most one tick a minute; null (default) for a task only delayed runs start. */
16
+ schedule?: string | null;
17
+ /** IANA time zone the cron is read in; `Etc/UTC` by default. */
18
+ timezone?: string;
19
+ }
20
+
21
+ export interface IUpdateServiceTaskParams {
22
+ applicationId: string;
23
+ serviceId: string;
24
+ taskId: string;
25
+ }
26
+ export interface IUpdateServiceTaskBody {
27
+ name?: string;
28
+ functionId?: string;
29
+ schedule?: string | null;
30
+ timezone?: string;
31
+ }
32
+
33
+ export interface IDeleteServiceTaskParams {
34
+ applicationId: string;
35
+ serviceId: string;
36
+ taskId: string;
37
+ }
38
+
39
+ export interface ITestRunServiceTaskParams {
40
+ applicationId: string;
41
+ serviceId: string;
42
+ taskId: string;
43
+ }
44
+ export interface ITestRunServiceTaskBody {
45
+ /** The environment of the application the test run takes place in (abyss-main's id). */
46
+ environmentId: string;
47
+ }
48
+
49
+ export interface IListServiceDelayedRunParams {
50
+ applicationId: string;
51
+ serviceId: string;
52
+ environmentId: string;
53
+ }
54
+
55
+ export interface ICancelServiceDelayedRunParams {
56
+ applicationId: string;
57
+ serviceId: string;
58
+ environmentId: string;
59
+ delayedRunId: string;
60
+ }
61
+
62
+ export interface IRetryServiceScheduleSyncParams {
63
+ applicationId: string;
64
+ serviceId: string;
65
+ environmentId: string;
66
+ }
67
+
68
+ export interface IListServiceTaskScheduledRunParams {
69
+ applicationId: string;
70
+ serviceId: string;
71
+ taskId: string;
72
+ /** The environment of the application whose runs are read (abyss-main's id). */
73
+ environmentId: string;
74
+ }
75
+ export interface IListServiceTaskScheduledRunQuery {
76
+ /** 1 to `REFLEX_TASK_LIMITS.scheduledRunPageMax` (50), 50 by default. */
77
+ limit?: number;
78
+ /** Runs skipped, newest first; 0 by default. */
79
+ offset?: number;
80
+ }