@remnawave/backend-contract 2.1.50 → 2.1.51

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 (67) 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/subscription-request-history.d.ts +6 -0
  5. package/build/backend/api/controllers/subscription-request-history.d.ts.map +1 -0
  6. package/build/backend/api/controllers/subscription-request-history.js +8 -0
  7. package/build/backend/api/controllers-info.d.ts +4 -0
  8. package/build/backend/api/controllers-info.d.ts.map +1 -1
  9. package/build/backend/api/controllers-info.js +4 -0
  10. package/build/backend/api/routes.d.ts +4 -0
  11. package/build/backend/api/routes.d.ts.map +1 -1
  12. package/build/backend/api/routes.js +4 -0
  13. package/build/backend/commands/hwid/get-all-hwid-devices.command.d.ts.map +1 -1
  14. package/build/backend/commands/hwid/get-all-hwid-devices.command.js +2 -31
  15. package/build/backend/commands/index.d.ts +1 -0
  16. package/build/backend/commands/index.d.ts.map +1 -1
  17. package/build/backend/commands/index.js +1 -0
  18. package/build/backend/commands/subscription-request-history/get-subscription-request-history-stats.command.d.ts +46 -0
  19. package/build/backend/commands/subscription-request-history/get-subscription-request-history-stats.command.d.ts.map +1 -0
  20. package/build/backend/commands/subscription-request-history/get-subscription-request-history-stats.command.js +20 -0
  21. package/build/backend/commands/subscription-request-history/get-subscription-request-history.command.d.ts +125 -0
  22. package/build/backend/commands/subscription-request-history/get-subscription-request-history.command.d.ts.map +1 -0
  23. package/build/backend/commands/subscription-request-history/get-subscription-request-history.command.js +20 -0
  24. package/build/backend/commands/subscription-request-history/index.d.ts +3 -0
  25. package/build/backend/commands/subscription-request-history/index.d.ts.map +1 -0
  26. package/build/backend/commands/subscription-request-history/index.js +18 -0
  27. package/build/backend/commands/users/get-all-users.command.d.ts.map +1 -1
  28. package/build/backend/commands/users/get-all-users.command.js +2 -31
  29. package/build/backend/constants/errors/errors.d.ts +5 -0
  30. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  31. package/build/backend/constants/errors/errors.js +5 -0
  32. package/build/backend/models/index.d.ts +2 -0
  33. package/build/backend/models/index.d.ts.map +1 -1
  34. package/build/backend/models/index.js +2 -0
  35. package/build/backend/models/subscription-request-history.schema.d.ts +21 -0
  36. package/build/backend/models/subscription-request-history.schema.d.ts.map +1 -0
  37. package/build/backend/models/subscription-request-history.schema.js +14 -0
  38. package/build/backend/models/tanstack-query/index.d.ts +4 -0
  39. package/build/backend/models/tanstack-query/index.d.ts.map +1 -0
  40. package/build/backend/models/tanstack-query/index.js +19 -0
  41. package/build/backend/models/tanstack-query/tanstask-query-filter.schema.d.ts +12 -0
  42. package/build/backend/models/tanstack-query/tanstask-query-filter.schema.d.ts.map +1 -0
  43. package/build/backend/models/tanstack-query/tanstask-query-filter.schema.js +11 -0
  44. package/build/backend/models/tanstack-query/tanstask-query-request-query.schema.d.ts +54 -0
  45. package/build/backend/models/tanstack-query/tanstask-query-request-query.schema.d.ts.map +1 -0
  46. package/build/backend/models/tanstack-query/tanstask-query-request-query.schema.js +28 -0
  47. package/build/backend/models/tanstack-query/tanstask-query-sorting.schema.d.ts +12 -0
  48. package/build/backend/models/tanstack-query/tanstask-query-sorting.schema.d.ts.map +1 -0
  49. package/build/backend/models/tanstack-query/tanstask-query-sorting.schema.js +8 -0
  50. package/build/frontend/api/controllers/index.js +1 -0
  51. package/build/frontend/api/controllers/subscription-request-history.js +8 -0
  52. package/build/frontend/api/controllers-info.js +4 -0
  53. package/build/frontend/api/routes.js +4 -0
  54. package/build/frontend/commands/hwid/get-all-hwid-devices.command.js +2 -31
  55. package/build/frontend/commands/index.js +1 -0
  56. package/build/frontend/commands/subscription-request-history/get-subscription-request-history-stats.command.js +20 -0
  57. package/build/frontend/commands/subscription-request-history/get-subscription-request-history.command.js +20 -0
  58. package/build/frontend/commands/subscription-request-history/index.js +18 -0
  59. package/build/frontend/commands/users/get-all-users.command.js +2 -31
  60. package/build/frontend/constants/errors/errors.js +5 -0
  61. package/build/frontend/models/index.js +2 -0
  62. package/build/frontend/models/subscription-request-history.schema.js +14 -0
  63. package/build/frontend/models/tanstack-query/index.js +19 -0
  64. package/build/frontend/models/tanstack-query/tanstask-query-filter.schema.js +11 -0
  65. package/build/frontend/models/tanstack-query/tanstask-query-request-query.schema.js +28 -0
  66. package/build/frontend/models/tanstack-query/tanstask-query-sorting.schema.js +8 -0
  67. package/package.json +1 -1
@@ -8,6 +8,7 @@ export * from './internal-squads';
8
8
  export * from './keygen';
9
9
  export * from './nodes';
10
10
  export * from './subscription';
11
+ export * from './subscription-request-history';
11
12
  export * from './subscription-settings';
12
13
  export * from './subscription-template';
