@remnawave/backend-contract 2.8.26 → 2.8.28

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 (50) hide show
  1. package/build/backend/api/controllers/users.d.ts +1 -0
  2. package/build/backend/api/controllers/users.d.ts.map +1 -1
  3. package/build/backend/api/controllers/users.js +1 -0
  4. package/build/backend/api/routes.d.ts +1 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +1 -0
  7. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +31 -21
  8. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -1
  9. package/build/backend/commands/infra-billing/create-billing-node.command.js +2 -2
  10. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +34 -14
  11. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +1 -1
  12. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +22 -15
  13. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -1
  14. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +22 -15
  15. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts.map +1 -1
  16. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +34 -14
  17. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +1 -1
  18. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +42 -18
  19. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +1 -1
  20. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +22 -15
  21. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -1
  22. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +34 -14
  23. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +1 -1
  24. package/build/backend/commands/users/get-all-users.command.d.ts.map +1 -1
  25. package/build/backend/commands/users/get-all-users.command.js +1 -1
  26. package/build/backend/commands/users/get-users-stream.command.d.ts +321 -0
  27. package/build/backend/commands/users/get-users-stream.command.d.ts.map +1 -0
  28. package/build/backend/commands/users/get-users-stream.command.js +37 -0
  29. package/build/backend/commands/users/index.d.ts +1 -0
  30. package/build/backend/commands/users/index.d.ts.map +1 -1
  31. package/build/backend/commands/users/index.js +1 -0
  32. package/build/backend/constants/errors/errors.d.ts +5 -0
  33. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  34. package/build/backend/constants/errors/errors.js +5 -0
  35. package/build/backend/models/infra-billing-node.schema.d.ts +10 -7
  36. package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -1
  37. package/build/backend/models/infra-billing-node.schema.js +3 -2
  38. package/build/backend/models/infra-provider.schema.d.ts +26 -10
  39. package/build/backend/models/infra-provider.schema.d.ts.map +1 -1
  40. package/build/backend/models/infra-provider.schema.js +6 -2
  41. package/build/frontend/api/controllers/users.js +1 -0
  42. package/build/frontend/api/routes.js +1 -0
  43. package/build/frontend/commands/infra-billing/create-billing-node.command.js +2 -2
  44. package/build/frontend/commands/users/get-all-users.command.js +1 -1
  45. package/build/frontend/commands/users/get-users-stream.command.js +37 -0
  46. package/build/frontend/commands/users/index.js +1 -0
  47. package/build/frontend/constants/errors/errors.js +5 -0
  48. package/build/frontend/models/infra-billing-node.schema.js +3 -2
  49. package/build/frontend/models/infra-provider.schema.js +6 -2
  50. package/package.json +1 -1
