@purpleschool/gptbot 0.7.58-presentations → 0.7.59-presentations

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 (234) hide show
  1. package/api/controllers/http/cabinet.ts +3 -2
  2. package/api/controllers/http/index.ts +3 -0
  3. package/api/controllers/http/music.ts +16 -0
  4. package/api/controllers/http/tool.ts +1 -0
  5. package/api/controllers/http/video-editor.ts +14 -0
  6. package/api/controllers/http/webmaster.ts +10 -0
  7. package/api/controllers/http/writer.ts +1 -0
  8. package/api/routes.ts +8 -1
  9. package/build/api/controllers/http/cabinet.js +3 -2
  10. package/build/api/controllers/http/index.js +3 -0
  11. package/build/api/controllers/http/music.js +18 -0
  12. package/build/api/controllers/http/tool.js +1 -0
  13. package/build/api/controllers/http/video-editor.js +16 -0
  14. package/build/api/controllers/http/webmaster.js +12 -0
  15. package/build/api/controllers/http/writer.js +1 -0
  16. package/build/api/routes.js +7 -1
  17. package/build/commands/auth/register-user.command.js +2 -4
  18. package/build/commands/auth/vk-login.command.js +5 -2
  19. package/build/commands/auth/yandex-login.command.js +5 -2
  20. package/build/commands/cabinet/get-user-statistics-by-month.command.js +25 -0
  21. package/build/commands/cabinet/get-user-statistics-overview.command.js +26 -0
  22. package/build/commands/cabinet/index.js +2 -1
  23. package/build/commands/chat/check-limit.command.js +1 -0
  24. package/build/commands/index.js +1 -0
  25. package/build/commands/message/create-suggestions.command.js +1 -1
  26. package/build/commands/product/buy-product.command.js +4 -0
  27. package/build/commands/subscription/buy-subscription.command.js +4 -0
  28. package/build/commands/telegram-auth/create-telegram-auth-link.command.js +2 -0
  29. package/build/commands/telegram-profile/auth-with-telegram-web-app.command.js +4 -0
  30. package/build/commands/telegram-profile/bot-was-blocked-by-user.command.js +11 -0
  31. package/build/commands/telegram-profile/index.js +2 -0
  32. package/build/commands/telegram-profile/user-joined-telegram.command.js +11 -0
  33. package/build/commands/tools/index.js +2 -0
  34. package/build/commands/tools/music/convert-to-wav.command.js +16 -0
  35. package/build/commands/tools/music/delete-all-music-jobs.command.js +8 -0
  36. package/build/commands/tools/music/delete-music-job-by-uuid.command.js +11 -0
  37. package/build/commands/tools/music/find-music-job-by-uuid.command.js +14 -0
  38. package/build/commands/tools/music/find-music-jobs.command.js +18 -0
  39. package/build/commands/tools/music/generate-lyrics.command.js +16 -0
  40. package/build/commands/tools/music/generate-music.command.js +15 -0
  41. package/build/commands/tools/music/get-music-tool-config.command.js +11 -0
  42. package/build/commands/tools/music/index.js +27 -0
  43. package/build/commands/tools/music/retry-music-job.command.js +14 -0
  44. package/build/commands/tools/music/set-reaction-to-music-job.command.js +18 -0
  45. package/build/commands/tools/music/update-music-job-title.command.js +17 -0
  46. package/build/commands/tools/tool/find-formatted-tools.command.js +11 -0
  47. package/build/commands/tools/tool/index.js +1 -0
  48. package/build/commands/tools/video-editor/delete-all-video-editor-jobs.command.js +11 -0
  49. package/build/commands/tools/video-editor/delete-video-editor-job-by-uuid.command.js +14 -0
  50. package/build/commands/tools/video-editor/edit-video.command.js +16 -0
  51. package/build/commands/tools/video-editor/find-video-editor-job-by-id.command.js +14 -0
  52. package/build/commands/tools/video-editor/find-video-editor-jobs.command.js +18 -0
  53. package/build/commands/tools/video-editor/get-video-editor-config.command.js +14 -0
  54. package/build/commands/tools/video-editor/index.js +25 -0
  55. package/build/commands/tools/video-editor/retry-video-editor-job.command.js +14 -0
  56. package/build/commands/tools/video-editor/set-reaction-to-video-editor-job.command.js +18 -0
  57. package/build/commands/tools/video-editor/update-video-editor-job-title.command.js +17 -0
  58. package/build/commands/tools/writer/generate-writer-document-contents.command.js +3 -0
  59. package/build/commands/tools/writer/index.js +1 -0
  60. package/build/commands/tools/writer/set-reaction.writer-document.command.js +18 -0
  61. package/build/commands/user/get-aggregated-user-data.command.js +1 -1
  62. package/build/commands/user/get-me.command.js +1 -0
  63. package/build/commands/webmaster/confirm-withdrawal.command.js +14 -0
  64. package/build/commands/webmaster/create-webmaster.command.js +16 -0
  65. package/build/commands/webmaster/create-withdrawal-request.command.js +16 -0
  66. package/build/commands/webmaster/get-my-webmaster.command.js +11 -0
  67. package/build/commands/webmaster/get-webmaster-balance-overview.command.js +26 -0
  68. package/build/commands/webmaster/index.js +22 -0
  69. package/build/commands/webmaster/update-webmaster.command.js +13 -0
  70. package/build/constants/ai-model/enums/ai-model-config-selector-type.enum.js +1 -0
  71. package/build/constants/cabinet/enums/group-by.enum.js +9 -0
  72. package/build/constants/cabinet/enums/index.js +17 -0
  73. package/build/constants/cabinet/index.js +17 -0
  74. package/build/constants/errors/errors.js +280 -2
  75. package/build/constants/file/enums/file-type.enum.js +1 -0
  76. package/build/constants/file/file.constants.js +4 -1
  77. package/build/constants/index.js +5 -0
  78. package/build/constants/subscription/enums/subscription-feature-type.enum.js +3 -0
  79. package/build/constants/tool-music/enums/index.js +21 -0
  80. package/build/constants/tool-music/enums/music-pricing-rule-type.enum.js +7 -0
  81. package/build/constants/tool-music/enums/music-strategy.enum.js +7 -0
  82. package/build/constants/tool-music/enums/music-vocal-gender.enum.js +8 -0
  83. package/build/constants/tool-music/enums/suno-mode-type.enum.js +10 -0
  84. package/build/constants/tool-music/enums/suno-model-type.enum.js +10 -0
  85. package/build/constants/tool-music/index.js +17 -0
  86. package/build/constants/tool-video-editor/enums/index.js +17 -0
  87. package/build/constants/tool-video-editor/enums/video-editor-model-strategy.enum.js +7 -0
  88. package/build/constants/tool-video-editor/index.js +17 -0
  89. package/build/constants/transaction/enums/user-balance-status.enum.js +1 -0
  90. package/build/constants/webmaster/enums/index.js +17 -0
  91. package/build/constants/webmaster/enums/organization-type.enum.js +9 -0
  92. package/build/constants/webmaster/index.js +17 -0
  93. package/build/constants/webmaster-balance/enums/index.js +18 -0
  94. package/build/constants/webmaster-balance/enums/webmaster-balance-status.enum.js +10 -0
  95. package/build/constants/webmaster-balance/enums/webmaster-balance-type.enum.js +8 -0
  96. package/build/constants/webmaster-balance/index.js +17 -0
  97. package/build/constants/writer/enums/index.js +1 -0
  98. package/build/constants/writer/enums/tool-model-status.enum.js +8 -0
  99. package/build/helpers/index.js +1 -0
  100. package/build/helpers/video-editor/calculate-video-editing-price.helper.js +6 -0
  101. package/build/helpers/video-editor/index.js +17 -0
  102. package/build/helpers/writer/calculate-writer-content-generation-price.util.js +2 -2
  103. package/build/models/index.js +3 -0
  104. package/build/models/page.schema.js +2 -0
  105. package/build/models/subscription-feature.schema.js +26 -1
  106. package/build/models/subscription.schema.js +1 -0
  107. package/build/models/tool.schema.js +8 -1
  108. package/build/models/tools/index.js +2 -0
  109. package/build/models/tools/music/index.js +20 -0
  110. package/build/models/tools/music/music-config.schema.js +8 -0
  111. package/build/models/tools/music/music-job.schema.js +40 -0
  112. package/build/models/tools/music/music-model.schema.js +32 -0
  113. package/build/models/tools/music/music-track.schema.js +17 -0
  114. package/build/models/tools/video-editor/index.js +19 -0
  115. package/build/models/tools/video-editor/video-editor-config.schema.js +8 -0
  116. package/build/models/tools/video-editor/video-editor-job.schema.js +14 -0
  117. package/build/models/tools/video-editor/video-editor-model.schema.js +25 -0
  118. package/build/models/tools/writer/writer-config.schema.js +2 -0
  119. package/build/models/tools/writer/writer-document.schema.js +2 -0
  120. package/build/models/tools/writer/writer-model.schema.js +21 -0
  121. package/build/models/user-referrals.schema.js +15 -0
  122. package/build/models/user-to-subscription.schema.js +2 -0
  123. package/build/models/webmaster-balance.schema.js +19 -0
  124. package/build/models/webmaster.schema.js +21 -0
  125. package/commands/auth/register-user.command.ts +3 -5
  126. package/commands/auth/vk-login.command.ts +9 -6
  127. package/commands/auth/yandex-login.command.ts +7 -4
  128. package/commands/cabinet/get-user-statistics-by-month.command.ts +25 -0
  129. package/commands/cabinet/{get-user-statistics.command.ts → get-user-statistics-overview.command.ts} +5 -12
  130. package/commands/cabinet/index.ts +2 -1
  131. package/commands/chat/check-limit.command.ts +1 -0
  132. package/commands/index.ts +1 -0
  133. package/commands/message/create-suggestions.command.ts +1 -1
  134. package/commands/product/buy-product.command.ts +4 -0
  135. package/commands/subscription/buy-subscription.command.ts +4 -0
  136. package/commands/telegram-auth/create-telegram-auth-link.command.ts +5 -0
  137. package/commands/telegram-profile/auth-with-telegram-web-app.command.ts +4 -0
  138. package/commands/telegram-profile/bot-was-blocked-by-user.command.ts +13 -0
  139. package/commands/telegram-profile/index.ts +2 -0
  140. package/commands/telegram-profile/user-joined-telegram.command.ts +13 -0
  141. package/commands/tools/index.ts +2 -0
  142. package/commands/tools/music/convert-to-wav.command.ts +17 -0
  143. package/commands/tools/music/delete-all-music-jobs.command.ts +6 -0
  144. package/commands/tools/music/delete-music-job-by-uuid.command.ts +11 -0
  145. package/commands/tools/music/find-music-job-by-uuid.command.ts +16 -0
  146. package/commands/tools/music/find-music-jobs.command.ts +18 -0
  147. package/commands/tools/music/generate-lyrics.command.ts +17 -0
  148. package/commands/tools/music/generate-music.command.ts +16 -0
  149. package/commands/tools/music/get-music-tool-config.command.ts +10 -0
  150. package/commands/tools/music/index.ts +11 -0
  151. package/commands/tools/music/retry-music-job.command.ts +14 -0
  152. package/commands/tools/music/set-reaction-to-music-job.command.ts +20 -0
  153. package/commands/tools/music/update-music-job-title.command.ts +19 -0
  154. package/commands/tools/tool/find-formatted-tools.command.ts +11 -0
  155. package/commands/tools/tool/index.ts +1 -0
  156. package/commands/tools/video-editor/delete-all-video-editor-jobs.command.ts +13 -0
  157. package/commands/tools/video-editor/delete-video-editor-job-by-uuid.command.ts +16 -0
  158. package/commands/tools/video-editor/edit-video.command.ts +18 -0
  159. package/commands/tools/video-editor/find-video-editor-job-by-id.command.ts +16 -0
  160. package/commands/tools/video-editor/find-video-editor-jobs.command.ts +18 -0
  161. package/commands/tools/video-editor/get-video-editor-config.command.ts +16 -0
  162. package/commands/tools/video-editor/index.ts +9 -0
  163. package/commands/tools/video-editor/retry-video-editor-job.command.ts +16 -0
  164. package/commands/tools/video-editor/set-reaction-to-video-editor-job.command.ts +21 -0
  165. package/commands/tools/video-editor/update-video-editor-job-title.command.ts +20 -0
  166. package/commands/tools/writer/generate-writer-document-contents.command.ts +5 -0
  167. package/commands/tools/writer/index.ts +1 -0
  168. package/commands/tools/writer/set-reaction.writer-document.command.ts +21 -0
  169. package/commands/user/get-aggregated-user-data.command.ts +1 -1
  170. package/commands/user/get-me.command.ts +1 -0
  171. package/commands/webmaster/confirm-withdrawal.command.ts +16 -0
  172. package/commands/webmaster/create-webmaster.command.ts +18 -0
  173. package/commands/webmaster/create-withdrawal-request.command.ts +18 -0
  174. package/commands/webmaster/get-my-webmaster.command.ts +12 -0
  175. package/commands/webmaster/get-webmaster-balance-overview.command.ts +29 -0
  176. package/commands/webmaster/index.ts +6 -0
  177. package/commands/webmaster/update-webmaster.command.ts +18 -0
  178. package/constants/ai-model/enums/ai-model-config-selector-type.enum.ts +1 -0
  179. package/constants/cabinet/enums/group-by.enum.ts +5 -0
  180. package/constants/cabinet/enums/index.ts +1 -0
  181. package/constants/cabinet/index.ts +1 -0
  182. package/constants/errors/errors.ts +280 -2
  183. package/constants/file/enums/file-type.enum.ts +1 -0
  184. package/constants/file/file.constants.ts +4 -0
  185. package/constants/index.ts +5 -0
  186. package/constants/subscription/enums/subscription-feature-type.enum.ts +3 -0
  187. package/constants/tool-music/enums/index.ts +5 -0
  188. package/constants/tool-music/enums/music-pricing-rule-type.enum.ts +3 -0
  189. package/constants/tool-music/enums/music-strategy.enum.ts +3 -0
  190. package/constants/tool-music/enums/music-vocal-gender.enum.ts +4 -0
  191. package/constants/tool-music/enums/suno-mode-type.enum.ts +6 -0
  192. package/constants/tool-music/enums/suno-model-type.enum.ts +6 -0
  193. package/constants/tool-music/index.ts +1 -0
  194. package/constants/tool-video-editor/enums/index.ts +1 -0
  195. package/constants/tool-video-editor/enums/video-editor-model-strategy.enum.ts +3 -0
  196. package/constants/tool-video-editor/index.ts +1 -0
  197. package/constants/transaction/enums/user-balance-status.enum.ts +1 -0
  198. package/constants/webmaster/enums/index.ts +1 -0
  199. package/constants/webmaster/enums/organization-type.enum.ts +5 -0
  200. package/constants/webmaster/index.ts +1 -0
  201. package/constants/webmaster-balance/enums/index.ts +2 -0
  202. package/constants/webmaster-balance/enums/webmaster-balance-status.enum.ts +6 -0
  203. package/constants/webmaster-balance/enums/webmaster-balance-type.enum.ts +4 -0
  204. package/constants/webmaster-balance/index.ts +1 -0
  205. package/constants/writer/enums/index.ts +1 -0
  206. package/constants/writer/enums/tool-model-status.enum.ts +4 -0
  207. package/helpers/index.ts +1 -0
  208. package/helpers/video-editor/calculate-video-editing-price.helper.ts +9 -0
  209. package/helpers/video-editor/index.ts +1 -0
  210. package/helpers/writer/calculate-writer-content-generation-price.util.ts +4 -2
  211. package/models/index.ts +3 -0
  212. package/models/page.schema.ts +2 -0
  213. package/models/subscription-feature.schema.ts +30 -0
  214. package/models/subscription.schema.ts +1 -0
  215. package/models/tool.schema.ts +13 -0
  216. package/models/tools/index.ts +2 -0
  217. package/models/tools/music/index.ts +4 -0
  218. package/models/tools/music/music-config.schema.ts +6 -0
  219. package/models/tools/music/music-job.schema.ts +43 -0
  220. package/models/tools/music/music-model.schema.ts +33 -0
  221. package/models/tools/music/music-track.schema.ts +19 -0
  222. package/models/tools/video-editor/index.ts +3 -0
  223. package/models/tools/video-editor/video-editor-config.schema.ts +6 -0
  224. package/models/tools/video-editor/video-editor-job.schema.ts +14 -0
  225. package/models/tools/video-editor/video-editor-model.schema.ts +24 -0
  226. package/models/tools/writer/writer-config.schema.ts +2 -0
  227. package/models/tools/writer/writer-document.schema.ts +3 -1
  228. package/models/tools/writer/writer-model.schema.ts +21 -0
  229. package/models/user-referrals.schema.ts +10 -0
  230. package/models/user-to-subscription.schema.ts +2 -0
  231. package/models/webmaster-balance.schema.ts +15 -0
  232. package/models/webmaster.schema.ts +18 -0
  233. package/package.json +1 -1
  234. package/build/commands/cabinet/get-user-statistics.command.js +0 -30
