@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,34 @@
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
+ });
@@ -0,0 +1,87 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,41 @@
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
+ });
@@ -56,6 +56,29 @@ export declare const NodesSchema: z.ZodObject<{
56
56
  port: number | null;
57
57
  rawInbound?: unknown;
58
58
  }>, "many">>;
59
+ providerUuid: z.ZodNullable<z.ZodString>;
60
+ provider: z.ZodNullable<z.ZodObject<{
61
+ uuid: z.ZodString;
62
+ name: z.ZodString;
63
+ faviconLink: z.ZodNullable<z.ZodString>;
64
+ loginUrl: z.ZodNullable<z.ZodString>;
65
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
66
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ uuid: string;
69
+ createdAt: Date;
70
+ updatedAt: Date;
71
+ name: string;
72
+ faviconLink: string | null;
73
+ loginUrl: string | null;
74
+ }, {
75
+ uuid: string;
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ name: string;
79
+ faviconLink: string | null;
80
+ loginUrl: string | null;
81
+ }>>;
59
82
  }, "strip", z.ZodTypeAny, {
60
83
  uuid: string;
61
84
  createdAt: Date;
@@ -95,6 +118,15 @@ export declare const NodesSchema: z.ZodObject<{
95
118
  port: number | null;
96
119
  rawInbound?: unknown;
97
120
  }[] | null;
121
+ providerUuid: string | null;
122
+ provider: {
123
+ uuid: string;
124
+ createdAt: Date;
125
+ updatedAt: Date;
126
+ name: string;
127
+ faviconLink: string | null;
128
+ loginUrl: string | null;
129
+ } | null;
98
130
  }, {
99
131
  uuid: string;
100
132
  createdAt: string;
@@ -134,5 +166,14 @@ export declare const NodesSchema: z.ZodObject<{
134
166
  port: number | null;
135
167
  rawInbound?: unknown;
136
168
  }[] | null;
169
+ providerUuid: string | null;
170
+ provider: {
171
+ uuid: string;
172
+ createdAt: string;
173
+ updatedAt: string;
174
+ name: string;
175
+ faviconLink: string | null;
176
+ loginUrl: string | null;
177
+ } | null;
137
178
  }>;
138
179
  //# sourceMappingURL=nodes.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.schema.d.ts","sourceRoot":"","sources":["../../../models/nodes.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CtB,CAAC"}
