@purpleschool/gptbot 0.7.63 → 0.7.65

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 (107) 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/routes.ts +6 -0
  6. package/build/api/controllers/http/index.js +2 -0
  7. package/build/api/controllers/http/promocode.js +1 -0
  8. package/build/api/controllers/http/video-editor.js +16 -0
  9. package/build/api/controllers/http/webmaster.js +12 -0
  10. package/build/api/routes.js +5 -0
  11. package/build/commands/index.js +1 -0
  12. package/build/commands/promocode/get-webmaster-promocode.command.js +17 -0
  13. package/build/commands/promocode/index.js +1 -0
  14. package/build/commands/tools/index.js +1 -0
  15. package/build/commands/tools/video-editor/delete-all-video-editor-jobs.command.js +11 -0
  16. package/build/commands/tools/video-editor/delete-video-editor-job-by-uuid.command.js +14 -0
  17. package/build/commands/tools/video-editor/edit-video.command.js +16 -0
  18. package/build/commands/tools/video-editor/find-video-editor-job-by-id.command.js +14 -0
  19. package/build/commands/tools/video-editor/find-video-editor-jobs.command.js +18 -0
  20. package/build/commands/tools/video-editor/get-video-editor-config.command.js +14 -0
  21. package/build/commands/tools/video-editor/index.js +25 -0
  22. package/build/commands/tools/video-editor/retry-video-editor-job.command.js +14 -0
  23. package/build/commands/tools/video-editor/set-reaction-to-video-editor-job.command.js +18 -0
  24. package/build/commands/tools/video-editor/update-video-editor-job-title.command.js +17 -0
  25. package/build/commands/webmaster/confirm-withdrawal.command.js +14 -0
  26. package/build/commands/webmaster/create-webmaster.command.js +16 -0
  27. package/build/commands/webmaster/create-withdrawal-request.command.js +16 -0
  28. package/build/commands/webmaster/get-my-webmaster.command.js +11 -0
  29. package/build/commands/webmaster/get-webmaster-balance-overview.command.js +26 -0
  30. package/build/commands/webmaster/index.js +22 -0
  31. package/build/commands/webmaster/update-webmaster.command.js +13 -0
  32. package/build/constants/errors/errors.js +155 -0
  33. package/build/constants/file/enums/file-type.enum.js +1 -0
  34. package/build/constants/file/file.constants.js +4 -1
  35. package/build/constants/index.js +3 -0
  36. package/build/constants/promocode/enums/promocode-promotion.enum.js +1 -0
  37. package/build/constants/tool-video-editor/enums/index.js +17 -0
  38. package/build/constants/tool-video-editor/enums/video-editor-model-strategy.enum.js +7 -0
  39. package/build/constants/tool-video-editor/index.js +17 -0
  40. package/build/constants/webmaster/enums/index.js +17 -0
  41. package/build/constants/webmaster/enums/organization-type.enum.js +9 -0
  42. package/build/constants/webmaster/index.js +17 -0
  43. package/build/constants/webmaster-balance/enums/index.js +18 -0
  44. package/build/constants/webmaster-balance/enums/webmaster-balance-status.enum.js +10 -0
  45. package/build/constants/webmaster-balance/enums/webmaster-balance-type.enum.js +8 -0
  46. package/build/constants/webmaster-balance/index.js +17 -0
  47. package/build/helpers/index.js +1 -0
  48. package/build/helpers/video-editor/calculate-video-editing-price.helper.js +6 -0
  49. package/build/helpers/video-editor/index.js +17 -0
  50. package/build/models/index.js +2 -0
  51. package/build/models/promocode.schema.js +1 -0
  52. package/build/models/tools/index.js +1 -0
  53. package/build/models/tools/video-editor/index.js +19 -0
  54. package/build/models/tools/video-editor/video-editor-config.schema.js +8 -0
  55. package/build/models/tools/video-editor/video-editor-job.schema.js +14 -0
  56. package/build/models/tools/video-editor/video-editor-model.schema.js +25 -0
  57. package/build/models/webmaster-balance.schema.js +20 -0
  58. package/build/models/webmaster.schema.js +21 -0
  59. package/commands/index.ts +1 -0
  60. package/commands/promocode/get-webmaster-promocode.command.ts +19 -0
  61. package/commands/promocode/index.ts +1 -0
  62. package/commands/tools/index.ts +1 -0
  63. package/commands/tools/video-editor/delete-all-video-editor-jobs.command.ts +13 -0
  64. package/commands/tools/video-editor/delete-video-editor-job-by-uuid.command.ts +16 -0
  65. package/commands/tools/video-editor/edit-video.command.ts +18 -0
  66. package/commands/tools/video-editor/find-video-editor-job-by-id.command.ts +16 -0
  67. package/commands/tools/video-editor/find-video-editor-jobs.command.ts +18 -0
  68. package/commands/tools/video-editor/get-video-editor-config.command.ts +16 -0
  69. package/commands/tools/video-editor/index.ts +9 -0
  70. package/commands/tools/video-editor/retry-video-editor-job.command.ts +16 -0
  71. package/commands/tools/video-editor/set-reaction-to-video-editor-job.command.ts +21 -0
  72. package/commands/tools/video-editor/update-video-editor-job-title.command.ts +20 -0
  73. package/commands/webmaster/confirm-withdrawal.command.ts +16 -0
  74. package/commands/webmaster/create-webmaster.command.ts +18 -0
  75. package/commands/webmaster/create-withdrawal-request.command.ts +18 -0
  76. package/commands/webmaster/get-my-webmaster.command.ts +12 -0
  77. package/commands/webmaster/get-webmaster-balance-overview.command.ts +29 -0
  78. package/commands/webmaster/index.ts +6 -0
  79. package/commands/webmaster/update-webmaster.command.ts +18 -0
  80. package/constants/errors/errors.ts +155 -0
  81. package/constants/file/enums/file-type.enum.ts +1 -0
  82. package/constants/file/file.constants.ts +4 -0
  83. package/constants/index.ts +3 -0
  84. package/constants/promocode/enums/promocode-promotion.enum.ts +1 -0
  85. package/constants/tool-video-editor/enums/index.ts +1 -0
  86. package/constants/tool-video-editor/enums/video-editor-model-strategy.enum.ts +3 -0
  87. package/constants/tool-video-editor/index.ts +1 -0
  88. package/constants/webmaster/enums/index.ts +1 -0
  89. package/constants/webmaster/enums/organization-type.enum.ts +5 -0
  90. package/constants/webmaster/index.ts +1 -0
  91. package/constants/webmaster-balance/enums/index.ts +2 -0
  92. package/constants/webmaster-balance/enums/webmaster-balance-status.enum.ts +6 -0
  93. package/constants/webmaster-balance/enums/webmaster-balance-type.enum.ts +4 -0
  94. package/constants/webmaster-balance/index.ts +1 -0
  95. package/helpers/index.ts +1 -0
  96. package/helpers/video-editor/calculate-video-editing-price.helper.ts +9 -0
  97. package/helpers/video-editor/index.ts +1 -0
  98. package/models/index.ts +2 -0
  99. package/models/promocode.schema.ts +1 -0
  100. package/models/tools/index.ts +1 -0
  101. package/models/tools/video-editor/index.ts +3 -0
  102. package/models/tools/video-editor/video-editor-config.schema.ts +6 -0
  103. package/models/tools/video-editor/video-editor-job.schema.ts +14 -0
  104. package/models/tools/video-editor/video-editor-model.schema.ts +24 -0
  105. package/models/webmaster-balance.schema.ts +16 -0
  106. package/models/webmaster.schema.ts +18 -0
  107. package/package.json +1 -1
