@abyss-project/reflex 3.0.0 → 5.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.
- package/dist/api/index.d.ts +2 -1
- package/dist/api/index.js +2 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/service-configuration.api.d.ts +2 -0
- package/dist/api/service-configuration.api.js +7 -0
- package/dist/api/service-configuration.api.js.map +1 -0
- package/dist/api/service-discord.api.d.ts +14 -0
- package/dist/api/service-discord.api.js +38 -0
- package/dist/api/service-discord.api.js.map +1 -0
- package/dist/index.d.ts +25 -6
- package/dist/index.js +25 -6
- package/dist/index.js.map +1 -1
- package/dist/types/enum/configuration-read-as.enum.d.ts +4 -0
- package/dist/types/enum/configuration-read-as.enum.js +9 -0
- package/dist/types/enum/configuration-read-as.enum.js.map +1 -0
- package/dist/types/enum/discord-component-kind.enum.d.ts +4 -0
- package/dist/types/enum/discord-component-kind.enum.js +9 -0
- package/dist/types/enum/discord-component-kind.enum.js.map +1 -0
- package/dist/types/enum/discord-option-type.enum.d.ts +11 -0
- package/dist/types/enum/discord-option-type.enum.js +16 -0
- package/dist/types/enum/discord-option-type.enum.js.map +1 -0
- package/dist/types/enum/discord-sync-status.enum.d.ts +5 -0
- package/dist/types/enum/discord-sync-status.enum.js +10 -0
- package/dist/types/enum/discord-sync-status.enum.js.map +1 -0
- package/dist/types/enum/discord-token-state.enum.d.ts +6 -0
- package/dist/types/enum/discord-token-state.enum.js +11 -0
- package/dist/types/enum/discord-token-state.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +7 -1
- package/dist/types/enum/index.js +7 -1
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/reflex-error-code.enum.d.ts +7 -1
- package/dist/types/enum/reflex-error-code.enum.js +6 -0
- package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
- package/dist/types/enum/service-type.enum.d.ts +2 -1
- package/dist/types/enum/service-type.enum.js +1 -0
- package/dist/types/enum/service-type.enum.js.map +1 -1
- package/dist/types/enum/vault-value-source.enum.d.ts +6 -0
- package/dist/types/enum/vault-value-source.enum.js +11 -0
- package/dist/types/enum/vault-value-source.enum.js.map +1 -0
- package/dist/types/enum/vault-visibility.enum.d.ts +4 -0
- package/dist/types/enum/vault-visibility.enum.js +9 -0
- package/dist/types/enum/vault-visibility.enum.js.map +1 -0
- package/dist/types/interface/api/requests/index.d.ts +2 -1
- package/dist/types/interface/api/requests/index.js +2 -1
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/service-configuration.request.d.ts +4 -0
- package/dist/types/interface/{models/reflex-service-variable.model.js → api/requests/service-configuration.request.js} +1 -1
- package/dist/types/interface/api/requests/service-configuration.request.js.map +1 -0
- package/dist/types/interface/api/requests/service-discord.request.d.ts +94 -0
- package/dist/types/interface/api/requests/{service-variable.request.js → service-discord.request.js} +1 -1
- package/dist/types/interface/api/requests/service-discord.request.js.map +1 -0
- package/dist/types/interface/api/requests/service.request.d.ts +2 -0
- package/dist/types/interface/api/responses/index.d.ts +2 -1
- package/dist/types/interface/api/responses/index.js +2 -1
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/service-configuration.response.d.ts +6 -0
- package/dist/types/interface/api/responses/service-configuration.response.js +3 -0
- package/dist/types/interface/api/responses/service-configuration.response.js.map +1 -0
- package/dist/types/interface/api/responses/service-discord.response.d.ts +50 -0
- package/dist/types/interface/api/responses/{service-variable.response.js → service-discord.response.js} +1 -1
- package/dist/types/interface/api/responses/service-discord.response.js.map +1 -0
- package/dist/types/interface/api/responses/service-version.response.d.ts +15 -1
- package/dist/types/interface/models/index.d.ts +2 -1
- package/dist/types/interface/models/index.js +2 -1
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/reflex-discord.model.d.ts +69 -0
- package/dist/types/interface/models/reflex-discord.model.js +13 -0
- package/dist/types/interface/models/reflex-discord.model.js.map +1 -0
- package/dist/types/interface/models/reflex-run.model.d.ts +3 -0
- package/dist/types/interface/models/reflex-service-configuration.model.d.ts +9 -0
- package/dist/types/interface/models/reflex-service-configuration.model.js +3 -0
- package/dist/types/interface/models/reflex-service-configuration.model.js.map +1 -0
- package/dist/types/interface/models/reflex-service-deployment.model.d.ts +5 -1
- package/dist/types/interface/models/reflex-service-version.model.d.ts +6 -0
- package/dist/types/interface/models/reflex-service.model.d.ts +1 -2
- package/dist/types/interface/models/reflex-service.model.js +0 -2
- package/dist/types/interface/models/reflex-service.model.js.map +1 -1
- package/package.json +1 -1
- package/src/api/function-run.api.ts +38 -38
- package/src/api/function-version.api.ts +48 -48
- package/src/api/function.api.test.ts +249 -249
- package/src/api/index.ts +13 -12
- package/src/api/service-configuration.api.ts +16 -0
- package/src/api/service-deployment.api.ts +79 -79
- package/src/api/service-discord.api.test.ts +170 -0
- package/src/api/service-discord.api.ts +203 -0
- package/src/api/service-route.api.ts +72 -72
- package/src/api/service-version.api.ts +39 -39
- package/src/api/service.api.test.ts +209 -234
- package/src/api/service.api.ts +55 -55
- package/src/index.ts +50 -11
- package/src/types/enum/configuration-read-as.enum.ts +5 -0
- package/src/types/enum/discord-component-kind.enum.ts +7 -0
- package/src/types/enum/discord-option-type.enum.ts +12 -0
- package/src/types/enum/discord-sync-status.enum.ts +6 -0
- package/src/types/enum/discord-token-state.enum.ts +11 -0
- package/src/types/enum/execution-mode.enum.ts +9 -9
- package/src/types/enum/index.ts +25 -19
- package/src/types/enum/reflex-error-code.enum.ts +37 -25
- package/src/types/enum/route-method.enum.ts +9 -9
- package/src/types/enum/service-deployment-action.enum.ts +11 -11
- package/src/types/enum/service-deployment-status.enum.ts +5 -5
- package/src/types/enum/service-type.enum.ts +9 -7
- package/src/types/enum/service-version-change-kind.enum.ts +6 -6
- package/src/types/enum/trigger-access-mode.enum.ts +12 -12
- package/src/types/enum/vault-value-source.enum.ts +12 -0
- package/src/types/enum/vault-visibility.enum.ts +5 -0
- package/src/types/interface/api/requests/function-run.request.ts +26 -26
- package/src/types/interface/api/requests/function-version.request.ts +20 -20
- package/src/types/interface/api/requests/function.request.ts +36 -36
- package/src/types/interface/api/requests/index.ts +12 -11
- package/src/types/interface/api/requests/service-configuration.request.ts +4 -0
- package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
- package/src/types/interface/api/requests/service-discord.request.ts +118 -0
- package/src/types/interface/api/requests/service-route.request.ts +44 -44
- package/src/types/interface/api/requests/service-version.request.ts +19 -19
- package/src/types/interface/api/requests/service.request.ts +46 -39
- package/src/types/interface/api/responses/function-version.response.ts +31 -31
- package/src/types/interface/api/responses/index.ts +12 -11
- package/src/types/interface/api/responses/service-configuration.response.ts +8 -0
- package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
- package/src/types/interface/api/responses/service-discord.response.ts +72 -0
- package/src/types/interface/api/responses/service-route.response.ts +31 -31
- package/src/types/interface/api/responses/service-version.response.ts +30 -1
- package/src/types/interface/api/responses/service.response.ts +31 -31
- package/src/types/interface/models/index.ts +14 -13
- package/src/types/interface/models/reflex-discord.model.ts +117 -0
- package/src/types/interface/models/reflex-function.model.ts +16 -16
- package/src/types/interface/models/reflex-route.model.ts +19 -19
- package/src/types/interface/models/reflex-run.model.ts +10 -1
- package/src/types/interface/models/reflex-service-configuration.model.ts +22 -0
- package/src/types/interface/models/reflex-service-deployment.model.ts +40 -29
- package/src/types/interface/models/reflex-service-version.model.ts +55 -43
- package/src/types/interface/models/reflex-service.model.ts +45 -46
- package/dist/api/service-variable.api.d.ts +0 -5
- package/dist/api/service-variable.api.js +0 -16
- package/dist/api/service-variable.api.js.map +0 -1
- package/dist/types/enum/secret-source.enum.d.ts +0 -5
- package/dist/types/enum/secret-source.enum.js +0 -10
- package/dist/types/enum/secret-source.enum.js.map +0 -1
- package/dist/types/interface/api/requests/service-variable.request.d.ts +0 -23
- package/dist/types/interface/api/requests/service-variable.request.js.map +0 -1
- package/dist/types/interface/api/responses/service-variable.response.d.ts +0 -22
- package/dist/types/interface/api/responses/service-variable.response.js.map +0 -1
- package/dist/types/interface/models/reflex-service-variable.model.d.ts +0 -10
- package/dist/types/interface/models/reflex-service-variable.model.js.map +0 -1
- package/src/api/service-variable.api.ts +0 -58
- package/src/types/enum/secret-source.enum.ts +0 -9
- package/src/types/interface/api/requests/service-variable.request.ts +0 -29
- package/src/types/interface/api/responses/service-variable.response.ts +0 -31
- package/src/types/interface/models/reflex-service-variable.model.ts +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-discord.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/service-discord.request.ts"],"names":[],"mappings":""}
|
|
@@ -8,4 +8,5 @@ export * from './service.response';
|
|
|
8
8
|
export * from './service-route.response';
|
|
9
9
|
export * from './service-version.response';
|
|
10
10
|
export * from './service-deployment.response';
|
|
11
|
-
export * from './service-
|
|
11
|
+
export * from './service-configuration.response';
|
|
12
|
+
export * from './service-discord.response';
|
|
@@ -24,5 +24,6 @@ __exportStar(require("./service.response"), exports);
|
|
|
24
24
|
__exportStar(require("./service-route.response"), exports);
|
|
25
25
|
__exportStar(require("./service-version.response"), exports);
|
|
26
26
|
__exportStar(require("./service-deployment.response"), exports);
|
|
27
|
-
__exportStar(require("./service-
|
|
27
|
+
__exportStar(require("./service-configuration.response"), exports);
|
|
28
|
+
__exportStar(require("./service-discord.response"), exports);
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,6DAA2C;AAC3C,2DAAyC;AACzC,8DAA4C;AAC5C,0DAAwC;AACxC,+DAA6C;AAC7C,qDAAmC;AACnC,2DAAyC;AACzC,6DAA2C;AAC3C,gEAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,6DAA2C;AAC3C,2DAAyC;AACzC,8DAA4C;AAC5C,0DAAwC;AACxC,+DAA6C;AAC7C,qDAAmC;AACnC,2DAAyC;AACzC,6DAA2C;AAC3C,gEAA8C;AAC9C,mEAAiD;AACjD,6DAA2C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IReflexServiceConfigurationEntry } from '../../models';
|
|
2
|
+
import type { IResponse } from '../response';
|
|
3
|
+
export interface IListServiceConfigurationData {
|
|
4
|
+
configuration: IReflexServiceConfigurationEntry[];
|
|
5
|
+
}
|
|
6
|
+
export type IListServiceConfigurationResponse = IResponse<IListServiceConfigurationData>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-configuration.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/service-configuration.response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { IReflexDiscordCommand, IReflexDiscordComponent, IReflexDiscordConnection, IReflexDiscordEnvironmentConnection, IReflexServiceDeployment } from '../../models';
|
|
2
|
+
import type { IResponse } from '../response';
|
|
3
|
+
export interface IListServiceDiscordCommandData {
|
|
4
|
+
commands: IReflexDiscordCommand[];
|
|
5
|
+
}
|
|
6
|
+
export type IListServiceDiscordCommandResponse = IResponse<IListServiceDiscordCommandData>;
|
|
7
|
+
export interface ICreateServiceDiscordCommandData {
|
|
8
|
+
command: IReflexDiscordCommand;
|
|
9
|
+
}
|
|
10
|
+
export type ICreateServiceDiscordCommandResponse = IResponse<ICreateServiceDiscordCommandData>;
|
|
11
|
+
export interface IUpdateServiceDiscordCommandData {
|
|
12
|
+
command: IReflexDiscordCommand;
|
|
13
|
+
}
|
|
14
|
+
export type IUpdateServiceDiscordCommandResponse = IResponse<IUpdateServiceDiscordCommandData>;
|
|
15
|
+
export type IDeleteServiceDiscordCommandData = Record<string, never>;
|
|
16
|
+
export type IDeleteServiceDiscordCommandResponse = IResponse<IDeleteServiceDiscordCommandData>;
|
|
17
|
+
export interface IListServiceDiscordComponentData {
|
|
18
|
+
components: IReflexDiscordComponent[];
|
|
19
|
+
}
|
|
20
|
+
export type IListServiceDiscordComponentResponse = IResponse<IListServiceDiscordComponentData>;
|
|
21
|
+
export interface ICreateServiceDiscordComponentData {
|
|
22
|
+
component: IReflexDiscordComponent;
|
|
23
|
+
}
|
|
24
|
+
export type ICreateServiceDiscordComponentResponse = IResponse<ICreateServiceDiscordComponentData>;
|
|
25
|
+
export interface IUpdateServiceDiscordComponentData {
|
|
26
|
+
component: IReflexDiscordComponent;
|
|
27
|
+
}
|
|
28
|
+
export type IUpdateServiceDiscordComponentResponse = IResponse<IUpdateServiceDiscordComponentData>;
|
|
29
|
+
export type IDeleteServiceDiscordComponentData = Record<string, never>;
|
|
30
|
+
export type IDeleteServiceDiscordComponentResponse = IResponse<IDeleteServiceDiscordComponentData>;
|
|
31
|
+
export interface IGetServiceDiscordConnectionData {
|
|
32
|
+
connection: IReflexDiscordConnection;
|
|
33
|
+
}
|
|
34
|
+
export type IGetServiceDiscordConnectionResponse = IResponse<IGetServiceDiscordConnectionData>;
|
|
35
|
+
export interface ISetServiceDiscordTokenSecretData {
|
|
36
|
+
connection: IReflexDiscordConnection;
|
|
37
|
+
}
|
|
38
|
+
export type ISetServiceDiscordTokenSecretResponse = IResponse<ISetServiceDiscordTokenSecretData>;
|
|
39
|
+
export interface ISetServiceDiscordEnvironmentData {
|
|
40
|
+
environment: IReflexDiscordEnvironmentConnection;
|
|
41
|
+
}
|
|
42
|
+
export type ISetServiceDiscordEnvironmentResponse = IResponse<ISetServiceDiscordEnvironmentData>;
|
|
43
|
+
export interface ICheckServiceDiscordConnectionData {
|
|
44
|
+
environment: IReflexDiscordEnvironmentConnection;
|
|
45
|
+
}
|
|
46
|
+
export type ICheckServiceDiscordConnectionResponse = IResponse<ICheckServiceDiscordConnectionData>;
|
|
47
|
+
export interface IRetryServiceDiscordSyncData {
|
|
48
|
+
deployment: IReflexServiceDeployment;
|
|
49
|
+
}
|
|
50
|
+
export type IRetryServiceDiscordSyncResponse = IResponse<IRetryServiceDiscordSyncData>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-discord.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/service-discord.response.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ServiceVersionChangeKind } from '../../../enum';
|
|
2
|
-
import type { IReflexServiceVersion, IReflexServiceVersionRoute } from '../../models';
|
|
2
|
+
import type { IReflexDiscordCommandSnapshot, IReflexDiscordComponentSnapshot, IReflexServiceVersion, IReflexServiceVersionRoute } from '../../models';
|
|
3
3
|
import type { IResponse } from '../response';
|
|
4
4
|
export interface IReflexServiceVersionRouteChange {
|
|
5
5
|
routeId: string;
|
|
@@ -7,6 +7,18 @@ export interface IReflexServiceVersionRouteChange {
|
|
|
7
7
|
before: IReflexServiceVersionRoute | null;
|
|
8
8
|
after: IReflexServiceVersionRoute | null;
|
|
9
9
|
}
|
|
10
|
+
export interface IReflexServiceVersionCommandChange {
|
|
11
|
+
commandId: string;
|
|
12
|
+
kind: ServiceVersionChangeKind;
|
|
13
|
+
before: IReflexDiscordCommandSnapshot | null;
|
|
14
|
+
after: IReflexDiscordCommandSnapshot | null;
|
|
15
|
+
}
|
|
16
|
+
export interface IReflexServiceVersionComponentChange {
|
|
17
|
+
componentId: string;
|
|
18
|
+
kind: ServiceVersionChangeKind;
|
|
19
|
+
before: IReflexDiscordComponentSnapshot | null;
|
|
20
|
+
after: IReflexDiscordComponentSnapshot | null;
|
|
21
|
+
}
|
|
10
22
|
export interface IListServiceVersionData {
|
|
11
23
|
versions: IReflexServiceVersion[];
|
|
12
24
|
}
|
|
@@ -19,5 +31,7 @@ export interface IGetServiceVersionData {
|
|
|
19
31
|
version: IReflexServiceVersion;
|
|
20
32
|
previousVersion: IReflexServiceVersion | null;
|
|
21
33
|
routeChanges: IReflexServiceVersionRouteChange[];
|
|
34
|
+
commandChanges: IReflexServiceVersionCommandChange[];
|
|
35
|
+
componentChanges: IReflexServiceVersionComponentChange[];
|
|
22
36
|
}
|
|
23
37
|
export type IGetServiceVersionResponse = IResponse<IGetServiceVersionData>;
|
|
@@ -10,4 +10,5 @@ export * from './reflex-service.model';
|
|
|
10
10
|
export * from './reflex-route.model';
|
|
11
11
|
export * from './reflex-service-version.model';
|
|
12
12
|
export * from './reflex-service-deployment.model';
|
|
13
|
-
export * from './reflex-service-
|
|
13
|
+
export * from './reflex-service-configuration.model';
|
|
14
|
+
export * from './reflex-discord.model';
|
|
@@ -26,5 +26,6 @@ __exportStar(require("./reflex-service.model"), exports);
|
|
|
26
26
|
__exportStar(require("./reflex-route.model"), exports);
|
|
27
27
|
__exportStar(require("./reflex-service-version.model"), exports);
|
|
28
28
|
__exportStar(require("./reflex-service-deployment.model"), exports);
|
|
29
|
-
__exportStar(require("./reflex-service-
|
|
29
|
+
__exportStar(require("./reflex-service-configuration.model"), exports);
|
|
30
|
+
__exportStar(require("./reflex-discord.model"), exports);
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,0DAAwC;AACxC,kEAAgD;AAChD,8DAA4C;AAC5C,qDAAmC;AACnC,oEAAkD;AAClD,4DAA0C;AAC1C,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,iEAA+C;AAC/C,oEAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,0DAAwC;AACxC,kEAAgD;AAChD,8DAA4C;AAC5C,qDAAmC;AACnC,oEAAkD;AAClD,4DAA0C;AAC1C,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,iEAA+C;AAC/C,oEAAkD;AAClD,uEAAqD;AACrD,yDAAuC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { DiscordComponentKind, DiscordOptionType, DiscordTokenState } from '../../enum';
|
|
2
|
+
export declare const REFLEX_DISCORD_LIMITS: {
|
|
3
|
+
readonly commandNamePattern: RegExp;
|
|
4
|
+
readonly commandDescriptionMaxLength: 100;
|
|
5
|
+
readonly commandsPerServiceMax: 100;
|
|
6
|
+
readonly optionsPerCommandMax: 25;
|
|
7
|
+
readonly choicesPerOptionMax: 25;
|
|
8
|
+
readonly componentPrefixPattern: RegExp;
|
|
9
|
+
readonly syncErrorMaxLength: 500;
|
|
10
|
+
};
|
|
11
|
+
export interface IReflexDiscordOptionChoice {
|
|
12
|
+
name: string;
|
|
13
|
+
value: string | number;
|
|
14
|
+
}
|
|
15
|
+
export interface IReflexDiscordCommandOption {
|
|
16
|
+
type: DiscordOptionType;
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
required: boolean;
|
|
20
|
+
choices?: IReflexDiscordOptionChoice[];
|
|
21
|
+
}
|
|
22
|
+
export interface IReflexDiscordCommand {
|
|
23
|
+
id: string;
|
|
24
|
+
serviceId: string;
|
|
25
|
+
functionId: string;
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
options: IReflexDiscordCommandOption[];
|
|
29
|
+
defaultMemberPermissions: string | null;
|
|
30
|
+
allowedInDirectMessages: boolean;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
33
|
+
}
|
|
34
|
+
export interface IReflexDiscordComponent {
|
|
35
|
+
id: string;
|
|
36
|
+
serviceId: string;
|
|
37
|
+
functionId: string;
|
|
38
|
+
customIdPrefix: string;
|
|
39
|
+
kind: DiscordComponentKind;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
42
|
+
}
|
|
43
|
+
export type IReflexDiscordCommandSnapshot = Pick<IReflexDiscordCommand, 'id' | 'functionId' | 'name' | 'description' | 'options' | 'defaultMemberPermissions' | 'allowedInDirectMessages'>;
|
|
44
|
+
export type IReflexDiscordComponentSnapshot = Pick<IReflexDiscordComponent, 'id' | 'functionId' | 'customIdPrefix' | 'kind'>;
|
|
45
|
+
export interface IReflexDiscordEnvironmentSettings {
|
|
46
|
+
id: string;
|
|
47
|
+
serviceId: string;
|
|
48
|
+
environmentId: string;
|
|
49
|
+
testGuildId: string | null;
|
|
50
|
+
invitePermissions: string;
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
updatedAt: Date;
|
|
53
|
+
}
|
|
54
|
+
export interface IReflexDiscordEnvironmentConnection {
|
|
55
|
+
environmentId: string;
|
|
56
|
+
applicationId: string | null;
|
|
57
|
+
publicKey: string | null;
|
|
58
|
+
botName: string | null;
|
|
59
|
+
botAvatarUrl: string | null;
|
|
60
|
+
tokenState: DiscordTokenState;
|
|
61
|
+
testGuildId: string | null;
|
|
62
|
+
invitePermissions: string;
|
|
63
|
+
interactionsUrl: string;
|
|
64
|
+
inviteUrl: string | null;
|
|
65
|
+
}
|
|
66
|
+
export interface IReflexDiscordConnection {
|
|
67
|
+
discordTokenSecretId: string | null;
|
|
68
|
+
environments: IReflexDiscordEnvironmentConnection[];
|
|
69
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REFLEX_DISCORD_LIMITS = void 0;
|
|
4
|
+
exports.REFLEX_DISCORD_LIMITS = {
|
|
5
|
+
commandNamePattern: /^[-_a-z0-9]{1,32}$/,
|
|
6
|
+
commandDescriptionMaxLength: 100,
|
|
7
|
+
commandsPerServiceMax: 100,
|
|
8
|
+
optionsPerCommandMax: 25,
|
|
9
|
+
choicesPerOptionMax: 25,
|
|
10
|
+
componentPrefixPattern: /^[a-z0-9_-]{1,40}$/,
|
|
11
|
+
syncErrorMaxLength: 500,
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=reflex-discord.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflex-discord.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/reflex-discord.model.ts"],"names":[],"mappings":";;;AAGa,QAAA,qBAAqB,GAAG;IAEnC,kBAAkB,EAAE,oBAAoB;IACxC,2BAA2B,EAAE,GAAG;IAChC,qBAAqB,EAAE,GAAG;IAC1B,oBAAoB,EAAE,EAAE;IACxB,mBAAmB,EAAE,EAAE;IAEvB,sBAAsB,EAAE,oBAAoB;IAC5C,kBAAkB,EAAE,GAAG;CACf,CAAC"}
|
|
@@ -39,6 +39,9 @@ export interface IReflexRun {
|
|
|
39
39
|
durationMs: number;
|
|
40
40
|
trace: IReflexRunTrace | null;
|
|
41
41
|
routeId: string | null;
|
|
42
|
+
commandId: string | null;
|
|
43
|
+
componentId: string | null;
|
|
44
|
+
originLabel: string | null;
|
|
42
45
|
httpStatus: number | null;
|
|
43
46
|
errorCode: string | null;
|
|
44
47
|
executionMode: ExecutionMode | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ConfigurationReadAs, VaultValueSource, VaultVisibility } from '../../enum';
|
|
2
|
+
export interface IReflexServiceConfigurationEntry {
|
|
3
|
+
key: string;
|
|
4
|
+
readAs: ConfigurationReadAs;
|
|
5
|
+
secretId: string | null;
|
|
6
|
+
visibility: VaultVisibility | null;
|
|
7
|
+
mismatch: boolean;
|
|
8
|
+
sources: Record<string, VaultValueSource>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflex-service-configuration.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/reflex-service-configuration.model.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServiceDeploymentAction, ServiceDeploymentStatus } from '../../enum';
|
|
1
|
+
import type { DiscordSyncStatus, ServiceDeploymentAction, ServiceDeploymentStatus } from '../../enum';
|
|
2
2
|
import type { IReflexAccessDeclaration } from './reflex-definition.model';
|
|
3
3
|
export interface IReflexServiceDeploymentGrant {
|
|
4
4
|
functionId: string;
|
|
@@ -14,6 +14,10 @@ export interface IReflexServiceDeployment {
|
|
|
14
14
|
action: ServiceDeploymentAction;
|
|
15
15
|
status: ServiceDeploymentStatus;
|
|
16
16
|
grants: IReflexServiceDeploymentGrant[];
|
|
17
|
+
discordSync: DiscordSyncStatus | null;
|
|
18
|
+
discordSyncError: string | null;
|
|
19
|
+
discordSyncedAt: Date | null;
|
|
20
|
+
pausedForQuota: boolean;
|
|
17
21
|
isCurrent: boolean;
|
|
18
22
|
byUserId: string;
|
|
19
23
|
at: Date;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RouteMethod, TriggerAccessMode } from '../../enum';
|
|
2
|
+
import type { IReflexDiscordCommandSnapshot, IReflexDiscordComponentSnapshot } from './reflex-discord.model';
|
|
2
3
|
import type { IReflexServiceCors } from './reflex-service.model';
|
|
3
4
|
export interface IReflexServiceVersionRoute {
|
|
4
5
|
routeId: string;
|
|
@@ -12,11 +13,16 @@ export interface IReflexServiceVersionFunction {
|
|
|
12
13
|
functionVersionId: string;
|
|
13
14
|
functionVersionNumber: number;
|
|
14
15
|
}
|
|
16
|
+
export interface IReflexServiceVersionDiscord {
|
|
17
|
+
commands: IReflexDiscordCommandSnapshot[];
|
|
18
|
+
components: IReflexDiscordComponentSnapshot[];
|
|
19
|
+
}
|
|
15
20
|
export interface IReflexServiceVersionSnapshot {
|
|
16
21
|
routes: IReflexServiceVersionRoute[];
|
|
17
22
|
functions: IReflexServiceVersionFunction[];
|
|
18
23
|
cors: IReflexServiceCors;
|
|
19
24
|
rateLimitPerIpPerMinute: number;
|
|
25
|
+
discord?: IReflexServiceVersionDiscord;
|
|
20
26
|
}
|
|
21
27
|
export interface IReflexServiceVersion {
|
|
22
28
|
id: string;
|
|
@@ -11,8 +11,6 @@ export declare const REFLEX_SERVICE_LIMITS: {
|
|
|
11
11
|
readonly routePathMaxSegments: 20;
|
|
12
12
|
readonly routePathMaxLength: 255;
|
|
13
13
|
readonly versionMessageMaxLength: 500;
|
|
14
|
-
readonly variableNamePattern: RegExp;
|
|
15
|
-
readonly variableValueMaxLength: 4096;
|
|
16
14
|
};
|
|
17
15
|
export interface IReflexServiceCors {
|
|
18
16
|
allowedOrigins: string[];
|
|
@@ -24,6 +22,7 @@ export interface IReflexService {
|
|
|
24
22
|
name: string;
|
|
25
23
|
slug: string;
|
|
26
24
|
type: ServiceType;
|
|
25
|
+
discordTokenSecretId: string | null;
|
|
27
26
|
cors: IReflexServiceCors;
|
|
28
27
|
rateLimitPerIpPerMinute: number;
|
|
29
28
|
createdByUserId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflex-service.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/reflex-service.model.ts"],"names":[],"mappings":";;;AAGa,QAAA,qBAAqB,GAAG;IAEnC,WAAW,EAAE,2BAA2B;IACxC,aAAa,EAAE,GAAG;IAClB,qBAAqB,EAAE,EAAE;IACzB,uBAAuB,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAE3D,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,GAAG;IACvB,uBAAuB,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"reflex-service.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/reflex-service.model.ts"],"names":[],"mappings":";;;AAGa,QAAA,qBAAqB,GAAG;IAEnC,WAAW,EAAE,2BAA2B;IACxC,aAAa,EAAE,GAAG;IAClB,qBAAqB,EAAE,EAAE;IACzB,uBAAuB,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAE3D,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,GAAG;IACvB,uBAAuB,EAAE,GAAG;CACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { AbyssReflexCore } from '..';
|
|
2
|
-
import type {
|
|
3
|
-
IGetFunctionRunParams,
|
|
4
|
-
IGetFunctionRunResponse,
|
|
5
|
-
IGetFunctionRunStateParams,
|
|
6
|
-
IGetFunctionRunStateResponse,
|
|
7
|
-
IListFunctionRunParams,
|
|
8
|
-
IListFunctionRunQuery,
|
|
9
|
-
IListFunctionRunResponse,
|
|
10
|
-
} from '../types';
|
|
11
|
-
|
|
12
|
-
const runUrl = (params: { applicationId: string; functionId: string }): string =>
|
|
13
|
-
`api/function/${params.applicationId}/${params.functionId}/run`;
|
|
14
|
-
|
|
15
|
-
/** `GET .../run`: the test runs (kept: the last 10, then 7 days) and the live executions of the edge (7 days), merged, newest first, paged by `limit`/`offset`. Needs REFLEX_LOG_READ. */
|
|
16
|
-
export const listFunctionRun = async (
|
|
17
|
-
params: IListFunctionRunParams,
|
|
18
|
-
query: IListFunctionRunQuery = {},
|
|
19
|
-
): Promise<IListFunctionRunResponse> =>
|
|
20
|
-
(await AbyssReflexCore.axios.get<IListFunctionRunResponse>(runUrl(params), { params: query }))
|
|
21
|
-
.data;
|
|
22
|
-
|
|
23
|
-
/** `GET .../run/:runId`: one run; a live one with its measures and its steps. Needs REFLEX_LOG_READ. */
|
|
24
|
-
export const getFunctionRun = async (
|
|
25
|
-
params: IGetFunctionRunParams,
|
|
26
|
-
): Promise<IGetFunctionRunResponse> =>
|
|
27
|
-
(await AbyssReflexCore.axios.get<IGetFunctionRunResponse>(`${runUrl(params)}/${params.runId}`))
|
|
28
|
-
.data;
|
|
29
|
-
|
|
30
|
-
/** `GET .../run/:runId/state`: the state of a live execution, the one an async route answered with. Needs REFLEX_LOG_READ. */
|
|
31
|
-
export const getFunctionRunState = async (
|
|
32
|
-
params: IGetFunctionRunStateParams,
|
|
33
|
-
): Promise<IGetFunctionRunStateResponse> =>
|
|
34
|
-
(
|
|
35
|
-
await AbyssReflexCore.axios.get<IGetFunctionRunStateResponse>(
|
|
36
|
-
`${runUrl(params)}/${params.runId}/state`,
|
|
37
|
-
)
|
|
38
|
-
).data;
|
|
1
|
+
import { AbyssReflexCore } from '..';
|
|
2
|
+
import type {
|
|
3
|
+
IGetFunctionRunParams,
|
|
4
|
+
IGetFunctionRunResponse,
|
|
5
|
+
IGetFunctionRunStateParams,
|
|
6
|
+
IGetFunctionRunStateResponse,
|
|
7
|
+
IListFunctionRunParams,
|
|
8
|
+
IListFunctionRunQuery,
|
|
9
|
+
IListFunctionRunResponse,
|
|
10
|
+
} from '../types';
|
|
11
|
+
|
|
12
|
+
const runUrl = (params: { applicationId: string; functionId: string }): string =>
|
|
13
|
+
`api/function/${params.applicationId}/${params.functionId}/run`;
|
|
14
|
+
|
|
15
|
+
/** `GET .../run`: the test runs (kept: the last 10, then 7 days) and the live executions of the edge (7 days), merged, newest first, paged by `limit`/`offset`. Needs REFLEX_LOG_READ. */
|
|
16
|
+
export const listFunctionRun = async (
|
|
17
|
+
params: IListFunctionRunParams,
|
|
18
|
+
query: IListFunctionRunQuery = {},
|
|
19
|
+
): Promise<IListFunctionRunResponse> =>
|
|
20
|
+
(await AbyssReflexCore.axios.get<IListFunctionRunResponse>(runUrl(params), { params: query }))
|
|
21
|
+
.data;
|
|
22
|
+
|
|
23
|
+
/** `GET .../run/:runId`: one run; a live one with its measures and its steps. Needs REFLEX_LOG_READ. */
|
|
24
|
+
export const getFunctionRun = async (
|
|
25
|
+
params: IGetFunctionRunParams,
|
|
26
|
+
): Promise<IGetFunctionRunResponse> =>
|
|
27
|
+
(await AbyssReflexCore.axios.get<IGetFunctionRunResponse>(`${runUrl(params)}/${params.runId}`))
|
|
28
|
+
.data;
|
|
29
|
+
|
|
30
|
+
/** `GET .../run/:runId/state`: the state of a live execution, the one an async route answered with. Needs REFLEX_LOG_READ. */
|
|
31
|
+
export const getFunctionRunState = async (
|
|
32
|
+
params: IGetFunctionRunStateParams,
|
|
33
|
+
): Promise<IGetFunctionRunStateResponse> =>
|
|
34
|
+
(
|
|
35
|
+
await AbyssReflexCore.axios.get<IGetFunctionRunStateResponse>(
|
|
36
|
+
`${runUrl(params)}/${params.runId}/state`,
|
|
37
|
+
)
|
|
38
|
+
).data;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { AbyssReflexCore } from '..';
|
|
2
|
-
import type {
|
|
3
|
-
IGetFunctionVersionParams,
|
|
4
|
-
IGetFunctionVersionResponse,
|
|
5
|
-
IGetFunctionVersionStepStatsParams,
|
|
6
|
-
IGetFunctionVersionStepStatsQuery,
|
|
7
|
-
IGetFunctionVersionStepStatsResponse,
|
|
8
|
-
IListFunctionVersionParams,
|
|
9
|
-
IListFunctionVersionResponse,
|
|
10
|
-
} from '../types';
|
|
11
|
-
|
|
12
|
-
const versionUrl = (params: { applicationId: string; functionId: string }): string =>
|
|
13
|
-
`api/function/${params.applicationId}/${params.functionId}/version`;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* `GET .../version`: the frozen versions, newest first. Needs REFLEX_READ. A version of the function's
|
|
17
|
-
* Service publishes its draft when it changed (`service.version.create`).
|
|
18
|
-
*/
|
|
19
|
-
export const listFunctionVersion = async (
|
|
20
|
-
params: IListFunctionVersionParams,
|
|
21
|
-
): Promise<IListFunctionVersionResponse> =>
|
|
22
|
-
(await AbyssReflexCore.axios.get<IListFunctionVersionResponse>(versionUrl(params))).data;
|
|
23
|
-
|
|
24
|
-
/** `GET .../version/:versionId`. Needs REFLEX_READ. */
|
|
25
|
-
export const getFunctionVersion = async (
|
|
26
|
-
params: IGetFunctionVersionParams,
|
|
27
|
-
): Promise<IGetFunctionVersionResponse> =>
|
|
28
|
-
(
|
|
29
|
-
await AbyssReflexCore.axios.get<IGetFunctionVersionResponse>(
|
|
30
|
-
`${versionUrl(params)}/${params.versionId}`,
|
|
31
|
-
)
|
|
32
|
-
).data;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* `GET .../version/:versionId/step-stats`: per step, over the retention window, the executions, the median
|
|
36
|
-
* and p95 of duration, CPU, heap peak and cost, and the share of the cost; interrupted executions left
|
|
37
|
-
* out. With `environmentId`, also the p99 heap peak per step of the version running there. Needs REFLEX_LOG_READ.
|
|
38
|
-
*/
|
|
39
|
-
export const getFunctionVersionStepStats = async (
|
|
40
|
-
params: IGetFunctionVersionStepStatsParams,
|
|
41
|
-
query: IGetFunctionVersionStepStatsQuery = {},
|
|
42
|
-
): Promise<IGetFunctionVersionStepStatsResponse> =>
|
|
43
|
-
(
|
|
44
|
-
await AbyssReflexCore.axios.get<IGetFunctionVersionStepStatsResponse>(
|
|
45
|
-
`${versionUrl(params)}/${params.versionId}/step-stats`,
|
|
46
|
-
{ params: query },
|
|
47
|
-
)
|
|
48
|
-
).data;
|
|
1
|
+
import { AbyssReflexCore } from '..';
|
|
2
|
+
import type {
|
|
3
|
+
IGetFunctionVersionParams,
|
|
4
|
+
IGetFunctionVersionResponse,
|
|
5
|
+
IGetFunctionVersionStepStatsParams,
|
|
6
|
+
IGetFunctionVersionStepStatsQuery,
|
|
7
|
+
IGetFunctionVersionStepStatsResponse,
|
|
8
|
+
IListFunctionVersionParams,
|
|
9
|
+
IListFunctionVersionResponse,
|
|
10
|
+
} from '../types';
|
|
11
|
+
|
|
12
|
+
const versionUrl = (params: { applicationId: string; functionId: string }): string =>
|
|
13
|
+
`api/function/${params.applicationId}/${params.functionId}/version`;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* `GET .../version`: the frozen versions, newest first. Needs REFLEX_READ. A version of the function's
|
|
17
|
+
* Service publishes its draft when it changed (`service.version.create`).
|
|
18
|
+
*/
|
|
19
|
+
export const listFunctionVersion = async (
|
|
20
|
+
params: IListFunctionVersionParams,
|
|
21
|
+
): Promise<IListFunctionVersionResponse> =>
|
|
22
|
+
(await AbyssReflexCore.axios.get<IListFunctionVersionResponse>(versionUrl(params))).data;
|
|
23
|
+
|
|
24
|
+
/** `GET .../version/:versionId`. Needs REFLEX_READ. */
|
|
25
|
+
export const getFunctionVersion = async (
|
|
26
|
+
params: IGetFunctionVersionParams,
|
|
27
|
+
): Promise<IGetFunctionVersionResponse> =>
|
|
28
|
+
(
|
|
29
|
+
await AbyssReflexCore.axios.get<IGetFunctionVersionResponse>(
|
|
30
|
+
`${versionUrl(params)}/${params.versionId}`,
|
|
31
|
+
)
|
|
32
|
+
).data;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* `GET .../version/:versionId/step-stats`: per step, over the retention window, the executions, the median
|
|
36
|
+
* and p95 of duration, CPU, heap peak and cost, and the share of the cost; interrupted executions left
|
|
37
|
+
* out. With `environmentId`, also the p99 heap peak per step of the version running there. Needs REFLEX_LOG_READ.
|
|
38
|
+
*/
|
|
39
|
+
export const getFunctionVersionStepStats = async (
|
|
40
|
+
params: IGetFunctionVersionStepStatsParams,
|
|
41
|
+
query: IGetFunctionVersionStepStatsQuery = {},
|
|
42
|
+
): Promise<IGetFunctionVersionStepStatsResponse> =>
|
|
43
|
+
(
|
|
44
|
+
await AbyssReflexCore.axios.get<IGetFunctionVersionStepStatsResponse>(
|
|
45
|
+
`${versionUrl(params)}/${params.versionId}/step-stats`,
|
|
46
|
+
{ params: query },
|
|
47
|
+
)
|
|
48
|
+
).data;
|