@abyss-project/reflex 5.6.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/enum/discord-channel-type.enum.d.ts +7 -0
- package/dist/types/enum/discord-channel-type.enum.js +12 -0
- package/dist/types/enum/discord-channel-type.enum.js.map +1 -0
- package/dist/types/enum/discord-host-action.enum.d.ts +31 -0
- package/dist/types/enum/discord-host-action.enum.js +36 -0
- package/dist/types/enum/discord-host-action.enum.js.map +1 -0
- package/dist/types/enum/discord-locale.enum.d.ts +34 -0
- package/dist/types/enum/discord-locale.enum.js +39 -0
- package/dist/types/enum/discord-locale.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +3 -0
- package/dist/types/enum/index.js +3 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/interface/api/requests/service-discord.request.d.ts +7 -1
- package/dist/types/interface/models/reflex-discord-event.model.d.ts +1 -1
- package/dist/types/interface/models/reflex-discord-event.model.js +1 -1
- package/dist/types/interface/models/reflex-discord-event.model.js.map +1 -1
- package/dist/types/interface/models/reflex-discord.model.d.ts +20 -2
- package/dist/types/interface/models/reflex-discord.model.js +2 -0
- package/dist/types/interface/models/reflex-discord.model.js.map +1 -1
- package/package.json +1 -1
- package/src/api/function-insights.api.test.ts +27 -27
- package/src/api/function-insights.api.ts +18 -18
- package/src/api/index.ts +17 -17
- package/src/api/service-discord-event.api.test.ts +106 -106
- package/src/api/service-discord-event.api.ts +78 -78
- package/src/api/service-discord.api.test.ts +197 -197
- package/src/api/service-discord.api.ts +241 -241
- package/src/api/service-insights.api.test.ts +36 -36
- package/src/api/service-insights.api.ts +42 -42
- package/src/discord/discord-event-filter-cases.ts +261 -261
- package/src/discord/discord-event-filters.test.ts +91 -91
- package/src/discord/discord-event-filters.ts +95 -95
- package/src/discord/discord-event-intents.test.ts +112 -112
- package/src/discord/discord-event-intents.ts +55 -55
- package/src/discord/index.ts +3 -3
- package/src/index.test.ts +75 -75
- package/src/index.ts +317 -317
- package/src/types/enum/bot-event-block-reason.enum.ts +7 -7
- package/src/types/enum/discord-channel-type.enum.ts +11 -0
- package/src/types/enum/discord-event-drop-reason.enum.ts +13 -13
- package/src/types/enum/discord-event-filter-name.enum.ts +11 -11
- package/src/types/enum/discord-event-status.enum.ts +13 -13
- package/src/types/enum/discord-event-type.enum.ts +7 -7
- package/src/types/enum/discord-gateway-failure-code.enum.ts +11 -11
- package/src/types/enum/discord-host-action.enum.ts +35 -0
- package/src/types/enum/discord-locale.enum.ts +35 -0
- package/src/types/enum/index.ts +43 -40
- package/src/types/enum/insights-period.enum.ts +8 -8
- package/src/types/enum/reflex-error-code.enum.ts +43 -43
- package/src/types/enum/scheduled-run-failure-code.enum.ts +12 -12
- package/src/types/enum/trigger-kind.enum.ts +8 -8
- package/src/types/interface/api/requests/index.ts +15 -15
- package/src/types/interface/api/requests/service-discord-event.request.ts +68 -68
- package/src/types/interface/api/requests/service-discord.request.ts +173 -161
- package/src/types/interface/api/requests/service-insights.request.ts +31 -31
- package/src/types/interface/api/responses/index.ts +15 -15
- package/src/types/interface/api/responses/service-discord-event.response.ts +24 -24
- package/src/types/interface/api/responses/service-discord.response.ts +122 -122
- package/src/types/interface/api/responses/service-insights.response.ts +11 -11
- package/src/types/interface/api/responses/service-version.response.ts +106 -106
- package/src/types/interface/models/index.ts +19 -19
- package/src/types/interface/models/reflex-bot-limits.model.ts +92 -92
- package/src/types/interface/models/reflex-discord-event-log.model.ts +58 -58
- package/src/types/interface/models/reflex-discord-event.model.ts +79 -77
- package/src/types/interface/models/reflex-discord.model.ts +45 -4
- package/src/types/interface/models/reflex-insights.model.ts +120 -120
- package/src/types/interface/models/reflex-run.model.ts +186 -183
- package/src/types/interface/models/reflex-service-version.model.ts +61 -61
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import type { RouteMethod, TriggerAccessMode } from '../../enum';
|
|
2
|
-
import type {
|
|
3
|
-
IReflexDiscordCommandSnapshot,
|
|
4
|
-
IReflexDiscordComponentSnapshot,
|
|
5
|
-
} from './reflex-discord.model';
|
|
6
|
-
import type { IReflexDiscordEventSnapshot } from './reflex-discord-event.model';
|
|
7
|
-
import type { IReflexServiceCors } from './reflex-service.model';
|
|
8
|
-
import type { IReflexTaskSnapshot } from './reflex-task.model';
|
|
9
|
-
|
|
10
|
-
/** A route as a version of the Service froze it. */
|
|
11
|
-
export interface IReflexServiceVersionRoute {
|
|
12
|
-
routeId: string;
|
|
13
|
-
method: RouteMethod;
|
|
14
|
-
path: string;
|
|
15
|
-
functionId: string;
|
|
16
|
-
accessMode: TriggerAccessMode;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/** The version of a member function a version of the Service runs. */
|
|
20
|
-
export interface IReflexServiceVersionFunction {
|
|
21
|
-
functionId: string;
|
|
22
|
-
functionVersionId: string;
|
|
23
|
-
functionVersionNumber: number;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** What a version of a Discord bot freezes: its commands and components, identifiers included. */
|
|
27
|
-
export interface IReflexServiceVersionDiscord {
|
|
28
|
-
commands: IReflexDiscordCommandSnapshot[];
|
|
29
|
-
components: IReflexDiscordComponentSnapshot[];
|
|
30
|
-
/** The event triggers; absent when the bot has none, so the hash of other versions is unchanged. */
|
|
31
|
-
events?: IReflexDiscordEventSnapshot[];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* What a version of the Service freezes. Routes sorted by path then method, functions by id: the same
|
|
36
|
-
* Service always gives the same snapshot, and the same `hash`.
|
|
37
|
-
*/
|
|
38
|
-
export interface IReflexServiceVersionSnapshot {
|
|
39
|
-
routes: IReflexServiceVersionRoute[];
|
|
40
|
-
functions: IReflexServiceVersionFunction[];
|
|
41
|
-
cors: IReflexServiceCors;
|
|
42
|
-
rateLimitPerIpPerMinute: number;
|
|
43
|
-
/** Only a `DISCORD_BOT` Service has it (its `routes` are then empty); absent otherwise, so the hash of other versions is unchanged. */
|
|
44
|
-
discord?: IReflexServiceVersionDiscord;
|
|
45
|
-
/** The tasks of the Service, by name; absent when it has none, so the hash of other versions is unchanged. */
|
|
46
|
-
tasks?: IReflexTaskSnapshot[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface IReflexServiceVersion {
|
|
50
|
-
id: string;
|
|
51
|
-
serviceId: string;
|
|
52
|
-
/** 1, 2, 3...: counted per Service. */
|
|
53
|
-
number: number;
|
|
54
|
-
/** 500 characters at most. */
|
|
55
|
-
message: string | null;
|
|
56
|
-
snapshot: IReflexServiceVersionSnapshot;
|
|
57
|
-
/** SHA-256 of the snapshot as canonical JSON (keys sorted), lowercase hex. */
|
|
58
|
-
hash: string;
|
|
59
|
-
publishedByUserId: string;
|
|
60
|
-
publishedAt: Date;
|
|
61
|
-
}
|
|
1
|
+
import type { RouteMethod, TriggerAccessMode } from '../../enum';
|
|
2
|
+
import type {
|
|
3
|
+
IReflexDiscordCommandSnapshot,
|
|
4
|
+
IReflexDiscordComponentSnapshot,
|
|
5
|
+
} from './reflex-discord.model';
|
|
6
|
+
import type { IReflexDiscordEventSnapshot } from './reflex-discord-event.model';
|
|
7
|
+
import type { IReflexServiceCors } from './reflex-service.model';
|
|
8
|
+
import type { IReflexTaskSnapshot } from './reflex-task.model';
|
|
9
|
+
|
|
10
|
+
/** A route as a version of the Service froze it. */
|
|
11
|
+
export interface IReflexServiceVersionRoute {
|
|
12
|
+
routeId: string;
|
|
13
|
+
method: RouteMethod;
|
|
14
|
+
path: string;
|
|
15
|
+
functionId: string;
|
|
16
|
+
accessMode: TriggerAccessMode;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** The version of a member function a version of the Service runs. */
|
|
20
|
+
export interface IReflexServiceVersionFunction {
|
|
21
|
+
functionId: string;
|
|
22
|
+
functionVersionId: string;
|
|
23
|
+
functionVersionNumber: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** What a version of a Discord bot freezes: its commands and components, identifiers included. */
|
|
27
|
+
export interface IReflexServiceVersionDiscord {
|
|
28
|
+
commands: IReflexDiscordCommandSnapshot[];
|
|
29
|
+
components: IReflexDiscordComponentSnapshot[];
|
|
30
|
+
/** The event triggers; absent when the bot has none, so the hash of other versions is unchanged. */
|
|
31
|
+
events?: IReflexDiscordEventSnapshot[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* What a version of the Service freezes. Routes sorted by path then method, functions by id: the same
|
|
36
|
+
* Service always gives the same snapshot, and the same `hash`.
|
|
37
|
+
*/
|
|
38
|
+
export interface IReflexServiceVersionSnapshot {
|
|
39
|
+
routes: IReflexServiceVersionRoute[];
|
|
40
|
+
functions: IReflexServiceVersionFunction[];
|
|
41
|
+
cors: IReflexServiceCors;
|
|
42
|
+
rateLimitPerIpPerMinute: number;
|
|
43
|
+
/** Only a `DISCORD_BOT` Service has it (its `routes` are then empty); absent otherwise, so the hash of other versions is unchanged. */
|
|
44
|
+
discord?: IReflexServiceVersionDiscord;
|
|
45
|
+
/** The tasks of the Service, by name; absent when it has none, so the hash of other versions is unchanged. */
|
|
46
|
+
tasks?: IReflexTaskSnapshot[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface IReflexServiceVersion {
|
|
50
|
+
id: string;
|
|
51
|
+
serviceId: string;
|
|
52
|
+
/** 1, 2, 3...: counted per Service. */
|
|
53
|
+
number: number;
|
|
54
|
+
/** 500 characters at most. */
|
|
55
|
+
message: string | null;
|
|
56
|
+
snapshot: IReflexServiceVersionSnapshot;
|
|
57
|
+
/** SHA-256 of the snapshot as canonical JSON (keys sorted), lowercase hex. */
|
|
58
|
+
hash: string;
|
|
59
|
+
publishedByUserId: string;
|
|
60
|
+
publishedAt: Date;
|
|
61
|
+
}
|