@purpleschool/multisite 0.0.8 → 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.
Files changed (184) 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/tts.ts +14 -0
  4. package/api/routes.ts +64 -0
  5. package/build/api/controller/http/index.d.ts +2 -0
  6. package/build/api/controller/http/index.d.ts.map +1 -1
  7. package/build/api/controller/http/index.js +2 -0
  8. package/build/api/controller/http/stt.d.ts +14 -0
  9. package/build/api/controller/http/stt.d.ts.map +1 -0
  10. package/build/api/controller/http/stt.js +16 -0
  11. package/build/api/controller/http/tts.d.ts +14 -0
  12. package/build/api/controller/http/tts.d.ts.map +1 -0
  13. package/build/api/controller/http/tts.js +16 -0
  14. package/build/api/routes.d.ts +44 -0
  15. package/build/api/routes.d.ts.map +1 -1
  16. package/build/api/routes.js +44 -0
  17. package/build/commands/index.d.ts +2 -0
  18. package/build/commands/index.d.ts.map +1 -1
  19. package/build/commands/index.js +2 -0
  20. package/build/commands/payment/cloud-payments.command.d.ts +10 -10
  21. package/build/commands/payment/cloud-payments.command.js +4 -4
  22. package/build/commands/stt/delete-all-stt-jobs.command.d.ts +12 -0
  23. package/build/commands/stt/delete-all-stt-jobs.command.d.ts.map +1 -0
  24. package/build/commands/stt/delete-all-stt-jobs.command.js +10 -0
  25. package/build/commands/stt/delete-stt-job-by-uuid.command.d.ts +20 -0
  26. package/build/commands/stt/delete-stt-job-by-uuid.command.d.ts.map +1 -0
  27. package/build/commands/stt/delete-stt-job-by-uuid.command.js +13 -0
  28. package/build/commands/stt/execute-stt.command.d.ts +213 -0
  29. package/build/commands/stt/execute-stt.command.d.ts.map +1 -0
  30. package/build/commands/stt/execute-stt.command.js +15 -0
  31. package/build/commands/stt/index.d.ts +7 -0
  32. package/build/commands/stt/index.d.ts.map +1 -0
  33. package/build/commands/stt/index.js +22 -0
  34. package/build/commands/stt/retry-stt-job.command.d.ts +210 -0
  35. package/build/commands/stt/retry-stt-job.command.d.ts.map +1 -0
  36. package/build/commands/stt/retry-stt-job.command.js +14 -0
  37. package/build/commands/stt/set-reaction-to-stt-job.command.d.ts +222 -0
  38. package/build/commands/stt/set-reaction-to-stt-job.command.d.ts.map +1 -0
  39. package/build/commands/stt/set-reaction-to-stt-job.command.js +19 -0
  40. package/build/commands/stt/update-stt-job-title.command.d.ts +218 -0
  41. package/build/commands/stt/update-stt-job-title.command.d.ts.map +1 -0
  42. package/build/commands/stt/update-stt-job-title.command.js +17 -0
  43. package/build/commands/tts/delete-all-tts-jobs.command.d.ts +12 -0
  44. package/build/commands/tts/delete-all-tts-jobs.command.d.ts.map +1 -0
  45. package/build/commands/tts/delete-all-tts-jobs.command.js +10 -0
  46. package/build/commands/tts/delete-tts-job-by-uuid.command.d.ts +20 -0
  47. package/build/commands/tts/delete-tts-job-by-uuid.command.d.ts.map +1 -0
  48. package/build/commands/tts/delete-tts-job-by-uuid.command.js +13 -0
  49. package/build/commands/tts/execute-tts.command.d.ts +256 -0
  50. package/build/commands/tts/execute-tts.command.d.ts.map +1 -0
  51. package/build/commands/tts/execute-tts.command.js +26 -0
  52. package/build/commands/tts/index.d.ts +7 -0
  53. package/build/commands/tts/index.d.ts.map +1 -0
  54. package/build/commands/tts/index.js +22 -0
  55. package/build/commands/tts/retry-tts-job.command.d.ts +217 -0
  56. package/build/commands/tts/retry-tts-job.command.d.ts.map +1 -0
  57. package/build/commands/tts/retry-tts-job.command.js +14 -0
  58. package/build/commands/tts/set-reaction-to-tts-job.command.d.ts +229 -0
  59. package/build/commands/tts/set-reaction-to-tts-job.command.d.ts.map +1 -0
  60. package/build/commands/tts/set-reaction-to-tts-job.command.js +19 -0
  61. package/build/commands/tts/update-tts-job-title.command.d.ts +225 -0
  62. package/build/commands/tts/update-tts-job-title.command.d.ts.map +1 -0
  63. package/build/commands/tts/update-tts-job-title.command.js +17 -0
  64. package/build/constants/errors/errors.d.ts +90 -0
  65. package/build/constants/errors/errors.d.ts.map +1 -1
  66. package/build/constants/errors/errors.js +92 -0
  67. package/build/constants/files/enums/file-type.enum.d.ts +2 -1
  68. package/build/constants/files/enums/file-type.enum.d.ts.map +1 -1
  69. package/build/constants/files/enums/file-type.enum.js +1 -0
  70. package/build/constants/tools/enums/tool-type.enum.d.ts +3 -1
  71. package/build/constants/tools/enums/tool-type.enum.d.ts.map +1 -1
  72. package/build/constants/tools/enums/tool-type.enum.js +2 -0
  73. package/build/constants/user-to-subscription/enums/user-to-subscription-status.enum.d.ts +2 -1
  74. package/build/constants/user-to-subscription/enums/user-to-subscription-status.enum.d.ts.map +1 -1
  75. package/build/constants/user-to-subscription/enums/user-to-subscription-status.enum.js +1 -0
  76. package/build/models/index.d.ts +2 -0
  77. package/build/models/index.d.ts.map +1 -1
  78. package/build/models/index.js +2 -0
  79. package/build/models/stt/index.d.ts +6 -0
  80. package/build/models/stt/index.d.ts.map +1 -0
  81. package/build/models/stt/index.js +21 -0
  82. package/build/models/stt/stt-config.schema.d.ts +165 -0
  83. package/build/models/stt/stt-config.schema.d.ts.map +1 -0
  84. package/build/models/stt/stt-config.schema.js +8 -0
  85. package/build/models/stt/stt-job-attempt.schema.d.ts +20 -0
  86. package/build/models/stt/stt-job-attempt.schema.d.ts.map +1 -0
  87. package/build/models/stt/stt-job-attempt.schema.js +11 -0
  88. package/build/models/stt/stt-job.schema.d.ts +127 -0
  89. package/build/models/stt/stt-job.schema.d.ts.map +1 -0
  90. package/build/models/stt/stt-job.schema.js +32 -0
  91. package/build/models/stt/stt-model.schema.d.ts +110 -0
  92. package/build/models/stt/stt-model.schema.d.ts.map +1 -0
  93. package/build/models/stt/stt-model.schema.js +23 -0
  94. package/build/models/stt/stt-response.schema.d.ts +19 -0
  95. package/build/models/stt/stt-response.schema.d.ts.map +1 -0
  96. package/build/models/stt/stt-response.schema.js +10 -0
  97. package/build/models/tts/index.d.ts +6 -0
  98. package/build/models/tts/index.d.ts.map +1 -0
  99. package/build/models/tts/index.js +21 -0
  100. package/build/models/tts/tts-config.schema.d.ts +1117 -0
  101. package/build/models/tts/tts-config.schema.d.ts.map +1 -0
  102. package/build/models/tts/tts-config.schema.js +8 -0
  103. package/build/models/tts/tts-job-attempt.schema.d.ts +20 -0
  104. package/build/models/tts/tts-job-attempt.schema.d.ts.map +1 -0
  105. package/build/models/tts/tts-job-attempt.schema.js +11 -0
  106. package/build/models/tts/tts-job-params.schema.d.ts +22 -0
  107. package/build/models/tts/tts-job-params.schema.d.ts.map +1 -0
  108. package/build/models/tts/tts-job-params.schema.js +11 -0
  109. package/build/models/tts/tts-job.schema.d.ts +132 -0
  110. package/build/models/tts/tts-job.schema.d.ts.map +1 -0
  111. package/build/models/tts/tts-job.schema.js +32 -0
  112. package/build/models/tts/tts-model.schema.d.ts +1530 -0
  113. package/build/models/tts/tts-model.schema.d.ts.map +1 -0
  114. package/build/models/tts/tts-model.schema.js +58 -0
  115. package/build/queries/index.d.ts +2 -0
  116. package/build/queries/index.d.ts.map +1 -1
  117. package/build/queries/index.js +2 -0
  118. package/build/queries/stt/find-stt-jobs.command.d.ts +236 -0
  119. package/build/queries/stt/find-stt-jobs.command.d.ts.map +1 -0
  120. package/build/queries/stt/find-stt-jobs.command.js +20 -0
  121. package/build/queries/stt/get-stt-config.command.d.ts +227 -0
  122. package/build/queries/stt/get-stt-config.command.d.ts.map +1 -0
  123. package/build/queries/stt/get-stt-config.command.js +11 -0
  124. package/build/queries/stt/get-stt-job.command.d.ts +210 -0
  125. package/build/queries/stt/get-stt-job.command.d.ts.map +1 -0
  126. package/build/queries/stt/get-stt-job.command.js +14 -0
  127. package/build/queries/stt/index.d.ts +4 -0
  128. package/build/queries/stt/index.d.ts.map +1 -0
  129. package/build/queries/stt/index.js +19 -0
  130. package/build/queries/tts/find-tts-jobs.command.d.ts +243 -0
  131. package/build/queries/tts/find-tts-jobs.command.d.ts.map +1 -0
  132. package/build/queries/tts/find-tts-jobs.command.js +20 -0
  133. package/build/queries/tts/get-tts-config.command.d.ts +1371 -0
  134. package/build/queries/tts/get-tts-config.command.d.ts.map +1 -0
  135. package/build/queries/tts/get-tts-config.command.js +11 -0
  136. package/build/queries/tts/get-tts-job.command.d.ts +217 -0
  137. package/build/queries/tts/get-tts-job.command.d.ts.map +1 -0
  138. package/build/queries/tts/get-tts-job.command.js +14 -0
  139. package/build/queries/tts/index.d.ts +4 -0
  140. package/build/queries/tts/index.d.ts.map +1 -0
  141. package/build/queries/tts/index.js +19 -0
  142. package/commands/index.ts +2 -0
  143. package/commands/payment/cloud-payments.command.ts +4 -4
  144. package/commands/stt/delete-all-stt-jobs.command.ts +8 -0
  145. package/commands/stt/delete-stt-job-by-uuid.command.ts +13 -0
  146. package/commands/stt/execute-stt.command.ts +15 -0
  147. package/commands/stt/index.ts +6 -0
  148. package/commands/stt/retry-stt-job.command.ts +14 -0
  149. package/commands/stt/set-reaction-to-stt-job.command.ts +21 -0
  150. package/commands/stt/update-stt-job-title.command.ts +19 -0
  151. package/commands/tts/delete-all-tts-jobs.command.ts +8 -0
  152. package/commands/tts/delete-tts-job-by-uuid.command.ts +13 -0
  153. package/commands/tts/execute-tts.command.ts +26 -0
  154. package/commands/tts/index.ts +6 -0
  155. package/commands/tts/retry-tts-job.command.ts +14 -0
  156. package/commands/tts/set-reaction-to-tts-job.command.ts +21 -0
  157. package/commands/tts/update-tts-job-title.command.ts +19 -0
  158. package/constants/errors/errors.ts +94 -0
  159. package/constants/files/enums/file-type.enum.ts +1 -0
  160. package/constants/tools/enums/tool-type.enum.ts +2 -0
  161. package/constants/user-to-subscription/enums/user-to-subscription-status.enum.ts +1 -0
  162. package/models/index.ts +2 -0
  163. package/models/stt/index.ts +5 -0
  164. package/models/stt/stt-config.schema.ts +8 -0
  165. package/models/stt/stt-job-attempt.schema.ts +11 -0
  166. package/models/stt/stt-job.schema.ts +32 -0
  167. package/models/stt/stt-model.schema.ts +23 -0
  168. package/models/stt/stt-response.schema.ts +10 -0
  169. package/models/tts/index.ts +5 -0
  170. package/models/tts/tts-config.schema.ts +8 -0
  171. package/models/tts/tts-job-attempt.schema.ts +11 -0
  172. package/models/tts/tts-job-params.schema.ts +11 -0
  173. package/models/tts/tts-job.schema.ts +32 -0
  174. package/models/tts/tts-model.schema.ts +66 -0
  175. package/package.json +1 -1
  176. package/queries/index.ts +2 -0
  177. package/queries/stt/find-stt-jobs.command.ts +20 -0
  178. package/queries/stt/get-stt-config.command.ts +9 -0
  179. package/queries/stt/get-stt-job.command.ts +14 -0
  180. package/queries/stt/index.ts +3 -0
  181. package/queries/tts/find-tts-jobs.command.ts +20 -0
  182. package/queries/tts/get-tts-config.command.ts +9 -0
  183. package/queries/tts/get-tts-job.command.ts +14 -0
  184. package/queries/tts/index.ts +3 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tts-config.command.d.ts","sourceRoot":"","sources":["../../../queries/tts/get-tts-config.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,mBAAmB,CAAC;IAC1B,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetTTSConfigCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var GetTTSConfigCommand;