@@ -0,0 +1,321 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetUsersStreamCommand {
3
+ const url: "/api/users/stream";
4
+ const TSQ_url: "/api/users/stream";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestQuerySchema: z.ZodObject<{
7
+ cursor: z.ZodOptional<z.ZodString>;
8
+ size: z.ZodDefault<z.ZodNumber>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ size: number;
11
+ cursor?: string | undefined;
12
+ }, {
13
+ size?: number | undefined;
14
+ cursor?: string | undefined;
15
+ }>;
16
+ type RequestQuery = z.infer<typeof RequestQuerySchema>;
17
+ const ResponseSchema: z.ZodObject<{
18
+ response: z.ZodObject<{
19
+ users: z.ZodArray<z.ZodObject<{
20
+ uuid: z.ZodString;
21
+ id: z.ZodNumber;
22
+ shortUuid: z.ZodString;
23
+ username: z.ZodString;
24
+ status: z.ZodDefault<z.ZodNativeEnum<{
25
+ readonly ACTIVE: "ACTIVE";
26
+ readonly DISABLED: "DISABLED";
27
+ readonly LIMITED: "LIMITED";
28
+ readonly EXPIRED: "EXPIRED";
29
+ }>>;
30
+ trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
31
+ trafficLimitStrategy: z.ZodDefault<z.ZodNativeEnum<{
32
+ readonly NO_RESET: "NO_RESET";
33
+ readonly DAY: "DAY";
34
+ readonly WEEK: "WEEK";
35
+ readonly MONTH: "MONTH";
36
+ readonly MONTH_ROLLING: "MONTH_ROLLING";
37
+ }>>;
38
+ expireAt: z.ZodEffects<z.ZodString, Date, string>;
39
+ telegramId: z.ZodNullable<z.ZodNumber>;
40
+ email: z.ZodNullable<z.ZodString>;
41
+ description: z.ZodNullable<z.ZodString>;
42
+ tag: z.ZodNullable<z.ZodString>;
43
+ hwidDeviceLimit: z.ZodNullable<z.ZodNumber>;
44
+ externalSquadUuid: z.ZodNullable<z.ZodString>;
45
+ trojanPassword: z.ZodString;
46
+ vlessUuid: z.ZodString;
47
+ ssPassword: z.ZodString;
48
+ lastTriggeredThreshold: z.ZodDefault<z.ZodNumber>;
49
+ subRevokedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
50
+ lastTrafficResetAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
51
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
52
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
53
+ } & {
54
+ subscriptionUrl: z.ZodString;
55
+ activeInternalSquads: z.ZodArray<z.ZodObject<{
56
+ uuid: z.ZodString;
57
+ name: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ uuid: string;
60
+ name: string;
61
+ }, {
62
+ uuid: string;
63
+ name: string;
64
+ }>, "many">;
65
+ userTraffic: z.ZodObject<{
66
+ usedTrafficBytes: z.ZodNumber;
67
+ lifetimeUsedTrafficBytes: z.ZodNumber;
68
+ onlineAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
69
+ firstConnectedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
70
+ lastConnectedNodeUuid: z.ZodNullable<z.ZodString>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ usedTrafficBytes: number;
73
+ lifetimeUsedTrafficBytes: number;
74
+ onlineAt: Date | null;
75
+ firstConnectedAt: Date | null;
76
+ lastConnectedNodeUuid: string | null;
77
+ }, {
78
+ usedTrafficBytes: number;
79
+ lifetimeUsedTrafficBytes: number;
80
+ onlineAt: string | null;
81
+ firstConnectedAt: string | null;
82
+ lastConnectedNodeUuid: string | null;
83
+ }>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
86
+ uuid: string;
87
+ createdAt: Date;
88
+ updatedAt: Date;
89
+ description: string | null;
90
+ username: string;
91
+ tag: string | null;
92
+ id: number;
93
+ shortUuid: string;
94
+ trafficLimitBytes: number;
95
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | "MONTH_ROLLING";
96
+ expireAt: Date;
97
+ telegramId: number | null;
98
+ email: string | null;
99
+ hwidDeviceLimit: number | null;
100
+ externalSquadUuid: string | null;
101
+ trojanPassword: string;
102
+ vlessUuid: string;
103
+ ssPassword: string;
104
+ lastTriggeredThreshold: number;
105
+ subRevokedAt: Date | null;
106
+ lastTrafficResetAt: Date | null;
107
+ subscriptionUrl: string;
108
+ activeInternalSquads: {
109
+ uuid: string;
110
+ name: string;
111
+ }[];
112
+ userTraffic: {
113
+ usedTrafficBytes: number;
114
+ lifetimeUsedTrafficBytes: number;
115
+ onlineAt: Date | null;
116
+ firstConnectedAt: Date | null;
117
+ lastConnectedNodeUuid: string | null;
118
+ };
119
+ }, {
120
+ uuid: string;
121
+ createdAt: string;
122
+ updatedAt: string;
123
+ description: string | null;
124
+ username: string;
125
+ tag: string | null;
126
+ id: number;
127
+ shortUuid: string;
128
+ expireAt: string;
129
+ telegramId: number | null;
130
+ email: string | null;
131
+ hwidDeviceLimit: number | null;
132
+ externalSquadUuid: string | null;
133
+ trojanPassword: string;
134
+ vlessUuid: string;
135
+ ssPassword: string;
136
+ subRevokedAt: string | null;
137
+ lastTrafficResetAt: string | null;
138
+ subscriptionUrl: string;
139
+ activeInternalSquads: {
140
+ uuid: string;
141
+ name: string;
142
+ }[];
143
+ userTraffic: {
144
+ usedTrafficBytes: number;
145
+ lifetimeUsedTrafficBytes: number;
146
+ onlineAt: string | null;
147
+ firstConnectedAt: string | null;
148
+ lastConnectedNodeUuid: string | null;
149
+ };
150
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
151
+ trafficLimitBytes?: number | undefined;
152
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | "MONTH_ROLLING" | undefined;
153
+ lastTriggeredThreshold?: number | undefined;
154
+ }>, "many">;
155
+ nextCursor: z.ZodNullable<z.ZodString>;
156
+ hasMore: z.ZodBoolean;
157
+ }, "strip", z.ZodTypeAny, {
158
+ users: {
159
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
160
+ uuid: string;
161
+ createdAt: Date;
162
+ updatedAt: Date;
163
+ description: string | null;
164
+ username: string;
165
+ tag: string | null;
166
+ id: number;
167
+ shortUuid: string;
168
+ trafficLimitBytes: number;
169
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | "MONTH_ROLLING";
170
+ expireAt: Date;
171
+ telegramId: number | null;
172
+ email: string | null;
173
+ hwidDeviceLimit: number | null;
174
+ externalSquadUuid: string | null;
175
+ trojanPassword: string;
176
+ vlessUuid: string;
177
+ ssPassword: string;
178
+ lastTriggeredThreshold: number;
179
+ subRevokedAt: Date | null;
180
+ lastTrafficResetAt: Date | null;
181
+ subscriptionUrl: string;
182
+ activeInternalSquads: {
183
+ uuid: string;
184
+ name: string;
185
+ }[];
186
+ userTraffic: {
187
+ usedTrafficBytes: number;
188
+ lifetimeUsedTrafficBytes: number;
189
+ onlineAt: Date | null;
190
+ firstConnectedAt: Date | null;
191
+ lastConnectedNodeUuid: string | null;
192
+ };
193
+ }[];
194
+ nextCursor: string | null;
195
+ hasMore: boolean;
196
+ }, {
197
+ users: {
198
+ uuid: string;
199
+ createdAt: string;
200
+ updatedAt: string;
201
+ description: string | null;
202
+ username: string;
203
+ tag: string | null;
204
+ id: number;
205
+ shortUuid: string;
206
+ expireAt: string;
207
+ telegramId: number | null;
208
+ email: string | null;
209
+ hwidDeviceLimit: number | null;
210
+ externalSquadUuid: string | null;
211
+ trojanPassword: string;
212
+ vlessUuid: string;
213
+ ssPassword: string;
214
+ subRevokedAt: string | null;
215
+ lastTrafficResetAt: string | null;
216
+ subscriptionUrl: string;
217
+ activeInternalSquads: {
218
+ uuid: string;
219
+ name: string;
220
+ }[];
221
+ userTraffic: {
222
+ usedTrafficBytes: number;
223
+ lifetimeUsedTrafficBytes: number;
224
+ onlineAt: string | null;
225
+ firstConnectedAt: string | null;
226
+ lastConnectedNodeUuid: string | null;
227
+ };
228
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
229
+ trafficLimitBytes?: number | undefined;
230
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | "MONTH_ROLLING" | undefined;
231
+ lastTriggeredThreshold?: number | undefined;
232
+ }[];
233
+ nextCursor: string | null;
234
+ hasMore: boolean;
235
+ }>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ response: {
238
+ users: {
239
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
240
+ uuid: string;
241
+ createdAt: Date;
242
+ updatedAt: Date;
243
+ description: string | null;
244
+ username: string;
245
+ tag: string | null;
246
+ id: number;
247
+ shortUuid: string;
248
+ trafficLimitBytes: number;
249
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | "MONTH_ROLLING";
250
+ expireAt: Date;
251
+ telegramId: number | null;
252
+ email: string | null;
253
+ hwidDeviceLimit: number | null;
254
+ externalSquadUuid: string | null;
255
+ trojanPassword: string;
256
+ vlessUuid: string;
257
+ ssPassword: string;
258
+ lastTriggeredThreshold: number;
259
+ subRevokedAt: Date | null;
260
+ lastTrafficResetAt: Date | null;
261
+ subscriptionUrl: string;
262
+ activeInternalSquads: {
263
+ uuid: string;
264
+ name: string;
265
+ }[];
266
+ userTraffic: {
267
+ usedTrafficBytes: number;
268
+ lifetimeUsedTrafficBytes: number;
269
+ onlineAt: Date | null;
270
+ firstConnectedAt: Date | null;
271
+ lastConnectedNodeUuid: string | null;
272
+ };
273
+ }[];
274
+ nextCursor: string | null;
275
+ hasMore: boolean;
276
+ };
277
+ }, {
278
+ response: {
279
+ users: {
280
+ uuid: string;
281
+ createdAt: string;
282
+ updatedAt: string;
283
+ description: string | null;
284
+ username: string;
285
+ tag: string | null;
286
+ id: number;
287
+ shortUuid: string;
288
+ expireAt: string;
289
+ telegramId: number | null;
290
+ email: string | null;
291
+ hwidDeviceLimit: number | null;
292
+ externalSquadUuid: string | null;
293
+ trojanPassword: string;
294
+ vlessUuid: string;
295
+ ssPassword: string;
296
+ subRevokedAt: string | null;
297
+ lastTrafficResetAt: string | null;
298
+ subscriptionUrl: string;
299
+ activeInternalSquads: {
300
+ uuid: string;
301
+ name: string;
302
+ }[];
303
+ userTraffic: {
304
+ usedTrafficBytes: number;
305
+ lifetimeUsedTrafficBytes: number;
306
+ onlineAt: string | null;
307
+ firstConnectedAt: string | null;
308
+ lastConnectedNodeUuid: string | null;
309
+ };
310
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
311
+ trafficLimitBytes?: number | undefined;
312
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | "MONTH_ROLLING" | undefined;
313
+ lastTriggeredThreshold?: number | undefined;
314
+ }[];
315
+ nextCursor: string | null;
316
+ hasMore: boolean;
317
+ };
318
+ }>;
319
+ type Response = z.infer<typeof ResponseSchema>;
320
+ }
321
+ //# sourceMappingURL=get-users-stream.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-users-stream.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-users-stream.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;;;;;;;;MAe7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetUsersStreamCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const models_1 = require("../../models");
7
+ const api_1 = require("../../api");
8
+ var GetUsersStreamCommand;
9
+ (function (GetUsersStreamCommand) {
10
+ GetUsersStreamCommand.url = api_1.REST_API.USERS.STREAM;
11
+ GetUsersStreamCommand.TSQ_url = GetUsersStreamCommand.url;
12
+ GetUsersStreamCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.STREAM, 'get', 'Get all users using cursor-based (keyset) pagination', { scope: 'stream', kind: 'read' });
13
+ GetUsersStreamCommand.RequestQuerySchema = zod_1.z.object({
14
+ cursor: zod_1.z
15
+ .string()
16
+ .regex(/^\d+$/, 'Cursor must be a positive integer string')
17
+ .optional()
18
+ .describe('Cursor for pagination — pass the nextCursor from the previous response. Omit on the first request.'),
19
+ size: zod_1.z.coerce
20
+ .number()
21
+ .int()
22
+ .min(1, 'Size (limit) must be greater than 0')
23
+ .max(1000, 'Size (limit) must be less than 1000')
24
+ .describe('Number of results to return, no more than 1000')
25
+ .default(250),
26
+ });
27
+ GetUsersStreamCommand.ResponseSchema = zod_1.z.object({
28
+ response: zod_1.z.object({
29
+ users: zod_1.z.array(models_1.ExtendedUsersSchema),
30
+ nextCursor: zod_1.z
31
+ .string()
32
+ .nullable()
33
+ .describe('Cursor to fetch the next page, or null if there are no more results'),
34
+ hasMore: zod_1.z.boolean().describe('Whether there are more results to fetch'),
35
+ }),
36
+ });
37
+ })(GetUsersStreamCommand || (exports.GetUsersStreamCommand = GetUsersStreamCommand = {}));
@@ -8,6 +8,7 @@ export * from './get-by';
8
8
  export * from './get-user-accessible-nodes.command';
