@purpleschool/gptbot 0.7.63 → 0.7.66

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 (115) hide show
  1. package/api/controllers/http/index.ts +2 -0
  2. package/api/controllers/http/promocode.ts +1 -0
  3. package/api/controllers/http/video-editor.ts +14 -0
  4. package/api/controllers/http/webmaster.ts +10 -0
  5. package/api/controllers/http/writer.ts +1 -0
  6. package/api/routes.ts +6 -0
  7. package/build/api/controllers/http/index.js +2 -0
  8. package/build/api/controllers/http/promocode.js +1 -0
  9. package/build/api/controllers/http/video-editor.js +16 -0
  10. package/build/api/controllers/http/webmaster.js +12 -0
  11. package/build/api/controllers/http/writer.js +1 -0
  12. package/build/api/routes.js +5 -0
  13. package/build/commands/index.js +1 -0
  14. package/build/commands/promocode/get-webmaster-promocode.command.js +17 -0
  15. package/build/commands/promocode/index.js +1 -0
  16. package/build/commands/tools/index.js +1 -0
  17. package/build/commands/tools/video-editor/delete-all-video-editor-jobs.command.js +11 -0
  18. package/build/commands/tools/video-editor/delete-video-editor-job-by-uuid.command.js +14 -0
  19. package/build/commands/tools/video-editor/edit-video.command.js +16 -0
  20. package/build/commands/tools/video-editor/find-video-editor-job-by-id.command.js +14 -0
  21. package/build/commands/tools/video-editor/find-video-editor-jobs.command.js +18 -0
  22. package/build/commands/tools/video-editor/get-video-editor-config.command.js +14 -0
  23. package/build/commands/tools/video-editor/index.js +25 -0
  24. package/build/commands/tools/video-editor/retry-video-editor-job.command.js +14 -0
  25. package/build/commands/tools/video-editor/set-reaction-to-video-editor-job.command.js +18 -0
  26. package/build/commands/tools/video-editor/update-video-editor-job-title.command.js +17 -0
  27. package/build/commands/tools/writer/index.js +1 -0
  28. package/build/commands/tools/writer/set-reaction.writer-document.command.js +18 -0
  29. package/build/commands/webmaster/confirm-withdrawal.command.js +14 -0
  30. package/build/commands/webmaster/create-webmaster.command.js +16 -0
  31. package/build/commands/webmaster/create-withdrawal-request.command.js +16 -0
  32. package/build/commands/webmaster/get-my-webmaster.command.js +11 -0
  33. package/build/commands/webmaster/get-webmaster-balance-overview.command.js +26 -0
  34. package/build/commands/webmaster/index.js +22 -0
  35. package/build/commands/webmaster/update-webmaster.command.js +13 -0
  36. package/build/constants/errors/errors.js +160 -0
  37. package/build/constants/file/enums/file-type.enum.js +1 -0
  38. package/build/constants/file/file.constants.js +4 -1
  39. package/build/constants/index.js +3 -0
  40. package/build/constants/promocode/enums/promocode-promotion.enum.js +1 -0
  41. package/build/constants/tool-video-editor/enums/index.js +17 -0
  42. package/build/constants/tool-video-editor/enums/video-editor-model-strategy.enum.js +7 -0
  43. package/build/constants/tool-video-editor/index.js +17 -0
  44. package/build/constants/webmaster/enums/index.js +17 -0
  45. package/build/constants/webmaster/enums/organization-type.enum.js +9 -0
  46. package/build/constants/webmaster/index.js +17 -0
  47. package/build/constants/webmaster-balance/enums/index.js +18 -0
  48. package/build/constants/webmaster-balance/enums/webmaster-balance-status.enum.js +10 -0
  49. package/build/constants/webmaster-balance/enums/webmaster-balance-type.enum.js +8 -0
  50. package/build/constants/webmaster-balance/index.js +17 -0
  51. package/build/helpers/index.js +1 -0
  52. package/build/helpers/video-editor/calculate-video-editing-price.helper.js +6 -0
  53. package/build/helpers/video-editor/index.js +17 -0
  54. package/build/models/index.js +2 -0
  55. package/build/models/promocode.schema.js +1 -0
  56. package/build/models/tools/index.js +1 -0
  57. package/build/models/tools/video-editor/index.js +19 -0
  58. package/build/models/tools/video-editor/video-editor-config.schema.js +8 -0
  59. package/build/models/tools/video-editor/video-editor-job.schema.js +14 -0
  60. package/build/models/tools/video-editor/video-editor-model.schema.js +25 -0
  61. package/build/models/tools/writer/writer-document.schema.js +1 -0
  62. package/build/models/webmaster-balance.schema.js +20 -0
  63. package/build/models/webmaster.schema.js +21 -0
  64. package/commands/index.ts +1 -0
  65. package/commands/promocode/get-webmaster-promocode.command.ts +19 -0
  66. package/commands/promocode/index.ts +1 -0
  67. package/commands/tools/index.ts +1 -0
  68. package/commands/tools/video-editor/delete-all-video-editor-jobs.command.ts +13 -0
  69. package/commands/tools/video-editor/delete-video-editor-job-by-uuid.command.ts +16 -0
  70. package/commands/tools/video-editor/edit-video.command.ts +18 -0
  71. package/commands/tools/video-editor/find-video-editor-job-by-id.command.ts +16 -0
  72. package/commands/tools/video-editor/find-video-editor-jobs.command.ts +18 -0
  73. package/commands/tools/video-editor/get-video-editor-config.command.ts +16 -0
  74. package/commands/tools/video-editor/index.ts +9 -0
  75. package/commands/tools/video-editor/retry-video-editor-job.command.ts +16 -0
  76. package/commands/tools/video-editor/set-reaction-to-video-editor-job.command.ts +21 -0
  77. package/commands/tools/video-editor/update-video-editor-job-title.command.ts +20 -0
  78. package/commands/tools/writer/index.ts +1 -0
  79. package/commands/tools/writer/set-reaction.writer-document.command.ts +21 -0
  80. package/commands/webmaster/confirm-withdrawal.command.ts +16 -0
  81. package/commands/webmaster/create-webmaster.command.ts +18 -0
  82. package/commands/webmaster/create-withdrawal-request.command.ts +18 -0
  83. package/commands/webmaster/get-my-webmaster.command.ts +12 -0
  84. package/commands/webmaster/get-webmaster-balance-overview.command.ts +29 -0
  85. package/commands/webmaster/index.ts +6 -0
  86. package/commands/webmaster/update-webmaster.command.ts +18 -0
  87. package/constants/errors/errors.ts +160 -0
  88. package/constants/file/enums/file-type.enum.ts +1 -0
  89. package/constants/file/file.constants.ts +4 -0
  90. package/constants/index.ts +3 -0
  91. package/constants/promocode/enums/promocode-promotion.enum.ts +1 -0
  92. package/constants/tool-video-editor/enums/index.ts +1 -0
  93. package/constants/tool-video-editor/enums/video-editor-model-strategy.enum.ts +3 -0
  94. package/constants/tool-video-editor/index.ts +1 -0
  95. package/constants/webmaster/enums/index.ts +1 -0
  96. package/constants/webmaster/enums/organization-type.enum.ts +5 -0
  97. package/constants/webmaster/index.ts +1 -0
  98. package/constants/webmaster-balance/enums/index.ts +2 -0
  99. package/constants/webmaster-balance/enums/webmaster-balance-status.enum.ts +6 -0
  100. package/constants/webmaster-balance/enums/webmaster-balance-type.enum.ts +4 -0
  101. package/constants/webmaster-balance/index.ts +1 -0
  102. package/helpers/index.ts +1 -0
  103. package/helpers/video-editor/calculate-video-editing-price.helper.ts +9 -0
  104. package/helpers/video-editor/index.ts +1 -0
  105. package/models/index.ts +2 -0
  106. package/models/promocode.schema.ts +1 -0
  107. package/models/tools/index.ts +1 -0
  108. package/models/tools/video-editor/index.ts +3 -0
  109. package/models/tools/video-editor/video-editor-config.schema.ts +6 -0
  110. package/models/tools/video-editor/video-editor-job.schema.ts +14 -0
  111. package/models/tools/video-editor/video-editor-model.schema.ts +24 -0
  112. package/models/tools/writer/writer-document.schema.ts +2 -1
  113. package/models/webmaster-balance.schema.ts +16 -0
  114. package/models/webmaster.schema.ts +18 -0
  115. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import z from 'zod';