@@ -6,6 +6,10 @@ export namespace AuthWithTelegramWebAppCommand {
6
6
  initData: z.string(),
7
7
  platform: z.string().nullable(),
8
8
  partnerId: z.string().optional(),
9
+ webmasterAlias: z.string().optional(),
10
+ webmasterReferralProvidedAt: z
11
+ .preprocess((val) => (typeof val === 'string' ? new Date(val) : val), z.date())
12
+ .optional(),
9
13
  utm: UtmSchema.optional(),
10
14
  });
11
15
 
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace BotWasBlockedByUserCommand {
4
+ export const RequestBodySchema = z.object({
5
+ telegramId: z.number(),
6
+ });
7
+
8
+ export type RequestBody = z.infer<typeof RequestBodySchema>;
9
+
10
+ export const ResponseSchema = z.void();
11
+
12
+ export type Response = z.infer<typeof ResponseSchema>;
13
+ }
@@ -1,3 +1,5 @@
1
1
  export * from './auth-with-telegram-web-app.command';
2
2
  export * from './check-telegram-profile-exists.command';
3
3
  export * from './create-telegram-profile-connection-link.command';
4
+ export * from './bot-was-blocked-by-user.command';
5
+ export * from './user-joined-telegram.command';
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace UserJoinedTelegramCommand {
4
+ export const RequestBodySchema = z.object({
5
+ telegramId: z.number(),
6
+ });
7
+
8
+ export type RequestBody = z.infer<typeof RequestBodySchema>;
9
+
10
+ export const ResponseSchema = z.void();
11
+
12
+ export type Response = z.infer<typeof ResponseSchema>;
13
+ }
@@ -6,3 +6,5 @@ export * from './tts';
6
6
  export * from './video';