13
14
  export * from './subscriptions';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -24,6 +24,7 @@ __exportStar(require("./internal-squads"), exports);
24
24
  __exportStar(require("./keygen"), exports);
25
25
  __exportStar(require("./nodes"), exports);
26
26
  __exportStar(require("./subscription"), exports);
27
+ __exportStar(require("./subscription-request-history"), exports);
27
28
  __exportStar(require("./subscription-settings"), exports);
28
29
  __exportStar(require("./subscription-template"), exports);
29
30
  __exportStar(require("./subscriptions"), exports);
@@ -0,0 +1,6 @@
1
+ export declare const SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER: "subscription-request-history";
2
+ export declare const SUBSCRIPTION_REQUEST_HISTORY_ROUTES: {
3
+ readonly GET: "";
4
+ readonly STATS: "stats";
5
+ };
6
+ //# sourceMappingURL=subscription-request-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-request-history.d.ts","sourceRoot":"","sources":["../../../../api/controllers/subscription-request-history.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uCAAuC,EAAG,8BAAuC,CAAC;AAE/F,eAAO,MAAM,mCAAmC;;;CAGtC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUBSCRIPTION_REQUEST_HISTORY_ROUTES = exports.SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER = void 0;
4
+ exports.SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER = 'subscription-request-history';
5
+ exports.SUBSCRIPTION_REQUEST_HISTORY_ROUTES = {
6
+ GET: '',
7
+ STATS: 'stats',
8
+ };
@@ -75,5 +75,9 @@ export declare const CONTROLLERS_INFO: {
75
75
  readonly tag: "Keygen Controller";
76
76
  readonly description: "Generation of SSL_CERT for Remnawave Node.";
77
77
  };
78
+ readonly SUBSCRIPTION_REQUEST_HISTORY: {
79
+ readonly tag: "Subscription Request History Controller";
80
+ readonly description: "";
81
+ };
78
82
  };
79
83
  //# sourceMappingURL=controllers-info.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"controllers-info.d.ts","sourceRoot":"","sources":["../../../api/controllers-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFnB,CAAC"}
1
+ {"version":3,"file":"controllers-info.d.ts","sourceRoot":"","sources":["../../../api/controllers-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFnB,CAAC"}
@@ -78,4 +78,8 @@ exports.CONTROLLERS_INFO = {
78
78
  tag: 'Keygen Controller',
79
79
  description: 'Generation of SSL_CERT for Remnawave Node.',
80
80
  },
81
+ SUBSCRIPTION_REQUEST_HISTORY: {
82
+ tag: 'Subscription Request History Controller',
83
+ description: '',
84
+ },
81
85
  };
@@ -178,5 +178,9 @@ export declare const REST_API: {
178
178
  readonly CREATE_BILLING_HISTORY: "/api/infra-billing/history";
179
179
  readonly DELETE_BILLING_HISTORY: (uuid: string) => string;
180
180
  };
181
+ readonly SUBSCRIPTION_REQUEST_HISTORY: {
182
+ readonly GET: "/api/subscription-request-history/";
183
+ readonly STATS: "/api/subscription-request-history/stats";
184
+ };
181
185
  };
182
186
  //# sourceMappingURL=routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA+BD,MAAM;;;;;;;;;;mDAaQ,MAAM;;;;;;;;0CAWf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;;;;;qCAUlB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA+BD,MAAM;;;;;;;;;;mDAaQ,MAAM;;;;;;;;0CAWf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;;;;;qCAUlB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;CAOnC,CAAC"}
@@ -215,4 +215,8 @@ exports.REST_API = {
215
215
  CREATE_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY}`,
216
216
  DELETE_BILLING_HISTORY: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_HISTORY(uuid)}`,
217
217
  },
218
+ SUBSCRIPTION_REQUEST_HISTORY: {
219
+ GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_REQUEST_HISTORY_ROUTES.GET}`,
220
+ STATS: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_REQUEST_HISTORY_ROUTES.STATS}`,
221
+ },
218
222
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-all-hwid-devices.command.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/get-all-hwid-devices.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,wBAAwB,CAAC;IAC/B,MAAM,GAAG,qBAAqC,CAAC;IAC/C,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAYK,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiC7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-all-hwid-devices.command.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/get-all-hwid-devices.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,wBAAwB,CAAC;IAC/B,MAAM,GAAG,qBAAqC,CAAC;IAC/C,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAkC,CAAC;IAClE,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -2,44 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetAllHwidDevicesCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../../constants");
6
5
  const models_1 = require("../../models");
6
+ const constants_1 = require("../../constants");
7
7
  const api_1 = require("../../api");
8
8
  var GetAllHwidDevicesCommand;
