@abyss-project/reflex 5.4.0 → 5.6.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.
- package/dist/api/function-insights.api.d.ts +2 -0
- package/dist/api/function-insights.api.js +7 -0
- package/dist/api/function-insights.api.js.map +1 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/service-discord-event.api.d.ts +6 -0
- package/dist/api/service-discord-event.api.js +18 -0
- package/dist/api/service-discord-event.api.js.map +1 -0
- package/dist/api/service-discord.api.d.ts +3 -1
- package/dist/api/service-discord.api.js +5 -1
- package/dist/api/service-discord.api.js.map +1 -1
- package/dist/api/service-insights.api.d.ts +3 -0
- package/dist/api/service-insights.api.js +12 -0
- package/dist/api/service-insights.api.js.map +1 -0
- package/dist/discord/discord-event-filter-cases.d.ts +15 -0
- package/dist/discord/discord-event-filter-cases.js +77 -0
- package/dist/discord/discord-event-filter-cases.js.map +1 -0
- package/dist/discord/discord-event-filters.d.ts +20 -0
- package/dist/discord/discord-event-filters.js +50 -0
- package/dist/discord/discord-event-filters.js.map +1 -0
- package/dist/discord/discord-event-intents.d.ts +14 -0
- package/dist/discord/discord-event-intents.js +38 -0
- package/dist/discord/discord-event-intents.js.map +1 -0
- package/dist/discord/index.d.ts +3 -0
- package/dist/discord/index.js +20 -0
- package/dist/discord/index.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/types/enum/bot-event-block-reason.enum.d.ts +4 -0
- package/dist/types/enum/bot-event-block-reason.enum.js +9 -0
- package/dist/types/enum/bot-event-block-reason.enum.js.map +1 -0
- package/dist/types/enum/discord-event-drop-reason.enum.d.ts +7 -0
- package/dist/types/enum/discord-event-drop-reason.enum.js +12 -0
- package/dist/types/enum/discord-event-drop-reason.enum.js.map +1 -0
- package/dist/types/enum/discord-event-filter-name.enum.d.ts +9 -0
- package/dist/types/enum/discord-event-filter-name.enum.js +14 -0
- package/dist/types/enum/discord-event-filter-name.enum.js.map +1 -0
- package/dist/types/enum/discord-event-status.enum.d.ts +7 -0
- package/dist/types/enum/discord-event-status.enum.js +12 -0
- package/dist/types/enum/discord-event-status.enum.js.map +1 -0
- package/dist/types/enum/discord-event-type.enum.d.ts +6 -0
- package/dist/types/enum/discord-event-type.enum.js +11 -0
- package/dist/types/enum/discord-event-type.enum.js.map +1 -0
- package/dist/types/enum/discord-gateway-failure-code.enum.d.ts +2 -1
- package/dist/types/enum/discord-gateway-failure-code.enum.js +1 -0
- package/dist/types/enum/discord-gateway-failure-code.enum.js.map +1 -1
- package/dist/types/enum/index.d.ts +7 -0
- package/dist/types/enum/index.js +7 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/insights-period.enum.d.ts +7 -0
- package/dist/types/enum/insights-period.enum.js +12 -0
- package/dist/types/enum/insights-period.enum.js.map +1 -0
- package/dist/types/enum/reflex-error-code.enum.d.ts +3 -1
- package/dist/types/enum/reflex-error-code.enum.js +2 -0
- package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
- package/dist/types/enum/scheduled-run-failure-code.enum.d.ts +2 -1
- package/dist/types/enum/scheduled-run-failure-code.enum.js +1 -0
- package/dist/types/enum/scheduled-run-failure-code.enum.js.map +1 -1
- package/dist/types/enum/trigger-kind.enum.d.ts +7 -0
- package/dist/types/enum/trigger-kind.enum.js +12 -0
- package/dist/types/enum/trigger-kind.enum.js.map +1 -0
- package/dist/types/interface/api/requests/index.d.ts +2 -0
- package/dist/types/interface/api/requests/index.js +2 -0
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/service-discord-event.request.d.ts +51 -0
- package/dist/types/interface/api/requests/service-discord-event.request.js +3 -0
- package/dist/types/interface/api/requests/service-discord-event.request.js.map +1 -0
- package/dist/types/interface/api/requests/service-discord.request.d.ts +22 -1
- package/dist/types/interface/api/requests/service-insights.request.d.ts +25 -0
- package/dist/types/interface/api/requests/service-insights.request.js +3 -0
- package/dist/types/interface/api/requests/service-insights.request.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +2 -0
- package/dist/types/interface/api/responses/index.js +2 -0
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/service-discord-event.response.d.ts +18 -0
- package/dist/types/interface/api/responses/service-discord-event.response.js +3 -0
- package/dist/types/interface/api/responses/service-discord-event.response.js.map +1 -0
- package/dist/types/interface/api/responses/service-discord.response.d.ts +30 -5
- package/dist/types/interface/api/responses/service-insights.response.d.ts +8 -0
- package/dist/types/interface/api/responses/service-insights.response.js +3 -0
- package/dist/types/interface/api/responses/service-insights.response.js.map +1 -0
- package/dist/types/interface/api/responses/service-version.response.d.ts +9 -1
- package/dist/types/interface/models/index.d.ts +4 -0
- package/dist/types/interface/models/index.js +4 -0
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/reflex-bot-limits.model.d.ts +56 -0
- package/dist/types/interface/models/reflex-bot-limits.model.js +16 -0
- package/dist/types/interface/models/reflex-bot-limits.model.js.map +1 -0
- package/dist/types/interface/models/reflex-discord-event-log.model.d.ts +38 -0
- package/dist/types/interface/models/reflex-discord-event-log.model.js +3 -0
- package/dist/types/interface/models/reflex-discord-event-log.model.js.map +1 -0
- package/dist/types/interface/models/reflex-discord-event.model.d.ts +41 -0
- package/dist/types/interface/models/reflex-discord-event.model.js +23 -0
- package/dist/types/interface/models/reflex-discord-event.model.js.map +1 -0
- package/dist/types/interface/models/reflex-insights.model.d.ts +83 -0
- package/dist/types/interface/models/reflex-insights.model.js +16 -0
- package/dist/types/interface/models/reflex-insights.model.js.map +1 -0
- package/dist/types/interface/models/reflex-run.model.d.ts +2 -0
- package/dist/types/interface/models/reflex-service-version.model.d.ts +2 -0
- package/package.json +1 -1
- package/src/api/function-insights.api.test.ts +27 -0
- package/src/api/function-insights.api.ts +18 -0
- package/src/api/index.ts +17 -14
- package/src/api/service-discord-event.api.test.ts +106 -0
- package/src/api/service-discord-event.api.ts +78 -0
- package/src/api/service-discord.api.test.ts +197 -170
- package/src/api/service-discord.api.ts +241 -203
- package/src/api/service-insights.api.test.ts +36 -0
- package/src/api/service-insights.api.ts +42 -0
- package/src/api/service-task.api.test.ts +140 -140
- package/src/api/service-task.api.ts +141 -141
- package/src/discord/discord-event-filter-cases.ts +261 -0
- package/src/discord/discord-event-filters.test.ts +91 -0
- package/src/discord/discord-event-filters.ts +95 -0
- package/src/discord/discord-event-intents.test.ts +112 -0
- package/src/discord/discord-event-intents.ts +55 -0
- package/src/discord/index.ts +3 -0
- package/src/index.test.ts +75 -50
- package/src/index.ts +46 -0
- package/src/types/enum/bot-event-block-reason.enum.ts +7 -0
- package/src/types/enum/discord-event-drop-reason.enum.ts +13 -0
- package/src/types/enum/discord-event-filter-name.enum.ts +11 -0
- package/src/types/enum/discord-event-status.enum.ts +13 -0
- package/src/types/enum/discord-event-type.enum.ts +7 -0
- package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -9
- package/src/types/enum/index.ts +7 -0
- package/src/types/enum/insights-period.enum.ts +8 -0
- package/src/types/enum/reflex-error-code.enum.ts +43 -39
- package/src/types/enum/schedule-sync-status.enum.ts +6 -6
- package/src/types/enum/scheduled-run-failure-code.enum.ts +2 -0
- package/src/types/enum/scheduled-run-origin.enum.ts +5 -5
- package/src/types/enum/scheduled-run-status.enum.ts +17 -17
- package/src/types/enum/trigger-kind.enum.ts +8 -0
- package/src/types/interface/api/requests/index.ts +15 -13
- package/src/types/interface/api/requests/service-discord-event.request.ts +68 -0
- package/src/types/interface/api/requests/service-discord.request.ts +161 -128
- package/src/types/interface/api/requests/service-insights.request.ts +31 -0
- package/src/types/interface/api/requests/service-task.request.ts +80 -80
- package/src/types/interface/api/responses/index.ts +15 -13
- package/src/types/interface/api/responses/service-discord-event.response.ts +24 -0
- package/src/types/interface/api/responses/service-discord.response.ts +122 -72
- package/src/types/interface/api/responses/service-insights.response.ts +11 -0
- package/src/types/interface/api/responses/service-task.response.ts +57 -57
- package/src/types/interface/api/responses/service-version.response.ts +106 -91
- package/src/types/interface/models/index.ts +19 -15
- package/src/types/interface/models/reflex-bot-limits.model.ts +92 -0
- package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -0
- package/src/types/interface/models/reflex-discord-event.model.ts +77 -0
- package/src/types/interface/models/reflex-insights.model.ts +120 -0
- package/src/types/interface/models/reflex-run.model.ts +183 -179
- package/src/types/interface/models/reflex-service-version.model.ts +61 -58
- package/src/types/interface/models/reflex-task.model.ts +97 -97
|
@@ -1,72 +1,122 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export interface
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
export
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
export
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export type
|
|
67
|
-
|
|
68
|
-
export interface
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
export type
|
|
1
|
+
import type {
|
|
2
|
+
IReflexBotAlerts,
|
|
3
|
+
IReflexBotBlock,
|
|
4
|
+
IReflexBotCredits,
|
|
5
|
+
IReflexBotEventRate,
|
|
6
|
+
IReflexBotMonthlySpendCap,
|
|
7
|
+
IReflexBotRateExcess,
|
|
8
|
+
IReflexDiscordCommand,
|
|
9
|
+
IReflexDiscordComponent,
|
|
10
|
+
IReflexDiscordConnection,
|
|
11
|
+
IReflexDiscordEnvironmentConnection,
|
|
12
|
+
IReflexServiceDeployment,
|
|
13
|
+
} from '../../models';
|
|
14
|
+
import type { IResponse } from '../response';
|
|
15
|
+
|
|
16
|
+
/** What a bot does with Discord events in one environment: its intents, its limits and what stops it. */
|
|
17
|
+
export interface IServiceDiscordEnvironmentEvents {
|
|
18
|
+
/** The intents (Discord bits) the version in service asks for; 0 without event triggers. */
|
|
19
|
+
activeIntents: number;
|
|
20
|
+
/** The privileged intents among them, as Discord intent bits: to switch on in the Discord portal. */
|
|
21
|
+
privilegedIntentsRequested: number[];
|
|
22
|
+
/** Since when Discord refuses the intents (`INTENTS_DISALLOWED`, close code 4014); null otherwise. */
|
|
23
|
+
intentsDisallowedSince: Date | null;
|
|
24
|
+
/**
|
|
25
|
+
* Events per minute, concurrency and the lots of the reserve; null while abyss-main, which holds the plan and the
|
|
26
|
+
* reserve, does not answer (the screen shows them as unknown).
|
|
27
|
+
*/
|
|
28
|
+
rate: IReflexBotEventRate | null;
|
|
29
|
+
/** Minutes above the alert percent, peak and minutes at the cap. */
|
|
30
|
+
rateExcess: IReflexBotRateExcess;
|
|
31
|
+
/** Credits of the month and the overage setting; null while abyss-main does not answer. */
|
|
32
|
+
credits: IReflexBotCredits | null;
|
|
33
|
+
monthlySpendCap: IReflexBotMonthlySpendCap;
|
|
34
|
+
alerts: IReflexBotAlerts;
|
|
35
|
+
/** What stops the events at the Gateway; null when nothing does. */
|
|
36
|
+
block: IReflexBotBlock | null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The connection of one environment, with what concerns the events of the bot. */
|
|
40
|
+
export interface IServiceDiscordEnvironmentConnection extends IReflexDiscordEnvironmentConnection {
|
|
41
|
+
events: IServiceDiscordEnvironmentEvents;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The Vault entry holding the token, and the bot of each environment with its event limits. */
|
|
45
|
+
export interface IServiceDiscordConnection extends Omit<IReflexDiscordConnection, 'environments'> {
|
|
46
|
+
environments: IServiceDiscordEnvironmentConnection[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface IListServiceDiscordCommandData {
|
|
50
|
+
/** By name. */
|
|
51
|
+
commands: IReflexDiscordCommand[];
|
|
52
|
+
}
|
|
53
|
+
export type IListServiceDiscordCommandResponse = IResponse<IListServiceDiscordCommandData>;
|
|
54
|
+
|
|
55
|
+
export interface ICreateServiceDiscordCommandData {
|
|
56
|
+
command: IReflexDiscordCommand;
|
|
57
|
+
}
|
|
58
|
+
export type ICreateServiceDiscordCommandResponse = IResponse<ICreateServiceDiscordCommandData>;
|
|
59
|
+
|
|
60
|
+
export interface IUpdateServiceDiscordCommandData {
|
|
61
|
+
command: IReflexDiscordCommand;
|
|
62
|
+
}
|
|
63
|
+
export type IUpdateServiceDiscordCommandResponse = IResponse<IUpdateServiceDiscordCommandData>;
|
|
64
|
+
|
|
65
|
+
export type IDeleteServiceDiscordCommandData = Record<string, never>;
|
|
66
|
+
export type IDeleteServiceDiscordCommandResponse = IResponse<IDeleteServiceDiscordCommandData>;
|
|
67
|
+
|
|
68
|
+
export interface IListServiceDiscordComponentData {
|
|
69
|
+
/** By prefix. */
|
|
70
|
+
components: IReflexDiscordComponent[];
|
|
71
|
+
}
|
|
72
|
+
export type IListServiceDiscordComponentResponse = IResponse<IListServiceDiscordComponentData>;
|
|
73
|
+
|
|
74
|
+
export interface ICreateServiceDiscordComponentData {
|
|
75
|
+
component: IReflexDiscordComponent;
|
|
76
|
+
}
|
|
77
|
+
export type ICreateServiceDiscordComponentResponse = IResponse<ICreateServiceDiscordComponentData>;
|
|
78
|
+
|
|
79
|
+
export interface IUpdateServiceDiscordComponentData {
|
|
80
|
+
component: IReflexDiscordComponent;
|
|
81
|
+
}
|
|
82
|
+
export type IUpdateServiceDiscordComponentResponse = IResponse<IUpdateServiceDiscordComponentData>;
|
|
83
|
+
|
|
84
|
+
export type IDeleteServiceDiscordComponentData = Record<string, never>;
|
|
85
|
+
export type IDeleteServiceDiscordComponentResponse = IResponse<IDeleteServiceDiscordComponentData>;
|
|
86
|
+
|
|
87
|
+
export interface IGetServiceDiscordConnectionData {
|
|
88
|
+
connection: IServiceDiscordConnection;
|
|
89
|
+
}
|
|
90
|
+
export type IGetServiceDiscordConnectionResponse = IResponse<IGetServiceDiscordConnectionData>;
|
|
91
|
+
|
|
92
|
+
export interface ISetServiceDiscordTokenSecretData {
|
|
93
|
+
connection: IServiceDiscordConnection;
|
|
94
|
+
}
|
|
95
|
+
export type ISetServiceDiscordTokenSecretResponse = IResponse<ISetServiceDiscordTokenSecretData>;
|
|
96
|
+
|
|
97
|
+
export interface ISetServiceDiscordEnvironmentData {
|
|
98
|
+
environment: IServiceDiscordEnvironmentConnection;
|
|
99
|
+
}
|
|
100
|
+
export type ISetServiceDiscordEnvironmentResponse = IResponse<ISetServiceDiscordEnvironmentData>;
|
|
101
|
+
|
|
102
|
+
export interface ICheckServiceDiscordConnectionData {
|
|
103
|
+
environment: IServiceDiscordEnvironmentConnection;
|
|
104
|
+
}
|
|
105
|
+
export type ICheckServiceDiscordConnectionResponse = IResponse<ICheckServiceDiscordConnectionData>;
|
|
106
|
+
|
|
107
|
+
export interface ISetServiceDiscordAllocationData {
|
|
108
|
+
/** The environment row, with the new rate and concurrency. */
|
|
109
|
+
environment: IServiceDiscordEnvironmentConnection;
|
|
110
|
+
}
|
|
111
|
+
export type ISetServiceDiscordAllocationResponse = IResponse<ISetServiceDiscordAllocationData>;
|
|
112
|
+
|
|
113
|
+
export interface ISetServiceDiscordBotSettingsData {
|
|
114
|
+
environment: IServiceDiscordEnvironmentConnection;
|
|
115
|
+
}
|
|
116
|
+
export type ISetServiceDiscordBotSettingsResponse = IResponse<ISetServiceDiscordBotSettingsData>;
|
|
117
|
+
|
|
118
|
+
export interface IRetryServiceDiscordSyncData {
|
|
119
|
+
/** The current deployment of the environment, with the new state of the synchronization. */
|
|
120
|
+
deployment: IReflexServiceDeployment;
|
|
121
|
+
}
|
|
122
|
+
export type IRetryServiceDiscordSyncResponse = IResponse<IRetryServiceDiscordSyncData>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IReflexEventInsights, IReflexInsights } from '../../models';
|
|
2
|
+
import type { IResponse } from '../response';
|
|
3
|
+
|
|
4
|
+
export type IGetServiceInsightsData = IReflexInsights;
|
|
5
|
+
export type IGetServiceInsightsResponse = IResponse<IGetServiceInsightsData>;
|
|
6
|
+
|
|
7
|
+
export type IGetServiceEventInsightsData = IReflexEventInsights;
|
|
8
|
+
export type IGetServiceEventInsightsResponse = IResponse<IGetServiceEventInsightsData>;
|
|
9
|
+
|
|
10
|
+
export type IGetFunctionInsightsData = IReflexInsights;
|
|
11
|
+
export type IGetFunctionInsightsResponse = IResponse<IGetFunctionInsightsData>;
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IReflexDelayedRun,
|
|
3
|
-
IReflexRun,
|
|
4
|
-
IReflexScheduledRun,
|
|
5
|
-
IReflexServiceDeployment,
|
|
6
|
-
IReflexTask,
|
|
7
|
-
} from '../../models';
|
|
8
|
-
import type { IResponse } from '../response';
|
|
9
|
-
|
|
10
|
-
export interface IListServiceTaskData {
|
|
11
|
-
/** By name. */
|
|
12
|
-
tasks: IReflexTask[];
|
|
13
|
-
}
|
|
14
|
-
export type IListServiceTaskResponse = IResponse<IListServiceTaskData>;
|
|
15
|
-
|
|
16
|
-
export interface ICreateServiceTaskData {
|
|
17
|
-
task: IReflexTask;
|
|
18
|
-
}
|
|
19
|
-
export type ICreateServiceTaskResponse = IResponse<ICreateServiceTaskData>;
|
|
20
|
-
|
|
21
|
-
export interface IUpdateServiceTaskData {
|
|
22
|
-
task: IReflexTask;
|
|
23
|
-
}
|
|
24
|
-
export type IUpdateServiceTaskResponse = IResponse<IUpdateServiceTaskData>;
|
|
25
|
-
|
|
26
|
-
export type IDeleteServiceTaskData = Record<string, never>;
|
|
27
|
-
export type IDeleteServiceTaskResponse = IResponse<IDeleteServiceTaskData>;
|
|
28
|
-
|
|
29
|
-
export interface ITestRunServiceTaskData {
|
|
30
|
-
run: IReflexRun;
|
|
31
|
-
}
|
|
32
|
-
export type ITestRunServiceTaskResponse = IResponse<ITestRunServiceTaskData>;
|
|
33
|
-
|
|
34
|
-
export interface IListServiceDelayedRunData {
|
|
35
|
-
/** The first 100 pending delayed runs of the environment, soonest due first. */
|
|
36
|
-
delayedRuns: IReflexDelayedRun[];
|
|
37
|
-
/** Pending delayed runs of the environment, all of them. */
|
|
38
|
-
total: number;
|
|
39
|
-
}
|
|
40
|
-
export type IListServiceDelayedRunResponse = IResponse<IListServiceDelayedRunData>;
|
|
41
|
-
|
|
42
|
-
export type ICancelServiceDelayedRunData = Record<string, never>;
|
|
43
|
-
export type ICancelServiceDelayedRunResponse = IResponse<ICancelServiceDelayedRunData>;
|
|
44
|
-
|
|
45
|
-
export interface IRetryServiceScheduleSyncData {
|
|
46
|
-
/** The current deployment of the environment, with the new state of the synchronization. */
|
|
47
|
-
deployment: IReflexServiceDeployment;
|
|
48
|
-
}
|
|
49
|
-
export type IRetryServiceScheduleSyncResponse = IResponse<IRetryServiceScheduleSyncData>;
|
|
50
|
-
|
|
51
|
-
export interface IListServiceTaskScheduledRunData {
|
|
52
|
-
/** The runs of the task in the environment, every status, newest due first, paged by `limit`/`offset`. */
|
|
53
|
-
scheduledRuns: IReflexScheduledRun[];
|
|
54
|
-
/** Runs of the task in the environment, all of them (kept 7 days after their end). */
|
|
55
|
-
total: number;
|
|
56
|
-
}
|
|
57
|
-
export type IListServiceTaskScheduledRunResponse = IResponse<IListServiceTaskScheduledRunData>;
|
|
1
|
+
import type {
|
|
2
|
+
IReflexDelayedRun,
|
|
3
|
+
IReflexRun,
|
|
4
|
+
IReflexScheduledRun,
|
|
5
|
+
IReflexServiceDeployment,
|
|
6
|
+
IReflexTask,
|
|
7
|
+
} from '../../models';
|
|
8
|
+
import type { IResponse } from '../response';
|
|
9
|
+
|
|
10
|
+
export interface IListServiceTaskData {
|
|
11
|
+
/** By name. */
|
|
12
|
+
tasks: IReflexTask[];
|
|
13
|
+
}
|
|
14
|
+
export type IListServiceTaskResponse = IResponse<IListServiceTaskData>;
|
|
15
|
+
|
|
16
|
+
export interface ICreateServiceTaskData {
|
|
17
|
+
task: IReflexTask;
|
|
18
|
+
}
|
|
19
|
+
export type ICreateServiceTaskResponse = IResponse<ICreateServiceTaskData>;
|
|
20
|
+
|
|
21
|
+
export interface IUpdateServiceTaskData {
|
|
22
|
+
task: IReflexTask;
|
|
23
|
+
}
|
|
24
|
+
export type IUpdateServiceTaskResponse = IResponse<IUpdateServiceTaskData>;
|
|
25
|
+
|
|
26
|
+
export type IDeleteServiceTaskData = Record<string, never>;
|
|
27
|
+
export type IDeleteServiceTaskResponse = IResponse<IDeleteServiceTaskData>;
|
|
28
|
+
|
|
29
|
+
export interface ITestRunServiceTaskData {
|
|
30
|
+
run: IReflexRun;
|
|
31
|
+
}
|
|
32
|
+
export type ITestRunServiceTaskResponse = IResponse<ITestRunServiceTaskData>;
|
|
33
|
+
|
|
34
|
+
export interface IListServiceDelayedRunData {
|
|
35
|
+
/** The first 100 pending delayed runs of the environment, soonest due first. */
|
|
36
|
+
delayedRuns: IReflexDelayedRun[];
|
|
37
|
+
/** Pending delayed runs of the environment, all of them. */
|
|
38
|
+
total: number;
|
|
39
|
+
}
|
|
40
|
+
export type IListServiceDelayedRunResponse = IResponse<IListServiceDelayedRunData>;
|
|
41
|
+
|
|
42
|
+
export type ICancelServiceDelayedRunData = Record<string, never>;
|
|
43
|
+
export type ICancelServiceDelayedRunResponse = IResponse<ICancelServiceDelayedRunData>;
|
|
44
|
+
|
|
45
|
+
export interface IRetryServiceScheduleSyncData {
|
|
46
|
+
/** The current deployment of the environment, with the new state of the synchronization. */
|
|
47
|
+
deployment: IReflexServiceDeployment;
|
|
48
|
+
}
|
|
49
|
+
export type IRetryServiceScheduleSyncResponse = IResponse<IRetryServiceScheduleSyncData>;
|
|
50
|
+
|
|
51
|
+
export interface IListServiceTaskScheduledRunData {
|
|
52
|
+
/** The runs of the task in the environment, every status, newest due first, paged by `limit`/`offset`. */
|
|
53
|
+
scheduledRuns: IReflexScheduledRun[];
|
|
54
|
+
/** Runs of the task in the environment, all of them (kept 7 days after their end). */
|
|
55
|
+
total: number;
|
|
56
|
+
}
|
|
57
|
+
export type IListServiceTaskScheduledRunResponse = IResponse<IListServiceTaskScheduledRunData>;
|
|
@@ -1,91 +1,106 @@
|
|
|
1
|
-
import type { ServiceVersionChangeKind } from '../../../enum';
|
|
2
|
-
import type {
|
|
3
|
-
IReflexDiscordCommandSnapshot,
|
|
4
|
-
IReflexDiscordComponentSnapshot,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
version
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
export interface
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
export
|
|
1
|
+
import type { ServiceVersionChangeKind } from '../../../enum';
|
|
2
|
+
import type {
|
|
3
|
+
IReflexDiscordCommandSnapshot,
|
|
4
|
+
IReflexDiscordComponentSnapshot,
|
|
5
|
+
IReflexDiscordEventSnapshot,
|
|
6
|
+
IReflexServiceVersion,
|
|
7
|
+
IReflexServiceVersionRoute,
|
|
8
|
+
IReflexTaskSnapshot,
|
|
9
|
+
} from '../../models';
|
|
10
|
+
import type { IResponse } from '../response';
|
|
11
|
+
|
|
12
|
+
/** How one route differs from the previous version, matched by route id. */
|
|
13
|
+
export interface IReflexServiceVersionRouteChange {
|
|
14
|
+
routeId: string;
|
|
15
|
+
kind: ServiceVersionChangeKind;
|
|
16
|
+
/** The route in the previous version; null when ADDED. */
|
|
17
|
+
before: IReflexServiceVersionRoute | null;
|
|
18
|
+
/** The route in this version; null when REMOVED. */
|
|
19
|
+
after: IReflexServiceVersionRoute | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** How one command of a Discord bot differs from the previous version, matched by command id. */
|
|
23
|
+
export interface IReflexServiceVersionCommandChange {
|
|
24
|
+
commandId: string;
|
|
25
|
+
kind: ServiceVersionChangeKind;
|
|
26
|
+
/** The command in the previous version; null when ADDED. */
|
|
27
|
+
before: IReflexDiscordCommandSnapshot | null;
|
|
28
|
+
/** The command in this version; null when REMOVED. */
|
|
29
|
+
after: IReflexDiscordCommandSnapshot | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** How one component of a Discord bot differs from the previous version, matched by component id. */
|
|
33
|
+
export interface IReflexServiceVersionComponentChange {
|
|
34
|
+
componentId: string;
|
|
35
|
+
kind: ServiceVersionChangeKind;
|
|
36
|
+
/** The component in the previous version; null when ADDED. */
|
|
37
|
+
before: IReflexDiscordComponentSnapshot | null;
|
|
38
|
+
/** The component in this version; null when REMOVED. */
|
|
39
|
+
after: IReflexDiscordComponentSnapshot | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** How one event trigger of a Discord bot differs from the previous version, matched by trigger id. */
|
|
43
|
+
export interface IReflexServiceVersionEventChange {
|
|
44
|
+
eventId: string;
|
|
45
|
+
kind: ServiceVersionChangeKind;
|
|
46
|
+
/** The trigger in the previous version; null when ADDED. */
|
|
47
|
+
before: IReflexDiscordEventSnapshot | null;
|
|
48
|
+
/** The trigger in this version; null when REMOVED. */
|
|
49
|
+
after: IReflexDiscordEventSnapshot | null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** How one task of the Service differs from the previous version, matched by task id. */
|
|
53
|
+
export interface IReflexServiceVersionTaskChange {
|
|
54
|
+
taskId: string;
|
|
55
|
+
kind: ServiceVersionChangeKind;
|
|
56
|
+
/** The task in the previous version; null when ADDED. */
|
|
57
|
+
before: IReflexTaskSnapshot | null;
|
|
58
|
+
/** The task in this version; null when REMOVED. */
|
|
59
|
+
after: IReflexTaskSnapshot | null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface IListServiceVersionData {
|
|
63
|
+
/** Newest first. */
|
|
64
|
+
versions: IReflexServiceVersion[];
|
|
65
|
+
}
|
|
66
|
+
export type IListServiceVersionResponse = IResponse<IListServiceVersionData>;
|
|
67
|
+
|
|
68
|
+
export interface ICreateServiceVersionData {
|
|
69
|
+
version: IReflexServiceVersion;
|
|
70
|
+
}
|
|
71
|
+
export type ICreateServiceVersionResponse = IResponse<ICreateServiceVersionData>;
|
|
72
|
+
|
|
73
|
+
export interface IGetServiceVersionDraftStatusData {
|
|
74
|
+
/**
|
|
75
|
+
* How many functions of the Service a version created now would freeze at a version other than the one
|
|
76
|
+
* the last Service version froze: a function new to the Service, a draft that differs from its last
|
|
77
|
+
* version (an invalid draft counts), or a function version published since. Same rule as
|
|
78
|
+
* `POST .../version`; 0 for a Service without functions.
|
|
79
|
+
*/
|
|
80
|
+
changedFunctions: number;
|
|
81
|
+
/**
|
|
82
|
+
* How many tasks of the draft differ from the last Service version: added, modified (function, name,
|
|
83
|
+
* cron or time zone) or removed. 0 for a Service without tasks.
|
|
84
|
+
*/
|
|
85
|
+
changedTasks: number;
|
|
86
|
+
/** How many event triggers of the draft differ from the last Service version: added, modified or removed. 0 for a Service that is not a Discord bot. */
|
|
87
|
+
changedEvents: number;
|
|
88
|
+
}
|
|
89
|
+
export type IGetServiceVersionDraftStatusResponse = IResponse<IGetServiceVersionDraftStatusData>;
|
|
90
|
+
|
|
91
|
+
export interface IGetServiceVersionData {
|
|
92
|
+
version: IReflexServiceVersion;
|
|
93
|
+
/** The version just before; null for the first one. */
|
|
94
|
+
previousVersion: IReflexServiceVersion | null;
|
|
95
|
+
/** The routes added, removed or modified since `previousVersion` (every route is ADDED for the first one). */
|
|
96
|
+
routeChanges: IReflexServiceVersionRouteChange[];
|
|
97
|
+
/** The commands added, removed or modified since `previousVersion`; empty for a Service that is not a Discord bot. */
|
|
98
|
+
commandChanges: IReflexServiceVersionCommandChange[];
|
|
99
|
+
/** The components added, removed or modified since `previousVersion`; empty for a Service that is not a Discord bot. */
|
|
100
|
+
componentChanges: IReflexServiceVersionComponentChange[];
|
|
101
|
+
/** The event triggers added, removed or modified since `previousVersion`; empty for a Service that is not a Discord bot. */
|
|
102
|
+
eventChanges: IReflexServiceVersionEventChange[];
|
|
103
|
+
/** The tasks added, removed or modified since `previousVersion` (every task is ADDED for the first one). */
|
|
104
|
+
taskChanges: IReflexServiceVersionTaskChange[];
|
|
105
|
+
}
|
|
106
|
+
export type IGetServiceVersionResponse = IResponse<IGetServiceVersionData>;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
export * from './reflex-definition.model';
|
|
2
|
-
export * from './reflex-function.model';
|
|
3
|
-
export * from './reflex-function-version.model';
|
|
4
|
-
export * from './reflex-access-grant.model';
|
|
5
|
-
export * from './reflex-run.model';
|
|
6
|
-
export * from './reflex-execution-settings.model';
|
|
7
|
-
export * from './reflex-step-stats.model';
|
|
8
|
-
export * from './reflex-price-list.model';
|
|
9
|
-
export * from './reflex-service.model';
|
|
10
|
-
export * from './reflex-route.model';
|
|
11
|
-
export * from './reflex-service-version.model';
|
|
12
|
-
export * from './reflex-service-deployment.model';
|
|
13
|
-
export * from './reflex-service-configuration.model';
|
|
14
|
-
export * from './reflex-discord.model';
|
|
15
|
-
export * from './reflex-task.model';
|
|
1
|
+
export * from './reflex-definition.model';
|
|
2
|
+
export * from './reflex-function.model';
|
|
3
|
+
export * from './reflex-function-version.model';
|
|
4
|
+
export * from './reflex-access-grant.model';
|
|
5
|
+
export * from './reflex-run.model';
|
|
6
|
+
export * from './reflex-execution-settings.model';
|
|
7
|
+
export * from './reflex-step-stats.model';
|
|
8
|
+
export * from './reflex-price-list.model';
|
|
9
|
+
export * from './reflex-service.model';
|
|
10
|
+
export * from './reflex-route.model';
|
|
11
|
+
export * from './reflex-service-version.model';
|
|
12
|
+
export * from './reflex-service-deployment.model';
|
|
13
|
+
export * from './reflex-service-configuration.model';
|
|
14
|
+
export * from './reflex-discord.model';
|
|
15
|
+
export * from './reflex-task.model';
|
|
16
|
+
export * from './reflex-discord-event.model';
|
|
17
|
+
export * from './reflex-bot-limits.model';
|
|
18
|
+
export * from './reflex-insights.model';
|
|
19
|
+
export * from './reflex-discord-event-log.model';
|