@remnawave/backend-contract 2.9.12 → 2.9.13
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/commands/api-tokens/get-ott.command.js +1 -1
- package/build/backend/constants/backend-tools/backend-tools.constants.d.ts +9 -0
- package/build/backend/constants/backend-tools/backend-tools.constants.d.ts.map +1 -0
- package/build/backend/constants/backend-tools/backend-tools.constants.js +10 -0
- package/build/backend/constants/backend-tools/index.d.ts +2 -0
- package/build/backend/constants/backend-tools/index.d.ts.map +1 -0
- package/build/backend/constants/backend-tools/index.js +17 -0
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +0 -2
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -1
- package/build/backend/constants/cache-keys/cache-keys.constants.js +0 -2
- package/build/backend/constants/index.d.ts +1 -0
- package/build/backend/constants/index.d.ts.map +1 -1
- package/build/backend/constants/index.js +1 -0
- package/build/frontend/commands/api-tokens/get-ott.command.js +1 -1
- package/build/frontend/constants/backend-tools/backend-tools.constants.js +10 -0
- package/build/frontend/constants/backend-tools/index.js +17 -0
- package/build/frontend/constants/cache-keys/cache-keys.constants.js +0 -2
- package/build/frontend/constants/index.js +1 -0
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ var GetOttCommand;
|
|
|
8
8
|
(function (GetOttCommand) {
|
|
9
9
|
GetOttCommand.url = api_1.REST_API.API_TOKENS.OTT;
|
|
10
10
|
GetOttCommand.TSQ_url = GetOttCommand.url;
|
|
11
|
-
GetOttCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.OTT, 'post', 'Get
|
|
11
|
+
GetOttCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.OTT, 'post', 'Get short-lived token for accessing backend tools (Swagger, Scalar, Bull Board)', { scope: 'ott', kind: 'write' });
|
|
12
12
|
GetOttCommand.ResponseSchema = zod_1.z.object({
|
|
13
13
|
response: zod_1.z.object({
|
|
14
14
|
ott: zod_1.z.string(),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const BACKEND_TOOLS_AUTH_COOKIE_NAME = "rw-tools";
|
|
2
|
+
export declare const BACKEND_TOOLS_JWT_ISSUER = "Remnawave";
|
|
3
|
+
export declare const BACKEND_TOOLS_JWT_LIFETIME_HOURS = 2;
|
|
4
|
+
export declare const BACKEND_TOOLS_JWT_SCOPES: {
|
|
5
|
+
readonly ACCESS: "access";
|
|
6
|
+
readonly OTT: "ott";
|
|
7
|
+
};
|
|
8
|
+
export type TBackendToolsJwtScope = (typeof BACKEND_TOOLS_JWT_SCOPES)[keyof typeof BACKEND_TOOLS_JWT_SCOPES];
|
|
9
|
+
//# sourceMappingURL=backend-tools.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend-tools.constants.d.ts","sourceRoot":"","sources":["../../../../constants/backend-tools/backend-tools.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,aAAa,CAAC;AACzD,eAAO,MAAM,wBAAwB,cAAc,CAAC;AACpD,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AACX,MAAM,MAAM,qBAAqB,GAC7B,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BACKEND_TOOLS_JWT_SCOPES = exports.BACKEND_TOOLS_JWT_LIFETIME_HOURS = exports.BACKEND_TOOLS_JWT_ISSUER = exports.BACKEND_TOOLS_AUTH_COOKIE_NAME = void 0;
|
|
4
|
+
exports.BACKEND_TOOLS_AUTH_COOKIE_NAME = 'rw-tools';
|
|
5
|
+
exports.BACKEND_TOOLS_JWT_ISSUER = 'Remnawave';
|
|
6
|
+
exports.BACKEND_TOOLS_JWT_LIFETIME_HOURS = 2;
|
|
7
|
+
exports.BACKEND_TOOLS_JWT_SCOPES = {
|
|
8
|
+
ACCESS: 'access',
|
|
9
|
+
OTT: 'ott',
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../constants/backend-tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./backend-tools.constants"), exports);
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
readonly REMNAWAVE_SETTINGS: "remnawave_settings";
|
|
10
9
|
readonly NODE_SYSTEM_INFO: (uuid: string) => string;
|
|
11
10
|
readonly NODE_SYSTEM_STATS: (uuid: string) => string;
|
|
@@ -16,7 +15,6 @@ export declare const CACHE_KEYS: {
|
|
|
16
15
|
readonly XRAY_JSON_TEMPLATE: (uuid: string) => string;
|
|
17
16
|
};
|
|
18
17
|
export declare const CACHE_KEYS_TTL: {
|
|
19
|
-
readonly OTT: 60;
|
|
20
18
|
readonly REMNAWAVE_SETTINGS: 86400;
|
|
21
19
|
readonly EXTERNAL_SQUAD_SETTINGS: 3600;
|
|
22
20
|
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;;sCAEpB,MAAM;uCACL,MAAM;uCACN,MAAM;mCACV,MAAM;sCACH,MAAM;iCACX,MAAM;wCACC,MAAM;CAC3B,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;uCAEF,MAAM;;;;CAK1B,CAAC;AAEX,eAAO,MAAM,uBAAuB;;CAE1B,CAAC"}
|
|
@@ -7,7 +7,6 @@ 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',
|
|
11
10
|
REMNAWAVE_SETTINGS: 'remnawave_settings',
|
|
12
11
|
NODE_SYSTEM_INFO: (uuid) => `node_system_info:${uuid}`,
|
|
13
12
|
NODE_SYSTEM_STATS: (uuid) => `node_system_stats:${uuid}`,
|
|
@@ -18,7 +17,6 @@ exports.CACHE_KEYS = {
|
|
|
18
17
|
XRAY_JSON_TEMPLATE: (uuid) => `xray_json_template:${uuid}`,
|
|
19
18
|
};
|
|
20
19
|
exports.CACHE_KEYS_TTL = {
|
|
21
|
-
OTT: 60, // 1 minute
|
|
22
20
|
REMNAWAVE_SETTINGS: 86400, // 1 day
|
|
23
21
|
EXTERNAL_SQUAD_SETTINGS: 3600, // 1 hour
|
|
24
22
|
SUBSCRIPTION_SETTINGS: 3600, // 1 hour
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
|
|
@@ -8,7 +8,7 @@ var GetOttCommand;
|
|
|
8
8
|
(function (GetOttCommand) {
|
|
9
9
|
GetOttCommand.url = api_1.REST_API.API_TOKENS.OTT;
|
|
10
10
|
GetOttCommand.TSQ_url = GetOttCommand.url;
|
|
11
|
-
GetOttCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.OTT, 'post', 'Get
|
|
11
|
+
GetOttCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.OTT, 'post', 'Get short-lived token for accessing backend tools (Swagger, Scalar, Bull Board)', { scope: 'ott', kind: 'write' });
|
|
12
12
|
GetOttCommand.ResponseSchema = zod_1.z.object({
|
|
13
13
|
response: zod_1.z.object({
|
|
14
14
|
ott: zod_1.z.string(),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BACKEND_TOOLS_JWT_SCOPES = exports.BACKEND_TOOLS_JWT_LIFETIME_HOURS = exports.BACKEND_TOOLS_JWT_ISSUER = exports.BACKEND_TOOLS_AUTH_COOKIE_NAME = void 0;
|
|
4
|
+
exports.BACKEND_TOOLS_AUTH_COOKIE_NAME = 'rw-tools';
|
|
5
|
+
exports.BACKEND_TOOLS_JWT_ISSUER = 'Remnawave';
|
|
6
|
+
exports.BACKEND_TOOLS_JWT_LIFETIME_HOURS = 2;
|
|
7
|
+
exports.BACKEND_TOOLS_JWT_SCOPES = {
|
|
8
|
+
ACCESS: 'access',
|
|
9
|
+
OTT: 'ott',
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./backend-tools.constants"), exports);
|
|
@@ -7,7 +7,6 @@ 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',
|
|
11
10
|
REMNAWAVE_SETTINGS: 'remnawave_settings',
|
|
12
11
|
NODE_SYSTEM_INFO: (uuid) => `node_system_info:${uuid}`,
|
|
13
12
|
NODE_SYSTEM_STATS: (uuid) => `node_system_stats:${uuid}`,
|
|
@@ -18,7 +17,6 @@ exports.CACHE_KEYS = {
|
|
|
18
17
|
XRAY_JSON_TEMPLATE: (uuid) => `xray_json_template:${uuid}`,
|
|
19
18
|
};
|
|
20
19
|
exports.CACHE_KEYS_TTL = {
|
|
21
|
-
OTT: 60, // 1 minute
|
|
22
20
|
REMNAWAVE_SETTINGS: 86400, // 1 day
|
|
23
21
|
EXTERNAL_SQUAD_SETTINGS: 3600, // 1 hour
|
|
24
22
|
SUBSCRIPTION_SETTINGS: 3600, // 1 hour
|
package/package.json
CHANGED