9
9
  (function (GetAllHwidDevicesCommand) {
10
10
  GetAllHwidDevicesCommand.url = api_1.REST_API.HWID.GET_ALL_HWID_DEVICES;
11
11
  GetAllHwidDevicesCommand.TSQ_url = GetAllHwidDevicesCommand.url;
12
12
  GetAllHwidDevicesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.GET_ALL_HWID_DEVICES, 'get', 'Get all HWID devices');
13
- const FilterSchema = zod_1.z.object({
14
- id: zod_1.z.string(),
15
- value: zod_1.z.unknown(),
16
- });
17
- const SortingSchema = zod_1.z.object({
18
- id: zod_1.z.string(),
19
- desc: zod_1.z.boolean(),
20
- });
21
- GetAllHwidDevicesCommand.RequestQuerySchema = zod_1.z.object({
22
- start: zod_1.z.coerce
23
- .number()
24
- .default(0)
25
- .describe('Start index (offset) of the results to return, default is 0'),
26
- size: zod_1.z.coerce
27
- .number()
28
- .min(1, 'Size (limit) must be greater than 0')
29
- .max(1000, 'Size (limit) must be less than 1000')
30
- .describe('Number of results to return, no more than 1000')
31
- .default(25),
32
- filters: zod_1.z
33
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(FilterSchema))
34
- .optional(),
35
- filterModes: zod_1.z
36
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
37
- .optional(),
38
- globalFilterMode: zod_1.z.string().optional(),
39
- sorting: zod_1.z
40
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(SortingSchema))
41
- .optional(),
42
- });
13
+ GetAllHwidDevicesCommand.RequestQuerySchema = models_1.TanstackQueryRequestQuerySchema;
43
14
  GetAllHwidDevicesCommand.ResponseSchema = zod_1.z.object({
44
15
  response: zod_1.z.object({
45
16
  devices: zod_1.z.array(models_1.HwidUserDeviceSchema),
@@ -8,6 +8,7 @@ export * from './internal-squads';
8
8
  export * from './keygen';
9
9
  export * from './nodes';
10
10
  export * from './subscription';
11
+ export * from './subscription-request-history';
11
12
  export * from './subscription-settings';
12
13
  export * from './subscription-template';
13
14
  export * from './subscriptions';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -24,6 +24,7 @@ __exportStar(require("./internal-squads"), exports);
24
24
  __exportStar(require("./keygen"), exports);
25
25
  __exportStar(require("./nodes"), exports);
26
26
  __exportStar(require("./subscription"), exports);
27
+ __exportStar(require("./subscription-request-history"), exports);
27
28
  __exportStar(require("./subscription-settings"), exports);
28
29
  __exportStar(require("./subscription-template"), exports);
29
30
  __exportStar(require("./subscriptions"), exports);
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetSubscriptionRequestHistoryStatsCommand {
3
+ const url: "/api/subscription-request-history/stats";
4
+ const TSQ_url: "/api/subscription-request-history/stats";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const ResponseSchema: z.ZodObject<{
7
+ response: z.ZodObject<{
8
+ byParsedApp: z.ZodArray<z.ZodObject<{
9
+ app: z.ZodString;
10
+ count: z.ZodNumber;
11
+ }, "strip", z.ZodTypeAny, {
12
+ count: number;
13
+ app: string;
14
+ }, {
15
+ count: number;
16
+ app: string;
17
+ }>, "many">;
18
+ }, "strip", z.ZodTypeAny, {
19
+ byParsedApp: {
20
+ count: number;
21
+ app: string;
22
+ }[];
23
+ }, {
24
+ byParsedApp: {
25
+ count: number;
26
+ app: string;
27
+ }[];
28
+ }>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ response: {
31
+ byParsedApp: {
32
+ count: number;
33
+ app: string;
34
+ }[];
35
+ };
36
+ }, {
37
+ response: {
38
+ byParsedApp: {
39
+ count: number;
40
+ app: string;
41
+ }[];
42
+ };
43
+ }>;
44
+ type Response = z.infer<typeof ResponseSchema>;
45
+ }
46
+ //# sourceMappingURL=get-subscription-request-history-stats.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-subscription-request-history-stats.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-request-history/get-subscription-request-history-stats.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,yCAAyC,CAAC;IAChD,MAAM,GAAG,2CAA8C,CAAC;IACxD,MAAM,OAAO,2CAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSubscriptionRequestHistoryStatsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var GetSubscriptionRequestHistoryStatsCommand;
8
+ (function (GetSubscriptionRequestHistoryStatsCommand) {
9
+ GetSubscriptionRequestHistoryStatsCommand.url = api_1.REST_API.SUBSCRIPTION_REQUEST_HISTORY.STATS;
10
+ GetSubscriptionRequestHistoryStatsCommand.TSQ_url = GetSubscriptionRequestHistoryStatsCommand.url;
11
+ GetSubscriptionRequestHistoryStatsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_REQUEST_HISTORY_ROUTES.STATS, 'get', 'Get subscription request history stats');
12
+ GetSubscriptionRequestHistoryStatsCommand.ResponseSchema = zod_1.z.object({
13
+ response: zod_1.z.object({
14
+ byParsedApp: zod_1.z.array(zod_1.z.object({
15
+ app: zod_1.z.string(),
16
+ count: zod_1.z.number(),
17
+ })),
18
+ }),
19
+ });
20
+ })(GetSubscriptionRequestHistoryStatsCommand || (exports.GetSubscriptionRequestHistoryStatsCommand = GetSubscriptionRequestHistoryStatsCommand = {}));
@@ -0,0 +1,125 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetSubscriptionRequestHistoryCommand {
3
+ const url: "/api/subscription-request-history/";
4
+ const TSQ_url: "/api/subscription-request-history/";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestQuerySchema: z.ZodObject<{
7
+ start: z.ZodDefault<z.ZodNumber>;
8
+ size: z.ZodDefault<z.ZodNumber>;
9
+ filters: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
10
+ id: z.ZodString;
11
+ value: z.ZodUnknown;
12
+ }, "strip", z.ZodTypeAny, {
13
+ id: string;
14
+ value?: unknown;
15
+ }, {
16
+ id: string;
17
+ value?: unknown;
18
+ }>, "many">, {
19
+ id: string;
20
+ value?: unknown;
21
+ }[], unknown>>;
22
+ filterModes: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, unknown>>;
23
+ globalFilterMode: z.ZodOptional<z.ZodString>;
24
+ sorting: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
25
+ id: z.ZodString;
26
+ desc: z.ZodBoolean;
27
+ }, "strip", z.ZodTypeAny, {
28
+ id: string;
29
+ desc: boolean;
30
+ }, {
31
+ id: string;
32
+ desc: boolean;
33
+ }>, "many">, {
34
+ id: string;
35
+ desc: boolean;
36
+ }[], unknown>>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ start: number;
39
+ size: number;
40
+ filters?: {
41
+ id: string;
42
+ value?: unknown;
43
+ }[] | undefined;
44
+ filterModes?: Record<string, string> | undefined;
45
+ globalFilterMode?: string | undefined;
46
+ sorting?: {
47
+ id: string;
48
+ desc: boolean;
49
+ }[] | undefined;
50
+ }, {
51
+ start?: number | undefined;
52
+ size?: number | undefined;
53
+ filters?: unknown;
54
+ filterModes?: unknown;
55
+ globalFilterMode?: string | undefined;
56
+ sorting?: unknown;
57
+ }>;
58
+ type RequestQuery = z.infer<typeof RequestQuerySchema>;
59
+ const ResponseSchema: z.ZodObject<{
60
+ response: z.ZodObject<{
61
+ records: z.ZodArray<z.ZodObject<{
62
+ id: z.ZodNumber;
63
+ userUuid: z.ZodString;
64
+ requestIp: z.ZodNullable<z.ZodString>;
65
+ userAgent: z.ZodNullable<z.ZodString>;
66
+ requestAt: z.ZodEffects<z.ZodString, Date, string>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ id: number;
69
+ userUuid: string;
70
+ userAgent: string | null;
71
+ requestIp: string | null;
72
+ requestAt: Date;
73
+ }, {
74
+ id: number;
75
+ userUuid: string;
76
+ userAgent: string | null;
77
+ requestIp: string | null;
78
+ requestAt: string;
79
+ }>, "many">;
80
+ total: z.ZodNumber;
81
+ }, "strip", z.ZodTypeAny, {
82
+ total: number;
83
+ records: {
84
+ id: number;
85
+ userUuid: string;
86
+ userAgent: string | null;
87
+ requestIp: string | null;
88
+ requestAt: Date;
89
+ }[];
90
+ }, {
91
+ total: number;
92
+ records: {
93
+ id: number;
94
+ userUuid: string;
95
+ userAgent: string | null;
96
+ requestIp: string | null;
97
+ requestAt: string;
98
+ }[];
99
+ }>;
100
+ }, "strip", z.ZodTypeAny, {
101
+ response: {
102
+ total: number;
103
+ records: {
104
+ id: number;
105
+ userUuid: string;
106
+ userAgent: string | null;
107
+ requestIp: string | null;
108
+ requestAt: Date;
109
+ }[];
110
+ };
111
+ }, {
112
+ response: {
113
+ total: number;
114
+ records: {
115
+ id: number;
116
+ userUuid: string;
117
+ userAgent: string | null;
118
+ requestIp: string | null;
119
+ requestAt: string;
120
+ }[];
121
+ };
122
+ }>;
123
+ type Response = z.infer<typeof ResponseSchema>;
124
+ }
125
+ //# sourceMappingURL=get-subscription-request-history.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-subscription-request-history.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-request-history/get-subscription-request-history.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,sCAA4C,CAAC;IACtD,MAAM,OAAO,sCAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAkC,CAAC;IAElE,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSubscriptionRequestHistoryCommand = 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 GetSubscriptionRequestHistoryCommand;
9
+ (function (GetSubscriptionRequestHistoryCommand) {
10
+ GetSubscriptionRequestHistoryCommand.url = api_1.REST_API.SUBSCRIPTION_REQUEST_HISTORY.GET;
11
+ GetSubscriptionRequestHistoryCommand.TSQ_url = GetSubscriptionRequestHistoryCommand.url;
12
+ GetSubscriptionRequestHistoryCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_REQUEST_HISTORY_ROUTES.GET, 'get', 'Get all subscription request history');
13
+ GetSubscriptionRequestHistoryCommand.RequestQuerySchema = models_1.TanstackQueryRequestQuerySchema;
14
+ GetSubscriptionRequestHistoryCommand.ResponseSchema = zod_1.z.object({
15
+ response: zod_1.z.object({
16
+ records: zod_1.z.array(models_1.SubscriptionRequestHistorySchema),
17
+ total: zod_1.z.number(),
18
+ }),
19
+ });
20
+ })(GetSubscriptionRequestHistoryCommand || (exports.GetSubscriptionRequestHistoryCommand = GetSubscriptionRequestHistoryCommand = {}));
@@ -0,0 +1,3 @@
1
+ export * from './get-subscription-request-history-stats.command';
2
+ export * from './get-subscription-request-history.command';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-request-history/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC"}
@@ -0,0 +1,18 @@
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("./get-subscription-request-history-stats.command"), exports);
18
+ __exportStar(require("./get-subscription-request-history.command"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"get-all-users.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-all-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,eAAqB,CAAC;IAC/B,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAA+D,CAAC;IAYrF,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiC7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-all-users.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-all-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,eAAqB,CAAC;IAC/B,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAA+D,CAAC;IAErF,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAkC,CAAC;IAElE,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -2,44 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetAllUsersCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../../constants");
6
5
  const models_1 = require("../../models");
6
+ const constants_1 = require("../../constants");
7
7
  const api_1 = require("../../api");
8
8
  var GetAllUsersCommand;
9
9
  (function (GetAllUsersCommand) {
10
10
  GetAllUsersCommand.url = api_1.REST_API.USERS.GET;
11
11
  GetAllUsersCommand.TSQ_url = GetAllUsersCommand.url;
12
12
  GetAllUsersCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.GET, 'get', 'Get all users');
13
- const FilterSchema = zod_1.z.object({
14
- id: zod_1.z.string(),
15
- value: zod_1.z.unknown(),
16
- });
17
- const SortingSchema = zod_1.z.object({
18
- id: zod_1.z.string(),
19
- desc: zod_1.z.boolean(),
20
- });
21
- GetAllUsersCommand.RequestQuerySchema = zod_1.z.object({
22
- start: zod_1.z.coerce
23
- .number()
24
- .default(0)
25
- .describe('Start index (offset) of the users to return, default is 0'),
26
- size: zod_1.z.coerce
27
- .number()
28
- .min(1, 'Size (limit) must be greater than 0')
29
- .max(1000, 'Size (limit) must be less than 1000')
30
- .describe('Number of users to return, no more than 1000')
31
- .default(25),
32
- filters: zod_1.z
33
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(FilterSchema))
34
- .optional(),
35
- filterModes: zod_1.z
36
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
37
- .optional(),
38
- globalFilterMode: zod_1.z.string().optional(),
39
- sorting: zod_1.z
40
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(SortingSchema))
41
- .optional(),
42
- });
13
+ GetAllUsersCommand.RequestQuerySchema = models_1.TanstackQueryRequestQuerySchema;
43
14
  GetAllUsersCommand.ResponseSchema = zod_1.z.object({
44
15
  response: zod_1.z.object({
45
16
  users: zod_1.z.array(models_1.ExtendedUsersSchema),
@@ -824,5 +824,10 @@ export declare const ERRORS: {
824
824
  readonly message: "Get hwid devices stats error";
825
825
  readonly httpCode: 500;
826
826
  };
827
+ readonly GET_USER_SUBSCRIPTION_REQUEST_HISTORY_STATS_ERROR: {
828
+ readonly code: "A160";
829
+ readonly message: "Get user subscription request history stats error";
830
+ readonly httpCode: 500;
831
+ };
827
832
  };
828
833
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8e3B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmf3B,CAAC"}
@@ -795,4 +795,9 @@ exports.ERRORS = {
795
795
  message: 'Get hwid devices stats error',
796
796
  httpCode: 500,
797
797
  },
798
+ GET_USER_SUBSCRIPTION_REQUEST_HISTORY_STATS_ERROR: {
799
+ code: 'A160',
800
+ message: 'Get user subscription request history stats error',
801
+ httpCode: 500,
802
+ },
798
803
  };
@@ -16,6 +16,8 @@ export * from './internal-squad.schema';
16
16
  export * from './last-connected-node.schema';
17
17
  export * from './nodes.schema';
18
18
  export * from './subscription-info.schema';
19
+ export * from './subscription-request-history.schema';
19
20
  export * from './subscription-settings.schema';
21
+ export * from './tanstack-query';
20
22
  export * from './users.schema';
21
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
@@ -32,5 +32,7 @@ __exportStar(require("./internal-squad.schema"), exports);
32
32
  __exportStar(require("./last-connected-node.schema"), exports);
33
33
  __exportStar(require("./nodes.schema"), exports);
34
34
  __exportStar(require("./subscription-info.schema"), exports);
35
+ __exportStar(require("./subscription-request-history.schema"), exports);
35
36
  __exportStar(require("./subscription-settings.schema"), exports);
37
+ __exportStar(require("./tanstack-query"), exports);
36
38
  __exportStar(require("./users.schema"), exports);
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const SubscriptionRequestHistorySchema: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ userUuid: z.ZodString;
5
+ requestIp: z.ZodNullable<z.ZodString>;
6
+ userAgent: z.ZodNullable<z.ZodString>;
7
+ requestAt: z.ZodEffects<z.ZodString, Date, string>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ id: number;
10
+ userUuid: string;
11
+ userAgent: string | null;
12
+ requestIp: string | null;
13
+ requestAt: Date;
14
+ }, {
15
+ id: number;
16
+ userUuid: string;
17
+ userAgent: string | null;
18
+ requestIp: string | null;
19
+ requestAt: string;
20
+ }>;
21
+ //# sourceMappingURL=subscription-request-history.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-request-history.schema.d.ts","sourceRoot":"","sources":["../../../models/subscription-request-history.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;EAS3C,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionRequestHistorySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SubscriptionRequestHistorySchema = zod_1.z.object({
6
+ id: zod_1.z.number(),
7
+ userUuid: zod_1.z.string().uuid(),
8
+ requestIp: zod_1.z.nullable(zod_1.z.string()),
9
+ userAgent: zod_1.z.nullable(zod_1.z.string()),
10
+ requestAt: zod_1.z
11
+ .string()
12
+ .datetime()
13
+ .transform((str) => new Date(str)),
14
+ });
@@ -0,0 +1,4 @@
1
+ export * from './tanstask-query-filter.schema';
2
+ export * from './tanstask-query-request-query.schema';
3
+ export * from './tanstask-query-sorting.schema';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../models/tanstack-query/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,19 @@
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("./tanstask-query-filter.schema"), exports);
18
+ __exportStar(require("./tanstask-query-request-query.schema"), exports);
19
+ __exportStar(require("./tanstask-query-sorting.schema"), exports);
@@ -0,0 +1,12 @@
1
+ import z from 'zod';
2
+ export declare const TanstackQueryFilterSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ value: z.ZodUnknown;
5
+ }, "strip", z.ZodTypeAny, {
6
+ id: string;
7
+ value?: unknown;
8
+ }, {
9
+ id: string;
10
+ value?: unknown;
11
+ }>;
12
+ //# sourceMappingURL=tanstask-query-filter.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstask-query-filter.schema.d.ts","sourceRoot":"","sources":["../../../../models/tanstack-query/tanstask-query-filter.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TanstackQueryFilterSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.TanstackQueryFilterSchema = zod_1.default.object({
9
+ id: zod_1.default.string(),
10
+ value: zod_1.default.unknown(),
11
+ });
@@ -0,0 +1,54 @@
1
+ import { z } from 'zod';
2
+ export declare const TanstackQueryRequestQuerySchema: z.ZodObject<{
3
+ start: z.ZodDefault<z.ZodNumber>;
4
+ size: z.ZodDefault<z.ZodNumber>;
5
+ filters: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
6
+ id: z.ZodString;
7
+ value: z.ZodUnknown;
8
+ }, "strip", z.ZodTypeAny, {
9
+ id: string;
10
+ value?: unknown;
11
+ }, {
12
+ id: string;
13
+ value?: unknown;
14
+ }>, "many">, {
15
+ id: string;
16
+ value?: unknown;
17
+ }[], unknown>>;
18
+ filterModes: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, unknown>>;
19
+ globalFilterMode: z.ZodOptional<z.ZodString>;
20
+ sorting: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
21
+ id: z.ZodString;
22
+ desc: z.ZodBoolean;
23
+ }, "strip", z.ZodTypeAny, {
24
+ id: string;
25
+ desc: boolean;
26
+ }, {
27
+ id: string;
28
+ desc: boolean;
29
+ }>, "many">, {
30
+ id: string;
31
+ desc: boolean;
32
+ }[], unknown>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ start: number;
35
+ size: number;
36
+ filters?: {
37
+ id: string;
38
+ value?: unknown;
39
+ }[] | undefined;
40
+ filterModes?: Record<string, string> | undefined;
41
+ globalFilterMode?: string | undefined;
42
+ sorting?: {
43
+ id: string;
44
+ desc: boolean;
45
+ }[] | undefined;
46
+ }, {
47
+ start?: number | undefined;
48
+ size?: number | undefined;
49
+ filters?: unknown;
50
+ filterModes?: unknown;
51
+ globalFilterMode?: string | undefined;
52
+ sorting?: unknown;
53
+ }>;
54
+ //# sourceMappingURL=tanstask-query-request-query.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstask-query-request-query.schema.d.ts","sourceRoot":"","sources":["../../../../models/tanstack-query/tanstask-query-request-query.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiC1C,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TanstackQueryRequestQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const tanstask_query_sorting_schema_1 = require("./tanstask-query-sorting.schema");
6
+ const tanstask_query_filter_schema_1 = require("./tanstask-query-filter.schema");
7
+ exports.TanstackQueryRequestQuerySchema = zod_1.z.object({
8
+ start: zod_1.z.coerce
9
+ .number()
10
+ .default(0)
11
+ .describe('Start index (offset) of the results to return, default is 0'),
12
+ size: zod_1.z.coerce
13
+ .number()
14
+ .min(1, 'Size (limit) must be greater than 0')
15
+ .max(1000, 'Size (limit) must be less than 1000')
16
+ .describe('Number of results to return, no more than 1000')
17
+ .default(25),
18
+ filters: zod_1.z
19
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(tanstask_query_filter_schema_1.TanstackQueryFilterSchema))
20
+ .optional(),
21
+ filterModes: zod_1.z
22
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
23
+ .optional(),
24
+ globalFilterMode: zod_1.z.string().optional(),
25
+ sorting: zod_1.z
26
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(tanstask_query_sorting_schema_1.TanstackQuerySortingSchema))
27
+ .optional(),
28
+ });
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const TanstackQuerySortingSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ desc: z.ZodBoolean;
5
+ }, "strip", z.ZodTypeAny, {
6
+ id: string;
7
+ desc: boolean;
8
+ }, {
9
+ id: string;
10
+ desc: boolean;
11
+ }>;
12
+ //# sourceMappingURL=tanstask-query-sorting.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstask-query-sorting.schema.d.ts","sourceRoot":"","sources":["../../../../models/tanstack-query/tanstask-query-sorting.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TanstackQuerySortingSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TanstackQuerySortingSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ desc: zod_1.z.boolean(),
8
+ });
@@ -24,6 +24,7 @@ __exportStar(require("./internal-squads"), exports);
24
24
  __exportStar(require("./keygen"), exports);
