@remnawave/backend-contract 2.9.11 → 2.9.12
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/build/backend/api/controllers/api-tokens.d.ts +1 -0
- package/build/backend/api/controllers/api-tokens.d.ts.map +1 -1
- package/build/backend/api/controllers/api-tokens.js +1 -0
- package/build/backend/api/routes.d.ts +5 -1
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +6 -2
- package/build/backend/commands/api-tokens/get-api-tokens.command.d.ts +0 -5
- package/build/backend/commands/api-tokens/get-api-tokens.command.d.ts.map +1 -1
- package/build/backend/commands/api-tokens/get-api-tokens.command.js +0 -5
- package/build/backend/commands/api-tokens/get-ott.command.d.ts +13 -0
- package/build/backend/commands/api-tokens/get-ott.command.d.ts.map +1 -0
- package/build/backend/commands/api-tokens/get-ott.command.js +17 -0
- package/build/backend/commands/api-tokens/index.d.ts +1 -0
- package/build/backend/commands/api-tokens/index.d.ts.map +1 -1
- package/build/backend/commands/api-tokens/index.js +1 -0
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +2 -0
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -1
- package/build/backend/constants/cache-keys/cache-keys.constants.js +2 -0
- package/build/frontend/api/controllers/api-tokens.js +1 -0
- package/build/frontend/api/routes.js +6 -2
- package/build/frontend/commands/api-tokens/get-api-tokens.command.js +0 -5
- package/build/frontend/commands/api-tokens/get-ott.command.js +17 -0
- package/build/frontend/commands/api-tokens/index.js +1 -0
- package/build/frontend/constants/cache-keys/cache-keys.constants.js +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-tokens.d.ts","sourceRoot":"","sources":["../../../../api/controllers/api-tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,EAAG,QAAiB,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;4BAEX,MAAM
|
|
1
|
+
{"version":3,"file":"api-tokens.d.ts","sourceRoot":"","sources":["../../../../api/controllers/api-tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,EAAG,QAAiB,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;4BAEX,MAAM;;;;CAIf,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export declare const ROOT: "/api";
|
|
2
2
|
export declare const METRICS_ROOT: "/metrics";
|
|
3
3
|
export declare const HEALTH_ROOT: "/health";
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const BACKEND_TOOLS_ROOT: "/backend-tools";
|
|
5
|
+
export declare const BULLBOARD_ROOT: "/backend-tools/queues";
|
|
6
|
+
export declare const SWAGGER_ROOT: "/backend-tools/swagger";
|
|
7
|
+
export declare const SCALAR_ROOT: "/backend-tools/scalar";
|
|
5
8
|
export declare const REST_API: {
|
|
6
9
|
readonly AUTH: {
|
|
7
10
|
readonly LOGIN: "/api/auth/login";
|
|
@@ -29,6 +32,7 @@ export declare const REST_API: {
|
|
|
29
32
|
readonly DELETE: (uuid: string) => string;
|
|
30
33
|
readonly GET: "/api/tokens/";
|
|
31
34
|
readonly GET_SCOPES: "/api/tokens/scopes";
|
|
35
|
+
readonly OTT: "/api/tokens/ott";
|
|
32
36
|
};
|
|
33
37
|
readonly KEYGEN: {
|
|
34
38
|
readonly GET: "/api/keygen/";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAE9C,eAAO,MAAM,kBAAkB,EAAG,gBAAyB,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAG,uBAAgC,CAAC;AAC/D,eAAO,MAAM,YAAY,EAAG,wBAAiC,CAAC;AAC9D,eAAO,MAAM,WAAW,EAAG,uBAAgC,CAAC;AAE5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;gCAyBE,MAAM;;;;;;;;;;;qCAcD,MAAM;;gCAGX,MAAM;;;;;oCAOF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;2CAKA,MAAM;;;;;;;;;;;;;;gCAkBjB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;8BAOzB,MAAM;6CAES,MAAM;0CAIT,MAAM;;;;;;;;;;;;;;;;;;;;;;kCAyBd,MAAM;uCAED,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAmCT,MAAM;;gCAKH,MAAM;;;;;;;;;;;;;;mDAiBa,MAAM;;;;;;;;;0CAYf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;6CAMV,MAAM;;qDAKE,MAAM;;;;;;qCAStB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;6DAIC,MAAM;;;;;;;;;;qCAa9B,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;;;;yCAWP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;;;;;;;;;6BAYnB,MAAM;;;gCAIH,MAAM;;;;;;;;6BAST,MAAM;;;gCAIH,MAAM;;;;;;;;;;;;;;;;;uCAkBC,MAAM;;;;yCAKJ,MAAM;;;;2CAKJ,MAAM;;;6CAIJ,MAAM;;;;;6CAMN,MAAM;qDAEE,MAAM;6CAEd,MAAM;qDAEE,MAAM;;;;;iCAM1B,MAAM;oCAEH,MAAM;;;iCAIT,MAAM;oCAEH,MAAM;;;CAIvB,CAAC"}
|
|
@@ -33,12 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.REST_API = exports.BULLBOARD_ROOT = exports.HEALTH_ROOT = exports.METRICS_ROOT = exports.ROOT = void 0;
|
|
36
|
+
exports.REST_API = exports.SCALAR_ROOT = exports.SWAGGER_ROOT = exports.BULLBOARD_ROOT = exports.BACKEND_TOOLS_ROOT = exports.HEALTH_ROOT = exports.METRICS_ROOT = exports.ROOT = void 0;
|
|
37
37
|
const CONTROLLERS = __importStar(require("./controllers"));
|
|
38
38
|
exports.ROOT = '/api';
|
|
39
39
|
exports.METRICS_ROOT = '/metrics';
|
|
40
40
|
exports.HEALTH_ROOT = '/health';
|
|
41
|
-
exports.
|
|
41
|
+
exports.BACKEND_TOOLS_ROOT = '/backend-tools';
|
|
42
|
+
exports.BULLBOARD_ROOT = '/backend-tools/queues';
|
|
43
|
+
exports.SWAGGER_ROOT = '/backend-tools/swagger';
|
|
44
|
+
exports.SCALAR_ROOT = '/backend-tools/scalar';
|
|
42
45
|
exports.REST_API = {
|
|
43
46
|
AUTH: {
|
|
44
47
|
LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
|
|
@@ -66,6 +69,7 @@ exports.REST_API = {
|
|
|
66
69
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.DELETE(uuid)}`,
|
|
67
70
|
GET: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.GET}`,
|
|
68
71
|
GET_SCOPES: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.GET_SCOPES}`,
|
|
72
|
+
OTT: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.OTT}`,
|
|
69
73
|
},
|
|
70
74
|
KEYGEN: {
|
|
71
75
|
GET: `${exports.ROOT}/${CONTROLLERS.KEYGEN_CONTROLLER}/${CONTROLLERS.KEYGEN_ROUTES.GET}`,
|
|
@@ -13,11 +13,6 @@ export declare namespace GetApiTokensCommand {
|
|
|
13
13
|
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
14
14
|
updatedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
15
15
|
}, z.core.$strip>>;
|
|
16
|
-
docs: z.ZodObject<{
|
|
17
|
-
enabled: z.ZodBoolean;
|
|
18
|
-
scalarPath: z.ZodNullable<z.ZodString>;
|
|
19
|
-
swaggerPath: z.ZodNullable<z.ZodString>;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
16
|
}, z.core.$strip>;
|
|
22
17
|
}, z.core.$strip>;
|
|
23
18
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-api-tokens.command.d.ts","sourceRoot":"","sources":["../../../../commands/api-tokens/get-api-tokens.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,mBAAmB,CAAC;IAC1B,MAAM,GAAG,gBAA0B,CAAC;IACpC,MAAM,OAAO,gBAAM,CAAC;IAEpB,MAAM,eAAe,2CAM3B,CAAC;IAEK,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"get-api-tokens.command.d.ts","sourceRoot":"","sources":["../../../../commands/api-tokens/get-api-tokens.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,mBAAmB,CAAC;IAC1B,MAAM,GAAG,gBAA0B,CAAC;IACpC,MAAM,OAAO,gBAAM,CAAC;IAEpB,MAAM,eAAe,2CAM3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;qBAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -13,11 +13,6 @@ var GetApiTokensCommand;
|
|
|
13
13
|
GetApiTokensCommand.ResponseSchema = zod_1.z.object({
|
|
14
14
|
response: zod_1.z.object({
|
|
15
15
|
tokens: zod_1.z.array(api_tokens_schema_1.ApiTokensSchema),
|
|
16
|
-
docs: zod_1.z.object({
|
|
17
|
-
enabled: zod_1.z.boolean(),
|
|
18
|
-
scalarPath: zod_1.z.string().nullable(),
|
|
19
|
-
swaggerPath: zod_1.z.string().nullable(),
|
|
20
|
-
}),
|
|
21
16
|
}),
|
|
22
17
|
});
|
|
23
18
|
})(GetApiTokensCommand || (exports.GetApiTokensCommand = GetApiTokensCommand = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace GetOttCommand {
|
|
3
|
+
const url: "/api/tokens/ott";
|
|
4
|
+
const TSQ_url: "/api/tokens/ott";
|
|
5
|
+
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
|
+
const ResponseSchema: z.ZodObject<{
|
|
7
|
+
response: z.ZodObject<{
|
|
8
|
+
ott: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=get-ott.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-ott.command.d.ts","sourceRoot":"","sources":["../../../../commands/api-tokens/get-ott.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,aAAa,CAAC;IACpB,MAAM,GAAG,mBAA0B,CAAC;IACpC,MAAM,OAAO,mBAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,cAAc;;;;qBAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetOttCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var GetOttCommand;
|
|
8
|
+
(function (GetOttCommand) {
|
|
9
|
+
GetOttCommand.url = api_1.REST_API.API_TOKENS.OTT;
|
|
10
|
+
GetOttCommand.TSQ_url = GetOttCommand.url;
|
|
11
|
+
GetOttCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.OTT, 'post', 'Get one-time token for accessing backend tools (Swagger, Scalar, Bull Board)', { scope: 'ott', kind: 'write' });
|
|
12
|
+
GetOttCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.object({
|
|
14
|
+
ott: zod_1.z.string(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
})(GetOttCommand || (exports.GetOttCommand = GetOttCommand = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/api-tokens/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/api-tokens/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
|
|
@@ -18,3 +18,4 @@ __exportStar(require("./create.command"), exports);
|
|
|
18
18
|
__exportStar(require("./delete.command"), exports);
|
|
19
19
|
__exportStar(require("./get-api-tokens.command"), exports);
|
|
20
20
|
__exportStar(require("./get-scopes.command"), exports);
|
|
21
|
+
__exportStar(require("./get-ott.command"), exports);
|
|
@@ -5,6 +5,7 @@ export declare const CACHE_KEYS: {
|
|
|
5
5
|
readonly SUBSCRIPTION_TEMPLATE: (name: string, type: TSubscriptionTemplateType) => string;
|
|
6
6
|
readonly PASSKEY_REGISTRATION_OPTIONS: (uuid: string) => string;
|
|
7
7
|
readonly PASSKEY_AUTHENTICATION_OPTIONS: (uuid: string) => string;
|
|
8
|
+
readonly OTT: "ott";
|
|
8
9
|
readonly REMNAWAVE_SETTINGS: "remnawave_settings";
|
|
9
10
|
readonly NODE_SYSTEM_INFO: (uuid: string) => string;
|
|
10
11
|
readonly NODE_SYSTEM_STATS: (uuid: string) => string;
|
|
@@ -15,6 +16,7 @@ export declare const CACHE_KEYS: {
|
|
|
15
16
|
readonly XRAY_JSON_TEMPLATE: (uuid: string) => string;
|
|
16
17
|
};
|
|
17
18
|
export declare const CACHE_KEYS_TTL: {
|
|
19
|
+
readonly OTT: 60;
|
|
18
20
|
readonly REMNAWAVE_SETTINGS: 86400;
|
|
19
21
|
readonly EXTERNAL_SQUAD_SETTINGS: 3600;
|
|
20
22
|
readonly SUBSCRIPTION_SETTINGS: 3600;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-keys.constants.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/cache-keys.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,UAAU;;6CAEa,MAAM;2CACR,MAAM,QAAQ,yBAAyB;kDAEhC,MAAM;oDACJ,MAAM
|
|
1
|
+
{"version":3,"file":"cache-keys.constants.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/cache-keys.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,UAAU;;6CAEa,MAAM;2CACR,MAAM,QAAQ,yBAAyB;kDAEhC,MAAM;oDACJ,MAAM;;;sCAGpB,MAAM;uCACL,MAAM;uCACN,MAAM;mCACV,MAAM;sCACH,MAAM;iCACX,MAAM;wCACC,MAAM;CAC3B,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;uCAEF,MAAM;;;;CAK1B,CAAC;AAEX,eAAO,MAAM,uBAAuB;;CAE1B,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.CACHE_KEYS = {
|
|
|
7
7
|
SUBSCRIPTION_TEMPLATE: (name, type) => `subscription_template:${name}:${type}`,
|
|
8
8
|
PASSKEY_REGISTRATION_OPTIONS: (uuid) => `passkey_registration_options:${uuid}`,
|
|
9
9
|
PASSKEY_AUTHENTICATION_OPTIONS: (uuid) => `passkey_authentication_options:${uuid}`,
|
|
10
|
+
OTT: 'ott',
|
|
10
11
|
REMNAWAVE_SETTINGS: 'remnawave_settings',
|
|
11
12
|
NODE_SYSTEM_INFO: (uuid) => `node_system_info:${uuid}`,
|
|
12
13
|
NODE_SYSTEM_STATS: (uuid) => `node_system_stats:${uuid}`,
|
|
@@ -17,6 +18,7 @@ exports.CACHE_KEYS = {
|
|
|
17
18
|
XRAY_JSON_TEMPLATE: (uuid) => `xray_json_template:${uuid}`,
|
|
18
19
|
};
|
|
19
20
|
exports.CACHE_KEYS_TTL = {
|
|
21
|
+
OTT: 60, // 1 minute
|
|
20
22
|
REMNAWAVE_SETTINGS: 86400, // 1 day
|
|
21
23
|
EXTERNAL_SQUAD_SETTINGS: 3600, // 1 hour
|
|
22
24
|
SUBSCRIPTION_SETTINGS: 3600, // 1 hour
|
|
@@ -33,12 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.REST_API = exports.BULLBOARD_ROOT = exports.HEALTH_ROOT = exports.METRICS_ROOT = exports.ROOT = void 0;
|
|
36
|
+
exports.REST_API = exports.SCALAR_ROOT = exports.SWAGGER_ROOT = exports.BULLBOARD_ROOT = exports.BACKEND_TOOLS_ROOT = exports.HEALTH_ROOT = exports.METRICS_ROOT = exports.ROOT = void 0;
|
|
37
37
|
const CONTROLLERS = __importStar(require("./controllers"));
|
|
38
38
|
exports.ROOT = '/api';
|
|
39
39
|
exports.METRICS_ROOT = '/metrics';
|
|
40
40
|
exports.HEALTH_ROOT = '/health';
|
|
41
|
-
exports.
|
|
41
|
+
exports.BACKEND_TOOLS_ROOT = '/backend-tools';
|
|
42
|
+
exports.BULLBOARD_ROOT = '/backend-tools/queues';
|
|
43
|
+
exports.SWAGGER_ROOT = '/backend-tools/swagger';
|
|
44
|
+
exports.SCALAR_ROOT = '/backend-tools/scalar';
|
|
42
45
|
exports.REST_API = {
|
|
43
46
|
AUTH: {
|
|
44
47
|
LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
|
|
@@ -66,6 +69,7 @@ exports.REST_API = {
|
|
|
66
69
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.DELETE(uuid)}`,
|
|
67
70
|
GET: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.GET}`,
|
|
68
71
|
GET_SCOPES: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.GET_SCOPES}`,
|
|
72
|
+
OTT: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.OTT}`,
|
|
69
73
|
},
|
|
70
74
|
KEYGEN: {
|
|
71
75
|
GET: `${exports.ROOT}/${CONTROLLERS.KEYGEN_CONTROLLER}/${CONTROLLERS.KEYGEN_ROUTES.GET}`,
|
|
@@ -13,11 +13,6 @@ var GetApiTokensCommand;
|
|
|
13
13
|
GetApiTokensCommand.ResponseSchema = zod_1.z.object({
|
|
14
14
|
response: zod_1.z.object({
|
|
15
15
|
tokens: zod_1.z.array(api_tokens_schema_1.ApiTokensSchema),
|
|
16
|
-
docs: zod_1.z.object({
|
|
17
|
-
enabled: zod_1.z.boolean(),
|
|
18
|
-
scalarPath: zod_1.z.string().nullable(),
|
|
19
|
-
swaggerPath: zod_1.z.string().nullable(),
|
|
20
|
-
}),
|
|
21
16
|
}),
|
|
22
17
|
});
|
|
23
18
|
})(GetApiTokensCommand || (exports.GetApiTokensCommand = GetApiTokensCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetOttCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var GetOttCommand;
|
|
8
|
+
(function (GetOttCommand) {
|
|
9
|
+
GetOttCommand.url = api_1.REST_API.API_TOKENS.OTT;
|
|
10
|
+
GetOttCommand.TSQ_url = GetOttCommand.url;
|
|
11
|
+
GetOttCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.OTT, 'post', 'Get one-time token for accessing backend tools (Swagger, Scalar, Bull Board)', { scope: 'ott', kind: 'write' });
|
|
12
|
+
GetOttCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.object({
|
|
14
|
+
ott: zod_1.z.string(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
})(GetOttCommand || (exports.GetOttCommand = GetOttCommand = {}));
|
|
@@ -18,3 +18,4 @@ __exportStar(require("./create.command"), exports);
|
|
|
18
18
|
__exportStar(require("./delete.command"), exports);
|
|
19
19
|
__exportStar(require("./get-api-tokens.command"), exports);
|
|
20
20
|
__exportStar(require("./get-scopes.command"), exports);
|
|
21
|
+
__exportStar(require("./get-ott.command"), exports);
|
|
@@ -7,6 +7,7 @@ exports.CACHE_KEYS = {
|
|
|
7
7
|
SUBSCRIPTION_TEMPLATE: (name, type) => `subscription_template:${name}:${type}`,
|
|
8
8
|
PASSKEY_REGISTRATION_OPTIONS: (uuid) => `passkey_registration_options:${uuid}`,
|
|
9
9
|
PASSKEY_AUTHENTICATION_OPTIONS: (uuid) => `passkey_authentication_options:${uuid}`,
|
|
10
|
+
OTT: 'ott',
|
|
10
11
|
REMNAWAVE_SETTINGS: 'remnawave_settings',
|
|
11
12
|
NODE_SYSTEM_INFO: (uuid) => `node_system_info:${uuid}`,
|
|
12
13
|
NODE_SYSTEM_STATS: (uuid) => `node_system_stats:${uuid}`,
|
|
@@ -17,6 +18,7 @@ exports.CACHE_KEYS = {
|
|
|
17
18
|
XRAY_JSON_TEMPLATE: (uuid) => `xray_json_template:${uuid}`,
|
|
18
19
|
};
|
|
19
20
|
exports.CACHE_KEYS_TTL = {
|
|
21
|
+
OTT: 60, // 1 minute
|
|
20
22
|
REMNAWAVE_SETTINGS: 86400, // 1 day
|
|
21
23
|
EXTERNAL_SQUAD_SETTINGS: 3600, // 1 hour
|
|
22
24
|
SUBSCRIPTION_SETTINGS: 3600, // 1 hour
|
package/package.json
CHANGED