@abyss-project/reflex 6.0.5 → 6.1.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/.prettierrc +5 -5
- 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/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/types/enum/reflex-error-code.enum.d.ts +2 -1
- package/dist/types/enum/reflex-error-code.enum.js +1 -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/service.request.d.ts +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/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 +10 -15
- 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 +26 -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/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 +12 -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/reflex-error-code.enum.ts +5 -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/service.request.ts +2 -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/models/index.ts +2 -0
- 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
|
@@ -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 {
|
|
@@ -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>;
|
|
@@ -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';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The retention tiers of the runs a customer may choose, in days (AbyssReflex L3a, #893). The plan's retention is
|
|
3
|
+
* the default; a tier is chosen per application, and per function over it. Same list as the database CHECKs.
|
|
4
|
+
*/
|
|
5
|
+
export const REFLEX_RUN_RETENTION_TIER_DAYS = [3, 7, 15, 30, 90, 180, 365] as const;
|
|
6
|
+
|
|
7
|
+
/** Bounds of the number of versions the purge keeps, per function and per Service. */
|
|
8
|
+
export const REFLEX_VERSIONS_KEPT = { default: 20, min: 5, max: 100 } as const;
|
|
9
|
+
|
|
10
|
+
/** The detail of a run (detail, steps, log lines) moves to the archive past this age, in days, when its tier allows it. */
|
|
11
|
+
export const REFLEX_RUN_ARCHIVE_AFTER_DAYS = 30;
|
|
12
|
+
|
|
13
|
+
/** The runs of a tier under this number of days are never archived: they are purged before they would be. */
|
|
14
|
+
export const REFLEX_RUN_ARCHIVE_MIN_TIER_DAYS = 90;
|
|
15
|
+
|
|
16
|
+
/** The run retention of a function: its own tier, the one it inherits, and how many versions are kept. */
|
|
17
|
+
export interface IReflexFunctionRunRetention {
|
|
18
|
+
/** The tier of the function itself, one of `REFLEX_RUN_RETENTION_TIER_DAYS`; null follows the application. */
|
|
19
|
+
runRetentionDays: number | null;
|
|
20
|
+
/** The tier the function follows when it has none: the application's, else null for the plan's retention. Read only. */
|
|
21
|
+
inheritedDays: number | null;
|
|
22
|
+
/** How many versions of the function the purge keeps, `REFLEX_VERSIONS_KEPT.min` to `REFLEX_VERSIONS_KEPT.max`. */
|
|
23
|
+
versionsKept: number;
|
|
24
|
+
}
|
|
@@ -17,6 +17,17 @@ export interface IReflexApplicationRunSettings {
|
|
|
17
17
|
maxLogLinesPerRun: number | null;
|
|
18
18
|
/** How long runs are kept, from the Monitor plan; null until the first synchronization answered. Read only. */
|
|
19
19
|
retentionDays: number | null;
|
|
20
|
+
/**
|
|
21
|
+
* The retention tier the customer chose for the runs of the application, one of `REFLEX_RUN_RETENTION_TIER_DAYS`;
|
|
22
|
+
* null follows the plan (`retentionDays`). A function's own tier wins over it.
|
|
23
|
+
*/
|
|
24
|
+
runRetentionDays: number | null;
|
|
25
|
+
/** The owner's storage is cut: the runs recorded now keep no detail, steps or log lines. Read only. */
|
|
26
|
+
historyMinimal: boolean;
|
|
27
|
+
/** Bytes the runs of the application hold online (detail, steps, log lines). Read only. */
|
|
28
|
+
storedBytesOnline: number;
|
|
29
|
+
/** Bytes the runs of the application hold in the customer's archive. Read only. */
|
|
30
|
+
storedBytesArchive: number;
|
|
20
31
|
/** Whether the application has Monitor activated. Read only. */
|
|
21
32
|
monitorActivated: boolean;
|
|
22
33
|
}
|
|
@@ -184,6 +184,16 @@ export interface IReflexRun {
|
|
|
184
184
|
delivery?: IReflexCompletionDelivery;
|
|
185
185
|
createdByUserId: string | null;
|
|
186
186
|
createdAt: Date;
|
|
187
|
+
/** When the run is purged (its start plus the retention in force); null for a test run, and while no retention is known. */
|
|
188
|
+
expiresAt: string | null;
|
|
189
|
+
/** A favorite run is never purged. */
|
|
190
|
+
isFavorite: boolean;
|
|
191
|
+
/** The run was recorded while the owner's storage was cut: no detail, steps or log lines were kept. */
|
|
192
|
+
historyMinimal: boolean;
|
|
193
|
+
/** Bytes the run holds online (detail, steps, log lines); null for a test run, and for a run whose size was never computed. */
|
|
194
|
+
storedBytes: number | null;
|
|
195
|
+
/** When the detail, steps and log lines moved to the customer's archive; null while they are online. */
|
|
196
|
+
detailArchivedAt: string | null;
|
|
187
197
|
}
|
|
188
198
|
|
|
189
199
|
/** The consumer of a Service that called a route, as the edge passed it to the function. */
|
|
@@ -23,8 +23,10 @@ export interface IReflexServiceDeployment {
|
|
|
23
23
|
environmentId: string;
|
|
24
24
|
/** The name of that environment, second segment of the address. */
|
|
25
25
|
environmentSlug: string;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
/** The version this gesture put in service; null once the purge deleted it (the row stays in the history, no way back to it). */
|
|
27
|
+
serviceVersionId: string | null;
|
|
28
|
+
/** Number of that version; null with `serviceVersionId`. */
|
|
29
|
+
serviceVersionNumber: number | null;
|
|
28
30
|
action: ServiceDeploymentAction;
|
|
29
31
|
status: ServiceDeploymentStatus;
|
|
30
32
|
grants: IReflexServiceDeploymentGrant[];
|
|
@@ -38,6 +38,8 @@ export interface IReflexService {
|
|
|
38
38
|
cors: IReflexServiceCors;
|
|
39
39
|
/** Draft: frozen by the next version. Calls per minute and per client IP, in each environment. */
|
|
40
40
|
rateLimitPerIpPerMinute: number;
|
|
41
|
+
/** How many versions of the Service the purge keeps, `REFLEX_VERSIONS_KEPT.min` to `REFLEX_VERSIONS_KEPT.max`. */
|
|
42
|
+
versionsKept: number;
|
|
41
43
|
createdByUserId: string;
|
|
42
44
|
updatedByUserId: string;
|
|
43
45
|
createdAt: Date;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whose storage a day-90 operation is about (the storage surplus contract of abyss-main, #889): the owner of an
|
|
3
|
+
* application is an organization, so `organizationId` is the one Reflex acts on.
|
|
4
|
+
*/
|
|
5
|
+
export interface IReflexStorageSurplusOwner {
|
|
6
|
+
organizationId?: string | null;
|
|
7
|
+
userId?: string | null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* One item of the day-90 contract: a day of the runs of one function. Online (archivable) its `id` names the day; in
|
|
12
|
+
* the archive it is the id of the archive object of that day.
|
|
13
|
+
*/
|
|
14
|
+
export interface IReflexStorageSurplusItem {
|
|
15
|
+
id: string;
|
|
16
|
+
sizeBytes: number;
|
|
17
|
+
/** The day the item holds the runs of, UTC. */
|
|
18
|
+
createdAt: Date | string;
|
|
19
|
+
/** The day holds a favorite run. A favorite protects nothing against the quota. */
|
|
20
|
+
isFavorite: boolean;
|
|
21
|
+
/** What the customer recognises the day by: the function and the day. */
|
|
22
|
+
label: string;
|
|
23
|
+
}
|
package/tsconfig.check.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Perimetre de VERIFICATION, distinct de celui du build.
|
|
3
|
-
//
|
|
4
|
-
// `tsconfig.json` exclut `src/**/*.spec.ts` parce qu'il sert a emettre `dist/`, ou une spec
|
|
5
|
-
// n'a rien a faire. Mais eslint s'appuie sur ce meme fichier via `parserOptions.project` :
|
|
6
|
-
// les cinq specs du paquet sortaient donc en « Parsing error: that TSConfig does not include
|
|
7
|
-
// this file », mesure du 2026-09-09, et n'etaient lintees par personne.
|
|
8
|
-
//
|
|
9
|
-
// Ce fichier sert uniquement a eslint. Il n'emet rien et ne change pas ce que `build` produit.
|
|
10
|
-
"extends": "./tsconfig.json",
|
|
11
|
-
"compilerOptions": {
|
|
12
|
-
"noEmit": true
|
|
13
|
-
},
|
|
14
|
-
"exclude": ["./dist/**/*"]
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
// Perimetre de VERIFICATION, distinct de celui du build.
|
|
3
|
+
//
|
|
4
|
+
// `tsconfig.json` exclut `src/**/*.spec.ts` parce qu'il sert a emettre `dist/`, ou une spec
|
|
5
|
+
// n'a rien a faire. Mais eslint s'appuie sur ce meme fichier via `parserOptions.project` :
|
|
6
|
+
// les cinq specs du paquet sortaient donc en « Parsing error: that TSConfig does not include
|
|
7
|
+
// this file », mesure du 2026-09-09, et n'etaient lintees par personne.
|
|
8
|
+
//
|
|
9
|
+
// Ce fichier sert uniquement a eslint. Il n'emet rien et ne change pas ce que `build` produit.
|
|
10
|
+
"extends": "./tsconfig.json",
|
|
11
|
+
"compilerOptions": {
|
|
12
|
+
"noEmit": true
|
|
13
|
+
},
|
|
14
|
+
"exclude": ["./dist/**/*"]
|
|
15
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"incremental": false,
|
|
4
|
-
"target": "es2021",
|
|
5
|
-
"lib": [
|
|
6
|
-
"dom",
|
|
7
|
-
"es2021"
|
|
8
|
-
],
|
|
9
|
-
"module": "commonjs",
|
|
10
|
-
"rootDir": "src",
|
|
11
|
-
"moduleResolution": "node",
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"declaration": true,
|
|
14
|
-
"sourceMap": true,
|
|
15
|
-
"outDir": "./dist",
|
|
16
|
-
"removeComments": true,
|
|
17
|
-
"allowSyntheticDefaultImports": true,
|
|
18
|
-
"esModuleInterop": true,
|
|
19
|
-
"forceConsistentCasingInFileNames": true,
|
|
20
|
-
"strict": true,
|
|
21
|
-
"strictNullChecks": true,
|
|
22
|
-
"strictFunctionTypes": true,
|
|
23
|
-
"strictPropertyInitialization": false,
|
|
24
|
-
"skipLibCheck": true
|
|
25
|
-
},
|
|
26
|
-
"include": [
|
|
27
|
-
"./src"
|
|
28
|
-
],
|
|
29
|
-
"exclude": [
|
|
30
|
-
"./dist/**/*",
|
|
31
|
-
"./src/**/*.spec.ts",
|
|
32
|
-
"./src/**/*.test.ts",
|
|
33
|
-
"./src/**/__tests__/**"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"incremental": false,
|
|
4
|
+
"target": "es2021",
|
|
5
|
+
"lib": [
|
|
6
|
+
"dom",
|
|
7
|
+
"es2021"
|
|
8
|
+
],
|
|
9
|
+
"module": "commonjs",
|
|
10
|
+
"rootDir": "src",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"outDir": "./dist",
|
|
16
|
+
"removeComments": true,
|
|
17
|
+
"allowSyntheticDefaultImports": true,
|
|
18
|
+
"esModuleInterop": true,
|
|
19
|
+
"forceConsistentCasingInFileNames": true,
|
|
20
|
+
"strict": true,
|
|
21
|
+
"strictNullChecks": true,
|
|
22
|
+
"strictFunctionTypes": true,
|
|
23
|
+
"strictPropertyInitialization": false,
|
|
24
|
+
"skipLibCheck": true
|
|
25
|
+
},
|
|
26
|
+
"include": [
|
|
27
|
+
"./src"
|
|
28
|
+
],
|
|
29
|
+
"exclude": [
|
|
30
|
+
"./dist/**/*",
|
|
31
|
+
"./src/**/*.spec.ts",
|
|
32
|
+
"./src/**/*.test.ts",
|
|
33
|
+
"./src/**/__tests__/**"
|
|
34
|
+
]
|
|
35
|
+
}
|