@purpleschool/multisite 0.0.19 → 0.0.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 (85) hide show
  1. package/api/controller/http/payment.ts +1 -0
  2. package/api/controller/http/product.ts +2 -0
  3. package/api/controller/http/subscription.ts +4 -2
  4. package/api/routes.ts +11 -2
  5. package/build/api/controller/http/payment.d.ts +1 -0
  6. package/build/api/controller/http/payment.d.ts.map +1 -1
  7. package/build/api/controller/http/payment.js +1 -0
  8. package/build/api/controller/http/product.d.ts +2 -0
  9. package/build/api/controller/http/product.d.ts.map +1 -1
  10. package/build/api/controller/http/product.js +2 -0
  11. package/build/api/controller/http/subscription.d.ts +4 -2
  12. package/build/api/controller/http/subscription.d.ts.map +1 -1
  13. package/build/api/controller/http/subscription.js +4 -2
  14. package/build/api/routes.d.ts +5 -0
  15. package/build/api/routes.d.ts.map +1 -1
  16. package/build/api/routes.js +7 -2
  17. package/build/commands/payment/index.d.ts +1 -0
  18. package/build/commands/payment/index.d.ts.map +1 -1
  19. package/build/commands/payment/index.js +1 -0
  20. package/build/commands/payment/refund-payment.command.d.ts +20 -0
  21. package/build/commands/payment/refund-payment.command.d.ts.map +1 -0
  22. package/build/commands/payment/refund-payment.command.js +13 -0
  23. package/build/commands/product/delete-product.command.d.ts +20 -0
  24. package/build/commands/product/delete-product.command.d.ts.map +1 -0
  25. package/build/commands/product/delete-product.command.js +13 -0
  26. package/build/commands/product/index.d.ts +2 -0
  27. package/build/commands/product/index.d.ts.map +1 -1
  28. package/build/commands/product/index.js +2 -0
  29. package/build/commands/product/update-product.command.d.ts +116 -0
  30. package/build/commands/product/update-product.command.d.ts.map +1 -0
  31. package/build/commands/product/update-product.command.js +26 -0
  32. package/build/commands/subscription/delete-subscription.command.d.ts +20 -0
  33. package/build/commands/subscription/delete-subscription.command.d.ts.map +1 -0
  34. package/build/commands/subscription/delete-subscription.command.js +13 -0
  35. package/build/commands/subscription/index.d.ts +2 -0
  36. package/build/commands/subscription/index.d.ts.map +1 -1
  37. package/build/commands/subscription/index.js +2 -0
  38. package/build/commands/subscription/update-subscription.command.d.ts +148 -0
  39. package/build/commands/subscription/update-subscription.command.d.ts.map +1 -0
  40. package/build/commands/subscription/update-subscription.command.js +30 -0
  41. package/build/constants/cloud-payments/index.d.ts +1 -0
  42. package/build/constants/cloud-payments/index.d.ts.map +1 -1
  43. package/build/constants/cloud-payments/index.js +2 -1
  44. package/build/constants/errors/errors.d.ts +10 -0
  45. package/build/constants/errors/errors.d.ts.map +1 -1
  46. package/build/constants/errors/errors.js +10 -0
  47. package/build/constants/payment/enums/payment-status.enum.d.ts +2 -1
  48. package/build/constants/payment/enums/payment-status.enum.d.ts.map +1 -1
  49. package/build/constants/payment/enums/payment-status.enum.js +1 -0
  50. package/build/queries/user/find-users.command.d.ts +16 -0
  51. package/build/queries/user/find-users.command.d.ts.map +1 -1
  52. package/build/queries/user/find-users.command.js +2 -0
  53. package/build/queries/user/get-all-users.command.d.ts +11 -1
  54. package/build/queries/user/get-all-users.command.d.ts.map +1 -1
  55. package/build/queries/user/get-all-users.command.js +2 -0
  56. package/build/queries/user/get-my-subscriptions.command.d.ts +5 -0
  57. package/build/queries/user/get-my-subscriptions.command.d.ts.map +1 -1
  58. package/build/queries/user/get-my-subscriptions.command.js +1 -0
  59. package/build/queries/user/get-user-payments.command.d.ts +134 -0
  60. package/build/queries/user/get-user-payments.command.d.ts.map +1 -0
  61. package/build/queries/user/get-user-payments.command.js +27 -0
  62. package/build/queries/user/get-user.command.d.ts +11 -1
  63. package/build/queries/user/get-user.command.d.ts.map +1 -1
  64. package/build/queries/user/get-user.command.js +2 -0
  65. package/build/queries/user/index.d.ts +1 -0
  66. package/build/queries/user/index.d.ts.map +1 -1
  67. package/build/queries/user/index.js +1 -0
  68. package/commands/payment/index.ts +1 -0
  69. package/commands/payment/refund-payment.command.ts +13 -0
  70. package/commands/product/delete-product.command.ts +13 -0
  71. package/commands/product/index.ts +2 -0
  72. package/commands/product/update-product.command.ts +30 -0
  73. package/commands/subscription/delete-subscription.command.ts +13 -0
  74. package/commands/subscription/index.ts +2 -0
  75. package/commands/subscription/update-subscription.command.ts +34 -0
  76. package/constants/cloud-payments/index.ts +1 -0
  77. package/constants/errors/errors.ts +10 -0
  78. package/constants/payment/enums/payment-status.enum.ts +1 -0
  79. package/package.json +1 -1
  80. package/queries/user/find-users.command.ts +2 -0
  81. package/queries/user/get-all-users.command.ts +3 -1
  82. package/queries/user/get-my-subscriptions.command.ts +1 -0
  83. package/queries/user/get-user-payments.command.ts +26 -0
  84. package/queries/user/get-user.command.ts +3 -1
  85. package/queries/user/index.ts +1 -0