9
9
  export * from './get-user-by-uuid.command';
10
10
  export * from './get-user-subscription-request-history.command';
11
+ export * from './get-users-stream.command';
11
12
  export * from './resolve-user.command';
12
13
  export * from './tags';
13
14
  export * from './update-user.command';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AAEzB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iDAAiD,CAAC;AAEhE,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4BAA4B,CAAC;AAE3C,cAAc,iDAAiD,CAAC;AAChE,cAAc,4BAA4B,CAAC;AAE3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC"}
@@ -24,6 +24,7 @@ __exportStar(require("./get-by"), exports);
24
24
  __exportStar(require("./get-user-accessible-nodes.command"), exports);
25
25
  __exportStar(require("./get-user-by-uuid.command"), exports);
26
26
  __exportStar(require("./get-user-subscription-request-history.command"), exports);
27
+ __exportStar(require("./get-users-stream.command"), exports);
27
28
  __exportStar(require("./resolve-user.command"), exports);
28
29
  __exportStar(require("./tags"), exports);
29
30
  __exportStar(require("./update-user.command"), exports);
@@ -1174,5 +1174,10 @@ export declare const ERRORS: {
1174
1174
  readonly message: "One or more provided API token scopes are invalid";
1175
1175
  readonly httpCode: 400;
1176
1176
  };
