@remnawave/backend-contract 2.0.0-alpha.10 → 2.0.0-alpha.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/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 +31 -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/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/index.d.ts +3 -0
- package/build/backend/commands/infra-billing/index.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/index.js +3 -0
- package/build/backend/commands/nodes/actions/disable.command.d.ts +36 -113
- package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/enable.command.d.ts +36 -113
- package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/reorder.command.d.ts +36 -154
- package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/create.command.d.ts +38 -115
- package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/get-all.command.d.ts +36 -113
- package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/get-one.command.d.ts +36 -113
- package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/update.command.d.ts +38 -156
- package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.d.ts +15 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +15 -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/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-provider.schema.d.ts +22 -0
- package/build/backend/models/infra-provider.schema.d.ts.map +1 -1
- package/build/backend/models/infra-provider.schema.js +15 -1
- package/build/backend/models/nodes.schema.d.ts +18 -77
- package/build/backend/models/nodes.schema.d.ts.map +1 -1
- package/build/backend/models/nodes.schema.js +1 -1
- package/build/frontend/commands/infra-billing/create-bill-record.command.js +31 -0
- package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
- package/build/frontend/commands/infra-billing/get-bill-records.command.js +31 -0
- package/build/frontend/commands/infra-billing/index.js +3 -0
- package/build/frontend/constants/errors/errors.js +15 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/infra-billing-history-record.schema.js +19 -0
- package/build/frontend/models/infra-provider.schema.js +15 -1
- package/build/frontend/models/nodes.schema.js +1 -1
- package/package.json +1 -1
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CreateInfraBillingHistoryRecordCommand = 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 CreateInfraBillingHistoryRecordCommand;
|
9
|
+
(function (CreateInfraBillingHistoryRecordCommand) {
|
10
|
+
CreateInfraBillingHistoryRecordCommand.url = api_1.REST_API.INFRA_BILLING.CREATE_BILLING_HISTORY;
|
11
|
+
CreateInfraBillingHistoryRecordCommand.TSQ_url = CreateInfraBillingHistoryRecordCommand.url;
|
12
|
+
CreateInfraBillingHistoryRecordCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY, 'post', 'Create infra billing history');
|
13
|
+
CreateInfraBillingHistoryRecordCommand.RequestSchema = zod_1.z.object({
|
14
|
+
providerUuid: zod_1.z.string().uuid(),
|
15
|
+
amount: zod_1.z.number().min(0, 'Amount must be greater than 0'),
|
16
|
+
billedAt: zod_1.z
|
17
|
+
.string({
|
18
|
+
invalid_type_error: 'Invalid date format',
|
19
|
+
})
|
20
|
+
.datetime({ message: 'Invalid date format', offset: true, local: true })
|
21
|
+
.transform((str) => new Date(str))
|
22
|
+
.optional()
|
23
|
+
.describe('Billing date. Format: 2025-01-17T15:38:45.065Z'),
|
24
|
+
});
|
25
|
+
CreateInfraBillingHistoryRecordCommand.ResponseSchema = zod_1.z.object({
|
26
|
+
response: zod_1.z.object({
|
27
|
+
records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
|
28
|
+
total: zod_1.z.number(),
|
29
|
+
}),
|
30
|
+
});
|
31
|
+
})(CreateInfraBillingHistoryRecordCommand || (exports.CreateInfraBillingHistoryRecordCommand = CreateInfraBillingHistoryRecordCommand = {}));
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DeleteInfraBillingHistoryRecordCommand = 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 DeleteInfraBillingHistoryRecordCommand;
|
9
|
+
(function (DeleteInfraBillingHistoryRecordCommand) {
|
10
|
+
DeleteInfraBillingHistoryRecordCommand.url = api_1.REST_API.INFRA_BILLING.DELETE_BILLING_HISTORY(':uuid');
|
11
|
+
DeleteInfraBillingHistoryRecordCommand.TSQ_url = DeleteInfraBillingHistoryRecordCommand.url;
|
12
|
+
DeleteInfraBillingHistoryRecordCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.DELETE_BILLING_HISTORY(':uuid'), 'delete', 'Delete infra billing history');
|
13
|
+
DeleteInfraBillingHistoryRecordCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
15
|
+
});
|
16
|
+
DeleteInfraBillingHistoryRecordCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: zod_1.z.object({
|
18
|
+
records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
|
19
|
+
total: zod_1.z.number(),
|
20
|
+
}),
|
21
|
+
});
|
22
|
+
})(DeleteInfraBillingHistoryRecordCommand || (exports.DeleteInfraBillingHistoryRecordCommand = DeleteInfraBillingHistoryRecordCommand = {}));
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetInfraBillingHistoryRecordsCommand = 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 GetInfraBillingHistoryRecordsCommand;
|
9
|
+
(function (GetInfraBillingHistoryRecordsCommand) {
|
10
|
+
GetInfraBillingHistoryRecordsCommand.url = api_1.REST_API.INFRA_BILLING.GET_BILLING_HISTORY;
|
11
|
+
GetInfraBillingHistoryRecordsCommand.TSQ_url = GetInfraBillingHistoryRecordsCommand.url;
|
12
|
+
GetInfraBillingHistoryRecordsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY, 'get', 'Get infra billing history');
|
13
|
+
GetInfraBillingHistoryRecordsCommand.RequestQuerySchema = zod_1.z.object({
|
14
|
+
start: zod_1.z.coerce
|
15
|
+
.number()
|
16
|
+
.default(0)
|
17
|
+
.describe('Start index (offset) of the billing history records to return, default is 0'),
|
18
|
+
size: zod_1.z.coerce
|
19
|
+
.number()
|
20
|
+
.min(1, 'Size (limit) must be greater than 0')
|
21
|
+
.max(500, 'Size (limit) must be less than 500')
|
22
|
+
.describe('Number of users to return, no more than 500')
|
23
|
+
.default(50),
|
24
|
+
});
|
25
|
+
GetInfraBillingHistoryRecordsCommand.ResponseSchema = zod_1.z.object({
|
26
|
+
response: zod_1.z.object({
|
27
|
+
records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
|
28
|
+
total: zod_1.z.number(),
|
29
|
+
}),
|
30
|
+
});
|
31
|
+
})(GetInfraBillingHistoryRecordsCommand || (exports.GetInfraBillingHistoryRecordsCommand = GetInfraBillingHistoryRecordsCommand = {}));
|
@@ -14,8 +14,11 @@ 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("./create-bill-record.command"), exports);
|
17
18
|
__exportStar(require("./create-infra-provider.command"), exports);
|
19
|
+
__exportStar(require("./delete-bill-record-by-uuid.command"), exports);
|
18
20
|
__exportStar(require("./delete-infra-provider-by-uuid.command"), exports);
|
21
|
+
__exportStar(require("./get-bill-records.command"), exports);
|
19
22
|
__exportStar(require("./get-infra-provider-by-uuid.command"), exports);
|
20
23
|
__exportStar(require("./get-infra-providers.command"), exports);
|
21
24
|
__exportStar(require("./update-infra-provider.command"), exports);
|
@@ -655,4 +655,19 @@ exports.ERRORS = {
|
|
655
655
|
message: 'Update infra provider error',
|
656
656
|
httpCode: 500,
|
657
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
|
+
},
|
658
673
|
};
|
@@ -24,6 +24,7 @@ __exportStar(require("./extented-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-history-record.schema"), exports);
|
27
28
|
__exportStar(require("./infra-provider.schema"), exports);
|
28
29
|
__exportStar(require("./internal-squad.schema"), exports);
|
29
30
|
__exportStar(require("./last-connected-node.schema"), exports);
|
@@ -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
|
+
});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.InfraProviderSchema = void 0;
|
3
|
+
exports.PartialInfraProviderSchema = exports.InfraProviderSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
exports.InfraProviderSchema = zod_1.z.object({
|
6
6
|
uuid: zod_1.z.string().uuid(),
|
@@ -25,3 +25,17 @@ exports.InfraProviderSchema = zod_1.z.object({
|
|
25
25
|
countryCode: zod_1.z.string(),
|
26
26
|
})),
|
27
27
|
});
|
28
|
+
exports.PartialInfraProviderSchema = zod_1.z.object({
|
29
|
+
uuid: zod_1.z.string().uuid(),
|
30
|
+
name: zod_1.z.string(),
|
31
|
+
faviconLink: zod_1.z.nullable(zod_1.z.string()),
|
32
|
+
loginUrl: zod_1.z.nullable(zod_1.z.string()),
|
33
|
+
createdAt: zod_1.z
|
34
|
+
.string()
|
35
|
+
.datetime()
|
36
|
+
.transform((str) => new Date(str)),
|
37
|
+
updatedAt: zod_1.z
|
38
|
+
.string()
|
39
|
+
.datetime()
|
40
|
+
.transform((str) => new Date(str)),
|
41
|
+
});
|
@@ -44,5 +44,5 @@ exports.NodesSchema = zod_1.z.object({
|
|
44
44
|
activeConfigProfileUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
|
45
45
|
activeInbounds: zod_1.z.nullable(zod_1.z.array(config_profile_inbounds_schema_1.ConfigProfileInboundsSchema)),
|
46
46
|
providerUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
|
47
|
-
provider: zod_1.z.nullable(infra_provider_schema_1.
|
47
|
+
provider: zod_1.z.nullable(infra_provider_schema_1.PartialInfraProviderSchema),
|
48
48
|
});
|
package/package.json
CHANGED