@purpleschool/multisite 0.0.9 → 0.0.11

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 (189) hide show
  1. package/api/controller/http/index.ts +2 -0
  2. package/api/controller/http/stt.ts +14 -0
  3. package/api/controller/http/subscription.ts +1 -0
  4. package/api/controller/http/tts.ts +14 -0
  5. package/api/routes.ts +66 -0
  6. package/build/api/controller/http/index.d.ts +2 -0
  7. package/build/api/controller/http/index.d.ts.map +1 -1
  8. package/build/api/controller/http/index.js +2 -0
  9. package/build/api/controller/http/stt.d.ts +14 -0
  10. package/build/api/controller/http/stt.d.ts.map +1 -0
  11. package/build/api/controller/http/stt.js +16 -0
  12. package/build/api/controller/http/subscription.d.ts +1 -0
  13. package/build/api/controller/http/subscription.d.ts.map +1 -1
  14. package/build/api/controller/http/subscription.js +1 -0
  15. package/build/api/controller/http/tts.d.ts +14 -0
  16. package/build/api/controller/http/tts.d.ts.map +1 -0
  17. package/build/api/controller/http/tts.js +16 -0
  18. package/build/api/routes.d.ts +45 -0
  19. package/build/api/routes.d.ts.map +1 -1
  20. package/build/api/routes.js +45 -0
  21. package/build/commands/index.d.ts +2 -0
  22. package/build/commands/index.d.ts.map +1 -1
  23. package/build/commands/index.js +2 -0
  24. package/build/commands/stt/delete-all-stt-jobs.command.d.ts +12 -0
  25. package/build/commands/stt/delete-all-stt-jobs.command.d.ts.map +1 -0
  26. package/build/commands/stt/delete-all-stt-jobs.command.js +10 -0
  27. package/build/commands/stt/delete-stt-job-by-uuid.command.d.ts +20 -0
  28. package/build/commands/stt/delete-stt-job-by-uuid.command.d.ts.map +1 -0
  29. package/build/commands/stt/delete-stt-job-by-uuid.command.js +13 -0
  30. package/build/commands/stt/execute-stt.command.d.ts +213 -0
  31. package/build/commands/stt/execute-stt.command.d.ts.map +1 -0
  32. package/build/commands/stt/execute-stt.command.js +15 -0
  33. package/build/commands/stt/index.d.ts +7 -0
  34. package/build/commands/stt/index.d.ts.map +1 -0
  35. package/build/commands/stt/index.js +22 -0
  36. package/build/commands/stt/retry-stt-job.command.d.ts +210 -0
  37. package/build/commands/stt/retry-stt-job.command.d.ts.map +1 -0
  38. package/build/commands/stt/retry-stt-job.command.js +14 -0
  39. package/build/commands/stt/set-reaction-to-stt-job.command.d.ts +222 -0
  40. package/build/commands/stt/set-reaction-to-stt-job.command.d.ts.map +1 -0
  41. package/build/commands/stt/set-reaction-to-stt-job.command.js +19 -0
  42. package/build/commands/stt/update-stt-job-title.command.d.ts +218 -0
  43. package/build/commands/stt/update-stt-job-title.command.d.ts.map +1 -0
  44. package/build/commands/stt/update-stt-job-title.command.js +17 -0
  45. package/build/commands/subscription/fast-buy-subscription.command.d.ts +559 -0
  46. package/build/commands/subscription/fast-buy-subscription.command.d.ts.map +1 -0
  47. package/build/commands/subscription/fast-buy-subscription.command.js +21 -0
  48. package/build/commands/subscription/index.d.ts +1 -0
  49. package/build/commands/subscription/index.d.ts.map +1 -1
  50. package/build/commands/subscription/index.js +1 -0
  51. package/build/commands/tts/delete-all-tts-jobs.command.d.ts +12 -0
  52. package/build/commands/tts/delete-all-tts-jobs.command.d.ts.map +1 -0
  53. package/build/commands/tts/delete-all-tts-jobs.command.js +10 -0
  54. package/build/commands/tts/delete-tts-job-by-uuid.command.d.ts +20 -0
  55. package/build/commands/tts/delete-tts-job-by-uuid.command.d.ts.map +1 -0
  56. package/build/commands/tts/delete-tts-job-by-uuid.command.js +13 -0
  57. package/build/commands/tts/execute-tts.command.d.ts +256 -0
  58. package/build/commands/tts/execute-tts.command.d.ts.map +1 -0
  59. package/build/commands/tts/execute-tts.command.js +26 -0
  60. package/build/commands/tts/index.d.ts +7 -0
  61. package/build/commands/tts/index.d.ts.map +1 -0
  62. package/build/commands/tts/index.js +22 -0
  63. package/build/commands/tts/retry-tts-job.command.d.ts +217 -0
  64. package/build/commands/tts/retry-tts-job.command.d.ts.map +1 -0
  65. package/build/commands/tts/retry-tts-job.command.js +14 -0
  66. package/build/commands/tts/set-reaction-to-tts-job.command.d.ts +229 -0
  67. package/build/commands/tts/set-reaction-to-tts-job.command.d.ts.map +1 -0
  68. package/build/commands/tts/set-reaction-to-tts-job.command.js +19 -0
  69. package/build/commands/tts/update-tts-job-title.command.d.ts +225 -0
  70. package/build/commands/tts/update-tts-job-title.command.d.ts.map +1 -0
  71. package/build/commands/tts/update-tts-job-title.command.js +17 -0
  72. package/build/constants/errors/errors.d.ts +90 -0
  73. package/build/constants/errors/errors.d.ts.map +1 -1
  74. package/build/constants/errors/errors.js +92 -0
  75. package/build/constants/files/enums/file-type.enum.d.ts +2 -1
  76. package/build/constants/files/enums/file-type.enum.d.ts.map +1 -1
  77. package/build/constants/files/enums/file-type.enum.js +1 -0
  78. package/build/constants/tools/enums/tool-type.enum.d.ts +3 -1
  79. package/build/constants/tools/enums/tool-type.enum.d.ts.map +1 -1
  80. package/build/constants/tools/enums/tool-type.enum.js +2 -0
  81. package/build/models/index.d.ts +2 -0
  82. package/build/models/index.d.ts.map +1 -1
  83. package/build/models/index.js +2 -0
  84. package/build/models/stt/index.d.ts +6 -0
  85. package/build/models/stt/index.d.ts.map +1 -0
  86. package/build/models/stt/index.js +21 -0
  87. package/build/models/stt/stt-config.schema.d.ts +165 -0
  88. package/build/models/stt/stt-config.schema.d.ts.map +1 -0
  89. package/build/models/stt/stt-config.schema.js +8 -0
  90. package/build/models/stt/stt-job-attempt.schema.d.ts +20 -0
  91. package/build/models/stt/stt-job-attempt.schema.d.ts.map +1 -0
  92. package/build/models/stt/stt-job-attempt.schema.js +11 -0
  93. package/build/models/stt/stt-job.schema.d.ts +127 -0
  94. package/build/models/stt/stt-job.schema.d.ts.map +1 -0
  95. package/build/models/stt/stt-job.schema.js +32 -0
  96. package/build/models/stt/stt-model.schema.d.ts +110 -0
  97. package/build/models/stt/stt-model.schema.d.ts.map +1 -0
  98. package/build/models/stt/stt-model.schema.js +23 -0
  99. package/build/models/stt/stt-response.schema.d.ts +19 -0
  100. package/build/models/stt/stt-response.schema.d.ts.map +1 -0
  101. package/build/models/stt/stt-response.schema.js +10 -0
  102. package/build/models/tts/index.d.ts +6 -0
  103. package/build/models/tts/index.d.ts.map +1 -0
  104. package/build/models/tts/index.js +21 -0
  105. package/build/models/tts/tts-config.schema.d.ts +1117 -0
  106. package/build/models/tts/tts-config.schema.d.ts.map +1 -0
  107. package/build/models/tts/tts-config.schema.js +8 -0
  108. package/build/models/tts/tts-job-attempt.schema.d.ts +20 -0
  109. package/build/models/tts/tts-job-attempt.schema.d.ts.map +1 -0
  110. package/build/models/tts/tts-job-attempt.schema.js +11 -0
  111. package/build/models/tts/tts-job-params.schema.d.ts +22 -0
  112. package/build/models/tts/tts-job-params.schema.d.ts.map +1 -0
  113. package/build/models/tts/tts-job-params.schema.js +11 -0
  114. package/build/models/tts/tts-job.schema.d.ts +132 -0
  115. package/build/models/tts/tts-job.schema.d.ts.map +1 -0
  116. package/build/models/tts/tts-job.schema.js +32 -0
  117. package/build/models/tts/tts-model.schema.d.ts +1530 -0
  118. package/build/models/tts/tts-model.schema.d.ts.map +1 -0
  119. package/build/models/tts/tts-model.schema.js +58 -0
  120. package/build/queries/index.d.ts +2 -0
  121. package/build/queries/index.d.ts.map +1 -1
  122. package/build/queries/index.js +2 -0
  123. package/build/queries/stt/find-stt-jobs.command.d.ts +236 -0
  124. package/build/queries/stt/find-stt-jobs.command.d.ts.map +1 -0
  125. package/build/queries/stt/find-stt-jobs.command.js +20 -0
  126. package/build/queries/stt/get-stt-config.command.d.ts +227 -0
  127. package/build/queries/stt/get-stt-config.command.d.ts.map +1 -0
  128. package/build/queries/stt/get-stt-config.command.js +11 -0
  129. package/build/queries/stt/get-stt-job.command.d.ts +210 -0
  130. package/build/queries/stt/get-stt-job.command.d.ts.map +1 -0
  131. package/build/queries/stt/get-stt-job.command.js +14 -0
  132. package/build/queries/stt/index.d.ts +4 -0
  133. package/build/queries/stt/index.d.ts.map +1 -0
  134. package/build/queries/stt/index.js +19 -0
  135. package/build/queries/tts/find-tts-jobs.command.d.ts +243 -0
  136. package/build/queries/tts/find-tts-jobs.command.d.ts.map +1 -0
  137. package/build/queries/tts/find-tts-jobs.command.js +20 -0
  138. package/build/queries/tts/get-tts-config.command.d.ts +1371 -0
  139. package/build/queries/tts/get-tts-config.command.d.ts.map +1 -0
  140. package/build/queries/tts/get-tts-config.command.js +11 -0
  141. package/build/queries/tts/get-tts-job.command.d.ts +217 -0
  142. package/build/queries/tts/get-tts-job.command.d.ts.map +1 -0
  143. package/build/queries/tts/get-tts-job.command.js +14 -0
  144. package/build/queries/tts/index.d.ts +4 -0
  145. package/build/queries/tts/index.d.ts.map +1 -0
  146. package/build/queries/tts/index.js +19 -0
  147. package/commands/index.ts +2 -0
  148. package/commands/stt/delete-all-stt-jobs.command.ts +8 -0
  149. package/commands/stt/delete-stt-job-by-uuid.command.ts +13 -0
  150. package/commands/stt/execute-stt.command.ts +15 -0
  151. package/commands/stt/index.ts +6 -0
  152. package/commands/stt/retry-stt-job.command.ts +14 -0
  153. package/commands/stt/set-reaction-to-stt-job.command.ts +21 -0
  154. package/commands/stt/update-stt-job-title.command.ts +19 -0
  155. package/commands/subscription/fast-buy-subscription.command.ts +23 -0
  156. package/commands/subscription/index.ts +1 -0
  157. package/commands/tts/delete-all-tts-jobs.command.ts +8 -0
  158. package/commands/tts/delete-tts-job-by-uuid.command.ts +13 -0
  159. package/commands/tts/execute-tts.command.ts +26 -0
  160. package/commands/tts/index.ts +6 -0
  161. package/commands/tts/retry-tts-job.command.ts +14 -0
  162. package/commands/tts/set-reaction-to-tts-job.command.ts +21 -0
  163. package/commands/tts/update-tts-job-title.command.ts +19 -0
  164. package/constants/errors/errors.ts +94 -0
  165. package/constants/files/enums/file-type.enum.ts +1 -0
  166. package/constants/tools/enums/tool-type.enum.ts +2 -0
  167. package/models/index.ts +2 -0
  168. package/models/stt/index.ts +5 -0
  169. package/models/stt/stt-config.schema.ts +8 -0
  170. package/models/stt/stt-job-attempt.schema.ts +11 -0
  171. package/models/stt/stt-job.schema.ts +32 -0
  172. package/models/stt/stt-model.schema.ts +23 -0
  173. package/models/stt/stt-response.schema.ts +10 -0
  174. package/models/tts/index.ts +5 -0
  175. package/models/tts/tts-config.schema.ts +8 -0
  176. package/models/tts/tts-job-attempt.schema.ts +11 -0
  177. package/models/tts/tts-job-params.schema.ts +11 -0
  178. package/models/tts/tts-job.schema.ts +32 -0
  179. package/models/tts/tts-model.schema.ts +66 -0
  180. package/package.json +1 -1
  181. package/queries/index.ts +2 -0
  182. package/queries/stt/find-stt-jobs.command.ts +20 -0
  183. package/queries/stt/get-stt-config.command.ts +9 -0
  184. package/queries/stt/get-stt-job.command.ts +14 -0
  185. package/queries/stt/index.ts +3 -0
  186. package/queries/tts/find-tts-jobs.command.ts +20 -0
  187. package/queries/tts/get-tts-config.command.ts +9 -0
  188. package/queries/tts/get-tts-job.command.ts +14 -0
  189. package/queries/tts/index.ts +3 -0
