@remnawave/backend-contract 2.0.0-alpha.19 → 2.0.0-alpha.2

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.
Files changed (146) hide show
  1. package/build/backend/api/controllers/index.d.ts +0 -1
  2. package/build/backend/api/controllers/index.d.ts.map +1 -1
  3. package/build/backend/api/controllers/index.js +0 -1
  4. package/build/backend/api/controllers/users.d.ts +0 -1
  5. package/build/backend/api/controllers/users.d.ts.map +1 -1
  6. package/build/backend/api/controllers/users.js +0 -1
  7. package/build/backend/api/routes.d.ts +0 -15
  8. package/build/backend/api/routes.d.ts.map +1 -1
  9. package/build/backend/api/routes.js +0 -15
  10. package/build/backend/commands/config-profiles/create-config-profile.command.js +2 -2
  11. package/build/backend/commands/hosts/create.command.d.ts +6 -6
  12. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  13. package/build/backend/commands/hosts/create.command.js +2 -4
  14. package/build/backend/commands/index.d.ts +0 -1
  15. package/build/backend/commands/index.d.ts.map +1 -1
  16. package/build/backend/commands/index.js +0 -1
  17. package/build/backend/commands/internal-squads/create-internal-squad.command.js +2 -2
  18. package/build/backend/commands/nodes/actions/disable.command.d.ts +0 -59
  19. package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
  20. package/build/backend/commands/nodes/actions/enable.command.d.ts +0 -59
  21. package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
  22. package/build/backend/commands/nodes/actions/reorder.command.d.ts +0 -82
  23. package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
  24. package/build/backend/commands/nodes/create.command.d.ts +0 -62
  25. package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
  26. package/build/backend/commands/nodes/create.command.js +0 -1
  27. package/build/backend/commands/nodes/get-all.command.d.ts +0 -59
  28. package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
  29. package/build/backend/commands/nodes/get-one.command.d.ts +0 -59
  30. package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
  31. package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts +4 -4
  32. package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts +4 -4
  33. package/build/backend/commands/nodes/update.command.d.ts +0 -85
  34. package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
  35. package/build/backend/commands/nodes/update.command.js +0 -1
  36. package/build/backend/commands/users/get-user-usage-by-range.command.d.ts +4 -4
  37. package/build/backend/commands/users/index.d.ts +0 -1
  38. package/build/backend/commands/users/index.d.ts.map +1 -1
  39. package/build/backend/commands/users/index.js +0 -1
  40. package/build/backend/constants/errors/errors.d.ts +0 -75
  41. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  42. package/build/backend/constants/errors/errors.js +0 -75
  43. package/build/backend/constants/events/events.d.ts +0 -11
  44. package/build/backend/constants/events/events.d.ts.map +1 -1
  45. package/build/backend/constants/events/events.js +0 -10
  46. package/build/backend/constants/templates/template-keys.d.ts +1 -1
  47. package/build/backend/constants/templates/template-keys.d.ts.map +1 -1
  48. package/build/backend/constants/templates/template-keys.js +0 -1
  49. package/build/backend/models/index.d.ts +0 -4
  50. package/build/backend/models/index.d.ts.map +1 -1
  51. package/build/backend/models/index.js +0 -4
  52. package/build/backend/models/nodes.schema.d.ts +0 -41
  53. package/build/backend/models/nodes.schema.d.ts.map +1 -1
  54. package/build/backend/models/nodes.schema.js +0 -3
  55. package/build/frontend/api/controllers/index.js +0 -1
  56. package/build/frontend/api/controllers/users.js +0 -1
  57. package/build/frontend/api/routes.js +0 -15
  58. package/build/frontend/commands/config-profiles/create-config-profile.command.js +2 -2
  59. package/build/frontend/commands/hosts/create.command.js +2 -4
  60. package/build/frontend/commands/index.js +0 -1
  61. package/build/frontend/commands/internal-squads/create-internal-squad.command.js +2 -2
  62. package/build/frontend/commands/nodes/create.command.js +0 -1
  63. package/build/frontend/commands/nodes/update.command.js +0 -1
  64. package/build/frontend/commands/users/index.js +0 -1
  65. package/build/frontend/constants/errors/errors.js +0 -75
  66. package/build/frontend/constants/events/events.js +0 -10
  67. package/build/frontend/constants/templates/template-keys.js +0 -1
  68. package/build/frontend/models/index.js +0 -4
  69. package/build/frontend/models/nodes.schema.js +0 -3
  70. package/package.json +1 -1
  71. package/build/backend/api/controllers/infra-billing.d.ts +0 -16
  72. package/build/backend/api/controllers/infra-billing.d.ts.map +0 -1
  73. package/build/backend/api/controllers/infra-billing.js +0 -18
  74. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts +0 -125
  75. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts.map +0 -1
  76. package/build/backend/commands/infra-billing/create-bill-record.command.js +0 -30
  77. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +0 -413
  78. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +0 -1
  79. package/build/backend/commands/infra-billing/create-billing-node.command.js +0 -38
  80. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +0 -123
  81. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +0 -1
  82. package/build/backend/commands/infra-billing/create-infra-provider.command.js +0 -24
  83. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts +0 -119
  84. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts.map +0 -1
  85. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.js +0 -22
  86. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +0 -407
  87. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +0 -1
  88. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +0 -29
  89. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts +0 -33
  90. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts.map +0 -1
  91. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +0 -20
  92. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts +0 -122
  93. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts.map +0 -1
  94. package/build/backend/commands/infra-billing/get-bill-records.command.js +0 -31
  95. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts +0 -399
  96. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts.map +0 -1
  97. package/build/backend/commands/infra-billing/get-blling-nodes.command.js +0 -26
  98. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +0 -117
  99. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +0 -1
  100. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.js +0 -19
  101. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +0 -156
  102. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +0 -1
  103. package/build/backend/commands/infra-billing/get-infra-providers.command.js +0 -19
  104. package/build/backend/commands/infra-billing/index.d.ts +0 -13
  105. package/build/backend/commands/infra-billing/index.d.ts.map +0 -1
  106. package/build/backend/commands/infra-billing/index.js +0 -28
  107. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +0 -410
  108. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +0 -1
  109. package/build/backend/commands/infra-billing/update-billing-node.command.js +0 -35
  110. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +0 -126
  111. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +0 -1
  112. package/build/backend/commands/infra-billing/update-infra-provider.command.js +0 -26
  113. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +0 -114
  114. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +0 -1
  115. package/build/backend/commands/users/get-user-accessible-nodes.command.js +0 -31
  116. package/build/backend/models/infra-billing-available-node.schema.d.ts +0 -90
  117. package/build/backend/models/infra-billing-available-node.schema.d.ts.map +0 -1
  118. package/build/backend/models/infra-billing-available-node.schema.js +0 -9
  119. package/build/backend/models/infra-billing-history-record.schema.d.ts +0 -44
  120. package/build/backend/models/infra-billing-history-record.schema.d.ts.map +0 -1
  121. package/build/backend/models/infra-billing-history-record.schema.js +0 -19
  122. package/build/backend/models/infra-billing-node.schema.d.ts +0 -153
  123. package/build/backend/models/infra-billing-node.schema.d.ts.map +0 -1
  124. package/build/backend/models/infra-billing-node.schema.js +0 -34
  125. package/build/backend/models/infra-provider.schema.d.ts +0 -87
  126. package/build/backend/models/infra-provider.schema.d.ts.map +0 -1
  127. package/build/backend/models/infra-provider.schema.js +0 -41
  128. package/build/frontend/api/controllers/infra-billing.js +0 -18
  129. package/build/frontend/commands/infra-billing/create-bill-record.command.js +0 -30
  130. package/build/frontend/commands/infra-billing/create-billing-node.command.js +0 -38
  131. package/build/frontend/commands/infra-billing/create-infra-provider.command.js +0 -24
  132. package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +0 -22
  133. package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +0 -29
  134. package/build/frontend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +0 -20
  135. package/build/frontend/commands/infra-billing/get-bill-records.command.js +0 -31
  136. package/build/frontend/commands/infra-billing/get-blling-nodes.command.js +0 -26
  137. package/build/frontend/commands/infra-billing/get-infra-provider-by-uuid.command.js +0 -19
  138. package/build/frontend/commands/infra-billing/get-infra-providers.command.js +0 -19
  139. package/build/frontend/commands/infra-billing/index.js +0 -28
  140. package/build/frontend/commands/infra-billing/update-billing-node.command.js +0 -35
  141. package/build/frontend/commands/infra-billing/update-infra-provider.command.js +0 -26
  142. package/build/frontend/commands/users/get-user-accessible-nodes.command.js +0 -31
  143. package/build/frontend/models/infra-billing-available-node.schema.js +0 -9
  144. package/build/frontend/models/infra-billing-history-record.schema.js +0 -19
  145. package/build/frontend/models/infra-billing-node.schema.js +0 -34
  146. package/build/frontend/models/infra-provider.schema.js +0 -41