7
7
  export * from './writer';
8
8
  export * from './image-editor';
9
+ export * from './video-editor';
10
+ export * from './music';
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export namespace ConvertToWavCommand {
3
+ export const RequestSchema = z.object({
4
+ taskId: z.string(),
5
+ audioId: z.string(),
6
+ });
7
+
8
+ export type Request = z.infer<typeof RequestSchema>;
9
+
10
+ export const ResponseSchema = z.object({
11
+ data: z.object({
12
+ url: z.string().url(),
13
+ }),
14
+ });
15
+
16
+ export type Response = z.infer<typeof ResponseSchema>;
17
+ }
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DeleteAllMusicJobsCommand {
4
+ export const ResponseSchema = z.void();
5
+ export type Response = z.infer<typeof ResponseSchema>;
6
+ }
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DeleteMusicJobByUUIDCommand {
4
+ export const RequestParamsSchema = z.object({
5
+ uuid: z.string().uuid(),
6
+ });
7
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
8
+
9
+ export const ResponseSchema = z.void();
10
+ export type Response = z.infer<typeof ResponseSchema>;
11
+ }
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { MusicJobSchema, ToolJobSchema } from '../../../models';
3
+
4
+ export namespace FindMusicJobByUUIDCommand {
5
+ export const RequestParamsSchema = ToolJobSchema.pick({
6
+ uuid: true,
7
+ });
8
+
9
+ export type Request = z.infer<typeof RequestParamsSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: MusicJobSchema,
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { MusicJobSchema } from '../../../models';
3
+
4
+ export namespace FindMusicJobsCommand {
5
+ export const RequestQuerySchema = z.object({
6
+ limit: z.coerce.number().min(1).optional(),
7
+ offset: z.coerce.number().min(0).default(0).optional(),
8
+ title: z.string().optional(),
9
+ });
10
+ export type RequestQuery = z.infer<typeof RequestQuerySchema>;
11
+
12
+ export const ResponseSchema = z.object({
13
+ data: z.array(MusicJobSchema),
14
+ totalPages: z.number(),
15
+ page: z.number(),
16
+ });
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export namespace GenerateLyricsCommand {
3
+ export const RequestSchema = z.object({
4
+ prompt: z.string(),
5
+ });
6
+
7
+ export type Request = z.infer<typeof RequestSchema>;
8
+
9
+ export const ResponseSchema = z.object({
10
+ data: z.object({
11
+ title: z.string(),
12
+ lyrics: z.string(),
13
+ }),
14
+ });
15
+
16
+ export type Response = z.infer<typeof ResponseSchema>;
17
+ }
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { ToolJobSchema, MusicJobParamsSchema } from '../../../models';
3
+ export namespace MusicCommand {
4
+ export const RequestSchema = z.object({
5
+ modelId: z.string().uuid(),
6
+ params: MusicJobParamsSchema,
7
+ });
8
+
9
+ export type Request = z.infer<typeof RequestSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: ToolJobSchema,
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { MusicConfigSchema } from '../../../models';
3
+
4
+ export namespace GetMusicToolConfigCommand {
5
+ export const ResponseSchema = z.object({
6
+ data: MusicConfigSchema,
7
+ });
8
+
9
+ export type Response = z.infer<typeof ResponseSchema>;
10
+ }
@@ -0,0 +1,11 @@
1
+ export * from './delete-all-music-jobs.command';
2
+ export * from './delete-music-job-by-uuid.command';
3
+ export * from './find-music-job-by-uuid.command';
4
+ export * from './find-music-jobs.command';
5
+ export * from './get-music-tool-config.command';
6
+ export * from './retry-music-job.command';
7
+ export * from './set-reaction-to-music-job.command';
8
+ export * from './generate-music.command';
9
+ export * from './update-music-job-title.command';
10
+ export * from './convert-to-wav.command';
11
+ export * from './generate-lyrics.command';
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { MusicJobSchema } from '../../../models';
3
+
4
+ export namespace RetryMusicJobCommand {
5
+ export const RequestParamsSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ });
8
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
9
+
10
+ export const ResponseSchema = z.object({
11
+ data: MusicJobSchema,
12
+ });
13
+ export type Response = z.infer<typeof ResponseSchema>;
14
+ }
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { MusicJobSchema } from '../../../models';
3
+ import { USER_REACTION } from '../../../constants';
4
+
5
+ export namespace SetReactionToMusicJobCommand {
6
+ export const RequestSchema = z.object({
7
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
8
+ });
9
+ export type Request = z.infer<typeof RequestSchema>;
10
+
11
+ export const RequestParamsSchema = z.object({
12
+ uuid: z.string().uuid(),
13
+ });
14
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
15
+
16
+ export const ResponseSchema = z.object({
17
+ data: MusicJobSchema,
18
+ });
19
+ export type Response = z.infer<typeof ResponseSchema>;
20
+ }
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { MusicJobSchema } from '../../../models';
3
+
4
+ export namespace UpdateMusicJobTitleCommand {
5
+ export const RequestSchema = z.object({
6
+ title: z.string().min(1).max(40).trim(),
7
+ });
8
+ export type Request = z.infer<typeof RequestSchema>;
9
+
10
+ export const RequestParamsSchema = z.object({
11
+ uuid: z.string().uuid(),
12
+ });
13
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
14
+
15
+ export const ResponseSchema = z.object({
16
+ data: MusicJobSchema,
17
+ });
18
+ export type Response = z.infer<typeof ResponseSchema>;
19
+ }
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { ToolFormattedSchema } from '../../../models';
3
+
4
+ export namespace FindFormattedToolsCommand {
5
+ export type Request = void;
6
+
7
+ export const ResponseSchema = z.object({
8
+ data: z.array(ToolFormattedSchema),
9
+ });
10
+ export type Response = z.infer<typeof ResponseSchema>;
11
+ }
@@ -1 +1,2 @@
1
1
  export * from './find-all-tools.command';
2
+ export * from './find-formatted-tools.command';
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DeleteAllVideoEditorJobsCommand {
4
+ export const RequestSchema = z.object({});
5
+
6
+ export type Request = z.infer<typeof RequestSchema>;
7
+
8
+ export const ResponseSchema = z.object({
9
+ data: z.boolean(),
10
+ });
11
+
12
+ export type Response = z.infer<typeof ResponseSchema>;
13
+ }
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { ToolJobSchema } from '../../../models';
3
+
4
+ export namespace DeleteVideoEditorJobByUUIDCommand {
5
+ export const RequestParamsSchema = ToolJobSchema.pick({
6
+ uuid: true,
7
+ });
8
+
9
+ export type Request = z.infer<typeof RequestParamsSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: z.boolean(),
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { VideoEditorJobSchema } from '../../../models';
3
+
4
+ export namespace EditVideoCommand {
5
+ export const RequestSchema = z.object({
6
+ modelId: z.string().uuid(),
7
+ prompt: z.string(),
8
+ fileId: z.string().uuid(),
9
+ });
10
+
11
+ export type Request = z.infer<typeof RequestSchema>;
12
+
13
+ export const ResponseSchema = z.object({
14
+ data: VideoEditorJobSchema,
15
+ });
16
+
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { VideoEditorJobSchema, ToolJobSchema } from '../../../models';
3
+
4
+ export namespace FindVideoEditorJobByIdCommand {
5
+ export const RequestParamsSchema = ToolJobSchema.pick({
6
+ uuid: true,
7
+ });
8
+
9
+ export type Request = z.infer<typeof RequestParamsSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: VideoEditorJobSchema,
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { VideoEditorJobSchema } from '../../../models';
3
+
4
+ export namespace FindVideoEditorJobsCommand {
5
+ export const RequestQuerySchema = z.object({
6
+ limit: z.coerce.number().min(1).optional(),
7
+ offset: z.coerce.number().min(0).default(0).optional(),
8
+ title: z.string().optional(),
9
+ });
10
+ export type RequestQuery = z.infer<typeof RequestQuerySchema>;
11
+
12
+ export const ResponseSchema = z.object({
13
+ data: z.array(VideoEditorJobSchema),
14
+ totalPages: z.number(),
15
+ page: z.number(),
16
+ });
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { VideoEditorModelSchema } from '../../../models';
3
+
4
+ export namespace GetVideoEditorConfigCommand {
5
+ export const RequestSchema = z.object({});
6
+
7
+ export type Request = z.infer<typeof RequestSchema>;
8
+
9
+ export const ResponseSchema = z.object({
10
+ data: z.object({
11
+ models: z.array(VideoEditorModelSchema),
12
+ }),
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -0,0 +1,9 @@
1
+ export * from './delete-all-video-editor-jobs.command';
2
+ export * from './delete-video-editor-job-by-uuid.command';
3
+ export * from './edit-video.command';
4
+ export * from './find-video-editor-job-by-id.command';
5
+ export * from './find-video-editor-jobs.command';
6
+ export * from './get-video-editor-config.command';
7
+ export * from './retry-video-editor-job.command';
8
+ export * from './set-reaction-to-video-editor-job.command';
9
+ export * from './update-video-editor-job-title.command';
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { VideoEditorJobSchema, ToolJobSchema } from '../../../models';
3
+
4
+ export namespace RetryVideoEditorJobCommand {
5
+ export const RequestParamsSchema = ToolJobSchema.pick({
6
+ uuid: true,
7
+ });
8
+
9
+ export type Request = z.infer<typeof RequestParamsSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: VideoEditorJobSchema,
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { VideoEditorJobSchema } from '../../../models';
3
+ import { USER_REACTION } from '../../../constants';
4
+
5
+ export namespace SetReactionToVideoEditorJobCommand {
6
+ export const RequestSchema = z.object({
7
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
8
+ });
9
+ export type Request = z.infer<typeof RequestSchema>;
10
+
11
+ export const RequestParamsSchema = z.object({
12
+ uuid: z.string().uuid(),
13
+ });
14
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
15
+
16
+ export const ResponseSchema = z.object({
17
+ data: VideoEditorJobSchema,
18
+ });
19
+
20
+ export type Response = z.infer<typeof ResponseSchema>;
21
+ }
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { VideoEditorJobSchema } from '../../../models';
3
+
4
+ export namespace UpdateVideoEditorJobTitleCommand {
5
+ export const RequestSchema = z.object({
6
+ title: z.string(),
7
+ });
8
+ export type Request = z.infer<typeof RequestSchema>;
9
+
10
+ export const RequestParamsSchema = z.object({
11
+ uuid: z.string().uuid(),
12
+ });
13
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
14
+
15
+ export const ResponseSchema = z.object({
16
+ data: VideoEditorJobSchema,
17
+ });
18
+
19
+ export type Response = z.infer<typeof ResponseSchema>;
20
+ }
@@ -7,6 +7,11 @@ export namespace GenerateWriterDocumentContentsCommand {
7
7
  });
8
8
  export type RequestParams = z.infer<typeof RequestParamsSchema>;
9
9
 
10
+ export const RequestBodySchema = z.object({
11
+ modelId: z.string().uuid(),
12
+ });
13
+ export type RequestBody = z.infer<typeof RequestBodySchema>;
14
+
10
15
  export const ResponseSchema = z.object({
11
16
  data: WriterDocumentSchema,
12
17
  });
@@ -13,3 +13,4 @@ export * from './writer-shorten-text.command';
13
13
  export * from './writer-fix-errors.command';
14
14
  export * from './writer-generate-text.command';
15
15
  export * from './export-writer-document-as-docx.command';
16
+ export * from './set-reaction.writer-document.command';
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { USER_REACTION } from '../../../constants';
3
+ import { WriterDocumentSchema } from '../../../models';
4
+
5
+ export namespace SetReactionWriterDocumentCommand {
6
+ export const RequestParamsSchema = z.object({
7
+ uuid: z.string().uuid(),
8
+ });
9
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
10
+
11
+ export const RequestBodySchema = z.object({
12
+ reaction: z.nativeEnum(USER_REACTION),
13
+ });
14
+ export type RequestBody = z.infer<typeof RequestBodySchema>;
15
+
16
+ export const ResponseSchema = z.object({
17
+ data: WriterDocumentSchema,
18
+ });
19
+
20
+ export type Response = z.infer<typeof ResponseSchema>;
21
+ }
@@ -8,7 +8,7 @@ export namespace GetAggregatedUserData {
8
8
  export type Request = z.infer<typeof RequestSchema>;
9
9
 
10
10
  export const AggregatedUserSchema = z.object({
11
- uuid: z.string().uuid(),
11
+ userId: z.string().uuid(),
12
12
  email: z.string().email().nullable(),
13
13
  telegramId: z.number().nullable(),
14
14
  lastActivityAt: z.string().datetime(),
@@ -14,6 +14,7 @@ export namespace GetMeCommand {
14
14
  role: z.nativeEnum(ROLE),
15
15
  signupMethod: z.nativeEnum(SIGNUP_METHOD),
16
16
  telegramId: z.number().nullable(),
17
+ webmasterId: z.string().uuid().nullable(),
17
18
  }),
18
19
  });
19
20
 
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { WebmasterBalanceSchema } from '../../models';
3
+
4
+ export namespace ConfirmWithdrawalCommand {
5
+ export const RequestSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ });
8
+
9
+ export type Request = z.infer<typeof RequestSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: WebmasterBalanceSchema,
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { WebmasterSchema } from '../../models';
3
+
4
+ export namespace CreateWebmasterCommand {
5
+ export const RequestSchema = WebmasterSchema.pick({
6
+ organization: true,
7
+ organizationType: true,
8
+ tin: true,
9
+ });
10
+
11
+ export type Request = z.infer<typeof RequestSchema>;
12
+
13
+ export const ResponseSchema = z.object({
14
+ data: WebmasterSchema,
15
+ });
16
+
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace CreateWithdrawalRequestCommand {
4
+ export const RequestSchema = z.object({
5
+ amount: z.number().positive(),
6
+ tgProfile: z.string(),
7
+ });
8
+
9
+ export type Request = z.infer<typeof RequestSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: z.object({
13
+ isSuccess: z.boolean(),
14
+ }),
15
+ });
16
+
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { WebmasterWithBalanceSchema } from '../../models';
3
+
4
+ export namespace GetMyWebmasterCommand {
5
+ export type Request = void;
6
+
7
+ export const ResponseSchema = z.object({
8
+ data: WebmasterWithBalanceSchema,
9
+ });
10
+
11
+ export type Response = z.infer<typeof ResponseSchema>;
12
+ }
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ import { GROUP_BY } from '../../constants';
3
+
4
+ export namespace GetWebmasterBalanceOverviewCommand {
5
+ export const RequestSchema = z.object({
6
+ startDate: z.string().refine((v) => !isNaN(Date.parse(v)), {
7
+ message: 'from must be a valid date string',
8
+ }),
9
+ endDate: z.string().refine((v) => !isNaN(Date.parse(v)), {
10
+ message: 'to must be a valid date string',
11
+ }),
12
+ groupBy: z.nativeEnum(GROUP_BY).default(GROUP_BY.DAY),
13
+ });
14
+
15
+ export type Request = z.infer<typeof RequestSchema>;
16
+
17
+ export const WebmasterBalanceOverviewResponseSchema = z.object({
18
+ startDate: z.string(),
19
+ endDate: z.string(),
20
+ total_deposited: z.number(),
21
+ total_withdrawn: z.number(),
22
+ });
23
+
24
+ export const ResponseSchema = z.object({
25
+ data: z.array(WebmasterBalanceOverviewResponseSchema),
26
+ });
27
+
28
+ export type Response = z.infer<typeof ResponseSchema>;
29
+ }
@@ -0,0 +1,6 @@
1
+ export * from './create-webmaster.command';
2
+ export * from './update-webmaster.command';
3
+ export * from './get-my-webmaster.command';
4
+ export * from './get-webmaster-balance-overview.command';
5
+ export * from './create-withdrawal-request.command';
6
+ export * from './confirm-withdrawal.command';
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { WebmasterSchema } from '../../models';
3
+
4
+ export namespace UpdateWebmasterCommand {
5
+ export const RequestParamSchema = WebmasterSchema.pick({ uuid: true });
6
+
7
+ export type RequestParam = z.infer<typeof RequestParamSchema>;
8
+
9
+ export const RequestSchema = WebmasterSchema.partial();
10
+
11
+ export type Request = z.infer<typeof RequestSchema>;
12
+
13
+ export const ResponseSchema = z.object({
14
+ data: WebmasterSchema,
15
+ });
16
+
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -3,4 +3,5 @@ export enum AI_MODEL_CONFIG_PARAM {
3
3
  IMAGE_STYLE = 'image-style',
4
4
  WEB_SEARCH = 'web-search',
5
5
  EXTRA_SYMBOLS_PRICING = 'extra-symbols-pricing',
6
+ REASONING = 'reasoning',
6
7
  }
@@ -0,0 +1,5 @@
1
+ export enum GROUP_BY {
2
+ DAY = 'day',
3
+ WEEK = 'week',
4
+ MONTH = 'month',
5
+ }
@@ -0,0 +1 @@
1
+ export * from './group-by.enum';
@@ -0,0 +1 @@
1
+ export * from './enums';