@purpleschool/gptbot 0.19.17-stage-2 → 0.19.18-stage-2

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 (31) hide show
  1. package/build/commands/agents/agent-dialog/find-agent-dialogs.command.d.ts +1 -0
  2. package/build/commands/agents/agent-dialog/get-agent-dialog-by-id.command.d.ts +1 -0
  3. package/build/commands/agents/agent-dialog/rename-agent-dialog.command.d.ts +1 -0
  4. package/build/commands/agents/agent-dialog/update-agent-dialog-status.command.d.ts +1 -0
  5. package/build/commands/agents/agent-lead/create-agent-lead.command.d.ts +1 -0
  6. package/build/commands/agents/agent-lead/find-agent-leads.command.d.ts +1 -0
  7. package/build/commands/agents/agent-lead/get-agent-lead-by-id.command.d.ts +1 -0
  8. package/build/commands/agents/agent-lead/update-agent-lead.command.d.ts +1 -0
  9. package/build/commands/agents/agent-lead-form/upsert-agent-lead-form.command.js +4 -1
  10. package/build/commands/agents/agents/activate-agent.command.d.ts +1 -0
  11. package/build/commands/agents/agents/create-agent.command.d.ts +2 -0
  12. package/build/commands/agents/agents/create-agent.command.js +1 -0
  13. package/build/commands/agents/agents/find-agents.command.d.ts +1 -0
  14. package/build/commands/agents/agents/get-agent-aggregate.command.d.ts +1 -0
  15. package/build/commands/agents/agents/get-agent-by-id.command.d.ts +1 -0
  16. package/build/commands/agents/agents/stop-agent.command.d.ts +1 -0
  17. package/build/commands/agents/agents/update-agent.command.d.ts +2 -0
  18. package/build/commands/agents/agents/update-agent.command.js +1 -0
  19. package/build/models/agents/agent-aggregate.schema.d.ts +1 -0
  20. package/build/models/agents/agent-dialog-lead.schema.d.ts +1 -0
  21. package/build/models/agents/agent-dialog-lead.schema.js +1 -0
  22. package/build/models/agents/agent-lead-find-result.schema.d.ts +1 -0
  23. package/build/models/agents/agent-lead-form-field.schema.js +8 -3
  24. package/build/models/agents/agent-lead.schema.d.ts +1 -0
  25. package/build/models/agents/agent-lead.schema.js +1 -0
  26. package/build/models/agents/agent.schema.d.ts +1 -0
  27. package/build/models/agents/agent.schema.js +1 -0
  28. package/build/models/agents/dialog-find-result.schema.d.ts +1 -0
  29. package/build/models/agents/dialog-with-messages.schema.d.ts +1 -0
  30. package/build/models/agents/dialog.schema.d.ts +1 -0
  31. package/package.json +1 -1