@@ -1,87 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const InfraProviderSchema: z.ZodObject<{
3
- uuid: z.ZodString;
4
- name: z.ZodString;
5
- faviconLink: z.ZodNullable<z.ZodString>;
6
- loginUrl: z.ZodNullable<z.ZodString>;
7
- createdAt: z.ZodEffects<z.ZodString, Date, string>;
8
- updatedAt: z.ZodEffects<z.ZodString, Date, string>;
9
- billingHistory: z.ZodObject<{
10
- totalAmount: z.ZodNumber;
11
- totalBills: z.ZodNumber;
12
- }, "strip", z.ZodTypeAny, {
13
- totalAmount: number;
14
- totalBills: number;
15
- }, {
16
- totalAmount: number;
17
- totalBills: number;
18
- }>;
19
- billingNodes: z.ZodArray<z.ZodObject<{
20
- nodeUuid: z.ZodString;
21
- name: z.ZodString;
22
- countryCode: z.ZodString;
23
- }, "strip", z.ZodTypeAny, {
24
- name: string;
25
- countryCode: string;
26
- nodeUuid: string;
27
- }, {
28
- name: string;
29
- countryCode: string;
30
- nodeUuid: string;
31
- }>, "many">;
32
- }, "strip", z.ZodTypeAny, {
33
- uuid: string;
34
- createdAt: Date;
35
- updatedAt: Date;
36
- name: string;
37
- faviconLink: string | null;
38
- loginUrl: string | null;
39
- billingHistory: {
40
- totalAmount: number;
41
- totalBills: number;
42
- };
43
- billingNodes: {
44
- name: string;
45
- countryCode: string;
46
- nodeUuid: string;
47
- }[];
48
- }, {
49
- uuid: string;
50
- createdAt: string;
51
- updatedAt: string;
52
- name: string;
53
- faviconLink: string | null;
54
- loginUrl: string | null;
55
- billingHistory: {
56
- totalAmount: number;
57
- totalBills: number;
58
- };
59
- billingNodes: {
60
- name: string;
61
- countryCode: string;
62
- nodeUuid: string;
63
- }[];
64
- }>;
65
- export declare const PartialInfraProviderSchema: z.ZodObject<{
66
- uuid: z.ZodString;
67
- name: z.ZodString;
68
- faviconLink: z.ZodNullable<z.ZodString>;
69
- loginUrl: z.ZodNullable<z.ZodString>;
70
- createdAt: z.ZodEffects<z.ZodString, Date, string>;
71
- updatedAt: z.ZodEffects<z.ZodString, Date, string>;
72
- }, "strip", z.ZodTypeAny, {
73
- uuid: string;
74
- createdAt: Date;
75
- updatedAt: Date;
76
- name: string;
77
- faviconLink: string | null;
78
- loginUrl: string | null;
79
- }, {
80
- uuid: string;
81
- createdAt: string;
82
- updatedAt: string;
83
- name: string;
84
- faviconLink: string | null;
85
- loginUrl: string | null;
86
- }>;
87
- //# sourceMappingURL=infra-provider.schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"infra-provider.schema.d.ts","sourceRoot":"","sources":["../../../models/infra-provider.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B9B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;EAcrC,CAAC"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PartialInfraProviderSchema = exports.InfraProviderSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.InfraProviderSchema = zod_1.z.object({
6
- uuid: zod_1.z.string().uuid(),
7
- name: zod_1.z.string(),
8
- faviconLink: zod_1.z.nullable(zod_1.z.string()),
9
- loginUrl: zod_1.z.nullable(zod_1.z.string()),
10
- createdAt: zod_1.z
11
- .string()
12
- .datetime()
13
- .transform((str) => new Date(str)),
14
- updatedAt: zod_1.z
15
- .string()
16
- .datetime()
17
- .transform((str) => new Date(str)),
18
- billingHistory: zod_1.z.object({
19
- totalAmount: zod_1.z.number(),
20
- totalBills: zod_1.z.number(),
21
- }),
22
- billingNodes: zod_1.z.array(zod_1.z.object({
23
- nodeUuid: zod_1.z.string(),
24
- name: zod_1.z.string(),
25
- countryCode: zod_1.z.string(),
26
- })),
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
- });
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INFRA_BILLING_ROUTES = exports.INFRA_BILLING_CONTROLLER = void 0;
4
- exports.INFRA_BILLING_CONTROLLER = 'infra-billing';
5
- exports.INFRA_BILLING_ROUTES = {
6
- GET_PROVIDERS: 'providers', // Get list of all providers // get
7
- CREATE_PROVIDER: 'providers', // Create new provider // post
8
- UPDATE_PROVIDER: 'providers', // Update provider by uuid // patch
9
- DELETE_PROVIDER: (uuid) => `providers/${uuid}`, // Delete provider by uuid // delete
10
- GET_PROVIDER_BY_UUID: (uuid) => `providers/${uuid}`, // Get provider by uuid // get
11
- GET_BILLING_NODES: 'nodes', // Get list of all nodes billing // get
12
- CREATE_BILLING_NODE: 'nodes', // Create new node billing // post
13
- UPDATE_BILLING_NODE: 'nodes', // Update node billing by uuid // patch
14
- DELETE_BILLING_NODE: (uuid) => `nodes/${uuid}`, // Delete node billing by uuid // delete
15
- GET_BILLING_HISTORY: 'history', // Get list of all nodes billing history // get
16
- CREATE_BILLING_HISTORY: 'history', // Create new node billing history // post
17
- DELETE_BILLING_HISTORY: (uuid) => `history/${uuid}`, // Delete node billing history by uuid // delete
18
- };
@@ -1,30 +0,0 @@
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
- .describe('Billing date. Format: 2025-01-17T15:38:45.065Z'),
23
- });
24
- CreateInfraBillingHistoryRecordCommand.ResponseSchema = zod_1.z.object({
25
- response: zod_1.z.object({
26
- records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
27
- total: zod_1.z.number(),
28
- }),
29
- });
30
- })(CreateInfraBillingHistoryRecordCommand || (exports.CreateInfraBillingHistoryRecordCommand = CreateInfraBillingHistoryRecordCommand = {}));
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateInfraBillingNodeCommand = 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 CreateInfraBillingNodeCommand;
9
- (function (CreateInfraBillingNodeCommand) {
10
- CreateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.CREATE_BILLING_NODE;
11
- CreateInfraBillingNodeCommand.TSQ_url = CreateInfraBillingNodeCommand.url;
12
- CreateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE, 'post', 'Create infra billing node');
13
- CreateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
14
- providerUuid: zod_1.z.string().uuid(),
15
- nodeUuid: zod_1.z.string().uuid(),
16
- nextBillingAt: 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('Next billing date. Format: 2025-01-17T15:38:45.065Z'),
24
- });
25
- CreateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
26
- response: zod_1.z.object({
27
- totalBillingNodes: zod_1.z.number(),
28
- billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
29
- availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
30
- totalAvailableBillingNodes: zod_1.z.number(),
31
- stats: zod_1.z.object({
32
- upcomingNodesCount: zod_1.z.number(),
33
- currentMonthPayments: zod_1.z.number(),
34
- totalSpent: zod_1.z.number(),
35
- }),
36
- }),
37
- });
38
- })(CreateInfraBillingNodeCommand || (exports.CreateInfraBillingNodeCommand = CreateInfraBillingNodeCommand = {}));
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateInfraProviderCommand = 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 CreateInfraProviderCommand;
9
- (function (CreateInfraProviderCommand) {
10
- CreateInfraProviderCommand.url = api_1.REST_API.INFRA_BILLING.CREATE_PROVIDER;
11
- CreateInfraProviderCommand.TSQ_url = CreateInfraProviderCommand.url;
12
- CreateInfraProviderCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_PROVIDER, 'post', 'Create infra provider');
13
- CreateInfraProviderCommand.RequestSchema = zod_1.z.object({
14
- name: zod_1.z
15
- .string()
16
- .min(2, 'Name must be at least 2 characters')
17
- .max(30, 'Name must be less than 255 characters'),
18
- faviconLink: zod_1.z.string().url().optional(),
19
- loginUrl: zod_1.z.string().url().optional(),
20
- });
21
- CreateInfraProviderCommand.ResponseSchema = zod_1.z.object({
22
- response: models_1.InfraProviderSchema,
23
- });
24
- })(CreateInfraProviderCommand || (exports.CreateInfraProviderCommand = CreateInfraProviderCommand = {}));
@@ -1,22 +0,0 @@
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 = {}));
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeleteInfraBillingNodeByUuidCommand = 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 DeleteInfraBillingNodeByUuidCommand;
9
- (function (DeleteInfraBillingNodeByUuidCommand) {
10
- DeleteInfraBillingNodeByUuidCommand.url = api_1.REST_API.INFRA_BILLING.DELETE_BILLING_NODE(':uuid');
11
- DeleteInfraBillingNodeByUuidCommand.TSQ_url = DeleteInfraBillingNodeByUuidCommand.url;
12
- DeleteInfraBillingNodeByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(':uuid'), 'delete', 'Delete infra billing node');
13
- DeleteInfraBillingNodeByUuidCommand.RequestSchema = zod_1.z.object({
14
- uuid: zod_1.z.string().uuid(),
15
- });
16
- DeleteInfraBillingNodeByUuidCommand.ResponseSchema = zod_1.z.object({
17
- response: zod_1.z.object({
18
- totalBillingNodes: zod_1.z.number(),
19
- billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
20
- availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
21
- totalAvailableBillingNodes: zod_1.z.number(),
22
- stats: zod_1.z.object({
23
- upcomingNodesCount: zod_1.z.number(),
24
- currentMonthPayments: zod_1.z.number(),
25
- totalSpent: zod_1.z.number(),
26
- }),
27
- }),
28
- });
29
- })(DeleteInfraBillingNodeByUuidCommand || (exports.DeleteInfraBillingNodeByUuidCommand = DeleteInfraBillingNodeByUuidCommand = {}));
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeleteInfraProviderByUuidCommand = void 0;
4
- const zod_1 = require("zod");
5
- const api_1 = require("../../api");
6
- const constants_1 = require("../../constants");
7
- var DeleteInfraProviderByUuidCommand;
8
- (function (DeleteInfraProviderByUuidCommand) {
9
- DeleteInfraProviderByUuidCommand.url = api_1.REST_API.INFRA_BILLING.DELETE_PROVIDER(':uuid');
10
- DeleteInfraProviderByUuidCommand.TSQ_url = DeleteInfraProviderByUuidCommand.url;
11
- DeleteInfraProviderByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.DELETE_PROVIDER(':uuid'), 'delete', 'Delete infra provider by uuid');
12
- DeleteInfraProviderByUuidCommand.RequestSchema = zod_1.z.object({
13
- uuid: zod_1.z.string().uuid(),
14
- });
15
- DeleteInfraProviderByUuidCommand.ResponseSchema = zod_1.z.object({
16
- response: zod_1.z.object({
17
- isDeleted: zod_1.z.boolean(),
18
- }),
19
- });
20
- })(DeleteInfraProviderByUuidCommand || (exports.DeleteInfraProviderByUuidCommand = DeleteInfraProviderByUuidCommand = {}));
@@ -1,31 +0,0 @@
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 = {}));
@@ -1,26 +0,0 @@
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 = {}));
@@ -1,19 +0,0 @@
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 = {}));
@@ -1,19 +0,0 @@
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 = {}));
@@ -1,28 +0,0 @@
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-blling-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);
@@ -1,35 +0,0 @@
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 = {}));
@@ -1,26 +0,0 @@
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 255 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 = {}));
@@ -1,31 +0,0 @@
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 = {}));
@@ -1,9 +0,0 @@
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
- });
@@ -1,19 +0,0 @@
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,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InfraBillingNodeSchema = void 0;
4
- const zod_1 = require("zod");
5
- const infra_provider_schema_1 = require("./infra-provider.schema");
6
- const nodes_schema_1 = require("./nodes.schema");
7
- exports.InfraBillingNodeSchema = zod_1.z.object({
8
- uuid: zod_1.z.string().uuid(),
9
- nodeUuid: zod_1.z.string().uuid(),
10
- providerUuid: zod_1.z.string().uuid(),
11
- provider: infra_provider_schema_1.PartialInfraProviderSchema.pick({
12
- uuid: true,
13
- name: true,
14
- loginUrl: true,
15
- faviconLink: true,
16
- }),
17
- node: nodes_schema_1.NodesSchema.pick({
18
- uuid: true,
19
- name: true,
20
- countryCode: true,
21
- }),
22
- nextBillingAt: zod_1.z
23
- .string()
24
- .datetime()
25
- .transform((str) => new Date(str)),
26
- createdAt: zod_1.z
27
- .string()
28
- .datetime()
29
- .transform((str) => new Date(str)),
30
- updatedAt: zod_1.z
31
- .string()
32
- .datetime()
33
- .transform((str) => new Date(str)),
34
- });