@purpleschool/gptbot 0.8.96 → 0.8.99

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 (81) hide show
  1. package/api/controllers/http/index.ts +1 -0
  2. package/api/controllers/http/interior-design.ts +14 -0
  3. package/api/controllers/http/payment.ts +1 -0
  4. package/api/controllers/http/product.ts +1 -0
  5. package/api/controllers/http/subscription.ts +1 -0
  6. package/api/routes.ts +37 -0
  7. package/build/api/controllers/http/index.js +1 -0
  8. package/build/api/controllers/http/interior-design.js +16 -0
  9. package/build/api/controllers/http/payment.js +1 -0
  10. package/build/api/controllers/http/product.js +1 -0
  11. package/build/api/controllers/http/subscription.js +1 -0
  12. package/build/api/routes.js +25 -0
  13. package/build/commands/payment/find-payments-by-criteria.command.js +53 -0
  14. package/build/commands/payment/index.js +1 -0
  15. package/build/commands/product/index.js +1 -0
  16. package/build/commands/product/refund-product.command.js +15 -0
  17. package/build/commands/subscription/index.js +1 -0
  18. package/build/commands/subscription/refund-subscription.command.js +15 -0
  19. package/build/commands/tools/index.js +1 -0
  20. package/build/commands/tools/interior-design/delete-all-interior-design-jobs.command.js +8 -0
  21. package/build/commands/tools/interior-design/delete-interior-design-job-by-uuid.command.js +11 -0
  22. package/build/commands/tools/interior-design/find-interior-design-job-by-uuid.command.js +14 -0
  23. package/build/commands/tools/interior-design/find-interior-design-jobs.command.js +18 -0
  24. package/build/commands/tools/interior-design/get-interior-design-tool-config.command.js +11 -0
  25. package/build/commands/tools/interior-design/index.js +25 -0
  26. package/build/commands/tools/interior-design/interior-design.command.js +20 -0
  27. package/build/commands/tools/interior-design/retry-interior-design-job.command.js +25 -0
  28. package/build/commands/tools/interior-design/set-reaction-to-interior-design-job.command.js +28 -0
  29. package/build/commands/tools/interior-design/update-interior-design-job-title.command.js +17 -0
  30. package/build/commands/user/get-user-payments.command.js +3 -1
  31. package/build/constants/errors/errors.js +4411 -2760
  32. package/build/constants/errors/index.js +1 -1
  33. package/build/constants/product/enums/product-status.enum.js +1 -0
  34. package/build/constants/subscription/enums/subscription-feature-type.enum.js +3 -0
  35. package/build/constants/subscription/enums/subscription-status.enum.js +1 -0
  36. package/build/constants/tool/enums/tool-type.enum.js +1 -0
  37. package/build/helpers/index.js +1 -0
  38. package/build/helpers/interior-design/calculate-interior-design-price.helper.js +13 -0
  39. package/build/helpers/interior-design/index.js +17 -0
  40. package/build/models/payment.schema.js +8 -3
  41. package/build/models/subscription-feature.schema.js +14 -1
  42. package/build/models/tools/index.js +1 -0
  43. package/build/models/tools/interior-design/index.js +19 -0
  44. package/build/models/tools/interior-design/interior-design-config.schema.js +23 -0
  45. package/build/models/tools/interior-design/interior-design-job.schema.js +27 -0
  46. package/build/models/tools/interior-design/interior-design-model.schema.js +33 -0
  47. package/commands/payment/find-payments-by-criteria.command.ts +63 -0
  48. package/commands/payment/index.ts +1 -0
  49. package/commands/product/index.ts +1 -0
  50. package/commands/product/refund-product.command.ts +17 -0
  51. package/commands/subscription/index.ts +1 -0
  52. package/commands/subscription/refund-subscription.command.ts +17 -0
  53. package/commands/tools/index.ts +1 -0
  54. package/commands/tools/interior-design/delete-all-interior-design-jobs.command.ts +6 -0
  55. package/commands/tools/interior-design/delete-interior-design-job-by-uuid.command.ts +11 -0
  56. package/commands/tools/interior-design/find-interior-design-job-by-uuid.command.ts +16 -0
  57. package/commands/tools/interior-design/find-interior-design-jobs.command.ts +18 -0
  58. package/commands/tools/interior-design/get-interior-design-tool-config.command.ts +10 -0
  59. package/commands/tools/interior-design/index.ts +9 -0
  60. package/commands/tools/interior-design/interior-design.command.ts +21 -0
  61. package/commands/tools/interior-design/retry-interior-design-job.command.ts +27 -0
  62. package/commands/tools/interior-design/set-reaction-to-interior-design-job.command.ts +33 -0
  63. package/commands/tools/interior-design/update-interior-design-job-title.command.ts +19 -0
  64. package/commands/user/get-user-payments.command.ts +4 -2
  65. package/constants/errors/errors.ts +4451 -2766
  66. package/constants/errors/index.ts +1 -1
  67. package/constants/product/enums/product-status.enum.ts +1 -0
  68. package/constants/subscription/enums/subscription-feature-type.enum.ts +3 -0
  69. package/constants/subscription/enums/subscription-status.enum.ts +1 -0
  70. package/constants/tool/enums/tool-type.enum.ts +1 -0
  71. package/helpers/index.ts +1 -0
  72. package/helpers/interior-design/calculate-interior-design-price.helper.ts +23 -0
  73. package/helpers/interior-design/index.ts +1 -0
  74. package/models/payment.schema.ts +7 -2
  75. package/models/subscription-feature.schema.ts +19 -0
  76. package/models/tools/index.ts +1 -0
  77. package/models/tools/interior-design/index.ts +3 -0
  78. package/models/tools/interior-design/interior-design-config.schema.ts +29 -0
  79. package/models/tools/interior-design/interior-design-job.schema.ts +32 -0
  80. package/models/tools/interior-design/interior-design-model.schema.ts +44 -0
  81. package/package.json +1 -1