@@ -0,0 +1,5 @@
1
+ export * from './stt-config.schema';
2
+ export * from './stt-job.schema';
3
+ export * from './stt-model.schema';
4
+ export * from './stt-response.schema';
5
+ export * from './stt-job-attempt.schema';
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { STTModelSchema } from './stt-model.schema';
3
+
4
+ export const STTConfigSchema = z.object({
5
+ models: z.array(STTModelSchema),
6
+ });
7
+
8
+ export type STTConfig = z.infer<typeof STTConfigSchema>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { JOB_STATUS } from '../../constants/tools/enums/job-status.enum';
3
+
4
+ export const STTJobAttemptSchema = z.object({
5
+ order: z.number(),
6
+ status: z.nativeEnum(JOB_STATUS),
7
+ error: z.string().nullable().optional(),
8
+ timestamp: z.string(),
9
+ });
10
+
11
+ export type STTJobAttempt = z.infer<typeof STTJobAttemptSchema>;
@@ -0,0 +1,32 @@
1
+ import { z } from 'zod';
2
+ import { JOB_STATUS, USER_REACTION } from '../../constants';
3
+ import { STTResponseSchema } from './stt-response.schema';
4
+ import { STTJobAttemptSchema } from './stt-job-attempt.schema';
5
+
6
+ export const STTJobSchema = z.object({
7
+ uuid: z.string(),
8
+ siteId: z.string(),
9
+ modelId: z.string(),
10
+ title: z.string(),
11
+ fileId: z.string(),
12
+ fileKey: z.string(),
13
+ fileUrl: z.string(),
14
+ aiResponse: STTResponseSchema.nullable(),
15
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
16
+ dislikeReason: z.string().nullable(),
17
+ status: z.nativeEnum(JOB_STATUS),
18
+ duration: z.number(),
19
+ error: z.string().nullable(),
20
+ internalError: z.string().nullable().optional(),
21
+ userId: z.string().nullable(),
22
+ unregisteredUserId: z.string().nullable(),
23
+ price: z.number(),
24
+ tokenReservationId: z.string().nullable().optional(),
25
+ attempts: z.array(STTJobAttemptSchema).default([]),
26
+ isDeleted: z.boolean(),
27
+ createdAt: z.date(),
28
+ completedAt: z.date().nullable(),
29
+ updatedAt: z.date(),
30
+ });
31
+
32
+ export type STTJob = z.infer<typeof STTJobSchema>;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import { TOOL_MODEL_STATUS } from '../../constants/tools/enums/tool-model-status.enum';
3
+ import { IconVariantsSchema } from '../common';
4
+
5
+ export const STTModelSchema = z.object({
6
+ uuid: z.string(),
7
+ siteId: z.string(),
8
+ title: z.string(),
9
+ description: z.string(),
10
+ aiModel: z.string(),
11
+ pricePerSecond: z.number(),
12
+ order: z.number(),
13
+ status: z.nativeEnum(TOOL_MODEL_STATUS),
14
+ canUse: z.boolean().optional(),
15
+ icons: IconVariantsSchema,
16
+ strategy: z.string(),
17
+ maxDurationSeconds: z.number(),
18
+ maxSizeMB: z.number(),
19
+ createdAt: z.date(),
20
+ updatedAt: z.date(),
21
+ });
22
+
23
+ export type STTModel = z.infer<typeof STTModelSchema>;
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+
3
+ export const STTResponseSchema = z.object({
4
+ raw: z.record(z.any()).default({}),
5
+ md: z.string(),
6
+ txtUrl: z.string().optional(),
7
+ srtUrl: z.string().optional(),
8
+ });
9
+
10
+ export type STTResponse = z.infer<typeof STTResponseSchema>;
@@ -0,0 +1,5 @@
1
+ export * from './tts-config.schema';
2
+ export * from './tts-job.schema';
3
+ export * from './tts-model.schema';
4
+ export * from './tts-job-params.schema';
5
+ export * from './tts-job-attempt.schema';
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { TTSModelSchema } from './tts-model.schema';
3
+
4
+ export const TTSConfigSchema = z.object({
5
+ models: z.array(TTSModelSchema),
6
+ });
7
+
8
+ export type TTSConfig = z.infer<typeof TTSConfigSchema>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { JOB_STATUS } from '../../constants';
3
+
4
+ export const TTSJobAttemptSchema = z.object({
5
+ order: z.number(),
6
+ status: z.nativeEnum(JOB_STATUS),
7
+ error: z.string().nullable().optional(),
8
+ timestamp: z.string(),
9
+ });
10
+
11
+ export type TTSJobAttempt = z.infer<typeof TTSJobAttemptSchema>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+
3
+ export const TTSJobParamsSchema = z.object({
4
+ speed: z.number().optional(),
5
+ similarity: z.number().optional(),
6
+ stability: z.number().optional(),
7
+ style: z.number().optional(),
8
+ language: z.string().optional(),
9
+ });
10
+
11
+ export type TTSJobParams = z.infer<typeof TTSJobParamsSchema>;
@@ -0,0 +1,32 @@
1
+ import { z } from 'zod';
2
+ import { JOB_STATUS, USER_REACTION } from '../../constants';
3
+ import { TTSJobAttemptSchema } from './tts-job-attempt.schema';
4
+ import { TTSJobParamsSchema } from './tts-job-params.schema';
5
+
6
+ export const TTSJobSchema = z.object({
7
+ uuid: z.string(),
8
+ siteId: z.string(),
9
+ userInput: z.string(),
10
+ aiResponse: z.string().nullable(),
11
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
12
+ dislikeReason: z.string().nullable(),
13
+ title: z.string(),
14
+ status: z.nativeEnum(JOB_STATUS),
15
+ error: z.string().nullable(),
16
+ internalError: z.string().nullable().optional(),
17
+ modelId: z.string(),
18
+ voiceId: z.string(),
19
+ price: z.number(),
20
+ duration: z.number(),
21
+ userId: z.string().nullable(),
22
+ unregisteredUserId: z.string().nullable(),
23
+ tokenReservationId: z.string().nullable().optional(),
24
+ attempts: z.array(TTSJobAttemptSchema).default([]),
25
+ params: TTSJobParamsSchema,
26
+ isDeleted: z.boolean(),
27
+ createdAt: z.date(),
28
+ updatedAt: z.date(),
29
+ completedAt: z.date().nullable(),
30
+ });
31
+
32
+ export type TTSJob = z.infer<typeof TTSJobSchema>;
@@ -0,0 +1,66 @@
1
+ import { z } from 'zod';
2
+ import { TOOL_MODEL_STATUS } from '../../constants/tools/enums/tool-model-status.enum';
3
+ import { IconVariantsSchema } from '../common';
4
+
5
+ export const TTSVoiceSchema = z.object({
6
+ id: z.string(),
7
+ externalId: z.string(),
8
+ icon: z.string(),
9
+ title: z.string(),
10
+ previewUrl: z.string(),
11
+ description: z.string(),
12
+ languages: z.array(
13
+ z.object({
14
+ code: z.string(),
15
+ title: z.string(),
16
+ icon: z.string(),
17
+ order: z.number(),
18
+ }),
19
+ ),
20
+ order: z.number(),
21
+ });
22
+ export type TTSVoice = z.infer<typeof TTSVoiceSchema>;
23
+
24
+ export const TTSSliderSchema = z.object({
25
+ title: z.string(),
26
+ description: z.string(),
27
+ icons: IconVariantsSchema,
28
+ min: z.number(),
29
+ minLabel: z.string(),
30
+ max: z.number(),
31
+ maxLabel: z.string(),
32
+ step: z.number(),
33
+ default: z.number(),
34
+ });
35
+ export type TTSSlider = z.infer<typeof TTSSliderSchema>;
36
+
37
+ export const TTSModelParamsSchema = z
38
+ .object({
39
+ speed: TTSSliderSchema,
40
+ stability: TTSSliderSchema,
41
+ similarity: TTSSliderSchema,
42
+ style: TTSSliderSchema,
43
+ })
44
+ .partial();
45
+ export type TTSModelParams = z.infer<typeof TTSModelParamsSchema>;
46
+
47
+ export const TTSModelSchema = z.object({
48
+ uuid: z.string(),
49
+ siteId: z.string(),
50
+ title: z.string(),
51
+ description: z.string(),
52
+ aiModel: z.string(),
53
+ pricePerSymbol: z.number(),
54
+ order: z.number(),
55
+ status: z.nativeEnum(TOOL_MODEL_STATUS),
56
+ canUse: z.boolean().optional(),
57
+ icons: IconVariantsSchema,
58
+ strategy: z.string(),
59
+ maxInputLength: z.number(),
60
+ voices: z.array(TTSVoiceSchema),
61
+ params: TTSModelParamsSchema,
62
+ createdAt: z.date(),
63
+ updatedAt: z.date(),
64
+ });
65
+
66
+ export type TTSModel = z.infer<typeof TTSModelSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/multisite",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Multisite API contracts (DTO schemas, routes, constants)",
5
5
  "type": "commonjs",
