@abyss-project/reflex 5.12.0 → 6.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 (298) hide show
  1. package/.eslintrc.js +32 -32
  2. package/.prettierrc +5 -5
  3. package/README.md +15 -15
  4. package/dist/api/index.d.ts +4 -0
  5. package/dist/api/index.js +4 -0
  6. package/dist/api/index.js.map +1 -1
  7. package/dist/api/service-completion-webhook.api.d.ts +3 -0
  8. package/dist/api/service-completion-webhook.api.js +10 -0
  9. package/dist/api/service-completion-webhook.api.js.map +1 -0
  10. package/dist/api/service-consumer.api.d.ts +7 -0
  11. package/dist/api/service-consumer.api.js +19 -0
  12. package/dist/api/service-consumer.api.js.map +1 -0
  13. package/dist/api/service-discord.api.d.ts +1 -2
  14. package/dist/api/service-discord.api.js +1 -3
  15. package/dist/api/service-discord.api.js.map +1 -1
  16. package/dist/api/service-limits.api.d.ts +3 -0
  17. package/dist/api/service-limits.api.js +10 -0
  18. package/dist/api/service-limits.api.js.map +1 -0
  19. package/dist/api/service-openapi.api.d.ts +2 -0
  20. package/dist/api/service-openapi.api.js +7 -0
  21. package/dist/api/service-openapi.api.js.map +1 -0
  22. package/dist/api/service-route.api.js.map +1 -1
  23. package/dist/index.d.ts +23 -1
  24. package/dist/index.js +23 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/types/enum/completion-delivery-status.enum.d.ts +5 -0
  27. package/dist/types/enum/completion-delivery-status.enum.js +10 -0
  28. package/dist/types/enum/completion-delivery-status.enum.js.map +1 -0
  29. package/dist/types/enum/index.d.ts +2 -0
  30. package/dist/types/enum/index.js +2 -0
  31. package/dist/types/enum/index.js.map +1 -1
  32. package/dist/types/enum/reflex-error-code.enum.d.ts +8 -1
  33. package/dist/types/enum/reflex-error-code.enum.js +7 -0
  34. package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
  35. package/dist/types/enum/run-status.enum.d.ts +2 -1
  36. package/dist/types/enum/run-status.enum.js +1 -0
  37. package/dist/types/enum/run-status.enum.js.map +1 -1
  38. package/dist/types/enum/scheduled-run-failure-code.enum.d.ts +2 -1
  39. package/dist/types/enum/scheduled-run-failure-code.enum.js +1 -0
  40. package/dist/types/enum/scheduled-run-failure-code.enum.js.map +1 -1
  41. package/dist/types/enum/service-block-reason.enum.d.ts +4 -0
  42. package/dist/types/enum/service-block-reason.enum.js +9 -0
  43. package/dist/types/enum/service-block-reason.enum.js.map +1 -0
  44. package/dist/types/interface/api/requests/function-run.request.d.ts +1 -0
  45. package/dist/types/interface/api/requests/function-test.request.d.ts +1 -0
  46. package/dist/types/interface/api/requests/index.d.ts +4 -0
  47. package/dist/types/interface/api/requests/index.js +4 -0
  48. package/dist/types/interface/api/requests/index.js.map +1 -1
  49. package/dist/types/interface/api/requests/service-completion-webhook.request.d.ts +9 -0
  50. package/dist/types/interface/api/requests/service-completion-webhook.request.js +3 -0
  51. package/dist/types/interface/api/requests/service-completion-webhook.request.js.map +1 -0
  52. package/dist/types/interface/api/requests/service-consumer.request.d.ts +41 -0
  53. package/dist/types/interface/api/requests/service-consumer.request.js +3 -0
  54. package/dist/types/interface/api/requests/service-consumer.request.js.map +1 -0
  55. package/dist/types/interface/api/requests/service-discord.request.d.ts +1 -14
  56. package/dist/types/interface/api/requests/service-limits.request.d.ts +18 -0
  57. package/dist/types/interface/api/requests/service-limits.request.js +3 -0
  58. package/dist/types/interface/api/requests/service-limits.request.js.map +1 -0
  59. package/dist/types/interface/api/requests/service-openapi.request.d.ts +8 -0
  60. package/dist/types/interface/api/requests/service-openapi.request.js +3 -0
  61. package/dist/types/interface/api/requests/service-openapi.request.js.map +1 -0
  62. package/dist/types/interface/api/requests/service-route.request.d.ts +3 -0
  63. package/dist/types/interface/api/responses/function-settings.response.d.ts +3 -1
  64. package/dist/types/interface/api/responses/function-test.response.d.ts +3 -1
  65. package/dist/types/interface/api/responses/index.d.ts +4 -0
  66. package/dist/types/interface/api/responses/index.js +4 -0
  67. package/dist/types/interface/api/responses/index.js.map +1 -1
  68. package/dist/types/interface/api/responses/service-completion-webhook.response.d.ts +8 -0
  69. package/dist/types/interface/api/responses/service-completion-webhook.response.js +3 -0
  70. package/dist/types/interface/api/responses/service-completion-webhook.response.js.map +1 -0
  71. package/dist/types/interface/api/responses/service-consumer.response.d.ts +25 -0
  72. package/dist/types/interface/api/responses/service-consumer.response.js +3 -0
  73. package/dist/types/interface/api/responses/service-consumer.response.js.map +1 -0
  74. package/dist/types/interface/api/responses/service-discord.response.d.ts +1 -9
  75. package/dist/types/interface/api/responses/service-limits.response.d.ts +10 -0
  76. package/dist/types/interface/api/responses/service-limits.response.js +3 -0
  77. package/dist/types/interface/api/responses/service-limits.response.js.map +1 -0
  78. package/dist/types/interface/api/responses/service-openapi.response.d.ts +5 -0
  79. package/dist/types/interface/api/responses/service-openapi.response.js +3 -0
  80. package/dist/types/interface/api/responses/service-openapi.response.js.map +1 -0
  81. package/dist/types/interface/models/index.d.ts +4 -0
  82. package/dist/types/interface/models/index.js +4 -0
  83. package/dist/types/interface/models/index.js.map +1 -1
  84. package/dist/types/interface/models/reflex-bot-limits.model.d.ts +0 -25
  85. package/dist/types/interface/models/reflex-bot-limits.model.js +8 -7
  86. package/dist/types/interface/models/reflex-bot-limits.model.js.map +1 -1
  87. package/dist/types/interface/models/reflex-completion-webhook.model.d.ts +48 -0
  88. package/dist/types/interface/models/reflex-completion-webhook.model.js +12 -0
  89. package/dist/types/interface/models/reflex-completion-webhook.model.js.map +1 -0
  90. package/dist/types/interface/models/reflex-consumer.model.d.ts +30 -0
  91. package/dist/types/interface/models/reflex-consumer.model.js +11 -0
  92. package/dist/types/interface/models/reflex-consumer.model.js.map +1 -0
  93. package/dist/types/interface/models/reflex-execution-settings.model.d.ts +1 -0
  94. package/dist/types/interface/models/reflex-execution-settings.model.js +1 -0
  95. package/dist/types/interface/models/reflex-execution-settings.model.js.map +1 -1
  96. package/dist/types/interface/models/reflex-route-contract.model.d.ts +22 -0
  97. package/dist/types/interface/models/reflex-route-contract.model.js +13 -0
  98. package/dist/types/interface/models/reflex-route-contract.model.js.map +1 -0
  99. package/dist/types/interface/models/reflex-route.model.d.ts +2 -0
  100. package/dist/types/interface/models/reflex-run.model.d.ts +21 -0
  101. package/dist/types/interface/models/reflex-run.model.js.map +1 -1
  102. package/dist/types/interface/models/reflex-service-limits.model.d.ts +41 -0
  103. package/dist/types/interface/models/reflex-service-limits.model.js +13 -0
  104. package/dist/types/interface/models/reflex-service-limits.model.js.map +1 -0
  105. package/dist/types/interface/models/reflex-service-version.model.d.ts +2 -0
  106. package/jest.config.ts +11 -11
  107. package/package.json +1 -1
  108. package/src/api/alert-rule.api.test.ts +72 -72
  109. package/src/api/alert-rule.api.ts +57 -57
  110. package/src/api/application-insights.api.test.ts +42 -42
  111. package/src/api/application-insights.api.ts +38 -38
  112. package/src/api/application-run-settings.api.test.ts +51 -51
  113. package/src/api/application-run-settings.api.ts +30 -30
  114. package/src/api/function-access.api.ts +87 -87
  115. package/src/api/function-insights.api.test.ts +27 -27
  116. package/src/api/function-insights.api.ts +18 -18
  117. package/src/api/function-run.api.ts +38 -38
  118. package/src/api/function-settings.api.ts +74 -74
  119. package/src/api/function-template.api.test.ts +72 -72
  120. package/src/api/function-template.api.ts +52 -52
  121. package/src/api/function-test.api.ts +34 -34
  122. package/src/api/function-version.api.ts +66 -66
  123. package/src/api/function.api.test.ts +2 -1
  124. package/src/api/function.api.ts +62 -62
  125. package/src/api/health.api.ts +10 -10
  126. package/src/api/index.ts +4 -0
  127. package/src/api/route-stats.api.test.ts +45 -45
  128. package/src/api/route-stats.api.ts +36 -36
  129. package/src/api/service-completion-webhook.api.test.ts +87 -0
  130. package/src/api/service-completion-webhook.api.ts +37 -0
  131. package/src/api/service-configuration.api.ts +16 -16
  132. package/src/api/service-consumer.api.test.ts +104 -0
  133. package/src/api/service-consumer.api.ts +88 -0
  134. package/src/api/service-deployment.api.ts +79 -79
  135. package/src/api/service-discord-event.api.test.ts +106 -106
  136. package/src/api/service-discord-event.api.ts +78 -78
  137. package/src/api/service-discord.api.test.ts +0 -19
  138. package/src/api/service-discord.api.ts +0 -19
  139. package/src/api/service-insights.api.test.ts +36 -36
  140. package/src/api/service-insights.api.ts +42 -42
  141. package/src/api/service-limits.api.test.ts +100 -0
  142. package/src/api/service-limits.api.ts +37 -0
  143. package/src/api/service-openapi.api.test.ts +52 -0
  144. package/src/api/service-openapi.api.ts +21 -0
  145. package/src/api/service-route.api.ts +8 -6
  146. package/src/api/service-task.api.test.ts +140 -140
  147. package/src/api/service-task.api.ts +141 -141
  148. package/src/api/service-version.api.ts +54 -54
  149. package/src/api/service.api.test.ts +215 -215
  150. package/src/api/service.api.ts +55 -55
  151. package/src/discord/discord-event-filter-cases.ts +261 -261
  152. package/src/discord/discord-event-filters.test.ts +91 -91
  153. package/src/discord/discord-event-filters.ts +95 -95
  154. package/src/discord/discord-event-intents.test.ts +112 -112
  155. package/src/discord/discord-event-intents.ts +55 -55
  156. package/src/discord/index.ts +3 -3
  157. package/src/index.test.ts +18 -1
  158. package/src/index.ts +46 -3
  159. package/src/insights/index.ts +1 -1
  160. package/src/insights/percentiles.test.ts +75 -75
  161. package/src/insights/percentiles.ts +37 -37
  162. package/src/types/enum/access-grant-status.enum.ts +12 -12
  163. package/src/types/enum/access-kind.enum.ts +7 -7
  164. package/src/types/enum/access-request-status.enum.ts +11 -11
  165. package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
  166. package/src/types/enum/completion-delivery-status.enum.ts +9 -0
  167. package/src/types/enum/configuration-read-as.enum.ts +5 -5
  168. package/src/types/enum/discord-activity-type.enum.ts +9 -9
  169. package/src/types/enum/discord-channel-type.enum.ts +11 -11
  170. package/src/types/enum/discord-component-kind.enum.ts +7 -7
  171. package/src/types/enum/discord-event-drop-reason.enum.ts +13 -13
  172. package/src/types/enum/discord-event-filter-name.enum.ts +11 -11
  173. package/src/types/enum/discord-event-status.enum.ts +13 -13
  174. package/src/types/enum/discord-event-type.enum.ts +7 -7
  175. package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -11
  176. package/src/types/enum/discord-gateway-state.enum.ts +11 -11
  177. package/src/types/enum/discord-host-action.enum.ts +35 -35
  178. package/src/types/enum/discord-locale.enum.ts +35 -35
  179. package/src/types/enum/discord-option-type.enum.ts +12 -12
  180. package/src/types/enum/discord-presence-status.enum.ts +8 -8
  181. package/src/types/enum/discord-sync-status.enum.ts +6 -6
  182. package/src/types/enum/discord-token-state.enum.ts +11 -11
  183. package/src/types/enum/execution-mode.enum.ts +9 -9
  184. package/src/types/enum/execution-profile.enum.ts +20 -20
  185. package/src/types/enum/execution-settings-source.enum.ts +9 -9
  186. package/src/types/enum/health-status.enum.ts +4 -4
  187. package/src/types/enum/index.ts +2 -0
  188. package/src/types/enum/insights-period.enum.ts +8 -8
  189. package/src/types/enum/log-cap-mode.enum.ts +6 -6
  190. package/src/types/enum/log-drop-cause.enum.ts +8 -8
  191. package/src/types/enum/reflex-alert-metric.enum.ts +5 -5
  192. package/src/types/enum/reflex-alert-notification-state.enum.ts +6 -6
  193. package/src/types/enum/reflex-alert-scope.enum.ts +6 -6
  194. package/src/types/enum/reflex-error-code.enum.ts +31 -1
  195. package/src/types/enum/route-method.enum.ts +9 -9
  196. package/src/types/enum/run-log-level.enum.ts +6 -6
  197. package/src/types/enum/run-mode.enum.ts +11 -11
  198. package/src/types/enum/run-status.enum.ts +5 -0
  199. package/src/types/enum/run-step-status.enum.ts +7 -7
  200. package/src/types/enum/schedule-sync-status.enum.ts +6 -6
  201. package/src/types/enum/scheduled-run-failure-code.enum.ts +3 -1
  202. package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
  203. package/src/types/enum/scheduled-run-status.enum.ts +17 -17
  204. package/src/types/enum/service-block-reason.enum.ts +13 -0
  205. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  206. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  207. package/src/types/enum/service-type.enum.ts +9 -9
  208. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  209. package/src/types/enum/trace-effect-type.enum.ts +12 -12
  210. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  211. package/src/types/enum/trigger-kind.enum.ts +8 -8
  212. package/src/types/enum/vault-value-source.enum.ts +12 -12
  213. package/src/types/enum/vault-visibility.enum.ts +5 -5
  214. package/src/types/index.ts +2 -2
  215. package/src/types/interface/api/index.ts +3 -3
  216. package/src/types/interface/api/requests/alert-rule.request.ts +53 -53
  217. package/src/types/interface/api/requests/application-insights.request.ts +18 -18
  218. package/src/types/interface/api/requests/application-run-settings.request.ts +11 -11
  219. package/src/types/interface/api/requests/function-access.request.ts +51 -51
  220. package/src/types/interface/api/requests/function-run.request.ts +2 -0
  221. package/src/types/interface/api/requests/function-settings.request.ts +34 -34
  222. package/src/types/interface/api/requests/function-template.request.ts +29 -29
  223. package/src/types/interface/api/requests/function-test.request.ts +5 -0
  224. package/src/types/interface/api/requests/function-version.request.ts +38 -38
  225. package/src/types/interface/api/requests/function.request.ts +36 -36
  226. package/src/types/interface/api/requests/index.ts +4 -0
  227. package/src/types/interface/api/requests/route-stats.request.ts +22 -22
  228. package/src/types/interface/api/requests/service-completion-webhook.request.ts +11 -0
  229. package/src/types/interface/api/requests/service-configuration.request.ts +4 -4
  230. package/src/types/interface/api/requests/service-consumer.request.ts +51 -0
  231. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  232. package/src/types/interface/api/requests/service-discord-event.request.ts +68 -68
  233. package/src/types/interface/api/requests/service-discord.request.ts +1 -25
  234. package/src/types/interface/api/requests/service-insights.request.ts +31 -31
  235. package/src/types/interface/api/requests/service-limits.request.ts +28 -0
  236. package/src/types/interface/api/requests/service-openapi.request.ts +10 -0
  237. package/src/types/interface/api/requests/service-route.request.ts +8 -0
  238. package/src/types/interface/api/requests/service-task.request.ts +80 -80
  239. package/src/types/interface/api/requests/service-version.request.ts +24 -24
  240. package/src/types/interface/api/requests/service.request.ts +46 -46
  241. package/src/types/interface/api/response.ts +4 -4
  242. package/src/types/interface/api/responses/alert-rule.response.ts +24 -24
  243. package/src/types/interface/api/responses/application-insights.response.ts +11 -11
  244. package/src/types/interface/api/responses/application-run-settings.response.ts +8 -8
  245. package/src/types/interface/api/responses/function-access.response.ts +45 -45
  246. package/src/types/interface/api/responses/function-run.response.ts +18 -18
  247. package/src/types/interface/api/responses/function-settings.response.ts +8 -0
  248. package/src/types/interface/api/responses/function-template.response.ts +21 -21
  249. package/src/types/interface/api/responses/function-test.response.ts +8 -1
  250. package/src/types/interface/api/responses/function-version.response.ts +42 -42
  251. package/src/types/interface/api/responses/function.response.ts +25 -25
  252. package/src/types/interface/api/responses/index.ts +4 -0
  253. package/src/types/interface/api/responses/route-stats.response.ts +15 -15
  254. package/src/types/interface/api/responses/service-completion-webhook.response.ts +13 -0
  255. package/src/types/interface/api/responses/service-configuration.response.ts +8 -8
  256. package/src/types/interface/api/responses/service-consumer.response.ts +33 -0
  257. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  258. package/src/types/interface/api/responses/service-discord-event.response.ts +24 -24
  259. package/src/types/interface/api/responses/service-discord.response.ts +4 -16
  260. package/src/types/interface/api/responses/service-insights.response.ts +11 -11
  261. package/src/types/interface/api/responses/service-limits.response.ts +13 -0
  262. package/src/types/interface/api/responses/service-openapi.response.ts +7 -0
  263. package/src/types/interface/api/responses/service-route.response.ts +3 -3
  264. package/src/types/interface/api/responses/service-task.response.ts +57 -57
  265. package/src/types/interface/api/responses/service-version.response.ts +112 -112
  266. package/src/types/interface/api/responses/service.response.ts +31 -31
  267. package/src/types/interface/health.response.ts +7 -7
  268. package/src/types/interface/index.ts +3 -3
  269. package/src/types/interface/models/index.ts +4 -0
  270. package/src/types/interface/models/reflex-access-grant.model.ts +14 -14
  271. package/src/types/interface/models/reflex-access-request.model.ts +15 -15
  272. package/src/types/interface/models/reflex-alert-rule.model.ts +56 -56
  273. package/src/types/interface/models/reflex-bot-limits.model.ts +12 -51
  274. package/src/types/interface/models/reflex-completion-webhook.model.ts +85 -0
  275. package/src/types/interface/models/reflex-consumer.model.ts +50 -0
  276. package/src/types/interface/models/reflex-definition.model.ts +31 -31
  277. package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -58
  278. package/src/types/interface/models/reflex-discord-event.model.ts +79 -79
  279. package/src/types/interface/models/reflex-discord.model.ts +196 -196
  280. package/src/types/interface/models/reflex-execution-settings.model.ts +7 -0
  281. package/src/types/interface/models/reflex-function-template.model.ts +18 -18
  282. package/src/types/interface/models/reflex-function-version.model.ts +19 -19
  283. package/src/types/interface/models/reflex-function.model.ts +30 -30
  284. package/src/types/interface/models/reflex-insights.model.ts +215 -215
  285. package/src/types/interface/models/reflex-price-list.model.ts +20 -20
  286. package/src/types/interface/models/reflex-route-contract.model.ts +46 -0
  287. package/src/types/interface/models/reflex-route.model.ts +5 -1
  288. package/src/types/interface/models/reflex-run-settings.model.ts +28 -28
  289. package/src/types/interface/models/reflex-run.model.ts +47 -3
  290. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -22
  291. package/src/types/interface/models/reflex-service-deployment.model.ts +46 -46
  292. package/src/types/interface/models/reflex-service-limits.model.ts +73 -0
  293. package/src/types/interface/models/reflex-service-version.model.ts +3 -0
  294. package/src/types/interface/models/reflex-service.model.ts +45 -45
  295. package/src/types/interface/models/reflex-step-stats.model.ts +35 -35
  296. package/src/types/interface/models/reflex-task.model.ts +97 -97
  297. package/tsconfig.check.json +15 -15
  298. package/tsconfig.json +35 -35
