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

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 (170) hide show
  1. package/build/backend/api/controllers/index.d.ts +1 -0
  2. package/build/backend/api/controllers/index.d.ts.map +1 -1
  3. package/build/backend/api/controllers/index.js +1 -0
  4. package/build/backend/api/controllers/infra-billing.d.ts +16 -0
  5. package/build/backend/api/controllers/infra-billing.d.ts.map +1 -0
  6. package/build/backend/api/controllers/infra-billing.js +18 -0
  7. package/build/backend/api/controllers/users.d.ts +1 -0
  8. package/build/backend/api/controllers/users.d.ts.map +1 -1
  9. package/build/backend/api/controllers/users.js +1 -0
  10. package/build/backend/api/routes.d.ts +15 -0
  11. package/build/backend/api/routes.d.ts.map +1 -1
  12. package/build/backend/api/routes.js +15 -0
  13. package/build/backend/commands/config-profiles/create-config-profile.command.js +2 -2
  14. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts +26 -10
  15. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -1
  16. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +26 -10
  17. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -1
  18. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +26 -10
  19. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -1
  20. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts +26 -10
  21. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts.map +1 -1
  22. package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts +26 -10
  23. package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts.map +1 -1
  24. package/build/backend/commands/hosts/create.command.d.ts +44 -19
  25. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  26. package/build/backend/commands/hosts/create.command.js +7 -11
  27. package/build/backend/commands/hosts/get-all.command.d.ts +26 -10
  28. package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -1
  29. package/build/backend/commands/hosts/get-one.command.d.ts +26 -10
  30. package/build/backend/commands/hosts/get-one.command.d.ts.map +1 -1
  31. package/build/backend/commands/hosts/reorder.command.d.ts +10 -2
  32. package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -1
  33. package/build/backend/commands/hosts/update.command.d.ts +54 -21
  34. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  35. package/build/backend/commands/hosts/update.command.js +4 -11
  36. package/build/backend/commands/index.d.ts +1 -0
  37. package/build/backend/commands/index.d.ts.map +1 -1
  38. package/build/backend/commands/index.js +1 -0
  39. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts +125 -0
  40. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts.map +1 -0
  41. package/build/backend/commands/infra-billing/create-bill-record.command.js +30 -0
  42. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +413 -0
  43. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -0
  44. package/build/backend/commands/infra-billing/create-billing-node.command.js +38 -0
  45. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +123 -0
  46. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +1 -0
  47. package/build/backend/commands/infra-billing/create-infra-provider.command.js +24 -0
  48. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts +119 -0
  49. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts.map +1 -0
  50. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  51. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +407 -0
  52. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -0
  53. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  54. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts +33 -0
  55. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts.map +1 -0
  56. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  57. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts +122 -0
  58. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts.map +1 -0
  59. package/build/backend/commands/infra-billing/get-bill-records.command.js +31 -0
  60. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts +399 -0
  61. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts.map +1 -0
  62. package/build/backend/commands/infra-billing/get-blling-nodes.command.js +26 -0
  63. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +117 -0
  64. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +1 -0
  65. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  66. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +156 -0
  67. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +1 -0
  68. package/build/backend/commands/infra-billing/get-infra-providers.command.js +19 -0
  69. package/build/backend/commands/infra-billing/index.d.ts +13 -0
  70. package/build/backend/commands/infra-billing/index.d.ts.map +1 -0
  71. package/build/backend/commands/infra-billing/index.js +28 -0
  72. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +410 -0
  73. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -0
  74. package/build/backend/commands/infra-billing/update-billing-node.command.js +35 -0
  75. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +126 -0
  76. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +1 -0
  77. package/build/backend/commands/infra-billing/update-infra-provider.command.js +26 -0
  78. package/build/backend/commands/internal-squads/create-internal-squad.command.js +2 -2
  79. package/build/backend/commands/nodes/actions/disable.command.d.ts +59 -0
  80. package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
  81. package/build/backend/commands/nodes/actions/enable.command.d.ts +59 -0
  82. package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
  83. package/build/backend/commands/nodes/actions/reorder.command.d.ts +82 -0
  84. package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
  85. package/build/backend/commands/nodes/create.command.d.ts +62 -0
  86. package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
  87. package/build/backend/commands/nodes/create.command.js +1 -0
  88. package/build/backend/commands/nodes/get-all.command.d.ts +59 -0
  89. package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
  90. package/build/backend/commands/nodes/get-one.command.d.ts +59 -0
  91. package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
  92. package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts +4 -4
  93. package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts +4 -4
  94. package/build/backend/commands/nodes/update.command.d.ts +85 -0
  95. package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
  96. package/build/backend/commands/nodes/update.command.js +1 -0
  97. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +114 -0
  98. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +1 -0
  99. package/build/backend/commands/users/get-user-accessible-nodes.command.js +31 -0
  100. package/build/backend/commands/users/get-user-usage-by-range.command.d.ts +4 -4
  101. package/build/backend/commands/users/index.d.ts +1 -0
  102. package/build/backend/commands/users/index.d.ts.map +1 -1
  103. package/build/backend/commands/users/index.js +1 -0
  104. package/build/backend/constants/errors/errors.d.ts +75 -0
  105. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  106. package/build/backend/constants/errors/errors.js +75 -0
  107. package/build/backend/constants/events/events.d.ts +11 -0
  108. package/build/backend/constants/events/events.d.ts.map +1 -1
  109. package/build/backend/constants/events/events.js +10 -0
  110. package/build/backend/constants/templates/template-keys.d.ts +1 -1
  111. package/build/backend/constants/templates/template-keys.d.ts.map +1 -1
  112. package/build/backend/constants/templates/template-keys.js +1 -0
  113. package/build/backend/models/hosts.schema.d.ts +18 -6
  114. package/build/backend/models/hosts.schema.d.ts.map +1 -1
  115. package/build/backend/models/hosts.schema.js +4 -2
  116. package/build/backend/models/index.d.ts +4 -0
  117. package/build/backend/models/index.d.ts.map +1 -1
  118. package/build/backend/models/index.js +4 -0
  119. package/build/backend/models/infra-billing-available-node.schema.d.ts +90 -0
  120. package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -0
  121. package/build/backend/models/infra-billing-available-node.schema.js +9 -0
  122. package/build/backend/models/infra-billing-history-record.schema.d.ts +44 -0
  123. package/build/backend/models/infra-billing-history-record.schema.d.ts.map +1 -0
  124. package/build/backend/models/infra-billing-history-record.schema.js +19 -0
  125. package/build/backend/models/infra-billing-node.schema.d.ts +153 -0
  126. package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -0
  127. package/build/backend/models/infra-billing-node.schema.js +34 -0
  128. package/build/backend/models/infra-provider.schema.d.ts +87 -0
  129. package/build/backend/models/infra-provider.schema.d.ts.map +1 -0
  130. package/build/backend/models/infra-provider.schema.js +41 -0
  131. package/build/backend/models/nodes.schema.d.ts +41 -0
  132. package/build/backend/models/nodes.schema.d.ts.map +1 -1
  133. package/build/backend/models/nodes.schema.js +3 -0
  134. package/build/frontend/api/controllers/index.js +1 -0
  135. package/build/frontend/api/controllers/infra-billing.js +18 -0
  136. package/build/frontend/api/controllers/users.js +1 -0
  137. package/build/frontend/api/routes.js +15 -0
  138. package/build/frontend/commands/config-profiles/create-config-profile.command.js +2 -2
  139. package/build/frontend/commands/hosts/create.command.js +7 -11
  140. package/build/frontend/commands/hosts/update.command.js +4 -11
  141. package/build/frontend/commands/index.js +1 -0
  142. package/build/frontend/commands/infra-billing/create-bill-record.command.js +30 -0
  143. package/build/frontend/commands/infra-billing/create-billing-node.command.js +38 -0
  144. package/build/frontend/commands/infra-billing/create-infra-provider.command.js +24 -0
  145. package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  146. package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  147. package/build/frontend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  148. package/build/frontend/commands/infra-billing/get-bill-records.command.js +31 -0
  149. package/build/frontend/commands/infra-billing/get-blling-nodes.command.js +26 -0
  150. package/build/frontend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  151. package/build/frontend/commands/infra-billing/get-infra-providers.command.js +19 -0
  152. package/build/frontend/commands/infra-billing/index.js +28 -0
  153. package/build/frontend/commands/infra-billing/update-billing-node.command.js +35 -0
  154. package/build/frontend/commands/infra-billing/update-infra-provider.command.js +26 -0
  155. package/build/frontend/commands/internal-squads/create-internal-squad.command.js +2 -2
  156. package/build/frontend/commands/nodes/create.command.js +1 -0
  157. package/build/frontend/commands/nodes/update.command.js +1 -0
  158. package/build/frontend/commands/users/get-user-accessible-nodes.command.js +31 -0
  159. package/build/frontend/commands/users/index.js +1 -0
  160. package/build/frontend/constants/errors/errors.js +75 -0
  161. package/build/frontend/constants/events/events.js +10 -0
  162. package/build/frontend/constants/templates/template-keys.js +1 -0
  163. package/build/frontend/models/hosts.schema.js +4 -2
  164. package/build/frontend/models/index.js +4 -0
  165. package/build/frontend/models/infra-billing-available-node.schema.js +9 -0
  166. package/build/frontend/models/infra-billing-history-record.schema.js +19 -0
  167. package/build/frontend/models/infra-billing-node.schema.js +34 -0
  168. package/build/frontend/models/infra-provider.schema.js +41 -0
  169. package/build/frontend/models/nodes.schema.js +3 -0
  170. package/package.json +1 -1