2
+ import { WEBMASTER_BALANCE_STATUS, WEBMASTER_BALANCE_TYPE } from '../constants';
3
+
4
+ export const WebmasterBalanceSchema = z.object({
5
+ uuid: z.string().uuid(),
6
+ webmasterId: z.string().uuid(),
7
+ orderId: z.string().uuid().nullable(),
8
+ promocodeId: z.string().uuid().nullable(),
9
+ sourceUserId: z.string().uuid().nullable(),
10
+ amount: z.number(),
11
+ type: z.nativeEnum(WEBMASTER_BALANCE_TYPE),
12
+ status: z.nativeEnum(WEBMASTER_BALANCE_STATUS),
13
+
14
+ createdAt: z.date(),
15
+ updatedAt: z.date(),
16
+ });
@@ -0,0 +1,18 @@
1
+ import z from 'zod';
2
+ import { ORGANIZATION_TYPE } from '../constants/webmaster';
3
+
4
+ export const WebmasterSchema = z.object({
5
+ uuid: z.string().uuid(),
6
+ userId: z.string().uuid(),
7
+ organization: z.string(),
8
+ organizationType: z.nativeEnum(ORGANIZATION_TYPE),
9
+ tin: z.string().regex(/^\d{10}$|^\d{12}$/, 'ИНН должен быть длинной в 10 или 12 цифр'),
10
+ alias: z.string(),
11
+
12
+ createdAt: z.date(),
13
+ updatedAt: z.date(),
14
+ });
15
+
16
+ export const WebmasterWithBalanceSchema = WebmasterSchema.extend({
17
+ balance: z.number(),
18
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.7.63",
3
+ "version": "0.7.66",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",