@abyss-project/reflex 6.3.0 → 6.4.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/.eslintrc.js +32 -32
- package/README.md +15 -15
- package/dist/api/function-run.api.d.ts +2 -1
- package/dist/api/function-run.api.js +3 -1
- package/dist/api/function-run.api.js.map +1 -1
- package/dist/api/function-settings.api.d.ts +3 -1
- package/dist/api/function-settings.api.js +7 -1
- package/dist/api/function-settings.api.js.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/storage-surplus.admin.api.d.ts +5 -0
- package/dist/api/storage-surplus.admin.api.js +17 -0
- package/dist/api/storage-surplus.admin.api.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/types/enum/reflex-error-code.enum.d.ts +4 -1
- package/dist/types/enum/reflex-error-code.enum.js +3 -0
- package/dist/types/enum/reflex-error-code.enum.js.map +1 -1
- package/dist/types/interface/api/requests/application-run-settings.request.d.ts +1 -0
- package/dist/types/interface/api/requests/function-run.request.d.ts +8 -0
- package/dist/types/interface/api/requests/function-settings.request.d.ts +12 -0
- package/dist/types/interface/api/requests/index.d.ts +1 -0
- package/dist/types/interface/api/requests/index.js +1 -0
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/service.request.d.ts +1 -0
- package/dist/types/interface/api/requests/storage-surplus.admin.request.d.ts +8 -0
- package/dist/types/interface/api/requests/storage-surplus.admin.request.js +3 -0
- package/dist/types/interface/api/requests/storage-surplus.admin.request.js.map +1 -0
- package/dist/types/interface/api/responses/function-run.response.d.ts +4 -0
- package/dist/types/interface/api/responses/function-settings.response.d.ts +5 -1
- package/dist/types/interface/api/responses/index.d.ts +1 -0
- package/dist/types/interface/api/responses/index.js +1 -0
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/storage-surplus.admin.response.d.ts +8 -0
- package/dist/types/interface/api/responses/storage-surplus.admin.response.js +3 -0
- package/dist/types/interface/api/responses/storage-surplus.admin.response.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +2 -0
- package/dist/types/interface/models/index.js +2 -0
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/reflex-run-retention.model.d.ts +13 -0
- package/dist/types/interface/models/reflex-run-retention.model.js +8 -0
- package/dist/types/interface/models/reflex-run-retention.model.js.map +1 -0
- package/dist/types/interface/models/reflex-run-settings.model.d.ts +4 -0
- package/dist/types/interface/models/reflex-run.model.d.ts +5 -0
- package/dist/types/interface/models/reflex-service-deployment.model.d.ts +2 -2
- package/dist/types/interface/models/reflex-service.model.d.ts +1 -0
- package/dist/types/interface/models/reflex-storage-surplus.model.d.ts +11 -0
- package/dist/types/interface/models/reflex-storage-surplus.model.js +3 -0
- package/dist/types/interface/models/reflex-storage-surplus.model.js.map +1 -0
- package/jest.config.ts +11 -11
- package/package.json +1 -1
- package/src/api/alert-rule.api.test.ts +72 -72
- package/src/api/alert-rule.api.ts +57 -57
- package/src/api/application-insights.api.test.ts +42 -42
- package/src/api/application-insights.api.ts +38 -38
- package/src/api/application-run-settings.api.test.ts +11 -0
- package/src/api/application-run-settings.api.ts +30 -30
- package/src/api/function-access.api.ts +87 -87
- package/src/api/function-insights.api.test.ts +27 -27
- package/src/api/function-insights.api.ts +18 -18
- package/src/api/function-run.api.ts +15 -0
- package/src/api/function-settings.api.ts +22 -0
- package/src/api/function-template.api.test.ts +72 -72
- package/src/api/function-template.api.ts +52 -52
- package/src/api/function-test.api.ts +34 -34
- package/src/api/function-version.api.ts +66 -66
- package/src/api/function.api.test.ts +55 -0
- package/src/api/function.api.ts +62 -62
- package/src/api/health.api.ts +10 -10
- package/src/api/index.ts +27 -26
- package/src/api/route-stats.api.test.ts +45 -45
- package/src/api/route-stats.api.ts +36 -36
- package/src/api/service-completion-webhook.api.test.ts +97 -97
- package/src/api/service-completion-webhook.api.ts +39 -39
- package/src/api/service-configuration.api.ts +16 -16
- package/src/api/service-consumer.api.test.ts +104 -104
- package/src/api/service-consumer.api.ts +90 -90
- package/src/api/service-deployment.api.ts +79 -79
- 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 +178 -178
- package/src/api/service-discord.api.ts +222 -222
- package/src/api/service-insights.api.test.ts +36 -36
- package/src/api/service-insights.api.ts +42 -42
- package/src/api/service-limits.api.test.ts +100 -100
- package/src/api/service-limits.api.ts +37 -37
- package/src/api/service-openapi.api.test.ts +52 -52
- package/src/api/service-openapi.api.ts +21 -21
- package/src/api/service-route.api.ts +74 -74
- package/src/api/service-task.api.test.ts +140 -140
- package/src/api/service-task.api.ts +141 -141
- package/src/api/service-version.api.ts +54 -54
- package/src/api/service.api.test.ts +6 -1
- package/src/api/service.api.ts +55 -55
- package/src/api/storage-surplus.admin.api.test.ts +66 -0
- package/src/api/storage-surplus.admin.api.ts +45 -0
- 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 +104 -104
- package/src/index.ts +42 -0
- package/src/insights/index.ts +1 -1
- package/src/insights/percentiles.test.ts +75 -75
- package/src/insights/percentiles.ts +37 -37
- package/src/types/enum/discord-host-action.enum.ts +37 -37
- package/src/types/enum/reflex-error-code.enum.ts +16 -0
- package/src/types/interface/api/requests/application-run-settings.request.ts +2 -0
- package/src/types/interface/api/requests/function-run.request.ts +10 -0
- package/src/types/interface/api/requests/function-settings.request.ts +16 -0
- package/src/types/interface/api/requests/index.ts +1 -0
- package/src/types/interface/api/requests/service-discord.request.ts +155 -155
- package/src/types/interface/api/requests/service.request.ts +2 -0
- package/src/types/interface/api/requests/storage-surplus.admin.request.ts +12 -0
- package/src/types/interface/api/responses/function-run.response.ts +5 -0
- package/src/types/interface/api/responses/function-settings.response.ts +7 -0
- package/src/types/interface/api/responses/index.ts +1 -0
- package/src/types/interface/api/responses/storage-surplus.admin.response.ts +10 -0
- package/src/types/interface/models/index.ts +2 -0
- package/src/types/interface/models/reflex-discord.model.ts +208 -208
- package/src/types/interface/models/reflex-price-list.model.ts +22 -22
- package/src/types/interface/models/reflex-run-retention.model.ts +24 -0
- package/src/types/interface/models/reflex-run-settings.model.ts +11 -0
- package/src/types/interface/models/reflex-run.model.ts +10 -0
- package/src/types/interface/models/reflex-service-deployment.model.ts +4 -2
- package/src/types/interface/models/reflex-service.model.ts +2 -0
- package/src/types/interface/models/reflex-storage-surplus.model.ts +23 -0
- package/tsconfig.check.json +15 -15
- package/tsconfig.json +35 -35
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import type { IReflexDurationPercentile } from '../types';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Reads a percentile on a duration histogram: the upper bound of the bucket holding the `q` quantile (the
|
|
5
|
-
* smallest bucket whose cumulative count reaches `ceil(q * total)`). The histogram has one bucket per bound plus
|
|
6
|
-
* an open one; a percentile in the open bucket answers the last bound with `open` true. Null when the histogram
|
|
7
|
-
* holds no run: the denominator is its own sum, never the number of runs.
|
|
8
|
-
*/
|
|
9
|
-
export const percentileOfHistogram = (
|
|
10
|
-
histogram: readonly number[],
|
|
11
|
-
bounds: readonly number[],
|
|
12
|
-
q: number,
|
|
13
|
-
): IReflexDurationPercentile | null => {
|
|
14
|
-
if (bounds.length === 0 || histogram.length !== bounds.length + 1) {
|
|
15
|
-
throw new Error(
|
|
16
|
-
`A histogram needs one bucket per bound plus an open one: got ${histogram.length} buckets for ${bounds.length} bounds`,
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
if (!(q > 0 && q <= 1)) {
|
|
20
|
-
throw new Error(`A quantile is in ]0, 1]: got ${q}`);
|
|
21
|
-
}
|
|
22
|
-
const total = histogram.reduce((sum, count) => sum + count, 0);
|
|
23
|
-
if (total === 0) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const rank = Math.max(1, Math.ceil(q * total));
|
|
27
|
-
let cumulative = 0;
|
|
28
|
-
for (let index = 0; index < histogram.length; index += 1) {
|
|
29
|
-
cumulative += histogram[index];
|
|
30
|
-
if (cumulative >= rank) {
|
|
31
|
-
return index < bounds.length
|
|
32
|
-
? { upperBoundMs: bounds[index], open: false }
|
|
33
|
-
: { upperBoundMs: bounds[bounds.length - 1], open: true };
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return { upperBoundMs: bounds[bounds.length - 1], open: true };
|
|
37
|
-
};
|
|
1
|
+
import type { IReflexDurationPercentile } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reads a percentile on a duration histogram: the upper bound of the bucket holding the `q` quantile (the
|
|
5
|
+
* smallest bucket whose cumulative count reaches `ceil(q * total)`). The histogram has one bucket per bound plus
|
|
6
|
+
* an open one; a percentile in the open bucket answers the last bound with `open` true. Null when the histogram
|
|
7
|
+
* holds no run: the denominator is its own sum, never the number of runs.
|
|
8
|
+
*/
|
|
9
|
+
export const percentileOfHistogram = (
|
|
10
|
+
histogram: readonly number[],
|
|
11
|
+
bounds: readonly number[],
|
|
12
|
+
q: number,
|
|
13
|
+
): IReflexDurationPercentile | null => {
|
|
14
|
+
if (bounds.length === 0 || histogram.length !== bounds.length + 1) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
`A histogram needs one bucket per bound plus an open one: got ${histogram.length} buckets for ${bounds.length} bounds`,
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
if (!(q > 0 && q <= 1)) {
|
|
20
|
+
throw new Error(`A quantile is in ]0, 1]: got ${q}`);
|
|
21
|
+
}
|
|
22
|
+
const total = histogram.reduce((sum, count) => sum + count, 0);
|
|
23
|
+
if (total === 0) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const rank = Math.max(1, Math.ceil(q * total));
|
|
27
|
+
let cumulative = 0;
|
|
28
|
+
for (let index = 0; index < histogram.length; index += 1) {
|
|
29
|
+
cumulative += histogram[index];
|
|
30
|
+
if (cumulative >= rank) {
|
|
31
|
+
return index < bounds.length
|
|
32
|
+
? { upperBoundMs: bounds[index], open: false }
|
|
33
|
+
: { upperBoundMs: bounds[bounds.length - 1], open: true };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return { upperBoundMs: bounds[bounds.length - 1], open: true };
|
|
37
|
+
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `discord.*` actions a function of a Discord bot Service can declare in its accesses. Same values
|
|
3
|
-
* as the runtime's `DiscordCapability`, which a parity test keeps equal: the Access screen lists them all.
|
|
4
|
-
*/
|
|
5
|
-
export enum DiscordHostAction {
|
|
6
|
-
REPLY = 'discord.reply',
|
|
7
|
-
UPDATE = 'discord.update',
|
|
8
|
-
SHOW_MODAL = 'discord.showModal',
|
|
9
|
-
FOLLOW_UP = 'discord.followUp',
|
|
10
|
-
SEND_MESSAGE = 'discord.sendMessage',
|
|
11
|
-
EDIT_MESSAGE = 'discord.editMessage',
|
|
12
|
-
DELETE_MESSAGE = 'discord.deleteMessage',
|
|
13
|
-
ADD_ROLE = 'discord.addRole',
|
|
14
|
-
REMOVE_ROLE = 'discord.removeRole',
|
|
15
|
-
SEND_DIRECT_MESSAGE = 'discord.sendDirectMessage',
|
|
16
|
-
GET_MEMBER = 'discord.getMember',
|
|
17
|
-
GET_GUILD_ROLES = 'discord.getGuildRoles',
|
|
18
|
-
GET_CHANNEL = 'discord.getChannel',
|
|
19
|
-
GET_GUILD = 'discord.getGuild',
|
|
20
|
-
KICK_MEMBER = 'discord.kickMember',
|
|
21
|
-
BAN_MEMBER = 'discord.banMember',
|
|
22
|
-
UNBAN_MEMBER = 'discord.unbanMember',
|
|
23
|
-
TIMEOUT_MEMBER = 'discord.timeoutMember',
|
|
24
|
-
BULK_DELETE_MESSAGES = 'discord.bulkDeleteMessages',
|
|
25
|
-
ADD_REACTION = 'discord.addReaction',
|
|
26
|
-
REMOVE_REACTION = 'discord.removeReaction',
|
|
27
|
-
CREATE_CHANNEL = 'discord.createChannel',
|
|
28
|
-
DELETE_CHANNEL = 'discord.deleteChannel',
|
|
29
|
-
SET_CHANNEL_PERMISSION = 'discord.setChannelPermission',
|
|
30
|
-
REMOVE_CHANNEL_PERMISSION = 'discord.removeChannelPermission',
|
|
31
|
-
CREATE_ROLE = 'discord.createRole',
|
|
32
|
-
DELETE_ROLE = 'discord.deleteRole',
|
|
33
|
-
CREATE_THREAD = 'discord.createThread',
|
|
34
|
-
END_POLL = 'discord.endPoll',
|
|
35
|
-
AUTOCOMPLETE = 'discord.autocomplete',
|
|
36
|
-
READ_ATTACHMENT = 'discord.readAttachment',
|
|
37
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* The `discord.*` actions a function of a Discord bot Service can declare in its accesses. Same values
|
|
3
|
+
* as the runtime's `DiscordCapability`, which a parity test keeps equal: the Access screen lists them all.
|
|
4
|
+
*/
|
|
5
|
+
export enum DiscordHostAction {
|
|
6
|
+
REPLY = 'discord.reply',
|
|
7
|
+
UPDATE = 'discord.update',
|
|
8
|
+
SHOW_MODAL = 'discord.showModal',
|
|
9
|
+
FOLLOW_UP = 'discord.followUp',
|
|
10
|
+
SEND_MESSAGE = 'discord.sendMessage',
|
|
11
|
+
EDIT_MESSAGE = 'discord.editMessage',
|
|
12
|
+
DELETE_MESSAGE = 'discord.deleteMessage',
|
|
13
|
+
ADD_ROLE = 'discord.addRole',
|
|
14
|
+
REMOVE_ROLE = 'discord.removeRole',
|
|
15
|
+
SEND_DIRECT_MESSAGE = 'discord.sendDirectMessage',
|
|
16
|
+
GET_MEMBER = 'discord.getMember',
|
|
17
|
+
GET_GUILD_ROLES = 'discord.getGuildRoles',
|
|
18
|
+
GET_CHANNEL = 'discord.getChannel',
|
|
19
|
+
GET_GUILD = 'discord.getGuild',
|
|
20
|
+
KICK_MEMBER = 'discord.kickMember',
|
|
21
|
+
BAN_MEMBER = 'discord.banMember',
|
|
22
|
+
UNBAN_MEMBER = 'discord.unbanMember',
|
|
23
|
+
TIMEOUT_MEMBER = 'discord.timeoutMember',
|
|
24
|
+
BULK_DELETE_MESSAGES = 'discord.bulkDeleteMessages',
|
|
25
|
+
ADD_REACTION = 'discord.addReaction',
|
|
26
|
+
REMOVE_REACTION = 'discord.removeReaction',
|
|
27
|
+
CREATE_CHANNEL = 'discord.createChannel',
|
|
28
|
+
DELETE_CHANNEL = 'discord.deleteChannel',
|
|
29
|
+
SET_CHANNEL_PERMISSION = 'discord.setChannelPermission',
|
|
30
|
+
REMOVE_CHANNEL_PERMISSION = 'discord.removeChannelPermission',
|
|
31
|
+
CREATE_ROLE = 'discord.createRole',
|
|
32
|
+
DELETE_ROLE = 'discord.deleteRole',
|
|
33
|
+
CREATE_THREAD = 'discord.createThread',
|
|
34
|
+
END_POLL = 'discord.endPoll',
|
|
35
|
+
AUTOCOMPLETE = 'discord.autocomplete',
|
|
36
|
+
READ_ATTACHMENT = 'discord.readAttachment',
|
|
37
|
+
}
|
|
@@ -70,4 +70,20 @@ export enum ReflexErrorCode {
|
|
|
70
70
|
* to one or does not resolve.
|
|
71
71
|
*/
|
|
72
72
|
COMPLETION_WEBHOOK_URL_REFUSED = 'COMPLETION_WEBHOOK_URL_REFUSED',
|
|
73
|
+
/**
|
|
74
|
+
* 503: the run detail is in the customer's archive and the archive cannot be read now (Storage unreachable, key
|
|
75
|
+
* unavailable, object failing its check). The run itself is untouched; asking again later may succeed.
|
|
76
|
+
*/
|
|
77
|
+
ARCHIVE_UNAVAILABLE = 'ARCHIVE_UNAVAILABLE',
|
|
78
|
+
/**
|
|
79
|
+
* 404: the detail of the run was in the customer's archive and the archive was deleted (day 90 of the storage
|
|
80
|
+
* surplus). The run's row stays; its detail, steps and log lines are gone for good.
|
|
81
|
+
*/
|
|
82
|
+
ARCHIVE_DELETED = 'ARCHIVE_DELETED',
|
|
83
|
+
/**
|
|
84
|
+
* 409: the version cannot be published because the AbyssReflex storage of the organization is full: its online quota
|
|
85
|
+
* is reached, or the personal threshold of AbyssReflex is, with "Block deposits" on. Nothing was published; the
|
|
86
|
+
* versions that exist and the executions go on. Delete versions, or raise the quota or the threshold.
|
|
87
|
+
*/
|
|
88
|
+
STORAGE_PUBLISH_REFUSED = 'STORAGE_PUBLISH_REFUSED',
|
|
73
89
|
}
|
|
@@ -8,4 +8,6 @@ export interface ISetApplicationRunSettingsParams {
|
|
|
8
8
|
export interface ISetApplicationRunSettingsBody {
|
|
9
9
|
/** Cap of log lines per run, 1 to 10 000; null for no cap. */
|
|
10
10
|
maxLogLinesPerRun: number | null;
|
|
11
|
+
/** The retention tier of the runs, one of `REFLEX_RUN_RETENTION_TIER_DAYS`; null to follow the plan. Left alone when absent. */
|
|
12
|
+
runRetentionDays?: number | null;
|
|
11
13
|
}
|
|
@@ -30,3 +30,13 @@ export interface IGetFunctionRunStateParams {
|
|
|
30
30
|
/** The `executionId` an async route answered with: the id of the live run. */
|
|
31
31
|
runId: string;
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
export interface ISetFunctionRunFavoriteParams {
|
|
35
|
+
applicationId: string;
|
|
36
|
+
functionId: string;
|
|
37
|
+
runId: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ISetFunctionRunFavoriteBody {
|
|
40
|
+
/** A favorite run is never purged. */
|
|
41
|
+
isFavorite: boolean;
|
|
42
|
+
}
|
|
@@ -32,3 +32,19 @@ export interface ISetFunctionLogCapParams {
|
|
|
32
32
|
}
|
|
33
33
|
/** `lines` is required, 1 to 10 000, when `mode` is LIMIT, and forbidden otherwise. */
|
|
34
34
|
export type ISetFunctionLogCapBody = IReflexFunctionLogCap;
|
|
35
|
+
|
|
36
|
+
export interface IGetFunctionRunRetentionParams {
|
|
37
|
+
applicationId: string;
|
|
38
|
+
functionId: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ISetFunctionRunRetentionParams {
|
|
42
|
+
applicationId: string;
|
|
43
|
+
functionId: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ISetFunctionRunRetentionBody {
|
|
46
|
+
/** One of `REFLEX_RUN_RETENTION_TIER_DAYS`; null to follow the application. Left alone when absent. */
|
|
47
|
+
runRetentionDays?: number | null;
|
|
48
|
+
/** `REFLEX_VERSIONS_KEPT.min` to `REFLEX_VERSIONS_KEPT.max`. Left alone when absent. */
|
|
49
|
+
versionsKept?: number;
|
|
50
|
+
}
|
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
DiscordActivityType,
|
|
3
|
-
DiscordComponentKind,
|
|
4
|
-
DiscordPresenceStatus,
|
|
5
|
-
} from '../../../enum';
|
|
6
|
-
import type { IReflexDiscordCommandOption, ReflexDiscordLocalizations } from '../../models';
|
|
7
|
-
|
|
8
|
-
export interface IListServiceDiscordCommandParams {
|
|
9
|
-
applicationId: string;
|
|
10
|
-
serviceId: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface ICreateServiceDiscordCommandParams {
|
|
14
|
-
applicationId: string;
|
|
15
|
-
serviceId: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ICreateServiceDiscordCommandBody {
|
|
18
|
-
/** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
|
|
19
|
-
name: string;
|
|
20
|
-
/** 1 to 100 characters. */
|
|
21
|
-
description: string;
|
|
22
|
-
/** 25 at most, required options first; empty by default. */
|
|
23
|
-
options?: IReflexDiscordCommandOption[];
|
|
24
|
-
/** A function of the same Service. */
|
|
25
|
-
functionId: string;
|
|
26
|
-
/** Discord permission bits as a decimal string; null (default) for everyone. */
|
|
27
|
-
defaultMemberPermissions?: string | null;
|
|
28
|
-
/** `true` by default. */
|
|
29
|
-
allowedInDirectMessages?: boolean;
|
|
30
|
-
/** Null (default) for none. */
|
|
31
|
-
nameLocalizations?: ReflexDiscordLocalizations | null;
|
|
32
|
-
descriptionLocalizations?: ReflexDiscordLocalizations | null;
|
|
33
|
-
/** `false` by default. */
|
|
34
|
-
userInstallable?: boolean;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface IUpdateServiceDiscordCommandParams {
|
|
38
|
-
applicationId: string;
|
|
39
|
-
serviceId: string;
|
|
40
|
-
commandId: string;
|
|
41
|
-
}
|
|
42
|
-
export interface IUpdateServiceDiscordCommandBody {
|
|
43
|
-
name?: string;
|
|
44
|
-
description?: string;
|
|
45
|
-
options?: IReflexDiscordCommandOption[];
|
|
46
|
-
functionId?: string;
|
|
47
|
-
defaultMemberPermissions?: string | null;
|
|
48
|
-
allowedInDirectMessages?: boolean;
|
|
49
|
-
nameLocalizations?: ReflexDiscordLocalizations | null;
|
|
50
|
-
descriptionLocalizations?: ReflexDiscordLocalizations | null;
|
|
51
|
-
userInstallable?: boolean;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface IDeleteServiceDiscordCommandParams {
|
|
55
|
-
applicationId: string;
|
|
56
|
-
serviceId: string;
|
|
57
|
-
commandId: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface IListServiceDiscordComponentParams {
|
|
61
|
-
applicationId: string;
|
|
62
|
-
serviceId: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface ICreateServiceDiscordComponentParams {
|
|
66
|
-
applicationId: string;
|
|
67
|
-
serviceId: string;
|
|
68
|
-
}
|
|
69
|
-
export interface ICreateServiceDiscordComponentBody {
|
|
70
|
-
/** `^[a-z0-9_-]{1,40}$`; no prefix of the Service equals, starts or is started by another one. */
|
|
71
|
-
customIdPrefix: string;
|
|
72
|
-
kind: DiscordComponentKind;
|
|
73
|
-
/** A function of the same Service. */
|
|
74
|
-
functionId: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface IUpdateServiceDiscordComponentParams {
|
|
78
|
-
applicationId: string;
|
|
79
|
-
serviceId: string;
|
|
80
|
-
componentId: string;
|
|
81
|
-
}
|
|
82
|
-
export interface IUpdateServiceDiscordComponentBody {
|
|
83
|
-
customIdPrefix?: string;
|
|
84
|
-
kind?: DiscordComponentKind;
|
|
85
|
-
functionId?: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface IDeleteServiceDiscordComponentParams {
|
|
89
|
-
applicationId: string;
|
|
90
|
-
serviceId: string;
|
|
91
|
-
componentId: string;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface IGetServiceDiscordConnectionParams {
|
|
95
|
-
applicationId: string;
|
|
96
|
-
serviceId: string;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface ISetServiceDiscordTokenSecretParams {
|
|
100
|
-
applicationId: string;
|
|
101
|
-
serviceId: string;
|
|
102
|
-
}
|
|
103
|
-
export interface ISetServiceDiscordTokenSecretBody {
|
|
104
|
-
/** The Vault entry (a secret of the project) that holds the bot token, one value per environment. */
|
|
105
|
-
discordTokenSecretId: string;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface ISetServiceDiscordEnvironmentParams {
|
|
109
|
-
applicationId: string;
|
|
110
|
-
serviceId: string;
|
|
111
|
-
environmentId: string;
|
|
112
|
-
}
|
|
113
|
-
export interface ISetServiceDiscordEnvironmentBody {
|
|
114
|
-
/** Discord server (snowflake) the commands are pushed to outside production; null removes it. */
|
|
115
|
-
testGuildId?: string | null;
|
|
116
|
-
/** Discord permission bits as a decimal string, put in the invitation link. */
|
|
117
|
-
invitePermissions: string;
|
|
118
|
-
/** What the bot shows while connected. */
|
|
119
|
-
presenceStatus?: DiscordPresenceStatus;
|
|
120
|
-
/** The kind of activity; null removes it. */
|
|
121
|
-
activityType?: DiscordActivityType | null;
|
|
122
|
-
/** 1 to 128 characters, required with an `activityType`, null without. */
|
|
123
|
-
activityText?: string | null;
|
|
124
|
-
/**
|
|
125
|
-
* Largest file the bot receives or sends, in bytes, 1 to `REFLEX_DISCORD_LIMITS.attachmentMaxBytesBound`; omitted,
|
|
126
|
-
* the current size is kept (the default until one is set), unlike the other fields of this body, which an
|
|
127
|
-
* omission resets: a screen sends it only when it changed it.
|
|
128
|
-
*/
|
|
129
|
-
maxAttachmentBytes?: number;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export interface ICheckServiceDiscordConnectionParams {
|
|
133
|
-
applicationId: string;
|
|
134
|
-
serviceId: string;
|
|
135
|
-
environmentId: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface IRetryServiceDiscordSyncParams {
|
|
139
|
-
applicationId: string;
|
|
140
|
-
serviceId: string;
|
|
141
|
-
environmentId: string;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface ISetServiceDiscordAllocationParams {
|
|
145
|
-
applicationId: string;
|
|
146
|
-
serviceId: string;
|
|
147
|
-
environmentId: string;
|
|
148
|
-
}
|
|
149
|
-
export interface ISetServiceDiscordAllocationBody {
|
|
150
|
-
/**
|
|
151
|
-
* Lots of 500 events per minute of the reserve of the organization this bot holds in this environment,
|
|
152
|
-
* from 0 to `rate.lotsMax`; 0 releases them. The sum over the organization cannot go past its reserve.
|
|
153
|
-
*/
|
|
154
|
-
lots: number;
|
|
155
|
-
}
|
|
1
|
+
import type {
|
|
2
|
+
DiscordActivityType,
|
|
3
|
+
DiscordComponentKind,
|
|
4
|
+
DiscordPresenceStatus,
|
|
5
|
+
} from '../../../enum';
|
|
6
|
+
import type { IReflexDiscordCommandOption, ReflexDiscordLocalizations } from '../../models';
|
|
7
|
+
|
|
8
|
+
export interface IListServiceDiscordCommandParams {
|
|
9
|
+
applicationId: string;
|
|
10
|
+
serviceId: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ICreateServiceDiscordCommandParams {
|
|
14
|
+
applicationId: string;
|
|
15
|
+
serviceId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ICreateServiceDiscordCommandBody {
|
|
18
|
+
/** `^[-_a-z0-9]{1,32}$`, unique within the Service. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** 1 to 100 characters. */
|
|
21
|
+
description: string;
|
|
22
|
+
/** 25 at most, required options first; empty by default. */
|
|
23
|
+
options?: IReflexDiscordCommandOption[];
|
|
24
|
+
/** A function of the same Service. */
|
|
25
|
+
functionId: string;
|
|
26
|
+
/** Discord permission bits as a decimal string; null (default) for everyone. */
|
|
27
|
+
defaultMemberPermissions?: string | null;
|
|
28
|
+
/** `true` by default. */
|
|
29
|
+
allowedInDirectMessages?: boolean;
|
|
30
|
+
/** Null (default) for none. */
|
|
31
|
+
nameLocalizations?: ReflexDiscordLocalizations | null;
|
|
32
|
+
descriptionLocalizations?: ReflexDiscordLocalizations | null;
|
|
33
|
+
/** `false` by default. */
|
|
34
|
+
userInstallable?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface IUpdateServiceDiscordCommandParams {
|
|
38
|
+
applicationId: string;
|
|
39
|
+
serviceId: string;
|
|
40
|
+
commandId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface IUpdateServiceDiscordCommandBody {
|
|
43
|
+
name?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
options?: IReflexDiscordCommandOption[];
|
|
46
|
+
functionId?: string;
|
|
47
|
+
defaultMemberPermissions?: string | null;
|
|
48
|
+
allowedInDirectMessages?: boolean;
|
|
49
|
+
nameLocalizations?: ReflexDiscordLocalizations | null;
|
|
50
|
+
descriptionLocalizations?: ReflexDiscordLocalizations | null;
|
|
51
|
+
userInstallable?: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IDeleteServiceDiscordCommandParams {
|
|
55
|
+
applicationId: string;
|
|
56
|
+
serviceId: string;
|
|
57
|
+
commandId: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface IListServiceDiscordComponentParams {
|
|
61
|
+
applicationId: string;
|
|
62
|
+
serviceId: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ICreateServiceDiscordComponentParams {
|
|
66
|
+
applicationId: string;
|
|
67
|
+
serviceId: string;
|
|
68
|
+
}
|
|
69
|
+
export interface ICreateServiceDiscordComponentBody {
|
|
70
|
+
/** `^[a-z0-9_-]{1,40}$`; no prefix of the Service equals, starts or is started by another one. */
|
|
71
|
+
customIdPrefix: string;
|
|
72
|
+
kind: DiscordComponentKind;
|
|
73
|
+
/** A function of the same Service. */
|
|
74
|
+
functionId: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface IUpdateServiceDiscordComponentParams {
|
|
78
|
+
applicationId: string;
|
|
79
|
+
serviceId: string;
|
|
80
|
+
componentId: string;
|
|
81
|
+
}
|
|
82
|
+
export interface IUpdateServiceDiscordComponentBody {
|
|
83
|
+
customIdPrefix?: string;
|
|
84
|
+
kind?: DiscordComponentKind;
|
|
85
|
+
functionId?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface IDeleteServiceDiscordComponentParams {
|
|
89
|
+
applicationId: string;
|
|
90
|
+
serviceId: string;
|
|
91
|
+
componentId: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface IGetServiceDiscordConnectionParams {
|
|
95
|
+
applicationId: string;
|
|
96
|
+
serviceId: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface ISetServiceDiscordTokenSecretParams {
|
|
100
|
+
applicationId: string;
|
|
101
|
+
serviceId: string;
|
|
102
|
+
}
|
|
103
|
+
export interface ISetServiceDiscordTokenSecretBody {
|
|
104
|
+
/** The Vault entry (a secret of the project) that holds the bot token, one value per environment. */
|
|
105
|
+
discordTokenSecretId: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface ISetServiceDiscordEnvironmentParams {
|
|
109
|
+
applicationId: string;
|
|
110
|
+
serviceId: string;
|
|
111
|
+
environmentId: string;
|
|
112
|
+
}
|
|
113
|
+
export interface ISetServiceDiscordEnvironmentBody {
|
|
114
|
+
/** Discord server (snowflake) the commands are pushed to outside production; null removes it. */
|
|
115
|
+
testGuildId?: string | null;
|
|
116
|
+
/** Discord permission bits as a decimal string, put in the invitation link. */
|
|
117
|
+
invitePermissions: string;
|
|
118
|
+
/** What the bot shows while connected. */
|
|
119
|
+
presenceStatus?: DiscordPresenceStatus;
|
|
120
|
+
/** The kind of activity; null removes it. */
|
|
121
|
+
activityType?: DiscordActivityType | null;
|
|
122
|
+
/** 1 to 128 characters, required with an `activityType`, null without. */
|
|
123
|
+
activityText?: string | null;
|
|
124
|
+
/**
|
|
125
|
+
* Largest file the bot receives or sends, in bytes, 1 to `REFLEX_DISCORD_LIMITS.attachmentMaxBytesBound`; omitted,
|
|
126
|
+
* the current size is kept (the default until one is set), unlike the other fields of this body, which an
|
|
127
|
+
* omission resets: a screen sends it only when it changed it.
|
|
128
|
+
*/
|
|
129
|
+
maxAttachmentBytes?: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface ICheckServiceDiscordConnectionParams {
|
|
133
|
+
applicationId: string;
|
|
134
|
+
serviceId: string;
|
|
135
|
+
environmentId: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface IRetryServiceDiscordSyncParams {
|
|
139
|
+
applicationId: string;
|
|
140
|
+
serviceId: string;
|
|
141
|
+
environmentId: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface ISetServiceDiscordAllocationParams {
|
|
145
|
+
applicationId: string;
|
|
146
|
+
serviceId: string;
|
|
147
|
+
environmentId: string;
|
|
148
|
+
}
|
|
149
|
+
export interface ISetServiceDiscordAllocationBody {
|
|
150
|
+
/**
|
|
151
|
+
* Lots of 500 events per minute of the reserve of the organization this bot holds in this environment,
|
|
152
|
+
* from 0 to `rate.lotsMax`; 0 releases them. The sum over the organization cannot go past its reserve.
|
|
153
|
+
*/
|
|
154
|
+
lots: number;
|
|
155
|
+
}
|
|
@@ -38,6 +38,8 @@ export interface IUpdateServiceBody {
|
|
|
38
38
|
cors?: IReflexServiceCors;
|
|
39
39
|
/** 1 to 6000. */
|
|
40
40
|
rateLimitPerIpPerMinute?: number;
|
|
41
|
+
/** `REFLEX_VERSIONS_KEPT.min` to `REFLEX_VERSIONS_KEPT.max`: how many versions of the Service the purge keeps. */
|
|
42
|
+
versionsKept?: number;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export interface IDeleteServiceParams {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IReflexStorageSurplusOwner } from '../../models';
|
|
2
|
+
|
|
3
|
+
/** Body of `archivable` and `archives`: whose storage the call is about. */
|
|
4
|
+
export interface IListStorageSurplusAdminBody {
|
|
5
|
+
owner: IReflexStorageSurplusOwner;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** Body of `archive` and `delete-archives`: the items to act on, as `archivable` and `archives` gave them. */
|
|
9
|
+
export interface IApplyStorageSurplusAdminBody {
|
|
10
|
+
owner: IReflexStorageSurplusOwner;
|
|
11
|
+
itemIds: string[];
|
|
12
|
+
}
|
|
@@ -16,3 +16,8 @@ export interface IGetFunctionRunStateData {
|
|
|
16
16
|
state: IReflexExecutionState;
|
|
17
17
|
}
|
|
18
18
|
export type IGetFunctionRunStateResponse = IResponse<IGetFunctionRunStateData>;
|
|
19
|
+
|
|
20
|
+
export interface ISetFunctionRunFavoriteData {
|
|
21
|
+
run: IReflexRun;
|
|
22
|
+
}
|
|
23
|
+
export type ISetFunctionRunFavoriteResponse = IResponse<ISetFunctionRunFavoriteData>;
|
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
IReflexExecutionSettings,
|
|
4
4
|
IReflexExecutionSettingsValues,
|
|
5
5
|
IReflexFunctionLogCap,
|
|
6
|
+
IReflexFunctionRunRetention,
|
|
6
7
|
IReflexIssuedCompletionSecret,
|
|
7
8
|
IReflexPriceList,
|
|
8
9
|
} from '../../models';
|
|
@@ -48,3 +49,9 @@ export type IRemoveFunctionEnvironmentSettingsResponse =
|
|
|
48
49
|
|
|
49
50
|
export type ISetFunctionLogCapData = IReflexFunctionLogCap;
|
|
50
51
|
export type ISetFunctionLogCapResponse = IResponse<ISetFunctionLogCapData>;
|
|
52
|
+
|
|
53
|
+
export type IGetFunctionRunRetentionData = IReflexFunctionRunRetention;
|
|
54
|
+
export type IGetFunctionRunRetentionResponse = IResponse<IGetFunctionRunRetentionData>;
|
|
55
|
+
|
|
56
|
+
export type ISetFunctionRunRetentionData = IReflexFunctionRunRetention;
|
|
57
|
+
export type ISetFunctionRunRetentionResponse = IResponse<ISetFunctionRunRetentionData>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IReflexStorageSurplusItem } from '../../models';
|
|
2
|
+
import type { IResponse } from '../response';
|
|
3
|
+
|
|
4
|
+
export interface IListStorageSurplusAdminData {
|
|
5
|
+
items: IReflexStorageSurplusItem[];
|
|
6
|
+
}
|
|
7
|
+
export type IListStorageSurplusAdminResponse = IResponse<IListStorageSurplusAdminData>;
|
|
8
|
+
|
|
9
|
+
export type IApplyStorageSurplusAdminData = Record<string, never>;
|
|
10
|
+
export type IApplyStorageSurplusAdminResponse = IResponse<IApplyStorageSurplusAdminData>;
|
|
@@ -25,3 +25,5 @@ export * from './reflex-route-contract.model';
|
|
|
25
25
|
export * from './reflex-consumer.model';
|
|
26
26
|
export * from './reflex-service-limits.model';
|
|
27
27
|
export * from './reflex-completion-webhook.model';
|
|
28
|
+
export * from './reflex-run-retention.model';
|
|
29
|
+
export * from './reflex-storage-surplus.model';
|