1
+ {"version":3,"file":"nodes.schema.d.ts","sourceRoot":"","sources":["../../../models/nodes.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDtB,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodesSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const config_profile_inbounds_schema_1 = require("./config-profile-inbounds.schema");
6
+ const infra_provider_schema_1 = require("./infra-provider.schema");
6
7
  exports.NodesSchema = zod_1.z.object({
7
8
  uuid: zod_1.z.string().uuid(),
8
9
  name: zod_1.z.string(),
@@ -42,4 +43,6 @@ exports.NodesSchema = zod_1.z.object({
42
43
  .transform((str) => new Date(str)),
43
44
  activeConfigProfileUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
44
45
  activeInbounds: zod_1.z.nullable(zod_1.z.array(config_profile_inbounds_schema_1.ConfigProfileInboundsSchema)),
46
+ providerUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
47
+ provider: zod_1.z.nullable(infra_provider_schema_1.PartialInfraProviderSchema),
45
48
  });
@@ -19,6 +19,7 @@ __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./config-profiles"), exports);
20
20
  __exportStar(require("./hosts"), exports);
21
21
  __exportStar(require("./hwid"), exports);
22
+ __exportStar(require("./infra-billing"), exports);
22
23
  __exportStar(require("./internal-squads"), exports);
23
24
  __exportStar(require("./keygen"), exports);
24
25
  __exportStar(require("./nodes"), exports);
@@ -0,0 +1,18 @@
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
+ };
@@ -9,6 +9,7 @@ exports.USERS_ROUTES = {
9
9
  GET: '',
10
10
  DELETE: (uuid) => `${uuid}`,
11
11
  GET_BY_UUID: (uuid) => `${uuid}`,
12
+ ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`,
12
13
  ACTIONS: {
13
14
  ENABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/enable`,
14
15
  DISABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/disable`,
@@ -80,6 +80,7 @@ exports.REST_API = {
80
80
  GET: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET}`,
81
81
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE(uuid)}`,
82
82
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_UUID(uuid)}`,
83
+ ACCESSIBLE_NODES: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACCESSIBLE_NODES(uuid)}`,
83
84
  ACTIONS: {
84
85
  DISABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.DISABLE(uuid)}`,
85
86
  ENABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.ENABLE(uuid)}`,
@@ -178,4 +179,18 @@ exports.REST_API = {
178
179
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.GET_BY_UUID(uuid)}`,
179
180
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.DELETE(uuid)}`,
180
181
  },
182
+ INFRA_BILLING: {
183
+ GET_PROVIDERS: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDERS}`,
184
+ CREATE_PROVIDER: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_PROVIDER}`,
185
+ UPDATE_PROVIDER: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_PROVIDER}`,
186
+ DELETE_PROVIDER: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_PROVIDER(uuid)}`,
187
+ GET_PROVIDER_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDER_BY_UUID(uuid)}`,
188
+ GET_BILLING_NODES: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_NODES}`,
189
+ CREATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE}`,
190
+ UPDATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE}`,
191
+ DELETE_BILLING_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(uuid)}`,
192
+ GET_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY}`,
193
+ CREATE_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY}`,
194
+ DELETE_BILLING_HISTORY: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_HISTORY(uuid)}`,
195
+ },
181
196
  };
@@ -13,8 +13,8 @@ var CreateConfigProfileCommand;
13
13
  CreateConfigProfileCommand.RequestSchema = zod_1.z.object({
14
14
  name: zod_1.z
15
15
  .string()
16
- .min(6, 'Name must be at least 6 characters')
17
- .max(16, 'Name must be less than 16 characters')
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
  config: zod_1.z.object({}).passthrough(),
20
20
  });
@@ -11,19 +11,16 @@ var CreateHostCommand;
11
11
  CreateHostCommand.TSQ_url = CreateHostCommand.url;
12
12
  CreateHostCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HOSTS_ROUTES.CREATE, 'post', 'Create a new host');
13
13
  CreateHostCommand.RequestSchema = zod_1.z.object({
14
- configProfileUuid: zod_1.z
15
- .string({
16
- invalid_type_error: 'Config Profile UUID must be a string',
17
- })
18
- .uuid('Config Profile UUID must be a valid UUID'),
19
- configProfileInboundUuid: zod_1.z
20
- .string({
21
- invalid_type_error: 'Inbound UUID must be a string',
22
- })
23
- .uuid('Inbound UUID must be a valid UUID'),
14
+ inbound: zod_1.z.object({
15
+ configProfileUuid: zod_1.z.string().uuid(),
16
+ configProfileInboundUuid: zod_1.z.string().uuid(),
17
+ }),
24
18
  remark: zod_1.z
25
19
  .string({
26
20
  invalid_type_error: 'Remark must be a string',
21
+ })
22
+ .min(1, {
23
+ message: 'Remark must be at least 1 character',
27
24
  })
28
25
  .max(40, {
29
26
  message: 'Remark must be less than 40 characters',
@@ -41,7 +38,6 @@ var CreateHostCommand;
41
38
  host: zod_1.z.string().optional(),
42
39
  alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
43
40
  fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.FINGERPRINTS).nullable()),
44
- allowInsecure: zod_1.z.optional(zod_1.z.boolean().default(false)),
45
41
  isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
46
42
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS).default(constants_1.SECURITY_LAYERS.DEFAULT)),
47
43
  xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
@@ -13,17 +13,11 @@ var UpdateHostCommand;
13
13
  UpdateHostCommand.RequestSchema = models_1.HostsSchema.pick({
14
14
  uuid: true,
15
15
  }).extend({
16
- configProfileUuid: zod_1.z
17
- .string({
18
- invalid_type_error: 'Config Profile UUID must be a string',
19
- })
20
- .uuid('Config Profile UUID must be a valid UUID')
21
- .optional(),
22
- configProfileInboundUuid: zod_1.z
23
- .string({
24
- invalid_type_error: 'Inbound UUID must be a string',
16
+ inbound: zod_1.z
17
+ .object({
18
+ configProfileUuid: zod_1.z.string().uuid(),
19
+ configProfileInboundUuid: zod_1.z.string().uuid(),
25
20
  })
26
- .uuid('Inbound UUID must be a valid UUID')
27
21
  .optional(),
28
22
  remark: zod_1.z
29
23
  .string({
@@ -49,7 +43,6 @@ var UpdateHostCommand;
49
43
  host: zod_1.z.optional(zod_1.z.string()),
50
44
  alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
51
45
  fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.FINGERPRINTS).nullable()),
52
- allowInsecure: zod_1.z.optional(zod_1.z.boolean()),
53
46
  isDisabled: zod_1.z.optional(zod_1.z.boolean()),
54
47
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS)),
55
48
  xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
@@ -19,6 +19,7 @@ __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./config-profiles"), exports);
20
20
  __exportStar(require("./hosts"), exports);
21
21
  __exportStar(require("./hwid"), exports);
22
+ __exportStar(require("./infra-billing"), exports);
22
23
  __exportStar(require("./internal-squads"), exports);
23
24
  __exportStar(require("./keygen"), exports);
24
25
  __exportStar(require("./nodes"), exports);
@@ -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,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 = {}));
@@ -0,0 +1,24 @@
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 = {}));
@@ -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,29 @@
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 = {}));
@@ -0,0 +1,20 @@
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 = {}));
@@ -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 = {}));
@@ -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 = {}));