@purpleschool/multisite 0.0.9 → 0.0.10
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.
- package/api/controller/http/index.ts +2 -0
- package/api/controller/http/stt.ts +14 -0
- package/api/controller/http/tts.ts +14 -0
- package/api/routes.ts +64 -0
- package/build/api/controller/http/index.d.ts +2 -0
- package/build/api/controller/http/index.d.ts.map +1 -1
- package/build/api/controller/http/index.js +2 -0
- package/build/api/controller/http/stt.d.ts +14 -0
- package/build/api/controller/http/stt.d.ts.map +1 -0
- package/build/api/controller/http/stt.js +16 -0
- package/build/api/controller/http/tts.d.ts +14 -0
- package/build/api/controller/http/tts.d.ts.map +1 -0
- package/build/api/controller/http/tts.js +16 -0
- package/build/api/routes.d.ts +44 -0
- package/build/api/routes.d.ts.map +1 -1
- package/build/api/routes.js +44 -0
- package/build/commands/index.d.ts +2 -0
- package/build/commands/index.d.ts.map +1 -1
- package/build/commands/index.js +2 -0
- package/build/commands/stt/delete-all-stt-jobs.command.d.ts +12 -0
- package/build/commands/stt/delete-all-stt-jobs.command.d.ts.map +1 -0
- package/build/commands/stt/delete-all-stt-jobs.command.js +10 -0
- package/build/commands/stt/delete-stt-job-by-uuid.command.d.ts +20 -0
- package/build/commands/stt/delete-stt-job-by-uuid.command.d.ts.map +1 -0
- package/build/commands/stt/delete-stt-job-by-uuid.command.js +13 -0
- package/build/commands/stt/execute-stt.command.d.ts +213 -0
- package/build/commands/stt/execute-stt.command.d.ts.map +1 -0
- package/build/commands/stt/execute-stt.command.js +15 -0
- package/build/commands/stt/index.d.ts +7 -0
- package/build/commands/stt/index.d.ts.map +1 -0
- package/build/commands/stt/index.js +22 -0
- package/build/commands/stt/retry-stt-job.command.d.ts +210 -0
- package/build/commands/stt/retry-stt-job.command.d.ts.map +1 -0
- package/build/commands/stt/retry-stt-job.command.js +14 -0
- package/build/commands/stt/set-reaction-to-stt-job.command.d.ts +222 -0
- package/build/commands/stt/set-reaction-to-stt-job.command.d.ts.map +1 -0
- package/build/commands/stt/set-reaction-to-stt-job.command.js +19 -0
- package/build/commands/stt/update-stt-job-title.command.d.ts +218 -0
- package/build/commands/stt/update-stt-job-title.command.d.ts.map +1 -0
- package/build/commands/stt/update-stt-job-title.command.js +17 -0
- package/build/commands/tts/delete-all-tts-jobs.command.d.ts +12 -0
- package/build/commands/tts/delete-all-tts-jobs.command.d.ts.map +1 -0
- package/build/commands/tts/delete-all-tts-jobs.command.js +10 -0
- package/build/commands/tts/delete-tts-job-by-uuid.command.d.ts +20 -0
- package/build/commands/tts/delete-tts-job-by-uuid.command.d.ts.map +1 -0
- package/build/commands/tts/delete-tts-job-by-uuid.command.js +13 -0
- package/build/commands/tts/execute-tts.command.d.ts +256 -0
- package/build/commands/tts/execute-tts.command.d.ts.map +1 -0
- package/build/commands/tts/execute-tts.command.js +26 -0
- package/build/commands/tts/index.d.ts +7 -0
- package/build/commands/tts/index.d.ts.map +1 -0
- package/build/commands/tts/index.js +22 -0
- package/build/commands/tts/retry-tts-job.command.d.ts +217 -0
- package/build/commands/tts/retry-tts-job.command.d.ts.map +1 -0
- package/build/commands/tts/retry-tts-job.command.js +14 -0
- package/build/commands/tts/set-reaction-to-tts-job.command.d.ts +229 -0
- package/build/commands/tts/set-reaction-to-tts-job.command.d.ts.map +1 -0
- package/build/commands/tts/set-reaction-to-tts-job.command.js +19 -0
- package/build/commands/tts/update-tts-job-title.command.d.ts +225 -0
- package/build/commands/tts/update-tts-job-title.command.d.ts.map +1 -0
- package/build/commands/tts/update-tts-job-title.command.js +17 -0
- package/build/constants/errors/errors.d.ts +90 -0
- package/build/constants/errors/errors.d.ts.map +1 -1
- package/build/constants/errors/errors.js +92 -0
- package/build/constants/files/enums/file-type.enum.d.ts +2 -1
- package/build/constants/files/enums/file-type.enum.d.ts.map +1 -1
- package/build/constants/files/enums/file-type.enum.js +1 -0
- package/build/constants/tools/enums/tool-type.enum.d.ts +3 -1
- package/build/constants/tools/enums/tool-type.enum.d.ts.map +1 -1
- package/build/constants/tools/enums/tool-type.enum.js +2 -0
- package/build/models/index.d.ts +2 -0
- package/build/models/index.d.ts.map +1 -1
- package/build/models/index.js +2 -0
- package/build/models/stt/index.d.ts +6 -0
- package/build/models/stt/index.d.ts.map +1 -0
- package/build/models/stt/index.js +21 -0
- package/build/models/stt/stt-config.schema.d.ts +165 -0
- package/build/models/stt/stt-config.schema.d.ts.map +1 -0
- package/build/models/stt/stt-config.schema.js +8 -0
- package/build/models/stt/stt-job-attempt.schema.d.ts +20 -0
- package/build/models/stt/stt-job-attempt.schema.d.ts.map +1 -0
- package/build/models/stt/stt-job-attempt.schema.js +11 -0
- package/build/models/stt/stt-job.schema.d.ts +127 -0
- package/build/models/stt/stt-job.schema.d.ts.map +1 -0
- package/build/models/stt/stt-job.schema.js +32 -0
- package/build/models/stt/stt-model.schema.d.ts +110 -0
- package/build/models/stt/stt-model.schema.d.ts.map +1 -0
- package/build/models/stt/stt-model.schema.js +23 -0
- package/build/models/stt/stt-response.schema.d.ts +19 -0
- package/build/models/stt/stt-response.schema.d.ts.map +1 -0
- package/build/models/stt/stt-response.schema.js +10 -0
- package/build/models/tts/index.d.ts +6 -0
- package/build/models/tts/index.d.ts.map +1 -0
- package/build/models/tts/index.js +21 -0
- package/build/models/tts/tts-config.schema.d.ts +1117 -0
- package/build/models/tts/tts-config.schema.d.ts.map +1 -0
- package/build/models/tts/tts-config.schema.js +8 -0
- package/build/models/tts/tts-job-attempt.schema.d.ts +20 -0
- package/build/models/tts/tts-job-attempt.schema.d.ts.map +1 -0
- package/build/models/tts/tts-job-attempt.schema.js +11 -0
- package/build/models/tts/tts-job-params.schema.d.ts +22 -0
- package/build/models/tts/tts-job-params.schema.d.ts.map +1 -0
- package/build/models/tts/tts-job-params.schema.js +11 -0
- package/build/models/tts/tts-job.schema.d.ts +132 -0
- package/build/models/tts/tts-job.schema.d.ts.map +1 -0
- package/build/models/tts/tts-job.schema.js +32 -0
- package/build/models/tts/tts-model.schema.d.ts +1530 -0
- package/build/models/tts/tts-model.schema.d.ts.map +1 -0
- package/build/models/tts/tts-model.schema.js +58 -0
- package/build/queries/index.d.ts +2 -0
- package/build/queries/index.d.ts.map +1 -1
- package/build/queries/index.js +2 -0
- package/build/queries/stt/find-stt-jobs.command.d.ts +236 -0
- package/build/queries/stt/find-stt-jobs.command.d.ts.map +1 -0
- package/build/queries/stt/find-stt-jobs.command.js +20 -0
- package/build/queries/stt/get-stt-config.command.d.ts +227 -0
- package/build/queries/stt/get-stt-config.command.d.ts.map +1 -0
- package/build/queries/stt/get-stt-config.command.js +11 -0
- package/build/queries/stt/get-stt-job.command.d.ts +210 -0
- package/build/queries/stt/get-stt-job.command.d.ts.map +1 -0
- package/build/queries/stt/get-stt-job.command.js +14 -0
- package/build/queries/stt/index.d.ts +4 -0
- package/build/queries/stt/index.d.ts.map +1 -0
- package/build/queries/stt/index.js +19 -0
- package/build/queries/tts/find-tts-jobs.command.d.ts +243 -0
- package/build/queries/tts/find-tts-jobs.command.d.ts.map +1 -0
- package/build/queries/tts/find-tts-jobs.command.js +20 -0
- package/build/queries/tts/get-tts-config.command.d.ts +1371 -0
- package/build/queries/tts/get-tts-config.command.d.ts.map +1 -0
- package/build/queries/tts/get-tts-config.command.js +11 -0
- package/build/queries/tts/get-tts-job.command.d.ts +217 -0
- package/build/queries/tts/get-tts-job.command.d.ts.map +1 -0
- package/build/queries/tts/get-tts-job.command.js +14 -0
- package/build/queries/tts/index.d.ts +4 -0
- package/build/queries/tts/index.d.ts.map +1 -0
- package/build/queries/tts/index.js +19 -0
- package/commands/index.ts +2 -0
- package/commands/stt/delete-all-stt-jobs.command.ts +8 -0
- package/commands/stt/delete-stt-job-by-uuid.command.ts +13 -0
- package/commands/stt/execute-stt.command.ts +15 -0
- package/commands/stt/index.ts +6 -0
- package/commands/stt/retry-stt-job.command.ts +14 -0
- package/commands/stt/set-reaction-to-stt-job.command.ts +21 -0
- package/commands/stt/update-stt-job-title.command.ts +19 -0
- package/commands/tts/delete-all-tts-jobs.command.ts +8 -0
- package/commands/tts/delete-tts-job-by-uuid.command.ts +13 -0
- package/commands/tts/execute-tts.command.ts +26 -0
- package/commands/tts/index.ts +6 -0
- package/commands/tts/retry-tts-job.command.ts +14 -0
- package/commands/tts/set-reaction-to-tts-job.command.ts +21 -0
- package/commands/tts/update-tts-job-title.command.ts +19 -0
- package/constants/errors/errors.ts +94 -0
- package/constants/files/enums/file-type.enum.ts +1 -0
- package/constants/tools/enums/tool-type.enum.ts +2 -0
- package/models/index.ts +2 -0
- package/models/stt/index.ts +5 -0
- package/models/stt/stt-config.schema.ts +8 -0
- package/models/stt/stt-job-attempt.schema.ts +11 -0
- package/models/stt/stt-job.schema.ts +32 -0
- package/models/stt/stt-model.schema.ts +23 -0
- package/models/stt/stt-response.schema.ts +10 -0
- package/models/tts/index.ts +5 -0
- package/models/tts/tts-config.schema.ts +8 -0
- package/models/tts/tts-job-attempt.schema.ts +11 -0
- package/models/tts/tts-job-params.schema.ts +11 -0
- package/models/tts/tts-job.schema.ts +32 -0
- package/models/tts/tts-model.schema.ts +66 -0
- package/package.json +1 -1
- package/queries/index.ts +2 -0
- package/queries/stt/find-stt-jobs.command.ts +20 -0
- package/queries/stt/get-stt-config.command.ts +9 -0
- package/queries/stt/get-stt-job.command.ts +14 -0
- package/queries/stt/index.ts +3 -0
- package/queries/tts/find-tts-jobs.command.ts +20 -0
- package/queries/tts/get-tts-config.command.ts +9 -0
- package/queries/tts/get-tts-job.command.ts +14 -0
- package/queries/tts/index.ts +3 -0
|
@@ -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,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
package/queries/index.ts
CHANGED
|
@@ -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,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,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,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
|
+
}
|