@remnawave/backend-contract 2.1.25 → 2.1.27
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/subscriptions.d.ts +2 -0
- package/build/backend/api/controllers/subscriptions.d.ts.map +1 -1
- package/build/backend/api/controllers/subscriptions.js +2 -0
- package/build/backend/api/controllers/system.d.ts +3 -0
- package/build/backend/api/controllers/system.d.ts.map +1 -1
- package/build/backend/api/controllers/system.js +3 -0
- package/build/backend/api/routes.d.ts +5 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +5 -0
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +4 -4
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.js +3 -28
- package/build/backend/commands/subscriptions/get-all-subscriptions.command.d.ts +6 -6
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.d.ts +180 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.d.ts.map +1 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.js +19 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts +51 -4
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts.map +1 -1
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.js +3 -21
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts +180 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +19 -0
- package/build/backend/commands/subscriptions/get-by/index.d.ts +2 -0
- package/build/backend/commands/subscriptions/get-by/index.d.ts.map +1 -1
- package/build/backend/commands/subscriptions/get-by/index.js +2 -0
- package/build/backend/commands/system/index.d.ts +1 -0
- package/build/backend/commands/system/index.d.ts.map +1 -1
- package/build/backend/commands/system/index.js +1 -0
- package/build/backend/commands/system/tools/generate-x25519-command.d.ts +46 -0
- package/build/backend/commands/system/tools/generate-x25519-command.d.ts.map +1 -0
- package/build/backend/commands/system/tools/generate-x25519-command.js +20 -0
- package/build/backend/commands/system/tools/index.d.ts +2 -0
- package/build/backend/commands/system/tools/index.d.ts.map +1 -0
- package/build/backend/commands/system/tools/index.js +17 -0
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/subscription-info.schema.d.ts +114 -0
- package/build/backend/models/subscription-info.schema.d.ts.map +1 -0
- package/build/backend/models/subscription-info.schema.js +31 -0
- package/build/frontend/api/controllers/subscriptions.js +2 -0
- package/build/frontend/api/controllers/system.js +3 -0
- package/build/frontend/api/routes.js +5 -0
- package/build/frontend/commands/subscription/get-subscription-info-by-short-uuid.command.js +3 -28
- package/build/frontend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.js +19 -0
- package/build/frontend/commands/subscriptions/get-by/get-subscription-by-username.command.js +3 -21
- package/build/frontend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +19 -0
- package/build/frontend/commands/subscriptions/get-by/index.js +2 -0
- package/build/frontend/commands/system/index.js +1 -0
- package/build/frontend/commands/system/tools/generate-x25519-command.js +20 -0
- package/build/frontend/commands/system/tools/index.js +17 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/subscription-info.schema.js +31 -0
- package/package.json +1 -1
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionByShortUuidProtectedCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const constants_1 = require("../../../constants");
|
8
|
+
var GetSubscriptionByShortUuidProtectedCommand;
|
9
|
+
(function (GetSubscriptionByShortUuidProtectedCommand) {
|
10
|
+
GetSubscriptionByShortUuidProtectedCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.SHORT_UUID;
|
11
|
+
GetSubscriptionByShortUuidProtectedCommand.TSQ_url = GetSubscriptionByShortUuidProtectedCommand.url(':shortUuid');
|
12
|
+
GetSubscriptionByShortUuidProtectedCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID(':shortUuid'), 'get', 'Get subscription by short uuid (protected route)');
|
13
|
+
GetSubscriptionByShortUuidProtectedCommand.RequestSchema = zod_1.z.object({
|
14
|
+
shortUuid: zod_1.z.string(),
|
15
|
+
});
|
16
|
+
GetSubscriptionByShortUuidProtectedCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
18
|
+
});
|
19
|
+
})(GetSubscriptionByShortUuidProtectedCommand || (exports.GetSubscriptionByShortUuidProtectedCommand = GetSubscriptionByShortUuidProtectedCommand = {}));
|
package/build/frontend/commands/subscriptions/get-by/get-subscription-by-username.command.js
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.GetSubscriptionByUsernameCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const constants_1 = require("../../../constants");
|
6
5
|
const api_1 = require("../../../api");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const constants_1 = require("../../../constants");
|
7
8
|
var GetSubscriptionByUsernameCommand;
|
8
9
|
(function (GetSubscriptionByUsernameCommand) {
|
9
10
|
GetSubscriptionByUsernameCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.USERNAME;
|
@@ -13,25 +14,6 @@ var GetSubscriptionByUsernameCommand;
|
|
13
14
|
username: zod_1.z.string(),
|
14
15
|
});
|
15
16
|
GetSubscriptionByUsernameCommand.ResponseSchema = zod_1.z.object({
|
16
|
-
response:
|
17
|
-
isFound: zod_1.z.boolean(),
|
18
|
-
user: zod_1.z.object({
|
19
|
-
shortUuid: zod_1.z.string(),
|
20
|
-
daysLeft: zod_1.z.number(),
|
21
|
-
trafficUsed: zod_1.z.string(),
|
22
|
-
trafficLimit: zod_1.z.string(),
|
23
|
-
username: zod_1.z.string(),
|
24
|
-
expiresAt: zod_1.z
|
25
|
-
.string()
|
26
|
-
.datetime()
|
27
|
-
.transform((str) => new Date(str)),
|
28
|
-
isActive: zod_1.z.boolean(),
|
29
|
-
userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
|
30
|
-
trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
|
31
|
-
}),
|
32
|
-
links: zod_1.z.array(zod_1.z.string()),
|
33
|
-
ssConfLinks: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
34
|
-
subscriptionUrl: zod_1.z.string(),
|
35
|
-
}),
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
36
18
|
});
|
37
19
|
})(GetSubscriptionByUsernameCommand || (exports.GetSubscriptionByUsernameCommand = GetSubscriptionByUsernameCommand = {}));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionByUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const constants_1 = require("../../../constants");
|
8
|
+
var GetSubscriptionByUuidCommand;
|
9
|
+
(function (GetSubscriptionByUuidCommand) {
|
10
|
+
GetSubscriptionByUuidCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.UUID;
|
11
|
+
GetSubscriptionByUuidCommand.TSQ_url = GetSubscriptionByUuidCommand.url(':uuid');
|
12
|
+
GetSubscriptionByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_BY.UUID(':uuid'), 'get', 'Get subscription by uuid');
|
13
|
+
GetSubscriptionByUuidCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string(),
|
15
|
+
});
|
16
|
+
GetSubscriptionByUuidCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
18
|
+
});
|
19
|
+
})(GetSubscriptionByUuidCommand || (exports.GetSubscriptionByUuidCommand = GetSubscriptionByUuidCommand = {}));
|
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./get-subscription-by-short-uuid-protected.command"), exports);
|
17
18
|
__exportStar(require("./get-subscription-by-username.command"), exports);
|
19
|
+
__exportStar(require("./get-subscription-by-uuid.command"), exports);
|
@@ -19,3 +19,4 @@ __exportStar(require("./get-nodes-metrics.command"), exports);
|
|
19
19
|
__exportStar(require("./get-nodes-statistics"), exports);
|
20
20
|
__exportStar(require("./get-remnawave-health.command"), exports);
|
21
21
|
__exportStar(require("./get-stats.command"), exports);
|
22
|
+
__exportStar(require("./tools"), exports);
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GenerateX25519Command = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var GenerateX25519Command;
|
8
|
+
(function (GenerateX25519Command) {
|
9
|
+
GenerateX25519Command.url = api_1.REST_API.SYSTEM.TOOLS.GENERATE_X25519;
|
10
|
+
GenerateX25519Command.TSQ_url = GenerateX25519Command.url;
|
11
|
+
GenerateX25519Command.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.TOOLS.GENERATE_X25519, 'get', 'Generate 30 X25519 keypairs');
|
12
|
+
GenerateX25519Command.ResponseSchema = zod_1.z.object({
|
13
|
+
response: zod_1.z.object({
|
14
|
+
keypairs: zod_1.z.array(zod_1.z.object({
|
15
|
+
publicKey: zod_1.z.string(),
|
16
|
+
privateKey: zod_1.z.string(),
|
17
|
+
})),
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
})(GenerateX25519Command || (exports.GenerateX25519Command = GenerateX25519Command = {}));
|
@@ -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("./generate-x25519-command"), exports);
|
@@ -31,5 +31,6 @@ __exportStar(require("./infra-provider.schema"), exports);
|
|
31
31
|
__exportStar(require("./internal-squad.schema"), exports);
|
32
32
|
__exportStar(require("./last-connected-node.schema"), exports);
|
33
33
|
__exportStar(require("./nodes.schema"), exports);
|
34
|
+
__exportStar(require("./subscription-info.schema"), exports);
|
34
35
|
__exportStar(require("./subscription-settings.schema"), exports);
|
35
36
|
__exportStar(require("./users.schema"), exports);
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SubscriptionInfoSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../constants");
|
6
|
+
const happ_schema_1 = require("./happ.schema");
|
7
|
+
exports.SubscriptionInfoSchema = zod_1.z.object({
|
8
|
+
isFound: zod_1.z.boolean(),
|
9
|
+
user: zod_1.z.object({
|
10
|
+
shortUuid: zod_1.z.string(),
|
11
|
+
daysLeft: zod_1.z.number(),
|
12
|
+
trafficUsed: zod_1.z.string(),
|
13
|
+
trafficLimit: zod_1.z.string(),
|
14
|
+
lifetimeTrafficUsed: zod_1.z.string(),
|
15
|
+
trafficUsedBytes: zod_1.z.string(),
|
16
|
+
trafficLimitBytes: zod_1.z.string(),
|
17
|
+
lifetimeTrafficUsedBytes: zod_1.z.string(),
|
18
|
+
username: zod_1.z.string(),
|
19
|
+
expiresAt: zod_1.z
|
20
|
+
.string()
|
21
|
+
.datetime()
|
22
|
+
.transform((str) => new Date(str)),
|
23
|
+
isActive: zod_1.z.boolean(),
|
24
|
+
userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
|
25
|
+
trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
|
26
|
+
}),
|
27
|
+
links: zod_1.z.array(zod_1.z.string()),
|
28
|
+
ssConfLinks: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
29
|
+
subscriptionUrl: zod_1.z.string(),
|
30
|
+
happ: happ_schema_1.HappSchema,
|
31
|
+
});
|