@@ -56,3 +56,4 @@ export * from './b2b';
56
56
  export * from './community';
57
57
  export * from './user-profile';
58
58
  export * from './image-generation';
59
+ export * from './interior-design';
@@ -0,0 +1,14 @@
1
+ export const INTERIOR_DESIGN_CONTROLLER_PRIVATE = 'private/tools/interior-design' as const;
2
+ export const INTERIOR_DESIGN_CONTROLLER_PUBLIC = 'public/tools/interior-design' as const;
3
+
4
+ export const INTERIOR_DESIGN_ROUTES = {
5
+ CONFIG: 'config',
6
+ EXECUTE: 'execute',
7
+ GET_JOBS: 'jobs',
8
+ GET_JOB: (uuid: string) => `jobs/${uuid}`,
9
+ UPDATE: (uuid: string) => `jobs/${uuid}`,
10
+ SET_REACTION: (uuid: string) => `jobs/${uuid}/reaction`,
11
+ DELETE: (uuid: string) => `jobs/${uuid}`,
12
+ DELETE_ALL: 'jobs',
13
+ RETRY: (uuid: string) => `jobs/${uuid}/retry`,
14
+ } as const;
@@ -3,4 +3,5 @@ export const PAYMENT_CONTROLLER = 'payment' as const;
3
3
  export const PAYMENT_ROUTES = {
4
4
  HISTORY: 'history',
5
5
  REFUND: 'refund',
6
+ FIND_BY_CRITERIA: 'criteria',
6
7
  } as const;
@@ -8,4 +8,5 @@ export const PRODUCT_ROUTES = {
8
8
  BUY: (uuid: string) => `${uuid}/buy`,
9
9
  FAST_BUY: `fast/buy`,
10
10
  MY: 'my',
11
+ REFUND: (uuid: string) => `${uuid}/refund`,
11
12
  } as const;