7
+ (function (GetTTSConfigCommand) {
8
+ GetTTSConfigCommand.ResponseSchema = zod_1.z.object({
9
+ data: models_1.TTSConfigSchema,
10
+ });
11
+ })(GetTTSConfigCommand || (exports.GetTTSConfigCommand = GetTTSConfigCommand = {}));
@@ -0,0 +1,217 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetTTSJobCommand {
3
+ const RequestParamsSchema: z.ZodObject<{
4
+ uuid: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ uuid: string;
7
+ }, {
8
+ uuid: string;
9
+ }>;
10
+ type RequestParams = z.infer<typeof RequestParamsSchema>;
11
+ const ResponseSchema: z.ZodObject<{
12
+ data: z.ZodObject<{
13
+ uuid: z.ZodString;
14
+ siteId: z.ZodString;
15
+ userInput: z.ZodString;
16
+ aiResponse: z.ZodNullable<z.ZodString>;
17
+ reaction: z.ZodNullable<z.ZodNativeEnum<typeof import("../..").USER_REACTION>>;
18
+ dislikeReason: z.ZodNullable<z.ZodString>;
19
+ title: z.ZodString;
20
+ status: z.ZodNativeEnum<typeof import("../..").JOB_STATUS>;
21
+ error: z.ZodNullable<z.ZodString>;
22
+ internalError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ modelId: z.ZodString;
24
+ voiceId: z.ZodString;
25
+ price: z.ZodNumber;
26
+ duration: z.ZodNumber;
27
+ userId: z.ZodNullable<z.ZodString>;
28
+ unregisteredUserId: z.ZodNullable<z.ZodString>;
29
+ tokenReservationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ attempts: z.ZodDefault<z.ZodArray<z.ZodObject<{
31
+ order: z.ZodNumber;
32
+ status: z.ZodNativeEnum<typeof import("../..").JOB_STATUS>;
33
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ timestamp: z.ZodString;
35
+ }, "strip", z.ZodTypeAny, {
36
+ status: import("../..").JOB_STATUS;
37
+ order: number;
38
+ timestamp: string;
39
+ error?: string | null | undefined;
40
+ }, {
41
+ status: import("../..").JOB_STATUS;
42
+ order: number;
43
+ timestamp: string;
44
+ error?: string | null | undefined;
45
+ }>, "many">>;
46
+ params: z.ZodObject<{
47
+ speed: z.ZodOptional<z.ZodNumber>;
48
+ similarity: z.ZodOptional<z.ZodNumber>;
49
+ stability: z.ZodOptional<z.ZodNumber>;
50
+ style: z.ZodOptional<z.ZodNumber>;
51
+ language: z.ZodOptional<z.ZodString>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ speed?: number | undefined;
54
+ stability?: number | undefined;
55
+ similarity?: number | undefined;
56
+ style?: number | undefined;
57
+ language?: string | undefined;
58
+ }, {
59
+ speed?: number | undefined;
60
+ stability?: number | undefined;
61
+ similarity?: number | undefined;
62
+ style?: number | undefined;
63
+ language?: string | undefined;
64
+ }>;
65
+ isDeleted: z.ZodBoolean;
66
+ createdAt: z.ZodDate;
67
+ updatedAt: z.ZodDate;
68
+ completedAt: z.ZodNullable<z.ZodDate>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ price: number;
71
+ uuid: string;
72
+ siteId: string;
73
+ status: import("../..").JOB_STATUS;
74
+ params: {
75
+ speed?: number | undefined;
76
+ stability?: number | undefined;
77
+ similarity?: number | undefined;
78
+ style?: number | undefined;
79
+ language?: string | undefined;
80
+ };
81
+ duration: number;
82
+ title: string;
83
+ createdAt: Date;
84
+ updatedAt: Date;
85
+ error: string | null;
86
+ modelId: string;
87
+ reaction: import("../..").USER_REACTION | null;
88
+ dislikeReason: string | null;
89
+ attempts: {
90
+ status: import("../..").JOB_STATUS;
91
+ order: number;
92
+ timestamp: string;
93
+ error?: string | null | undefined;
94
+ }[];
95
+ userId: string | null;
96
+ unregisteredUserId: string | null;
97
+ isDeleted: boolean;
98
+ completedAt: Date | null;
99
+ aiResponse: string | null;
100
+ userInput: string;
101
+ voiceId: string;
102
+ internalError?: string | null | undefined;
103
+ tokenReservationId?: string | null | undefined;
104
+ }, {
105
+ price: number;
106
+ uuid: string;
107
+ siteId: string;
108
+ status: import("../..").JOB_STATUS;
109
+ params: {
110
+ speed?: number | undefined;
111
+ stability?: number | undefined;
112
+ similarity?: number | undefined;
113
+ style?: number | undefined;
114
+ language?: string | undefined;
115
+ };
116
+ duration: number;
117
+ title: string;
118
+ createdAt: Date;
119
+ updatedAt: Date;
120
+ error: string | null;
121
+ modelId: string;
122
+ reaction: import("../..").USER_REACTION | null;
123
+ dislikeReason: string | null;
124
+ userId: string | null;
125
+ unregisteredUserId: string | null;
126
+ isDeleted: boolean;
127
+ completedAt: Date | null;
128
+ aiResponse: string | null;
129
+ userInput: string;
130
+ voiceId: string;
131
+ attempts?: {
132
+ status: import("../..").JOB_STATUS;
133
+ order: number;
134
+ timestamp: string;
135
+ error?: string | null | undefined;
136
+ }[] | undefined;
137
+ internalError?: string | null | undefined;
138
+ tokenReservationId?: string | null | undefined;
139
+ }>;
140
+ }, "strip", z.ZodTypeAny, {
141
+ data: {
142
+ price: number;
143
+ uuid: string;
144
+ siteId: string;
145
+ status: import("../..").JOB_STATUS;
146
+ params: {
147
+ speed?: number | undefined;
148
+ stability?: number | undefined;
149
+ similarity?: number | undefined;
150
+ style?: number | undefined;
151
+ language?: string | undefined;
152
+ };
153
+ duration: number;
154
+ title: string;
155
+ createdAt: Date;
156
+ updatedAt: Date;
157
+ error: string | null;
158
+ modelId: string;
159
+ reaction: import("../..").USER_REACTION | null;
160
+ dislikeReason: string | null;
161
+ attempts: {
162
+ status: import("../..").JOB_STATUS;
163
+ order: number;
164
+ timestamp: string;
165
+ error?: string | null | undefined;
166
+ }[];
167
+ userId: string | null;
168
+ unregisteredUserId: string | null;
169
+ isDeleted: boolean;
170
+ completedAt: Date | null;
171
+ aiResponse: string | null;
172
+ userInput: string;
173
+ voiceId: string;
174
+ internalError?: string | null | undefined;
175
+ tokenReservationId?: string | null | undefined;
176
+ };
177
+ }, {
178
+ data: {
179
+ price: number;
180
+ uuid: string;
181
+ siteId: string;
182
+ status: import("../..").JOB_STATUS;
183
+ params: {
184
+ speed?: number | undefined;
185
+ stability?: number | undefined;
186
+ similarity?: number | undefined;
187
+ style?: number | undefined;
188
+ language?: string | undefined;
189
+ };
190
+ duration: number;
191
+ title: string;
192
+ createdAt: Date;
193
+ updatedAt: Date;
194
+ error: string | null;
195
+ modelId: string;
196
+ reaction: import("../..").USER_REACTION | null;
197
+ dislikeReason: string | null;
198
+ userId: string | null;
199
+ unregisteredUserId: string | null;
200
+ isDeleted: boolean;
201
+ completedAt: Date | null;
202
+ aiResponse: string | null;
203
+ userInput: string;
204
+ voiceId: string;
205
+ attempts?: {
206
+ status: import("../..").JOB_STATUS;
207
+ order: number;
208
+ timestamp: string;
209
+ error?: string | null | undefined;
210
+ }[] | undefined;
211
+ internalError?: string | null | undefined;
212
+ tokenReservationId?: string | null | undefined;
213
+ };
214
+ }>;
215
+ type Response = z.infer<typeof ResponseSchema>;
216
+ }
217
+ //# sourceMappingURL=get-tts-job.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tts-job.command.d.ts","sourceRoot":"","sources":["../../../queries/tts/get-tts-job.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,mBAAmB;;;;;;MAE9B,CAAC;IACH,KAAY,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAEzD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetTTSJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var GetTTSJobCommand;
7
+ (function (GetTTSJobCommand) {
8
+ GetTTSJobCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ GetTTSJobCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.TTSJobSchema,
13
+ });
14
+ })(GetTTSJobCommand || (exports.GetTTSJobCommand = GetTTSJobCommand = {}));
@@ -0,0 +1,4 @@
1
+ export * from './get-tts-config.command';
2
+ export * from './get-tts-job.command';
3
+ export * from './find-tts-jobs.command';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../queries/tts/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,19 @@
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("./get-tts-config.command"), exports);
18
+ __exportStar(require("./get-tts-job.command"), exports);
19
+ __exportStar(require("./find-tts-jobs.command"), exports);
package/commands/index.ts CHANGED
@@ -9,3 +9,5 @@ export * from './marketplace-card';
9
9
  export * from './file';
