@purpleschool/multisite 0.0.35 → 0.0.41

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 (140) hide show
  1. package/api/controller/http/catalog.ts +6 -0
  2. package/api/controller/http/file.ts +1 -0
  3. package/api/controller/http/index.ts +2 -0
  4. package/api/controller/http/text-chat.ts +18 -0
  5. package/build/api/controller/http/catalog.d.ts +7 -0
  6. package/build/api/controller/http/catalog.d.ts.map +1 -0
  7. package/build/api/controller/http/catalog.js +9 -0
  8. package/build/api/controller/http/file.d.ts +1 -0
  9. package/build/api/controller/http/file.d.ts.map +1 -1
  10. package/build/api/controller/http/file.js +1 -0
  11. package/build/api/controller/http/index.d.ts +2 -0
  12. package/build/api/controller/http/index.d.ts.map +1 -1
  13. package/build/api/controller/http/index.js +2 -0
  14. package/build/api/controller/http/text-chat.d.ts +18 -0
  15. package/build/api/controller/http/text-chat.d.ts.map +1 -0
  16. package/build/api/controller/http/text-chat.js +20 -0
  17. package/build/commands/auth/verify-email.command.d.ts.map +1 -1
  18. package/build/commands/auth/verify-email.command.js +2 -1
  19. package/build/commands/catalog/index.d.ts +156 -0
  20. package/build/commands/catalog/index.d.ts.map +1 -0
  21. package/build/commands/catalog/index.js +23 -0
  22. package/build/commands/index.d.ts +2 -0
  23. package/build/commands/index.d.ts.map +1 -1
  24. package/build/commands/index.js +2 -0
  25. package/build/commands/page/create-page.command.d.ts +8 -0
  26. package/build/commands/page/create-page.command.d.ts.map +1 -1
  27. package/build/commands/page/find-page-by-alias.command.d.ts +16 -0
  28. package/build/commands/page/find-page-by-alias.command.d.ts.map +1 -1
  29. package/build/commands/page/find-page-by-criteria.command.d.ts +5 -0
  30. package/build/commands/page/find-page-by-criteria.command.d.ts.map +1 -1
  31. package/build/commands/page/find-page.command.d.ts +11 -0
  32. package/build/commands/page/find-page.command.d.ts.map +1 -1
  33. package/build/commands/page/update-page.command.d.ts +8 -0
  34. package/build/commands/page/update-page.command.d.ts.map +1 -1
  35. package/build/commands/product/fast-buy-product.command.d.ts.map +1 -1
  36. package/build/commands/product/fast-buy-product.command.js +2 -1
  37. package/build/commands/subscription/fast-buy-subscription.command.d.ts.map +1 -1
  38. package/build/commands/subscription/fast-buy-subscription.command.js +2 -1
  39. package/build/commands/text-chat/category.d.ts +321 -0
  40. package/build/commands/text-chat/category.d.ts.map +1 -0
  41. package/build/commands/text-chat/category.js +29 -0
  42. package/build/commands/text-chat/index.d.ts +292 -0
  43. package/build/commands/text-chat/index.d.ts.map +1 -0
  44. package/build/commands/text-chat/index.js +73 -0
  45. package/build/constants/catalog.d.ts +5 -0
  46. package/build/constants/catalog.d.ts.map +1 -0
  47. package/build/constants/catalog.js +8 -0
  48. package/build/constants/errors/errors.d.ts +72 -0
  49. package/build/constants/errors/errors.d.ts.map +1 -1
  50. package/build/constants/errors/errors.js +72 -0
  51. package/build/constants/files/enums/file-type.enum.d.ts +3 -1
  52. package/build/constants/files/enums/file-type.enum.d.ts.map +1 -1
  53. package/build/constants/files/enums/file-type.enum.js +2 -0
  54. package/build/constants/index.d.ts +3 -0
  55. package/build/constants/index.d.ts.map +1 -1
  56. package/build/constants/index.js +3 -0
  57. package/build/constants/text-chat/attachments.d.ts +12 -0
  58. package/build/constants/text-chat/attachments.d.ts.map +1 -0
  59. package/build/constants/text-chat/attachments.js +52 -0
  60. package/build/constants/text-chat/index.d.ts +38 -0
  61. package/build/constants/text-chat/index.d.ts.map +1 -0
  62. package/build/constants/text-chat/index.js +59 -0
  63. package/build/constants/text-provider/index.d.ts +37 -0
  64. package/build/constants/text-provider/index.d.ts.map +1 -0
  65. package/build/constants/text-provider/index.js +46 -0
  66. package/build/constants/tools/enums/tool-type.enum.d.ts +1 -0
  67. package/build/constants/tools/enums/tool-type.enum.d.ts.map +1 -1
  68. package/build/constants/tools/enums/tool-type.enum.js +1 -0
  69. package/build/helpers/index.d.ts +1 -0
  70. package/build/helpers/index.d.ts.map +1 -1
  71. package/build/helpers/index.js +1 -0
  72. package/build/helpers/text-chat/index.d.ts +23 -0
  73. package/build/helpers/text-chat/index.d.ts.map +1 -0
  74. package/build/helpers/text-chat/index.js +91 -0
  75. package/build/models/catalog/index.d.ts +181 -0
  76. package/build/models/catalog/index.d.ts.map +1 -0
  77. package/build/models/catalog/index.js +36 -0
  78. package/build/models/index.d.ts +2 -0
  79. package/build/models/index.d.ts.map +1 -1
  80. package/build/models/index.js +2 -0
  81. package/build/models/page.schema.d.ts +6 -0
  82. package/build/models/page.schema.d.ts.map +1 -1
  83. package/build/models/page.schema.js +1 -0
  84. package/build/models/text-chat/category.schema.d.ts +79 -0
  85. package/build/models/text-chat/category.schema.d.ts.map +1 -0
  86. package/build/models/text-chat/category.schema.js +38 -0
  87. package/build/models/text-chat/index.d.ts +319 -0
  88. package/build/models/text-chat/index.d.ts.map +1 -0
  89. package/build/models/text-chat/index.js +79 -0
  90. package/build/models/text-chat/provider-config.schema.d.ts +92 -0
  91. package/build/models/text-chat/provider-config.schema.d.ts.map +1 -0
  92. package/build/models/text-chat/provider-config.schema.js +42 -0
  93. package/build/models/text-chat/stream.schema.d.ts +83 -0
  94. package/build/models/text-chat/stream.schema.d.ts.map +1 -0
  95. package/build/models/text-chat/stream.schema.js +24 -0
  96. package/build/models/user.schema.d.ts +1 -0
  97. package/build/models/user.schema.d.ts.map +1 -1
  98. package/build/models/user.schema.js +3 -2
  99. package/build/queries/catalog/index.d.ts +259 -0
  100. package/build/queries/catalog/index.d.ts.map +1 -0
  101. package/build/queries/catalog/index.js +31 -0
  102. package/build/queries/index.d.ts +2 -0
  103. package/build/queries/index.d.ts.map +1 -1
  104. package/build/queries/index.js +2 -0
  105. package/build/queries/text-chat/category.d.ts +297 -0
  106. package/build/queries/text-chat/category.d.ts.map +1 -0
  107. package/build/queries/text-chat/category.js +45 -0
  108. package/build/queries/text-chat/index.d.ts +472 -0
  109. package/build/queries/text-chat/index.d.ts.map +1 -0
  110. package/build/queries/text-chat/index.js +61 -0
  111. package/commands/auth/verify-email.command.ts +2 -1
  112. package/commands/catalog/index.ts +26 -0
  113. package/commands/index.ts +2 -0
  114. package/commands/product/fast-buy-product.command.ts +2 -1
  115. package/commands/subscription/fast-buy-subscription.command.ts +2 -1
  116. package/commands/text-chat/category.ts +42 -0
  117. package/commands/text-chat/index.ts +71 -0
  118. package/constants/catalog.ts +4 -0
  119. package/constants/errors/errors.ts +73 -0
  120. package/constants/files/enums/file-type.enum.ts +2 -0
  121. package/constants/index.ts +3 -0
  122. package/constants/text-chat/attachments.ts +55 -0
  123. package/constants/text-chat/index.ts +43 -0
  124. package/constants/text-provider/index.ts +42 -0
  125. package/constants/tools/enums/tool-type.enum.ts +1 -0
  126. package/helpers/index.ts +1 -0
  127. package/helpers/text-chat/index.ts +91 -0
  128. package/models/catalog/index.ts +35 -0
  129. package/models/index.ts +2 -0
  130. package/models/page.schema.ts +1 -0
  131. package/models/text-chat/category.schema.ts +40 -0
  132. package/models/text-chat/index.ts +82 -0
  133. package/models/text-chat/provider-config.schema.ts +47 -0
  134. package/models/text-chat/stream.schema.ts +43 -0
  135. package/models/user.schema.ts +3 -1
  136. package/package.json +1 -1
  137. package/queries/catalog/index.ts +29 -0
  138. package/queries/index.ts +2 -0
  139. package/queries/text-chat/category.ts +51 -0
  140. package/queries/text-chat/index.ts +56 -0