6
6
  "main": "build/index.js",
package/queries/index.ts CHANGED
@@ -8,3 +8,5 @@ export * from './image-generation';
8
8
  export * from './image-editor';
9
9
  export * from './page';
10
10
  export * from './marketplace-card';
11
+ export * from './stt';
12
+ export * from './tts';
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { STTJobSchema } from '../../models';
3
+
4
+ export namespace FindSTTJobsCommand {
5
+ export const RequestQuerySchema = z.object({
6
+ limit: z.coerce.number().int().min(1).max(100).default(20),
7
+ offset: z.coerce.number().int().min(0).default(0),
8
+ });
9
+ export type RequestQuery = z.infer<typeof RequestQuerySchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: z.array(STTJobSchema),
13
+ meta: z.object({
14
+ limit: z.number().int(),
15
+ offset: z.number().int(),
16
+ total: z.number().int(),
17
+ }),
18
+ });
19
+ export type Response = z.infer<typeof ResponseSchema>;
20
+ }
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { STTConfigSchema } from '../../models';
3
+
4
+ export namespace GetSTTConfigCommand {
5
+ export const ResponseSchema = z.object({
6
+ data: STTConfigSchema,
7
+ });
8
+ export type Response = z.infer<typeof ResponseSchema>;
9
+ }
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { STTJobSchema } from '../../models';
3
+
4
+ export namespace GetSTTJobCommand {
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: STTJobSchema,
12
+ });
13
+ export type Response = z.infer<typeof ResponseSchema>;
14
+ }
@@ -0,0 +1,3 @@
1
+ export * from './get-stt-config.command';
2
+ export * from './get-stt-job.command';
3
+ export * from './find-stt-jobs.command';
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { TTSJobSchema } from '../../models';
3
+
4
+ export namespace FindTTSJobsCommand {
5
+ export const RequestQuerySchema = z.object({
6
+ limit: z.coerce.number().int().min(1).max(100).default(20),
7
+ offset: z.coerce.number().int().min(0).default(0),
8
+ });
9
+ export type RequestQuery = z.infer<typeof RequestQuerySchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: z.array(TTSJobSchema),
13
+ meta: z.object({
14
+ limit: z.number().int(),
15
+ offset: z.number().int(),
16
+ total: z.number().int(),
17
+ }),
18
+ });
19
+ export type Response = z.infer<typeof ResponseSchema>;
20
+ }
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { TTSConfigSchema } from '../../models';
3
+
4
+ export namespace GetTTSConfigCommand {
5
+ export const ResponseSchema = z.object({
6
+ data: TTSConfigSchema,
7
+ });
8
+ export type Response = z.infer<typeof ResponseSchema>;
9
+ }
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { TTSJobSchema } from '../../models';
3
+
4
+ export namespace GetTTSJobCommand {
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: TTSJobSchema,
12
+ });
13
+ export type Response = z.infer<typeof ResponseSchema>;
14
+ }
@@ -0,0 +1,3 @@
1
+ export * from './get-tts-config.command';
2
+ export * from './get-tts-job.command';
3
+ export * from './find-tts-jobs.command';