@cossistant/types 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/api/ai-agent-capabilities.d.ts +16 -19
  2. package/api/ai-agent-capabilities.d.ts.map +1 -1
  3. package/api/ai-agent-capabilities.js +215 -286
  4. package/api/ai-agent-capabilities.js.map +1 -1
  5. package/api/ai-agent-defaults.d.ts +6 -0
  6. package/api/ai-agent-defaults.d.ts.map +1 -0
  7. package/api/ai-agent-defaults.js +33 -0
  8. package/api/ai-agent-defaults.js.map +1 -0
  9. package/api/ai-agent.d.ts +311 -204
  10. package/api/ai-agent.d.ts.map +1 -1
  11. package/api/ai-agent.js +175 -111
  12. package/api/ai-agent.js.map +1 -1
  13. package/api/conversation.d.ts +29 -6
  14. package/api/conversation.d.ts.map +1 -1
  15. package/api/conversation.js +7 -2
  16. package/api/conversation.js.map +1 -1
  17. package/api/feedback.d.ts +5 -0
  18. package/api/feedback.d.ts.map +1 -1
  19. package/api/feedback.js +2 -0
  20. package/api/feedback.js.map +1 -1
  21. package/api/index.d.ts +7 -6
  22. package/api/index.js +7 -6
  23. package/api/knowledge.d.ts.map +1 -1
  24. package/api/link-source.d.ts +4 -4
  25. package/api/link-source.d.ts.map +1 -1
  26. package/api/link-source.js +1 -1
  27. package/api/link-source.js.map +1 -1
  28. package/api/timeline-item.d.ts +18 -6
  29. package/api/timeline-item.d.ts.map +1 -1
  30. package/api/timeline-item.js +3 -1
  31. package/api/timeline-item.js.map +1 -1
  32. package/api/user.d.ts +1 -1
  33. package/api/user.d.ts.map +1 -1
  34. package/api/user.js +2 -2
  35. package/api/user.js.map +1 -1
  36. package/api/visitor.d.ts +225 -1
  37. package/api/visitor.d.ts.map +1 -1
  38. package/api/visitor.js +142 -1
  39. package/api/visitor.js.map +1 -1
  40. package/api/website.d.ts +12 -3
  41. package/api/website.d.ts.map +1 -1
  42. package/api/website.js +16 -2
  43. package/api/website.js.map +1 -1
  44. package/enums.d.ts +2 -0
  45. package/enums.d.ts.map +1 -1
  46. package/enums.js +3 -1
  47. package/enums.js.map +1 -1
  48. package/index.d.ts +9 -8
  49. package/index.d.ts.map +1 -1
  50. package/index.js +9 -8
  51. package/package.json +1 -1
  52. package/realtime-events.d.ts +74 -4
  53. package/realtime-events.d.ts.map +1 -1
  54. package/realtime-events.js +6 -2
  55. package/realtime-events.js.map +1 -1
  56. package/schemas.d.ts +3 -1
  57. package/schemas.d.ts.map +1 -1
  58. package/tool-timeline-policy.d.ts +19 -2
  59. package/tool-timeline-policy.d.ts.map +1 -1
  60. package/tool-timeline-policy.js +29 -6
  61. package/tool-timeline-policy.js.map +1 -1
  62. package/trpc/conversation-hard-limit.d.ts +30 -0
  63. package/trpc/conversation-hard-limit.d.ts.map +1 -0
  64. package/trpc/conversation-hard-limit.js +43 -0
  65. package/trpc/conversation-hard-limit.js.map +1 -0
  66. package/trpc/conversation.d.ts +44 -4
  67. package/trpc/conversation.d.ts.map +1 -1
  68. package/trpc/conversation.js +6 -0
  69. package/trpc/conversation.js.map +1 -1
  70. package/trpc/visitor.d.ts +73 -15
  71. package/trpc/visitor.d.ts.map +1 -1
  72. package/trpc/visitor.js +15 -8
  73. package/trpc/visitor.js.map +1 -1