@@ -45,6 +45,7 @@ export declare namespace FindAgentDialogsCommand {
45
45
  dialogId: z.ZodUUID;
46
46
  leadFormId: z.ZodUUID;
47
47
  data: z.ZodRecord<z.ZodString, z.ZodString>;
48
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
48
49
  isDeleted: z.ZodBoolean;
49
50
  createdAt: z.ZodDate;
50
51
  updatedAt: z.ZodDate;
@@ -36,6 +36,7 @@ export declare namespace GetAgentDialogByIdCommand {
36
36
  dialogId: z.ZodUUID;
37
37
  leadFormId: z.ZodUUID;
38
38
  data: z.ZodRecord<z.ZodString, z.ZodString>;
39
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
39
40
  isDeleted: z.ZodBoolean;
40
41
  createdAt: z.ZodDate;
41
42
  updatedAt: z.ZodDate;
@@ -38,6 +38,7 @@ export declare namespace RenameAgentDialogCommand {
38
38
  dialogId: z.ZodUUID;
39
39
  leadFormId: z.ZodUUID;
40
40
  data: z.ZodRecord<z.ZodString, z.ZodString>;
41
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
41
42
  isDeleted: z.ZodBoolean;
42
43
  createdAt: z.ZodDate;
43
44
  updatedAt: z.ZodDate;
@@ -41,6 +41,7 @@ export declare namespace UpdateAgentDialogStatusCommand {
41
41
  dialogId: z.ZodUUID;
42
42
  leadFormId: z.ZodUUID;
43
43
  data: z.ZodRecord<z.ZodString, z.ZodString>;
44
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
44
45
  isDeleted: z.ZodBoolean;
45
46
  createdAt: z.ZodDate;
46
47
  updatedAt: z.ZodDate;
@@ -12,6 +12,7 @@ export declare namespace CreateAgentLeadCommand {
12
12
  dialogId: z.ZodUUID;
13
13
  leadFormId: z.ZodUUID;
14
14
  data: z.ZodRecord<z.ZodString, z.ZodString>;
15
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
15
16
  isDeleted: z.ZodBoolean;
16
17
  createdAt: z.ZodDate;
17
18
  updatedAt: z.ZodDate;
@@ -10,6 +10,7 @@ export declare namespace FindAgentLeadsCommand {
10
10
  dialogId: z.ZodUUID;
11
11
  leadFormId: z.ZodUUID;
12
12
  data: z.ZodRecord<z.ZodString, z.ZodString>;
13
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
13
14
  isDeleted: z.ZodBoolean;
14
15
  createdAt: z.ZodDate;
15
16
  updatedAt: z.ZodDate;
@@ -10,6 +10,7 @@ export declare namespace GetAgentLeadByIdCommand {
10
10
  dialogId: z.ZodUUID;
11
11
  leadFormId: z.ZodUUID;
12
12
  data: z.ZodRecord<z.ZodString, z.ZodString>;
13
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
13
14
  isDeleted: z.ZodBoolean;
14
15
  createdAt: z.ZodDate;
15
16
  updatedAt: z.ZodDate;
@@ -16,6 +16,7 @@ export declare namespace UpdateAgentLeadCommand {
16
16
  dialogId: z.ZodUUID;
17
17
  leadFormId: z.ZodUUID;
18
18
  data: z.ZodRecord<z.ZodString, z.ZodString>;
19
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
19
20
  isDeleted: z.ZodBoolean;
20
21
  createdAt: z.ZodDate;
21
22
  updatedAt: z.ZodDate;
@@ -10,7 +10,10 @@ var UpsertAgentLeadFormCommand;
10
10
  agentId: zod_1.z.uuid(),
11
11
  });
12
12
  UpsertAgentLeadFormCommand.RequestBodySchema = zod_1.z.object({
13
- fields: zod_1.z.array(agent_lead_form_field_schema_1.AgentLeadFormFieldSchema),
13
+ fields: zod_1.z
14
+ .array(agent_lead_form_field_schema_1.AgentLeadFormFieldSchema)
15
+ .max(24)
16
+ .refine((fields) => new Set(fields.map((field) => field.key)).size === fields.length, 'Ключи полей должны быть уникальны'),
14
17
  collectionTrigger: zod_1.z.string().nullable(),
15
18
  });
16
19
  UpsertAgentLeadFormCommand.ResponseSchema = zod_1.z.object({
@@ -23,6 +23,7 @@ export declare namespace ActivateAgentCommand {
23
23
  }, z.core.$strip>;
24
24
  avatar: z.ZodNullable<z.ZodString>;
25
25
  greetingPhrase: z.ZodNullable<z.ZodString>;
26
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
26
27
  instructions: z.ZodNullable<z.ZodString>;
27
28
  aiModelId: z.ZodUUID;
28
29
  status: z.ZodEnum<typeof import("../../..").AGENT_STATUS>;
@@ -6,6 +6,7 @@ export declare namespace CreateAgentCommand {
6
6
  aiModelId: z.ZodUUID;
7
7
  avatarFileId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
8
8
  greetingPhrase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ transferPhrase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
10
  }, z.core.$strip>;
10
11
  type RequestBody = z.infer<typeof RequestBodySchema>;
11
12
  const ResponseSchema: z.ZodObject<{
@@ -27,6 +28,7 @@ export declare namespace CreateAgentCommand {
27
28
  }, z.core.$strip>;
28
29
  avatar: z.ZodNullable<z.ZodString>;
29
30
  greetingPhrase: z.ZodNullable<z.ZodString>;
31
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
30
32
  instructions: z.ZodNullable<z.ZodString>;
31
33
  aiModelId: z.ZodUUID;
32
34
  status: z.ZodEnum<typeof import("../../..").AGENT_STATUS>;
@@ -11,6 +11,7 @@ var CreateAgentCommand;
11
11
  aiModelId: zod_1.z.uuid(),
12
12
  avatarFileId: zod_1.z.uuid().nullable().optional(),
13
13
  greetingPhrase: zod_1.z.string().nullable().optional(),
14
+ transferPhrase: zod_1.z.string().trim().max(2000).nullable().optional(),
14
15
  });
15
16
  CreateAgentCommand.ResponseSchema = zod_1.z.object({
16
17
  data: agent_schema_1.AgentSchema,
@@ -27,6 +27,7 @@ export declare namespace FindAgentsCommand {
27
27
  }, z.core.$strip>;
28
28
  avatar: z.ZodNullable<z.ZodString>;
29
29
  greetingPhrase: z.ZodNullable<z.ZodString>;
30
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
30
31
  instructions: z.ZodNullable<z.ZodString>;
31
32
  aiModelId: z.ZodUUID;
32
33
  status: z.ZodEnum<typeof import("../../..").AGENT_STATUS>;
@@ -32,6 +32,7 @@ export declare namespace GetAgentAggregateCommand {
32
32
  }, z.core.$strip>;
33
33
  avatar: z.ZodNullable<z.ZodString>;
34
34
  greetingPhrase: z.ZodNullable<z.ZodString>;
35
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
35
36
  instructions: z.ZodNullable<z.ZodString>;
36
37
  aiModelId: z.ZodUUID;
37
38
  status: z.ZodEnum<typeof import("../../..").AGENT_STATUS>;
@@ -23,6 +23,7 @@ export declare namespace GetAgentByIdCommand {
23
23
  }, z.core.$strip>;
24
24
  avatar: z.ZodNullable<z.ZodString>;
25
25
  greetingPhrase: z.ZodNullable<z.ZodString>;
26
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
26
27
  instructions: z.ZodNullable<z.ZodString>;
27
28
  aiModelId: z.ZodUUID;
28
29
  status: z.ZodEnum<typeof import("../../..").AGENT_STATUS>;
@@ -23,6 +23,7 @@ export declare namespace StopAgentCommand {
23
23
  }, z.core.$strip>;
24
24
  avatar: z.ZodNullable<z.ZodString>;
25
25
  greetingPhrase: z.ZodNullable<z.ZodString>;
26
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
26
27
  instructions: z.ZodNullable<z.ZodString>;
27
28
  aiModelId: z.ZodUUID;
28
29
  status: z.ZodEnum<typeof import("../../..").AGENT_STATUS>;
@@ -22,6 +22,7 @@ export declare namespace UpdateAgentCommand {
22
22
  }, z.core.$strip>>;
23
23
  avatarFileId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
24
24
  greetingPhrase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ transferPhrase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
26
  instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
27
  aiModelId: z.ZodOptional<z.ZodUUID>;
27
28
  isHumanHelp: z.ZodOptional<z.ZodBoolean>;
@@ -49,6 +50,7 @@ export declare namespace UpdateAgentCommand {
49
50
  }, z.core.$strip>;
50
51
  avatar: z.ZodNullable<z.ZodString>;
51
52
  greetingPhrase: z.ZodNullable<z.ZodString>;
53
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
52
54
  instructions: z.ZodNullable<z.ZodString>;
53
55
  aiModelId: z.ZodUUID;
54
56
  status: z.ZodEnum<typeof AGENT_STATUS>;
@@ -18,6 +18,7 @@ var UpdateAgentCommand;
18
18
  icons: icon_variants_schema_1.IconVariantsSchema.optional(),
19
19
  avatarFileId: zod_1.z.uuid().nullable().optional(),
20
20
  greetingPhrase: zod_1.z.string().nullable().optional(),
21
+ transferPhrase: zod_1.z.string().trim().max(2000).nullable().optional(),
21
22
  instructions: zod_1.z.string().nullable().optional(),
22
23
  aiModelId: zod_1.z.uuid().optional(),
23
24
  isHumanHelp: zod_1.z.boolean().optional(),
@@ -74,6 +74,7 @@ export declare const AgentAggregateSchema: z.ZodObject<{
74
74
  }, z.core.$strip>;
75
75
  avatar: z.ZodNullable<z.ZodString>;
76
76
  greetingPhrase: z.ZodNullable<z.ZodString>;
77
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
77
78
  instructions: z.ZodNullable<z.ZodString>;
78
79
  aiModelId: z.ZodUUID;
79
80
  status: z.ZodEnum<typeof import("../..").AGENT_STATUS>;
@@ -4,6 +4,7 @@ export declare const AgentDialogLeadSchema: z.ZodObject<{
4
4
  dialogId: z.ZodUUID;
5
5
  leadFormId: z.ZodUUID;
6
6
  data: z.ZodRecord<z.ZodString, z.ZodString>;
7
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
7
8
  isDeleted: z.ZodBoolean;
8
9
  createdAt: z.ZodDate;
9
10
  updatedAt: z.ZodDate;
@@ -7,6 +7,7 @@ exports.AgentDialogLeadSchema = zod_1.z.object({
7
7
  dialogId: zod_1.z.uuid(),
8
8
  leadFormId: zod_1.z.uuid(),
9
9
  data: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
10
+ fieldLabels: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).nullable().optional(),
10
11
  isDeleted: zod_1.z.boolean(),
11
12
  createdAt: zod_1.z.date(),
12
13
  updatedAt: zod_1.z.date(),
@@ -5,6 +5,7 @@ export declare const AgentLeadFindResultSchema: z.ZodObject<{
5
5
  dialogId: z.ZodUUID;
6
6
  leadFormId: z.ZodUUID;
7
7
  data: z.ZodRecord<z.ZodString, z.ZodString>;
8
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
8
9
  isDeleted: z.ZodBoolean;
9
10
  createdAt: z.ZodDate;
10
11
  updatedAt: z.ZodDate;
@@ -3,8 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgentLeadFormFieldSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.AgentLeadFormFieldSchema = zod_1.z.object({
6
- key: zod_1.z.string(),
7
- name: zod_1.z.string(),
8
- integrationName: zod_1.z.string().optional(),
6
+ key: zod_1.z
7
+ .string()
8
+ .trim()
9
+ .min(1)
10
+ .max(100)
11
+ .refine((key) => !['__proto__', 'constructor', 'prototype'].includes(key)),
12
+ name: zod_1.z.string().trim().min(1).max(100),
13
+ integrationName: zod_1.z.string().trim().min(1).max(100).optional(),
9
14
  required: zod_1.z.boolean().optional(),
10
15
  });
@@ -4,6 +4,7 @@ export declare const AgentLeadSchema: z.ZodObject<{
4
4
  dialogId: z.ZodUUID;
5
5
  leadFormId: z.ZodUUID;
6
6
  data: z.ZodRecord<z.ZodString, z.ZodString>;
7
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
7
8
  isDeleted: z.ZodBoolean;
8
9
  createdAt: z.ZodDate;
9
10
  updatedAt: z.ZodDate;
@@ -7,6 +7,7 @@ exports.AgentLeadSchema = zod_1.z.object({
7
7
  dialogId: zod_1.z.uuid(),
8
8
  leadFormId: zod_1.z.uuid(),
9
9
  data: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
10
+ fieldLabels: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).nullable().optional(),
10
11
  isDeleted: zod_1.z.boolean(),
11
12
  createdAt: zod_1.z.date(),
12
13
  updatedAt: zod_1.z.date(),
@@ -19,6 +19,7 @@ export declare const AgentSchema: z.ZodObject<{
19
19
  }, z.core.$strip>;
20
20
  avatar: z.ZodNullable<z.ZodString>;
21
21
  greetingPhrase: z.ZodNullable<z.ZodString>;
22
+ transferPhrase: z.ZodDefault<z.ZodNullable<z.ZodString>>;
22
23
  instructions: z.ZodNullable<z.ZodString>;
23
24
  aiModelId: z.ZodUUID;
24
25
  status: z.ZodEnum<typeof AGENT_STATUS>;
@@ -14,6 +14,7 @@ exports.AgentSchema = zod_1.z.object({
14
14
  icons: icon_variants_schema_1.IconVariantsSchema,
15
15
  avatar: zod_1.z.string().nullable(),
16
16
  greetingPhrase: zod_1.z.string().nullable(),
17
+ transferPhrase: zod_1.z.string().nullable().default(null),
17
18
  instructions: zod_1.z.string().nullable(),
18
19
  aiModelId: zod_1.z.uuid(),
19
20
  status: zod_1.z.enum(agent_status_enum_1.AGENT_STATUS),
@@ -29,6 +29,7 @@ export declare const DialogFindResultSchema: z.ZodObject<{
29
29
  dialogId: z.ZodUUID;
30
30
  leadFormId: z.ZodUUID;
31
31
  data: z.ZodRecord<z.ZodString, z.ZodString>;
32
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
32
33
  isDeleted: z.ZodBoolean;
33
34
  createdAt: z.ZodDate;
34
35
  updatedAt: z.ZodDate;
@@ -28,6 +28,7 @@ export declare const DialogWithMessagesSchema: z.ZodObject<{
28
28
  dialogId: z.ZodUUID;
29
29
  leadFormId: z.ZodUUID;
30
30
  data: z.ZodRecord<z.ZodString, z.ZodString>;
31
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
31
32
  isDeleted: z.ZodBoolean;
32
33
  createdAt: z.ZodDate;
33
34
  updatedAt: z.ZodDate;
@@ -29,6 +29,7 @@ export declare const DialogSchema: z.ZodObject<{
29
29
  dialogId: z.ZodUUID;
30
30
  leadFormId: z.ZodUUID;
31
31
  data: z.ZodRecord<z.ZodString, z.ZodString>;
32
+ fieldLabels: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
32
33
  isDeleted: z.ZodBoolean;
33
34
  createdAt: z.ZodDate;
34
35
  updatedAt: z.ZodDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.19.17-stage-2",
3
+ "version": "0.19.18-stage-2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",