@purpleschool/gptbot 0.13.34 → 0.13.35

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.
@@ -8,10 +8,15 @@ var SendAgentDialogAdminReplyCommand;
8
8
  dialogId: zod_1.z.string().uuid(),
9
9
  });
10
10
  SendAgentDialogAdminReplyCommand.RequestQuerySchema = zod_1.z.object({});
11
- SendAgentDialogAdminReplyCommand.RequestBodySchema = zod_1.z.object({
11
+ SendAgentDialogAdminReplyCommand.RequestBodySchema = zod_1.z
12
+ .object({
12
13
  text: zod_1.z.string().optional(),
13
14
  images: zod_1.z.array(zod_1.z.string()).default([]),
14
- attachments: zod_1.z.array(zod_1.z.string()).optional(),
15
+ fileIds: zod_1.z.array(zod_1.z.string().uuid()).default([]),
16
+ })
17
+ .refine((data) => data.text || data.images.length > 0 || data.fileIds.length > 0, {
18
+ message: 'Message must contain text, images, or files',
19
+ path: ['text'],
15
20
  });
16
21
  SendAgentDialogAdminReplyCommand.ResponseSchema = zod_1.z.object({
17
22
  data: zod_1.z.object({
@@ -9,11 +9,16 @@ export namespace SendAgentDialogAdminReplyCommand {
9
9
  export const RequestQuerySchema = z.object({});
10
10
  export type RequestQuery = z.infer<typeof RequestQuerySchema>;
11
11
 
12
- export const RequestBodySchema = z.object({
13
- text: z.string().optional(),
14
- images: z.array(z.string()).default([]),
15
- attachments: z.array(z.string()).optional(),
16
- });
12
+ export const RequestBodySchema = z
13
+ .object({
14
+ text: z.string().optional(),
15
+ images: z.array(z.string()).default([]),
16
+ fileIds: z.array(z.string().uuid()).default([]),
17
+ })
18
+ .refine((data) => data.text || data.images.length > 0 || data.fileIds.length > 0, {
19
+ message: 'Message must contain text, images, or files',
20
+ path: ['text'],
21
+ });
17
22
  export type RequestBody = z.infer<typeof RequestBodySchema>;
18
23
 
19
24
  export const ResponseSchema = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.13.34",
3
+ "version": "0.13.35",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",