@@ -3,11 +3,7 @@ import type {
3
3
  DiscordComponentKind,
4
4
  DiscordPresenceStatus,
5
5
  } from '../../../enum';
6
- import type {
7
- IReflexBotAlertSettings,
8
- IReflexDiscordCommandOption,
9
- ReflexDiscordLocalizations,
10
- } from '../../models';
6
+ import type { IReflexDiscordCommandOption, ReflexDiscordLocalizations } from '../../models';
11
7
 
12
8
  export interface IListServiceDiscordCommandParams {
13
9
  applicationId: string;
@@ -151,23 +147,3 @@ export interface ISetServiceDiscordAllocationBody {
151
147
  */
152
148
  lots: number;
153
149
  }
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
+ }
@@ -0,0 +1,28 @@
1
+ import type { IReflexServiceAlertSettings } from '../../models';
2
+
3
+ export interface IListServiceLimitsParams {
4
+ applicationId: string;
5
+ serviceId: string;
6
+ }
7
+
8
+ export interface ISetServiceLimitsParams {
9
+ applicationId: string;
10
+ serviceId: string;
11
+ /** An environment of the application (abyss-main's id). */
12
+ environmentId: string;
13
+ }
14
+ /** A key left out keeps its current value. */
15
+ export interface ISetServiceLimitsBody {
16
+ /**
17
+ * Bills the credits of the month past those of the organization. Refused (`409 CREDIT_OVERAGE_NOT_ALLOWED`)
18
+ * when the organization does not allow overage of the credits.
19
+ */
20
+ creditOverageEnabled?: boolean;
21
+ /** Monthly spend cap of the Service, in cents (`REFLEX_SERVICE_SPEND_LIMITS`). */
22
+ monthlySpendCapCents?: number;
23
+ alerts?: {
24
+ monthlySpendCap?: Partial<IReflexServiceAlertSettings>;
25
+ /** A bot only: `400 SERVICE_TYPE_FIELD_REFUSED` for any other type of Service. */
26
+ rate?: Partial<IReflexServiceAlertSettings>;
27
+ };
28
+ }
@@ -0,0 +1,10 @@
1
+ export interface IGetServiceOpenApiParams {
2
+ applicationId: string;
3
+ serviceId: string;
4
+ }
5
+ export interface IGetServiceOpenApiQuery {
6
+ /** The environment whose edge address goes in `servers` (abyss-main's id). */
7
+ environmentId: string;
8
+ /** A version of the Service; absent for the draft. */
9
+ versionId?: string;
10
+ }
@@ -1,4 +1,5 @@
1
1
  import type { RouteMethod, TriggerAccessMode } from '../../../enum';
