@remnawave/backend-contract 2.0.0-alpha.3 → 2.0.0-alpha.31
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/index.d.ts +1 -0
- package/build/backend/api/controllers/index.d.ts.map +1 -1
- package/build/backend/api/controllers/index.js +1 -0
- package/build/backend/api/controllers/infra-billing.d.ts +16 -0
- package/build/backend/api/controllers/infra-billing.d.ts.map +1 -0
- package/build/backend/api/controllers/infra-billing.js +18 -0
- package/build/backend/api/controllers/internal-squads.d.ts +4 -0
- package/build/backend/api/controllers/internal-squads.d.ts.map +1 -1
- package/build/backend/api/controllers/internal-squads.js +5 -0
- package/build/backend/api/controllers/users.d.ts +1 -0
- package/build/backend/api/controllers/users.d.ts.map +1 -1
- package/build/backend/api/controllers/users.js +1 -0
- package/build/backend/api/routes.d.ts +19 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +19 -0
- package/build/backend/commands/config-profiles/create-config-profile.command.js +2 -2
- package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts +31 -10
- package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/create.command.d.ts +52 -19
- package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/create.command.js +13 -13
- package/build/backend/commands/hosts/get-all.command.d.ts +31 -10
- package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/get-one.command.d.ts +31 -10
- package/build/backend/commands/hosts/get-one.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/reorder.command.d.ts +11 -2
- package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/update.command.d.ts +63 -21
- package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/update.command.js +10 -11
- package/build/backend/commands/index.d.ts +1 -0
- package/build/backend/commands/index.d.ts.map +1 -1
- package/build/backend/commands/index.js +1 -0
- package/build/backend/commands/infra-billing/create-bill-record.command.d.ts +125 -0
- package/build/backend/commands/infra-billing/create-bill-record.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/create-bill-record.command.js +30 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +467 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.js +38 -0
- package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +123 -0
- package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/create-infra-provider.command.js +24 -0
- package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts +119 -0
- package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +461 -0
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
- package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts +33 -0
- package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
- package/build/backend/commands/infra-billing/get-bill-records.command.d.ts +122 -0
- package/build/backend/commands/infra-billing/get-bill-records.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/get-bill-records.command.js +31 -0
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +453 -0
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/get-billing-nodes.command.js +26 -0
- package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +117 -0
- package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
- package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +156 -0
- package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/get-infra-providers.command.js +19 -0
- package/build/backend/commands/infra-billing/index.d.ts +13 -0
- package/build/backend/commands/infra-billing/index.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/index.js +28 -0
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +464 -0
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/update-billing-node.command.js +35 -0
- package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +126 -0
- package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +1 -0
- package/build/backend/commands/infra-billing/update-infra-provider.command.js +26 -0
- package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.d.ts +33 -0
- package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js +20 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.d.ts +33 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.js +20 -0
- package/build/backend/commands/internal-squads/bulk-actions/index.d.ts +3 -0
- package/build/backend/commands/internal-squads/bulk-actions/index.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/bulk-actions/index.js +18 -0
- package/build/backend/commands/internal-squads/create-internal-squad.command.js +2 -2
- package/build/backend/commands/internal-squads/{get-internal-squad-by-uuid..d.ts → get-internal-squad-by-uuid.d.ts} +1 -1
- package/build/backend/commands/internal-squads/get-internal-squad-by-uuid.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/index.d.ts +2 -1
- package/build/backend/commands/internal-squads/index.d.ts.map +1 -1
- package/build/backend/commands/internal-squads/index.js +2 -1
- package/build/backend/commands/nodes/actions/disable.command.d.ts +162 -64
- package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/enable.command.d.ts +162 -64
- package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/reorder.command.d.ts +236 -88
- package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/create.command.d.ts +183 -70
- package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/create.command.js +7 -4
- package/build/backend/commands/nodes/get-all.command.d.ts +162 -64
- package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/get-one.command.d.ts +162 -64
- package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts +4 -4
- package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts +4 -4
- package/build/backend/commands/nodes/update.command.d.ts +257 -94
- package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/update.command.js +9 -4
- package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +114 -0
- package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +1 -0
- package/build/backend/commands/users/get-user-accessible-nodes.command.js +31 -0
- package/build/backend/commands/users/get-user-usage-by-range.command.d.ts +4 -4
- package/build/backend/commands/users/index.d.ts +1 -0
- package/build/backend/commands/users/index.d.ts.map +1 -1
- package/build/backend/commands/users/index.js +1 -0
- package/build/backend/constants/errors/errors.d.ts +105 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +105 -0
- package/build/backend/constants/events/events.d.ts +11 -0
- package/build/backend/constants/events/events.d.ts.map +1 -1
- package/build/backend/constants/events/events.js +10 -0
- package/build/backend/constants/headers/headers.contants.d.ts +3 -0
- package/build/backend/constants/headers/headers.contants.d.ts.map +1 -0
- package/build/backend/constants/headers/headers.contants.js +5 -0
- package/build/backend/constants/headers/index.d.ts +2 -0
- package/build/backend/constants/headers/index.d.ts.map +1 -0
- package/build/backend/constants/headers/index.js +17 -0
- package/build/backend/constants/index.d.ts +2 -0
- package/build/backend/constants/index.d.ts.map +1 -1
- package/build/backend/constants/index.js +2 -0
- package/build/backend/constants/messaging/index.d.ts +2 -0
- package/build/backend/constants/messaging/index.d.ts.map +1 -0
- package/build/backend/constants/messaging/index.js +17 -0
- package/build/backend/constants/messaging/messaging.constants.d.ts +13 -0
- package/build/backend/constants/messaging/messaging.constants.d.ts.map +1 -0
- package/build/backend/constants/messaging/messaging.constants.js +19 -0
- package/build/backend/constants/metrics/metric-names.constant.d.ts +16 -0
- package/build/backend/constants/metrics/metric-names.constant.d.ts.map +1 -1
- package/build/backend/constants/metrics/metric-names.constant.js +16 -0
- package/build/backend/constants/templates/template-keys.d.ts +1 -1
- package/build/backend/constants/templates/template-keys.d.ts.map +1 -1
- package/build/backend/constants/templates/template-keys.js +1 -0
- package/build/backend/models/{extented-users.schema.d.ts → extended-users.schema.d.ts} +1 -1
- package/build/backend/models/{extented-users.schema.d.ts.map → extended-users.schema.d.ts.map} +1 -1
- package/build/backend/models/hosts.schema.d.ts +21 -6
- package/build/backend/models/hosts.schema.d.ts.map +1 -1
- package/build/backend/models/hosts.schema.js +5 -2
- package/build/backend/models/index.d.ts +5 -1
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +5 -1
- package/build/backend/models/infra-billing-available-node.schema.d.ts +117 -0
- package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -0
- package/build/backend/models/infra-billing-available-node.schema.js +9 -0
- package/build/backend/models/infra-billing-history-record.schema.d.ts +44 -0
- package/build/backend/models/infra-billing-history-record.schema.d.ts.map +1 -0
- package/build/backend/models/infra-billing-history-record.schema.js +19 -0
- package/build/backend/models/infra-billing-node.schema.d.ts +180 -0
- package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -0
- package/build/backend/models/infra-billing-node.schema.js +34 -0
- package/build/backend/models/infra-provider.schema.d.ts +87 -0
- package/build/backend/models/infra-provider.schema.d.ts.map +1 -0
- package/build/backend/models/infra-provider.schema.js +41 -0
- package/build/backend/models/nodes.schema.d.ts +118 -44
- package/build/backend/models/nodes.schema.d.ts.map +1 -1
- package/build/backend/models/nodes.schema.js +8 -2
- package/build/frontend/api/controllers/index.js +1 -0
- package/build/frontend/api/controllers/infra-billing.js +18 -0
- package/build/frontend/api/controllers/internal-squads.js +5 -0
- package/build/frontend/api/controllers/users.js +1 -0
- package/build/frontend/api/routes.js +19 -0
- package/build/frontend/commands/config-profiles/create-config-profile.command.js +2 -2
- package/build/frontend/commands/hosts/create.command.js +13 -13
- package/build/frontend/commands/hosts/update.command.js +10 -11
- package/build/frontend/commands/index.js +1 -0
- package/build/frontend/commands/infra-billing/create-bill-record.command.js +30 -0
- package/build/frontend/commands/infra-billing/create-billing-node.command.js +38 -0
- package/build/frontend/commands/infra-billing/create-infra-provider.command.js +24 -0
- package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
- package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
- package/build/frontend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
- package/build/frontend/commands/infra-billing/get-bill-records.command.js +31 -0
- package/build/frontend/commands/infra-billing/get-billing-nodes.command.js +26 -0
- package/build/frontend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
- package/build/frontend/commands/infra-billing/get-infra-providers.command.js +19 -0
- package/build/frontend/commands/infra-billing/index.js +28 -0
- package/build/frontend/commands/infra-billing/update-billing-node.command.js +35 -0
- package/build/frontend/commands/infra-billing/update-infra-provider.command.js +26 -0
- package/build/frontend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js +20 -0
- package/build/frontend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.js +20 -0
- package/build/frontend/commands/internal-squads/bulk-actions/index.js +18 -0
- package/build/frontend/commands/internal-squads/create-internal-squad.command.js +2 -2
- package/build/frontend/commands/internal-squads/index.js +2 -1
- package/build/frontend/commands/nodes/create.command.js +7 -4
- package/build/frontend/commands/nodes/update.command.js +9 -4
- package/build/frontend/commands/users/get-user-accessible-nodes.command.js +31 -0
- package/build/frontend/commands/users/index.js +1 -0
- package/build/frontend/constants/errors/errors.js +105 -0
- package/build/frontend/constants/events/events.js +10 -0
- package/build/frontend/constants/headers/headers.contants.js +5 -0
- package/build/frontend/constants/headers/index.js +17 -0
- package/build/frontend/constants/index.js +2 -0
- package/build/frontend/constants/messaging/index.js +17 -0
- package/build/frontend/constants/messaging/messaging.constants.js +19 -0
- package/build/frontend/constants/metrics/metric-names.constant.js +16 -0
- package/build/frontend/constants/templates/template-keys.js +1 -0
- package/build/frontend/models/hosts.schema.js +5 -2
- package/build/frontend/models/index.js +5 -1
- package/build/frontend/models/infra-billing-available-node.schema.js +9 -0
- package/build/frontend/models/infra-billing-history-record.schema.js +19 -0
- package/build/frontend/models/infra-billing-node.schema.js +34 -0
- package/build/frontend/models/infra-provider.schema.js +41 -0
- package/build/frontend/models/nodes.schema.js +8 -2
- package/package.json +2 -2
- package/build/backend/commands/internal-squads/get-internal-squad-by-uuid..d.ts.map +0 -1
- /package/build/backend/commands/internal-squads/{get-internal-squad-by-uuid..js → get-internal-squad-by-uuid.js} +0 -0
- /package/build/backend/models/{extented-users.schema.js → extended-users.schema.js} +0 -0
- /package/build/frontend/commands/internal-squads/{get-internal-squad-by-uuid..js → get-internal-squad-by-uuid.js} +0 -0
- /package/build/frontend/models/{extented-users.schema.js → extended-users.schema.js} +0 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetInfraBillingNodesCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const models_1 = require("../../models");
|
6
|
+
const api_1 = require("../../api");
|
7
|
+
const constants_1 = require("../../constants");
|
8
|
+
var GetInfraBillingNodesCommand;
|
9
|
+
(function (GetInfraBillingNodesCommand) {
|
10
|
+
GetInfraBillingNodesCommand.url = api_1.REST_API.INFRA_BILLING.GET_BILLING_NODES;
|
11
|
+
GetInfraBillingNodesCommand.TSQ_url = GetInfraBillingNodesCommand.url;
|
12
|
+
GetInfraBillingNodesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.GET_BILLING_NODES, 'get', 'Get infra billing nodes');
|
13
|
+
GetInfraBillingNodesCommand.ResponseSchema = zod_1.z.object({
|
14
|
+
response: zod_1.z.object({
|
15
|
+
totalBillingNodes: zod_1.z.number(),
|
16
|
+
billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
|
17
|
+
availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
|
18
|
+
totalAvailableBillingNodes: zod_1.z.number(),
|
19
|
+
stats: zod_1.z.object({
|
20
|
+
upcomingNodesCount: zod_1.z.number(),
|
21
|
+
currentMonthPayments: zod_1.z.number(),
|
22
|
+
totalSpent: zod_1.z.number(),
|
23
|
+
}),
|
24
|
+
}),
|
25
|
+
});
|
26
|
+
})(GetInfraBillingNodesCommand || (exports.GetInfraBillingNodesCommand = GetInfraBillingNodesCommand = {}));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetInfraProviderByUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const constants_1 = require("../../constants");
|
7
|
+
const models_1 = require("../../models");
|
8
|
+
var GetInfraProviderByUuidCommand;
|
9
|
+
(function (GetInfraProviderByUuidCommand) {
|
10
|
+
GetInfraProviderByUuidCommand.url = api_1.REST_API.INFRA_BILLING.GET_PROVIDER_BY_UUID(':uuid');
|
11
|
+
GetInfraProviderByUuidCommand.TSQ_url = GetInfraProviderByUuidCommand.url;
|
12
|
+
GetInfraProviderByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.GET_PROVIDER_BY_UUID(':uuid'), 'get', 'Get infra provider by uuid');
|
13
|
+
GetInfraProviderByUuidCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
15
|
+
});
|
16
|
+
GetInfraProviderByUuidCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: models_1.InfraProviderSchema,
|
18
|
+
});
|
19
|
+
})(GetInfraProviderByUuidCommand || (exports.GetInfraProviderByUuidCommand = GetInfraProviderByUuidCommand = {}));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetInfraProvidersCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const constants_1 = require("../../constants");
|
7
|
+
const models_1 = require("../../models");
|
8
|
+
var GetInfraProvidersCommand;
|
9
|
+
(function (GetInfraProvidersCommand) {
|
10
|
+
GetInfraProvidersCommand.url = api_1.REST_API.INFRA_BILLING.GET_PROVIDERS;
|
11
|
+
GetInfraProvidersCommand.TSQ_url = GetInfraProvidersCommand.url;
|
12
|
+
GetInfraProvidersCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.GET_PROVIDERS, 'get', 'Get all infra providers');
|
13
|
+
GetInfraProvidersCommand.ResponseSchema = zod_1.z.object({
|
14
|
+
response: zod_1.z.object({
|
15
|
+
total: zod_1.z.number(),
|
16
|
+
providers: zod_1.z.array(models_1.InfraProviderSchema),
|
17
|
+
}),
|
18
|
+
});
|
19
|
+
})(GetInfraProvidersCommand || (exports.GetInfraProvidersCommand = GetInfraProvidersCommand = {}));
|
@@ -0,0 +1,28 @@
|
|
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("./create-bill-record.command"), exports);
|
18
|
+
__exportStar(require("./create-billing-node.command"), exports);
|
19
|
+
__exportStar(require("./create-infra-provider.command"), exports);
|
20
|
+
__exportStar(require("./delete-bill-record-by-uuid.command"), exports);
|
21
|
+
__exportStar(require("./delete-billing-node-by-uuid.command"), exports);
|
22
|
+
__exportStar(require("./delete-infra-provider-by-uuid.command"), exports);
|
23
|
+
__exportStar(require("./get-bill-records.command"), exports);
|
24
|
+
__exportStar(require("./get-billing-nodes.command"), exports);
|
25
|
+
__exportStar(require("./get-infra-provider-by-uuid.command"), exports);
|
26
|
+
__exportStar(require("./get-infra-providers.command"), exports);
|
27
|
+
__exportStar(require("./update-billing-node.command"), exports);
|
28
|
+
__exportStar(require("./update-infra-provider.command"), exports);
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateInfraBillingNodeCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const models_1 = require("../../models");
|
6
|
+
const api_1 = require("../../api");
|
7
|
+
const constants_1 = require("../../constants");
|
8
|
+
var UpdateInfraBillingNodeCommand;
|
9
|
+
(function (UpdateInfraBillingNodeCommand) {
|
10
|
+
UpdateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_BILLING_NODE;
|
11
|
+
UpdateInfraBillingNodeCommand.TSQ_url = UpdateInfraBillingNodeCommand.url;
|
12
|
+
UpdateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE, 'patch', 'Update infra billing node');
|
13
|
+
UpdateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
15
|
+
nextBillingAt: zod_1.z
|
16
|
+
.string({
|
17
|
+
invalid_type_error: 'Invalid date format',
|
18
|
+
})
|
19
|
+
.datetime({ message: 'Invalid date format', offset: true, local: true })
|
20
|
+
.transform((str) => new Date(str)),
|
21
|
+
});
|
22
|
+
UpdateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
|
23
|
+
response: zod_1.z.object({
|
24
|
+
totalBillingNodes: zod_1.z.number(),
|
25
|
+
billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
|
26
|
+
availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
|
27
|
+
totalAvailableBillingNodes: zod_1.z.number(),
|
28
|
+
stats: zod_1.z.object({
|
29
|
+
upcomingNodesCount: zod_1.z.number(),
|
30
|
+
currentMonthPayments: zod_1.z.number(),
|
31
|
+
totalSpent: zod_1.z.number(),
|
32
|
+
}),
|
33
|
+
}),
|
34
|
+
});
|
35
|
+
})(UpdateInfraBillingNodeCommand || (exports.UpdateInfraBillingNodeCommand = UpdateInfraBillingNodeCommand = {}));
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateInfraProviderCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const constants_1 = require("../../constants");
|
7
|
+
const models_1 = require("../../models");
|
8
|
+
var UpdateInfraProviderCommand;
|
9
|
+
(function (UpdateInfraProviderCommand) {
|
10
|
+
UpdateInfraProviderCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_PROVIDER;
|
11
|
+
UpdateInfraProviderCommand.TSQ_url = UpdateInfraProviderCommand.url;
|
12
|
+
UpdateInfraProviderCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_PROVIDER, 'patch', 'Update infra provider');
|
13
|
+
UpdateInfraProviderCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
15
|
+
name: zod_1.z
|
16
|
+
.string()
|
17
|
+
.min(2, 'Name must be at least 2 characters')
|
18
|
+
.max(30, 'Name must be less than 30 characters')
|
19
|
+
.optional(),
|
20
|
+
faviconLink: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().url())),
|
21
|
+
loginUrl: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().url())),
|
22
|
+
});
|
23
|
+
UpdateInfraProviderCommand.ResponseSchema = zod_1.z.object({
|
24
|
+
response: models_1.InfraProviderSchema,
|
25
|
+
});
|
26
|
+
})(UpdateInfraProviderCommand || (exports.UpdateInfraProviderCommand = UpdateInfraProviderCommand = {}));
|
package/build/frontend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AddUsersToInternalSquadCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const constants_1 = require("../../../constants");
|
7
|
+
var AddUsersToInternalSquadCommand;
|
8
|
+
(function (AddUsersToInternalSquadCommand) {
|
9
|
+
AddUsersToInternalSquadCommand.url = api_1.REST_API.INTERNAL_SQUADS.BULK_ACTIONS.ADD_USERS;
|
10
|
+
AddUsersToInternalSquadCommand.TSQ_url = AddUsersToInternalSquadCommand.url(':uuid');
|
11
|
+
AddUsersToInternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(':uuid'), 'post', 'Add all users to internal squad');
|
12
|
+
AddUsersToInternalSquadCommand.RequestSchema = zod_1.z.object({
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
14
|
+
});
|
15
|
+
AddUsersToInternalSquadCommand.ResponseSchema = zod_1.z.object({
|
16
|
+
response: zod_1.z.object({
|
17
|
+
eventSent: zod_1.z.boolean(),
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
})(AddUsersToInternalSquadCommand || (exports.AddUsersToInternalSquadCommand = AddUsersToInternalSquadCommand = {}));
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DeleteUsersFromInternalSquadCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const constants_1 = require("../../../constants");
|
7
|
+
var DeleteUsersFromInternalSquadCommand;
|
8
|
+
(function (DeleteUsersFromInternalSquadCommand) {
|
9
|
+
DeleteUsersFromInternalSquadCommand.url = api_1.REST_API.INTERNAL_SQUADS.BULK_ACTIONS.REMOVE_USERS;
|
10
|
+
DeleteUsersFromInternalSquadCommand.TSQ_url = DeleteUsersFromInternalSquadCommand.url(':uuid');
|
11
|
+
DeleteUsersFromInternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(':uuid'), 'delete', 'Delete users from internal squad');
|
12
|
+
DeleteUsersFromInternalSquadCommand.RequestSchema = zod_1.z.object({
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
14
|
+
});
|
15
|
+
DeleteUsersFromInternalSquadCommand.ResponseSchema = zod_1.z.object({
|
16
|
+
response: zod_1.z.object({
|
17
|
+
eventSent: zod_1.z.boolean(),
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
})(DeleteUsersFromInternalSquadCommand || (exports.DeleteUsersFromInternalSquadCommand = DeleteUsersFromInternalSquadCommand = {}));
|
@@ -0,0 +1,18 @@
|
|
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("./add-users-to-internal-squad.command"), exports);
|
18
|
+
__exportStar(require("./delete-users-from-internal-squad.command"), exports);
|
@@ -13,8 +13,8 @@ var CreateInternalSquadCommand;
|
|
13
13
|
CreateInternalSquadCommand.RequestSchema = zod_1.z.object({
|
14
14
|
name: zod_1.z
|
15
15
|
.string()
|
16
|
-
.min(
|
17
|
-
.max(
|
16
|
+
.min(2, 'Name must be at least 2 characters')
|
17
|
+
.max(20, 'Name must be less than 20 characters')
|
18
18
|
.regex(/^[A-Za-z0-9_-]+$/, 'Name can only contain letters, numbers, underscores and dashes'),
|
19
19
|
inbounds: zod_1.z.array(zod_1.z.string().uuid()),
|
20
20
|
});
|
@@ -14,8 +14,9 @@ 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("./bulk-actions"), exports);
|
17
18
|
__exportStar(require("./create-internal-squad.command"), exports);
|
18
19
|
__exportStar(require("./delete-internal-squad.command"), exports);
|
19
|
-
__exportStar(require("./get-internal-squad-by-uuid
|
20
|
+
__exportStar(require("./get-internal-squad-by-uuid"), exports);
|
20
21
|
__exportStar(require("./get-internal-squads.command"), exports);
|
21
22
|
__exportStar(require("./update-internal-squad.command"), exports);
|
@@ -35,10 +35,13 @@ var CreateNodeCommand;
|
|
35
35
|
.number()
|
36
36
|
.min(0.1, 'Consumption multiplier must be greater than 0')
|
37
37
|
.transform((n) => Number(n.toFixed(1)))),
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
configProfile: zod_1.z.object({
|
39
|
+
activeConfigProfileUuid: zod_1.z.string().uuid(),
|
40
|
+
activeInbounds: zod_1.z.array(zod_1.z.string().uuid(), {
|
41
|
+
invalid_type_error: 'Config profile inbound UUID must be an array of UUIDs',
|
42
|
+
}),
|
43
|
+
}),
|
44
|
+
providerUuid: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().uuid())),
|
42
45
|
});
|
43
46
|
CreateNodeCommand.ResponseSchema = zod_1.z.object({
|
44
47
|
response: models_1.NodesSchema,
|
@@ -31,10 +31,15 @@ var UpdateNodeCommand;
|
|
31
31
|
.number()
|
32
32
|
.min(0.1, 'Consumption multiplier must be greater than 0')
|
33
33
|
.transform((n) => Number(n.toFixed(1)))),
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
configProfile: zod_1.z
|
35
|
+
.object({
|
36
|
+
activeConfigProfileUuid: zod_1.z.string().uuid(),
|
37
|
+
activeInbounds: zod_1.z.array(zod_1.z.string().uuid(), {
|
38
|
+
invalid_type_error: 'Must be an array of UUIDs',
|
39
|
+
}),
|
40
|
+
})
|
41
|
+
.optional(),
|
42
|
+
providerUuid: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().uuid())),
|
38
43
|
});
|
39
44
|
UpdateNodeCommand.ResponseSchema = zod_1.z.object({
|
40
45
|
response: models_1.NodesSchema,
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetUserAccessibleNodesCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../constants");
|
6
|
+
const api_1 = require("../../api");
|
7
|
+
var GetUserAccessibleNodesCommand;
|
8
|
+
(function (GetUserAccessibleNodesCommand) {
|
9
|
+
GetUserAccessibleNodesCommand.url = api_1.REST_API.USERS.ACCESSIBLE_NODES;
|
10
|
+
GetUserAccessibleNodesCommand.TSQ_url = GetUserAccessibleNodesCommand.url(':uuid');
|
11
|
+
GetUserAccessibleNodesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.ACCESSIBLE_NODES(':uuid'), 'get', 'Get user accessible nodes');
|
12
|
+
GetUserAccessibleNodesCommand.RequestSchema = zod_1.z.object({
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
14
|
+
});
|
15
|
+
GetUserAccessibleNodesCommand.ResponseSchema = zod_1.z.object({
|
16
|
+
response: zod_1.z.object({
|
17
|
+
userUuid: zod_1.z.string().uuid(),
|
18
|
+
activeNodes: zod_1.z.array(zod_1.z.object({
|
19
|
+
uuid: zod_1.z.string().uuid(),
|
20
|
+
nodeName: zod_1.z.string(),
|
21
|
+
countryCode: zod_1.z.string(),
|
22
|
+
configProfileUuid: zod_1.z.string().uuid(),
|
23
|
+
configProfileName: zod_1.z.string(),
|
24
|
+
activeSquads: zod_1.z.array(zod_1.z.object({
|
25
|
+
squadName: zod_1.z.string(),
|
26
|
+
activeInbounds: zod_1.z.array(zod_1.z.string()),
|
27
|
+
})),
|
28
|
+
})),
|
29
|
+
}),
|
30
|
+
});
|
31
|
+
})(GetUserAccessibleNodesCommand || (exports.GetUserAccessibleNodesCommand = GetUserAccessibleNodesCommand = {}));
|
@@ -21,6 +21,7 @@ __exportStar(require("./create-user.command"), exports);
|
|
21
21
|
__exportStar(require("./delete-user.command"), exports);
|
22
22
|
__exportStar(require("./get-all-users.command"), exports);
|
23
23
|
__exportStar(require("./get-by"), exports);
|
24
|
+
__exportStar(require("./get-user-accessible-nodes.command"), exports);
|
24
25
|
__exportStar(require("./get-user-by-uuid.command"), exports);
|
25
26
|
__exportStar(require("./get-user-usage-by-range.command"), exports);
|
26
27
|
__exportStar(require("./tags"), exports);
|
@@ -620,4 +620,109 @@ exports.ERRORS = {
|
|
620
620
|
message: 'Config profile inbound not found in specified profile',
|
621
621
|
httpCode: 404,
|
622
622
|
},
|
623
|
+
GET_USER_ACCESSIBLE_NODES_ERROR: {
|
624
|
+
code: 'A125',
|
625
|
+
message: 'Get user accessible nodes error',
|
626
|
+
httpCode: 500,
|
627
|
+
},
|
628
|
+
GET_INFRA_PROVIDERS_ERROR: {
|
629
|
+
code: 'A126',
|
630
|
+
message: 'Get infra providers error',
|
631
|
+
httpCode: 500,
|
632
|
+
},
|
633
|
+
GET_INFRA_PROVIDER_BY_UUID_ERROR: {
|
634
|
+
code: 'A127',
|
635
|
+
message: 'Get infra provider by UUID error',
|
636
|
+
httpCode: 500,
|
637
|
+
},
|
638
|
+
INFRA_PROVIDER_NOT_FOUND: {
|
639
|
+
code: 'A128',
|
640
|
+
message: 'Infra provider not found',
|
641
|
+
httpCode: 404,
|
642
|
+
},
|
643
|
+
DELETE_INFRA_PROVIDER_BY_UUID_ERROR: {
|
644
|
+
code: 'A129',
|
645
|
+
message: 'Delete infra provider by UUID error',
|
646
|
+
httpCode: 500,
|
647
|
+
},
|
648
|
+
CREATE_INFRA_PROVIDER_ERROR: {
|
649
|
+
code: 'A130',
|
650
|
+
message: 'Create infra provider error',
|
651
|
+
httpCode: 500,
|
652
|
+
},
|
653
|
+
UPDATE_INFRA_PROVIDER_ERROR: {
|
654
|
+
code: 'A131',
|
655
|
+
message: 'Update infra provider error',
|
656
|
+
httpCode: 500,
|
657
|
+
},
|
658
|
+
CREATE_INFRA_BILLING_HISTORY_RECORD_ERROR: {
|
659
|
+
code: 'A132',
|
660
|
+
message: 'Create infra billing history record error',
|
661
|
+
httpCode: 500,
|
662
|
+
},
|
663
|
+
GET_INFRA_BILLING_HISTORY_RECORDS_ERROR: {
|
664
|
+
code: 'A133',
|
665
|
+
message: 'Get infra billing history records error',
|
666
|
+
httpCode: 500,
|
667
|
+
},
|
668
|
+
DELETE_INFRA_BILLING_HISTORY_RECORD_BY_UUID_ERROR: {
|
669
|
+
code: 'A134',
|
670
|
+
message: 'Delete infra billing history record by UUID error',
|
671
|
+
httpCode: 500,
|
672
|
+
},
|
673
|
+
GET_BILLING_NODES_ERROR: {
|
674
|
+
code: 'A135',
|
675
|
+
message: 'Get billing nodes error',
|
676
|
+
httpCode: 500,
|
677
|
+
},
|
678
|
+
UPDATE_INFRA_BILLING_NODE_ERROR: {
|
679
|
+
code: 'A136',
|
680
|
+
message: 'Update infra billing node error',
|
681
|
+
httpCode: 500,
|
682
|
+
},
|
683
|
+
CREATE_INFRA_BILLING_NODE_ERROR: {
|
684
|
+
code: 'A137',
|
685
|
+
message: 'Create infra billing node error',
|
686
|
+
httpCode: 500,
|
687
|
+
},
|
688
|
+
DELETE_INFRA_BILLING_NODE_BY_UUID_ERROR: {
|
689
|
+
code: 'A138',
|
690
|
+
message: 'Delete infra billing node by UUID error',
|
691
|
+
httpCode: 500,
|
692
|
+
},
|
693
|
+
GET_BILLING_NODES_FOR_NOTIFICATIONS_ERROR: {
|
694
|
+
code: 'A139',
|
695
|
+
message: 'Get billing nodes for notifications error',
|
696
|
+
httpCode: 500,
|
697
|
+
},
|
698
|
+
ADD_USERS_TO_INTERNAL_SQUAD_ERROR: {
|
699
|
+
code: 'A140',
|
700
|
+
message: 'Add users to internal squad error',
|
701
|
+
httpCode: 500,
|
702
|
+
},
|
703
|
+
INTERNAL_SQUAD_BULK_ACTIONS_ERROR: {
|
704
|
+
code: 'A141',
|
705
|
+
message: 'Internal squad bulk actions error',
|
706
|
+
httpCode: 500,
|
707
|
+
},
|
708
|
+
REMOVE_USERS_FROM_INTERNAL_SQUAD_ERROR: {
|
709
|
+
code: 'A142',
|
710
|
+
message: 'Remove users from internal squad error',
|
711
|
+
httpCode: 500,
|
712
|
+
},
|
713
|
+
DELETE_CONFIG_PROFILE_BY_UUID_ERROR: {
|
714
|
+
code: 'A143',
|
715
|
+
message: 'Delete config profile by UUID error',
|
716
|
+
httpCode: 500,
|
717
|
+
},
|
718
|
+
RESERVED_INTERNAL_SQUAD_NAME: {
|
719
|
+
code: 'A144',
|
720
|
+
message: 'This name is reserved by Remnawave. Please use a different name.',
|
721
|
+
httpCode: 400,
|
722
|
+
},
|
723
|
+
RESERVED_CONFIG_PROFILE_NAME: {
|
724
|
+
code: 'A145',
|
725
|
+
message: 'This name is reserved by Remnawave. Please use a different name.',
|
726
|
+
httpCode: 400,
|
727
|
+
},
|
623
728
|
};
|
@@ -39,8 +39,18 @@ exports.EVENTS = {
|
|
39
39
|
ERRORS: {
|
40
40
|
BANDWIDTH_USAGE_THRESHOLD_REACHED_MAX_NOTIFICATIONS: 'errors.bandwidth_usage_threshold_reached_max_notifications',
|
41
41
|
},
|
42
|
+
CRM: {
|
43
|
+
INFRA_BILLING_NODE_PAYMENT_IN_7_DAYS: 'crm.infra_billing_node_payment_in_7_days',
|
44
|
+
INFRA_BILLING_NODE_PAYMENT_IN_48HRS: 'crm.infra_billing_node_payment_in_48hrs',
|
45
|
+
INFRA_BILLING_NODE_PAYMENT_IN_24HRS: 'crm.infra_billing_node_payment_in_24hrs',
|
46
|
+
INFRA_BILLING_NODE_PAYMENT_DUE_TODAY: 'crm.infra_billing_node_payment_due_today',
|
47
|
+
INFRA_BILLING_NODE_PAYMENT_OVERDUE_24HRS: 'crm.infra_billing_node_payment_overdue_24hrs',
|
48
|
+
INFRA_BILLING_NODE_PAYMENT_OVERDUE_48HRS: 'crm.infra_billing_node_payment_overdue_48hrs',
|
49
|
+
INFRA_BILLING_NODE_PAYMENT_OVERDUE_7_DAYS: 'crm.infra_billing_node_payment_overdue_7_days',
|
50
|
+
},
|
42
51
|
CATCH_ALL_USER_EVENTS: 'user.*',
|
43
52
|
CATCH_ALL_NODE_EVENTS: 'node.*',
|
44
53
|
CATCH_ALL_SERVICE_EVENTS: 'service.*',
|
45
54
|
CATCH_ALL_ERRORS_EVENTS: 'errors.*',
|
55
|
+
CATCH_ALL_CRM_EVENTS: 'crm.*',
|
46
56
|
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.REMNAWAVE_CLIENT_TYPE_BROWSER = exports.REMNAWAVE_CLIENT_TYPE_HEADER = void 0;
|
4
|
+
exports.REMNAWAVE_CLIENT_TYPE_HEADER = 'X-Remnawave-Client-Type';
|
5
|
+
exports.REMNAWAVE_CLIENT_TYPE_BROWSER = 'browser';
|
@@ -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("./headers.contants"), exports);
|
@@ -17,7 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./endpoint-details"), exports);
|
18
18
|
__exportStar(require("./errors"), exports);
|
19
19
|
__exportStar(require("./events"), exports);
|
20
|
+
__exportStar(require("./headers"), exports);
|
20
21
|
__exportStar(require("./hosts"), exports);
|
22
|
+
__exportStar(require("./messaging"), exports);
|
21
23
|
__exportStar(require("./metrics"), exports);
|
22
24
|
__exportStar(require("./nodes"), exports);
|
23
25
|
__exportStar(require("./roles"), exports);
|
@@ -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("./messaging.constants"), exports);
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.MessagingMessages = exports.MessagingQueues = exports.MessagingBuses = exports.MessagingChannels = void 0;
|
4
|
+
var MessagingChannels;
|
5
|
+
(function (MessagingChannels) {
|
6
|
+
MessagingChannels["EVENT"] = "redis-event";
|
7
|
+
})(MessagingChannels || (exports.MessagingChannels = MessagingChannels = {}));
|
8
|
+
var MessagingBuses;
|
9
|
+
(function (MessagingBuses) {
|
10
|
+
MessagingBuses["EVENT"] = "event.bus";
|
11
|
+
})(MessagingBuses || (exports.MessagingBuses = MessagingBuses = {}));
|
12
|
+
var MessagingQueues;
|
13
|
+
(function (MessagingQueues) {
|
14
|
+
MessagingQueues["EVENT"] = "event-queue";
|
15
|
+
})(MessagingQueues || (exports.MessagingQueues = MessagingQueues = {}));
|
16
|
+
var MessagingMessages;
|
17
|
+
(function (MessagingMessages) {
|
18
|
+
MessagingMessages["NODE_METRICS"] = "node.metrics";
|
19
|
+
})(MessagingMessages || (exports.MessagingMessages = MessagingMessages = {}));
|
@@ -6,4 +6,20 @@ exports.METRIC_NAMES = {
|
|
6
6
|
NODE_STATUS: 'node_status',
|
7
7
|
USERS_STATUS: 'users_status',
|
8
8
|
USERS_TOTAL: 'users_total',
|
9
|
+
NODE_INBOUND_UPLOAD_BYTES: 'node_inbound_upload_bytes',
|
10
|
+
NODE_INBOUND_DOWNLOAD_BYTES: 'node_inbound_download_bytes',
|
11
|
+
NODE_OUTBOUND_UPLOAD_BYTES: 'node_outbound_upload_bytes',
|
12
|
+
NODE_OUTBOUND_DOWNLOAD_BYTES: 'node_outbound_download_bytes',
|
13
|
+
NODEJS_HEAP_USED_BYTES: 'nodejs_heap_used_bytes',
|
14
|
+
NODEJS_HEAP_TOTAL_BYTES: 'nodejs_heap_total_bytes',
|
15
|
+
NODEJS_HEAP_USAGE_PERCENT: 'nodejs_heap_usage_percent',
|
16
|
+
NODEJS_ACTIVE_HANDLERS: 'nodejs_active_handlers',
|
17
|
+
NODEJS_ACTIVE_REQUESTS: 'nodejs_active_requests',
|
18
|
+
NODEJS_CPU_USAGE_PERCENT: 'nodejs_cpu_usage_percent',
|
19
|
+
NODEJS_MEMORY_USAGE_BYTES: 'nodejs_memory_usage_bytes',
|
20
|
+
NODEJS_EVENT_LOOP_LATENCY_P50: 'nodejs_event_loop_latency_p50',
|
21
|
+
NODEJS_EVENT_LOOP_LATENCY_P95: 'nodejs_event_loop_latency_p95',
|
22
|
+
NODEJS_HTTP_REQ_RATE: 'nodejs_http_req_rate',
|
23
|
+
NODEJS_HTTP_REQ_LATENCY_P95: 'nodejs_http_req_latency_p95',
|
24
|
+
NODEJS_HTTP_REQ_LATENCY_P50: 'nodejs_http_req_latency_p50',
|
9
25
|
};
|
@@ -17,6 +17,9 @@ exports.HostsSchema = zod_1.z.object({
|
|
17
17
|
isDisabled: zod_1.z.boolean().default(false),
|
18
18
|
securityLayer: zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS).default(hosts_1.SECURITY_LAYERS.DEFAULT),
|
19
19
|
xHttpExtraParams: zod_1.z.nullable(zod_1.z.unknown()),
|
20
|
-
|
21
|
-
|
20
|
+
inbound: zod_1.z.object({
|
21
|
+
configProfileUuid: zod_1.z.string().uuid().nullable(),
|
22
|
+
configProfileInboundUuid: zod_1.z.string().uuid().nullable(),
|
23
|
+
}),
|
24
|
+
serverDescription: zod_1.z.string().nullable(),
|
22
25
|
});
|
@@ -20,10 +20,14 @@ __exportStar(require("./base-internal-squad.schema"), exports);
|
|
20
20
|
__exportStar(require("./base-stat.schema"), exports);
|
21
21
|
__exportStar(require("./config-profile-inbounds.schema"), exports);
|
22
22
|
__exportStar(require("./config-profile.schema"), exports);
|
23
|
-
__exportStar(require("./
|
23
|
+
__exportStar(require("./extended-users.schema"), exports);
|
24
24
|
__exportStar(require("./happ.schema"), exports);
|
25
25
|
__exportStar(require("./hosts.schema"), exports);
|
26
26
|
__exportStar(require("./hwid-user-device.schema"), exports);
|
27
|
+
__exportStar(require("./infra-billing-available-node.schema"), exports);
|
28
|
+
__exportStar(require("./infra-billing-history-record.schema"), exports);
|
29
|
+
__exportStar(require("./infra-billing-node.schema"), exports);
|
30
|
+
__exportStar(require("./infra-provider.schema"), exports);
|
27
31
|
__exportStar(require("./internal-squad.schema"), exports);
|
28
32
|
__exportStar(require("./last-connected-node.schema"), exports);
|
29
33
|
__exportStar(require("./nodes.schema"), exports);
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InfraBillingAvailableNodeSchema = void 0;
|
4
|
+
const nodes_schema_1 = require("./nodes.schema");
|
5
|
+
exports.InfraBillingAvailableNodeSchema = nodes_schema_1.NodesSchema.pick({
|
6
|
+
uuid: true,
|
7
|
+
name: true,
|
8
|
+
countryCode: true,
|
9
|
+
});
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.InfraBillingHistoryRecordSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const infra_provider_schema_1 = require("./infra-provider.schema");
|
6
|
+
exports.InfraBillingHistoryRecordSchema = zod_1.z.object({
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
8
|
+
providerUuid: zod_1.z.string().uuid(),
|
9
|
+
amount: zod_1.z.number(),
|
10
|
+
billedAt: zod_1.z
|
11
|
+
.string()
|
12
|
+
.datetime()
|
13
|
+
.transform((str) => new Date(str)),
|
14
|
+
provider: infra_provider_schema_1.PartialInfraProviderSchema.omit({
|
15
|
+
createdAt: true,
|
16
|
+
updatedAt: true,
|
17
|
+
loginUrl: true,
|
18
|
+
}),
|
19
|
+
});
|