@@ -0,0 +1,148 @@
1
+ import { z } from 'zod';
2
+ export declare namespace UpdateSubscriptionCommand {
3
+ const RequestParamSchema: z.ZodObject<{
4
+ uuid: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ uuid: string;
7
+ }, {
8
+ uuid: string;
9
+ }>;
10
+ type RequestParam = z.infer<typeof RequestParamSchema>;
11
+ const RequestSchema: z.ZodObject<{
12
+ name: z.ZodOptional<z.ZodString>;
13
+ description: z.ZodOptional<z.ZodString>;
14
+ price: z.ZodOptional<z.ZodNumber>;
15
+ interval: z.ZodOptional<z.ZodString>;
16
+ period: z.ZodOptional<z.ZodNumber>;
17
+ tokens: z.ZodOptional<z.ZodNumber>;
18
+ discount: z.ZodOptional<z.ZodNumber>;
19
+ features: z.ZodOptional<z.ZodArray<z.ZodObject<{
20
+ type: z.ZodString;
21
+ name: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: string;
24
+ name: string;
25
+ }, {
26
+ type: string;
27
+ name: string;
28
+ }>, "many">>;
29
+ carryoverPercent: z.ZodOptional<z.ZodNumber>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ price?: number | undefined;
32
+ interval?: string | undefined;
33
+ name?: string | undefined;
34
+ description?: string | undefined;
35
+ tokens?: number | undefined;
36
+ features?: {
37
+ type: string;
38
+ name: string;
39
+ }[] | undefined;
40
+ period?: number | undefined;
41
+ discount?: number | undefined;
42
+ carryoverPercent?: number | undefined;
43
+ }, {
44
+ price?: number | undefined;
45
+ interval?: string | undefined;
46
+ name?: string | undefined;
47
+ description?: string | undefined;
48
+ tokens?: number | undefined;
49
+ features?: {
50
+ type: string;
51
+ name: string;
52
+ }[] | undefined;
53
+ period?: number | undefined;
54
+ discount?: number | undefined;
55
+ carryoverPercent?: number | undefined;
56
+ }>;
57
+ type Request = z.infer<typeof RequestSchema>;
58
+ const ResponseSchema: z.ZodObject<{
59
+ data: z.ZodObject<{
60
+ uuid: z.ZodString;
61
+ siteId: z.ZodString;
62
+ name: z.ZodString;
63
+ description: z.ZodString;
64
+ price: z.ZodNumber;
65
+ interval: z.ZodString;
66
+ period: z.ZodNumber;
67
+ tokens: z.ZodNumber;
68
+ discount: z.ZodNumber;
69
+ features: z.ZodArray<z.ZodObject<{
70
+ type: z.ZodString;
71
+ name: z.ZodString;
72
+ }, "strip", z.ZodTypeAny, {
73
+ type: string;
74
+ name: string;
75
+ }, {
76
+ type: string;
77
+ name: string;
78
+ }>, "many">;
79
+ carryoverPercent: z.ZodNumber;
80
+ }, "strip", z.ZodTypeAny, {
81
+ price: number;
82
+ interval: string;
83
+ uuid: string;
84
+ siteId: string;
85
+ name: string;
86
+ description: string;
87
+ tokens: number;
88
+ features: {
89
+ type: string;
90
+ name: string;
91
+ }[];
92
+ period: number;
93
+ discount: number;
94
+ carryoverPercent: number;
95
+ }, {
96
+ price: number;
97
+ interval: string;
98
+ uuid: string;
99
+ siteId: string;
100
+ name: string;
101
+ description: string;
102
+ tokens: number;
103
+ features: {
104
+ type: string;
105
+ name: string;
106
+ }[];
107
+ period: number;
108
+ discount: number;
109
+ carryoverPercent: number;
110
+ }>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ data: {
113
+ price: number;
114
+ interval: string;
115
+ uuid: string;
116
+ siteId: string;
117
+ name: string;
118
+ description: string;
119
+ tokens: number;
120
+ features: {
121
+ type: string;
122
+ name: string;
123
+ }[];
124
+ period: number;
125
+ discount: number;
126
+ carryoverPercent: number;
127
+ };
128
+ }, {
129
+ data: {
130
+ price: number;
131
+ interval: string;
132
+ uuid: string;
133
+ siteId: string;
134
+ name: string;
135
+ description: string;
136
+ tokens: number;
137
+ features: {
138
+ type: string;
139
+ name: string;
140
+ }[];
141
+ period: number;
142
+ discount: number;
143
+ carryoverPercent: number;
144
+ };
145
+ }>;
146
+ type Response = z.infer<typeof ResponseSchema>;
147
+ }
148
+ //# sourceMappingURL=update-subscription.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/update-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,kBAAkB;;;;;;MAE7B,CAAC;IACH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiBxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateSubscriptionCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var UpdateSubscriptionCommand;
7
+ (function (UpdateSubscriptionCommand) {
8
+ UpdateSubscriptionCommand.RequestParamSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ UpdateSubscriptionCommand.RequestSchema = zod_1.z.object({
12
+ name: zod_1.z.string().min(1).max(200).optional(),
13
+ description: zod_1.z.string().min(1).max(2000).optional(),
14
+ price: zod_1.z.number().int().min(0).optional(),
15
+ interval: zod_1.z.string().max(20).optional(),
16
+ period: zod_1.z.number().int().min(1).max(36).optional(),
17
+ tokens: zod_1.z.number().int().min(0).optional(),
18
+ discount: zod_1.z.number().int().min(0).optional(),
19
+ features: zod_1.z
20
+ .array(zod_1.z.object({
21
+ type: zod_1.z.string(),
22
+ name: zod_1.z.string(),
23
+ }))
24
+ .optional(),
25
+ carryoverPercent: zod_1.z.number().int().min(0).max(100).optional(),
26
+ });
27
+ UpdateSubscriptionCommand.ResponseSchema = zod_1.z.object({
28
+ data: models_1.SubscriptionSchema,
29
+ });
30
+ })(UpdateSubscriptionCommand || (exports.UpdateSubscriptionCommand = UpdateSubscriptionCommand = {}));
@@ -1,2 +1,3 @@
1
1
  export declare const CLOUD_PAYMENTS_CANCEL = "https://api.cloudpayments.ru/subscriptions/cancel";
