@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,156 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetInfraProvidersCommand {
3
+ const url: "/api/infra-billing/providers";
4
+ const TSQ_url: "/api/infra-billing/providers";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const ResponseSchema: z.ZodObject<{
7
+ response: z.ZodObject<{
8
+ total: z.ZodNumber;
9
+ providers: z.ZodArray<z.ZodObject<{
10
+ uuid: z.ZodString;
11
+ name: z.ZodString;
12
+ faviconLink: z.ZodNullable<z.ZodString>;
13
+ loginUrl: z.ZodNullable<z.ZodString>;
14
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
15
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
16
+ billingHistory: z.ZodObject<{
17
+ totalAmount: z.ZodNumber;
18
+ totalBills: z.ZodNumber;
19
+ }, "strip", z.ZodTypeAny, {
20
+ totalAmount: number;
21
+ totalBills: number;
22
+ }, {
23
+ totalAmount: number;
24
+ totalBills: number;
25
+ }>;
26
+ billingNodes: z.ZodArray<z.ZodObject<{
27
+ nodeUuid: z.ZodString;
28
+ name: z.ZodString;
29
+ countryCode: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ name: string;
32
+ countryCode: string;
33
+ nodeUuid: string;
34
+ }, {
35
+ name: string;
36
+ countryCode: string;
37
+ nodeUuid: string;
38
+ }>, "many">;
39
+ }, "strip", z.ZodTypeAny, {
40
+ uuid: string;
41
+ createdAt: Date;
42
+ updatedAt: Date;
43
+ name: string;
44
+ faviconLink: string | null;
45
+ loginUrl: string | null;
46
+ billingHistory: {
47
+ totalAmount: number;
48
+ totalBills: number;
49
+ };
50
+ billingNodes: {
51
+ name: string;
52
+ countryCode: string;
53
+ nodeUuid: string;
54
+ }[];
55
+ }, {
56
+ uuid: string;
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ name: string;
60
+ faviconLink: string | null;
61
+ loginUrl: string | null;
62
+ billingHistory: {
63
+ totalAmount: number;
64
+ totalBills: number;
65
+ };
66
+ billingNodes: {
67
+ name: string;
68
+ countryCode: string;
69
+ nodeUuid: string;
70
+ }[];
71
+ }>, "many">;
72
+ }, "strip", z.ZodTypeAny, {
73
+ providers: {
74
+ uuid: string;
75
+ createdAt: Date;
76
+ updatedAt: Date;
77
+ name: string;
78
+ faviconLink: string | null;
79
+ loginUrl: string | null;
80
+ billingHistory: {
81
+ totalAmount: number;
82
+ totalBills: number;
83
+ };
84
+ billingNodes: {
85
+ name: string;
86
+ countryCode: string;
87
+ nodeUuid: string;
88
+ }[];
89
+ }[];
90
+ total: number;
91
+ }, {
92
+ providers: {
93
+ uuid: string;
94
+ createdAt: string;
95
+ updatedAt: string;
96
+ name: string;
97
+ faviconLink: string | null;
98
+ loginUrl: string | null;
99
+ billingHistory: {
100
+ totalAmount: number;
101
+ totalBills: number;
102
+ };
103
+ billingNodes: {
104
+ name: string;
105
+ countryCode: string;
106
+ nodeUuid: string;
107
+ }[];
108
+ }[];
109
+ total: number;
110
+ }>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ response: {
113
+ providers: {
114
+ uuid: string;
115
+ createdAt: Date;
116
+ updatedAt: Date;
117
+ name: string;
118
+ faviconLink: string | null;
119
+ loginUrl: string | null;
120
+ billingHistory: {
121
+ totalAmount: number;
122
+ totalBills: number;
123
+ };
124
+ billingNodes: {
125
+ name: string;
126
+ countryCode: string;
127
+ nodeUuid: string;
128
+ }[];
129
+ }[];
130
+ total: number;
131
+ };
132
+ }, {
133
+ response: {
134
+ providers: {
135
+ uuid: string;
136
+ createdAt: string;
137
+ updatedAt: string;
138
+ name: string;
139
+ faviconLink: string | null;
140
+ loginUrl: string | null;
141
+ billingHistory: {
142
+ totalAmount: number;
143
+ totalBills: number;
144
+ };
145
+ billingNodes: {
146
+ name: string;
147
+ countryCode: string;
148
+ nodeUuid: string;
149
+ }[];
150
+ }[];
151
+ total: number;
152
+ };
153
+ }>;
154
+ type Response = z.infer<typeof ResponseSchema>;
155
+ }
156
+ //# sourceMappingURL=get-infra-providers.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-infra-providers.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/get-infra-providers.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,wBAAwB,CAAC;IAC/B,MAAM,GAAG,gCAAuC,CAAC;IACjD,MAAM,OAAO,gCAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetInfraProvidersCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ const models_1 = require("../../models");
8
+ var GetInfraProvidersCommand;
9
+ (function (GetInfraProvidersCommand) {
10
+ GetInfraProvidersCommand.url = api_1.REST_API.INFRA_BILLING.GET_PROVIDERS;
11
+ GetInfraProvidersCommand.TSQ_url = GetInfraProvidersCommand.url;
12
+ GetInfraProvidersCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.GET_PROVIDERS, 'get', 'Get all infra providers');
13
+ GetInfraProvidersCommand.ResponseSchema = zod_1.z.object({
14
+ response: zod_1.z.object({
15
+ total: zod_1.z.number(),
16
+ providers: zod_1.z.array(models_1.InfraProviderSchema),
17
+ }),
18
+ });
19
+ })(GetInfraProvidersCommand || (exports.GetInfraProvidersCommand = GetInfraProvidersCommand = {}));
@@ -0,0 +1,13 @@
1
+ export * from './create-bill-record.command';
2
+ export * from './create-billing-node.command';
3
+ export * from './create-infra-provider.command';
4
+ export * from './delete-bill-record-by-uuid.command';
5
+ export * from './delete-billing-node-by-uuid.command';
6
+ export * from './delete-infra-provider-by-uuid.command';
7
+ export * from './get-bill-records.command';
8
+ export * from './get-blling-nodes.command';
9
+ export * from './get-infra-provider-by-uuid.command';
10
+ export * from './get-infra-providers.command';
11
+ export * from './update-billing-node.command';
12
+ export * from './update-infra-provider.command';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./create-bill-record.command"), exports);
18
+ __exportStar(require("./create-billing-node.command"), exports);
19
+ __exportStar(require("./create-infra-provider.command"), exports);
20
+ __exportStar(require("./delete-bill-record-by-uuid.command"), exports);
21
+ __exportStar(require("./delete-billing-node-by-uuid.command"), exports);
22
+ __exportStar(require("./delete-infra-provider-by-uuid.command"), exports);
23
+ __exportStar(require("./get-bill-records.command"), exports);
24
+ __exportStar(require("./get-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);
@@ -0,0 +1,410 @@
1
+ import { z } from 'zod';
2
+ export declare namespace UpdateInfraBillingNodeCommand {
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
+ uuid: z.ZodString;
8
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ uuid: string;
11
+ nextBillingAt: Date;
12
+ }, {
13
+ uuid: string;
14
+ nextBillingAt: string;
15
+ }>;
16
+ type Request = z.infer<typeof RequestSchema>;
17
+ const ResponseSchema: z.ZodObject<{
18
+ response: z.ZodObject<{
19
+ totalBillingNodes: z.ZodNumber;
20
+ billingNodes: z.ZodArray<z.ZodObject<{
21
+ uuid: z.ZodString;
22
+ nodeUuid: z.ZodString;
23
+ providerUuid: z.ZodString;
24
+ provider: z.ZodObject<Pick<{
25
+ uuid: z.ZodString;
26
+ name: z.ZodString;
27
+ faviconLink: z.ZodNullable<z.ZodString>;
28
+ loginUrl: z.ZodNullable<z.ZodString>;
29
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
30
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
31
+ }, "uuid" | "name" | "faviconLink" | "loginUrl">, "strip", z.ZodTypeAny, {
32
+ uuid: string;
33
+ name: string;
34
+ faviconLink: string | null;
35
+ loginUrl: string | null;
36
+ }, {
37
+ uuid: string;
38
+ name: string;
39
+ faviconLink: string | null;
40
+ loginUrl: string | null;
41
+ }>;
42
+ node: z.ZodObject<Pick<{
43
+ uuid: z.ZodString;
44
+ name: z.ZodString;
45
+ address: z.ZodString;
46
+ port: z.ZodNullable<z.ZodNumber>;
47
+ isConnected: z.ZodBoolean;
48
+ isDisabled: z.ZodBoolean;
49
+ isConnecting: z.ZodBoolean;
50
+ isNodeOnline: z.ZodBoolean;
51
+ isXrayRunning: z.ZodBoolean;
52
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
53
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
54
+ xrayVersion: z.ZodNullable<z.ZodString>;
55
+ xrayUptime: z.ZodString;
56
+ isTrafficTrackingActive: z.ZodBoolean;
57
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
58
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
59
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
60
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
61
+ usersOnline: z.ZodNullable<z.ZodNumber>;
62
+ viewPosition: z.ZodNumber;
63
+ countryCode: z.ZodString;
64
+ consumptionMultiplier: z.ZodNumber;
65
+ cpuCount: z.ZodNullable<z.ZodNumber>;
66
+ cpuModel: z.ZodNullable<z.ZodString>;
67
+ totalRam: z.ZodNullable<z.ZodString>;
68
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
69
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
70
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
71
+ activeInbounds: z.ZodNullable<z.ZodArray<z.ZodObject<{
72
+ uuid: z.ZodString;
73
+ profileUuid: z.ZodString;
74
+ tag: z.ZodString;
75
+ type: z.ZodString;
76
+ network: z.ZodNullable<z.ZodString>;
77
+ security: z.ZodNullable<z.ZodString>;
78
+ port: z.ZodNullable<z.ZodNumber>;
79
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ type: string;
82
+ uuid: string;
83
+ profileUuid: string;
84
+ tag: string;
85
+ network: string | null;
86
+ security: string | null;
87
+ port: number | null;
88
+ rawInbound?: unknown;
89
+ }, {
90
+ type: string;
91
+ uuid: string;
92
+ profileUuid: string;
93
+ tag: string;
94
+ network: string | null;
95
+ security: string | null;
96
+ port: number | null;
97
+ rawInbound?: unknown;
98
+ }>, "many">>;
99
+ providerUuid: z.ZodNullable<z.ZodString>;
100
+ provider: z.ZodNullable<z.ZodObject<{
101
+ uuid: z.ZodString;
102
+ name: z.ZodString;
103
+ faviconLink: z.ZodNullable<z.ZodString>;
104
+ loginUrl: z.ZodNullable<z.ZodString>;
105
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
106
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ uuid: string;
109
+ createdAt: Date;
110
+ updatedAt: Date;
111
+ name: string;
112
+ faviconLink: string | null;
113
+ loginUrl: string | null;
114
+ }, {
115
+ uuid: string;
116
+ createdAt: string;
117
+ updatedAt: string;
118
+ name: string;
119
+ faviconLink: string | null;
120
+ loginUrl: string | null;
121
+ }>>;
122
+ }, "uuid" | "name" | "countryCode">, "strip", z.ZodTypeAny, {
123
+ uuid: string;
124
+ name: string;
125
+ countryCode: string;
126
+ }, {
127
+ uuid: string;
128
+ name: string;
129
+ countryCode: string;
130
+ }>;
131
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
132
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
133
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ uuid: string;
136
+ createdAt: Date;
137
+ updatedAt: Date;
138
+ nodeUuid: string;
139
+ providerUuid: string;
140
+ provider: {
141
+ uuid: string;
142
+ name: string;
143
+ faviconLink: string | null;
144
+ loginUrl: string | null;
145
+ };
146
+ node: {
147
+ uuid: string;
148
+ name: string;
149
+ countryCode: string;
150
+ };
151
+ nextBillingAt: Date;
152
+ }, {
153
+ uuid: string;
154
+ createdAt: string;
155
+ updatedAt: string;
156
+ nodeUuid: string;
157
+ providerUuid: string;
158
+ provider: {
159
+ uuid: string;
160
+ name: string;
161
+ faviconLink: string | null;
162
+ loginUrl: string | null;
163
+ };
164
+ node: {
165
+ uuid: string;
166
+ name: string;
167
+ countryCode: string;
168
+ };
169
+ nextBillingAt: string;
170
+ }>, "many">;
171
+ availableBillingNodes: z.ZodArray<z.ZodObject<Pick<{
172
+ uuid: z.ZodString;
173
+ name: z.ZodString;
174
+ address: z.ZodString;
175
+ port: z.ZodNullable<z.ZodNumber>;
176
+ isConnected: z.ZodBoolean;
177
+ isDisabled: z.ZodBoolean;
178
+ isConnecting: z.ZodBoolean;
179
+ isNodeOnline: z.ZodBoolean;
180
+ isXrayRunning: z.ZodBoolean;
181
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
182
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
183
+ xrayVersion: z.ZodNullable<z.ZodString>;
184
+ xrayUptime: z.ZodString;
185
+ isTrafficTrackingActive: z.ZodBoolean;
186
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
187
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
188
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
189
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
190
+ usersOnline: z.ZodNullable<z.ZodNumber>;
191
+ viewPosition: z.ZodNumber;
192
+ countryCode: z.ZodString;
193
+ consumptionMultiplier: z.ZodNumber;
194
+ cpuCount: z.ZodNullable<z.ZodNumber>;
195
+ cpuModel: z.ZodNullable<z.ZodString>;
196
+ totalRam: z.ZodNullable<z.ZodString>;
197
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
198
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
199
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
200
+ activeInbounds: z.ZodNullable<z.ZodArray<z.ZodObject<{
201
+ uuid: z.ZodString;
202
+ profileUuid: z.ZodString;
203
+ tag: z.ZodString;
204
+ type: z.ZodString;
205
+ network: z.ZodNullable<z.ZodString>;
206
+ security: z.ZodNullable<z.ZodString>;
207
+ port: z.ZodNullable<z.ZodNumber>;
208
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ type: string;
211
+ uuid: string;
212
+ profileUuid: string;
213
+ tag: string;
214
+ network: string | null;
215
+ security: string | null;
216
+ port: number | null;
217
+ rawInbound?: unknown;
218
+ }, {
219
+ type: string;
220
+ uuid: string;
221
+ profileUuid: string;
222
+ tag: string;
223
+ network: string | null;
224
+ security: string | null;
225
+ port: number | null;
226
+ rawInbound?: unknown;
227
+ }>, "many">>;
228
+ providerUuid: z.ZodNullable<z.ZodString>;
229
+ provider: z.ZodNullable<z.ZodObject<{
230
+ uuid: z.ZodString;
231
+ name: z.ZodString;
232
+ faviconLink: z.ZodNullable<z.ZodString>;
233
+ loginUrl: z.ZodNullable<z.ZodString>;
234
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
235
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ uuid: string;
238
+ createdAt: Date;
239
+ updatedAt: Date;
240
+ name: string;
241
+ faviconLink: string | null;
242
+ loginUrl: string | null;
243
+ }, {
244
+ uuid: string;
245
+ createdAt: string;
246
+ updatedAt: string;
247
+ name: string;
248
+ faviconLink: string | null;
249
+ loginUrl: string | null;
250
+ }>>;
251
+ }, "uuid" | "name" | "countryCode">, "strip", z.ZodTypeAny, {
252
+ uuid: string;
253
+ name: string;
254
+ countryCode: string;
255
+ }, {
256
+ uuid: string;
257
+ name: string;
258
+ countryCode: string;
259
+ }>, "many">;
260
+ totalAvailableBillingNodes: z.ZodNumber;
261
+ stats: z.ZodObject<{
262
+ upcomingNodesCount: z.ZodNumber;
263
+ currentMonthPayments: z.ZodNumber;
264
+ totalSpent: z.ZodNumber;
265
+ }, "strip", z.ZodTypeAny, {
266
+ upcomingNodesCount: number;
267
+ currentMonthPayments: number;
268
+ totalSpent: number;
269
+ }, {
270
+ upcomingNodesCount: number;
271
+ currentMonthPayments: number;
272
+ totalSpent: number;
273
+ }>;
274
+ }, "strip", z.ZodTypeAny, {
275
+ stats: {
276
+ upcomingNodesCount: number;
277
+ currentMonthPayments: number;
278
+ totalSpent: number;
279
+ };
280
+ billingNodes: {
281
+ uuid: string;
282
+ createdAt: Date;
283
+ updatedAt: Date;
284
+ nodeUuid: string;
285
+ providerUuid: string;
286
+ provider: {
287
+ uuid: string;
288
+ name: string;
289
+ faviconLink: string | null;
290
+ loginUrl: string | null;
291
+ };
292
+ node: {
293
+ uuid: string;
294
+ name: string;
295
+ countryCode: string;
296
+ };
297
+ nextBillingAt: Date;
298
+ }[];
299
+ totalBillingNodes: number;
300
+ availableBillingNodes: {
301
+ uuid: string;
302
+ name: string;
303
+ countryCode: string;
304
+ }[];
305
+ totalAvailableBillingNodes: number;
306
+ }, {
307
+ stats: {
308
+ upcomingNodesCount: number;
309
+ currentMonthPayments: number;
310
+ totalSpent: number;
311
+ };
312
+ billingNodes: {
313
+ uuid: string;
314
+ createdAt: string;
315
+ updatedAt: string;
316
+ nodeUuid: string;
317
+ providerUuid: string;
318
+ provider: {
319
+ uuid: string;
320
+ name: string;
321
+ faviconLink: string | null;
322
+ loginUrl: string | null;
323
+ };
324
+ node: {
325
+ uuid: string;
326
+ name: string;
327
+ countryCode: string;
328
+ };
329
+ nextBillingAt: string;
330
+ }[];
331
+ totalBillingNodes: number;
332
+ availableBillingNodes: {
333
+ uuid: string;
334
+ name: string;
335
+ countryCode: string;
336
+ }[];
337
+ totalAvailableBillingNodes: number;
338
+ }>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ response: {
341
+ stats: {
342
+ upcomingNodesCount: number;
343
+ currentMonthPayments: number;
344
+ totalSpent: number;
345
+ };
346
+ billingNodes: {
347
+ uuid: string;
348
+ createdAt: Date;
349
+ updatedAt: Date;
350
+ nodeUuid: string;
351
+ providerUuid: string;
352
+ provider: {
353
+ uuid: string;
354
+ name: string;
355
+ faviconLink: string | null;
356
+ loginUrl: string | null;
357
+ };
358
+ node: {
359
+ uuid: string;
360
+ name: string;
361
+ countryCode: string;
362
+ };
363
+ nextBillingAt: Date;
364
+ }[];
365
+ totalBillingNodes: number;
366
+ availableBillingNodes: {
367
+ uuid: string;
368
+ name: string;
369
+ countryCode: string;
370
+ }[];
371
+ totalAvailableBillingNodes: number;
372
+ };
373
+ }, {
374
+ response: {
375
+ stats: {
376
+ upcomingNodesCount: number;
377
+ currentMonthPayments: number;
378
+ totalSpent: number;
379
+ };
380
+ billingNodes: {
381
+ uuid: string;
382
+ createdAt: string;
383
+ updatedAt: string;
384
+ nodeUuid: string;
385
+ providerUuid: string;
386
+ provider: {
387
+ uuid: string;
388
+ name: string;
389
+ faviconLink: string | null;
390
+ loginUrl: string | null;
391
+ };
392
+ node: {
393
+ uuid: string;
394
+ name: string;
395
+ countryCode: string;
396
+ };
397
+ nextBillingAt: string;
398
+ }[];
399
+ totalBillingNodes: number;
400
+ availableBillingNodes: {
401
+ uuid: string;
402
+ name: string;
403
+ countryCode: string;
404
+ }[];
405
+ totalAvailableBillingNodes: number;
406
+ };
407
+ }>;
408
+ type Response = z.infer<typeof ResponseSchema>;
409
+ }
410
+ //# sourceMappingURL=update-billing-node.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-billing-node.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/update-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;;;;;;;;;MAQxB,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,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateInfraBillingNodeCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ const constants_1 = require("../../constants");
8
+ var UpdateInfraBillingNodeCommand;
9
+ (function (UpdateInfraBillingNodeCommand) {
10
+ UpdateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_BILLING_NODE;
11
+ UpdateInfraBillingNodeCommand.TSQ_url = UpdateInfraBillingNodeCommand.url;
12
+ UpdateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE, 'patch', 'Update infra billing node');
13
+ UpdateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ nextBillingAt: zod_1.z
16
+ .string({
17
+ invalid_type_error: 'Invalid date format',
18
+ })
19
+ .datetime({ message: 'Invalid date format', offset: true, local: true })
20
+ .transform((str) => new Date(str)),
21
+ });
22
+ UpdateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
23
+ response: zod_1.z.object({
24
+ totalBillingNodes: zod_1.z.number(),
25
+ billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
26
+ availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
27
+ totalAvailableBillingNodes: zod_1.z.number(),
28
+ stats: zod_1.z.object({
29
+ upcomingNodesCount: zod_1.z.number(),
30
+ currentMonthPayments: zod_1.z.number(),
31
+ totalSpent: zod_1.z.number(),
32
+ }),
33
+ }),
34
+ });
35
+ })(UpdateInfraBillingNodeCommand || (exports.UpdateInfraBillingNodeCommand = UpdateInfraBillingNodeCommand = {}));