@@ -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\";\nimport { TOOL_TIMELINE_LOG_TYPE } from \"../tool-timeline-policy\";\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/callProviderMetadata.cossistant namespace.\n// ============================================================================\n\n// ----------------------------------------------------------------------------\n// Cossistant Provider Metadata (extension point for all parts)\n// ----------------------------------------------------------------------------\nconst cossistantToolTimelineMetadataSchema = z.object({\n\tlogType: z\n\t\t.enum([\n\t\t\tTOOL_TIMELINE_LOG_TYPE.CUSTOMER_FACING,\n\t\t\tTOOL_TIMELINE_LOG_TYPE.LOG,\n\t\t\tTOOL_TIMELINE_LOG_TYPE.DECISION,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription:\n\t\t\t\t\"Tool timeline classification: conversation-visible, log-only, or decision stage\",\n\t\t}),\n\ttriggerMessageId: z.string().openapi({\n\t\tdescription:\n\t\t\t\"Message ID that triggered the tool/decision workflow execution\",\n\t}),\n\tworkflowRunId: z.string().openapi({\n\t\tdescription:\n\t\t\t\"Workflow run identifier used to correlate tool timeline updates\",\n\t}),\n\ttriggerVisibility: z.enum([\"public\", \"private\"]).optional().openapi({\n\t\tdescription:\n\t\t\t\"Visibility of the trigger message at the time the tool was executed\",\n\t}),\n});\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\ttoolTimeline: cossistantToolTimelineMetadataSchema.optional().openapi({\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"Tool timeline metadata used to classify visibility and trigger linkage\",\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\tcallProviderMetadata: cossistantProviderMetadataSchema,\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>;\nexport type CossistantToolTimelineMetadata = z.infer<\n\ttypeof cossistantToolTimelineMetadataSchema\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":";;;;;AAkBA,MAAM,uCAAuC,EAAE,OAAO;CACrD,SAAS,EACP,KAAK;EACL,uBAAuB;EACvB,uBAAuB;EACvB,uBAAuB;EACvB,CAAC,CACD,QAAQ,EACR,aACC,mFACD,CAAC;CACH,kBAAkB,EAAE,QAAQ,CA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BACb,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\";\nimport { TOOL_TIMELINE_LOG_TYPE } from \"../tool-timeline-policy\";\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/callProviderMetadata.cossistant namespace.\n// ============================================================================\n\n// ----------------------------------------------------------------------------\n// Cossistant Provider Metadata (extension point for all parts)\n// ----------------------------------------------------------------------------\nconst cossistantToolTimelineMetadataSchema = z.object({\n\tlogType: z\n\t\t.enum([\n\t\t\tTOOL_TIMELINE_LOG_TYPE.CUSTOMER_FACING,\n\t\t\tTOOL_TIMELINE_LOG_TYPE.LOG,\n\t\t\tTOOL_TIMELINE_LOG_TYPE.DECISION,\n\t\t])\n\t\t.openapi({\n\t\t\tdescription:\n\t\t\t\t\"Tool timeline classification: conversation-visible, log-only, or decision stage\",\n\t\t}),\n\ttriggerMessageId: z.string().openapi({\n\t\tdescription:\n\t\t\t\"Message ID that triggered the tool/decision workflow execution\",\n\t}),\n\tworkflowRunId: z.string().openapi({\n\t\tdescription:\n\t\t\t\"Workflow run identifier used to correlate tool timeline updates\",\n\t}),\n\ttriggerVisibility: z.enum([\"public\", \"private\"]).optional().openapi({\n\t\tdescription:\n\t\t\t\"Visibility of the trigger message at the time the tool was executed\",\n\t}),\n});\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\ttoolTimeline: cossistantToolTimelineMetadataSchema.optional().openapi({\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"Tool timeline metadata used to classify visibility and trigger linkage\",\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\tcallProviderMetadata: cossistantProviderMetadataSchema,\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\tConversationEventType.AI_PAUSED,\n\t\t\tConversationEventType.AI_RESUMED,\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>;\nexport type CossistantToolTimelineMetadata = z.infer<\n\ttypeof cossistantToolTimelineMetadataSchema\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":";;;;;AAkBA,MAAM,uCAAuC,EAAE,OAAO;CACrD,SAAS,EACP,KAAK;EACL,uBAAuB;EACvB,uBAAuB;EACvB,uBAAuB;EACvB,CAAC,CACD,QAAQ,EACR,aACC,mFACD,CAAC;CACH,kBAAkB,EAAE,QAAQ,CAAC,QAAQ,EACpC,aACC,kEACD,CAAC;CACF,eAAe,EAAE,QAAQ,CAAC,QAAQ,EACjC,aACC,mEACD,CAAC;CACF,mBAAmB,EAAE,KAAK,CAAC,UAAU,UAAU,CAAC,CAAC,UAAU,CAAC,QAAQ,EACnE,aACC,uEACD,CAAC;CACF,CAAC;AAEF,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,qCAAqC,UAAU,CAAC,QAAQ,EACrE,aACC,0EACD,CAAC;CACF,CAAC,CACD,UAAU,EACZ,CAAC,CACD,aAAa,CACb,UAAU;AAKZ,MAAM,iBAAiB,EAAE,OAAO;CAC/B,MAAM,EAAE,QAAQ,OAAO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,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/api/user.d.ts CHANGED
@@ -7,7 +7,7 @@ import { z } from "@hono/zod-openapi";
7
7
  */