2
+ export declare const CLOUD_PAYMENTS_REFUND = "https://api.cloudpayments.ru/payments/refund";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/cloud-payments/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,sDAAsD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/cloud-payments/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,sDAAsD,CAAC;AACzF,eAAO,MAAM,qBAAqB,iDAAiD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CLOUD_PAYMENTS_CANCEL = void 0;
3
+ exports.CLOUD_PAYMENTS_REFUND = exports.CLOUD_PAYMENTS_CANCEL = void 0;
4
4
  exports.CLOUD_PAYMENTS_CANCEL = 'https://api.cloudpayments.ru/subscriptions/cancel';
5
+ exports.CLOUD_PAYMENTS_REFUND = 'https://api.cloudpayments.ru/payments/refund';
@@ -209,6 +209,11 @@ export declare const ERRORS: {
209
209
  readonly code: "SUBSCRIPTION_007";
210
210
  readonly httpCode: 500;
211
211
  };
212
+ readonly SUBSCRIPTION_REFUND_ERROR: {
213
+ readonly message: "Ошибка при возврате подписки";
214
+ readonly code: "SUBSCRIPTION_008";
215
+ readonly httpCode: 500;
216
+ };
212
217
  readonly ORDER_NOT_FOUND: {
213
218
  readonly message: "Заказ не найден";
214
219
  readonly code: "ORDER_001";
@@ -239,6 +244,11 @@ export declare const ERRORS: {
239
244
  readonly code: "PAYMENT_002";
240
245
  readonly httpCode: 500;
241
246
  };
247
+ readonly PAYMENT_REFUND_ERROR: {
248
+ readonly message: "Ошибка при возврате платежа";
249
+ readonly code: "PAYMENT_003";
250
+ readonly httpCode: 500;
251
+ };
242
252
  readonly TRANSACTION_WRITE_OFF_ERROR: {
243
253
  readonly message: "Ошибка при списании токенов";
244
254
  readonly code: "TRANSACTION_001";
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2xBT,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqyBT,CAAC"}
@@ -218,6 +218,11 @@ exports.ERRORS = {
218
218
  code: 'SUBSCRIPTION_007',
219
219
  httpCode: 500,
220
220
  },
221
+ SUBSCRIPTION_REFUND_ERROR: {
222
+ message: 'Ошибка при возврате подписки',
223
+ code: 'SUBSCRIPTION_008',
224
+ httpCode: 500,
225
+ },
221
226
  // ORDER
222
227
  ORDER_NOT_FOUND: {
223
228
  message: 'Заказ не найден',
@@ -250,6 +255,11 @@ exports.ERRORS = {
250
255
  code: 'PAYMENT_002',
251
256
  httpCode: 500,
252
257
  },
258
+ PAYMENT_REFUND_ERROR: {
259
+ message: 'Ошибка при возврате платежа',
260
+ code: 'PAYMENT_003',
261
+ httpCode: 500,
262
+ },
253
263
  // TRANSACTION
254
264
  TRANSACTION_WRITE_OFF_ERROR: {
255
265
  message: 'Ошибка при списании токенов',
@@ -1,4 +1,5 @@
1
1
  export declare enum PAYMENT_STATUS {
2
- SUCCESS = "success"
2
+ SUCCESS = "success",
3
+ REFUNDED = "refunded"
3
4
  }
4
5
  //# sourceMappingURL=payment-status.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment-status.enum.d.ts","sourceRoot":"","sources":["../../../../constants/payment/enums/payment-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACtB,OAAO,YAAY;CACtB"}
1
+ {"version":3,"file":"payment-status.enum.d.ts","sourceRoot":"","sources":["../../../../constants/payment/enums/payment-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACtB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACxB"}
@@ -4,4 +4,5 @@ exports.PAYMENT_STATUS = void 0;
4
4
  var PAYMENT_STATUS;
5
5
  (function (PAYMENT_STATUS) {
6
6
  PAYMENT_STATUS["SUCCESS"] = "success";
7
+ PAYMENT_STATUS["REFUNDED"] = "refunded";
7
8
  })(PAYMENT_STATUS || (exports.PAYMENT_STATUS = PAYMENT_STATUS = {}));
@@ -28,34 +28,46 @@ export declare namespace FindUsersCommand {
28
28
  uuid: z.ZodString;
29
29
  email: z.ZodString;
30
30
  role: z.ZodNativeEnum<typeof USER_ROLE>;
31
+ status: z.ZodNativeEnum<typeof USER_STATUS>;
31
32
  siteId: z.ZodString;
33
+ tokenBonusBalance: z.ZodNumber;
32
34
  }, "strip", z.ZodTypeAny, {
33
35
  email: string;
34
36
  uuid: string;
35
37
  siteId: string;
36
38
  role: USER_ROLE;
39
+ status: USER_STATUS;
40
+ tokenBonusBalance: number;
37
41
  }, {
38
42
  email: string;
39
43
  uuid: string;
40
44
  siteId: string;
41
45
  role: USER_ROLE;
46
+ status: USER_STATUS;
47
+ tokenBonusBalance: number;
42
48
  }>;
43
49
  const ResponseSchema: z.ZodObject<{
44
50
  data: z.ZodArray<z.ZodObject<{
45
51
  uuid: z.ZodString;
46
52
  email: z.ZodString;
47
53
  role: z.ZodNativeEnum<typeof USER_ROLE>;
54
+ status: z.ZodNativeEnum<typeof USER_STATUS>;
48
55
  siteId: z.ZodString;
56
+ tokenBonusBalance: z.ZodNumber;
49
57
  }, "strip", z.ZodTypeAny, {
50
58
  email: string;
51
59
  uuid: string;
52
60
  siteId: string;
53
61
  role: USER_ROLE;
62
+ status: USER_STATUS;
63
+ tokenBonusBalance: number;
54
64
  }, {
55
65
  email: string;
56
66
  uuid: string;
57
67
  siteId: string;
58
68
  role: USER_ROLE;
69
+ status: USER_STATUS;
70
+ tokenBonusBalance: number;
59
71
  }>, "many">;
60
72
  totalPages: z.ZodNumber;
61
73
  page: z.ZodNumber;
@@ -66,6 +78,8 @@ export declare namespace FindUsersCommand {
66
78
  uuid: string;
67
79
  siteId: string;
68
80
  role: USER_ROLE;
81
+ status: USER_STATUS;
82
+ tokenBonusBalance: number;
69
83
  }[];
70
84
  totalPages: number;
71
85
  }, {
@@ -75,6 +89,8 @@ export declare namespace FindUsersCommand {
75
89
  uuid: string;
76
90
  siteId: string;
77
91
  role: USER_ROLE;
92
+ status: USER_STATUS;
93
+ tokenBonusBalance: number;
78
94
  }[];
79
95
  totalPages: number;
80
96
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"find-users.command.d.ts","sourceRoot":"","sources":["../../../queries/user/find-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzD,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;MAO7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,kBAAkB;;;;;;;;;;;;;;;MAK7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"find-users.command.d.ts","sourceRoot":"","sources":["../../../queries/user/find-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzD,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;MAO7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;MAO7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -17,7 +17,9 @@ var FindUsersCommand;
17
17
  uuid: zod_1.z.string().uuid(),
18
18
  email: zod_1.z.string().email(),
19
19
  role: zod_1.z.nativeEnum(constants_1.USER_ROLE),
20
+ status: zod_1.z.nativeEnum(constants_1.USER_STATUS),
20
21
  siteId: zod_1.z.string().uuid(),
22
+ tokenBonusBalance: zod_1.z.number().int(),
21
23
  });
22
24
  FindUsersCommand.ResponseSchema = zod_1.z.object({
23
25
  data: zod_1.z.array(FindUsersCommand.ResponseItemSchema),
@@ -1,22 +1,28 @@
1
1
  import { z } from 'zod';
2
- import { USER_ROLE } from '../../constants';
2
+ import { USER_ROLE, USER_STATUS } from '../../constants';
3
3
  export declare namespace GetAllUsersCommand {
4
4
  const ResponseSchema: z.ZodObject<{
5
5
  data: z.ZodArray<z.ZodObject<{
6
6
  uuid: z.ZodString;
7
7
  email: z.ZodString;
8
8
  role: z.ZodNativeEnum<typeof USER_ROLE>;
9
+ status: z.ZodNativeEnum<typeof USER_STATUS>;
9
10
  siteId: z.ZodString;
11
+ tokenBonusBalance: z.ZodNumber;
10
12
  }, "strip", z.ZodTypeAny, {
11
13
  email: string;
12
14
  uuid: string;
13
15
  siteId: string;
14
16
  role: USER_ROLE;
17
+ status: USER_STATUS;
18
+ tokenBonusBalance: number;
15
19
  }, {
16
20
  email: string;
17
21
  uuid: string;
18
22
  siteId: string;
19
23
  role: USER_ROLE;
24
+ status: USER_STATUS;
25
+ tokenBonusBalance: number;
20
26
  }>, "many">;
21
27
  }, "strip", z.ZodTypeAny, {
22
28
  data: {
@@ -24,6 +30,8 @@ export declare namespace GetAllUsersCommand {
24
30
  uuid: string;
25
31
  siteId: string;
26
32
  role: USER_ROLE;
33
+ status: USER_STATUS;
34
+ tokenBonusBalance: number;
27
35
  }[];
28
36
  }, {
29
37
  data: {
@@ -31,6 +39,8 @@ export declare namespace GetAllUsersCommand {
31
39
  uuid: string;
32
40
  siteId: string;
33
41
  role: USER_ROLE;
42
+ status: USER_STATUS;
43
+ tokenBonusBalance: number;
34
44
  }[];
35
45
  }>;
36
46
  type Response = z.infer<typeof ResponseSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-all-users.command.d.ts","sourceRoot":"","sources":["../../../queries/user/get-all-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASzB,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":["../../../queries/user/get-all-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzD,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -10,7 +10,9 @@ var GetAllUsersCommand;
10
10
  uuid: zod_1.z.string().uuid(),
11
11
  email: zod_1.z.string().email(),
12
12
  role: zod_1.z.nativeEnum(constants_1.USER_ROLE),
13
+ status: zod_1.z.nativeEnum(constants_1.USER_STATUS),
13
14
  siteId: zod_1.z.string().uuid(),
15
+ tokenBonusBalance: zod_1.z.number().int(),
14
16
  })),
15
17
  });
16
18
  })(GetAllUsersCommand || (exports.GetAllUsersCommand = GetAllUsersCommand = {}));
@@ -9,6 +9,7 @@ export declare namespace GetMySubscriptionsCommand {
9
9
  carriedOverTokenBalance: z.ZodNumber;
10
10
  status: z.ZodNativeEnum<typeof USER_TO_SUBSCRIPTION_STATUS>;
11
11
  active: z.ZodBoolean;
12
+ endDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
12
13
  createdAt: z.ZodUnion<[z.ZodDate, z.ZodString]>;
13
14
  subscription: z.ZodObject<{
14
15
  uuid: z.ZodString;
@@ -86,6 +87,7 @@ export declare namespace GetMySubscriptionsCommand {
86
87
  discount: number;
87
88
  carryoverPercent: number;
88
89
  };
90
+ endDate: string | Date | null;
89
91
  }, {
90
92
  active: boolean;
91
93
  uuid: string;
@@ -110,6 +112,7 @@ export declare namespace GetMySubscriptionsCommand {
110
112
  discount: number;
111
113
  carryoverPercent: number;
112
114
  };
115
+ endDate: string | Date | null;
113
116
  }>, "many">;
114
117
  }, "strip", z.ZodTypeAny, {
115
118
  data: {
@@ -136,6 +139,7 @@ export declare namespace GetMySubscriptionsCommand {
136
139
  discount: number;
137
140
  carryoverPercent: number;
138
141
  };
142
+ endDate: string | Date | null;
139
143
  }[];
140
144
  }, {
141
145
  data: {
@@ -162,6 +166,7 @@ export declare namespace GetMySubscriptionsCommand {
162
166
  discount: number;
163
167
  carryoverPercent: number;
164
168
  };
169
+ endDate: string | Date | null;
165
170
  }[];
166
171
  }>;
167
172
  type Response = z.infer<typeof ResponseSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-my-subscriptions.command.d.ts","sourceRoot":"","sources":["../../../queries/user/get-my-subscriptions.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAazB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-my-subscriptions.command.d.ts","sourceRoot":"","sources":["../../../queries/user/get-my-subscriptions.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAczB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -14,6 +14,7 @@ var GetMySubscriptionsCommand;
14
14
  carriedOverTokenBalance: zod_1.z.number().int(),
15
15
  status: zod_1.z.nativeEnum(constants_1.USER_TO_SUBSCRIPTION_STATUS),
16
16
  active: zod_1.z.boolean(),
17
+ endDate: zod_1.z.date().or(zod_1.z.string().datetime()).nullable(),
17
18
  createdAt: zod_1.z.date().or(zod_1.z.string().datetime()),
18
19
  subscription: models_1.SubscriptionSchema,
19
20
  })),