@@ -18,4 +18,5 @@ export const SUBSCRIPTION_ROUTES = {
18
18
  FREE: 'free',
19
19
  SUMMARY: 'summary',
20
20
  RECOVER_PAST_DUE: (uuid: string) => `${uuid}/recover-past-due`,
21
+ REFUND: (uuid: string) => `${uuid}/refund`,
21
22
  } as const;
package/api/routes.ts CHANGED
@@ -144,6 +144,8 @@ export const REST_API = {
144
144
  BUY: (uuid: string) =>
145
145
  `${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.BUY(uuid)}`,
146
146
  MY: `${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.MY}`,
147
+ REFUND: (uuid: string) =>
148
+ `${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.REFUND(uuid)}`,
147
149
  },
148
150
  SUBSCRIPTION_PUBLIC: {
149
151
  GET: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PUBLIC_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
@@ -176,6 +178,8 @@ export const REST_API = {
176
178
  SUMMARY: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.SUMMARY}`,
177
179
  RECOVER_PAST_DUE: (uuid: string) =>
178
180
  `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.RECOVER_PAST_DUE(uuid)}`,
181
+ REFUND: (uuid: string) =>
182
+ `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.REFUND(uuid)}`,
179
183
  },
180
184
  FILES: {
181
185
  UPLOAD_FILE: `${ROOT}/${CONTROLLERS.FILE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD_FILE}`,
@@ -751,6 +755,38 @@ export const REST_API = {
751
755
  RETRY: (uuid: string) =>
752
756
  `${ROOT}/${CONTROLLERS.VIDEO_EDITOR_CONTROLLER_PRIVATE}/${CONTROLLERS.VIDEO_EDITOR_ROUTES.RETRY(uuid)}`,
753
757
  },
758
+ INTERIOR_DESIGN_PUBLIC: {
759
+ CONFIG: `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.CONFIG}`,
760
+ EXECUTE: `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.EXECUTE}`,
761
+ GET_JOBS: `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.GET_JOBS}`,
762
+ GET_JOB: (uuid: string) =>
763
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.GET_JOB(uuid)}`,
764
+ UPDATE: (uuid: string) =>
765
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.UPDATE(uuid)}`,
766
+ SET_REACTION: (uuid: string) =>
767
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.SET_REACTION(uuid)}`,
768
+ DELETE: (uuid: string) =>
769
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.DELETE(uuid)}`,
770
+ DELETE_ALL: `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.DELETE_ALL}`,
771
+ RETRY: (uuid: string) =>
772
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.RETRY(uuid)}`,
773
+ },
774
+ INTERIOR_DESIGN_PRIVATE: {
775
+ CONFIG: `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.CONFIG}`,
776
+ EXECUTE: `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.EXECUTE}`,
777
+ GET_JOBS: `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.GET_JOBS}`,
778
+ GET_JOB: (uuid: string) =>
779
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.GET_JOB(uuid)}`,
780
+ UPDATE: (uuid: string) =>
781
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.UPDATE(uuid)}`,
782
+ SET_REACTION: (uuid: string) =>
783
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.SET_REACTION(uuid)}`,
784
+ DELETE: (uuid: string) =>
785
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.DELETE(uuid)}`,
786
+ DELETE_ALL: `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.DELETE_ALL}`,
787
+ RETRY: (uuid: string) =>
788
+ `${ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.RETRY(uuid)}`,
789
+ },
754
790
  MESSAGE_PUBLIC: {
755
791
  FIND_BY_UUID: (uuid: string) =>
756
792
  `${ROOT}/${CONTROLLERS.MESSAGE_CONTROLLER_PUBLIC}/${CONTROLLERS.MESSAGE_PUBLIC_ROUTES.FIND_BY_UUID(uuid)}`,
@@ -827,6 +863,7 @@ export const REST_API = {
827
863
  PAYMENT: {
828
864
  HISTORY: `${ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.HISTORY}`,
829
865
  REFUND: `${ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.REFUND}`,
866
+ FIND_BY_CRITERIA: `${ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.FIND_BY_CRITERIA}`,
830
867
  },
831
868
  COURSE: {
832
869
  FIND_BY_UUID: `${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_UUID}`,
@@ -72,3 +72,4 @@ __exportStar(require("./b2b"), exports);
72
72
  __exportStar(require("./community"), exports);
73
73
  __exportStar(require("./user-profile"), exports);
74
74
  __exportStar(require("./image-generation"), exports);
75
+ __exportStar(require("./interior-design"), exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTERIOR_DESIGN_ROUTES = exports.INTERIOR_DESIGN_CONTROLLER_PUBLIC = exports.INTERIOR_DESIGN_CONTROLLER_PRIVATE = void 0;
4
+ exports.INTERIOR_DESIGN_CONTROLLER_PRIVATE = 'private/tools/interior-design';
5
+ exports.INTERIOR_DESIGN_CONTROLLER_PUBLIC = 'public/tools/interior-design';
6
+ exports.INTERIOR_DESIGN_ROUTES = {
7
+ CONFIG: 'config',
8
+ EXECUTE: 'execute',
9
+ GET_JOBS: 'jobs',
10
+ GET_JOB: (uuid) => `jobs/${uuid}`,
11
+ UPDATE: (uuid) => `jobs/${uuid}`,
12
+ SET_REACTION: (uuid) => `jobs/${uuid}/reaction`,
13
+ DELETE: (uuid) => `jobs/${uuid}`,
14
+ DELETE_ALL: 'jobs',
15
+ RETRY: (uuid) => `jobs/${uuid}/retry`,
16
+ };
@@ -5,4 +5,5 @@ exports.PAYMENT_CONTROLLER = 'payment';
5
5
  exports.PAYMENT_ROUTES = {
6
6
  HISTORY: 'history',
7
7
  REFUND: 'refund',
8
+ FIND_BY_CRITERIA: 'criteria',
8
9
  };
@@ -9,4 +9,5 @@ exports.PRODUCT_ROUTES = {
9
9
  BUY: (uuid) => `${uuid}/buy`,
10
10
  FAST_BUY: `fast/buy`,
11
11
  MY: 'my',
12
+ REFUND: (uuid) => `${uuid}/refund`,
12
13
  };
@@ -19,4 +19,5 @@ exports.SUBSCRIPTION_ROUTES = {
19
19
  FREE: 'free',
20
20
  SUMMARY: 'summary',
21
21
  RECOVER_PAST_DUE: (uuid) => `${uuid}/recover-past-due`,
22
+ REFUND: (uuid) => `${uuid}/refund`,
22
23
  };
@@ -153,6 +153,7 @@ exports.REST_API = {
153
153
  CREATE: `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}`,
154
154
  BUY: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.BUY(uuid)}`,
155
155
  MY: `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.MY}`,
156
+ REFUND: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.REFUND(uuid)}`,
156
157
  },
157
158
  SUBSCRIPTION_PUBLIC: {
158
159
  GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PUBLIC_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
@@ -177,6 +178,7 @@ exports.REST_API = {
177
178
  CREATE_CUSTOM: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.CREATE_CUSTOM}`,
178
179
  SUMMARY: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.SUMMARY}`,
179
180
  RECOVER_PAST_DUE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.RECOVER_PAST_DUE(uuid)}`,
181
+ REFUND: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.REFUND(uuid)}`,
180
182
  },
181
183
  FILES: {
182
184
  UPLOAD_FILE: `${exports.ROOT}/${CONTROLLERS.FILE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD_FILE}`,
@@ -573,6 +575,28 @@ exports.REST_API = {
573
575
  DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.VIDEO_EDITOR_CONTROLLER_PRIVATE}/${CONTROLLERS.VIDEO_EDITOR_ROUTES.DELETE_ALL}`,
574
576
  RETRY: (uuid) => `${exports.ROOT}/${CONTROLLERS.VIDEO_EDITOR_CONTROLLER_PRIVATE}/${CONTROLLERS.VIDEO_EDITOR_ROUTES.RETRY(uuid)}`,
575
577
  },
578
+ INTERIOR_DESIGN_PUBLIC: {
579
+ CONFIG: `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.CONFIG}`,
580
+ EXECUTE: `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.EXECUTE}`,
581
+ GET_JOBS: `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.GET_JOBS}`,
582
+ GET_JOB: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.GET_JOB(uuid)}`,
583
+ UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.UPDATE(uuid)}`,
584
+ SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.SET_REACTION(uuid)}`,
585
+ DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.DELETE(uuid)}`,
586
+ DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.DELETE_ALL}`,
587
+ RETRY: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PUBLIC}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.RETRY(uuid)}`,
588
+ },
589
+ INTERIOR_DESIGN_PRIVATE: {
590
+ CONFIG: `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.CONFIG}`,
591
+ EXECUTE: `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.EXECUTE}`,
592
+ GET_JOBS: `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.GET_JOBS}`,
593
+ GET_JOB: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.GET_JOB(uuid)}`,
594
+ UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.UPDATE(uuid)}`,
595
+ SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.SET_REACTION(uuid)}`,
596
+ DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.DELETE(uuid)}`,
597
+ DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.DELETE_ALL}`,
598
+ RETRY: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERIOR_DESIGN_CONTROLLER_PRIVATE}/${CONTROLLERS.INTERIOR_DESIGN_ROUTES.RETRY(uuid)}`,
599
+ },
576
600
  MESSAGE_PUBLIC: {
577
601
  FIND_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.MESSAGE_CONTROLLER_PUBLIC}/${CONTROLLERS.MESSAGE_PUBLIC_ROUTES.FIND_BY_UUID(uuid)}`,
