@abyss-project/reflex 5.8.1 → 5.9.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 (251) hide show
  1. package/.eslintrc.js +32 -32
  2. package/.prettierrc +5 -5
  3. package/README.md +15 -15
  4. package/dist/api/alert-rule.api.d.ts +5 -0
  5. package/dist/api/alert-rule.api.js +16 -0
  6. package/dist/api/alert-rule.api.js.map +1 -0
  7. package/dist/api/application-insights.api.d.ts +3 -0
  8. package/dist/api/application-insights.api.js +12 -0
  9. package/dist/api/application-insights.api.js.map +1 -0
  10. package/dist/api/application-run-settings.api.d.ts +3 -0
  11. package/dist/api/application-run-settings.api.js +11 -0
  12. package/dist/api/application-run-settings.api.js.map +1 -0
  13. package/dist/api/function-settings.api.d.ts +2 -1
  14. package/dist/api/function-settings.api.js +3 -1
  15. package/dist/api/function-settings.api.js.map +1 -1
  16. package/dist/api/index.d.ts +4 -0
  17. package/dist/api/index.js +4 -0
  18. package/dist/api/index.js.map +1 -1
  19. package/dist/api/route-stats.api.d.ts +3 -0
  20. package/dist/api/route-stats.api.js +9 -0
  21. package/dist/api/route-stats.api.js.map +1 -0
  22. package/dist/index.d.ts +28 -0
  23. package/dist/index.js +28 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/insights/index.d.ts +1 -0
  26. package/dist/insights/index.js +18 -0
  27. package/dist/insights/index.js.map +1 -0
  28. package/dist/insights/percentiles.d.ts +2 -0
  29. package/dist/insights/percentiles.js +28 -0
  30. package/dist/insights/percentiles.js.map +1 -0
  31. package/dist/types/enum/index.d.ts +4 -0
  32. package/dist/types/enum/index.js +4 -0
  33. package/dist/types/enum/index.js.map +1 -1
  34. package/dist/types/enum/log-cap-mode.enum.d.ts +5 -0
  35. package/dist/types/enum/log-cap-mode.enum.js +10 -0
  36. package/dist/types/enum/log-cap-mode.enum.js.map +1 -0
  37. package/dist/types/enum/reflex-alert-metric.enum.d.ts +4 -0
  38. package/dist/types/enum/reflex-alert-metric.enum.js +9 -0
  39. package/dist/types/enum/reflex-alert-metric.enum.js.map +1 -0
  40. package/dist/types/enum/reflex-alert-notification-state.enum.d.ts +5 -0
  41. package/dist/types/enum/reflex-alert-notification-state.enum.js +10 -0
  42. package/dist/types/enum/reflex-alert-notification-state.enum.js.map +1 -0
  43. package/dist/types/enum/reflex-alert-scope.enum.d.ts +5 -0
  44. package/dist/types/enum/reflex-alert-scope.enum.js +10 -0
  45. package/dist/types/enum/reflex-alert-scope.enum.js.map +1 -0
  46. package/dist/types/interface/api/requests/alert-rule.request.d.ts +38 -0
  47. package/dist/types/interface/api/requests/alert-rule.request.js +3 -0
  48. package/dist/types/interface/api/requests/alert-rule.request.js.map +1 -0
  49. package/dist/types/interface/api/requests/application-insights.request.d.ts +14 -0
  50. package/dist/types/interface/api/requests/application-insights.request.js +3 -0
  51. package/dist/types/interface/api/requests/application-insights.request.js.map +1 -0
  52. package/dist/types/interface/api/requests/application-run-settings.request.d.ts +9 -0
  53. package/dist/types/interface/api/requests/application-run-settings.request.js +3 -0
  54. package/dist/types/interface/api/requests/application-run-settings.request.js.map +1 -0
  55. package/dist/types/interface/api/requests/function-settings.request.d.ts +6 -1
  56. package/dist/types/interface/api/requests/index.d.ts +4 -0
  57. package/dist/types/interface/api/requests/index.js +4 -0
  58. package/dist/types/interface/api/requests/index.js.map +1 -1
  59. package/dist/types/interface/api/requests/route-stats.request.d.ts +18 -0
  60. package/dist/types/interface/api/requests/route-stats.request.js +3 -0
  61. package/dist/types/interface/api/requests/route-stats.request.js.map +1 -0
  62. package/dist/types/interface/api/responses/alert-rule.response.d.ts +17 -0
  63. package/dist/types/interface/api/responses/alert-rule.response.js +3 -0
  64. package/dist/types/interface/api/responses/alert-rule.response.js.map +1 -0
  65. package/dist/types/interface/api/responses/application-insights.response.d.ts +8 -0
  66. package/dist/types/interface/api/responses/application-insights.response.js +3 -0
  67. package/dist/types/interface/api/responses/application-insights.response.js.map +1 -0
  68. package/dist/types/interface/api/responses/application-run-settings.response.d.ts +6 -0
  69. package/dist/types/interface/api/responses/application-run-settings.response.js +3 -0
  70. package/dist/types/interface/api/responses/application-run-settings.response.js.map +1 -0
  71. package/dist/types/interface/api/responses/function-settings.response.d.ts +3 -1
  72. package/dist/types/interface/api/responses/index.d.ts +4 -0
  73. package/dist/types/interface/api/responses/index.js +4 -0
  74. package/dist/types/interface/api/responses/index.js.map +1 -1
  75. package/dist/types/interface/api/responses/route-stats.response.d.ts +12 -0
  76. package/dist/types/interface/api/responses/route-stats.response.js +3 -0
  77. package/dist/types/interface/api/responses/route-stats.response.js.map +1 -0
  78. package/dist/types/interface/models/index.d.ts +2 -0
  79. package/dist/types/interface/models/index.js +2 -0
  80. package/dist/types/interface/models/index.js.map +1 -1
  81. package/dist/types/interface/models/reflex-alert-rule.model.d.ts +55 -0
  82. package/dist/types/interface/models/reflex-alert-rule.model.js +15 -0
  83. package/dist/types/interface/models/reflex-alert-rule.model.js.map +1 -0
  84. package/dist/types/interface/models/reflex-insights.model.d.ts +63 -0
  85. package/dist/types/interface/models/reflex-insights.model.js +4 -1
  86. package/dist/types/interface/models/reflex-insights.model.js.map +1 -1
  87. package/dist/types/interface/models/reflex-run-settings.model.d.ts +19 -0
  88. package/dist/types/interface/models/reflex-run-settings.model.js +9 -0
  89. package/dist/types/interface/models/reflex-run-settings.model.js.map +1 -0
  90. package/dist/types/interface/models/reflex-run.model.d.ts +40 -3
  91. package/dist/types/interface/models/reflex-run.model.js +9 -0
  92. package/dist/types/interface/models/reflex-run.model.js.map +1 -1
  93. package/jest.config.ts +11 -11
  94. package/package.json +15 -10
  95. package/src/api/alert-rule.api.test.ts +72 -0
  96. package/src/api/alert-rule.api.ts +57 -0
  97. package/src/api/application-insights.api.test.ts +42 -0
  98. package/src/api/application-insights.api.ts +38 -0
  99. package/src/api/application-run-settings.api.test.ts +51 -0
  100. package/src/api/application-run-settings.api.ts +30 -0
  101. package/src/api/function-access.api.ts +36 -36
  102. package/src/api/function-insights.api.test.ts +27 -27
  103. package/src/api/function-insights.api.ts +18 -18
  104. package/src/api/function-run.api.ts +38 -38
  105. package/src/api/function-settings.api.ts +74 -59
  106. package/src/api/function-test.api.ts +34 -34
  107. package/src/api/function-version.api.ts +48 -48
  108. package/src/api/function.api.test.ts +249 -249
  109. package/src/api/function.api.ts +62 -62
  110. package/src/api/health.api.ts +10 -10
  111. package/src/api/index.ts +21 -17
  112. package/src/api/route-stats.api.test.ts +45 -0
  113. package/src/api/route-stats.api.ts +36 -0
  114. package/src/api/service-configuration.api.ts +16 -16
  115. package/src/api/service-deployment.api.ts +79 -79
  116. package/src/api/service-discord-event.api.test.ts +106 -106
  117. package/src/api/service-discord-event.api.ts +78 -78
  118. package/src/api/service-discord.api.test.ts +197 -197
  119. package/src/api/service-discord.api.ts +241 -241
  120. package/src/api/service-insights.api.test.ts +36 -36
  121. package/src/api/service-insights.api.ts +42 -42
  122. package/src/api/service-route.api.ts +72 -72
  123. package/src/api/service-task.api.test.ts +140 -140
  124. package/src/api/service-task.api.ts +141 -141
  125. package/src/api/service-version.api.ts +54 -54
  126. package/src/api/service.api.test.ts +215 -215
  127. package/src/api/service.api.ts +55 -55
  128. package/src/discord/discord-event-filter-cases.ts +261 -261
  129. package/src/discord/discord-event-filters.test.ts +91 -91
  130. package/src/discord/discord-event-filters.ts +95 -95
  131. package/src/discord/discord-event-intents.test.ts +112 -112
  132. package/src/discord/discord-event-intents.ts +55 -55
  133. package/src/discord/index.ts +3 -3
  134. package/src/index.test.ts +87 -75
  135. package/src/index.ts +371 -317
  136. package/src/insights/index.ts +1 -0
  137. package/src/insights/percentiles.test.ts +75 -0
  138. package/src/insights/percentiles.ts +37 -0
  139. package/src/types/enum/access-grant-status.enum.ts +12 -12
  140. package/src/types/enum/access-kind.enum.ts +7 -7
  141. package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
  142. package/src/types/enum/configuration-read-as.enum.ts +5 -5
  143. package/src/types/enum/discord-activity-type.enum.ts +9 -9
  144. package/src/types/enum/discord-component-kind.enum.ts +7 -7
  145. package/src/types/enum/discord-event-drop-reason.enum.ts +13 -13
  146. package/src/types/enum/discord-event-filter-name.enum.ts +11 -11
  147. package/src/types/enum/discord-event-status.enum.ts +13 -13
  148. package/src/types/enum/discord-event-type.enum.ts +7 -7
  149. package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -11
  150. package/src/types/enum/discord-gateway-state.enum.ts +11 -11
  151. package/src/types/enum/discord-option-type.enum.ts +12 -12
  152. package/src/types/enum/discord-presence-status.enum.ts +8 -8
  153. package/src/types/enum/discord-sync-status.enum.ts +6 -6
  154. package/src/types/enum/discord-token-state.enum.ts +11 -11
  155. package/src/types/enum/execution-mode.enum.ts +9 -9
  156. package/src/types/enum/execution-profile.enum.ts +20 -20
  157. package/src/types/enum/execution-settings-source.enum.ts +9 -9
  158. package/src/types/enum/health-status.enum.ts +4 -4
  159. package/src/types/enum/index.ts +44 -40
  160. package/src/types/enum/insights-period.enum.ts +8 -8
  161. package/src/types/enum/log-cap-mode.enum.ts +6 -0
  162. package/src/types/enum/reflex-alert-metric.enum.ts +5 -0
  163. package/src/types/enum/reflex-alert-notification-state.enum.ts +6 -0
  164. package/src/types/enum/reflex-alert-scope.enum.ts +6 -0
  165. package/src/types/enum/reflex-error-code.enum.ts +43 -43
  166. package/src/types/enum/route-method.enum.ts +9 -9
  167. package/src/types/enum/run-log-level.enum.ts +6 -6
  168. package/src/types/enum/run-mode.enum.ts +11 -11
  169. package/src/types/enum/run-status.enum.ts +11 -11
  170. package/src/types/enum/run-step-status.enum.ts +7 -7
  171. package/src/types/enum/schedule-sync-status.enum.ts +6 -6
  172. package/src/types/enum/scheduled-run-failure-code.enum.ts +12 -12
  173. package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
  174. package/src/types/enum/scheduled-run-status.enum.ts +17 -17
  175. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  176. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  177. package/src/types/enum/service-type.enum.ts +9 -9
  178. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  179. package/src/types/enum/trace-effect-type.enum.ts +12 -12
  180. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  181. package/src/types/enum/trigger-kind.enum.ts +8 -8
  182. package/src/types/enum/vault-value-source.enum.ts +12 -12
  183. package/src/types/enum/vault-visibility.enum.ts +5 -5
  184. package/src/types/index.ts +2 -2
  185. package/src/types/interface/api/index.ts +3 -3
  186. package/src/types/interface/api/requests/alert-rule.request.ts +53 -0
  187. package/src/types/interface/api/requests/application-insights.request.ts +18 -0
  188. package/src/types/interface/api/requests/application-run-settings.request.ts +11 -0
  189. package/src/types/interface/api/requests/function-access.request.ts +25 -25
  190. package/src/types/interface/api/requests/function-run.request.ts +30 -30
  191. package/src/types/interface/api/requests/function-settings.request.ts +34 -27
  192. package/src/types/interface/api/requests/function-test.request.ts +39 -39
  193. package/src/types/interface/api/requests/function-version.request.ts +20 -20
  194. package/src/types/interface/api/requests/function.request.ts +36 -36
  195. package/src/types/interface/api/requests/index.ts +19 -15
  196. package/src/types/interface/api/requests/route-stats.request.ts +22 -0
  197. package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
  198. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  199. package/src/types/interface/api/requests/service-discord-event.request.ts +68 -68
  200. package/src/types/interface/api/requests/service-discord.request.ts +173 -173
  201. package/src/types/interface/api/requests/service-insights.request.ts +31 -31
  202. package/src/types/interface/api/requests/service-route.request.ts +44 -44
  203. package/src/types/interface/api/requests/service-task.request.ts +80 -80
  204. package/src/types/interface/api/requests/service-version.request.ts +24 -24
  205. package/src/types/interface/api/requests/service.request.ts +46 -46
  206. package/src/types/interface/api/response.ts +4 -4
  207. package/src/types/interface/api/responses/alert-rule.response.ts +24 -0
  208. package/src/types/interface/api/responses/application-insights.response.ts +11 -0
  209. package/src/types/interface/api/responses/application-run-settings.response.ts +8 -0
  210. package/src/types/interface/api/responses/function-access.response.ts +17 -17
  211. package/src/types/interface/api/responses/function-run.response.ts +18 -18
  212. package/src/types/interface/api/responses/function-settings.response.ts +40 -36
  213. package/src/types/interface/api/responses/function-test.response.ts +12 -12
  214. package/src/types/interface/api/responses/function-version.response.ts +31 -31
  215. package/src/types/interface/api/responses/function.response.ts +25 -25
  216. package/src/types/interface/api/responses/index.ts +19 -15
  217. package/src/types/interface/api/responses/route-stats.response.ts +15 -0
  218. package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
  219. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  220. package/src/types/interface/api/responses/service-discord-event.response.ts +24 -24
  221. package/src/types/interface/api/responses/service-discord.response.ts +122 -122
  222. package/src/types/interface/api/responses/service-insights.response.ts +11 -11
  223. package/src/types/interface/api/responses/service-route.response.ts +31 -31
  224. package/src/types/interface/api/responses/service-task.response.ts +57 -57
  225. package/src/types/interface/api/responses/service-version.response.ts +106 -106
  226. package/src/types/interface/api/responses/service.response.ts +31 -31
  227. package/src/types/interface/health.response.ts +7 -7
  228. package/src/types/interface/index.ts +3 -3
  229. package/src/types/interface/models/index.ts +21 -19
  230. package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
  231. package/src/types/interface/models/reflex-alert-rule.model.ts +56 -0
  232. package/src/types/interface/models/reflex-bot-limits.model.ts +92 -92
  233. package/src/types/interface/models/reflex-definition.model.ts +31 -31
  234. package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -58
  235. package/src/types/interface/models/reflex-discord-event.model.ts +79 -79
  236. package/src/types/interface/models/reflex-execution-settings.model.ts +50 -50
  237. package/src/types/interface/models/reflex-function-version.model.ts +14 -14
  238. package/src/types/interface/models/reflex-function.model.ts +16 -16
  239. package/src/types/interface/models/reflex-insights.model.ts +215 -120
  240. package/src/types/interface/models/reflex-price-list.model.ts +20 -20
  241. package/src/types/interface/models/reflex-route.model.ts +19 -19
  242. package/src/types/interface/models/reflex-run-settings.model.ts +28 -0
  243. package/src/types/interface/models/reflex-run.model.ts +250 -186
  244. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
  245. package/src/types/interface/models/reflex-service-deployment.model.ts +46 -46
  246. package/src/types/interface/models/reflex-service-version.model.ts +61 -61
  247. package/src/types/interface/models/reflex-service.model.ts +45 -45
  248. package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
  249. package/src/types/interface/models/reflex-task.model.ts +97 -97
  250. package/tsconfig.check.json +15 -15
  251. package/tsconfig.json +35 -35