@@ -0,0 +1,134 @@
1
+ import { z } from 'zod';
2
+ import { ORDER_STATUS, ORDER_TYPE, PAYMENT_STATUS } from '../../constants';
3
+ export declare namespace GetUserPaymentsCommand {
4
+ const ResponseItemSchema: z.ZodObject<{
5
+ uuid: z.ZodString;
6
+ orderType: z.ZodNativeEnum<typeof ORDER_TYPE>;
7
+ orderStatus: z.ZodNativeEnum<typeof ORDER_STATUS>;
8
+ description: z.ZodString;
9
+ productId: z.ZodNullable<z.ZodString>;
10
+ productName: z.ZodNullable<z.ZodString>;
11
+ subscriptionId: z.ZodNullable<z.ZodString>;
12
+ subscriptionName: z.ZodNullable<z.ZodString>;
13
+ paymentStatus: z.ZodNativeEnum<typeof PAYMENT_STATUS>;
14
+ userId: z.ZodString;
15
+ userEmail: z.ZodString;
16
+ sum: z.ZodNumber;
17
+ currency: z.ZodString;
18
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodString]>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ uuid: string;
21
+ description: string;
22
+ currency: string;
23
+ updatedAt: string | Date;
24
+ userId: string;
25
+ subscriptionId: string | null;
26
+ sum: number;
27
+ orderType: ORDER_TYPE;
28
+ orderStatus: ORDER_STATUS;
29
+ productId: string | null;
30
+ productName: string | null;
31
+ subscriptionName: string | null;
32
+ paymentStatus: PAYMENT_STATUS;
33
+ userEmail: string;
34
+ }, {
35
+ uuid: string;
36
+ description: string;
37
+ currency: string;
38
+ updatedAt: string | Date;
39
+ userId: string;
40
+ subscriptionId: string | null;
41
+ sum: number;
42
+ orderType: ORDER_TYPE;
43
+ orderStatus: ORDER_STATUS;
44
+ productId: string | null;
45
+ productName: string | null;
46
+ subscriptionName: string | null;
47
+ paymentStatus: PAYMENT_STATUS;
48
+ userEmail: string;
49
+ }>;
50
+ const ResponseSchema: z.ZodObject<{
51
+ data: z.ZodArray<z.ZodObject<{
52
+ uuid: z.ZodString;
53
+ orderType: z.ZodNativeEnum<typeof ORDER_TYPE>;
54
+ orderStatus: z.ZodNativeEnum<typeof ORDER_STATUS>;
55
+ description: z.ZodString;
56
+ productId: z.ZodNullable<z.ZodString>;
57
+ productName: z.ZodNullable<z.ZodString>;
58
+ subscriptionId: z.ZodNullable<z.ZodString>;
59
+ subscriptionName: z.ZodNullable<z.ZodString>;
60
+ paymentStatus: z.ZodNativeEnum<typeof PAYMENT_STATUS>;
61
+ userId: z.ZodString;
62
+ userEmail: z.ZodString;
63
+ sum: z.ZodNumber;
64
+ currency: z.ZodString;
65
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodString]>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ uuid: string;
68
+ description: string;
69
+ currency: string;
70
+ updatedAt: string | Date;
71
+ userId: string;
72
+ subscriptionId: string | null;
73
+ sum: number;
74
+ orderType: ORDER_TYPE;
75
+ orderStatus: ORDER_STATUS;
76
+ productId: string | null;
77
+ productName: string | null;
78
+ subscriptionName: string | null;
79
+ paymentStatus: PAYMENT_STATUS;
80
+ userEmail: string;
81
+ }, {
82
+ uuid: string;
83
+ description: string;
84
+ currency: string;
85
+ updatedAt: string | Date;
86
+ userId: string;
87
+ subscriptionId: string | null;
88
+ sum: number;
89
+ orderType: ORDER_TYPE;
90
+ orderStatus: ORDER_STATUS;
91
+ productId: string | null;
92
+ productName: string | null;
93
+ subscriptionName: string | null;
94
+ paymentStatus: PAYMENT_STATUS;
95
+ userEmail: string;
96
+ }>, "many">;
97
+ }, "strip", z.ZodTypeAny, {
98
+ data: {
99
+ uuid: string;
100
+ description: string;
101
+ currency: string;
102
+ updatedAt: string | Date;
103
+ userId: string;
104
+ subscriptionId: string | null;
105
+ sum: number;
106
+ orderType: ORDER_TYPE;
107
+ orderStatus: ORDER_STATUS;
108
+ productId: string | null;
109
+ productName: string | null;
110
+ subscriptionName: string | null;
111
+ paymentStatus: PAYMENT_STATUS;
112
+ userEmail: string;
113
+ }[];
114
+ }, {
115
+ data: {
116
+ uuid: string;
117
+ description: string;
118
+ currency: string;
119
+ updatedAt: string | Date;
120
+ userId: string;
121
+ subscriptionId: string | null;
122
+ sum: number;
123
+ orderType: ORDER_TYPE;
124
+ orderStatus: ORDER_STATUS;
125
+ productId: string | null;
126
+ productName: string | null;
127
+ subscriptionName: string | null;
128
+ paymentStatus: PAYMENT_STATUS;
129
+ userEmail: string;
130
+ }[];
131
+ }>;
132
+ type Response = z.infer<typeof ResponseSchema>;
133
+ }
134
+ //# sourceMappingURL=get-user-payments.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-user-payments.command.d.ts","sourceRoot":"","sources":["../../../queries/user/get-user-payments.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE3E,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAe7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetUserPaymentsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ var GetUserPaymentsCommand;
7
+ (function (GetUserPaymentsCommand) {
8
+ GetUserPaymentsCommand.ResponseItemSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ orderType: zod_1.z.nativeEnum(constants_1.ORDER_TYPE),
11
+ orderStatus: zod_1.z.nativeEnum(constants_1.ORDER_STATUS),
12
+ description: zod_1.z.string(),
13
+ productId: zod_1.z.string().uuid().nullable(),
14
+ productName: zod_1.z.string().nullable(),
15
+ subscriptionId: zod_1.z.string().uuid().nullable(),
16
+ subscriptionName: zod_1.z.string().nullable(),
17
+ paymentStatus: zod_1.z.nativeEnum(constants_1.PAYMENT_STATUS),
18
+ userId: zod_1.z.string().uuid(),
19
+ userEmail: zod_1.z.string().email(),
20
+ sum: zod_1.z.number(),
21
+ currency: zod_1.z.string(),
22
+ updatedAt: zod_1.z.date().or(zod_1.z.string().datetime()),
23
+ });
24
+ GetUserPaymentsCommand.ResponseSchema = zod_1.z.object({
25
+ data: zod_1.z.array(GetUserPaymentsCommand.ResponseItemSchema),
26
+ });
27
+ })(GetUserPaymentsCommand || (exports.GetUserPaymentsCommand = GetUserPaymentsCommand = {}));