578
602
  RATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.MESSAGE_CONTROLLER_PUBLIC}/${CONTROLLERS.MESSAGE_PUBLIC_ROUTES.RATE(uuid)}`,
@@ -636,6 +660,7 @@ exports.REST_API = {
636
660
  PAYMENT: {
637
661
  HISTORY: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.HISTORY}`,
638
662
  REFUND: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.REFUND}`,
663
+ FIND_BY_CRITERIA: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.FIND_BY_CRITERIA}`,
639
664
  },
640
665
  COURSE: {
641
666
  FIND_BY_UUID: `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_UUID}`,
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindPaymentsByCriteriaCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const constants_1 = require("../../constants");
7
+ var FindPaymentsByCriteriaCommand;
8
+ (function (FindPaymentsByCriteriaCommand) {
9
+ FindPaymentsByCriteriaCommand.RequestSchema = zod_1.z.preprocess((input) => {
10
+ if (input && typeof input === 'object' && !Array.isArray(input)) {
11
+ const obj = Object.assign({}, input);
12
+ const onlyNormalize = ['createdAt', 'sum'];
13
+ const relevantBracketed = Object.keys(obj).some((key) => {
14
+ const match = key.match(/^(\w+)\[(\w+)\]$/);
15
+ return match && onlyNormalize.includes(match[1]);
16
+ });
17
+ if (!relevantBracketed) {
18
+ return obj;
19
+ }
20
+ const result = Object.assign({}, obj);
21
+ for (const key of Object.keys(obj)) {
22
+ const match = key.match(/^(\w+)\[(\w+)\]$/);
23
+ if (match && onlyNormalize.includes(match[1])) {
24
+ const [, outer, inner] = match;
25
+ result[outer] = result[outer] || {};
26
+ result[outer][inner] = obj[key];
27
+ delete result[key];
28
+ }
29
+ }
30
+ return result;
31
+ }
32
+ return input;
33
+ }, zod_1.z.object({
34
+ status: zod_1.z.nativeEnum(constants_1.PAYMENT_STATUS).optional(),
35
+ orderId: zod_1.z.string().optional(),
36
+ sum: models_1.NumberFilter.optional(),
37
+ userEmail: zod_1.z.string().optional(),
38
+ createdAt: models_1.DateFilter.optional(),
39
+ userId: zod_1.z.string().optional(),
40
+ signupMethod: zod_1.z.nativeEnum(constants_1.SIGNUP_METHOD).optional(),
41
+ vkId: zod_1.z.string().optional(),
42
+ yandexId: zod_1.z.string().optional(),
43
+ sortBy: zod_1.z.nativeEnum(constants_1.PAYMENT_SORT_BY).optional(),
44
+ sortOrder: zod_1.z.nativeEnum(constants_1.SORT_ORDER).default(constants_1.SORT_ORDER.DESC).optional(),
45
+ limit: zod_1.z.coerce.number().min(1),
46
+ offset: zod_1.z.coerce.number().min(0).default(0),
47
+ }));
48
+ FindPaymentsByCriteriaCommand.ResponseSchema = zod_1.z.object({
49
+ data: zod_1.z.array(models_1.PaymentWithUserDataSchema),
50
+ page: zod_1.z.number(),
51
+ totalPages: zod_1.z.number(),
52
+ });
53
+ })(FindPaymentsByCriteriaCommand || (exports.FindPaymentsByCriteriaCommand = FindPaymentsByCriteriaCommand = {}));
@@ -20,3 +20,4 @@ __exportStar(require("./pay.command"), exports);
20
20
  __exportStar(require("./receipt.command"), exports);
21
21
  __exportStar(require("./recurrent.command"), exports);
22
22
  __exportStar(require("./refund-payment.command"), exports);
23
+ __exportStar(require("./find-payments-by-criteria.command"), exports);
@@ -20,3 +20,4 @@ __exportStar(require("./delete-product.command"), exports);
20
20
  __exportStar(require("./find-product.command"), exports);
21
21
  __exportStar(require("./get-my-products.command"), exports);
22
22
  __exportStar(require("./update-product.command"), exports);
23
+ __exportStar(require("./refund-product.command"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RefundProductCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var RefundProductCommand;
6
+ (function (RefundProductCommand) {
7
+ RefundProductCommand.RequestSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ });
10
+ RefundProductCommand.ResponseSchema = zod_1.z.object({
11
+ data: zod_1.z.object({
12
+ isSuccess: zod_1.z.boolean(),
13
+ }),
14
+ });
15
+ })(RefundProductCommand || (exports.RefundProductCommand = RefundProductCommand = {}));
@@ -28,3 +28,4 @@ __exportStar(require("./recover-subscription.command"), exports);
28
28
  __exportStar(require("./update-subscription.command"), exports);
29
29
  __exportStar(require("./upgrade-subscription.command"), exports);
30
30
  __exportStar(require("./downgrade-subscription.command"), exports);
31
+ __exportStar(require("./refund-subscription.command"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RefundSubscriptionCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var RefundSubscriptionCommand;
6
+ (function (RefundSubscriptionCommand) {
7
+ RefundSubscriptionCommand.RequestSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ });
10
+ RefundSubscriptionCommand.ResponseSchema = zod_1.z.object({
11
+ data: zod_1.z.object({
12
+ isSuccess: zod_1.z.boolean(),
13
+ }),
14
+ });
15
+ })(RefundSubscriptionCommand || (exports.RefundSubscriptionCommand = RefundSubscriptionCommand = {}));
@@ -25,3 +25,4 @@ __exportStar(require("./image-editor"), exports);
25
25
  __exportStar(require("./video-editor"), exports);
26
26
  __exportStar(require("./music"), exports);
27
27
  __exportStar(require("./image-generation"), exports);
28
+ __exportStar(require("./interior-design"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteAllInteriorDesignJobsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var DeleteAllInteriorDesignJobsCommand;
6
+ (function (DeleteAllInteriorDesignJobsCommand) {
7
+ DeleteAllInteriorDesignJobsCommand.ResponseSchema = zod_1.z.void();
8
+ })(DeleteAllInteriorDesignJobsCommand || (exports.DeleteAllInteriorDesignJobsCommand = DeleteAllInteriorDesignJobsCommand = {}));
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteInteriorDesignJobByUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var DeleteInteriorDesignJobByUuidCommand;
6
+ (function (DeleteInteriorDesignJobByUuidCommand) {
7
+ DeleteInteriorDesignJobByUuidCommand.RequestParamsSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ });
10
+ DeleteInteriorDesignJobByUuidCommand.ResponseSchema = zod_1.z.void();
11
+ })(DeleteInteriorDesignJobByUuidCommand || (exports.DeleteInteriorDesignJobByUuidCommand = DeleteInteriorDesignJobByUuidCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindInteriorDesignJobByUUIDCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var FindInteriorDesignJobByUUIDCommand;
7
+ (function (FindInteriorDesignJobByUUIDCommand) {
8
+ FindInteriorDesignJobByUUIDCommand.RequestParamsSchema = models_1.ToolJobSchema.pick({
9
+ uuid: true,
10
+ });
11
+ FindInteriorDesignJobByUUIDCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.InteriorDesignJobSchema,
13
+ });
14
+ })(FindInteriorDesignJobByUUIDCommand || (exports.FindInteriorDesignJobByUUIDCommand = FindInteriorDesignJobByUUIDCommand = {}));
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindInteriorDesignJobsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var FindInteriorDesignJobsCommand;
7
+ (function (FindInteriorDesignJobsCommand) {
8
+ FindInteriorDesignJobsCommand.RequestQuerySchema = zod_1.z.object({
9
+ limit: zod_1.z.coerce.number().min(1).optional(),
10
+ offset: zod_1.z.coerce.number().min(0).default(0).optional(),
11
+ title: zod_1.z.string().optional(),
12
+ });
13
+ FindInteriorDesignJobsCommand.ResponseSchema = zod_1.z.object({
14
+ data: zod_1.z.array(models_1.InteriorDesignJobSchema),
15
+ totalPages: zod_1.z.number(),
16
+ page: zod_1.z.number(),
17
+ });
18
+ })(FindInteriorDesignJobsCommand || (exports.FindInteriorDesignJobsCommand = FindInteriorDesignJobsCommand = {}));
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetInteriorDesignToolConfigCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var GetInteriorDesignToolConfigCommand;
7
+ (function (GetInteriorDesignToolConfigCommand) {
8
+ GetInteriorDesignToolConfigCommand.ResponseSchema = zod_1.z.object({
9
+ data: models_1.InteriorDesignConfigSchema,
10
+ });
11
+ })(GetInteriorDesignToolConfigCommand || (exports.GetInteriorDesignToolConfigCommand = GetInteriorDesignToolConfigCommand = {}));
@@ -0,0 +1,25 @@
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("./delete-interior-design-job-by-uuid.command"), exports);
18
+ __exportStar(require("./delete-all-interior-design-jobs.command"), exports);
19
+ __exportStar(require("./retry-interior-design-job.command"), exports);
20
+ __exportStar(require("./set-reaction-to-interior-design-job.command"), exports);
21
+ __exportStar(require("./interior-design.command"), exports);
22
+ __exportStar(require("./update-interior-design-job-title.command"), exports);
23
+ __exportStar(require("./find-interior-design-job-by-uuid.command"), exports);
24
+ __exportStar(require("./find-interior-design-jobs.command"), exports);
25
+ __exportStar(require("./get-interior-design-tool-config.command"), exports);
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InteriorDesignCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var InteriorDesignCommand;
7
+ (function (InteriorDesignCommand) {
8
+ InteriorDesignCommand.RequestSchema = zod_1.z.object({
9
+ modelId: zod_1.z.string().uuid(),
10
+ prompt: zod_1.z.string(),
11
+ params: zod_1.z.object({
12
+ imageUrls: zod_1.z.array(zod_1.z.string()),
13
+ styleId: zod_1.z.string().optional(),
14
+ roomTypeId: zod_1.z.string().optional(),
15
+ }),
16
+ });
17
+ InteriorDesignCommand.ResponseSchema = zod_1.z.object({
18
+ data: models_1.ToolJobSchema,
19
+ });
20
+ })(InteriorDesignCommand || (exports.InteriorDesignCommand = InteriorDesignCommand = {}));
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetryInteriorDesignJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var RetryInteriorDesignJobCommand;
7
+ (function (RetryInteriorDesignJobCommand) {
8
+ RetryInteriorDesignJobCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ RetryInteriorDesignJobCommand.RequestBodySchema = zod_1.z.object({
12
+ modelId: zod_1.z.string().uuid().optional(),
13
+ prompt: zod_1.z.string().optional(),
14
+ params: zod_1.z
15
+ .object({
16
+ attachedFiles: zod_1.z.string().array(),
17
+ styleId: zod_1.z.string().optional(),
18
+ roomTypeId: zod_1.z.string().optional(),
19
+ })
20
+ .optional(),
21
+ });
22
+ RetryInteriorDesignJobCommand.ResponseSchema = zod_1.z.object({
23
+ data: models_1.InteriorDesignJobSchema,
24
+ });
25
+ })(RetryInteriorDesignJobCommand || (exports.RetryInteriorDesignJobCommand = RetryInteriorDesignJobCommand = {}));
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetReactionToInteriorDesignJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const constants_1 = require("../../../constants");
7
+ var SetReactionToInteriorDesignJobCommand;
8
+ (function (SetReactionToInteriorDesignJobCommand) {
9
+ SetReactionToInteriorDesignJobCommand.RequestSchema = zod_1.z
10
+ .object({
11
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
12
+ dislikeReason: zod_1.z.string().nullable().default(null),
13
+ })
14
+ .refine((data) => {
15
+ if (data.reaction !== constants_1.USER_REACTION.DISLIKED && data.dislikeReason) {
16
+ return false;
17
+ }
18
+ return true;
19
+ }, {
20
+ message: 'Dislike reason is not allowed when reaction is not DISLIKED',
21
+ });
22
+ SetReactionToInteriorDesignJobCommand.RequestParamsSchema = zod_1.z.object({
23
+ uuid: zod_1.z.string().uuid(),
24
+ });
25
+ SetReactionToInteriorDesignJobCommand.ResponseSchema = zod_1.z.object({
26
+ data: models_1.InteriorDesignJobSchema,
27
+ });
28
+ })(SetReactionToInteriorDesignJobCommand || (exports.SetReactionToInteriorDesignJobCommand = SetReactionToInteriorDesignJobCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateInteriorDesignJobTitleCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var UpdateInteriorDesignJobTitleCommand;
7
+ (function (UpdateInteriorDesignJobTitleCommand) {
8
+ UpdateInteriorDesignJobTitleCommand.RequestSchema = zod_1.z.object({
9
+ title: zod_1.z.string().min(1).max(40).trim(),
10
+ });
11
+ UpdateInteriorDesignJobTitleCommand.RequestParamsSchema = zod_1.z.object({
12
+ uuid: zod_1.z.string().uuid(),
13
+ });
14
+ UpdateInteriorDesignJobTitleCommand.ResponseSchema = zod_1.z.object({
15
+ data: models_1.InteriorDesignJobSchema,
16
+ });
17
+ })(UpdateInteriorDesignJobTitleCommand || (exports.UpdateInteriorDesignJobTitleCommand = UpdateInteriorDesignJobTitleCommand = {}));
@@ -21,6 +21,8 @@ var GetUserPaymentsCommand;
21
21
  })
22
22
  .partial();
23
23
  GetUserPaymentsCommand.ResponseSchema = zod_1.default.object({
24
- data: zod_1.default.array(models_1.PaymentWithDescriptionSchema),
24
+ data: zod_1.default.array(models_1.PaymentWithUserDataSchema),
25
+ page: zod_1.default.number(),
26
+ totalPages: zod_1.default.number(),
25
27
  });
26
28
  })(GetUserPaymentsCommand || (exports.GetUserPaymentsCommand = GetUserPaymentsCommand = {}));