8
8
  declare const userResponseSchema: z.ZodObject<{
9
9
  id: z.ZodULID;
10
- name: z.ZodOptional<z.ZodString>;
10
+ name: z.ZodNullable<z.ZodString>;
11
11
  email: z.ZodEmail;
12
12
  role: z.ZodNullable<z.ZodString>;
13
13
  image: z.ZodNullable<z.ZodURL>;
package/api/user.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","names":[],"sources":["../../src/api/user.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;cAAa,oBAAkB,CAAA,CAAA;;;;;;;;;;cAsClB,gCAA8B,CAAA,CAAA;;;EAtCZ,KAAA,eAAA,cAAA,YAAA,CAAA,CAAA;CAAA,eAAA,CAAA;AAsClB,KAuBD,YAAA,GAAe,CAAA,CAAE,KAvBhB,CAAA,OAuB6B,kBAFvC,CAAA;KAGS,wBAAA,GAA2B,CAAA,CAAE,aACjC"}
1
+ {"version":3,"file":"user.d.ts","names":[],"sources":["../../src/api/user.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;cAAa,oBAAkB,CAAA,CAAA;;;;;;;;;;cAmClB,gCAA8B,CAAA,CAAA;;;EAnCZ,KAAA,eAAA,cAAA,YAAA,CAAA,CAAA;CAAA,eAAA,CAAA;AAmClB,KAuBD,YAAA,GAAe,CAAA,CAAE,KAvBhB,CAAA,OAuB6B,kBAFvC,CAAA;KAGS,wBAAA,GAA2B,CAAA,CAAE,aACjC"}
package/api/user.js CHANGED
@@ -9,10 +9,10 @@ const userResponseSchema = z.object({
9
9
  description: "The user's unique identifier.",
10
10
  example: "01JG000000000000000000000"
11
11
  }),
12
- name: z.string().openapi({
12
+ name: z.string().nullable().openapi({
13
13
  description: "The user's name.",
14
14
  example: "John Doe"
15
- }).optional(),
15
+ }),
16
16
  email: z.email().openapi({
17
17
  description: "The user's email address.",
18
18
  example: "john.doe@example.com"
package/api/user.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","names":[],"sources":["../../src/api/user.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\n/**\n * Visitor data update request schema\n */\nexport const userResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The user's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z\n\t\t.string()\n\t\t.openapi({\n\t\t\tdescription: \"The user's name.\",\n\t\t\texample: \"John Doe\",\n\t\t})\n\t\t.optional(),\n\temail: z.email().openapi({\n\t\tdescription: \"The user's email address.\",\n\t\texample: \"john.doe@example.com\",\n\t}),\n\trole: z.string().nullable().openapi({\n\t\tdescription: \"The user's role.\",\n\t\texample: \"admin\",\n\t}),\n\timage: z.url().nullable().openapi({\n\t\tdescription: \"The user's image URL.\",\n\t\texample: \"https://example.com/image.png\",\n\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"The user's creation date.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n\tupdatedAt: z.string().openapi({\n\t\tdescription: \"The user's last update date.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n\tlastSeenAt: z.string().nullable().openapi({\n\t\tdescription: \"The user's last seen date.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n});\n\nexport const updateUserProfileRequestSchema = z\n\t.object({\n\t\tuserId: z.ulid({ message: \"Missing user identifier.\" }).openapi({\n\t\t\tdescription: \"The identifier of the user that should be updated.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: z\n\t\t\t.string({ message: \"Enter your name.\" })\n\t\t\t.trim()\n\t\t\t.min(1, { message: \"Enter your name.\" })\n\t\t\t.max(120, {\n\t\t\t\tmessage: \"Name must be 120 characters or fewer.\",\n\t\t\t}),\n\t\timage: z\n\t\t\t.string()\n\t\t\t.url({ message: \"Provide a valid image URL.\" })\n\t\t\t.nullable()\n\t\t\t.optional(),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to update the current user's profile details.\",\n\t});\n\nexport type UserResponse = z.infer<typeof userResponseSchema>;\nexport type UpdateUserProfileRequest = z.infer<\n\ttypeof updateUserProfileRequestSchema\n>;\n"],"mappings":";;;;;;AAKA,MAAa,qBAAqB,EAAE,OAAO;CAC1C,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EACJ,QAAQ,CACR,QAAQ;EACR,aAAa;EACb,SAAS;EACT,CAAC,CACD,UAAU;CACZ,OAAO,EAAE,OAAO,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EACnC,aAAa;EACb,SAAS;EACT,CAAC;CACF,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;EACjC,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,YAAY,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EACzC,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC;AAEF,MAAa,iCAAiC,EAC5C,OAAO;CACP,QAAQ,EAAE,KAAK,EAAE,SAAS,4BAA4B,CAAC,CAAC,QAAQ;EAC/D,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EACJ,OAAO,EAAE,SAAS,oBAAoB,CAAC,CACvC,MAAM,CACN,IAAI,GAAG,EAAE,SAAS,oBAAoB,CAAC,CACvC,IAAI,KAAK,EACT,SAAS,yCACT,CAAC;CACH,OAAO,EACL,QAAQ,CACR,IAAI,EAAE,SAAS,8BAA8B,CAAC,CAC9C,UAAU,CACV,UAAU;CACZ,CAAC,CACD,QAAQ,EACR,aAAa,8DACb,CAAC"}
1
+ {"version":3,"file":"user.js","names":[],"sources":["../../src/api/user.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\n/**\n * Visitor data update request schema\n */\nexport const userResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The user's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().nullable().openapi({\n\t\tdescription: \"The user's name.\",\n\t\texample: \"John Doe\",\n\t}),\n\temail: z.email().openapi({\n\t\tdescription: \"The user's email address.\",\n\t\texample: \"john.doe@example.com\",\n\t}),\n\trole: z.string().nullable().openapi({\n\t\tdescription: \"The user's role.\",\n\t\texample: \"admin\",\n\t}),\n\timage: z.url().nullable().openapi({\n\t\tdescription: \"The user's image URL.\",\n\t\texample: \"https://example.com/image.png\",\n\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"The user's creation date.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n\tupdatedAt: z.string().openapi({\n\t\tdescription: \"The user's last update date.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n\tlastSeenAt: z.string().nullable().openapi({\n\t\tdescription: \"The user's last seen date.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n});\n\nexport const updateUserProfileRequestSchema = z\n\t.object({\n\t\tuserId: z.ulid({ message: \"Missing user identifier.\" }).openapi({\n\t\t\tdescription: \"The identifier of the user that should be updated.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: z\n\t\t\t.string({ message: \"Enter your name.\" })\n\t\t\t.trim()\n\t\t\t.min(1, { message: \"Enter your name.\" })\n\t\t\t.max(120, {\n\t\t\t\tmessage: \"Name must be 120 characters or fewer.\",\n\t\t\t}),\n\t\timage: z\n\t\t\t.string()\n\t\t\t.url({ message: \"Provide a valid image URL.\" })\n\t\t\t.nullable()\n\t\t\t.optional(),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to update the current user's profile details.\",\n\t});\n\nexport type UserResponse = z.infer<typeof userResponseSchema>;\nexport type UpdateUserProfileRequest = z.infer<\n\ttypeof updateUserProfileRequestSchema\n>;\n"],"mappings":";;;;;;AAKA,MAAa,qBAAqB,EAAE,OAAO;CAC1C,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EACnC,aAAa;EACb,SAAS;EACT,CAAC;CACF,OAAO,EAAE,OAAO,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EACnC,aAAa;EACb,SAAS;EACT,CAAC;CACF,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;EACjC,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,YAAY,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EACzC,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC;AAEF,MAAa,iCAAiC,EAC5C,OAAO;CACP,QAAQ,EAAE,KAAK,EAAE,SAAS,4BAA4B,CAAC,CAAC,QAAQ;EAC/D,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EACJ,OAAO,EAAE,SAAS,oBAAoB,CAAC,CACvC,MAAM,CACN,IAAI,GAAG,EAAE,SAAS,oBAAoB,CAAC,CACvC,IAAI,KAAK,EACT,SAAS,yCACT,CAAC;CACH,OAAO,EACL,QAAQ,CACR,IAAI,EAAE,SAAS,8BAA8B,CAAC,CAC9C,UAAU,CACV,UAAU;CACZ,CAAC,CACD,QAAQ,EACR,aAAa,8DACb,CAAC"}
package/api/visitor.d.ts CHANGED
@@ -19,6 +19,134 @@ declare const publicContactResponseSchema: z.ZodObject<{
19
19
  }, z.core.$strip>;
20
20
  type PublicContact = z.infer<typeof publicContactResponseSchema>;
21
21
  type VisitorMetadata = z.infer<typeof visitorMetadataSchema>;
22
+ declare const attributionChannelSchema: z.ZodEnum<{
23
+ email: "email";
24
+ direct: "direct";
25
+ paid: "paid";
26
+ organic_search: "organic_search";
27
+ social: "social";
28
+ referral: "referral";
29
+ }>;
30
+ declare const visitorAttributionReferrerSchema: z.ZodObject<{
31
+ url: z.ZodNullable<z.ZodString>;
32
+ domain: z.ZodNullable<z.ZodString>;
33
+ }, z.core.$strip>;
34
+ declare const visitorAttributionLandingSchema: z.ZodObject<{
35
+ url: z.ZodNullable<z.ZodString>;
36
+ path: z.ZodNullable<z.ZodString>;
37
+ title: z.ZodNullable<z.ZodString>;
38
+ }, z.core.$strip>;
39
+ declare const visitorAttributionUtmSchema: z.ZodObject<{
40
+ source: z.ZodNullable<z.ZodString>;
41
+ medium: z.ZodNullable<z.ZodString>;
42
+ campaign: z.ZodNullable<z.ZodString>;
43
+ content: z.ZodNullable<z.ZodString>;
44
+ term: z.ZodNullable<z.ZodString>;
45
+ }, z.core.$strip>;
46
+ declare const visitorAttributionClickIdsSchema: z.ZodObject<{
47
+ gclid: z.ZodNullable<z.ZodString>;
48
+ gbraid: z.ZodNullable<z.ZodString>;
49
+ wbraid: z.ZodNullable<z.ZodString>;
50
+ fbclid: z.ZodNullable<z.ZodString>;
51
+ msclkid: z.ZodNullable<z.ZodString>;
52
+ ttclid: z.ZodNullable<z.ZodString>;
53
+ li_fat_id: z.ZodNullable<z.ZodString>;
54
+ twclid: z.ZodNullable<z.ZodString>;
55
+ }, z.core.$strip>;
56
+ declare const visitorAttributionFirstTouchSchema: z.ZodObject<{
57
+ channel: z.ZodEnum<{
58
+ email: "email";
59
+ direct: "direct";
60
+ paid: "paid";
61
+ organic_search: "organic_search";
62
+ social: "social";
63
+ referral: "referral";
64
+ }>;
65
+ isDirect: z.ZodBoolean;
66
+ referrer: z.ZodObject<{
67
+ url: z.ZodNullable<z.ZodString>;
68
+ domain: z.ZodNullable<z.ZodString>;
69
+ }, z.core.$strip>;
70
+ landing: z.ZodObject<{
71
+ url: z.ZodNullable<z.ZodString>;
72
+ path: z.ZodNullable<z.ZodString>;
73
+ title: z.ZodNullable<z.ZodString>;
74
+ }, z.core.$strip>;
75
+ utm: z.ZodObject<{
76
+ source: z.ZodNullable<z.ZodString>;
77
+ medium: z.ZodNullable<z.ZodString>;
78
+ campaign: z.ZodNullable<z.ZodString>;
79
+ content: z.ZodNullable<z.ZodString>;
80
+ term: z.ZodNullable<z.ZodString>;
81
+ }, z.core.$strip>;
82
+ clickIds: z.ZodObject<{
83
+ gclid: z.ZodNullable<z.ZodString>;
84
+ gbraid: z.ZodNullable<z.ZodString>;
85
+ wbraid: z.ZodNullable<z.ZodString>;
86
+ fbclid: z.ZodNullable<z.ZodString>;
87
+ msclkid: z.ZodNullable<z.ZodString>;
88
+ ttclid: z.ZodNullable<z.ZodString>;
89
+ li_fat_id: z.ZodNullable<z.ZodString>;
90
+ twclid: z.ZodNullable<z.ZodString>;
91
+ }, z.core.$strip>;
92
+ capturedAt: z.ZodString;
93
+ }, z.core.$strip>;
94
+ declare const visitorAttributionSchema: z.ZodObject<{
95
+ version: z.ZodLiteral<1>;
96
+ firstTouch: z.ZodObject<{
97
+ channel: z.ZodEnum<{
98
+ email: "email";
99
+ direct: "direct";
100
+ paid: "paid";
101
+ organic_search: "organic_search";
102
+ social: "social";
103
+ referral: "referral";
104
+ }>;
105
+ isDirect: z.ZodBoolean;
106
+ referrer: z.ZodObject<{
107
+ url: z.ZodNullable<z.ZodString>;
108
+ domain: z.ZodNullable<z.ZodString>;
109
+ }, z.core.$strip>;
110
+ landing: z.ZodObject<{
111
+ url: z.ZodNullable<z.ZodString>;
112
+ path: z.ZodNullable<z.ZodString>;
113
+ title: z.ZodNullable<z.ZodString>;
114
+ }, z.core.$strip>;
115
+ utm: z.ZodObject<{
116
+ source: z.ZodNullable<z.ZodString>;
117
+ medium: z.ZodNullable<z.ZodString>;
118
+ campaign: z.ZodNullable<z.ZodString>;
119
+ content: z.ZodNullable<z.ZodString>;
120
+ term: z.ZodNullable<z.ZodString>;
121
+ }, z.core.$strip>;
122
+ clickIds: z.ZodObject<{
123
+ gclid: z.ZodNullable<z.ZodString>;
124
+ gbraid: z.ZodNullable<z.ZodString>;
125
+ wbraid: z.ZodNullable<z.ZodString>;
126
+ fbclid: z.ZodNullable<z.ZodString>;
127
+ msclkid: z.ZodNullable<z.ZodString>;
128
+ ttclid: z.ZodNullable<z.ZodString>;
129
+ li_fat_id: z.ZodNullable<z.ZodString>;
130
+ twclid: z.ZodNullable<z.ZodString>;
131
+ }, z.core.$strip>;
132
+ capturedAt: z.ZodString;
133
+ }, z.core.$strip>;
134
+ }, z.core.$strip>;
135
+ declare const visitorCurrentPageSchema: z.ZodObject<{
136
+ url: z.ZodNullable<z.ZodString>;
137
+ path: z.ZodNullable<z.ZodString>;
138
+ title: z.ZodNullable<z.ZodString>;
139
+ referrerUrl: z.ZodNullable<z.ZodString>;
140
+ updatedAt: z.ZodString;
141
+ }, z.core.$strip>;
142
+ type AttributionChannel = z.infer<typeof attributionChannelSchema>;
143
+ type VisitorAttributionReferrer = z.infer<typeof visitorAttributionReferrerSchema>;
144
+ type VisitorAttributionLanding = z.infer<typeof visitorAttributionLandingSchema>;
145
+ type VisitorAttributionUtm = z.infer<typeof visitorAttributionUtmSchema>;
146
+ type VisitorAttributionClickIds = z.infer<typeof visitorAttributionClickIdsSchema>;
147
+ type VisitorAttributionFirstTouch = z.infer<typeof visitorAttributionFirstTouchSchema>;
148
+ type VisitorAttribution = z.infer<typeof visitorAttributionSchema>;
149
+ type VisitorCurrentPage = z.infer<typeof visitorCurrentPageSchema>;
22
150
  /**
23
151
  * Visitor data update request schema
24
152
  */
@@ -48,6 +176,54 @@ declare const updateVisitorRequestSchema: z.ZodObject<{
48
176
  timezone: z.ZodOptional<z.ZodString>;
49
177
  screenResolution: z.ZodOptional<z.ZodString>;
50
178
  viewport: z.ZodOptional<z.ZodString>;
179
+ attribution: z.ZodOptional<z.ZodObject<{
180
+ version: z.ZodLiteral<1>;
181
+ firstTouch: z.ZodObject<{
182
+ channel: z.ZodEnum<{
183
+ email: "email";
184
+ direct: "direct";
185
+ paid: "paid";
186
+ organic_search: "organic_search";
187
+ social: "social";
188
+ referral: "referral";
189
+ }>;
190
+ isDirect: z.ZodBoolean;
191
+ referrer: z.ZodObject<{
192
+ url: z.ZodNullable<z.ZodString>;
193
+ domain: z.ZodNullable<z.ZodString>;
194
+ }, z.core.$strip>;
195
+ landing: z.ZodObject<{
196
+ url: z.ZodNullable<z.ZodString>;
197
+ path: z.ZodNullable<z.ZodString>;
198
+ title: z.ZodNullable<z.ZodString>;
199
+ }, z.core.$strip>;
200
+ utm: z.ZodObject<{
201
+ source: z.ZodNullable<z.ZodString>;
202
+ medium: z.ZodNullable<z.ZodString>;
203
+ campaign: z.ZodNullable<z.ZodString>;
204
+ content: z.ZodNullable<z.ZodString>;
205
+ term: z.ZodNullable<z.ZodString>;
206
+ }, z.core.$strip>;
207
+ clickIds: z.ZodObject<{
208
+ gclid: z.ZodNullable<z.ZodString>;
209
+ gbraid: z.ZodNullable<z.ZodString>;
210
+ wbraid: z.ZodNullable<z.ZodString>;
211
+ fbclid: z.ZodNullable<z.ZodString>;
212
+ msclkid: z.ZodNullable<z.ZodString>;
213
+ ttclid: z.ZodNullable<z.ZodString>;
214
+ li_fat_id: z.ZodNullable<z.ZodString>;
215
+ twclid: z.ZodNullable<z.ZodString>;
216
+ }, z.core.$strip>;
217
+ capturedAt: z.ZodString;
218
+ }, z.core.$strip>;
219
+ }, z.core.$strip>>;
220
+ currentPage: z.ZodOptional<z.ZodObject<{
221
+ url: z.ZodNullable<z.ZodString>;
222
+ path: z.ZodNullable<z.ZodString>;
223
+ title: z.ZodNullable<z.ZodString>;
224
+ referrerUrl: z.ZodNullable<z.ZodString>;
225
+ updatedAt: z.ZodString;
226
+ }, z.core.$strip>>;
51
227
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodBoolean]>, z.ZodNull]>>>;
52
228
  }, z.core.$strip>;
53
229
  type UpdateVisitorRequest = z.infer<typeof updateVisitorRequestSchema>;
@@ -99,6 +275,54 @@ declare const visitorResponseSchema: z.ZodObject<{
99
275
  blockedAt: z.ZodNullable<z.ZodString>;
100
276
  blockedByUserId: z.ZodNullable<z.ZodString>;
101
277
  isBlocked: z.ZodBoolean;
278
+ attribution: z.ZodNullable<z.ZodObject<{
279
+ version: z.ZodLiteral<1>;
280
+ firstTouch: z.ZodObject<{
281
+ channel: z.ZodEnum<{
282
+ email: "email";
283
+ direct: "direct";
284
+ paid: "paid";
285
+ organic_search: "organic_search";
286
+ social: "social";
287
+ referral: "referral";
288
+ }>;
289
+ isDirect: z.ZodBoolean;
290
+ referrer: z.ZodObject<{
291
+ url: z.ZodNullable<z.ZodString>;
292
+ domain: z.ZodNullable<z.ZodString>;
293
+ }, z.core.$strip>;
294
+ landing: z.ZodObject<{
295
+ url: z.ZodNullable<z.ZodString>;
296
+ path: z.ZodNullable<z.ZodString>;
297
+ title: z.ZodNullable<z.ZodString>;
298
+ }, z.core.$strip>;
299
+ utm: z.ZodObject<{
300
+ source: z.ZodNullable<z.ZodString>;
301
+ medium: z.ZodNullable<z.ZodString>;
302
+ campaign: z.ZodNullable<z.ZodString>;
303
+ content: z.ZodNullable<z.ZodString>;
304
+ term: z.ZodNullable<z.ZodString>;
305
+ }, z.core.$strip>;
306
+ clickIds: z.ZodObject<{
307
+ gclid: z.ZodNullable<z.ZodString>;
308
+ gbraid: z.ZodNullable<z.ZodString>;
309
+ wbraid: z.ZodNullable<z.ZodString>;
310
+ fbclid: z.ZodNullable<z.ZodString>;
311
+ msclkid: z.ZodNullable<z.ZodString>;
312
+ ttclid: z.ZodNullable<z.ZodString>;
313
+ li_fat_id: z.ZodNullable<z.ZodString>;
314
+ twclid: z.ZodNullable<z.ZodString>;
315
+ }, z.core.$strip>;
316
+ capturedAt: z.ZodString;
317
+ }, z.core.$strip>;
318
+ }, z.core.$strip>>;
319
+ currentPage: z.ZodNullable<z.ZodObject<{
320
+ url: z.ZodNullable<z.ZodString>;
321
+ path: z.ZodNullable<z.ZodString>;
322
+ title: z.ZodNullable<z.ZodString>;
323
+ referrerUrl: z.ZodNullable<z.ZodString>;
324
+ updatedAt: z.ZodString;
325
+ }, z.core.$strip>>;
102
326
  contact: z.ZodNullable<z.ZodObject<{
103
327
  id: z.ZodULID;
104
328
  externalId: z.ZodNullable<z.ZodString>;
@@ -134,5 +358,5 @@ declare const publicVisitorResponseSchema: z.ZodObject<{
134
358
  type PublicVisitor = z.infer<typeof publicVisitorResponseSchema>;
135
359
  type PublicVisitorResponse = PublicVisitor;
136
360
  //#endregion
137
- export { PublicContact, PublicVisitor, PublicVisitorResponse, UpdateVisitorMetadataRequest, UpdateVisitorRequest, Visitor, VisitorMetadata, VisitorResponse, publicContactResponseSchema, publicVisitorResponseSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema };
361
+ export { AttributionChannel, PublicContact, PublicVisitor, PublicVisitorResponse, UpdateVisitorMetadataRequest, UpdateVisitorRequest, Visitor, VisitorAttribution, VisitorAttributionClickIds, VisitorAttributionFirstTouch, VisitorAttributionLanding, VisitorAttributionReferrer, VisitorAttributionUtm, VisitorCurrentPage, VisitorMetadata, VisitorResponse, attributionChannelSchema, publicContactResponseSchema, publicVisitorResponseSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, visitorAttributionClickIdsSchema, visitorAttributionFirstTouchSchema, visitorAttributionLandingSchema, visitorAttributionReferrerSchema, visitorAttributionSchema, visitorAttributionUtmSchema, visitorCurrentPageSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema };
138
362
  //# sourceMappingURL=visitor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visitor.d.ts","names":[],"sources":["../../src/api/visitor.ts"],"sourcesContent":[],"mappings":";;;;;;AAOA;;AAAkC,cAArB,qBAAqB,EAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,SAAA,CAAA,CAAA,EAAA,CAAA,CAAA,UAAA,CAAA,CAAA,EAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA;;;;AAAA,cAQrB,2BARqB,EAQM,CAAA,CAAA,SARN,CAAA;EAAA,EAAA,WAAA;EAAA,IAAA,eAAA,YAAA,CAAA;EAAA,KAAA,eAAA,YAAA,CAAA;EAAA,KAAA,eAAA,YAAA,CAAA;EAQrB,YAAA,eAAA,YAsBX,CAAA;;KAEU,aAAA,GAA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AAA,eAAA,WAAA,CAAA;IAkK3B,KAAA,eAAoB,SAAA,CAAA;IAEnB,QAAA,eAAA,YAKX,YAAA,YAAA,CAAA,WAAA,CAAA,WAAA,CAAA,YAAA,aAAA,CAAA,CAAA,cAAA,CAAA,CAAA,WAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;KAoJU,OAAA,GAAU,CAAA,CAAE,aAAa;KACzB,eAAA,GAAkB;;;AAnJ9B;AAIa,cAoJA,2BA9HX,EA8HsC,CAAA,CAAA,SA9HtC,CAAA;;;;;;;;;;;;KAuJU,aAAA,GAAgB,CAAA,CAAE,aAAa;KAC/B,qBAAA,GAAwB"}
package/api/visitor.js CHANGED
@@ -32,6 +32,143 @@ const publicContactResponseSchema = z.object({
32
32
  example: "a1b2c3d4"
33
33
  })
34
34
  });
35
+ const attributionChannelSchema = z.enum([
36
+ "direct",
37
+ "email",
38
+ "paid",
39
+ "organic_search",
40
+ "social",
41
+ "referral"
42
+ ]);
43
+ const nullableStringSchema = z.string().nullable();
44
+ const nullableUrlSchema = z.string().url().nullable();
45
+ const visitorAttributionReferrerSchema = z.object({
46
+ url: nullableUrlSchema.openapi({
47
+ description: "Sanitized external referrer URL without arbitrary query data.",
48
+ example: "https://news.ycombinator.com/item?id=123"
49
+ }),
50
+ domain: nullableStringSchema.openapi({
51
+ description: "Normalized referrer hostname.",
52
+ example: "news.ycombinator.com"
53
+ })
54
+ });
55
+ const visitorAttributionLandingSchema = z.object({
56
+ url: nullableUrlSchema.openapi({
57
+ description: "Sanitized landing page URL including only supported attribution params.",
58
+ example: "https://app.example.com/pricing?utm_source=hn&utm_medium=community"
59
+ }),
60
+ path: nullableStringSchema.openapi({
61
+ description: "Landing page path.",
62
+ example: "/pricing"
63
+ }),
64
+ title: nullableStringSchema.openapi({
65
+ description: "Document title captured on the landing page.",
66
+ example: "Pricing | Example"
67
+ })
68
+ });
69
+ const visitorAttributionUtmSchema = z.object({
70
+ source: nullableStringSchema.openapi({
71
+ description: "UTM source value.",
72
+ example: "hn"
73
+ }),
74
+ medium: nullableStringSchema.openapi({
75
+ description: "UTM medium value.",
76
+ example: "community"
77
+ }),
78
+ campaign: nullableStringSchema.openapi({
79
+ description: "UTM campaign value.",
80
+ example: "launch_week"
81
+ }),
82
+ content: nullableStringSchema.openapi({
83
+ description: "UTM content value.",
84
+ example: "hero_cta"
85
+ }),
86
+ term: nullableStringSchema.openapi({
87
+ description: "UTM term value.",
88
+ example: "ai support"
89
+ })
90
+ });
91
+ const visitorAttributionClickIdsSchema = z.object({
92
+ gclid: nullableStringSchema.openapi({
93
+ description: "Google Ads click identifier.",
94
+ example: "gclid_123"
95
+ }),
96
+ gbraid: nullableStringSchema.openapi({
97
+ description: "Google iOS app click identifier.",
98
+ example: "gbraid_123"
99
+ }),
100
+ wbraid: nullableStringSchema.openapi({
101
+ description: "Google web-to-app click identifier.",
102
+ example: "wbraid_123"
103
+ }),
104
+ fbclid: nullableStringSchema.openapi({
105
+ description: "Meta click identifier.",
106
+ example: "fbclid_123"
107
+ }),
108
+ msclkid: nullableStringSchema.openapi({
109
+ description: "Microsoft Ads click identifier.",
110
+ example: "msclkid_123"
111
+ }),
112
+ ttclid: nullableStringSchema.openapi({
113
+ description: "TikTok click identifier.",
114
+ example: "ttclid_123"
115
+ }),
116
+ li_fat_id: nullableStringSchema.openapi({
117
+ description: "LinkedIn click identifier.",
118
+ example: "li_fat_id_123"
119
+ }),
120
+ twclid: nullableStringSchema.openapi({
121
+ description: "X/Twitter click identifier.",
122
+ example: "twclid_123"
123
+ })
124
+ });
125
+ const visitorAttributionFirstTouchSchema = z.object({
126
+ channel: attributionChannelSchema.openapi({
127
+ description: "Derived acquisition channel.",
128
+ example: "referral"
129
+ }),
130
+ isDirect: z.boolean().openapi({
131
+ description: "Whether the visit should be treated as direct traffic.",
132
+ example: false
133
+ }),
134
+ referrer: visitorAttributionReferrerSchema,
135
+ landing: visitorAttributionLandingSchema,
136
+ utm: visitorAttributionUtmSchema,
137
+ clickIds: visitorAttributionClickIdsSchema,
138
+ capturedAt: z.string().openapi({
139
+ description: "When the first-touch attribution snapshot was captured.",
140
+ example: "2026-03-12T10:00:00.000Z"
141
+ })
142
+ });
143
+ const visitorAttributionSchema = z.object({
144
+ version: z.literal(1).openapi({
145
+ description: "Schema version for the attribution payload.",
146
+ example: 1
147
+ }),
148
+ firstTouch: visitorAttributionFirstTouchSchema
149
+ });
150
+ const visitorCurrentPageSchema = z.object({
151
+ url: nullableUrlSchema.openapi({
152
+ description: "Sanitized current page URL including only supported attribution params.",
153
+ example: "https://app.example.com/pricing"
154
+ }),
155
+ path: nullableStringSchema.openapi({
156
+ description: "Current page path.",
157
+ example: "/pricing"
158
+ }),
159
+ title: nullableStringSchema.openapi({
160
+ description: "Current document title.",
161
+ example: "Pricing | Example"
162
+ }),
163
+ referrerUrl: nullableUrlSchema.openapi({
164
+ description: "Sanitized document referrer URL for the current page context.",
165
+ example: "https://news.ycombinator.com/item?id=123"
166
+ }),
167
+ updatedAt: z.string().openapi({
168
+ description: "When the current page context was last updated.",
169
+ example: "2026-03-12T10:00:05.000Z"
170
+ })
171
+ });
35
172
  /**
36
173
  * Visitor data update request schema
37
174
  */
@@ -121,6 +258,8 @@ const updateVisitorRequestSchema = z.object({
121
258
  description: "The visitor's viewport size.",
122
259
  example: "1920x900"
123
260
  }).optional(),
261
+ attribution: visitorAttributionSchema.openapi({ description: "Normalized acquisition data captured for this visitor." }).optional(),
262
+ currentPage: visitorCurrentPageSchema.openapi({ description: "Latest page context captured for this visitor." }).optional(),
124
263
  metadata: visitorMetadataSchema.openapi({
125
264
  description: "Additional custom metadata for the visitor.",
126
265
  example: {
@@ -267,6 +406,8 @@ const visitorResponseSchema = z.object({
267
406
  description: "Whether the visitor is currently blocked.",
268
407
  example: true
269
408
  }),
409
+ attribution: visitorAttributionSchema.nullable().openapi({ description: "Normalized acquisition data captured for this visitor." }),
410
+ currentPage: visitorCurrentPageSchema.nullable().openapi({ description: "Latest page context captured for this visitor." }),
270
411
  contact: contactResponseSchema.nullable()
271
412
  });
272
413
  /**
@@ -297,5 +438,5 @@ const publicVisitorResponseSchema = z.object({
297
438
  });
298
439
 
299
440
  //#endregion
300
- export { publicContactResponseSchema, publicVisitorResponseSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema };
441
+ export { attributionChannelSchema, publicContactResponseSchema, publicVisitorResponseSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, visitorAttributionClickIdsSchema, visitorAttributionFirstTouchSchema, visitorAttributionLandingSchema, visitorAttributionReferrerSchema, visitorAttributionSchema, visitorAttributionUtmSchema, visitorCurrentPageSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema };
301
442
  //# sourceMappingURL=visitor.js.map