@@ -0,0 +1,125 @@
1
+ import { z } from 'zod';
2
+ export declare namespace CreateInfraBillingHistoryRecordCommand {
3
+ const url: "/api/infra-billing/history";
4
+ const TSQ_url: "/api/infra-billing/history";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestSchema: z.ZodObject<{
7
+ providerUuid: z.ZodString;
8
+ amount: z.ZodNumber;
9
+ billedAt: z.ZodEffects<z.ZodString, Date, string>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ providerUuid: string;
12
+ amount: number;
13
+ billedAt: Date;
14
+ }, {
15
+ providerUuid: string;
16
+ amount: number;
17
+ billedAt: string;
18
+ }>;
19
+ type Request = z.infer<typeof RequestSchema>;
20
+ const ResponseSchema: z.ZodObject<{
21
+ response: z.ZodObject<{
22
+ records: z.ZodArray<z.ZodObject<{
23
+ uuid: z.ZodString;
24
+ providerUuid: z.ZodString;
25
+ amount: z.ZodNumber;
26
+ billedAt: z.ZodEffects<z.ZodString, Date, string>;
27
+ provider: z.ZodObject<Omit<{
28
+ uuid: z.ZodString;
29
+ name: z.ZodString;
30
+ faviconLink: z.ZodNullable<z.ZodString>;
31
+ loginUrl: z.ZodNullable<z.ZodString>;
32
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
33
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
34
+ }, "createdAt" | "updatedAt" | "loginUrl">, "strip", z.ZodTypeAny, {
35
+ uuid: string;
36
+ name: string;
37
+ faviconLink: string | null;
38
+ }, {
39
+ uuid: string;
40
+ name: string;
41
+ faviconLink: string | null;
42
+ }>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ uuid: string;
45
+ providerUuid: string;
46
+ provider: {
47
+ uuid: string;
48
+ name: string;
49
+ faviconLink: string | null;
50
+ };
51
+ amount: number;
52
+ billedAt: Date;
53
+ }, {
54
+ uuid: string;
55
+ providerUuid: string;
56
+ provider: {
57
+ uuid: string;
58
+ name: string;
59
+ faviconLink: string | null;
60
+ };
61
+ amount: number;
62
+ billedAt: string;
63
+ }>, "many">;
64
+ total: z.ZodNumber;
65
+ }, "strip", z.ZodTypeAny, {
66
+ total: number;
67
+ records: {
68
+ uuid: string;
69
+ providerUuid: string;
70
+ provider: {
71
+ uuid: string;
72
+ name: string;
73
+ faviconLink: string | null;
74
+ };
75
+ amount: number;
76
+ billedAt: Date;
77
+ }[];
78
+ }, {
79
+ total: number;
80
+ records: {
81
+ uuid: string;
82
+ providerUuid: string;
83
+ provider: {
84
+ uuid: string;
85
+ name: string;
86
+ faviconLink: string | null;
87
+ };
88
+ amount: number;
89
+ billedAt: string;
90
+ }[];
91
+ }>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ response: {
94
+ total: number;
95
+ records: {
96
+ uuid: string;
97
+ providerUuid: string;
98
+ provider: {
99
+ uuid: string;
100
+ name: string;
101
+ faviconLink: string | null;
102
+ };
103
+ amount: number;
104
+ billedAt: Date;
105
+ }[];
106
+ };
107
+ }, {
108
+ response: {
109
+ total: number;
110
+ records: {
111
+ uuid: string;
112
+ providerUuid: string;
113
+ provider: {
114
+ uuid: string;
115
+ name: string;
116
+ faviconLink: string | null;
117
+ };
118
+ amount: number;
119
+ billedAt: string;
120
+ }[];
121
+ };
122
+ }>;
123
+ type Response = z.infer<typeof ResponseSchema>;
124
+ }
125
+ //# sourceMappingURL=create-bill-record.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-bill-record.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/create-bill-record.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sCAAsC,CAAC;IAC7C,MAAM,GAAG,8BAAgD,CAAC;IAC1D,MAAM,OAAO,8BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;MAUxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,30 @@
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 = {}));
@@ -0,0 +1,413 @@
1
+ import { z } from 'zod';
2
+ export declare namespace CreateInfraBillingNodeCommand {
3
+ const url: "/api/infra-billing/nodes";
4
+ const TSQ_url: "/api/infra-billing/nodes";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestSchema: z.ZodObject<{
7
+ providerUuid: z.ZodString;
8
+ nodeUuid: z.ZodString;
9
+ nextBillingAt: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ nodeUuid: string;
12
+ providerUuid: string;
13
+ nextBillingAt?: Date | undefined;
14
+ }, {
15
+ nodeUuid: string;
16
+ providerUuid: string;
17
+ nextBillingAt?: string | undefined;
18
+ }>;
19
+ type Request = z.infer<typeof RequestSchema>;
20
+ const ResponseSchema: z.ZodObject<{
21
+ response: z.ZodObject<{
22
+ totalBillingNodes: z.ZodNumber;
23
+ billingNodes: z.ZodArray<z.ZodObject<{
24
+ uuid: z.ZodString;
25
+ nodeUuid: z.ZodString;
26
+ providerUuid: z.ZodString;
27
+ provider: z.ZodObject<Pick<{
28
+ uuid: z.ZodString;
29
+ name: z.ZodString;
30
+ faviconLink: z.ZodNullable<z.ZodString>;
31
+ loginUrl: z.ZodNullable<z.ZodString>;
32
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
33
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
34
+ }, "uuid" | "name" | "faviconLink" | "loginUrl">, "strip", z.ZodTypeAny, {
35
+ uuid: string;
36
+ name: string;
37
+ faviconLink: string | null;
38
+ loginUrl: string | null;
39
+ }, {
40
+ uuid: string;
41
+ name: string;
42
+ faviconLink: string | null;
43
+ loginUrl: string | null;
44
+ }>;
45
+ node: z.ZodObject<Pick<{
46
+ uuid: z.ZodString;
47
+ name: z.ZodString;
48
+ address: z.ZodString;
49
+ port: z.ZodNullable<z.ZodNumber>;
50
+ isConnected: z.ZodBoolean;
51
+ isDisabled: z.ZodBoolean;
52
+ isConnecting: z.ZodBoolean;
53
+ isNodeOnline: z.ZodBoolean;
54
+ isXrayRunning: z.ZodBoolean;
55
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
56
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
57
+ xrayVersion: z.ZodNullable<z.ZodString>;
58
+ xrayUptime: z.ZodString;
59
+ isTrafficTrackingActive: z.ZodBoolean;
60
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
61
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
62
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
63
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
64
+ usersOnline: z.ZodNullable<z.ZodNumber>;
65
+ viewPosition: z.ZodNumber;
66
+ countryCode: z.ZodString;
67
+ consumptionMultiplier: z.ZodNumber;
68
+ cpuCount: z.ZodNullable<z.ZodNumber>;
69
+ cpuModel: z.ZodNullable<z.ZodString>;
70
+ totalRam: z.ZodNullable<z.ZodString>;
71
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
72
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
73
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
74
+ activeInbounds: z.ZodNullable<z.ZodArray<z.ZodObject<{
75
+ uuid: z.ZodString;
76
+ profileUuid: z.ZodString;
77
+ tag: z.ZodString;
78
+ type: z.ZodString;
79
+ network: z.ZodNullable<z.ZodString>;
80
+ security: z.ZodNullable<z.ZodString>;
81
+ port: z.ZodNullable<z.ZodNumber>;
82
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ type: string;
85
+ uuid: string;
86
+ profileUuid: string;
87
+ tag: string;
88
+ network: string | null;
89
+ security: string | null;
90
+ port: number | null;
91
+ rawInbound?: unknown;
92
+ }, {
93
+ type: string;
94
+ uuid: string;
95
+ profileUuid: string;
96
+ tag: string;
97
+ network: string | null;
98
+ security: string | null;
99
+ port: number | null;
100
+ rawInbound?: unknown;
101
+ }>, "many">>;
102
+ providerUuid: z.ZodNullable<z.ZodString>;
103
+ provider: z.ZodNullable<z.ZodObject<{
104
+ uuid: z.ZodString;
105
+ name: z.ZodString;
106
+ faviconLink: z.ZodNullable<z.ZodString>;
107
+ loginUrl: z.ZodNullable<z.ZodString>;
108
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
109
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ uuid: string;
112
+ createdAt: Date;
113
+ updatedAt: Date;
114
+ name: string;
115
+ faviconLink: string | null;
116
+ loginUrl: string | null;
117
+ }, {
118
+ uuid: string;
119
+ createdAt: string;
120
+ updatedAt: string;
121
+ name: string;
122
+ faviconLink: string | null;
123
+ loginUrl: string | null;
124
+ }>>;
125
+ }, "uuid" | "name" | "countryCode">, "strip", z.ZodTypeAny, {
126
+ uuid: string;
127
+ name: string;
128
+ countryCode: string;
129
+ }, {
130
+ uuid: string;
131
+ name: string;
132
+ countryCode: string;
133
+ }>;
134
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
135
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
136
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ uuid: string;
139
+ createdAt: Date;
140
+ updatedAt: Date;
141
+ nodeUuid: string;
142
+ providerUuid: string;
143
+ provider: {
144
+ uuid: string;
145
+ name: string;
146
+ faviconLink: string | null;
147
+ loginUrl: string | null;
148
+ };
149
+ node: {
150
+ uuid: string;
151
+ name: string;
152
+ countryCode: string;
153
+ };
154
+ nextBillingAt: Date;
155
+ }, {
156
+ uuid: string;
157
+ createdAt: string;
158
+ updatedAt: string;
159
+ nodeUuid: string;
160
+ providerUuid: string;
161
+ provider: {
162
+ uuid: string;
163
+ name: string;
164
+ faviconLink: string | null;
165
+ loginUrl: string | null;
166
+ };
167
+ node: {
168
+ uuid: string;
169
+ name: string;
170
+ countryCode: string;
171
+ };
172
+ nextBillingAt: string;
173
+ }>, "many">;
174
+ availableBillingNodes: z.ZodArray<z.ZodObject<Pick<{
175
+ uuid: z.ZodString;
176
+ name: z.ZodString;
177
+ address: z.ZodString;
178
+ port: z.ZodNullable<z.ZodNumber>;
179
+ isConnected: z.ZodBoolean;
180
+ isDisabled: z.ZodBoolean;
181
+ isConnecting: z.ZodBoolean;
182
+ isNodeOnline: z.ZodBoolean;
183
+ isXrayRunning: z.ZodBoolean;
184
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
185
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
186
+ xrayVersion: z.ZodNullable<z.ZodString>;
187
+ xrayUptime: z.ZodString;
188
+ isTrafficTrackingActive: z.ZodBoolean;
189
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
190
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
191
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
192
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
193
+ usersOnline: z.ZodNullable<z.ZodNumber>;
194
+ viewPosition: z.ZodNumber;
195
+ countryCode: z.ZodString;
196
+ consumptionMultiplier: z.ZodNumber;
197
+ cpuCount: z.ZodNullable<z.ZodNumber>;
198
+ cpuModel: z.ZodNullable<z.ZodString>;
199
+ totalRam: z.ZodNullable<z.ZodString>;
200
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
201
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
202
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
203
+ activeInbounds: z.ZodNullable<z.ZodArray<z.ZodObject<{
204
+ uuid: z.ZodString;
205
+ profileUuid: z.ZodString;
206
+ tag: z.ZodString;
207
+ type: z.ZodString;
208
+ network: z.ZodNullable<z.ZodString>;
209
+ security: z.ZodNullable<z.ZodString>;
210
+ port: z.ZodNullable<z.ZodNumber>;
211
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
212
+ }, "strip", z.ZodTypeAny, {
213
+ type: string;
214
+ uuid: string;
215
+ profileUuid: string;
216
+ tag: string;
217
+ network: string | null;
218
+ security: string | null;
219
+ port: number | null;
220
+ rawInbound?: unknown;
221
+ }, {
222
+ type: string;
223
+ uuid: string;
224
+ profileUuid: string;
225
+ tag: string;
226
+ network: string | null;
227
+ security: string | null;
228
+ port: number | null;
229
+ rawInbound?: unknown;
230
+ }>, "many">>;
231
+ providerUuid: z.ZodNullable<z.ZodString>;
232
+ provider: z.ZodNullable<z.ZodObject<{
233
+ uuid: z.ZodString;
234
+ name: z.ZodString;
235
+ faviconLink: z.ZodNullable<z.ZodString>;
236
+ loginUrl: z.ZodNullable<z.ZodString>;
237
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
238
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
239
+ }, "strip", z.ZodTypeAny, {
240
+ uuid: string;
241
+ createdAt: Date;
242
+ updatedAt: Date;
243
+ name: string;
244
+ faviconLink: string | null;
245
+ loginUrl: string | null;
246
+ }, {
247
+ uuid: string;
248
+ createdAt: string;
249
+ updatedAt: string;
250
+ name: string;
251
+ faviconLink: string | null;
252
+ loginUrl: string | null;
253
+ }>>;
254
+ }, "uuid" | "name" | "countryCode">, "strip", z.ZodTypeAny, {
255
+ uuid: string;
256
+ name: string;
257
+ countryCode: string;
258
+ }, {
259
+ uuid: string;
260
+ name: string;
261
+ countryCode: string;
262
+ }>, "many">;
263
+ totalAvailableBillingNodes: z.ZodNumber;
264
+ stats: z.ZodObject<{
265
+ upcomingNodesCount: z.ZodNumber;
266
+ currentMonthPayments: z.ZodNumber;
267
+ totalSpent: z.ZodNumber;
268
+ }, "strip", z.ZodTypeAny, {
269
+ upcomingNodesCount: number;
270
+ currentMonthPayments: number;
271
+ totalSpent: number;
272
+ }, {
273
+ upcomingNodesCount: number;
274
+ currentMonthPayments: number;
275
+ totalSpent: number;
276
+ }>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ stats: {
279
+ upcomingNodesCount: number;
280
+ currentMonthPayments: number;
281
+ totalSpent: number;
282
+ };
283
+ billingNodes: {
284
+ uuid: string;
285
+ createdAt: Date;
286
+ updatedAt: Date;
287
+ nodeUuid: string;
288
+ providerUuid: string;
289
+ provider: {
290
+ uuid: string;
291
+ name: string;
292
+ faviconLink: string | null;
293
+ loginUrl: string | null;
294
+ };
295
+ node: {
296
+ uuid: string;
297
+ name: string;
298
+ countryCode: string;
299
+ };
300
+ nextBillingAt: Date;
301
+ }[];
302
+ totalBillingNodes: number;
303
+ availableBillingNodes: {
304
+ uuid: string;
305
+ name: string;
306
+ countryCode: string;
307
+ }[];
308
+ totalAvailableBillingNodes: number;
309
+ }, {
310
+ stats: {
311
+ upcomingNodesCount: number;
312
+ currentMonthPayments: number;
313
+ totalSpent: number;
314
+ };
315
+ billingNodes: {
316
+ uuid: string;
317
+ createdAt: string;
318
+ updatedAt: string;
319
+ nodeUuid: string;
320
+ providerUuid: string;
321
+ provider: {
322
+ uuid: string;
323
+ name: string;
324
+ faviconLink: string | null;
325
+ loginUrl: string | null;
326
+ };
327
+ node: {
328
+ uuid: string;
329
+ name: string;
330
+ countryCode: string;
331
+ };
332
+ nextBillingAt: string;
333
+ }[];
334
+ totalBillingNodes: number;
335
+ availableBillingNodes: {
336
+ uuid: string;
337
+ name: string;
338
+ countryCode: string;
339
+ }[];
340
+ totalAvailableBillingNodes: number;
341
+ }>;
342
+ }, "strip", z.ZodTypeAny, {
343
+ response: {
344
+ stats: {
345
+ upcomingNodesCount: number;
346
+ currentMonthPayments: number;
347
+ totalSpent: number;
348
+ };
349
+ billingNodes: {
350
+ uuid: string;
351
+ createdAt: Date;
352
+ updatedAt: Date;
353
+ nodeUuid: string;
354
+ providerUuid: string;
355
+ provider: {
356
+ uuid: string;
357
+ name: string;
358
+ faviconLink: string | null;
359
+ loginUrl: string | null;
360
+ };
361
+ node: {
362
+ uuid: string;
363
+ name: string;
364
+ countryCode: string;
365
+ };
366
+ nextBillingAt: Date;
367
+ }[];
368
+ totalBillingNodes: number;
369
+ availableBillingNodes: {
370
+ uuid: string;
371
+ name: string;
372
+ countryCode: string;
373
+ }[];
374
+ totalAvailableBillingNodes: number;
375
+ };
376
+ }, {
377
+ response: {
378
+ stats: {
379
+ upcomingNodesCount: number;
380
+ currentMonthPayments: number;
381
+ totalSpent: number;
382
+ };
383
+ billingNodes: {
384
+ uuid: string;
385
+ createdAt: string;
386
+ updatedAt: string;
387
+ nodeUuid: string;
388
+ providerUuid: string;
389
+ provider: {
390
+ uuid: string;
391
+ name: string;
392
+ faviconLink: string | null;
393
+ loginUrl: string | null;
394
+ };
395
+ node: {
396
+ uuid: string;
397
+ name: string;
398
+ countryCode: string;
399
+ };
400
+ nextBillingAt: string;
401
+ }[];
402
+ totalBillingNodes: number;
403
+ availableBillingNodes: {
404
+ uuid: string;
405
+ name: string;
406
+ countryCode: string;
407
+ }[];
408
+ totalAvailableBillingNodes: number;
409
+ };
410
+ }>;
411
+ type Response = z.infer<typeof ResponseSchema>;
412
+ }
413
+ //# sourceMappingURL=create-billing-node.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-billing-node.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/create-billing-node.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,GAAG,4BAA6C,CAAC;IACvD,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;MAWxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,38 @@
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 = {}));