@@ -1,68 +1,68 @@
1
- import type { DiscordEventDropReason, DiscordEventStatus, DiscordEventType } from '../../../enum';
2
- import type { IReflexDiscordEventFilters } from '../../models';
3
-
4
- export interface IListServiceDiscordEventParams {
5
- applicationId: string;
6
- serviceId: string;
7
- }
8
-
9
- export interface ICreateServiceDiscordEventParams {
10
- applicationId: string;
11
- serviceId: string;
12
- }
13
- export interface ICreateServiceDiscordEventBody {
14
- /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
15
- name: string;
16
- eventType: DiscordEventType;
17
- /** A function of the same Service. */
18
- functionId: string;
19
- /** Empty by default: no filter. */
20
- filters?: IReflexDiscordEventFilters;
21
- /** `true` by default. */
22
- ordered?: boolean;
23
- /** `false` by default, `MESSAGE_CREATE` only; asks for the MESSAGE_CONTENT intent. */
24
- includeContent?: boolean;
25
- }
26
-
27
- export interface IUpdateServiceDiscordEventParams {
28
- applicationId: string;
29
- serviceId: string;
30
- eventId: string;
31
- }
32
- export interface IUpdateServiceDiscordEventBody {
33
- name?: string;
34
- eventType?: DiscordEventType;
35
- functionId?: string;
36
- filters?: IReflexDiscordEventFilters;
37
- ordered?: boolean;
38
- includeContent?: boolean;
39
- }
40
-
41
- export interface IDeleteServiceDiscordEventParams {
42
- applicationId: string;
43
- serviceId: string;
44
- eventId: string;
45
- }
46
-
47
- export interface IListServiceDiscordEventLogParams {
48
- applicationId: string;
49
- serviceId: string;
50
- }
51
- export interface IListServiceDiscordEventLogQuery {
52
- /** The environment of the application (abyss-main's id). */
53
- environmentId: string;
54
- /** Only the retained events in this status; drops the dropped ones from the page. */
55
- status?: DiscordEventStatus;
56
- /** Only the dropped events for this reason; drops the retained ones from the page. */
57
- reason?: DiscordEventDropReason;
58
- type?: DiscordEventType;
59
- triggerId?: string;
60
- /** ISO 8601, included. */
61
- from?: string;
62
- /** ISO 8601, excluded. */
63
- to?: string;
64
- /** The `nextCursor` of the previous page. */
65
- cursor?: string;
66
- /** 1 to 100, 50 by default. */
67
- limit?: number;
68
- }
1
+ import type { DiscordEventDropReason, DiscordEventStatus, DiscordEventType } from '../../../enum';
2
+ import type { IReflexDiscordEventFilters } from '../../models';
3
+
4
+ export interface IListServiceDiscordEventParams {
5
+ applicationId: string;
6
+ serviceId: string;
7
+ }
8
+
9
+ export interface ICreateServiceDiscordEventParams {
10
+ applicationId: string;
11
+ serviceId: string;
12
+ }
13
+ export interface ICreateServiceDiscordEventBody {
14
+ /** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
15
+ name: string;
16
+ eventType: DiscordEventType;
17
+ /** A function of the same Service. */
18
+ functionId: string;
19
+ /** Empty by default: no filter. */
20
+ filters?: IReflexDiscordEventFilters;
21
+ /** `true` by default. */
22
+ ordered?: boolean;
23
+ /** `false` by default, `MESSAGE_CREATE` only; asks for the MESSAGE_CONTENT intent. */
24
+ includeContent?: boolean;
25
+ }
26
+
27
+ export interface IUpdateServiceDiscordEventParams {
28
+ applicationId: string;
29
+ serviceId: string;
30
+ eventId: string;
31
+ }
32
+ export interface IUpdateServiceDiscordEventBody {
33
+ name?: string;
34
+ eventType?: DiscordEventType;
35
+ functionId?: string;
36
+ filters?: IReflexDiscordEventFilters;
37
+ ordered?: boolean;
38
+ includeContent?: boolean;
39
+ }
40
+
41
+ export interface IDeleteServiceDiscordEventParams {
42
+ applicationId: string;
43
+ serviceId: string;
44
+ eventId: string;
45
+ }
46
+
47
+ export interface IListServiceDiscordEventLogParams {
48
+ applicationId: string;
49
+ serviceId: string;
50
+ }
51
+ export interface IListServiceDiscordEventLogQuery {
52
+ /** The environment of the application (abyss-main's id). */
53
+ environmentId: string;
54
+ /** Only the retained events in this status; drops the dropped ones from the page. */
55
+ status?: DiscordEventStatus;
56
+ /** Only the dropped events for this reason; drops the retained ones from the page. */
57
+ reason?: DiscordEventDropReason;
58
+ type?: DiscordEventType;
59
+ triggerId?: string;
60
+ /** ISO 8601, included. */
61
+ from?: string;
62
+ /** ISO 8601, excluded. */
63
+ to?: string;
64
+ /** The `nextCursor` of the previous page. */
65
+ cursor?: string;
66
+ /** 1 to 100, 50 by default. */
67
+ limit?: number;
68
+ }
@@ -1,173 +1,173 @@
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
+ 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
+ }