@@ -0,0 +1,297 @@
1
+ import { z } from 'zod';
2
+ import { TOOL_TYPE } from '../../constants/tools';
3
+ import { TEXT_CHAT_CATEGORY_SCOPE } from '../../constants/text-chat';
4
+ export declare namespace FindTextChatCategoriesCommand {
5
+ const RequestQuerySchema: z.ZodObject<{
6
+ limit: z.ZodDefault<z.ZodNumber>;
7
+ offset: z.ZodDefault<z.ZodNumber>;
8
+ }, "strict", z.ZodTypeAny, {
9
+ limit: number;
10
+ offset: number;
11
+ }, {
12
+ limit?: number | undefined;
13
+ offset?: number | undefined;
14
+ }>;
15
+ type RequestQuery = z.infer<typeof RequestQuerySchema>;
16
+ const ResponseSchema: z.ZodObject<{
17
+ data: z.ZodArray<z.ZodObject<{
18
+ uuid: z.ZodString;
19
+ title: z.ZodString;
20
+ placeholder: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ uuid: string;
23
+ title: string;
24
+ placeholder: string;
25
+ }, {
26
+ uuid: string;
27
+ title: string;
28
+ placeholder: string;
29
+ }>, "many">;
30
+ meta: z.ZodObject<{
31
+ limit: z.ZodNumber;
32
+ offset: z.ZodNumber;
33
+ total: z.ZodNumber;
34
+ }, "strip", z.ZodTypeAny, {
35
+ limit: number;
36
+ offset: number;
37
+ total: number;
38
+ }, {
39
+ limit: number;
40
+ offset: number;
41
+ total: number;
42
+ }>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ data: {
45
+ uuid: string;
46
+ title: string;
47
+ placeholder: string;
48
+ }[];
49
+ meta: {
50
+ limit: number;
51
+ offset: number;
52
+ total: number;
53
+ };
54
+ }, {
55
+ data: {
56
+ uuid: string;
57
+ title: string;
58
+ placeholder: string;
59
+ }[];
60
+ meta: {
61
+ limit: number;
62
+ offset: number;
63
+ total: number;
64
+ };
65
+ }>;
66
+ type Response = z.infer<typeof ResponseSchema>;
67
+ }
68
+ export declare namespace GetTextChatCategoryCommand {
69
+ const RequestParamsSchema: z.ZodObject<{
70
+ uuid: z.ZodString;
71
+ }, "strict", z.ZodTypeAny, {
72
+ uuid: string;
73
+ }, {
74
+ uuid: string;
75
+ }>;
76
+ type RequestParams = z.infer<typeof RequestParamsSchema>;
77
+ const ResponseSchema: z.ZodObject<{
78
+ data: z.ZodObject<{
79
+ uuid: z.ZodString;
80
+ title: z.ZodString;
81
+ placeholder: z.ZodString;
82
+ }, "strip", z.ZodTypeAny, {
83
+ uuid: string;
84
+ title: string;
85
+ placeholder: string;
86
+ }, {
87
+ uuid: string;
88
+ title: string;
89
+ placeholder: string;
90
+ }>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ data: {
93
+ uuid: string;
94
+ title: string;
95
+ placeholder: string;
96
+ };
97
+ }, {
98
+ data: {
99
+ uuid: string;
100
+ title: string;
101
+ placeholder: string;
102
+ };
103
+ }>;
104
+ type Response = z.infer<typeof ResponseSchema>;
105
+ }
106
+ export declare namespace FindAdminTextChatCategoriesCommand {
107
+ const RequestQuerySchema: z.ZodObject<{
108
+ limit: z.ZodDefault<z.ZodNumber>;
109
+ offset: z.ZodDefault<z.ZodNumber>;
110
+ } & {
111
+ toolType: z.ZodOptional<z.ZodNativeEnum<typeof TOOL_TYPE>>;
112
+ scope: z.ZodDefault<z.ZodNativeEnum<typeof TEXT_CHAT_CATEGORY_SCOPE>>;
113
+ }, "strict", z.ZodTypeAny, {
114
+ limit: number;
115
+ offset: number;
116
+ toolType?: TOOL_TYPE | undefined;
117
+ scope: TEXT_CHAT_CATEGORY_SCOPE;
118
+ }, {
119
+ limit?: number | undefined;
120
+ offset?: number | undefined;
121
+ toolType?: TOOL_TYPE | undefined;
122
+ scope?: TEXT_CHAT_CATEGORY_SCOPE | undefined;
123
+ }>;
124
+ type RequestQuery = z.infer<typeof RequestQuerySchema>;
125
+ const ResponseSchema: z.ZodObject<{
126
+ data: z.ZodArray<z.ZodObject<{
127
+ uuid: z.ZodString;
128
+ title: z.ZodString;
129
+ placeholder: z.ZodString;
130
+ } & {
131
+ siteId: z.ZodString;
132
+ toolType: z.ZodDefault<z.ZodEnum<[TOOL_TYPE.TEXT, TOOL_TYPE.IMAGE_GENERATION, TOOL_TYPE.IMAGE_EDITOR]>>;
133
+ groupId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
134
+ order: z.ZodDefault<z.ZodNumber>;
135
+ prompt: z.ZodNullable<z.ZodString>;
136
+ archivedAt: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
137
+ createdAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
138
+ updatedAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
139
+ }, "strip", z.ZodTypeAny, {
140
+ uuid: string;
141
+ title: string;
142
+ placeholder: string;
143
+ siteId: string;
144
+ toolType: TOOL_TYPE.TEXT | TOOL_TYPE.IMAGE_GENERATION | TOOL_TYPE.IMAGE_EDITOR;
145
+ groupId: string | null;
146
+ order: number;
147
+ prompt: string | null;
148
+ archivedAt: string | Date | null;
149
+ createdAt: string | Date;
150
+ updatedAt: string | Date;
151
+ }, {
152
+ uuid: string;
153
+ title: string;
154
+ placeholder: string;
155
+ siteId: string;
156
+ toolType?: TOOL_TYPE.TEXT | TOOL_TYPE.IMAGE_GENERATION | TOOL_TYPE.IMAGE_EDITOR | undefined;
157
+ groupId?: string | null | undefined;
158
+ order?: number | undefined;
159
+ prompt: string | null;
160
+ archivedAt: string | Date | null;
161
+ createdAt: string | Date;
162
+ updatedAt: string | Date;
163
+ }>, "many">;
164
+ meta: z.ZodObject<{
165
+ limit: z.ZodNumber;
166
+ offset: z.ZodNumber;
167
+ total: z.ZodNumber;
168
+ }, "strip", z.ZodTypeAny, {
169
+ limit: number;
170
+ offset: number;
171
+ total: number;
172
+ }, {
173
+ limit: number;
174
+ offset: number;
175
+ total: number;
176
+ }>;
177
+ }, "strip", z.ZodTypeAny, {
178
+ data: {
179
+ uuid: string;
180
+ title: string;
181
+ placeholder: string;
182
+ siteId: string;
183
+ toolType: TOOL_TYPE.TEXT | TOOL_TYPE.IMAGE_GENERATION | TOOL_TYPE.IMAGE_EDITOR;
184
+ groupId: string | null;
185
+ order: number;
186
+ prompt: string | null;
187
+ archivedAt: string | Date | null;
188
+ createdAt: string | Date;
189
+ updatedAt: string | Date;
190
+ }[];
191
+ meta: {
192
+ limit: number;
193
+ offset: number;
194
+ total: number;
195
+ };
196
+ }, {
197
+ data: {
198
+ uuid: string;
199
+ title: string;
200
+ placeholder: string;
201
+ siteId: string;
202
+ toolType?: TOOL_TYPE.TEXT | TOOL_TYPE.IMAGE_GENERATION | TOOL_TYPE.IMAGE_EDITOR | undefined;
203
+ groupId?: string | null | undefined;
204
+ order?: number | undefined;
205
+ prompt: string | null;
206
+ archivedAt: string | Date | null;
207
+ createdAt: string | Date;
208
+ updatedAt: string | Date;
209
+ }[];
210
+ meta: {
211
+ limit: number;
212
+ offset: number;
213
+ total: number;
214
+ };
215
+ }>;
216
+ type Response = z.infer<typeof ResponseSchema>;
217
+ }
218
+ export declare namespace GetAdminTextChatCategoryCommand {
219
+ const RequestParamsSchema: z.ZodObject<{
220
+ uuid: z.ZodString;
221
+ }, "strict", z.ZodTypeAny, {
222
+ uuid: string;
223
+ }, {
224
+ uuid: string;
225
+ }>;
226
+ type RequestParams = z.infer<typeof RequestParamsSchema>;
227
+ const ResponseSchema: z.ZodObject<{
228
+ data: z.ZodObject<{
229
+ uuid: z.ZodString;
230
+ title: z.ZodString;
231
+ placeholder: z.ZodString;
232
+ } & {
233
+ siteId: z.ZodString;
234
+ toolType: z.ZodDefault<z.ZodEnum<[TOOL_TYPE.TEXT, TOOL_TYPE.IMAGE_GENERATION, TOOL_TYPE.IMAGE_EDITOR]>>;
235
+ groupId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
236
+ order: z.ZodDefault<z.ZodNumber>;
237
+ prompt: z.ZodNullable<z.ZodString>;
238
+ archivedAt: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
239
+ createdAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
240
+ updatedAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ uuid: string;
243
+ title: string;
244
+ placeholder: string;
245
+ siteId: string;
246
+ toolType: TOOL_TYPE.TEXT | TOOL_TYPE.IMAGE_GENERATION | TOOL_TYPE.IMAGE_EDITOR;
247
+ groupId: string | null;
248
+ order: number;
249
+ prompt: string | null;
250
+ archivedAt: string | Date | null;
251
+ createdAt: string | Date;
252
+ updatedAt: string | Date;
253
+ }, {
254
+ uuid: string;
255
+ title: string;
256
+ placeholder: string;
257
+ siteId: string;
258
+ toolType?: TOOL_TYPE.TEXT | TOOL_TYPE.IMAGE_GENERATION | TOOL_TYPE.IMAGE_EDITOR | undefined;
259
+ groupId?: string | null | undefined;
260
+ order?: number | undefined;
261
+ prompt: string | null;
262
+ archivedAt: string | Date | null;
263
+ createdAt: string | Date;
264
+ updatedAt: string | Date;
265
+ }>;
266
+ }, "strip", z.ZodTypeAny, {
267
+ data: {
268
+ uuid: string;
269
+ title: string;
270
+ placeholder: string;
271
+ siteId: string;
272
+ toolType: TOOL_TYPE.TEXT | TOOL_TYPE.IMAGE_GENERATION | TOOL_TYPE.IMAGE_EDITOR;
273
+ groupId: string | null;
274
+ order: number;
275
+ prompt: string | null;
276
+ archivedAt: string | Date | null;
277
+ createdAt: string | Date;
278
+ updatedAt: string | Date;
279
+ };
280
+ }, {
281
+ data: {
282
+ uuid: string;
283
+ title: string;
284
+ placeholder: string;
285
+ siteId: string;
286
+ toolType?: TOOL_TYPE.TEXT | TOOL_TYPE.IMAGE_GENERATION | TOOL_TYPE.IMAGE_EDITOR | undefined;
287
+ groupId?: string | null | undefined;
288
+ order?: number | undefined;
289
+ prompt: string | null;
290
+ archivedAt: string | Date | null;
291
+ createdAt: string | Date;
292
+ updatedAt: string | Date;
293
+ };
294
+ }>;
295
+ type Response = z.infer<typeof ResponseSchema>;
296
+ }
297
+ //# sourceMappingURL=category.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../queries/text-chat/category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAgBrE,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,kBAAkB;;;;;;;;;MAA4B,CAAC;IAC5D,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD;AACD,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,mBAAmB;;;;;;MAAiD,CAAC;IAClF,KAAY,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACzD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;MAAmD,CAAC;IAC/E,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD;AACD,yBAAiB,kCAAkC,CAAC;IACzC,MAAM,kBAAkB;;;;;;;;;;;;;;;;MAGpB,CAAC;IACZ,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD;AACD,yBAAiB,+BAA+B,CAAC;IACtC,MAAM,mBAAmB;;;;;;MAAiD,CAAC;IAClF,KAAY,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACzD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAkD,CAAC;IAC9E,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetAdminTextChatCategoryCommand = exports.FindAdminTextChatCategoriesCommand = exports.GetTextChatCategoryCommand = exports.FindTextChatCategoriesCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const tools_1 = require("../../constants/tools");
6
+ const text_chat_1 = require("../../constants/text-chat");
7
+ const category_schema_1 = require("../../models/text-chat/category.schema");
8
+ const PaginationSchema = zod_1.z.object({
9
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(20),
10
+ offset: zod_1.z.coerce.number().int().min(0).default(0),
11
+ });
12
+ const MetaSchema = zod_1.z.object({
13
+ limit: zod_1.z.number().int().positive(),
14
+ offset: zod_1.z.number().int().nonnegative(),
15
+ total: zod_1.z.number().int().nonnegative(),
16
+ });
17
+ var FindTextChatCategoriesCommand;
18
+ (function (FindTextChatCategoriesCommand) {
19
+ FindTextChatCategoriesCommand.RequestQuerySchema = PaginationSchema.strict();
20
+ FindTextChatCategoriesCommand.ResponseSchema = zod_1.z.object({
21
+ data: zod_1.z.array(category_schema_1.TextChatCategoryPublicSchema),
22
+ meta: MetaSchema,
23
+ });
24
+ })(FindTextChatCategoriesCommand || (exports.FindTextChatCategoriesCommand = FindTextChatCategoriesCommand = {}));
25
+ var GetTextChatCategoryCommand;
26
+ (function (GetTextChatCategoryCommand) {
27
+ GetTextChatCategoryCommand.RequestParamsSchema = zod_1.z.object({ uuid: zod_1.z.string().uuid() }).strict();
28
+ GetTextChatCategoryCommand.ResponseSchema = zod_1.z.object({ data: category_schema_1.TextChatCategoryPublicSchema });
29
+ })(GetTextChatCategoryCommand || (exports.GetTextChatCategoryCommand = GetTextChatCategoryCommand = {}));
30
+ var FindAdminTextChatCategoriesCommand;
31
+ (function (FindAdminTextChatCategoriesCommand) {
32
+ FindAdminTextChatCategoriesCommand.RequestQuerySchema = PaginationSchema.extend({
33
+ toolType: zod_1.z.nativeEnum(tools_1.TOOL_TYPE).optional(),
34
+ scope: zod_1.z.nativeEnum(text_chat_1.TEXT_CHAT_CATEGORY_SCOPE).default(text_chat_1.TEXT_CHAT_CATEGORY_SCOPE.ACTIVE),
35
+ }).strict();
36
+ FindAdminTextChatCategoriesCommand.ResponseSchema = zod_1.z.object({
37
+ data: zod_1.z.array(category_schema_1.TextChatCategoryAdminSchema),
38
+ meta: MetaSchema,
39
+ });
40
+ })(FindAdminTextChatCategoriesCommand || (exports.FindAdminTextChatCategoriesCommand = FindAdminTextChatCategoriesCommand = {}));
41
+ var GetAdminTextChatCategoryCommand;
42
+ (function (GetAdminTextChatCategoryCommand) {
43
+ GetAdminTextChatCategoryCommand.RequestParamsSchema = GetTextChatCategoryCommand.RequestParamsSchema;
44
+ GetAdminTextChatCategoryCommand.ResponseSchema = zod_1.z.object({ data: category_schema_1.TextChatCategoryAdminSchema });
45
+ })(GetAdminTextChatCategoryCommand || (exports.GetAdminTextChatCategoryCommand = GetAdminTextChatCategoryCommand = {}));