10
10
  export * from './unregistered-user';
11
11
  export * from './page';
12
+ export * from './stt';
13
+ export * from './tts';
@@ -22,15 +22,15 @@ export namespace CloudPaymentsCheckCommand {
22
22
 
23
23
  export namespace CloudPaymentsPayCommand {
24
24
  export const RequestSchema = z.object({
25
- transactionId: z.number().optional(),
26
- amount: z.number(),
25
+ transactionId: z.union([z.string(), z.number()]).optional(),
26
+ amount: z.union([z.string(), z.number()]),
27
27
  currency: z.string().optional().default('RUB'),
28
28
  paymentAmount: z.union([z.string(), z.number()]).optional(),
29
29
  paymentCurrency: z.string().optional(),
30
30
  invoiceId: z.string().optional(),
31
31
  accountId: z.string(),
32
32
  subscriptionId: z.string().optional(),
33
- data: JsonValueSchema.optional(),
33
+ data: z.union([JsonValueSchema, z.string()]).optional(),
34
34
  });
35
35
  export type Request = z.infer<typeof RequestSchema>;
36
36
 
@@ -43,7 +43,7 @@ export namespace CloudPaymentsRecurrentCommand {
43
43
  id: z.string(),
44
44
  accountId: z.string(),
45
45
  status: z.string(),
46
- failedTransactionsNumber: z.number().optional(),
46
+ failedTransactionsNumber: z.union([z.string(), z.number()]).optional(),
47
47
  lastTransactionDate: z.string().optional(),
48
48
  });
49
49
  export type Request = z.infer<typeof RequestSchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DeleteAllSTTJobsCommand {
4
+ export const ResponseSchema = z.object({
5
+ data: z.boolean(),
6
+ });
7
+ export type Response = z.infer<typeof ResponseSchema>;
8
+ }
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DeleteSTTJobByUuidCommand {
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.object({
10
+ data: z.boolean(),
11
+ });
12
+ export type Response = z.infer<typeof ResponseSchema>;
13
+ }
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ import { STTJobSchema } from '../../models';
3
+
4
+ export namespace ExecuteSTTCommand {
5
+ export const RequestSchema = z.object({
6
+ fileId: z.string().uuid(),
7
+ modelId: z.string().uuid(),
8
+ });
9
+ export type Request = z.infer<typeof RequestSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: STTJobSchema,
13
+ });
14
+ export type Response = z.infer<typeof ResponseSchema>;
15
+ }
@@ -0,0 +1,6 @@
1
+ export * from './execute-stt.command';
2
+ export * from './retry-stt-job.command';
3
+ export * from './set-reaction-to-stt-job.command';
4
+ export * from './update-stt-job-title.command';
5
+ export * from './delete-stt-job-by-uuid.command';
6
+ export * from './delete-all-stt-jobs.command';
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { STTJobSchema } from '../../models';
3
+
4
+ export namespace RetrySTTJobCommand {
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,21 @@
1
+ import { z } from 'zod';
2
+ import { STTJobSchema } from '../../models';
3
+ import { USER_REACTION } from '../../constants';
4
+
5
+ export namespace SetReactionToSTTJobCommand {
6
+ export const RequestParamsSchema = z.object({
7
+ uuid: z.string().uuid(),
8
+ });
9
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
10
+
11
+ export const RequestSchema = z.object({
12
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
13
+ dislikeReason: z.string().nullable().optional(),
14
+ });
15
+ export type Request = z.infer<typeof RequestSchema>;
16
+
17
+ export const ResponseSchema = z.object({
18
+ data: STTJobSchema,
19
+ });
20
+ export type Response = z.infer<typeof ResponseSchema>;
21
+ }
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { STTJobSchema } from '../../models';
3
+
4
+ export namespace UpdateSTTJobTitleCommand {
5
+ export const RequestParamsSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ });
8
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
9
+
10
+ export const RequestSchema = z.object({
11
+ title: z.string().min(1).max(200),
12
+ });
13
+ export type Request = z.infer<typeof RequestSchema>;
14
+
15
+ export const ResponseSchema = z.object({
16
+ data: STTJobSchema,
17
+ });
18
+ export type Response = z.infer<typeof ResponseSchema>;
19
+ }
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DeleteAllTTSJobsCommand {
4
+ export const ResponseSchema = z.object({
5
+ data: z.boolean(),
6
+ });
7
+ export type Response = z.infer<typeof ResponseSchema>;
8
+ }
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DeleteTTSJobByUuidCommand {
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.object({
10
+ data: z.boolean(),
11
+ });
12
+ export type Response = z.infer<typeof ResponseSchema>;
13
+ }
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import { TTSJobSchema } from '../../models';
3
+
4
+ export namespace ExecuteTTSCommand {
5
+ export const RequestSchema = z.object({
6
+ modelId: z.string().uuid(),
7
+ voiceId: z.string().uuid(),
8
+ text: z.string().min(1),
9
+ params: z
10
+ .object({
11
+ speed: z.number().optional(),
12
+ similarity: z.number().optional(),
13
+ stability: z.number().optional(),
14
+ style: z.number().optional(),
15
+ language: z.string().optional(),
16
+ })
17
+ .optional()
18
+ .default({}),
19
+ });
20
+ export type Request = z.infer<typeof RequestSchema>;
21
+
22
+ export const ResponseSchema = z.object({
23
+ data: TTSJobSchema,
24
+ });
25
+ export type Response = z.infer<typeof ResponseSchema>;
26
+ }
@@ -0,0 +1,6 @@
1
+ export * from './execute-tts.command';
2
+ export * from './retry-tts-job.command';
3
+ export * from './set-reaction-to-tts-job.command';
4
+ export * from './update-tts-job-title.command';
5
+ export * from './delete-tts-job-by-uuid.command';
6
+ export * from './delete-all-tts-jobs.command';
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { TTSJobSchema } from '../../models';
3
+
4
+ export namespace RetryTTSJobCommand {
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,21 @@
1
+ import { z } from 'zod';
2
+ import { TTSJobSchema } from '../../models';
3
+ import { USER_REACTION } from '../../constants';
4
+
5
+ export namespace SetReactionToTTSJobCommand {
6
+ export const RequestParamsSchema = z.object({
7
+ uuid: z.string().uuid(),
8
+ });
9
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
10
+
11
+ export const RequestSchema = z.object({
12
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
13
+ dislikeReason: z.string().nullable().optional(),
14
+ });
15
+ export type Request = z.infer<typeof RequestSchema>;
16
+
17
+ export const ResponseSchema = z.object({
18
+ data: TTSJobSchema,
19
+ });
20
+ export type Response = z.infer<typeof ResponseSchema>;
21
+ }
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { TTSJobSchema } from '../../models';
3
+
4
+ export namespace UpdateTTSJobTitleCommand {
5
+ export const RequestParamsSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ });
8
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
9
+
10
+ export const RequestSchema = z.object({
11
+ title: z.string().min(1).max(200),
12
+ });
13
+ export type Request = z.infer<typeof RequestSchema>;
14
+
15
+ export const ResponseSchema = z.object({
16
+ data: TTSJobSchema,
17
+ });
18
+ export type Response = z.infer<typeof ResponseSchema>;
19
+ }
@@ -337,6 +337,100 @@ export const ERRORS = {
337
337
  httpCode: 500,
338
338
  },