1177
+ readonly CREATE_INFRA_BILLING_NODE_MISSING_TARGET: {
1178
+ readonly code: "A230";
1179
+ readonly message: "Either nodeUuid or name must be provided";
1180
+ readonly httpCode: 400;
1181
+ };
1177
1182
  };
1178
1183
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA2qBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiK3B,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA2qBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsK3B,CAAC"}
@@ -1145,4 +1145,9 @@ exports.ERRORS = {
1145
1145
  message: 'One or more provided API token scopes are invalid',
1146
1146
  httpCode: 400,
1147
1147
  },
1148
+ CREATE_INFRA_BILLING_NODE_MISSING_TARGET: {
1149
+ code: 'A230',
1150
+ message: 'Either nodeUuid or name must be provided',
1151
+ httpCode: 400,
1152
+ },
1148
1153
  };
@@ -1,7 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const InfraBillingNodeSchema: z.ZodObject<{
3
3
  uuid: z.ZodString;
4
- nodeUuid: z.ZodString;
4
+ nodeUuid: z.ZodNullable<z.ZodString>;
5
+ name: z.ZodNullable<z.ZodString>;
5
6
  providerUuid: z.ZodString;
6
7
  provider: z.ZodObject<Pick<{
7
8
  uuid: z.ZodString;
@@ -21,7 +22,7 @@ export declare const InfraBillingNodeSchema: z.ZodObject<{
21
22
  faviconLink: string | null;
22
23
  loginUrl: string | null;
23
24
  }>;
24
- node: z.ZodObject<Pick<{
25
+ node: z.ZodNullable<z.ZodObject<Pick<{
25
26
  uuid: z.ZodString;
26
27
  name: z.ZodString;
27
28
  address: z.ZodString;
@@ -281,7 +282,7 @@ export declare const InfraBillingNodeSchema: z.ZodObject<{
281
282
  uuid: string;
282
283
  countryCode: string;
283
284
  name: string;
284
- }>;
285
+ }>>;
285
286
  nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
286
287
  createdAt: z.ZodEffects<z.ZodString, Date, string>;
287
288
  updatedAt: z.ZodEffects<z.ZodString, Date, string>;
@@ -293,14 +294,15 @@ export declare const InfraBillingNodeSchema: z.ZodObject<{
293
294
  uuid: string;
294
295
  countryCode: string;
295
296
  name: string;
296
- };
297
+ } | null;
297
298
  provider: {
298
299
  uuid: string;
299
300
  name: string;
300
301
  faviconLink: string | null;
301
302
  loginUrl: string | null;
302
303
  };
303
- nodeUuid: string;
304
+ nodeUuid: string | null;
305
+ name: string | null;
304
306
  providerUuid: string;
305
307
  nextBillingAt: Date;
306
308
  }, {
@@ -311,14 +313,15 @@ export declare const InfraBillingNodeSchema: z.ZodObject<{
311
313
  uuid: string;
312
314
  countryCode: string;
313
315
  name: string;
314
- };
316
+ } | null;
315
317
  provider: {
316
318
  uuid: string;
317
319
  name: string;
318
320
  faviconLink: string | null;
319
321
  loginUrl: string | null;
320
322
  };
321
- nodeUuid: string;
323
+ nodeUuid: string | null;
324
+ name: string | null;
322
325
  providerUuid: string;
323
326
  nextBillingAt: string;
324
327
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"infra-billing-node.schema.d.ts","sourceRoot":"","sources":["../../../models/infra-billing-node.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BjC,CAAC"}
1
+ {"version":3,"file":"infra-billing-node.schema.d.ts","sourceRoot":"","sources":["../../../models/infra-billing-node.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BjC,CAAC"}
@@ -6,7 +6,8 @@ const infra_provider_schema_1 = require("./infra-provider.schema");
6
6
  const nodes_schema_1 = require("./nodes.schema");
7
7
  exports.InfraBillingNodeSchema = zod_1.z.object({
8
8
  uuid: zod_1.z.string().uuid(),
9
- nodeUuid: zod_1.z.string().uuid(),
9
+ nodeUuid: zod_1.z.string().uuid().nullable(),
10
+ name: zod_1.z.string().nullable(),
10
11
  providerUuid: zod_1.z.string().uuid(),
11
12
  provider: infra_provider_schema_1.PartialInfraProviderSchema.pick({
12
13
  uuid: true,
@@ -18,7 +19,7 @@ exports.InfraBillingNodeSchema = zod_1.z.object({
18
19
  uuid: true,
19
20
  name: true,
20
21
  countryCode: true,
21
- }),
22
+ }).nullable(),
22
23
  nextBillingAt: zod_1.z
23
24
  .string()
24
25
  .datetime()
@@ -17,17 +17,29 @@ export declare const InfraProviderSchema: z.ZodObject<{
17
17
  totalBills: number;
18
18
  }>;
19
19
  billingNodes: z.ZodArray<z.ZodObject<{
20
- nodeUuid: z.ZodString;
21
20
  name: z.ZodString;
22
- countryCode: z.ZodString;
21
+ details: z.ZodNullable<z.ZodObject<{
22
+ nodeUuid: z.ZodString;
23
+ countryCode: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ nodeUuid: string;
26
+ countryCode: string;
27
+ }, {
28
+ nodeUuid: string;
29
+ countryCode: string;
30
+ }>>;
23
31
  }, "strip", z.ZodTypeAny, {
24
- nodeUuid: string;
25
- countryCode: string;
26
32
  name: string;
33
+ details: {
34
+ nodeUuid: string;
35
+ countryCode: string;
36
+ } | null;
27
37
  }, {
28
- nodeUuid: string;
29
- countryCode: string;
30
38
  name: string;
39
+ details: {
40
+ nodeUuid: string;
41
+ countryCode: string;
42
+ } | null;
31
43
  }>, "many">;
32
44
  }, "strip", z.ZodTypeAny, {
33
45
  uuid: string;
@@ -41,9 +53,11 @@ export declare const InfraProviderSchema: z.ZodObject<{
41
53
  totalBills: number;
42
54
  };
43
55
  billingNodes: {
44
- nodeUuid: string;
45
- countryCode: string;
46
56
  name: string;
57
+ details: {
58
+ nodeUuid: string;
59
+ countryCode: string;
60
+ } | null;
47
61
  }[];
48
62
  }, {
49
63
  uuid: string;
@@ -57,9 +71,11 @@ export declare const InfraProviderSchema: z.ZodObject<{
57
71
  totalBills: number;
58
72
  };
59
73
  billingNodes: {
60
- nodeUuid: string;
61
- countryCode: string;
62
74
  name: string;
75
+ details: {
76
+ nodeUuid: string;
77
+ countryCode: string;
78
+ } | null;
63
79
  }[];
64
80
  }>;
65
81
  export declare const PartialInfraProviderSchema: z.ZodObject<{
@@ -1 +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"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8B9B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;EAcrC,CAAC"}
@@ -20,9 +20,13 @@ exports.InfraProviderSchema = zod_1.z.object({
20
20
  totalBills: zod_1.z.number(),
21
21
  }),
22
22
  billingNodes: zod_1.z.array(zod_1.z.object({
23
- nodeUuid: zod_1.z.string().uuid(),
24
23
  name: zod_1.z.string(),
25
- countryCode: zod_1.z.string(),
24
+ details: zod_1.z
25
+ .object({
26
+ nodeUuid: zod_1.z.string().uuid(),
27
+ countryCode: zod_1.z.string(),
28
+ })
29
+ .nullable(),
26
30
  })),
27
31
  });
28
32
  exports.PartialInfraProviderSchema = zod_1.z.object({
@@ -7,6 +7,7 @@ exports.USERS_ROUTES = {
7
7
  CREATE: '',
8
8
  UPDATE: '',
9
9
  GET: '',
10
+ STREAM: 'stream',
10
11
  DELETE: (uuid) => `${uuid}`,
11
12
  GET_BY_UUID: (uuid) => `${uuid}`,
12
13
  ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`,
@@ -97,6 +97,7 @@ exports.REST_API = {
97
97
  CREATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.CREATE}`,
98
98
  UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.UPDATE}`,
99
99
  GET: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET}`,
100
+ STREAM: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.STREAM}`,
100
101
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE(uuid)}`,
101
102
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_UUID(uuid)}`,
102
103
  ACCESSIBLE_NODES: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACCESSIBLE_NODES(uuid)}`,
@@ -12,14 +12,14 @@ var CreateInfraBillingNodeCommand;
12
12
  CreateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE, 'post', 'Create infra billing node', { scope: 'create-billing-node', kind: 'write' });