@@ -45,7 +45,9 @@ export * from './folder';
45
45
  export * from './user-to-product';
46
46
  export * from './user-to-subscription';
47
47
  export * from './video';
48
+ export * from './video-editor';
48
49
  export * from './writer';
49
50
  export * from './image-editor';
50
51
  export * from './daily-streak';
51
52
  export * from './cabinet';
53
+ export * from './webmaster';
@@ -6,4 +6,5 @@ export const PROMOCODE_ROUTES = {
6
6
  VALIDATE: 'validate',
7
7
  FIND_BY_UUID: 'by/uuid',
8
8
  UPSELL: 'upsell',
9
+ WEBMASTER: 'referral',
9
10
  } as const;
@@ -0,0 +1,14 @@
1
+ export const VIDEO_EDITOR_CONTROLLER_PRIVATE = 'private/tools/video-editor' as const;
2
+ export const VIDEO_EDITOR_CONTROLLER_PUBLIC = 'public/tools/video-editor' as const;
3
+
4
+ export const VIDEO_EDITOR_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;
@@ -0,0 +1,10 @@
1
+ export const WEBMASTER_CONTROLLER_PRIVATE = 'private/referral' as const;
2
+
3
+ export const WEBMASTER_ROUTES = {
4
+ GET_MY: 'my',
5
+ GET_BALANCE_OVERVIEW: 'overview',
6
+ CREATE: '',
7
+ CREATE_WITHDRAWAL_REQUEST: 'withdraw',
8
+ CONFIRM_WITHDRAWAL: (uuid: string) => `withdraw/${uuid}`,
9
+ UPDATE: (uuid: string) => `${uuid}`,
10
+ } as const;
package/api/routes.ts CHANGED
@@ -305,4 +305,10 @@ export const REST_API = {
305
305
  GET_USER_STATISTICS_OVERVIEW: `${ROOT}/${CONTROLLERS.CABINET_CONTROLLER}/${CONTROLLERS.CABINET_ROUTES.GET_USER_STATISTICS_OVERVIEW}`,
306
306
  GET_USER_STATISTICS_BY_MONTH: `${ROOT}/${CONTROLLERS.CABINET_CONTROLLER}/${CONTROLLERS.CABINET_ROUTES.GET_USER_STATISTICS_BY_MONTH}`,
307
307
  },
