@cossistant/types 0.0.30 → 0.0.32

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.
@@ -120,6 +120,7 @@ declare const imagePartSchema: z.ZodObject<{
120
120
  declare const timelinePartEventSchema: z.ZodObject<{
121
121
  type: z.ZodLiteral<"event">;
122
122
  eventType: z.ZodEnum<{
123
+ resolved: "resolved";
123
124
  assigned: "assigned";
124
125
  unassigned: "unassigned";
125
126
  participant_requested: "participant_requested";
@@ -129,7 +130,6 @@ declare const timelinePartEventSchema: z.ZodObject<{
129
130
  priority_changed: "priority_changed";
130
131
  tag_added: "tag_added";
131
132
  tag_removed: "tag_removed";
132
- resolved: "resolved";
133
133
  reopened: "reopened";
134
134
  visitor_blocked: "visitor_blocked";
135
135
  visitor_unblocked: "visitor_unblocked";
@@ -245,6 +245,7 @@ declare const timelineItemPartsSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObje
245
245
  }, z.core.$strip>, z.ZodObject<{
246
246
  type: z.ZodLiteral<"event">;
247
247
  eventType: z.ZodEnum<{
248
+ resolved: "resolved";
248
249
  assigned: "assigned";
249
250
  unassigned: "unassigned";
250
251
  participant_requested: "participant_requested";
@@ -254,7 +255,6 @@ declare const timelineItemPartsSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObje
254
255
  priority_changed: "priority_changed";
255
256
  tag_added: "tag_added";
256
257
  tag_removed: "tag_removed";
257
- resolved: "resolved";
258
258
  reopened: "reopened";
259
259
  visitor_blocked: "visitor_blocked";
260
260
  visitor_unblocked: "visitor_unblocked";
@@ -285,6 +285,7 @@ declare const timelineItemSchema: z.ZodObject<{
285
285
  message: "message";
286
286
  event: "event";
287
287
  identification: "identification";
288
+ tool: "tool";
288
289
  }>;
289
290
  text: z.ZodNullable<z.ZodString>;
290
291
  tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -384,6 +385,7 @@ declare const timelineItemSchema: z.ZodObject<{
384
385
  }, z.core.$strip>, z.ZodObject<{
385
386
  type: z.ZodLiteral<"event">;
386
387
  eventType: z.ZodEnum<{
388
+ resolved: "resolved";
387
389
  assigned: "assigned";
388
390
  unassigned: "unassigned";
389
391
  participant_requested: "participant_requested";
@@ -393,7 +395,6 @@ declare const timelineItemSchema: z.ZodObject<{
393
395
  priority_changed: "priority_changed";
394
396
  tag_added: "tag_added";
395
397
  tag_removed: "tag_removed";
396
- resolved: "resolved";
397
398
  reopened: "reopened";
398
399
  visitor_blocked: "visitor_blocked";
399
400
  visitor_unblocked: "visitor_unblocked";
@@ -457,6 +458,7 @@ declare const getConversationTimelineItemsResponseSchema: z.ZodObject<{
457
458
  message: "message";
458
459
  event: "event";
459
460
  identification: "identification";
461
+ tool: "tool";
460
462
  }>;
461
463
  text: z.ZodNullable<z.ZodString>;
462
464
  tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -556,6 +558,7 @@ declare const getConversationTimelineItemsResponseSchema: z.ZodObject<{
556
558
  }, z.core.$strip>, z.ZodObject<{
557
559
  type: z.ZodLiteral<"event">;
558
560
  eventType: z.ZodEnum<{
561
+ resolved: "resolved";
559
562
  assigned: "assigned";
560
563
  unassigned: "unassigned";
561
564
  participant_requested: "participant_requested";
@@ -565,7 +568,6 @@ declare const getConversationTimelineItemsResponseSchema: z.ZodObject<{
565
568
  priority_changed: "priority_changed";
566
569
  tag_added: "tag_added";
567
570
  tag_removed: "tag_removed";
568
- resolved: "resolved";
569
571
  reopened: "reopened";
570
572
  visitor_blocked: "visitor_blocked";
571
573
  visitor_unblocked: "visitor_unblocked";
@@ -699,6 +701,7 @@ declare const sendTimelineItemRequestSchema: z.ZodObject<{
699
701
  }, z.core.$strip>, z.ZodObject<{
700
702
  type: z.ZodLiteral<"event">;
701
703
  eventType: z.ZodEnum<{
704
+ resolved: "resolved";
702
705
  assigned: "assigned";
703
706
  unassigned: "unassigned";
704
707
  participant_requested: "participant_requested";
@@ -708,7 +711,6 @@ declare const sendTimelineItemRequestSchema: z.ZodObject<{
708
711
  priority_changed: "priority_changed";
709
712
  tag_added: "tag_added";
710
713
  tag_removed: "tag_removed";
711
- resolved: "resolved";
712
714
  reopened: "reopened";
713
715
  visitor_blocked: "visitor_blocked";
714
716
  visitor_unblocked: "visitor_unblocked";
@@ -752,6 +754,7 @@ declare const sendTimelineItemResponseSchema: z.ZodObject<{
752
754
  message: "message";
753
755
  event: "event";
754
756
  identification: "identification";
757
+ tool: "tool";
755
758
  }>;
756
759
  text: z.ZodNullable<z.ZodString>;
757
760
  tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -851,6 +854,7 @@ declare const sendTimelineItemResponseSchema: z.ZodObject<{
851
854
  }, z.core.$strip>, z.ZodObject<{
852
855
  type: z.ZodLiteral<"event">;
853
856
  eventType: z.ZodEnum<{
857
+ resolved: "resolved";
854
858
  assigned: "assigned";
855
859
  unassigned: "unassigned";
856
860
  participant_requested: "participant_requested";
@@ -860,7 +864,6 @@ declare const sendTimelineItemResponseSchema: z.ZodObject<{
860
864
  priority_changed: "priority_changed";
861
865
  tag_added: "tag_added";
862
866
  tag_removed: "tag_removed";
863
- resolved: "resolved";
864
867
  reopened: "reopened";
865
868
  visitor_blocked: "visitor_blocked";
866
869
  visitor_unblocked: "visitor_unblocked";
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../src/api/timeline-item.ts"],"sourcesContent":[],"mappings":";;;cAiBM,kCAAgC,CAAA,CAAA,YAAA,CAAA,CAAA;;IAAhC,UAAA,eAAA,UAiBM,CAAA;;;;;;;;cAKN,gBAAc,CAAA,CAAA;;;EAtBkB,KAAA,eAAA,UAAA,CAAA;IAAA,SAAA,EAAA,WAAA;IAAA,IAAA,EAAA,MAAA;EAsBhC,CAAA,CAAA,CAAA;;cAgBA,qBAAmB,CAAA,CAAA;;;;IAhBL,SAAA,EAAA,WAAA;IAAA,IAAA,EAAA,MAAA;EAgBd,CAAA,CAAA,CAAA;;;;;;;;;;;;cAoBA,i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,eAaV,YAAA,CAAA;;;;;;;MAbmD,QAAA,aAAA;MAAA,KAAA,aAAA,YAAA,cAAA,CAAA;MAe1C,MAAA,eAAA,aAAmC,CAAA;MAIlC,KAAA,WAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiBD,oCAAA,GAAuC,CAAA,CAAE,aAC7C;cAIK,+BAA6B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAtBa,KAAA,eAAA,YAAA,CAAA;MAAA,gBAAA,eAAA,YAAA,CAAA;QAiB3C,UAAA,eAAA,YAAoC,CAAA;UAKnC,UAAA,eAkDV,UAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAES,uBAAA,GAA0B,CAAA,CAAE,aAChC;cAGK,gCAA8B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAxDD,CAAA,eAAA,CAAA,aAAA,CAAA;MAAA,IAAA,cAAA,CAAA,iBAAA,CAAA;MAoD9B,QAAA,aAAuB;MAItB,SAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAUD,wBAAA,GAA2B,CAAA,CAAE,aACjC"}
@@ -117,8 +117,9 @@ const timelineItemSchema = z.object({
117
117
  type: z.enum([
118
118
  ConversationTimelineType.MESSAGE,
119
119
  ConversationTimelineType.EVENT,
120
- ConversationTimelineType.IDENTIFICATION
121
- ]).openapi({ description: "Type of timeline item - message, event, or interactive identification tool" }),
120
+ ConversationTimelineType.IDENTIFICATION,
121
+ ConversationTimelineType.TOOL
122
+ ]).openapi({ description: "Type of timeline item - message, event, identification, or tool call" }),
122
123
  text: z.string().nullable().openapi({ description: "Main text content of the timeline item" }),
123
124
  tool: z.string().nullable().optional().openapi({ description: "Optional tool identifier associated with this timeline item" }),
124
125
  parts: timelineItemPartsSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-item.js","names":[],"sources":["../../src/api/timeline-item.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nimport {\n\tConversationEventType,\n\tConversationTimelineType,\n\tTimelineItemVisibility,\n} from \"../enums\";\n\n// ============================================================================\n// AI SDK v6 COMPATIBLE PART SCHEMAS\n// These follow Vercel AI SDK v6 patterns for UIMessagePart types.\n// Cossistant extensions use providerMetadata.cossistant namespace.\n// ============================================================================\n\n// ----------------------------------------------------------------------------\n// Cossistant Provider Metadata (extension point for all parts)\n// ----------------------------------------------------------------------------\nconst cossistantProviderMetadataSchema = z\n\t.object({\n\t\tcossistant: z\n\t\t\t.object({\n\t\t\t\tvisibility: z.enum([\"public\", \"private\"]).optional().openapi({\n\t\t\t\t\tdescription: \"Part-level visibility control for filtering\",\n\t\t\t\t}),\n\t\t\t\tprogressMessage: z.string().optional().openapi({\n\t\t\t\t\tdescription: \"Custom progress message to display during execution\",\n\t\t\t\t}),\n\t\t\t\tknowledgeId: z.string().optional().openapi({\n\t\t\t\t\tdescription: \"Reference to a Cossistant knowledge entry\",\n\t\t\t\t}),\n\t\t\t})\n\t\t\t.optional(),\n\t})\n\t.passthrough()\n\t.optional();\n\n// ----------------------------------------------------------------------------\n// TEXT PART (AI SDK compatible)\n// ----------------------------------------------------------------------------\nconst textPartSchema = z.object({\n\ttype: z.literal(\"text\").openapi({\n\t\tdescription: \"Text content part - matches AI SDK TextUIPart\",\n\t}),\n\ttext: z.string().openapi({\n\t\tdescription: \"The text content\",\n\t}),\n\tstate: z.enum([\"streaming\", \"done\"]).optional().openapi({\n\t\tdescription:\n\t\t\t\"AI SDK state: 'streaming' = still processing, 'done' = complete\",\n\t}),\n});\n\n// ----------------------------------------------------------------------------\n// REASONING PART (AI SDK compatible - for AI chain-of-thought)\n// ----------------------------------------------------------------------------\nconst reasoningPartSchema = z.object({\n\ttype: z.literal(\"reasoning\").openapi({\n\t\tdescription:\n\t\t\t\"AI reasoning/chain-of-thought - matches AI SDK ReasoningUIPart\",\n\t}),\n\ttext: z.string().openapi({\n\t\tdescription: \"The reasoning text content\",\n\t}),\n\tstate: z.enum([\"streaming\", \"done\"]).optional().openapi({\n\t\tdescription:\n\t\t\t\"AI SDK state: 'streaming' = still processing, 'done' = complete\",\n\t}),\n\tproviderMetadata: cossistantProviderMetadataSchema,\n});\n\n// ----------------------------------------------------------------------------\n// TOOL PART (AI SDK compatible - for tool invocations)\n// AI SDK uses type: `tool-${toolName}` pattern, but we use a generic schema\n// with toolName field for flexibility. Type checking happens at runtime.\n// ----------------------------------------------------------------------------\nconst toolStateSchema = z.enum([\"partial\", \"result\", \"error\"]).openapi({\n\tdescription:\n\t\t\"AI SDK tool state: 'partial' = executing, 'result' = success, 'error' = failed\",\n});\n\nconst toolPartSchema = z.object({\n\ttype: z\n\t\t.string()\n\t\t.regex(/^tool-.+$/)\n\t\t.openapi({\n\t\t\tdescription: \"Tool type following AI SDK pattern: tool-{toolName}\",\n\t\t}),\n\ttoolCallId: z.string().openapi({\n\t\tdescription: \"Unique identifier for this tool invocation\",\n\t}),\n\ttoolName: z.string().openapi({\n\t\tdescription: \"Name of the tool being invoked\",\n\t}),\n\tinput: z.record(z.string(), z.unknown()).openapi({\n\t\tdescription: \"Input parameters passed to the tool\",\n\t}),\n\toutput: z.unknown().optional().openapi({\n\t\tdescription: \"Output returned by the tool (when state is 'result')\",\n\t}),\n\tstate: toolStateSchema,\n\terrorText: z.string().optional().openapi({\n\t\tdescription: \"Error message when state is 'error'\",\n\t}),\n\tproviderMetadata: cossistantProviderMetadataSchema,\n});\n\n// ----------------------------------------------------------------------------\n// SOURCE URL PART (AI SDK compatible - for citations)\n// ----------------------------------------------------------------------------\nconst sourceUrlPartSchema = z.object({\n\ttype: z.literal(\"source-url\").openapi({\n\t\tdescription: \"URL source citation - matches AI SDK SourceUrlUIPart\",\n\t}),\n\tsourceId: z.string().openapi({\n\t\tdescription: \"Unique identifier for this source\",\n\t}),\n\turl: z.string().url().openapi({\n\t\tdescription: \"URL of the source\",\n\t}),\n\ttitle: z.string().optional().openapi({\n\t\tdescription: \"Title of the source\",\n\t}),\n\tproviderMetadata: cossistantProviderMetadataSchema,\n});\n\n// ----------------------------------------------------------------------------\n// SOURCE DOCUMENT PART (AI SDK compatible - for document citations)\n// ----------------------------------------------------------------------------\nconst sourceDocumentPartSchema = z.object({\n\ttype: z.literal(\"source-document\").openapi({\n\t\tdescription:\n\t\t\t\"Document source citation - matches AI SDK SourceDocumentUIPart\",\n\t}),\n\tsourceId: z.string().openapi({\n\t\tdescription: \"Unique identifier for this source\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"IANA media type of the document\",\n\t}),\n\ttitle: z.string().openapi({\n\t\tdescription: \"Title of the document\",\n\t}),\n\tfilename: z.string().optional().openapi({\n\t\tdescription: \"Filename of the document\",\n\t}),\n\tproviderMetadata: cossistantProviderMetadataSchema,\n});\n\n// ----------------------------------------------------------------------------\n// STEP START PART (AI SDK compatible - for multi-step boundaries)\n// ----------------------------------------------------------------------------\nconst stepStartPartSchema = z.object({\n\ttype: z.literal(\"step-start\").openapi({\n\t\tdescription: \"Step boundary marker - matches AI SDK StepStartUIPart\",\n\t}),\n});\n\n// ----------------------------------------------------------------------------\n// FILE PART (AI SDK compatible)\n// ----------------------------------------------------------------------------\nconst filePartSchema = z.object({\n\ttype: z.literal(\"file\").openapi({\n\t\tdescription: \"File attachment - matches AI SDK FileUIPart\",\n\t}),\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the file (can be hosted URL or Data URL)\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"IANA media type of the file\",\n\t}),\n\tfilename: z.string().optional().openapi({\n\t\tdescription: \"Original filename\",\n\t}),\n\t// Cossistant extension: additional file metadata\n\tsize: z.number().optional().openapi({\n\t\tdescription: \"Size of the file in bytes\",\n\t}),\n});\n\n// ----------------------------------------------------------------------------\n// IMAGE PART (Cossistant extension - more detailed than AI SDK file)\n// ----------------------------------------------------------------------------\nconst imagePartSchema = z.object({\n\ttype: z.literal(\"image\").openapi({\n\t\tdescription: \"Image attachment with dimensions\",\n\t}),\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the image\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"IANA media type of the image\",\n\t}),\n\t// Use lowercase 'filename' for AI SDK consistency\n\t// Note: Legacy data may have 'fileName' - conversion utilities handle both\n\tfilename: z.string().optional().openapi({\n\t\tdescription: \"Original filename of the image\",\n\t}),\n\tsize: z.number().optional().openapi({\n\t\tdescription: \"Size of the image in bytes\",\n\t}),\n\twidth: z.number().optional().openapi({\n\t\tdescription: \"Width of the image in pixels\",\n\t}),\n\theight: z.number().optional().openapi({\n\t\tdescription: \"Height of the image in pixels\",\n\t}),\n});\n\n// ============================================================================\n// COSSISTANT-SPECIFIC PART SCHEMAS\n// These are Cossistant-specific parts not in AI SDK\n// ============================================================================\n\nconst timelinePartEventSchema = z.object({\n\ttype: z.literal(\"event\").openapi({\n\t\tdescription: \"Type of timeline part - always 'event' for event parts\",\n\t}),\n\teventType: z\n\t\t.enum([\n\t\t\tConversationEventType.ASSIGNED,\n\t\t\tConversationEventType.UNASSIGNED,\n\t\t\tConversationEventType.PARTICIPANT_REQUESTED,\n\t\t\tConversationEventType.PARTICIPANT_JOINED,\n\t\t\tConversationEventType.PARTICIPANT_LEFT,\n\t\t\tConversationEventType.STATUS_CHANGED,\n\t\t\tConversationEventType.PRIORITY_CHANGED,\n\t\t\tConversationEventType.TAG_ADDED,\n\t\t\tConversationEventType.TAG_REMOVED,\n\t\t\tConversationEventType.RESOLVED,\n\t\t\tConversationEventType.REOPENED,\n\t\t\tConversationEventType.VISITOR_BLOCKED,\n\t\t\tConversationEventType.VISITOR_UNBLOCKED,\n\t\t\tConversationEventType.VISITOR_IDENTIFIED,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription: \"Type of event that occurred\",\n\t\t}),\n\tactorUserId: z.string().nullable().openapi({\n\t\tdescription: \"User that triggered the event, if applicable\",\n\t}),\n\tactorAiAgentId: z.string().nullable().openapi({\n\t\tdescription: \"AI agent that triggered the event, if applicable\",\n\t}),\n\ttargetUserId: z.string().nullable().openapi({\n\t\tdescription: \"User targeted by the event, if applicable\",\n\t}),\n\ttargetAiAgentId: z.string().nullable().openapi({\n\t\tdescription: \"AI agent targeted by the event, if applicable\",\n\t}),\n\tmessage: z.string().nullable().optional().openapi({\n\t\tdescription: \"Optional human readable message attached to the event\",\n\t}),\n});\n\nconst timelinePartMetadataSchema = z.object({\n\ttype: z.literal(\"metadata\").openapi({\n\t\tdescription: \"Type of timeline part - always 'metadata' for metadata parts\",\n\t}),\n\tsource: z.enum([\"email\", \"widget\", \"api\"]).openapi({\n\t\tdescription: \"Source channel through which the message was created\",\n\t}),\n});\n\n// ============================================================================\n// TIMELINE ITEM PARTS UNION\n// Combines AI SDK compatible parts with Cossistant-specific parts\n// ============================================================================\n\nexport const timelineItemPartsSchema = z\n\t.array(\n\t\tz.union([\n\t\t\t// AI SDK compatible parts\n\t\t\ttextPartSchema,\n\t\t\treasoningPartSchema,\n\t\t\ttoolPartSchema,\n\t\t\tsourceUrlPartSchema,\n\t\t\tsourceDocumentPartSchema,\n\t\t\tstepStartPartSchema,\n\t\t\tfilePartSchema,\n\t\t\timagePartSchema,\n\t\t\t// Cossistant-specific parts\n\t\t\ttimelinePartEventSchema,\n\t\t\ttimelinePartMetadataSchema,\n\t\t])\n\t)\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Array of timeline parts that make up the timeline item content. Includes AI SDK compatible parts (text, reasoning, tool-*, source-url, source-document, step-start, file, image) and Cossistant-specific parts (event, metadata).\",\n\t});\n\nexport const timelineItemSchema = z.object({\n\tid: z.string().optional().openapi({\n\t\tdescription: \"Unique identifier for the timeline item\",\n\t}),\n\tconversationId: z.string().openapi({\n\t\tdescription: \"ID of the conversation this timeline item belongs to\",\n\t}),\n\torganizationId: z.string().openapi({\n\t\tdescription: \"ID of the organization this timeline item belongs to\",\n\t}),\n\tvisibility: z\n\t\t.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE])\n\t\t.openapi({\n\t\t\tdescription: \"Visibility level of the timeline item\",\n\t\t}),\n\ttype: z\n\t\t.enum([\n\t\t\tConversationTimelineType.MESSAGE,\n\t\t\tConversationTimelineType.EVENT,\n\t\t\tConversationTimelineType.IDENTIFICATION,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription:\n\t\t\t\t\"Type of timeline item - message, event, or interactive identification tool\",\n\t\t}),\n\ttext: z.string().nullable().openapi({\n\t\tdescription: \"Main text content of the timeline item\",\n\t}),\n\ttool: z.string().nullable().optional().openapi({\n\t\tdescription: \"Optional tool identifier associated with this timeline item\",\n\t}),\n\tparts: timelineItemPartsSchema,\n\tuserId: z.string().nullable().openapi({\n\t\tdescription: \"ID of the user who created this timeline item, if applicable\",\n\t}),\n\taiAgentId: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"ID of the AI agent that created this timeline item, if applicable\",\n\t}),\n\tvisitorId: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"ID of the visitor who created this timeline item, if applicable\",\n\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"ISO 8601 timestamp when the timeline item was created\",\n\t}),\n\tdeletedAt: z.string().nullable().optional().openapi({\n\t\tdescription:\n\t\t\t\"ISO 8601 timestamp when the timeline item was deleted, if applicable\",\n\t}),\n});\n\nexport type timelineItemSchema = z.infer<typeof timelineItemSchema>;\n\nexport type TimelineItem = z.infer<typeof timelineItemSchema>;\nexport type TimelineItemParts = z.infer<typeof timelineItemPartsSchema>;\n\n// AI SDK compatible part types\nexport type TextPart = z.infer<typeof textPartSchema>;\nexport type ReasoningPart = z.infer<typeof reasoningPartSchema>;\nexport type ToolPart = z.infer<typeof toolPartSchema>;\nexport type SourceUrlPart = z.infer<typeof sourceUrlPartSchema>;\nexport type SourceDocumentPart = z.infer<typeof sourceDocumentPartSchema>;\nexport type StepStartPart = z.infer<typeof stepStartPartSchema>;\nexport type FilePart = z.infer<typeof filePartSchema>;\nexport type ImagePart = z.infer<typeof imagePartSchema>;\n\n// Cossistant-specific part types\nexport type TimelinePartEvent = z.infer<typeof timelinePartEventSchema>;\nexport type TimelinePartMetadata = z.infer<typeof timelinePartMetadataSchema>;\n\n// Backward-compatible type aliases (deprecated, use new names)\n/** @deprecated Use `FilePart` instead */\nexport type TimelinePartFile = FilePart;\n/** @deprecated Use `ImagePart` instead */\nexport type TimelinePartImage = ImagePart;\n/** @deprecated Use `TextPart` instead */\nexport type TimelinePartText = TextPart;\n\n// Provider metadata type for extensions\nexport type CossistantProviderMetadata = z.infer<\n\ttypeof cossistantProviderMetadataSchema\n>;\n\n// Tool state type\nexport type ToolState = z.infer<typeof toolStateSchema>;\n\n// Export schemas for external use\nexport {\n\ttextPartSchema,\n\treasoningPartSchema,\n\ttoolPartSchema,\n\ttoolStateSchema,\n\tsourceUrlPartSchema,\n\tsourceDocumentPartSchema,\n\tstepStartPartSchema,\n\tfilePartSchema,\n\timagePartSchema,\n\ttimelinePartEventSchema,\n\ttimelinePartMetadataSchema,\n\tcossistantProviderMetadataSchema,\n};\n\n// REST API Schemas\nexport const getConversationTimelineItemsRequestSchema = z\n\t.object({\n\t\tlimit: z.coerce.number().min(1).max(100).default(50).openapi({\n\t\t\tdescription: \"Number of timeline items to fetch per page\",\n\t\t\tdefault: 50,\n\t\t}),\n\t\tcursor: z.string().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Cursor for pagination (timestamp_id format from previous response)\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Query parameters for fetching conversation timeline items\",\n\t});\n\nexport type GetConversationTimelineItemsRequest = z.infer<\n\ttypeof getConversationTimelineItemsRequestSchema\n>;\n\nexport const getConversationTimelineItemsResponseSchema = z\n\t.object({\n\t\titems: z.array(timelineItemSchema).openapi({\n\t\t\tdescription: \"Array of timeline items in chronological order\",\n\t\t}),\n\t\tnextCursor: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Cursor for the next page, null if no more items are available\",\n\t\t}),\n\t\thasNextPage: z.boolean().openapi({\n\t\t\tdescription: \"Whether there are more items available to fetch\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing paginated timeline items\",\n\t});\n\nexport type GetConversationTimelineItemsResponse = z.infer<\n\ttypeof getConversationTimelineItemsResponseSchema\n>;\n\n// Send Timeline Item (Message) Schemas\nexport const sendTimelineItemRequestSchema = z\n\t.object({\n\t\tconversationId: z.string().openapi({\n\t\t\tdescription: \"ID of the conversation to send the timeline item to\",\n\t\t}),\n\t\titem: z.object({\n\t\t\tid: z.string().optional().openapi({\n\t\t\t\tdescription: \"Optional client-generated ID for the timeline item\",\n\t\t\t}),\n\t\t\ttype: z\n\t\t\t\t.enum([\n\t\t\t\t\tConversationTimelineType.MESSAGE,\n\t\t\t\t\tConversationTimelineType.EVENT,\n\t\t\t\t])\n\t\t\t\t.default(ConversationTimelineType.MESSAGE)\n\t\t\t\t.openapi({\n\t\t\t\t\tdescription: \"Type of timeline item - defaults to MESSAGE\",\n\t\t\t\t\tdefault: ConversationTimelineType.MESSAGE,\n\t\t\t\t}),\n\t\t\ttext: z.string().openapi({\n\t\t\t\tdescription: \"Main text content of the timeline item\",\n\t\t\t}),\n\t\t\tparts: timelineItemPartsSchema.optional(),\n\t\t\tvisibility: z\n\t\t\t\t.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE])\n\t\t\t\t.default(TimelineItemVisibility.PUBLIC)\n\t\t\t\t.openapi({\n\t\t\t\t\tdescription: \"Visibility level of the timeline item\",\n\t\t\t\t\tdefault: TimelineItemVisibility.PUBLIC,\n\t\t\t\t}),\n\t\t\ttool: z.string().nullable().optional().openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Optional tool identifier when sending non-message timeline items\",\n\t\t\t}),\n\t\t\tuserId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the user creating this timeline item\",\n\t\t\t}),\n\t\t\taiAgentId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the AI agent creating this timeline item\",\n\t\t\t}),\n\t\t\tvisitorId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the visitor creating this timeline item\",\n\t\t\t}),\n\t\t\tcreatedAt: z.string().optional().openapi({\n\t\t\t\tdescription: \"Optional timestamp for the timeline item\",\n\t\t\t}),\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request body for sending a timeline item to a conversation\",\n\t});\n\nexport type SendTimelineItemRequest = z.infer<\n\ttypeof sendTimelineItemRequestSchema\n>;\n\nexport const sendTimelineItemResponseSchema = z\n\t.object({\n\t\titem: timelineItemSchema.openapi({\n\t\t\tdescription: \"The created timeline item\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing the created timeline item\",\n\t});\n\nexport type SendTimelineItemResponse = z.infer<\n\ttypeof sendTimelineItemResponseSchema\n>;\n"],"mappings":";;;;AAiBA,MAAM,mCAAmC,EACvC,OAAO,EACP,YAAY,EACV,OAAO;CACP,YAAY,EAAE,KAAK,CAAC,UAAU,UAAU,CAAC,CAAC,UAAU,CAAC,QAAQ,EAC5D,aAAa,+CACb,CAAC;CACF,iBAAiB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAC9C,aAAa,uDACb,CAAC;CACF,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAC1C,aAAa,6CACb,CAAC;CACF,CAAC,CACD,UAAU,EACZ,CAAC,CACD,aAAa,CACb,UAAU;AAKZ,MAAM,iBAAiB,EAAE,OAAO;CAC/B,MAAM,EAAE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QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAC9C,aACC,oEACD,CAAC;EACF,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAChD,aAAa,8CACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EACnD,aAAa,kDACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EACnD,aAAa,iDACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACxC,aAAa,4CACb,CAAC;EACF,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,8DACb,CAAC;AAMH,MAAa,iCAAiC,EAC5C,OAAO,EACP,MAAM,mBAAmB,QAAQ,EAChC,aAAa,6BACb,CAAC,EACF,CAAC,CACD,QAAQ,EACR,aAAa,iDACb,CAAC"}
1
+ {"version":3,"file":"timeline-item.js","names":[],"sources":["../../src/api/timeline-item.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nimport {\n\tConversationEventType,\n\tConversationTimelineType,\n\tTimelineItemVisibility,\n} from \"../enums\";\n\n// ============================================================================\n// AI SDK v6 COMPATIBLE PART SCHEMAS\n// These follow Vercel AI SDK v6 patterns for UIMessagePart types.\n// Cossistant extensions use providerMetadata.cossistant namespace.\n// ============================================================================\n\n// ----------------------------------------------------------------------------\n// Cossistant Provider Metadata (extension point for all parts)\n// ----------------------------------------------------------------------------\nconst cossistantProviderMetadataSchema = z\n\t.object({\n\t\tcossistant: z\n\t\t\t.object({\n\t\t\t\tvisibility: z.enum([\"public\", \"private\"]).optional().openapi({\n\t\t\t\t\tdescription: \"Part-level visibility control for filtering\",\n\t\t\t\t}),\n\t\t\t\tprogressMessage: z.string().optional().openapi({\n\t\t\t\t\tdescription: \"Custom progress message to display during execution\",\n\t\t\t\t}),\n\t\t\t\tknowledgeId: z.string().optional().openapi({\n\t\t\t\t\tdescription: \"Reference to a Cossistant knowledge entry\",\n\t\t\t\t}),\n\t\t\t})\n\t\t\t.optional(),\n\t})\n\t.passthrough()\n\t.optional();\n\n// ----------------------------------------------------------------------------\n// TEXT PART (AI SDK compatible)\n// ----------------------------------------------------------------------------\nconst textPartSchema = z.object({\n\ttype: z.literal(\"text\").openapi({\n\t\tdescription: \"Text content part - matches AI SDK TextUIPart\",\n\t}),\n\ttext: z.string().openapi({\n\t\tdescription: \"The text content\",\n\t}),\n\tstate: z.enum([\"streaming\", \"done\"]).optional().openapi({\n\t\tdescription:\n\t\t\t\"AI SDK state: 'streaming' = still processing, 'done' = complete\",\n\t}),\n});\n\n// ----------------------------------------------------------------------------\n// REASONING PART (AI SDK compatible - for AI chain-of-thought)\n// ----------------------------------------------------------------------------\nconst reasoningPartSchema = z.object({\n\ttype: z.literal(\"reasoning\").openapi({\n\t\tdescription:\n\t\t\t\"AI reasoning/chain-of-thought - matches AI SDK ReasoningUIPart\",\n\t}),\n\ttext: z.string().openapi({\n\t\tdescription: \"The reasoning text content\",\n\t}),\n\tstate: z.enum([\"streaming\", \"done\"]).optional().openapi({\n\t\tdescription:\n\t\t\t\"AI SDK state: 'streaming' = still processing, 'done' = complete\",\n\t}),\n\tproviderMetadata: cossistantProviderMetadataSchema,\n});\n\n// ----------------------------------------------------------------------------\n// TOOL PART (AI SDK compatible - for tool invocations)\n// AI SDK uses type: `tool-${toolName}` pattern, but we use a generic schema\n// with toolName field for flexibility. Type checking happens at runtime.\n// ----------------------------------------------------------------------------\nconst toolStateSchema = z.enum([\"partial\", \"result\", \"error\"]).openapi({\n\tdescription:\n\t\t\"AI SDK tool state: 'partial' = executing, 'result' = success, 'error' = failed\",\n});\n\nconst toolPartSchema = z.object({\n\ttype: z\n\t\t.string()\n\t\t.regex(/^tool-.+$/)\n\t\t.openapi({\n\t\t\tdescription: \"Tool type following AI SDK pattern: tool-{toolName}\",\n\t\t}),\n\ttoolCallId: z.string().openapi({\n\t\tdescription: \"Unique identifier for this tool invocation\",\n\t}),\n\ttoolName: z.string().openapi({\n\t\tdescription: \"Name of the tool being invoked\",\n\t}),\n\tinput: z.record(z.string(), z.unknown()).openapi({\n\t\tdescription: \"Input parameters passed to the tool\",\n\t}),\n\toutput: z.unknown().optional().openapi({\n\t\tdescription: \"Output returned by the tool (when state is 'result')\",\n\t}),\n\tstate: toolStateSchema,\n\terrorText: z.string().optional().openapi({\n\t\tdescription: \"Error message when state is 'error'\",\n\t}),\n\tproviderMetadata: cossistantProviderMetadataSchema,\n});\n\n// ----------------------------------------------------------------------------\n// SOURCE URL PART (AI SDK compatible - for citations)\n// ----------------------------------------------------------------------------\nconst sourceUrlPartSchema = z.object({\n\ttype: z.literal(\"source-url\").openapi({\n\t\tdescription: \"URL source citation - matches AI SDK SourceUrlUIPart\",\n\t}),\n\tsourceId: z.string().openapi({\n\t\tdescription: \"Unique identifier for this source\",\n\t}),\n\turl: z.string().url().openapi({\n\t\tdescription: \"URL of the source\",\n\t}),\n\ttitle: z.string().optional().openapi({\n\t\tdescription: \"Title of the source\",\n\t}),\n\tproviderMetadata: cossistantProviderMetadataSchema,\n});\n\n// ----------------------------------------------------------------------------\n// SOURCE DOCUMENT PART (AI SDK compatible - for document citations)\n// ----------------------------------------------------------------------------\nconst sourceDocumentPartSchema = z.object({\n\ttype: z.literal(\"source-document\").openapi({\n\t\tdescription:\n\t\t\t\"Document source citation - matches AI SDK SourceDocumentUIPart\",\n\t}),\n\tsourceId: z.string().openapi({\n\t\tdescription: \"Unique identifier for this source\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"IANA media type of the document\",\n\t}),\n\ttitle: z.string().openapi({\n\t\tdescription: \"Title of the document\",\n\t}),\n\tfilename: z.string().optional().openapi({\n\t\tdescription: \"Filename of the document\",\n\t}),\n\tproviderMetadata: cossistantProviderMetadataSchema,\n});\n\n// ----------------------------------------------------------------------------\n// STEP START PART (AI SDK compatible - for multi-step boundaries)\n// ----------------------------------------------------------------------------\nconst stepStartPartSchema = z.object({\n\ttype: z.literal(\"step-start\").openapi({\n\t\tdescription: \"Step boundary marker - matches AI SDK StepStartUIPart\",\n\t}),\n});\n\n// ----------------------------------------------------------------------------\n// FILE PART (AI SDK compatible)\n// ----------------------------------------------------------------------------\nconst filePartSchema = z.object({\n\ttype: z.literal(\"file\").openapi({\n\t\tdescription: \"File attachment - matches AI SDK FileUIPart\",\n\t}),\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the file (can be hosted URL or Data URL)\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"IANA media type of the file\",\n\t}),\n\tfilename: z.string().optional().openapi({\n\t\tdescription: \"Original filename\",\n\t}),\n\t// Cossistant extension: additional file metadata\n\tsize: z.number().optional().openapi({\n\t\tdescription: \"Size of the file in bytes\",\n\t}),\n});\n\n// ----------------------------------------------------------------------------\n// IMAGE PART (Cossistant extension - more detailed than AI SDK file)\n// ----------------------------------------------------------------------------\nconst imagePartSchema = z.object({\n\ttype: z.literal(\"image\").openapi({\n\t\tdescription: \"Image attachment with dimensions\",\n\t}),\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the image\",\n\t}),\n\tmediaType: z.string().openapi({\n\t\tdescription: \"IANA media type of the image\",\n\t}),\n\t// Use lowercase 'filename' for AI SDK consistency\n\t// Note: Legacy data may have 'fileName' - conversion utilities handle both\n\tfilename: z.string().optional().openapi({\n\t\tdescription: \"Original filename of the image\",\n\t}),\n\tsize: z.number().optional().openapi({\n\t\tdescription: \"Size of the image in bytes\",\n\t}),\n\twidth: z.number().optional().openapi({\n\t\tdescription: \"Width of the image in pixels\",\n\t}),\n\theight: z.number().optional().openapi({\n\t\tdescription: \"Height of the image in pixels\",\n\t}),\n});\n\n// ============================================================================\n// COSSISTANT-SPECIFIC PART SCHEMAS\n// These are Cossistant-specific parts not in AI SDK\n// ============================================================================\n\nconst timelinePartEventSchema = z.object({\n\ttype: z.literal(\"event\").openapi({\n\t\tdescription: \"Type of timeline part - always 'event' for event parts\",\n\t}),\n\teventType: z\n\t\t.enum([\n\t\t\tConversationEventType.ASSIGNED,\n\t\t\tConversationEventType.UNASSIGNED,\n\t\t\tConversationEventType.PARTICIPANT_REQUESTED,\n\t\t\tConversationEventType.PARTICIPANT_JOINED,\n\t\t\tConversationEventType.PARTICIPANT_LEFT,\n\t\t\tConversationEventType.STATUS_CHANGED,\n\t\t\tConversationEventType.PRIORITY_CHANGED,\n\t\t\tConversationEventType.TAG_ADDED,\n\t\t\tConversationEventType.TAG_REMOVED,\n\t\t\tConversationEventType.RESOLVED,\n\t\t\tConversationEventType.REOPENED,\n\t\t\tConversationEventType.VISITOR_BLOCKED,\n\t\t\tConversationEventType.VISITOR_UNBLOCKED,\n\t\t\tConversationEventType.VISITOR_IDENTIFIED,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription: \"Type of event that occurred\",\n\t\t}),\n\tactorUserId: z.string().nullable().openapi({\n\t\tdescription: \"User that triggered the event, if applicable\",\n\t}),\n\tactorAiAgentId: z.string().nullable().openapi({\n\t\tdescription: \"AI agent that triggered the event, if applicable\",\n\t}),\n\ttargetUserId: z.string().nullable().openapi({\n\t\tdescription: \"User targeted by the event, if applicable\",\n\t}),\n\ttargetAiAgentId: z.string().nullable().openapi({\n\t\tdescription: \"AI agent targeted by the event, if applicable\",\n\t}),\n\tmessage: z.string().nullable().optional().openapi({\n\t\tdescription: \"Optional human readable message attached to the event\",\n\t}),\n});\n\nconst timelinePartMetadataSchema = z.object({\n\ttype: z.literal(\"metadata\").openapi({\n\t\tdescription: \"Type of timeline part - always 'metadata' for metadata parts\",\n\t}),\n\tsource: z.enum([\"email\", \"widget\", \"api\"]).openapi({\n\t\tdescription: \"Source channel through which the message was created\",\n\t}),\n});\n\n// ============================================================================\n// TIMELINE ITEM PARTS UNION\n// Combines AI SDK compatible parts with Cossistant-specific parts\n// ============================================================================\n\nexport const timelineItemPartsSchema = z\n\t.array(\n\t\tz.union([\n\t\t\t// AI SDK compatible parts\n\t\t\ttextPartSchema,\n\t\t\treasoningPartSchema,\n\t\t\ttoolPartSchema,\n\t\t\tsourceUrlPartSchema,\n\t\t\tsourceDocumentPartSchema,\n\t\t\tstepStartPartSchema,\n\t\t\tfilePartSchema,\n\t\t\timagePartSchema,\n\t\t\t// Cossistant-specific parts\n\t\t\ttimelinePartEventSchema,\n\t\t\ttimelinePartMetadataSchema,\n\t\t])\n\t)\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Array of timeline parts that make up the timeline item content. Includes AI SDK compatible parts (text, reasoning, tool-*, source-url, source-document, step-start, file, image) and Cossistant-specific parts (event, metadata).\",\n\t});\n\nexport const timelineItemSchema = z.object({\n\tid: z.string().optional().openapi({\n\t\tdescription: \"Unique identifier for the timeline item\",\n\t}),\n\tconversationId: z.string().openapi({\n\t\tdescription: \"ID of the conversation this timeline item belongs to\",\n\t}),\n\torganizationId: z.string().openapi({\n\t\tdescription: \"ID of the organization this timeline item belongs to\",\n\t}),\n\tvisibility: z\n\t\t.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE])\n\t\t.openapi({\n\t\t\tdescription: \"Visibility level of the timeline item\",\n\t\t}),\n\ttype: z\n\t\t.enum([\n\t\t\tConversationTimelineType.MESSAGE,\n\t\t\tConversationTimelineType.EVENT,\n\t\t\tConversationTimelineType.IDENTIFICATION,\n\t\t\tConversationTimelineType.TOOL,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription:\n\t\t\t\t\"Type of timeline item - message, event, identification, or tool call\",\n\t\t}),\n\ttext: z.string().nullable().openapi({\n\t\tdescription: \"Main text content of the timeline item\",\n\t}),\n\ttool: z.string().nullable().optional().openapi({\n\t\tdescription: \"Optional tool identifier associated with this timeline item\",\n\t}),\n\tparts: timelineItemPartsSchema,\n\tuserId: z.string().nullable().openapi({\n\t\tdescription: \"ID of the user who created this timeline item, if applicable\",\n\t}),\n\taiAgentId: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"ID of the AI agent that created this timeline item, if applicable\",\n\t}),\n\tvisitorId: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"ID of the visitor who created this timeline item, if applicable\",\n\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"ISO 8601 timestamp when the timeline item was created\",\n\t}),\n\tdeletedAt: z.string().nullable().optional().openapi({\n\t\tdescription:\n\t\t\t\"ISO 8601 timestamp when the timeline item was deleted, if applicable\",\n\t}),\n});\n\nexport type timelineItemSchema = z.infer<typeof timelineItemSchema>;\n\nexport type TimelineItem = z.infer<typeof timelineItemSchema>;\nexport type TimelineItemParts = z.infer<typeof timelineItemPartsSchema>;\n\n// AI SDK compatible part types\nexport type TextPart = z.infer<typeof textPartSchema>;\nexport type ReasoningPart = z.infer<typeof reasoningPartSchema>;\nexport type ToolPart = z.infer<typeof toolPartSchema>;\nexport type SourceUrlPart = z.infer<typeof sourceUrlPartSchema>;\nexport type SourceDocumentPart = z.infer<typeof sourceDocumentPartSchema>;\nexport type StepStartPart = z.infer<typeof stepStartPartSchema>;\nexport type FilePart = z.infer<typeof filePartSchema>;\nexport type ImagePart = z.infer<typeof imagePartSchema>;\n\n// Cossistant-specific part types\nexport type TimelinePartEvent = z.infer<typeof timelinePartEventSchema>;\nexport type TimelinePartMetadata = z.infer<typeof timelinePartMetadataSchema>;\n\n// Backward-compatible type aliases (deprecated, use new names)\n/** @deprecated Use `FilePart` instead */\nexport type TimelinePartFile = FilePart;\n/** @deprecated Use `ImagePart` instead */\nexport type TimelinePartImage = ImagePart;\n/** @deprecated Use `TextPart` instead */\nexport type TimelinePartText = TextPart;\n\n// Provider metadata type for extensions\nexport type CossistantProviderMetadata = z.infer<\n\ttypeof cossistantProviderMetadataSchema\n>;\n\n// Tool state type\nexport type ToolState = z.infer<typeof toolStateSchema>;\n\n// Export schemas for external use\nexport {\n\ttextPartSchema,\n\treasoningPartSchema,\n\ttoolPartSchema,\n\ttoolStateSchema,\n\tsourceUrlPartSchema,\n\tsourceDocumentPartSchema,\n\tstepStartPartSchema,\n\tfilePartSchema,\n\timagePartSchema,\n\ttimelinePartEventSchema,\n\ttimelinePartMetadataSchema,\n\tcossistantProviderMetadataSchema,\n};\n\n// REST API Schemas\nexport const getConversationTimelineItemsRequestSchema = z\n\t.object({\n\t\tlimit: z.coerce.number().min(1).max(100).default(50).openapi({\n\t\t\tdescription: \"Number of timeline items to fetch per page\",\n\t\t\tdefault: 50,\n\t\t}),\n\t\tcursor: z.string().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Cursor for pagination (timestamp_id format from previous response)\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Query parameters for fetching conversation timeline items\",\n\t});\n\nexport type GetConversationTimelineItemsRequest = z.infer<\n\ttypeof getConversationTimelineItemsRequestSchema\n>;\n\nexport const getConversationTimelineItemsResponseSchema = z\n\t.object({\n\t\titems: z.array(timelineItemSchema).openapi({\n\t\t\tdescription: \"Array of timeline items in chronological order\",\n\t\t}),\n\t\tnextCursor: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Cursor for the next page, null if no more items are available\",\n\t\t}),\n\t\thasNextPage: z.boolean().openapi({\n\t\t\tdescription: \"Whether there are more items available to fetch\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing paginated timeline items\",\n\t});\n\nexport type GetConversationTimelineItemsResponse = z.infer<\n\ttypeof getConversationTimelineItemsResponseSchema\n>;\n\n// Send Timeline Item (Message) Schemas\nexport const sendTimelineItemRequestSchema = z\n\t.object({\n\t\tconversationId: z.string().openapi({\n\t\t\tdescription: \"ID of the conversation to send the timeline item to\",\n\t\t}),\n\t\titem: z.object({\n\t\t\tid: z.string().optional().openapi({\n\t\t\t\tdescription: \"Optional client-generated ID for the timeline item\",\n\t\t\t}),\n\t\t\ttype: z\n\t\t\t\t.enum([\n\t\t\t\t\tConversationTimelineType.MESSAGE,\n\t\t\t\t\tConversationTimelineType.EVENT,\n\t\t\t\t])\n\t\t\t\t.default(ConversationTimelineType.MESSAGE)\n\t\t\t\t.openapi({\n\t\t\t\t\tdescription: \"Type of timeline item - defaults to MESSAGE\",\n\t\t\t\t\tdefault: ConversationTimelineType.MESSAGE,\n\t\t\t\t}),\n\t\t\ttext: z.string().openapi({\n\t\t\t\tdescription: \"Main text content of the timeline item\",\n\t\t\t}),\n\t\t\tparts: timelineItemPartsSchema.optional(),\n\t\t\tvisibility: z\n\t\t\t\t.enum([TimelineItemVisibility.PUBLIC, TimelineItemVisibility.PRIVATE])\n\t\t\t\t.default(TimelineItemVisibility.PUBLIC)\n\t\t\t\t.openapi({\n\t\t\t\t\tdescription: \"Visibility level of the timeline item\",\n\t\t\t\t\tdefault: TimelineItemVisibility.PUBLIC,\n\t\t\t\t}),\n\t\t\ttool: z.string().nullable().optional().openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Optional tool identifier when sending non-message timeline items\",\n\t\t\t}),\n\t\t\tuserId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the user creating this timeline item\",\n\t\t\t}),\n\t\t\taiAgentId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the AI agent creating this timeline item\",\n\t\t\t}),\n\t\t\tvisitorId: z.string().nullable().optional().openapi({\n\t\t\t\tdescription: \"ID of the visitor creating this timeline item\",\n\t\t\t}),\n\t\t\tcreatedAt: z.string().optional().openapi({\n\t\t\t\tdescription: \"Optional timestamp for the timeline item\",\n\t\t\t}),\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request body for sending a timeline item to a conversation\",\n\t});\n\nexport type SendTimelineItemRequest = z.infer<\n\ttypeof sendTimelineItemRequestSchema\n>;\n\nexport const sendTimelineItemResponseSchema = z\n\t.object({\n\t\titem: timelineItemSchema.openapi({\n\t\t\tdescription: \"The created timeline item\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing the created timeline item\",\n\t});\n\nexport type SendTimelineItemResponse = z.infer<\n\ttypeof sendTimelineItemResponseSchema\n>;\n"],"mappings":";;;;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Q,EACjC,aAAa,sDACb,CAAC;EACF,MAAM,EACJ,KAAK,CACL,yBAAyB,SACzB,yBAAyB,MACzB,CAAC,CACD,QAAQ,yBAAyB,QAAQ,CACzC,QAAQ;GACR,aAAa;GACb,SAAS,yBAAyB;GAClC,CAAC;EACH,MAAM,EAAE,QAAQ,CAAC,QAAQ,EACxB,aAAa,0CACb,CAAC;EACF,OAAO,wBAAwB,UAAU;EACzC,YAAY,EACV,KAAK,CAAC,uBAAuB,QAAQ,uBAAuB,QAAQ,CAAC,CACrE,QAAQ,uBAAuB,OAAO,CACtC,QAAQ;GACR,aAAa;GACb,SAAS,uBAAuB;GAChC,CAAC;EACH,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAC9C,aACC,oEACD,CAAC;EACF,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAChD,aAAa,8CACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EACnD,aAAa,kDACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EACnD,aAAa,iDACb,CAAC;EACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACxC,aAAa,4CACb,CAAC;EACF,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,8DACb,CAAC;AAMH,MAAa,iCAAiC,EAC5C,OAAO,EACP,MAAM,mBAAmB,QAAQ,EAChC,aAAa,6BACb,CAAC,EACF,CAAC,CACD,QAAQ,EACR,aAAa,iDACb,CAAC"}
package/enums.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const ConversationTimelineType: {
25
25
  readonly MESSAGE: "message";
26
26
  readonly EVENT: "event";
27
27
  readonly IDENTIFICATION: "identification";
28
+ readonly TOOL: "tool";
28
29
  };
29
30
  type ConversationTimelineType = (typeof ConversationTimelineType)[keyof typeof ConversationTimelineType];
30
31
  declare const ConversationEventType: {
package/enums.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","names":[],"sources":["../src/enums.ts"],"sourcesContent":[],"mappings":";cAAa;EAAA,SAAA,OAIH,EAAA,SAAA;EAEE,SAAA,WAAU,EAAA,aAAW;EAEpB,SAAA,EAAA,EAAA,IAAA;AAMb,CAAA;AAGa,KAXD,UAAA,GAWC,CAAA,OAXoB,UAgBvB,CAAA,CAAA,MAAA,OAhBgD,UAgBhD,CAAA;AAEG,cAhBA,kBAmBH,EAAA;EAEG,SAAA,IAAA,EAAA,MAAA;EAMD,SAAA,QAAA,EAAA,UAAwB;EAGvB,SAAA,IAAA,EAAA,MAAA;AAqBb,CAAA;AAOa,KApDD,kBAAA,GAwDF,CAAA,OAvDD,kBAuDC,CAAA,CAAA,MAAA,OAvDgC,kBAuDhC,CAAA;AAEE,cAvDC,oBAwDJ,EAAA;EAEG,SAAA,GAAA,EAAA,KAAA;EAGA,SAAA,MAAA,EAAA,QAAqB;EAGrB,SAAA,IAAA,EAAA,MAAA;EAGA,SAAA,MAAA,EAAA,QAAoB;AAGhC,CAAA;AAKa,cApEA,sBAuEH,EAAA;EAEE,SAAA,MAAA,EAAa,QAAA;EAEb,SAAA,OAAA,EAAA,SAAA;AAGZ,CAAA;AAKY,cA9EC,wBA8E6C,EAAA;;;;;KAxE9C,wBAAA,WACH,uCAAuC;cAEnC;;;;;;;;;;;;;;;;;;;cAqBA;;;;;;cAOA;;;;;KAMD,qBAAA,WACH,oCAAoC;KAEjC,+BAAA,WACH,8CAA8C;KAE3C,qBAAA,WACH,oCAAoC;KAEjC,sBAAA,WACH,qCAAqC;KAElC,oBAAA,WACH,mCAAmC;cAE/B;;;;cAKA;;;;KAKD,aAAA,WAAwB,4BAA4B;KAEpD,yBAAA,WACH,wCAAwC;cAEpC;;;;KAKD,UAAA,WAAqB,yBAAyB"}
1
+ {"version":3,"file":"enums.d.ts","names":[],"sources":["../src/enums.ts"],"sourcesContent":[],"mappings":";cAAa;EAAA,SAAA,OAIH,EAAA,SAAA;EAEE,SAAA,WAAU,EAAA,aAAW;EAEpB,SAAA,EAAA,EAAA,IAAA;AAMb,CAAA;AAGa,KAXD,UAAA,GAWC,CAAA,OAXoB,UAgBvB,CAAA,CAAA,MAAA,OAhBgD,UAgBhD,CAAA;AAEG,cAhBA,kBAmBH,EAAA;EAEG,SAAA,IAAA,EAAA,MAAA;EAOD,SAAA,QAAA,EAAA,UAAwB;EAGvB,SAAA,IAAA,EAAA,MAAA;AAqBb,CAAA;AAOa,KArDD,kBAAA,GAyDF,CAAA,OAxDD,kBAwDC,CAAA,CAAA,MAAA,OAxDgC,kBAwDhC,CAAA;AAEE,cAxDC,oBAyDJ,EAAA;EAEG,SAAA,GAAA,EAAA,KAAA;EAGA,SAAA,MAAA,EAAA,QAAqB;EAGrB,SAAA,IAAA,EAAA,MAAA;EAGA,SAAA,MAAA,EAAA,QAAoB;AAGhC,CAAA;AAKa,cArEA,sBAwEH,EAAA;EAEE,SAAA,MAAA,EAAa,QAAA;EAEb,SAAA,OAAA,EAAA,SAAA;AAGZ,CAAA;AAKY,cA/EC,wBA+E6C,EAAA;;;;;;KAxE9C,wBAAA,WACH,uCAAuC;cAEnC;;;;;;;;;;;;;;;;;;;cAqBA;;;;;;cAOA;;;;;KAMD,qBAAA,WACH,oCAAoC;KAEjC,+BAAA,WACH,8CAA8C;KAE3C,qBAAA,WACH,oCAAoC;KAEjC,sBAAA,WACH,qCAAqC;KAElC,oBAAA,WACH,mCAAmC;cAE/B;;;;cAKA;;;;KAKD,aAAA,WAAwB,4BAA4B;KAEpD,yBAAA,WACH,wCAAwC;cAEpC;;;;KAKD,UAAA,WAAqB,yBAAyB"}
package/enums.js CHANGED
@@ -22,7 +22,8 @@ const TimelineItemVisibility = {
22
22
  const ConversationTimelineType = {
23
23
  MESSAGE: "message",
24
24
  EVENT: "event",
25
- IDENTIFICATION: "identification"
25
+ IDENTIFICATION: "identification",
26
+ TOOL: "tool"
26
27
  };
27
28
  const ConversationEventType = {
28
29
  ASSIGNED: "assigned",
package/enums.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","names":[],"sources":["../src/enums.ts"],"sourcesContent":["export const SenderType = {\n\tVISITOR: \"visitor\",\n\tTEAM_MEMBER: \"team_member\",\n\tAI: \"ai\",\n} as const;\n\nexport type SenderType = (typeof SenderType)[keyof typeof SenderType];\n\nexport const ConversationStatus = {\n\tOPEN: \"open\",\n\tRESOLVED: \"resolved\",\n\tSPAM: \"spam\",\n} as const;\n\nexport type ConversationStatus =\n\t(typeof ConversationStatus)[keyof typeof ConversationStatus];\n\nexport const ConversationPriority = {\n\tLOW: \"low\",\n\tNORMAL: \"normal\",\n\tHIGH: \"high\",\n\tURGENT: \"urgent\",\n} as const;\n\nexport const TimelineItemVisibility = {\n\tPUBLIC: \"public\",\n\tPRIVATE: \"private\",\n} as const;\n\nexport const ConversationTimelineType = {\n\tMESSAGE: \"message\",\n\tEVENT: \"event\",\n\tIDENTIFICATION: \"identification\",\n} as const;\n\nexport type ConversationTimelineType =\n\t(typeof ConversationTimelineType)[keyof typeof ConversationTimelineType];\n\nexport const ConversationEventType = {\n\tASSIGNED: \"assigned\",\n\tUNASSIGNED: \"unassigned\",\n\tPARTICIPANT_REQUESTED: \"participant_requested\",\n\tPARTICIPANT_JOINED: \"participant_joined\",\n\tPARTICIPANT_LEFT: \"participant_left\",\n\tSTATUS_CHANGED: \"status_changed\",\n\tPRIORITY_CHANGED: \"priority_changed\",\n\tTAG_ADDED: \"tag_added\",\n\tTAG_REMOVED: \"tag_removed\",\n\tRESOLVED: \"resolved\",\n\tREOPENED: \"reopened\",\n\tVISITOR_BLOCKED: \"visitor_blocked\",\n\tVISITOR_UNBLOCKED: \"visitor_unblocked\",\n\tVISITOR_IDENTIFIED: \"visitor_identified\",\n\t// Private AI events (team only, not visible to visitors)\n\tAI_ANALYZED: \"ai_analyzed\",\n\tTITLE_GENERATED: \"title_generated\",\n\tAI_ESCALATED: \"ai_escalated\",\n} as const;\n\nexport const ConversationParticipationStatus = {\n\tREQUESTED: \"requested\",\n\tACTIVE: \"active\",\n\tLEFT: \"left\",\n\tDECLINED: \"declined\",\n} as const;\n\nexport const ConversationSentiment = {\n\tPOSITIVE: \"positive\",\n\tNEGATIVE: \"negative\",\n\tNEUTRAL: \"neutral\",\n} as const;\n\nexport type ConversationSentiment =\n\t(typeof ConversationSentiment)[keyof typeof ConversationSentiment];\n\nexport type ConversationParticipationStatus =\n\t(typeof ConversationParticipationStatus)[keyof typeof ConversationParticipationStatus];\n\nexport type ConversationEventType =\n\t(typeof ConversationEventType)[keyof typeof ConversationEventType];\n\nexport type TimelineItemVisibility =\n\t(typeof TimelineItemVisibility)[keyof typeof TimelineItemVisibility];\n\nexport type ConversationPriority =\n\t(typeof ConversationPriority)[keyof typeof ConversationPriority];\n\nexport const WebsiteInstallationTarget = {\n\tNEXTJS: \"nextjs\",\n\tREACT: \"react\",\n} as const;\n\nexport const WebsiteStatus = {\n\tACTIVE: \"active\",\n\tINACTIVE: \"inactive\",\n} as const;\n\nexport type WebsiteStatus = (typeof WebsiteStatus)[keyof typeof WebsiteStatus];\n\nexport type WebsiteInstallationTarget =\n\t(typeof WebsiteInstallationTarget)[keyof typeof WebsiteInstallationTarget];\n\nexport const APIKeyType = {\n\tPRIVATE: \"private\",\n\tPUBLIC: \"public\",\n} as const;\n\nexport type APIKeyType = (typeof APIKeyType)[keyof typeof APIKeyType];\n"],"mappings":";AAAA,MAAa,aAAa;CACzB,SAAS;CACT,aAAa;CACb,IAAI;CACJ;AAID,MAAa,qBAAqB;CACjC,MAAM;CACN,UAAU;CACV,MAAM;CACN;AAKD,MAAa,uBAAuB;CACnC,KAAK;CACL,QAAQ;CACR,MAAM;CACN,QAAQ;CACR;AAED,MAAa,yBAAyB;CACrC,QAAQ;CACR,SAAS;CACT;AAED,MAAa,2BAA2B;CACvC,SAAS;CACT,OAAO;CACP,gBAAgB;CAChB;AAKD,MAAa,wBAAwB;CACpC,UAAU;CACV,YAAY;CACZ,uBAAuB;CACvB,oBAAoB;CACpB,kBAAkB;CAClB,gBAAgB;CAChB,kBAAkB;CAClB,WAAW;CACX,aAAa;CACb,UAAU;CACV,UAAU;CACV,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CAEpB,aAAa;CACb,iBAAiB;CACjB,cAAc;CACd;AAED,MAAa,kCAAkC;CAC9C,WAAW;CACX,QAAQ;CACR,MAAM;CACN,UAAU;CACV;AAED,MAAa,wBAAwB;CACpC,UAAU;CACV,UAAU;CACV,SAAS;CACT;AAiBD,MAAa,4BAA4B;CACxC,QAAQ;CACR,OAAO;CACP;AAED,MAAa,gBAAgB;CAC5B,QAAQ;CACR,UAAU;CACV;AAOD,MAAa,aAAa;CACzB,SAAS;CACT,QAAQ;CACR"}
1
+ {"version":3,"file":"enums.js","names":[],"sources":["../src/enums.ts"],"sourcesContent":["export const SenderType = {\n\tVISITOR: \"visitor\",\n\tTEAM_MEMBER: \"team_member\",\n\tAI: \"ai\",\n} as const;\n\nexport type SenderType = (typeof SenderType)[keyof typeof SenderType];\n\nexport const ConversationStatus = {\n\tOPEN: \"open\",\n\tRESOLVED: \"resolved\",\n\tSPAM: \"spam\",\n} as const;\n\nexport type ConversationStatus =\n\t(typeof ConversationStatus)[keyof typeof ConversationStatus];\n\nexport const ConversationPriority = {\n\tLOW: \"low\",\n\tNORMAL: \"normal\",\n\tHIGH: \"high\",\n\tURGENT: \"urgent\",\n} as const;\n\nexport const TimelineItemVisibility = {\n\tPUBLIC: \"public\",\n\tPRIVATE: \"private\",\n} as const;\n\nexport const ConversationTimelineType = {\n\tMESSAGE: \"message\",\n\tEVENT: \"event\",\n\tIDENTIFICATION: \"identification\",\n\tTOOL: \"tool\",\n} as const;\n\nexport type ConversationTimelineType =\n\t(typeof ConversationTimelineType)[keyof typeof ConversationTimelineType];\n\nexport const ConversationEventType = {\n\tASSIGNED: \"assigned\",\n\tUNASSIGNED: \"unassigned\",\n\tPARTICIPANT_REQUESTED: \"participant_requested\",\n\tPARTICIPANT_JOINED: \"participant_joined\",\n\tPARTICIPANT_LEFT: \"participant_left\",\n\tSTATUS_CHANGED: \"status_changed\",\n\tPRIORITY_CHANGED: \"priority_changed\",\n\tTAG_ADDED: \"tag_added\",\n\tTAG_REMOVED: \"tag_removed\",\n\tRESOLVED: \"resolved\",\n\tREOPENED: \"reopened\",\n\tVISITOR_BLOCKED: \"visitor_blocked\",\n\tVISITOR_UNBLOCKED: \"visitor_unblocked\",\n\tVISITOR_IDENTIFIED: \"visitor_identified\",\n\t// Private AI events (team only, not visible to visitors)\n\tAI_ANALYZED: \"ai_analyzed\",\n\tTITLE_GENERATED: \"title_generated\",\n\tAI_ESCALATED: \"ai_escalated\",\n} as const;\n\nexport const ConversationParticipationStatus = {\n\tREQUESTED: \"requested\",\n\tACTIVE: \"active\",\n\tLEFT: \"left\",\n\tDECLINED: \"declined\",\n} as const;\n\nexport const ConversationSentiment = {\n\tPOSITIVE: \"positive\",\n\tNEGATIVE: \"negative\",\n\tNEUTRAL: \"neutral\",\n} as const;\n\nexport type ConversationSentiment =\n\t(typeof ConversationSentiment)[keyof typeof ConversationSentiment];\n\nexport type ConversationParticipationStatus =\n\t(typeof ConversationParticipationStatus)[keyof typeof ConversationParticipationStatus];\n\nexport type ConversationEventType =\n\t(typeof ConversationEventType)[keyof typeof ConversationEventType];\n\nexport type TimelineItemVisibility =\n\t(typeof TimelineItemVisibility)[keyof typeof TimelineItemVisibility];\n\nexport type ConversationPriority =\n\t(typeof ConversationPriority)[keyof typeof ConversationPriority];\n\nexport const WebsiteInstallationTarget = {\n\tNEXTJS: \"nextjs\",\n\tREACT: \"react\",\n} as const;\n\nexport const WebsiteStatus = {\n\tACTIVE: \"active\",\n\tINACTIVE: \"inactive\",\n} as const;\n\nexport type WebsiteStatus = (typeof WebsiteStatus)[keyof typeof WebsiteStatus];\n\nexport type WebsiteInstallationTarget =\n\t(typeof WebsiteInstallationTarget)[keyof typeof WebsiteInstallationTarget];\n\nexport const APIKeyType = {\n\tPRIVATE: \"private\",\n\tPUBLIC: \"public\",\n} as const;\n\nexport type APIKeyType = (typeof APIKeyType)[keyof typeof APIKeyType];\n"],"mappings":";AAAA,MAAa,aAAa;CACzB,SAAS;CACT,aAAa;CACb,IAAI;CACJ;AAID,MAAa,qBAAqB;CACjC,MAAM;CACN,UAAU;CACV,MAAM;CACN;AAKD,MAAa,uBAAuB;CACnC,KAAK;CACL,QAAQ;CACR,MAAM;CACN,QAAQ;CACR;AAED,MAAa,yBAAyB;CACrC,QAAQ;CACR,SAAS;CACT;AAED,MAAa,2BAA2B;CACvC,SAAS;CACT,OAAO;CACP,gBAAgB;CAChB,MAAM;CACN;AAKD,MAAa,wBAAwB;CACpC,UAAU;CACV,YAAY;CACZ,uBAAuB;CACvB,oBAAoB;CACpB,kBAAkB;CAClB,gBAAgB;CAChB,kBAAkB;CAClB,WAAW;CACX,aAAa;CACb,UAAU;CACV,UAAU;CACV,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CAEpB,aAAa;CACb,iBAAiB;CACjB,cAAc;CACd;AAED,MAAa,kCAAkC;CAC9C,WAAW;CACX,QAAQ;CACR,MAAM;CACN,UAAU;CACV;AAED,MAAa,wBAAwB;CACpC,UAAU;CACV,UAAU;CACV,SAAS;CACT;AAiBD,MAAa,4BAA4B;CACxC,QAAQ;CACR,OAAO;CACP;AAED,MAAa,gBAAgB;CAC5B,QAAQ;CACR,UAAU;CACV;AAOD,MAAa,aAAa;CACzB,SAAS;CACT,QAAQ;CACR"}
package/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_GOALS, AI_MODELS, AiAgentBehaviorSettings, AiAgentResponse, CreateAiAgentRequest, DeleteAiAgentRequest, GenerateBasePromptRequest, GenerateBasePromptResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, ToggleAiAgentActiveRequest, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, createAiAgentRequestSchema, deleteAiAgentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema } from "./api/ai-agent.js";
1
+ import { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, AiAgentBehaviorSettings, AiAgentCorePromptDocumentName, AiAgentPromptDocumentResponse, AiAgentResponse, CreateAiAgentRequest, CreateSkillDocumentRequest, DeleteAiAgentRequest, DeleteSkillDocumentRequest, GenerateBasePromptRequest, GenerateBasePromptResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, ListPromptDocumentsRequest, ListPromptDocumentsResponse, ToggleAiAgentActiveRequest, ToggleSkillDocumentRequest, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, UpdateSkillDocumentRequest, UpsertCoreDocumentRequest, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, createAiAgentRequestSchema, createSkillDocumentRequestSchema, deleteAiAgentRequestSchema, deleteSkillDocumentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, toggleAiAgentActiveRequestSchema, toggleSkillDocumentRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateSkillDocumentRequestSchema, upsertCoreDocumentRequestSchema } from "./api/ai-agent.js";
2
2
  import { PaginationInput, PaginationResponse, emailSchema, optionalUserIdSchema, paginationResponseSchema, paginationSchema, userIdSchema } from "./api/common.js";
3
3
  import { Contact, ContactMetadata, ContactOrganizationResponse, ContactResponse, CreateContactOrganizationRequest, CreateContactRequest, IdentifyContactRequest, IdentifyContactResponse, UpdateContactMetadataRequest, UpdateContactOrganizationRequest, UpdateContactRequest, contactMetadataSchema, contactOrganization, contactOrganizationResponseSchema, contactResponseSchema, createContactOrganizationRequestSchema, createContactRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema } from "./api/contact.js";
4
- import { CreateConversationRequestBody, CreateConversationResponseBody, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, ListConversationsRequest, ListConversationsResponse, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, SetConversationTypingRequestBody, SetConversationTypingResponseBody, createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema } from "./api/conversation.js";
4
+ import { CreateConversationRequestBody, CreateConversationResponseBody, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, ListConversationsRequest, ListConversationsResponse, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, SetConversationTypingRequestBody, SetConversationTypingResponseBody, SubmitConversationRatingRequestBody, SubmitConversationRatingResponseBody, createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema } from "./api/conversation.js";
5
+ import { Feedback, GetFeedbackResponse, ListFeedbackRequest, ListFeedbackResponse, SubmitFeedbackRequest, SubmitFeedbackResponse, feedbackSchema, getFeedbackResponseSchema, listFeedbackRequestSchema, listFeedbackResponseSchema, submitFeedbackRequestSchema, submitFeedbackResponseSchema } from "./api/feedback.js";
5
6
  import { ArticleKnowledgePayload, CreateKnowledgeRequest, CreateKnowledgeRestRequest, DeleteKnowledgeRequest, FaqKnowledgePayload, GetKnowledgeRequest, Knowledge, KnowledgeCreateInput, KnowledgeResponse, KnowledgeType, ListKnowledgeRequest, ListKnowledgeResponse, ListKnowledgeRestRequest, ToggleKnowledgeEntryIncludedRequest, UpdateKnowledgeRequest, UpdateKnowledgeRestRequest, UploadKnowledgeFileRequest, UrlKnowledgePayload, articleKnowledgePayloadSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, deleteKnowledgeRequestSchema, faqKnowledgePayloadSchema, getKnowledgeRequestSchema, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, uploadKnowledgeFileRequestSchema, urlKnowledgePayloadSchema } from "./api/knowledge.js";
6
7
  import { CancelLinkSourceRequest, CrawlProgressPage, CreateLinkSourceRequest, DeleteLinkSourceRequest, DeletePageRequest, DiscoveredPage, GetCrawlStatusRequest, GetLinkSourceRequest, GetTrainingStatsRequest, IgnorePageRequest, LinkSourceResponse, LinkSourceStatus, ListKnowledgeByLinkSourceRequest, ListLinkSourcesRequest, ListLinkSourcesResponse, RecrawlLinkSourceRequest, ReindexPageRequest, ScanSubpagesRequest, ToggleKnowledgeIncludedRequest, TrainingStatsResponse, cancelLinkSourceRequestSchema, crawlProgressPageSchema, createLinkSourceRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, getCrawlStatusRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, ignorePageRequestSchema, linkSourceResponseSchema, linkSourceStatusSchema, listKnowledgeByLinkSourceRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, scanSubpagesRequestSchema, toggleKnowledgeIncludedRequestSchema, trainingStatsResponseSchema } from "./api/link-source.js";
7
8
  import { ContactNotificationSettings, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MemberNotificationChannel, MemberNotificationChannelDefinition, MemberNotificationPreference, MemberNotificationSettingsResponse, UpdateMemberNotificationSettingsRequest, UpdateMemberNotificationSettingsResponse, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, getDefaultMemberNotificationPreference, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema } from "./api/notification.js";
@@ -17,7 +18,7 @@ import { PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTER
17
18
  import { AnyRealtimeEvent, RealtimeEvent, RealtimeEventData, RealtimeEventPayload, RealtimeEventType, baseRealtimeEvent, getEventPayload, isValidEventType, realtimeSchema, validateRealtimeEvent } from "./realtime-events.js";
18
19
  import { Conversation, ConversationSeen, conversationSchema, conversationSeenSchema } from "./schemas.js";
19
20
  import { ContactDetailResponse, ContactListItem, ContactListVisitorStatus, ContactVisitorSummary, ListContactsResponse, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactVisitorSummarySchema, listContactsResponseSchema } from "./trpc/contact.js";
20
- import { ConversationHeader, ConversationMutationResponse, ConversationRecordResponse, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSentimentSchema, conversationStatusSchema, listConversationHeadersResponseSchema } from "./trpc/conversation.js";
21
+ import { ConversationHeader, ConversationMutationResponse, ConversationRecordResponse, InboxAnalyticsRequest, InboxAnalyticsResponse, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSentimentSchema, conversationStatusSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, listConversationHeadersResponseSchema } from "./trpc/conversation.js";
21
22
  import { BlockVisitorResponse, ListVisitorPresenceResponse, VisitorPresenceEntry, blockVisitorResponseSchema, listVisitorPresenceResponseSchema, visitorPresenceEntrySchema } from "./trpc/visitor.js";
22
23
 
23
24
  //#region src/index.d.ts
@@ -40,5 +41,5 @@ type DefaultMessage = {
40
41
  senderId?: string;
41
42
  };
42
43
  //#endregion
43
- export { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_GOALS, AI_MODELS, APIKeyType, AiAgentBehaviorSettings, AiAgentResponse, AnyRealtimeEvent, ArticleKnowledgePayload, AvailableAIAgent, AvailableAIAgentSchema, AvailableHumanAgent, BlockVisitorResponse, CancelLinkSourceRequest, CheckWebsiteDomainRequest, Contact, ContactDetailResponse, ContactListItem, ContactListVisitorStatus, ContactMetadata, ContactNotificationSettings, ContactOrganizationResponse, ContactResponse, ContactVisitorSummary, type Conversation, ConversationEventType, ConversationHeader, ConversationMutationResponse, ConversationParticipationStatus, ConversationPriority, ConversationRecordResponse, type ConversationSeen, ConversationSentiment, ConversationStatus, ConversationTimelineType, CossistantConfig, CossistantError, CossistantProviderMetadata, CrawlProgressPage, CreateAiAgentRequest, CreateContactOrganizationRequest, CreateContactRequest, CreateConversationRequestBody, CreateConversationResponseBody, CreateKnowledgeRequest, CreateKnowledgeRestRequest, CreateLinkSourceRequest, CreateWebsiteApiKeyRequest, CreateWebsiteRequest, CreateWebsiteResponse, DefaultMessage, DeleteAiAgentRequest, DeleteKnowledgeRequest, DeleteLinkSourceRequest, DeletePageRequest, DiscoveredPage, FaqKnowledgePayload, FilePart, GenerateBasePromptRequest, GenerateBasePromptResponse, GenerateUploadUrlRequest, GenerateUploadUrlResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, GetCrawlStatusRequest, GetKnowledgeRequest, GetLinkSourceRequest, GetTrainingStatsRequest, IdentifyContactRequest, IdentifyContactResponse, IgnorePageRequest, ImagePart, Knowledge, KnowledgeCreateInput, KnowledgeResponse, KnowledgeType, LinkSourceResponse, LinkSourceStatus, ListByOrganizationRequest, ListContactsResponse, ListConversationsRequest, ListConversationsResponse, ListKnowledgeByLinkSourceRequest, ListKnowledgeRequest, ListKnowledgeResponse, ListKnowledgeRestRequest, ListLinkSourcesRequest, ListLinkSourcesResponse, ListVisitorPresenceResponse, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, MemberNotificationChannel, MemberNotificationChannelDefinition, MemberNotificationPreference, MemberNotificationSettingsResponse, OrganizationResponse, PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS, PaginationInput, PaginationResponse, PublicContact, PublicVisitor, PublicVisitorResponse, PublicWebsiteResponse, RealtimeEvent, RealtimeEventData, RealtimeEventPayload, RealtimeEventType, ReasoningPart, RecrawlLinkSourceRequest, ReindexPageRequest, RevokeWebsiteApiKeyRequest, ScanSubpagesRequest, SendTimelineItemRequest, SendTimelineItemResponse, SenderType, SetConversationTypingRequestBody, SetConversationTypingResponseBody, SourceDocumentPart, SourceUrlPart, StepStartPart, TextPart, TimelineItem, TimelineItemParts, TimelineItemVisibility, TimelinePartEvent, TimelinePartFile, TimelinePartImage, TimelinePartMetadata, TimelinePartText, ToggleAiAgentActiveRequest, ToggleKnowledgeEntryIncludedRequest, ToggleKnowledgeIncludedRequest, ToolPart, ToolState, TrainingStatsResponse, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, UpdateContactMetadataRequest, UpdateContactOrganizationRequest, UpdateContactRequest, UpdateKnowledgeRequest, UpdateKnowledgeRestRequest, UpdateMemberNotificationSettingsRequest, UpdateMemberNotificationSettingsResponse, UpdateUserProfileRequest, UpdateVisitorMetadataRequest, UpdateVisitorRequest, UpdateWebsiteRequest, UploadKnowledgeFileRequest, UrlKnowledgePayload, UserResponse, Visitor, VisitorMetadata, VisitorPresenceEntry, VisitorResponse, WebsiteApiKey, WebsiteDeveloperSettingsResponse, WebsiteInstallationTarget, WebsiteListItem, WebsiteStatus, WebsiteSummary, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, articleKnowledgePayloadSchema, availableHumanAgentSchema, baseRealtimeEvent, blockVisitorResponseSchema, cancelLinkSourceRequestSchema, checkWebsiteDomainRequestSchema, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactMetadataSchema, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, contactOrganization, contactOrganizationResponseSchema, contactResponseSchema, contactVisitorSummarySchema, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSchema, conversationSeenSchema, conversationSentimentSchema, conversationStatusSchema, cossistantProviderMetadataSchema, crawlProgressPageSchema, createAiAgentRequestSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, createLinkSourceRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, deleteAiAgentRequestSchema, deleteKnowledgeRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, emailSchema, faqKnowledgePayloadSchema, filePartSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, getCrawlStatusRequestSchema, getDefaultMemberNotificationPreference, getEventPayload, getKnowledgeRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, ignorePageRequestSchema, imagePartSchema, isValidEventType, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, linkSourceResponseSchema, linkSourceStatusSchema, listByOrganizationRequestSchema, listContactsResponseSchema, listConversationHeadersResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, listKnowledgeByLinkSourceRequestSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, listVisitorPresenceResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, realtimeSchema, reasoningPartSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, revokeWebsiteApiKeyRequestSchema, scanSubpagesRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toggleAiAgentActiveRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, toggleKnowledgeIncludedRequestSchema, toolPartSchema, toolStateSchema, trainingStatsResponseSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadKnowledgeFileRequestSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, urlKnowledgePayloadSchema, userIdSchema, userResponseSchema, validateRealtimeEvent, visitorMetadataSchema, visitorPresenceEntrySchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
44
+ export { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, APIKeyType, AiAgentBehaviorSettings, AiAgentCorePromptDocumentName, AiAgentPromptDocumentResponse, AiAgentResponse, AnyRealtimeEvent, ArticleKnowledgePayload, AvailableAIAgent, AvailableAIAgentSchema, AvailableHumanAgent, BlockVisitorResponse, CancelLinkSourceRequest, CheckWebsiteDomainRequest, Contact, ContactDetailResponse, ContactListItem, ContactListVisitorStatus, ContactMetadata, ContactNotificationSettings, ContactOrganizationResponse, ContactResponse, ContactVisitorSummary, type Conversation, ConversationEventType, ConversationHeader, ConversationMutationResponse, ConversationParticipationStatus, ConversationPriority, ConversationRecordResponse, type ConversationSeen, ConversationSentiment, ConversationStatus, ConversationTimelineType, CossistantConfig, CossistantError, CossistantProviderMetadata, CrawlProgressPage, CreateAiAgentRequest, CreateContactOrganizationRequest, CreateContactRequest, CreateConversationRequestBody, CreateConversationResponseBody, CreateKnowledgeRequest, CreateKnowledgeRestRequest, CreateLinkSourceRequest, CreateSkillDocumentRequest, CreateWebsiteApiKeyRequest, CreateWebsiteRequest, CreateWebsiteResponse, DefaultMessage, DeleteAiAgentRequest, DeleteKnowledgeRequest, DeleteLinkSourceRequest, DeletePageRequest, DeleteSkillDocumentRequest, DiscoveredPage, FaqKnowledgePayload, Feedback, FilePart, GenerateBasePromptRequest, GenerateBasePromptResponse, GenerateUploadUrlRequest, GenerateUploadUrlResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, GetCrawlStatusRequest, GetFeedbackResponse, GetKnowledgeRequest, GetLinkSourceRequest, GetTrainingStatsRequest, IdentifyContactRequest, IdentifyContactResponse, IgnorePageRequest, ImagePart, InboxAnalyticsRequest, InboxAnalyticsResponse, Knowledge, KnowledgeCreateInput, KnowledgeResponse, KnowledgeType, LinkSourceResponse, LinkSourceStatus, ListByOrganizationRequest, ListContactsResponse, ListConversationsRequest, ListConversationsResponse, ListFeedbackRequest, ListFeedbackResponse, ListKnowledgeByLinkSourceRequest, ListKnowledgeRequest, ListKnowledgeResponse, ListKnowledgeRestRequest, ListLinkSourcesRequest, ListLinkSourcesResponse, ListPromptDocumentsRequest, ListPromptDocumentsResponse, ListVisitorPresenceResponse, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, MemberNotificationChannel, MemberNotificationChannelDefinition, MemberNotificationPreference, MemberNotificationSettingsResponse, OrganizationResponse, PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS, PaginationInput, PaginationResponse, PublicContact, PublicVisitor, PublicVisitorResponse, PublicWebsiteResponse, RealtimeEvent, RealtimeEventData, RealtimeEventPayload, RealtimeEventType, ReasoningPart, RecrawlLinkSourceRequest, ReindexPageRequest, RevokeWebsiteApiKeyRequest, ScanSubpagesRequest, SendTimelineItemRequest, SendTimelineItemResponse, SenderType, SetConversationTypingRequestBody, SetConversationTypingResponseBody, SourceDocumentPart, SourceUrlPart, StepStartPart, SubmitConversationRatingRequestBody, SubmitConversationRatingResponseBody, SubmitFeedbackRequest, SubmitFeedbackResponse, TextPart, TimelineItem, TimelineItemParts, TimelineItemVisibility, TimelinePartEvent, TimelinePartFile, TimelinePartImage, TimelinePartMetadata, TimelinePartText, ToggleAiAgentActiveRequest, ToggleKnowledgeEntryIncludedRequest, ToggleKnowledgeIncludedRequest, ToggleSkillDocumentRequest, ToolPart, ToolState, TrainingStatsResponse, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, UpdateContactMetadataRequest, UpdateContactOrganizationRequest, UpdateContactRequest, UpdateKnowledgeRequest, UpdateKnowledgeRestRequest, UpdateMemberNotificationSettingsRequest, UpdateMemberNotificationSettingsResponse, UpdateSkillDocumentRequest, UpdateUserProfileRequest, UpdateVisitorMetadataRequest, UpdateVisitorRequest, UpdateWebsiteRequest, UploadKnowledgeFileRequest, UpsertCoreDocumentRequest, UrlKnowledgePayload, UserResponse, Visitor, VisitorMetadata, VisitorPresenceEntry, VisitorResponse, WebsiteApiKey, WebsiteDeveloperSettingsResponse, WebsiteInstallationTarget, WebsiteListItem, WebsiteStatus, WebsiteSummary, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, articleKnowledgePayloadSchema, availableHumanAgentSchema, baseRealtimeEvent, blockVisitorResponseSchema, cancelLinkSourceRequestSchema, checkWebsiteDomainRequestSchema, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactMetadataSchema, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, contactOrganization, contactOrganizationResponseSchema, contactResponseSchema, contactVisitorSummarySchema, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSchema, conversationSeenSchema, conversationSentimentSchema, conversationStatusSchema, cossistantProviderMetadataSchema, crawlProgressPageSchema, createAiAgentRequestSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, createLinkSourceRequestSchema, createSkillDocumentRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, deleteAiAgentRequestSchema, deleteKnowledgeRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, deleteSkillDocumentRequestSchema, discoveredPageSchema, emailSchema, faqKnowledgePayloadSchema, feedbackSchema, filePartSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, getCrawlStatusRequestSchema, getDefaultMemberNotificationPreference, getEventPayload, getFeedbackResponseSchema, getKnowledgeRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, ignorePageRequestSchema, imagePartSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, isValidEventType, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, linkSourceResponseSchema, linkSourceStatusSchema, listByOrganizationRequestSchema, listContactsResponseSchema, listConversationHeadersResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, listFeedbackRequestSchema, listFeedbackResponseSchema, listKnowledgeByLinkSourceRequestSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, listVisitorPresenceResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, realtimeSchema, reasoningPartSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, revokeWebsiteApiKeyRequestSchema, scanSubpagesRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema, submitFeedbackRequestSchema, submitFeedbackResponseSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toggleAiAgentActiveRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, toggleKnowledgeIncludedRequestSchema, toggleSkillDocumentRequestSchema, toolPartSchema, toolStateSchema, trainingStatsResponseSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema, updateSkillDocumentRequestSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadKnowledgeFileRequestSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, upsertCoreDocumentRequestSchema, urlKnowledgePayloadSchema, userIdSchema, userResponseSchema, validateRealtimeEvent, visitorMetadataSchema, visitorPresenceEntrySchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
44
45
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KAYY,gBAAA;;;;;;;;KASA,eAAA;;;YAGD;;AAZC,KAeA,cAAA,GAfgB;EAShB,OAAA,EAAA,MAAA;EAMA,UAAA,EAEC,UAFa"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;KAYY,gBAAA;;;;;;;;KASA,eAAA;;;YAGD;;KAGC,cAAA;EAfA,OAAA,EAAA,MAAA;EASA,UAAA,EAQC,UARc;EAMf,QAAA,CAAA,EAAA,MAAc"}
package/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { APIKeyType, ConversationEventType, ConversationParticipationStatus, ConversationPriority, ConversationSentiment, ConversationStatus, ConversationTimelineType, SenderType, TimelineItemVisibility, WebsiteInstallationTarget, WebsiteStatus } from "./enums.js";
2
- import { AI_AGENT_GOALS, AI_MODELS, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, createAiAgentRequestSchema, deleteAiAgentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema } from "./api/ai-agent.js";
2
+ import { AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, createAiAgentRequestSchema, createSkillDocumentRequestSchema, deleteAiAgentRequestSchema, deleteSkillDocumentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, toggleAiAgentActiveRequestSchema, toggleSkillDocumentRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateSkillDocumentRequestSchema, upsertCoreDocumentRequestSchema } from "./api/ai-agent.js";
3
3
  import { emailSchema, optionalUserIdSchema, paginationResponseSchema, paginationSchema, userIdSchema } from "./api/common.js";
4
4
  import { contactMetadataSchema, contactOrganizationResponseSchema, contactResponseSchema, createContactOrganizationRequestSchema, createContactRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema } from "./api/contact.js";
5
5
  import { cossistantProviderMetadataSchema, filePartSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, imagePartSchema, reasoningPartSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toolPartSchema, toolStateSchema } from "./api/timeline-item.js";
6
6
  import { conversationSchema, conversationSeenSchema } from "./schemas.js";
7
- import { createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema } from "./api/conversation.js";
7
+ import { createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema } from "./api/conversation.js";
8
+ import { feedbackSchema, getFeedbackResponseSchema, listFeedbackRequestSchema, listFeedbackResponseSchema, submitFeedbackRequestSchema, submitFeedbackResponseSchema } from "./api/feedback.js";
8
9
  import { articleKnowledgePayloadSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, deleteKnowledgeRequestSchema, faqKnowledgePayloadSchema, getKnowledgeRequestSchema, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, uploadKnowledgeFileRequestSchema, urlKnowledgePayloadSchema } from "./api/knowledge.js";
9
10
  import { cancelLinkSourceRequestSchema, crawlProgressPageSchema, createLinkSourceRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, getCrawlStatusRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, ignorePageRequestSchema, linkSourceResponseSchema, linkSourceStatusSchema, listKnowledgeByLinkSourceRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, scanSubpagesRequestSchema, toggleKnowledgeIncludedRequestSchema, trainingStatsResponseSchema } from "./api/link-source.js";
10
11
  import { MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MemberNotificationChannel, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, getDefaultMemberNotificationPreference, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema } from "./api/notification.js";
@@ -14,9 +15,9 @@ import { updateUserProfileRequestSchema, userResponseSchema } from "./api/user.j
14
15
  import { publicContactResponseSchema, publicVisitorResponseSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema } from "./api/visitor.js";
15
16
  import { AvailableAIAgentSchema, availableHumanAgentSchema, checkWebsiteDomainRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, listByOrganizationRequestSchema, publicWebsiteResponseSchema, revokeWebsiteApiKeyRequestSchema, updateWebsiteRequestSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema } from "./api/website.js";
16
17
  import { PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS } from "./presence.js";
17
- import { conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSentimentSchema, conversationStatusSchema, listConversationHeadersResponseSchema } from "./trpc/conversation.js";
18
+ import { conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSentimentSchema, conversationStatusSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, listConversationHeadersResponseSchema } from "./trpc/conversation.js";
18
19
  import { baseRealtimeEvent, getEventPayload, isValidEventType, realtimeSchema, validateRealtimeEvent } from "./realtime-events.js";
19
20
  import { contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactVisitorSummarySchema, listContactsResponseSchema } from "./trpc/contact.js";
20
21
  import { blockVisitorResponseSchema, listVisitorPresenceResponseSchema, visitorPresenceEntrySchema } from "./trpc/visitor.js";
21
22
 
22
- export { AI_AGENT_GOALS, AI_MODELS, APIKeyType, AvailableAIAgentSchema, ConversationEventType, ConversationParticipationStatus, ConversationPriority, ConversationSentiment, ConversationStatus, ConversationTimelineType, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MemberNotificationChannel, PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS, SenderType, TimelineItemVisibility, WebsiteInstallationTarget, WebsiteStatus, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, articleKnowledgePayloadSchema, availableHumanAgentSchema, baseRealtimeEvent, blockVisitorResponseSchema, cancelLinkSourceRequestSchema, checkWebsiteDomainRequestSchema, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactMetadataSchema, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, contactOrganizationResponseSchema, contactResponseSchema, contactVisitorSummarySchema, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSchema, conversationSeenSchema, conversationSentimentSchema, conversationStatusSchema, cossistantProviderMetadataSchema, crawlProgressPageSchema, createAiAgentRequestSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, createLinkSourceRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, deleteAiAgentRequestSchema, deleteKnowledgeRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, emailSchema, faqKnowledgePayloadSchema, filePartSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, getCrawlStatusRequestSchema, getDefaultMemberNotificationPreference, getEventPayload, getKnowledgeRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, ignorePageRequestSchema, imagePartSchema, isValidEventType, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, linkSourceResponseSchema, linkSourceStatusSchema, listByOrganizationRequestSchema, listContactsResponseSchema, listConversationHeadersResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, listKnowledgeByLinkSourceRequestSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, listVisitorPresenceResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, realtimeSchema, reasoningPartSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, revokeWebsiteApiKeyRequestSchema, scanSubpagesRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toggleAiAgentActiveRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, toggleKnowledgeIncludedRequestSchema, toolPartSchema, toolStateSchema, trainingStatsResponseSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadKnowledgeFileRequestSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, urlKnowledgePayloadSchema, userIdSchema, userResponseSchema, validateRealtimeEvent, visitorMetadataSchema, visitorPresenceEntrySchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
23
+ export { AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, APIKeyType, AvailableAIAgentSchema, ConversationEventType, ConversationParticipationStatus, ConversationPriority, ConversationSentiment, ConversationStatus, ConversationTimelineType, MEMBER_NOTIFICATION_CHANNEL_DEFINITIONS, MEMBER_NOTIFICATION_DEFINITION_MAP, MemberNotificationChannel, PRESENCE_AWAY_WINDOW_MS, PRESENCE_ONLINE_WINDOW_MS, PRESENCE_PING_INTERVAL_MS, SenderType, TimelineItemVisibility, WebsiteInstallationTarget, WebsiteStatus, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, articleKnowledgePayloadSchema, availableHumanAgentSchema, baseRealtimeEvent, blockVisitorResponseSchema, cancelLinkSourceRequestSchema, checkWebsiteDomainRequestSchema, contactDetailResponseSchema, contactListItemSchema, contactListVisitorStatusSchema, contactMetadataSchema, contactNotificationChannelConfigSchema, contactNotificationSettingsSchema, contactOrganizationResponseSchema, contactResponseSchema, contactVisitorSummarySchema, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSchema, conversationSeenSchema, conversationSentimentSchema, conversationStatusSchema, cossistantProviderMetadataSchema, crawlProgressPageSchema, createAiAgentRequestSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, createLinkSourceRequestSchema, createSkillDocumentRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, deleteAiAgentRequestSchema, deleteKnowledgeRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, deleteSkillDocumentRequestSchema, discoveredPageSchema, emailSchema, faqKnowledgePayloadSchema, feedbackSchema, filePartSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, getCrawlStatusRequestSchema, getDefaultMemberNotificationPreference, getEventPayload, getFeedbackResponseSchema, getKnowledgeRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, ignorePageRequestSchema, imagePartSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, isValidEventType, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, linkSourceResponseSchema, linkSourceStatusSchema, listByOrganizationRequestSchema, listContactsResponseSchema, listConversationHeadersResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, listFeedbackRequestSchema, listFeedbackResponseSchema, listKnowledgeByLinkSourceRequestSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, listVisitorPresenceResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, memberNotificationChannelSchema, memberNotificationPreferenceSchema, memberNotificationSettingsResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, realtimeSchema, reasoningPartSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, revokeWebsiteApiKeyRequestSchema, scanSubpagesRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, sourceDocumentPartSchema, sourceUrlPartSchema, stepStartPartSchema, submitConversationRatingRequestSchema, submitConversationRatingResponseSchema, submitFeedbackRequestSchema, submitFeedbackResponseSchema, textPartSchema, timelineItemPartsSchema, timelineItemSchema, timelinePartEventSchema, timelinePartMetadataSchema, toggleAiAgentActiveRequestSchema, toggleKnowledgeEntryIncludedRequestSchema, toggleKnowledgeIncludedRequestSchema, toggleSkillDocumentRequestSchema, toolPartSchema, toolStateSchema, trainingStatsResponseSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, updateMemberNotificationSettingsRequestSchema, updateMemberNotificationSettingsResponseSchema, updateSkillDocumentRequestSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadKnowledgeFileRequestSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, upsertCoreDocumentRequestSchema, urlKnowledgePayloadSchema, userIdSchema, userResponseSchema, validateRealtimeEvent, visitorMetadataSchema, visitorPresenceEntrySchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cossistant/types",
3
3
  "type": "module",
4
- "version": "0.0.30",
4
+ "version": "0.0.32",
5
5
  "private": false,
6
6
  "author": "Cossistant Team",
7
7
  "description": "Shared TypeScript types for Cossistant packages",