2
+ import type { IReflexRouteContract } from '../../models';
2
3
 
3
4
  export interface IListServiceRouteParams {
4
5
  applicationId: string;
@@ -17,6 +18,11 @@ export interface ICreateServiceRouteBody {
17
18
  /** A function of the same Service. */
18
19
  functionId: string;
19
20
  accessMode: TriggerAccessMode;
21
+ /**
22
+ * What the route accepts and answers (`REFLEX_CONTRACT_LIMITS`); `400 CONTRACT_INVALID` with each fault. Null or
23
+ * absent for none.
24
+ */
25
+ contract?: IReflexRouteContract | null;
20
26
  }
21
27
 
22
28
  export interface IUpdateServiceRouteParams {
@@ -29,6 +35,8 @@ export interface IUpdateServiceRouteBody {
29
35
  path?: string;
30
36
  functionId?: string;
31
37
  accessMode?: TriggerAccessMode;
38
+ /** Null removes the contract; absent keeps it. */
39
+ contract?: IReflexRouteContract | null;
32
40
  }
33
41
 
34
42
  export interface IDeleteServiceRouteParams {
@@ -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
+ }
@@ -1,24 +1,24 @@
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 IGetServiceVersionDraftStatusParams {
16
- applicationId: string;
17
- serviceId: string;
18
- }
19
-
20
- export interface IGetServiceVersionParams {
21
- applicationId: string;
22
- serviceId: string;
23
- versionId: string;
24
- }
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 IGetServiceVersionDraftStatusParams {
16
+ applicationId: string;
17
+ serviceId: string;
18
+ }
19
+
20
+ export interface IGetServiceVersionParams {
21
+ applicationId: string;
22
+ serviceId: string;
23
+ versionId: string;
24
+ }
@@ -1,46 +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
- /** 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
+ 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,4 +1,4 @@
1
- /** Every success of the API wraps its payload in `data`. */
2
- export interface IResponse<T> {
3
- data: T;
4
- }
1
+ /** Every success of the API wraps its payload in `data`. */
2
+ export interface IResponse<T> {
3
+ data: T;
4
+ }
@@ -1,24 +1,24 @@
1
- import type { IReflexAlertRule, IReflexAlertRuleState } from '../../models';
2
- import type { IResponse } from '../response';
3
-
4
- /** A rule and what its last evaluation found; `state` is null until the first evaluation. */
5
- export interface IReflexAlertRuleWithState {
6
- rule: IReflexAlertRule;
7
- state: IReflexAlertRuleState | null;
8
- }
9
-
10
- export interface IListAlertRuleData {
11
- rules: IReflexAlertRuleWithState[];
12
- /** Rules enabled in the application, against `REFLEX_ALERT_RULE_LIMITS.maxActivePerApplication`. */
13
- activeCount: number;
14
- }
15
- export type IListAlertRuleResponse = IResponse<IListAlertRuleData>;
16
-
17
- export type ICreateAlertRuleData = IReflexAlertRuleWithState;
18
- export type ICreateAlertRuleResponse = IResponse<ICreateAlertRuleData>;
19
-
20
- export type IUpdateAlertRuleData = IReflexAlertRuleWithState;
21
- export type IUpdateAlertRuleResponse = IResponse<IUpdateAlertRuleData>;
22
-
23
- export type IDeleteAlertRuleData = Record<string, never>;
24
- export type IDeleteAlertRuleResponse = IResponse<IDeleteAlertRuleData>;
1
+ import type { IReflexAlertRule, IReflexAlertRuleState } from '../../models';
2
+ import type { IResponse } from '../response';
3
+
4
+ /** A rule and what its last evaluation found; `state` is null until the first evaluation. */
5
+ export interface IReflexAlertRuleWithState {
6
+ rule: IReflexAlertRule;
7
+ state: IReflexAlertRuleState | null;
8
+ }
9
+
10
+ export interface IListAlertRuleData {
11
+ rules: IReflexAlertRuleWithState[];
12
+ /** Rules enabled in the application, against `REFLEX_ALERT_RULE_LIMITS.maxActivePerApplication`. */
13
+ activeCount: number;
14
+ }
15
+ export type IListAlertRuleResponse = IResponse<IListAlertRuleData>;
16
+
17
+ export type ICreateAlertRuleData = IReflexAlertRuleWithState;
18
+ export type ICreateAlertRuleResponse = IResponse<ICreateAlertRuleData>;
19
+
20
+ export type IUpdateAlertRuleData = IReflexAlertRuleWithState;
21
+ export type IUpdateAlertRuleResponse = IResponse<IUpdateAlertRuleData>;
22
+
23
+ export type IDeleteAlertRuleData = Record<string, never>;
24
+ export type IDeleteAlertRuleResponse = IResponse<IDeleteAlertRuleData>;
@@ -1,11 +1,11 @@
1
- import type { IReflexApplicationInsights, IReflexCalendarDay } from '../../models';
2
- import type { IResponse } from '../response';
3
-
4
- export type IGetApplicationInsightsData = IReflexApplicationInsights;
5
- export type IGetApplicationInsightsResponse = IResponse<IGetApplicationInsightsData>;
6
-
7
- export interface IGetApplicationCalendarData {
8
- /** The last 365 days, oldest first, a day without run included. */
9
- days: IReflexCalendarDay[];
10
- }
11
- export type IGetApplicationCalendarResponse = IResponse<IGetApplicationCalendarData>;
1
+ import type { IReflexApplicationInsights, IReflexCalendarDay } from '../../models';
2
+ import type { IResponse } from '../response';
3
+
4
+ export type IGetApplicationInsightsData = IReflexApplicationInsights;
5
+ export type IGetApplicationInsightsResponse = IResponse<IGetApplicationInsightsData>;
6
+
7
+ export interface IGetApplicationCalendarData {
8
+ /** The last 365 days, oldest first, a day without run included. */
9
+ days: IReflexCalendarDay[];
10
+ }
11
+ export type IGetApplicationCalendarResponse = IResponse<IGetApplicationCalendarData>;
@@ -1,8 +1,8 @@
1
- import type { IReflexApplicationRunSettings } from '../../models';
2
- import type { IResponse } from '../response';
3
-
4
- export type IGetApplicationRunSettingsData = IReflexApplicationRunSettings;
5
- export type IGetApplicationRunSettingsResponse = IResponse<IGetApplicationRunSettingsData>;
6
-
7
- export type ISetApplicationRunSettingsData = IReflexApplicationRunSettings;
8
- export type ISetApplicationRunSettingsResponse = IResponse<ISetApplicationRunSettingsData>;
1
+ import type { IReflexApplicationRunSettings } from '../../models';
2
+ import type { IResponse } from '../response';
3
+
4
+ export type IGetApplicationRunSettingsData = IReflexApplicationRunSettings;
5
+ export type IGetApplicationRunSettingsResponse = IResponse<IGetApplicationRunSettingsData>;
6
+
7
+ export type ISetApplicationRunSettingsData = IReflexApplicationRunSettings;
8
+ export type ISetApplicationRunSettingsResponse = IResponse<ISetApplicationRunSettingsData>;
@@ -1,45 +1,45 @@
1
- import type { IReflexAccessGrant, IReflexAccessRequest } from '../../models';
2
- import type { IResponse } from '../response';
3
-
4
- export interface IListFunctionAccessData {
5
- grants: IReflexAccessGrant[];
6
- /** The requests of the function, every status, newest first. */
7
- requests: IReflexAccessRequest[];
8
- /** The declaration keys of the saved draft the caller may grant. */
9
- grantable: string[];
10
- }
11
- export type IListFunctionAccessResponse = IResponse<IListFunctionAccessData>;
12
-
13
- export interface IGrantFunctionAccessData {
14
- grant: IReflexAccessGrant;
15
- }
16
- export type IGrantFunctionAccessResponse = IResponse<IGrantFunctionAccessData>;
17
-
18
- export interface IRevokeFunctionAccessData {
19
- grant: IReflexAccessGrant;
20
- }
21
- export type IRevokeFunctionAccessResponse = IResponse<IRevokeFunctionAccessData>;
22
-
23
- export interface IGrantAllFunctionAccessData {
24
- /** What the caller could grant, now granted. */
25
- granted: IReflexAccessGrant[];
26
- /** The pending requests for the rest (an existing pending request is reused). */
27
- requested: IReflexAccessRequest[];
28
- }
29
- export type IGrantAllFunctionAccessResponse = IResponse<IGrantAllFunctionAccessData>;
30
-
31
- export interface IRequestFunctionAccessData {
32
- request: IReflexAccessRequest;
33
- }
34
- export type IRequestFunctionAccessResponse = IResponse<IRequestFunctionAccessData>;
35
-
36
- export interface IGrantFunctionAccessRequestData {
37
- request: IReflexAccessRequest;
38
- grant: IReflexAccessGrant;
39
- }
40
- export type IGrantFunctionAccessRequestResponse = IResponse<IGrantFunctionAccessRequestData>;
41
-
42
- export interface IDismissFunctionAccessRequestData {
43
- request: IReflexAccessRequest;
44
- }
45
- export type IDismissFunctionAccessRequestResponse = IResponse<IDismissFunctionAccessRequestData>;
1
+ import type { IReflexAccessGrant, IReflexAccessRequest } from '../../models';
2
+ import type { IResponse } from '../response';
3
+
4
+ export interface IListFunctionAccessData {
5
+ grants: IReflexAccessGrant[];
6
+ /** The requests of the function, every status, newest first. */
7
+ requests: IReflexAccessRequest[];
8
+ /** The declaration keys of the saved draft the caller may grant. */
9
+ grantable: string[];
10
+ }
11
+ export type IListFunctionAccessResponse = IResponse<IListFunctionAccessData>;
12
+
13
+ export interface IGrantFunctionAccessData {
14
+ grant: IReflexAccessGrant;
15
+ }
16
+ export type IGrantFunctionAccessResponse = IResponse<IGrantFunctionAccessData>;
17
+
18
+ export interface IRevokeFunctionAccessData {
19
+ grant: IReflexAccessGrant;
20
+ }
21
+ export type IRevokeFunctionAccessResponse = IResponse<IRevokeFunctionAccessData>;
22
+
23
+ export interface IGrantAllFunctionAccessData {
24
+ /** What the caller could grant, now granted. */
25
+ granted: IReflexAccessGrant[];
26
+ /** The pending requests for the rest (an existing pending request is reused). */
27
+ requested: IReflexAccessRequest[];
28
+ }
29
+ export type IGrantAllFunctionAccessResponse = IResponse<IGrantAllFunctionAccessData>;
30
+
31
+ export interface IRequestFunctionAccessData {
32
+ request: IReflexAccessRequest;
33
+ }
34
+ export type IRequestFunctionAccessResponse = IResponse<IRequestFunctionAccessData>;
35
+
36
+ export interface IGrantFunctionAccessRequestData {
37
+ request: IReflexAccessRequest;
38
+ grant: IReflexAccessGrant;
39
+ }
40
+ export type IGrantFunctionAccessRequestResponse = IResponse<IGrantFunctionAccessRequestData>;
41
+
42
+ export interface IDismissFunctionAccessRequestData {
43
+ request: IReflexAccessRequest;
44
+ }
45
+ export type IDismissFunctionAccessRequestResponse = IResponse<IDismissFunctionAccessRequestData>;