25
25
  __exportStar(require("./nodes"), exports);
26
26
  __exportStar(require("./subscription"), exports);
27
+ __exportStar(require("./subscription-request-history"), exports);
27
28
  __exportStar(require("./subscription-settings"), exports);
28
29
  __exportStar(require("./subscription-template"), exports);
29
30
  __exportStar(require("./subscriptions"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUBSCRIPTION_REQUEST_HISTORY_ROUTES = exports.SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER = void 0;
4
+ exports.SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER = 'subscription-request-history';
5
+ exports.SUBSCRIPTION_REQUEST_HISTORY_ROUTES = {
6
+ GET: '',
7
+ STATS: 'stats',
8
+ };
@@ -78,4 +78,8 @@ exports.CONTROLLERS_INFO = {
78
78
  tag: 'Keygen Controller',
79
79
  description: 'Generation of SSL_CERT for Remnawave Node.',
80
80
  },
81
+ SUBSCRIPTION_REQUEST_HISTORY: {
82
+ tag: 'Subscription Request History Controller',
83
+ description: '',
84
+ },
81
85
  };
@@ -215,4 +215,8 @@ exports.REST_API = {
215
215
  CREATE_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY}`,
216
216
  DELETE_BILLING_HISTORY: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_HISTORY(uuid)}`,
217
217
  },