13
13
  CreateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
14
14
  providerUuid: zod_1.z.string().uuid(),
15
- nodeUuid: zod_1.z.string().uuid(),
15
+ nodeUuid: zod_1.z.string().uuid().nullable(),
16
+ name: zod_1.z.string().min(1).max(255).nullable(),
16
17
  nextBillingAt: zod_1.z
17
18
  .string({
18
19
  invalid_type_error: 'Invalid date format',
19
20
  })
20
21
  .datetime({ message: 'Invalid date format', offset: true, local: true })
21
22
  .transform((str) => new Date(str))
22
- .optional()
23
23
  .describe('Next billing date. Format: 2025-01-17T15:38:45.065Z'),
24
24
  });
25
25
  CreateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
@@ -9,7 +9,7 @@ var GetAllUsersCommand;
9
9
  (function (GetAllUsersCommand) {
10
10
  GetAllUsersCommand.url = api_1.REST_API.USERS.GET;
11
11
  GetAllUsersCommand.TSQ_url = GetAllUsersCommand.url;
12
- GetAllUsersCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.GET, 'get', 'Get all users', {
12
+ GetAllUsersCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.GET, 'get', 'Get all users using offset-based pagination', {
13
13
  scope: 'list',
14
14
  kind: 'read',
15
15
  });