308
+ WEBMASTER_PRIVATE: {
309
+ GET_MY: `${ROOT}/${CONTROLLERS.WEBMASTER_CONTROLLER_PRIVATE}/${CONTROLLERS.WEBMASTER_ROUTES.GET_MY}`,
310
+ CREATE: `${ROOT}/${CONTROLLERS.WEBMASTER_CONTROLLER_PRIVATE}/${CONTROLLERS.WEBMASTER_ROUTES.CREATE}`,
311
+ UPDATE: (uuid: string) =>
312
+ `${ROOT}/${CONTROLLERS.WEBMASTER_CONTROLLER_PRIVATE}/${CONTROLLERS.WEBMASTER_ROUTES.UPDATE(uuid)}`,
313
+ },
308
314
  } as const;
@@ -61,7 +61,9 @@ __exportStar(require("./folder"), exports);
61
61
  __exportStar(require("./user-to-product"), exports);
62
62
  __exportStar(require("./user-to-subscription"), exports);
63
63
  __exportStar(require("./video"), exports);
64
+ __exportStar(require("./video-editor"), exports);
64
65
  __exportStar(require("./writer"), exports);
65
66
  __exportStar(require("./image-editor"), exports);
66
67
  __exportStar(require("./daily-streak"), exports);
67
68
  __exportStar(require("./cabinet"), exports);
69
+ __exportStar(require("./webmaster"), exports);
@@ -8,4 +8,5 @@ exports.PROMOCODE_ROUTES = {
8
8
  VALIDATE: 'validate',
9
9
  FIND_BY_UUID: 'by/uuid',
10
10
  UPSELL: 'upsell',
11
+ WEBMASTER: 'referral',
11
12
  };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VIDEO_EDITOR_ROUTES = exports.VIDEO_EDITOR_CONTROLLER_PUBLIC = exports.VIDEO_EDITOR_CONTROLLER_PRIVATE = void 0;
4
+ exports.VIDEO_EDITOR_CONTROLLER_PRIVATE = 'private/tools/video-editor';
5
+ exports.VIDEO_EDITOR_CONTROLLER_PUBLIC = 'public/tools/video-editor';
6
+ exports.VIDEO_EDITOR_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
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WEBMASTER_ROUTES = exports.WEBMASTER_CONTROLLER_PRIVATE = void 0;
4
+ exports.WEBMASTER_CONTROLLER_PRIVATE = 'private/referral';
5
+ exports.WEBMASTER_ROUTES = {
6
+ GET_MY: 'my',
7
+ GET_BALANCE_OVERVIEW: 'overview',
8
+ CREATE: '',
9
+ CREATE_WITHDRAWAL_REQUEST: 'withdraw',
10
+ CONFIRM_WITHDRAWAL: (uuid) => `withdraw/${uuid}`,
11
+ UPDATE: (uuid) => `${uuid}`,
12
+ };
@@ -274,4 +274,9 @@ exports.REST_API = {
274
274
  GET_USER_STATISTICS_OVERVIEW: `${exports.ROOT}/${CONTROLLERS.CABINET_CONTROLLER}/${CONTROLLERS.CABINET_ROUTES.GET_USER_STATISTICS_OVERVIEW}`,
275
275
  GET_USER_STATISTICS_BY_MONTH: `${exports.ROOT}/${CONTROLLERS.CABINET_CONTROLLER}/${CONTROLLERS.CABINET_ROUTES.GET_USER_STATISTICS_BY_MONTH}`,
276
276
  },