218
+ SUBSCRIPTION_REQUEST_HISTORY: {
219
+ GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_REQUEST_HISTORY_ROUTES.GET}`,
220
+ STATS: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_REQUEST_HISTORY_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_REQUEST_HISTORY_ROUTES.STATS}`,
221
+ },
218
222
  };
@@ -2,44 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetAllHwidDevicesCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../../constants");
6
5
  const models_1 = require("../../models");
6
+ const constants_1 = require("../../constants");
7
7
  const api_1 = require("../../api");
8
8
  var GetAllHwidDevicesCommand;
9
9
  (function (GetAllHwidDevicesCommand) {
10
10
  GetAllHwidDevicesCommand.url = api_1.REST_API.HWID.GET_ALL_HWID_DEVICES;
11
11
  GetAllHwidDevicesCommand.TSQ_url = GetAllHwidDevicesCommand.url;
12
12
  GetAllHwidDevicesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.GET_ALL_HWID_DEVICES, 'get', 'Get all HWID devices');
13
- const FilterSchema = zod_1.z.object({
14
- id: zod_1.z.string(),
15
- value: zod_1.z.unknown(),
16
- });
17
- const SortingSchema = zod_1.z.object({
18
- id: zod_1.z.string(),
19
- desc: zod_1.z.boolean(),
20
- });
21
- GetAllHwidDevicesCommand.RequestQuerySchema = zod_1.z.object({
22
- start: zod_1.z.coerce
23
- .number()
24
- .default(0)
25
- .describe('Start index (offset) of the results to return, default is 0'),
26
- size: zod_1.z.coerce
27
- .number()
28
- .min(1, 'Size (limit) must be greater than 0')
29
- .max(1000, 'Size (limit) must be less than 1000')
30
- .describe('Number of results to return, no more than 1000')
31
- .default(25),
32
- filters: zod_1.z
33
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(FilterSchema))
34
- .optional(),
35
- filterModes: zod_1.z
36
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
37
- .optional(),
38
- globalFilterMode: zod_1.z.string().optional(),
39
- sorting: zod_1.z
40
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(SortingSchema))
41
- .optional(),
42
- });
13
+ GetAllHwidDevicesCommand.RequestQuerySchema = models_1.TanstackQueryRequestQuerySchema;
43
14
  GetAllHwidDevicesCommand.ResponseSchema = zod_1.z.object({
44
15
  response: zod_1.z.object({
45
16
  devices: zod_1.z.array(models_1.HwidUserDeviceSchema),
@@ -24,6 +24,7 @@ __exportStar(require("./internal-squads"), exports);
24
24
  __exportStar(require("./keygen"), exports);
25
25
  __exportStar(require("./nodes"), exports);
26
26
  __exportStar(require("./subscription"), exports);
27
+ __exportStar(require("./subscription-request-history"), exports);
27
28
  __exportStar(require("./subscription-settings"), exports);
28
29
  __exportStar(require("./subscription-template"), exports);
29
30
  __exportStar(require("./subscriptions"), exports);
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSubscriptionRequestHistoryStatsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var GetSubscriptionRequestHistoryStatsCommand;
8
+ (function (GetSubscriptionRequestHistoryStatsCommand) {
9
+ GetSubscriptionRequestHistoryStatsCommand.url = api_1.REST_API.SUBSCRIPTION_REQUEST_HISTORY.STATS;
10
+ GetSubscriptionRequestHistoryStatsCommand.TSQ_url = GetSubscriptionRequestHistoryStatsCommand.url;
11
+ GetSubscriptionRequestHistoryStatsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_REQUEST_HISTORY_ROUTES.STATS, 'get', 'Get subscription request history stats');
12
+ GetSubscriptionRequestHistoryStatsCommand.ResponseSchema = zod_1.z.object({
13
+ response: zod_1.z.object({
14
+ byParsedApp: zod_1.z.array(zod_1.z.object({
15
+ app: zod_1.z.string(),
16
+ count: zod_1.z.number(),
17
+ })),
18
+ }),
19
+ });
20
+ })(GetSubscriptionRequestHistoryStatsCommand || (exports.GetSubscriptionRequestHistoryStatsCommand = GetSubscriptionRequestHistoryStatsCommand = {}));
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSubscriptionRequestHistoryCommand = 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 GetSubscriptionRequestHistoryCommand;
9
+ (function (GetSubscriptionRequestHistoryCommand) {
10
+ GetSubscriptionRequestHistoryCommand.url = api_1.REST_API.SUBSCRIPTION_REQUEST_HISTORY.GET;
11
+ GetSubscriptionRequestHistoryCommand.TSQ_url = GetSubscriptionRequestHistoryCommand.url;
12
+ GetSubscriptionRequestHistoryCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_REQUEST_HISTORY_ROUTES.GET, 'get', 'Get all subscription request history');
13
+ GetSubscriptionRequestHistoryCommand.RequestQuerySchema = models_1.TanstackQueryRequestQuerySchema;
14
+ GetSubscriptionRequestHistoryCommand.ResponseSchema = zod_1.z.object({
15
+ response: zod_1.z.object({
16
+ records: zod_1.z.array(models_1.SubscriptionRequestHistorySchema),
17
+ total: zod_1.z.number(),
18
+ }),
19
+ });
20
+ })(GetSubscriptionRequestHistoryCommand || (exports.GetSubscriptionRequestHistoryCommand = GetSubscriptionRequestHistoryCommand = {}));
@@ -0,0 +1,18 @@
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("./get-subscription-request-history-stats.command"), exports);
18
+ __exportStar(require("./get-subscription-request-history.command"), exports);
@@ -2,44 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetAllUsersCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../../constants");
6
5
  const models_1 = require("../../models");
6
+ const constants_1 = require("../../constants");
7
7
  const api_1 = require("../../api");
8
8
  var GetAllUsersCommand;
9
9
  (function (GetAllUsersCommand) {
10
10
  GetAllUsersCommand.url = api_1.REST_API.USERS.GET;
11
11
  GetAllUsersCommand.TSQ_url = GetAllUsersCommand.url;
12
12
  GetAllUsersCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.GET, 'get', 'Get all users');
13
- const FilterSchema = zod_1.z.object({
14
- id: zod_1.z.string(),
15
- value: zod_1.z.unknown(),
16
- });
17
- const SortingSchema = zod_1.z.object({
18
- id: zod_1.z.string(),
19
- desc: zod_1.z.boolean(),
20
- });
21
- GetAllUsersCommand.RequestQuerySchema = zod_1.z.object({
22
- start: zod_1.z.coerce
23
- .number()
24
- .default(0)
25
- .describe('Start index (offset) of the users to return, default is 0'),
26
- size: zod_1.z.coerce
27
- .number()
28
- .min(1, 'Size (limit) must be greater than 0')
29
- .max(1000, 'Size (limit) must be less than 1000')
30
- .describe('Number of users to return, no more than 1000')
31
- .default(25),
32
- filters: zod_1.z
33
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(FilterSchema))
34
- .optional(),
35
- filterModes: zod_1.z
36
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
37
- .optional(),
38
- globalFilterMode: zod_1.z.string().optional(),
39
- sorting: zod_1.z
40
- .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(SortingSchema))
41
- .optional(),
42
- });
13
+ GetAllUsersCommand.RequestQuerySchema = models_1.TanstackQueryRequestQuerySchema;
43
14
  GetAllUsersCommand.ResponseSchema = zod_1.z.object({
44
15
  response: zod_1.z.object({
45
16
  users: zod_1.z.array(models_1.ExtendedUsersSchema),
@@ -795,4 +795,9 @@ exports.ERRORS = {
795
795
  message: 'Get hwid devices stats error',
796
796
  httpCode: 500,
797
797
  },
798
+ GET_USER_SUBSCRIPTION_REQUEST_HISTORY_STATS_ERROR: {
799
+ code: 'A160',
800
+ message: 'Get user subscription request history stats error',
801
+ httpCode: 500,
802
+ },
798
803
  };
@@ -32,5 +32,7 @@ __exportStar(require("./internal-squad.schema"), exports);
32
32
  __exportStar(require("./last-connected-node.schema"), exports);
33
33
  __exportStar(require("./nodes.schema"), exports);
34
34
  __exportStar(require("./subscription-info.schema"), exports);
35
+ __exportStar(require("./subscription-request-history.schema"), exports);
35
36
  __exportStar(require("./subscription-settings.schema"), exports);
37
+ __exportStar(require("./tanstack-query"), exports);
36
38
  __exportStar(require("./users.schema"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionRequestHistorySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SubscriptionRequestHistorySchema = zod_1.z.object({
6
+ id: zod_1.z.number(),
7
+ userUuid: zod_1.z.string().uuid(),
8
+ requestIp: zod_1.z.nullable(zod_1.z.string()),
9
+ userAgent: zod_1.z.nullable(zod_1.z.string()),
10
+ requestAt: zod_1.z
11
+ .string()
12
+ .datetime()
13
+ .transform((str) => new Date(str)),
14
+ });
@@ -0,0 +1,19 @@
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("./tanstask-query-filter.schema"), exports);
18
+ __exportStar(require("./tanstask-query-request-query.schema"), exports);
19
+ __exportStar(require("./tanstask-query-sorting.schema"), exports);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TanstackQueryFilterSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.TanstackQueryFilterSchema = zod_1.default.object({
9
+ id: zod_1.default.string(),
10
+ value: zod_1.default.unknown(),
11
+ });
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TanstackQueryRequestQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const tanstask_query_sorting_schema_1 = require("./tanstask-query-sorting.schema");
6
+ const tanstask_query_filter_schema_1 = require("./tanstask-query-filter.schema");
7
+ exports.TanstackQueryRequestQuerySchema = zod_1.z.object({
8
+ start: zod_1.z.coerce
9
+ .number()
10
+ .default(0)
11
+ .describe('Start index (offset) of the results to return, default is 0'),
12
+ size: zod_1.z.coerce
13
+ .number()
14
+ .min(1, 'Size (limit) must be greater than 0')
15
+ .max(1000, 'Size (limit) must be less than 1000')
16
+ .describe('Number of results to return, no more than 1000')
17
+ .default(25),
18
+ filters: zod_1.z
19
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(tanstask_query_filter_schema_1.TanstackQueryFilterSchema))
20
+ .optional(),
21
+ filterModes: zod_1.z
22
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
23
+ .optional(),
24
+ globalFilterMode: zod_1.z.string().optional(),
25
+ sorting: zod_1.z
26
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(tanstask_query_sorting_schema_1.TanstackQuerySortingSchema))
27
+ .optional(),
28
+ });
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TanstackQuerySortingSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TanstackQuerySortingSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ desc: zod_1.z.boolean(),
8
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.50",
3
+ "version": "2.1.51",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",