339
339
 
340
+ // STT
341
+ STT_MODEL_NOT_FOUND: {
342
+ message: 'Модель не найдена',
343
+ code: 'STT_001',
344
+ httpCode: 404,
345
+ },
346
+ STT_MODEL_INACTIVE: {
347
+ message: 'Модель недоступна',
348
+ code: 'STT_002',
349
+ httpCode: 400,
350
+ },
351
+ STT_MODEL_NOT_AVAILABLE: {
352
+ message: 'Модель недоступна для пользователя',
353
+ code: 'STT_003',
354
+ httpCode: 403,
355
+ },
356
+ STT_AUDIO_DURATION_EXCEEDED: {
357
+ message: 'Превышена максимальная длительность аудио',
358
+ code: 'STT_004',
359
+ httpCode: 400,
360
+ },
361
+ STT_FILE_SIZE_EXCEEDED: {
362
+ message: 'Превышен максимальный размер файла',
363
+ code: 'STT_005',
364
+ httpCode: 400,
365
+ },
366
+ STT_JOB_NOT_FOUND: {
367
+ message: 'Запись не найдена',
368
+ code: 'STT_006',
369
+ httpCode: 404,
370
+ },
371
+ STT_JOB_NOT_OWNER: {
372
+ message: 'Недостаточно прав',
373
+ code: 'STT_007',
374
+ httpCode: 403,
375
+ },
376
+ STT_JOB_NOT_IN_FAILED_STATE_TO_RETRY: {
377
+ message: 'Невозможно повторить запрос',
378
+ code: 'STT_008',
379
+ httpCode: 400,
380
+ },
381
+ STT_NOT_ENOUGH_TOKENS: {
382
+ message: 'Недостаточно токенов',
383
+ code: 'STT_009',
384
+ httpCode: 402,
385
+ },
386
+
387
+ // TTS
388
+ TTS_MODEL_NOT_FOUND: {
389
+ message: 'Модель не найдена',
390
+ code: 'TTS_001',
391
+ httpCode: 404,
392
+ },
393
+ TTS_MODEL_INACTIVE: {
394
+ message: 'Модель недоступна',
395
+ code: 'TTS_002',
396
+ httpCode: 400,
397
+ },
398
+ TTS_MODEL_NOT_AVAILABLE: {
399
+ message: 'Модель недоступна для пользователя',
400
+ code: 'TTS_003',
401
+ httpCode: 403,
402
+ },
403
+ TTS_VOICE_NOT_FOUND: {
404
+ message: 'Голос не найден',
405
+ code: 'TTS_004',
406
+ httpCode: 404,
407
+ },
408
+ TTS_INVALID_PARAMS: {
409
+ message: 'Некорректные параметры запроса',
410
+ code: 'TTS_005',
411
+ httpCode: 400,
412
+ },
413
+ TTS_JOB_NOT_FOUND: {
414
+ message: 'Запись не найдена',
415
+ code: 'TTS_006',
416
+ httpCode: 404,
417
+ },
418
+ TTS_JOB_NOT_OWNER: {
419
+ message: 'Недостаточно прав',
420
+ code: 'TTS_007',
421
+ httpCode: 403,
422
+ },
423
+ TTS_JOB_NOT_IN_FAILED_STATE_TO_RETRY: {
424
+ message: 'Невозможно повторить запрос',
425
+ code: 'TTS_008',
426
+ httpCode: 400,
427
+ },
428
+ TTS_NOT_ENOUGH_TOKENS: {
429
+ message: 'Недостаточно токенов',
430
+ code: 'TTS_009',
431
+ httpCode: 402,
432
+ },
433
+
340
434
  // IMAGE EDITOR
341
435
  IMAGE_EDITOR_MODEL_NOT_FOUND: {
342
436
  message: 'Модель редактирования изображений не найдена',
@@ -1,3 +1,4 @@
1
1
  export enum FILE_TYPE {
2
2
  IMAGE = 'image',
3
+ AUDIO = 'audio',
3
4
  }
@@ -2,4 +2,6 @@ export enum TOOL_TYPE {
2
2
  IMAGE_GENERATION = 'image_generation',
3
3
  IMAGE_EDITOR = 'image_editor',
4
4
  MARKETPLACE_CARD = 'marketplace_card',
5
+ STT = 'stt',
6
+ TTS = 'tts',
5
7
  }
@@ -1,3 +1,4 @@
1
1
  export enum USER_TO_SUBSCRIPTION_STATUS {
2
2
  ACTIVE = 'active',
3
+ INACTIVE = 'inactive',
3
4
  }