277
+ WEBMASTER_PRIVATE: {
278
+ GET_MY: `${exports.ROOT}/${CONTROLLERS.WEBMASTER_CONTROLLER_PRIVATE}/${CONTROLLERS.WEBMASTER_ROUTES.GET_MY}`,
279
+ CREATE: `${exports.ROOT}/${CONTROLLERS.WEBMASTER_CONTROLLER_PRIVATE}/${CONTROLLERS.WEBMASTER_ROUTES.CREATE}`,
280
+ UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WEBMASTER_CONTROLLER_PRIVATE}/${CONTROLLERS.WEBMASTER_ROUTES.UPDATE(uuid)}`,
281
+ },
277
282
  };
@@ -53,3 +53,4 @@ __exportStar(require("./folder"), exports);
53
53
  __exportStar(require("./user-to-product"), exports);
54
54
  __exportStar(require("./daily-streak"), exports);
55
55
  __exportStar(require("./cabinet"), exports);
56
+ __exportStar(require("./webmaster"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetWebmasterPromocodeCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var GetWebmasterPromocodeCommand;
7
+ (function (GetWebmasterPromocodeCommand) {
8
+ GetWebmasterPromocodeCommand.RequestSchema = models_1.WebmasterSchema.pick({ alias: true });
9
+ GetWebmasterPromocodeCommand.ResponseSchema = zod_1.z.object({
10
+ data: zod_1.z.object({
11
+ isEligible: zod_1.z.boolean(),
12
+ promocode: zod_1.z.string().nullable(),
13
+ amount: zod_1.z.number().nullable(),
14
+ endDate: zod_1.z.date().nullable(),
15
+ }),
16
+ });
17
+ })(GetWebmasterPromocodeCommand || (exports.GetWebmasterPromocodeCommand = GetWebmasterPromocodeCommand = {}));
@@ -20,3 +20,4 @@ __exportStar(require("./find-promocode.command"), exports);
20
20
  __exportStar(require("./get-upsell-offer.command"), exports);
21
21
  __exportStar(require("./update-promocode.command"), exports);
22
22
  __exportStar(require("./validate-promocode.command"), exports);
23
+ __exportStar(require("./get-webmaster-promocode.command"), exports);
@@ -22,3 +22,4 @@ __exportStar(require("./tts"), exports);
22
22
  __exportStar(require("./video"), exports);
23
23
  __exportStar(require("./writer"), exports);
24
24
  __exportStar(require("./image-editor"), exports);
25
+ __exportStar(require("./video-editor"), exports);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteAllVideoEditorJobsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var DeleteAllVideoEditorJobsCommand;
6
+ (function (DeleteAllVideoEditorJobsCommand) {
7
+ DeleteAllVideoEditorJobsCommand.RequestSchema = zod_1.z.object({});
8
+ DeleteAllVideoEditorJobsCommand.ResponseSchema = zod_1.z.object({
9
+ data: zod_1.z.boolean(),
10
+ });
11
+ })(DeleteAllVideoEditorJobsCommand || (exports.DeleteAllVideoEditorJobsCommand = DeleteAllVideoEditorJobsCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteVideoEditorJobByUUIDCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var DeleteVideoEditorJobByUUIDCommand;
7
+ (function (DeleteVideoEditorJobByUUIDCommand) {
8
+ DeleteVideoEditorJobByUUIDCommand.RequestParamsSchema = models_1.ToolJobSchema.pick({
9
+ uuid: true,
10
+ });
11
+ DeleteVideoEditorJobByUUIDCommand.ResponseSchema = zod_1.z.object({
12
+ data: zod_1.z.boolean(),
13
+ });
14
+ })(DeleteVideoEditorJobByUUIDCommand || (exports.DeleteVideoEditorJobByUUIDCommand = DeleteVideoEditorJobByUUIDCommand = {}));
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EditVideoCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var EditVideoCommand;
7
+ (function (EditVideoCommand) {
8
+ EditVideoCommand.RequestSchema = zod_1.z.object({
9
+ modelId: zod_1.z.string().uuid(),
10
+ prompt: zod_1.z.string(),
11
+ fileId: zod_1.z.string().uuid(),
12
+ });
13
+ EditVideoCommand.ResponseSchema = zod_1.z.object({
14
+ data: models_1.VideoEditorJobSchema,
15
+ });
16
+ })(EditVideoCommand || (exports.EditVideoCommand = EditVideoCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindVideoEditorJobByIdCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var FindVideoEditorJobByIdCommand;
7
+ (function (FindVideoEditorJobByIdCommand) {
8
+ FindVideoEditorJobByIdCommand.RequestParamsSchema = models_1.ToolJobSchema.pick({
9
+ uuid: true,
10
+ });
11
+ FindVideoEditorJobByIdCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.VideoEditorJobSchema,
13
+ });
14
+ })(FindVideoEditorJobByIdCommand || (exports.FindVideoEditorJobByIdCommand = FindVideoEditorJobByIdCommand = {}));
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindVideoEditorJobsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var FindVideoEditorJobsCommand;
7
+ (function (FindVideoEditorJobsCommand) {
8
+ FindVideoEditorJobsCommand.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
+ FindVideoEditorJobsCommand.ResponseSchema = zod_1.z.object({
14
+ data: zod_1.z.array(models_1.VideoEditorJobSchema),
15
+ totalPages: zod_1.z.number(),
16
+ page: zod_1.z.number(),
17
+ });
18
+ })(FindVideoEditorJobsCommand || (exports.FindVideoEditorJobsCommand = FindVideoEditorJobsCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetVideoEditorConfigCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var GetVideoEditorConfigCommand;
7
+ (function (GetVideoEditorConfigCommand) {
8
+ GetVideoEditorConfigCommand.RequestSchema = zod_1.z.object({});
9
+ GetVideoEditorConfigCommand.ResponseSchema = zod_1.z.object({
10
+ data: zod_1.z.object({
11
+ models: zod_1.z.array(models_1.VideoEditorModelSchema),
12
+ }),
13
+ });
14
+ })(GetVideoEditorConfigCommand || (exports.GetVideoEditorConfigCommand = GetVideoEditorConfigCommand = {}));
@@ -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-all-video-editor-jobs.command"), exports);
18
+ __exportStar(require("./delete-video-editor-job-by-uuid.command"), exports);
19
+ __exportStar(require("./edit-video.command"), exports);
20
+ __exportStar(require("./find-video-editor-job-by-id.command"), exports);
21
+ __exportStar(require("./find-video-editor-jobs.command"), exports);
22
+ __exportStar(require("./get-video-editor-config.command"), exports);
23
+ __exportStar(require("./retry-video-editor-job.command"), exports);
24
+ __exportStar(require("./set-reaction-to-video-editor-job.command"), exports);
25
+ __exportStar(require("./update-video-editor-job-title.command"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetryVideoEditorJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var RetryVideoEditorJobCommand;
7
+ (function (RetryVideoEditorJobCommand) {
8
+ RetryVideoEditorJobCommand.RequestParamsSchema = models_1.ToolJobSchema.pick({
9
+ uuid: true,
10
+ });
11
+ RetryVideoEditorJobCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.VideoEditorJobSchema,
13
+ });
14
+ })(RetryVideoEditorJobCommand || (exports.RetryVideoEditorJobCommand = RetryVideoEditorJobCommand = {}));
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetReactionToVideoEditorJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const constants_1 = require("../../../constants");
7
+ var SetReactionToVideoEditorJobCommand;
8
+ (function (SetReactionToVideoEditorJobCommand) {
9
+ SetReactionToVideoEditorJobCommand.RequestSchema = zod_1.z.object({
10
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
11
+ });
12
+ SetReactionToVideoEditorJobCommand.RequestParamsSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ });
15
+ SetReactionToVideoEditorJobCommand.ResponseSchema = zod_1.z.object({
16
+ data: models_1.VideoEditorJobSchema,
17
+ });
18
+ })(SetReactionToVideoEditorJobCommand || (exports.SetReactionToVideoEditorJobCommand = SetReactionToVideoEditorJobCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateVideoEditorJobTitleCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var UpdateVideoEditorJobTitleCommand;
7
+ (function (UpdateVideoEditorJobTitleCommand) {
8
+ UpdateVideoEditorJobTitleCommand.RequestSchema = zod_1.z.object({
9
+ title: zod_1.z.string(),
10
+ });
11
+ UpdateVideoEditorJobTitleCommand.RequestParamsSchema = zod_1.z.object({
12
+ uuid: zod_1.z.string().uuid(),
13
+ });
14
+ UpdateVideoEditorJobTitleCommand.ResponseSchema = zod_1.z.object({
15
+ data: models_1.VideoEditorJobSchema,
16
+ });
17
+ })(UpdateVideoEditorJobTitleCommand || (exports.UpdateVideoEditorJobTitleCommand = UpdateVideoEditorJobTitleCommand = {}));
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfirmWithdrawalCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var ConfirmWithdrawalCommand;
7
+ (function (ConfirmWithdrawalCommand) {
8
+ ConfirmWithdrawalCommand.RequestSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ ConfirmWithdrawalCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.WebmasterBalanceSchema,
13
+ });
14
+ })(ConfirmWithdrawalCommand || (exports.ConfirmWithdrawalCommand = ConfirmWithdrawalCommand = {}));
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateWebmasterCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var CreateWebmasterCommand;
7
+ (function (CreateWebmasterCommand) {
8
+ CreateWebmasterCommand.RequestSchema = models_1.WebmasterSchema.pick({
9
+ organization: true,
10
+ organizationType: true,
11
+ tin: true,
12
+ });
13
+ CreateWebmasterCommand.ResponseSchema = zod_1.z.object({
14
+ data: models_1.WebmasterSchema,
15
+ });
16
+ })(CreateWebmasterCommand || (exports.CreateWebmasterCommand = CreateWebmasterCommand = {}));
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateWithdrawalRequestCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var CreateWithdrawalRequestCommand;
6
+ (function (CreateWithdrawalRequestCommand) {
7
+ CreateWithdrawalRequestCommand.RequestSchema = zod_1.z.object({
8
+ amount: zod_1.z.number().positive(),
9
+ tgProfile: zod_1.z.string(),
10
+ });
11
+ CreateWithdrawalRequestCommand.ResponseSchema = zod_1.z.object({
12
+ data: zod_1.z.object({
13
+ isSuccess: zod_1.z.boolean(),
14
+ }),
15
+ });
16
+ })(CreateWithdrawalRequestCommand || (exports.CreateWithdrawalRequestCommand = CreateWithdrawalRequestCommand = {}));
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetMyWebmasterCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var GetMyWebmasterCommand;
7
+ (function (GetMyWebmasterCommand) {
8
+ GetMyWebmasterCommand.ResponseSchema = zod_1.z.object({
9
+ data: models_1.WebmasterWithBalanceSchema,
10
+ });
11
+ })(GetMyWebmasterCommand || (exports.GetMyWebmasterCommand = GetMyWebmasterCommand = {}));
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetWebmasterBalanceOverviewCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ var GetWebmasterBalanceOverviewCommand;
7
+ (function (GetWebmasterBalanceOverviewCommand) {
8
+ GetWebmasterBalanceOverviewCommand.RequestSchema = zod_1.z.object({
9
+ startDate: zod_1.z.string().refine((v) => !isNaN(Date.parse(v)), {
10
+ message: 'from must be a valid date string',
11
+ }),
12
+ endDate: zod_1.z.string().refine((v) => !isNaN(Date.parse(v)), {
13
+ message: 'to must be a valid date string',
14
+ }),
15
+ groupBy: zod_1.z.nativeEnum(constants_1.GROUP_BY).default(constants_1.GROUP_BY.DAY),
16
+ });
17
+ GetWebmasterBalanceOverviewCommand.WebmasterBalanceOverviewResponseSchema = zod_1.z.object({
18
+ startDate: zod_1.z.string(),
19
+ endDate: zod_1.z.string(),
20
+ total_deposited: zod_1.z.number(),
21
+ total_withdrawn: zod_1.z.number(),
22
+ });
23
+ GetWebmasterBalanceOverviewCommand.ResponseSchema = zod_1.z.object({
24
+ data: zod_1.z.array(GetWebmasterBalanceOverviewCommand.WebmasterBalanceOverviewResponseSchema),
25
+ });
26
+ })(GetWebmasterBalanceOverviewCommand || (exports.GetWebmasterBalanceOverviewCommand = GetWebmasterBalanceOverviewCommand = {}));
@@ -0,0 +1,22 @@
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("./create-webmaster.command"), exports);
18
+ __exportStar(require("./update-webmaster.command"), exports);
19
+ __exportStar(require("./get-my-webmaster.command"), exports);
20
+ __exportStar(require("./get-webmaster-balance-overview.command"), exports);
21
+ __exportStar(require("./create-withdrawal-request.command"), exports);
22
+ __exportStar(require("./confirm-withdrawal.command"), exports);
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateWebmasterCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var UpdateWebmasterCommand;
7
+ (function (UpdateWebmasterCommand) {
8
+ UpdateWebmasterCommand.RequestParamSchema = models_1.WebmasterSchema.pick({ uuid: true });
9
+ UpdateWebmasterCommand.RequestSchema = models_1.WebmasterSchema.partial();
10
+ UpdateWebmasterCommand.ResponseSchema = zod_1.z.object({
11
+ data: models_1.WebmasterSchema,
12
+ });
13
+ })(UpdateWebmasterCommand || (exports.UpdateWebmasterCommand = UpdateWebmasterCommand = {}));
@@ -2016,4 +2016,159 @@ exports.ERRORS = {
2016
2016
  message: 'Ошибка при получении всех тулов',
2017
2017
  httpCode: 500,
2018
2018
  },
2019
+ VIDEO_EDITOR_CONFIG_ERROR: {
2020
+ code: 'A414',
2021
+ message: 'Произошла ошибка при получении конфигурации инструмента для редактирования видео',
2022
+ httpCode: 500,
2023
+ },
2024
+ VIDEO_EDITOR_SEND_REQUEST_ERROR: {
2025
+ code: 'A415',
2026
+ message: 'Произошла ошибка при отправке запроса на редактирование видео',
2027
+ httpCode: 500,
2028
+ },
2029
+ VIDEO_EDITOR_FIND_JOBS_ERROR: {
2030
+ code: 'A416',
2031
+ message: 'Произошла ошибка при получении списка заданий на редактирование видео',
2032
+ httpCode: 500,
2033
+ },
2034
+ VIDEO_EDITOR_FIND_JOB_ERROR: {
2035
+ code: 'A417',
2036
+ message: 'Произошла ошибка при получении задания на редактирование видео',
2037
+ httpCode: 500,
2038
+ },
2039
+ VIDEO_EDITOR_RETRY_JOB_ERROR: {
2040
+ code: 'A418',
2041
+ message: 'Произошла ошибка при повторном запросе на редактирование видео',
2042
+ httpCode: 500,
2043
+ },
2044
+ VIDEO_EDITOR_SET_REACTION_ERROR: {
2045
+ code: 'A419',
2046
+ message: 'Произошла ошибка при установке оценки задания на редактирование видео',
2047
+ httpCode: 500,
2048
+ },
2049
+ VIDEO_EDITOR_UPDATE_TITLE_ERROR: {
2050
+ code: 'A420',
2051
+ message: 'Произошла ошибка при обновлении названия задания на редактирование видео',
2052
+ httpCode: 500,
2053
+ },
2054
+ VIDEO_EDITOR_DELETE_JOB_ERROR: {
2055
+ code: 'A421',
2056
+ message: 'Произошла ошибка при удалении задания на редактирование видео',
2057
+ httpCode: 500,
2058
+ },
2059
+ VIDEO_EDITOR_DELETE_ALL_JOBS_ERROR: {
2060
+ code: 'A422',
2061
+ message: 'Произошла ошибка при удалении всех заданий на редактирование видео',
2062
+ httpCode: 500,
2063
+ },
2064
+ VIDEO_EDITOR_MODEL_NOT_FOUND: {
2065
+ code: 'A423',
2066
+ message: 'Не удалось найти указанную модель для редактирования видео',
2067
+ httpCode: 400,
2068
+ },
2069
+ VIDEO_EDITOR_MODEL_INACTIVE: {
2070
+ code: 'A424',
2071
+ message: 'Модель для редактирования видео неактивна',
2072
+ httpCode: 400,
2073
+ },
2074
+ VIDEO_EDITOR_MODEL_NOT_AVAILABLE: {
2075
+ code: 'A425',
2076
+ message: 'Модель для редактирования видео недоступна для данного пользователя',
2077
+ httpCode: 403,
2078
+ },
2079
+ VIDEO_EDITOR_FILE_SIZE_EXCEEDED: {
2080
+ code: 'A426',
2081
+ message: 'Размер файла превышает допустимый лимит для выбранной модели',
2082
+ httpCode: 400,
2083
+ },
2084
+ VIDEO_EDITOR_UNSUPPORTED_FORMAT: {
2085
+ code: 'A427',
2086
+ message: 'Формат файла не поддерживается выбранной моделью',
2087
+ httpCode: 400,
2088
+ },
2089
+ FILE_ACCESS_DENIED: {
2090
+ code: 'A428',
2091
+ message: 'Доступ к файлу запрещен',
2092
+ httpCode: 403,
2093
+ },
2094
+ VIDEO_EDITOR_FILE_DURATION_EXCEEDED: {
2095
+ code: 'A429',
2096
+ message: 'Продолжительность файла превышает допустимый лимит для выбранной модели',
2097
+ httpCode: 400,
2098
+ },
2099
+ WEBMASTER_CREATE_ERROR: {
2100
+ code: 'A430',
2101
+ message: 'Ошибка при создании вебмастера',
2102
+ httpCode: 500,
2103
+ },
2104
+ WEBMASTER_FIND_ERROR: {
2105
+ code: 'A431',
2106
+ message: 'Ошибка при получении вебмастера',
2107
+ httpCode: 500,
2108
+ },
2109
+ WEBMASTER_UPDATE_ERROR: {
2110
+ code: 'A432',
2111
+ message: 'Ошибка при обновлении вебмастера',
2112
+ httpCode: 500,
2113
+ },
2114
+ WEBMASTER_ALIAS_CONFLICT_ERROR: {
2115
+ code: 'A433',
2116
+ message: 'Выбранный alias уже занят',
2117
+ httpCode: 409,
2118
+ },
2119
+ WEBMASTER_NOT_FOUND_ERROR: {
2120
+ code: 'A434',
2121
+ message: 'Запрашиваемый вебмастер не найден',
2122
+ httpCode: 404,
2123
+ },
2124
+ WEBMASTER_OWNERSHIP_ERROR: {
2125
+ code: 'A435',
2126
+ message: 'Кабинет вебмастер не принадлежит юзеру, сделавшему запрос',
2127
+ httpCode: 401,
2128
+ },
2129
+ WEBMASTER_BALANCE_CREATE_ERROR: {
2130
+ code: 'A436',
2131
+ message: 'Ошибка при создании записи баланса вебмастера',
2132
+ httpCode: 500,
2133
+ },
2134
+ WEBMASTER_BALANCE_GET_ERROR: {
2135
+ code: 'A437',
2136
+ message: 'Ошибка при получении баланса вебмастера',
2137
+ httpCode: 500,
2138
+ },
2139
+ WEBMASTER_BALANCE_GET_OVERVIEW_ERROR: {
2140
+ code: 'A438',
2141
+ message: 'Не удалось получить историю баланса вебмастера',
2142
+ httpCode: 500,
2143
+ },
2144
+ WEBMASTER_INSUFFICIENT_BALANCE_ERROR: {
2145
+ code: 'A439',
2146
+ message: 'На балансе недостатчно средств для вывода',
2147
+ httpCode: 400,
2148
+ },
2149
+ WEBMASTER_SEND_WITHDRAWAL_REQUEST_ERROR: {
2150
+ code: 'A440',
2151
+ message: 'Произошла ошибка при отправке запроса на вывод средств в Telegram для вебмастера',
2152
+ httpCode: 500,
2153
+ },
2154
+ WEBMASTER_BALANCE_UPDATE_ERROR: {
2155
+ code: 'A441',
2156
+ message: 'Ошибка при обновлении записи баланса вебмастера',
2157
+ httpCode: 500,
2158
+ },
2159
+ WEBMASTER_PROMOCODE_CONFLICT_ERROR: {
2160
+ code: 'A442',
2161
+ message: 'Вебмастер не может создать промокод для самого себя',
2162
+ httpCode: 409,
2163
+ },
2164
+ WEBMASTER_CREATE_WITHDRAWAL_REQUEST_ERROR: {
2165
+ code: 'A443',
2166
+ message: 'Произошла ошибка при создании запроса на вывод средств для вебмастера',
2167
+ httpCode: 500,
2168
+ },
2169
+ TELEGRAM_SEND_TO_CHANNEL_ERROR: {
2170
+ code: 'A444',
2171
+ message: 'Произошла ошибка при отправке сообщения в телеграм канал',
2172
+ httpCode: 500,
2173
+ },
2019
2174
  };
@@ -7,5 +7,6 @@ var FILE_TYPE;
7
7
  FILE_TYPE["AUDIO"] = "audio";
8
8
  FILE_TYPE["TEXT"] = "text";
9
9
  FILE_TYPE["DOCUMENT"] = "document";
10
+ FILE_TYPE["VIDEO"] = "video";
10
11
  FILE_TYPE["OTHER"] = "other";
11
12
  })(FILE_TYPE || (exports.FILE_TYPE = FILE_TYPE = {}));