@cossistant/types 0.0.7

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 (70) hide show
  1. package/dist/api/common.d.ts +44 -0
  2. package/dist/api/common.d.ts.map +1 -0
  3. package/dist/api/common.js +72 -0
  4. package/dist/api/common.js.map +1 -0
  5. package/dist/api/contact.d.ts +138 -0
  6. package/dist/api/contact.d.ts.map +1 -0
  7. package/dist/api/contact.js +297 -0
  8. package/dist/api/contact.js.map +1 -0
  9. package/dist/api/conversation.d.ts +91 -0
  10. package/dist/api/conversation.d.ts.map +1 -0
  11. package/dist/api/conversation.js +81 -0
  12. package/dist/api/conversation.js.map +1 -0
  13. package/dist/api/index.d.ts +10 -0
  14. package/dist/api/index.js +11 -0
  15. package/dist/api/organization.d.ts +15 -0
  16. package/dist/api/organization.d.ts.map +1 -0
  17. package/dist/api/organization.js +20 -0
  18. package/dist/api/organization.js.map +1 -0
  19. package/dist/api/timeline-item.d.ts +270 -0
  20. package/dist/api/timeline-item.d.ts.map +1 -0
  21. package/dist/api/timeline-item.js +111 -0
  22. package/dist/api/timeline-item.js.map +1 -0
  23. package/dist/api/upload.d.ts +100 -0
  24. package/dist/api/upload.d.ts.map +1 -0
  25. package/dist/api/upload.js +119 -0
  26. package/dist/api/upload.js.map +1 -0
  27. package/dist/api/user.d.ts +27 -0
  28. package/dist/api/user.d.ts.map +1 -0
  29. package/dist/api/user.js +52 -0
  30. package/dist/api/user.js.map +1 -0
  31. package/dist/api/visitor.d.ts +125 -0
  32. package/dist/api/visitor.d.ts.map +1 -0
  33. package/dist/api/visitor.js +301 -0
  34. package/dist/api/visitor.js.map +1 -0
  35. package/dist/api/website.d.ts +192 -0
  36. package/dist/api/website.d.ts.map +1 -0
  37. package/dist/api/website.js +320 -0
  38. package/dist/api/website.js.map +1 -0
  39. package/dist/enums.d.ts +79 -0
  40. package/dist/enums.d.ts.map +1 -0
  41. package/dist/enums.js +69 -0
  42. package/dist/enums.js.map +1 -0
  43. package/dist/index.d.ts +40 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +18 -0
  46. package/dist/presence.d.ts +7 -0
  47. package/dist/presence.d.ts.map +1 -0
  48. package/dist/presence.js +8 -0
  49. package/dist/presence.js.map +1 -0
  50. package/dist/realtime-events.d.ts +136 -0
  51. package/dist/realtime-events.d.ts.map +1 -0
  52. package/dist/realtime-events.js +99 -0
  53. package/dist/realtime-events.js.map +1 -0
  54. package/dist/schemas.d.ts +44 -0
  55. package/dist/schemas.d.ts.map +1 -0
  56. package/dist/schemas.js +46 -0
  57. package/dist/schemas.js.map +1 -0
  58. package/dist/trpc/contact.d.ts +68 -0
  59. package/dist/trpc/contact.d.ts.map +1 -0
  60. package/dist/trpc/contact.js +45 -0
  61. package/dist/trpc/contact.js.map +1 -0
  62. package/dist/trpc/conversation.d.ts +139 -0
  63. package/dist/trpc/conversation.d.ts.map +1 -0
  64. package/dist/trpc/conversation.js +80 -0
  65. package/dist/trpc/conversation.js.map +1 -0
  66. package/dist/trpc/visitor.d.ts +53 -0
  67. package/dist/trpc/visitor.d.ts.map +1 -0
  68. package/dist/trpc/visitor.js +34 -0
  69. package/dist/trpc/visitor.js.map +1 -0
  70. package/package.json +40 -0
@@ -0,0 +1,91 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ //#region src/api/conversation.d.ts
4
+ declare const createConversationRequestSchema: z.ZodObject<{
5
+ visitorId: z.ZodOptional<z.ZodString>;
6
+ conversationId: z.ZodOptional<z.ZodString>;
7
+ defaultTimelineItems: z.ZodArray<any>;
8
+ channel: z.ZodDefault<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ type CreateConversationRequestBody = z.infer<typeof createConversationRequestSchema>;
11
+ declare const createConversationResponseSchema: z.ZodObject<{
12
+ initialTimelineItems: z.ZodArray<any>;
13
+ conversation: any;
14
+ }, z.core.$strip>;
15
+ type CreateConversationResponseBody = z.infer<typeof createConversationResponseSchema>;
16
+ declare const listConversationsRequestSchema: z.ZodObject<{
17
+ visitorId: z.ZodOptional<z.ZodString>;
18
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
19
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
20
+ status: z.ZodOptional<z.ZodEnum<{
21
+ open: "open";
22
+ closed: "closed";
23
+ }>>;
24
+ orderBy: z.ZodDefault<z.ZodEnum<{
25
+ createdAt: "createdAt";
26
+ updatedAt: "updatedAt";
27
+ }>>;
28
+ order: z.ZodDefault<z.ZodEnum<{
29
+ asc: "asc";
30
+ desc: "desc";
31
+ }>>;
32
+ }, z.core.$strip>;
33
+ type ListConversationsRequest = z.infer<typeof listConversationsRequestSchema>;
34
+ declare const listConversationsResponseSchema: z.ZodObject<{
35
+ conversations: z.ZodArray<any>;
36
+ pagination: z.ZodObject<{
37
+ page: z.ZodNumber;
38
+ limit: z.ZodNumber;
39
+ total: z.ZodNumber;
40
+ totalPages: z.ZodNumber;
41
+ hasMore: z.ZodBoolean;
42
+ }, z.core.$strip>;
43
+ }, z.core.$strip>;
44
+ type ListConversationsResponse = z.infer<typeof listConversationsResponseSchema>;
45
+ declare const getConversationRequestSchema: z.ZodObject<{
46
+ conversationId: z.ZodString;
47
+ }, z.core.$strip>;
48
+ type GetConversationRequest = z.infer<typeof getConversationRequestSchema>;
49
+ declare const getConversationResponseSchema: z.ZodObject<{
50
+ conversation: any;
51
+ }, z.core.$strip>;
52
+ type GetConversationResponse = z.infer<typeof getConversationResponseSchema>;
53
+ declare const markConversationSeenRequestSchema: z.ZodObject<{
54
+ visitorId: z.ZodOptional<z.ZodString>;
55
+ }, z.core.$strip>;
56
+ type MarkConversationSeenRequestBody = z.infer<typeof markConversationSeenRequestSchema>;
57
+ declare const markConversationSeenResponseSchema: z.ZodObject<{
58
+ conversationId: z.ZodString;
59
+ lastSeenAt: z.ZodString;
60
+ }, z.core.$strip>;
61
+ type MarkConversationSeenResponseBody = z.infer<typeof markConversationSeenResponseSchema>;
62
+ declare const setConversationTypingRequestSchema: z.ZodObject<{
63
+ isTyping: z.ZodBoolean;
64
+ visitorPreview: z.ZodOptional<z.ZodString>;
65
+ visitorId: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$strip>;
67
+ type SetConversationTypingRequestBody = z.infer<typeof setConversationTypingRequestSchema>;
68
+ declare const setConversationTypingResponseSchema: z.ZodObject<{
69
+ conversationId: z.ZodString;
70
+ isTyping: z.ZodBoolean;
71
+ visitorPreview: z.ZodNullable<z.ZodString>;
72
+ sentAt: z.ZodString;
73
+ }, z.core.$strip>;
74
+ type SetConversationTypingResponseBody = z.infer<typeof setConversationTypingResponseSchema>;
75
+ declare const getConversationSeenDataResponseSchema: z.ZodObject<{
76
+ seenData: z.ZodArray<z.ZodObject<{
77
+ id: z.ZodString;
78
+ conversationId: z.ZodString;
79
+ userId: z.ZodNullable<z.ZodString>;
80
+ visitorId: z.ZodNullable<z.ZodString>;
81
+ aiAgentId: z.ZodNullable<z.ZodString>;
82
+ lastSeenAt: z.ZodString;
83
+ createdAt: z.ZodString;
84
+ updatedAt: z.ZodString;
85
+ deletedAt: z.ZodNullable<z.ZodString>;
86
+ }, z.core.$strip>>;
87
+ }, z.core.$strip>;
88
+ type GetConversationSeenDataResponse = z.infer<typeof getConversationSeenDataResponseSchema>;
89
+ //#endregion
90
+ export { CreateConversationRequestBody, CreateConversationResponseBody, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, ListConversationsRequest, ListConversationsResponse, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, SetConversationTypingRequestBody, SetConversationTypingResponseBody, createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema };
91
+ //# sourceMappingURL=conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.d.ts","names":[],"sources":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kCAnCqC,CAAA;AAIhC,cAkCA,kCAxBV,EAwB4C,CAAA,CAAA,SAxB5C,CAAA;;;;CAV2C,eAAA,CAAA;AAAA,KAqDlC,gCAAA,GAAmC,CAAA,CAAE,KArDH,CAAA,OAsDtC,kCAtDsC,CAAA;AAYlC,cA6CC,mCA5CL,EA4CwC,CAAA,CAAA,SA5CxC,CAAA;EAGK,cAAA,aAAA;;;;CAAkC,eAAA,CAAA;AAAA,KA6DnC,iCAAA,GAAoC,CAAA,CAAE,KA7DH,CAAA,OA8DvC,mCA9DuC,CAAA;AAcnC,cAmDC,qCAlDL,EAkD0C,CAAA,CAAA,SAlD1C,CAAA;EAGK,QAAA,YAAA,YAAA,CAAA;;;;;;;IAAkC,SAAA,aAAA;IAAA,SAAA,aAAA;IAmBnC,SAAA,eAAA,YAAgC,CAAA;EAI/B,CAAA,eAAA,CAAA,CAAA;;KA+DD,+BAAA,GAAkC,CAAA,CAAE,aACxC"}
@@ -0,0 +1,81 @@
1
+ import { timelineItemSchema } from "./timeline-item.js";
2
+ import { conversationSchema } from "../schemas.js";
3
+ import { z } from "@hono/zod-openapi";
4
+
5
+ //#region src/api/conversation.ts
6
+ const createConversationRequestSchema = z.object({
7
+ visitorId: z.string().optional().openapi({ description: "Visitor ID, if not provided you must provide a visitorId in the headers." }),
8
+ conversationId: z.string().optional().openapi({ description: "Default conversation ID, if not provided the ID will be automatically generated." }),
9
+ defaultTimelineItems: z.array(timelineItemSchema).openapi({ description: "Default timeline items to initiate the conversation with" }),
10
+ channel: z.string().default("widget").openapi({
11
+ description: "Which channel the conversation is from",
12
+ default: "widget"
13
+ })
14
+ }).openapi({ description: "Body for creating a conversation." });
15
+ const createConversationResponseSchema = z.object({
16
+ initialTimelineItems: z.array(timelineItemSchema),
17
+ conversation: conversationSchema
18
+ }).openapi({ description: "Body including created conversation and default messages" });
19
+ const listConversationsRequestSchema = z.object({
20
+ visitorId: z.string().optional().openapi({ description: "Visitor ID to fetch conversations for." }),
21
+ page: z.coerce.number().min(1).default(1).openapi({
22
+ description: "Page number for pagination",
23
+ default: 1
24
+ }),
25
+ limit: z.coerce.number().min(1).max(100).default(6).openapi({
26
+ description: "Number of conversations per page",
27
+ default: 6
28
+ }),
29
+ status: z.enum(["open", "closed"]).optional().openapi({ description: "Filter by conversation status" }),
30
+ orderBy: z.enum(["createdAt", "updatedAt"]).default("updatedAt").openapi({
31
+ description: "Field to order conversations by",
32
+ default: "updatedAt"
33
+ }),
34
+ order: z.enum(["asc", "desc"]).default("desc").openapi({
35
+ description: "Order direction",
36
+ default: "desc"
37
+ })
38
+ }).openapi({ description: "Query parameters for listing conversations" });
39
+ const listConversationsResponseSchema = z.object({
40
+ conversations: z.array(conversationSchema),
41
+ pagination: z.object({
42
+ page: z.number(),
43
+ limit: z.number(),
44
+ total: z.number(),
45
+ totalPages: z.number(),
46
+ hasMore: z.boolean()
47
+ })
48
+ }).openapi({ description: "Paginated list of conversations" });
49
+ const getConversationRequestSchema = z.object({ conversationId: z.string().openapi({ description: "The ID of the conversation to retrieve" }) }).openapi({ description: "Parameters for retrieving a single conversation" });
50
+ const getConversationResponseSchema = z.object({ conversation: conversationSchema }).openapi({ description: "Response containing a single conversation" });
51
+ const markConversationSeenRequestSchema = z.object({ visitorId: z.string().optional().openapi({ description: "Visitor ID associated with the conversation. Optional if provided via the X-Visitor-Id header." }) }).openapi({ description: "Body for marking a conversation as seen. Either visitorId must be provided via body or headers." });
52
+ const markConversationSeenResponseSchema = z.object({
53
+ conversationId: z.string().openapi({ description: "The ID of the conversation that was marked as seen" }),
54
+ lastSeenAt: z.string().openapi({ description: "Timestamp indicating when the visitor last saw the conversation" })
55
+ }).openapi({ description: "Response confirming the conversation has been marked as seen" });
56
+ const setConversationTypingRequestSchema = z.object({
57
+ isTyping: z.boolean().openapi({ description: "Whether the visitor is currently typing" }),
58
+ visitorPreview: z.string().max(2e3).optional().openapi({ description: "Optional preview of the visitor's message while typing. Only processed when the visitor is typing." }),
59
+ visitorId: z.string().optional().openapi({ description: "Visitor ID associated with the conversation. Optional if provided via the X-Visitor-Id header." })
60
+ }).openapi({ description: "Body for reporting a visitor typing state. Either visitorId must be provided via body or headers." });
61
+ const setConversationTypingResponseSchema = z.object({
62
+ conversationId: z.string().openapi({ description: "The ID of the conversation receiving the typing update" }),
63
+ isTyping: z.boolean().openapi({ description: "Echo of the reported typing state" }),
64
+ visitorPreview: z.string().nullable().openapi({ description: "Preview text that was forwarded with the typing event, or null when none was sent." }),
65
+ sentAt: z.string().openapi({ description: "Timestamp when the typing event was recorded" })
66
+ }).openapi({ description: "Response confirming the visitor typing state was recorded" });
67
+ const getConversationSeenDataResponseSchema = z.object({ seenData: z.array(z.object({
68
+ id: z.string().openapi({ description: "The seen record's unique identifier" }),
69
+ conversationId: z.string().openapi({ description: "The conversation ID" }),
70
+ userId: z.string().nullable().openapi({ description: "The user ID who saw the conversation, if applicable" }),
71
+ visitorId: z.string().nullable().openapi({ description: "The visitor ID who saw the conversation, if applicable" }),
72
+ aiAgentId: z.string().nullable().openapi({ description: "The AI agent ID who saw the conversation, if applicable" }),
73
+ lastSeenAt: z.string().openapi({ description: "Timestamp when the conversation was last seen" }),
74
+ createdAt: z.string().openapi({ description: "When the seen record was created" }),
75
+ updatedAt: z.string().openapi({ description: "When the seen record was last updated" }),
76
+ deletedAt: z.string().nullable().openapi({ description: "When the seen record was deleted, if applicable" })
77
+ })) }).openapi({ description: "Response containing seen data for a conversation" });
78
+
79
+ //#endregion
80
+ export { createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema };
81
+ //# sourceMappingURL=conversation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.js","names":[],"sources":["../../src/api/conversation.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\nimport { conversationSchema } from \"../schemas\";\nimport { timelineItemSchema } from \"./timeline-item\";\n\nexport const createConversationRequestSchema = z\n\t.object({\n\t\tvisitorId: z.string().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Visitor ID, if not provided you must provide a visitorId in the headers.\",\n\t\t}),\n\t\tconversationId: z.string().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Default conversation ID, if not provided the ID will be automatically generated.\",\n\t\t}),\n\t\tdefaultTimelineItems: z.array(timelineItemSchema).openapi({\n\t\t\tdescription: \"Default timeline items to initiate the conversation with\",\n\t\t}),\n\t\tchannel: z.string().default(\"widget\").openapi({\n\t\t\tdescription: \"Which channel the conversation is from\",\n\t\t\tdefault: \"widget\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Body for creating a conversation.\",\n\t});\n\nexport type CreateConversationRequestBody = z.infer<\n\ttypeof createConversationRequestSchema\n>;\n\nexport const createConversationResponseSchema = z\n\t.object({\n\t\tinitialTimelineItems: z.array(timelineItemSchema),\n\t\tconversation: conversationSchema,\n\t})\n\t.openapi({\n\t\tdescription: \"Body including created conversation and default messages\",\n\t});\n\nexport type CreateConversationResponseBody = z.infer<\n\ttypeof createConversationResponseSchema\n>;\n\nexport const listConversationsRequestSchema = z\n\t.object({\n\t\tvisitorId: z.string().optional().openapi({\n\t\t\tdescription: \"Visitor ID to fetch conversations for.\",\n\t\t}),\n\t\tpage: z.coerce.number().min(1).default(1).openapi({\n\t\t\tdescription: \"Page number for pagination\",\n\t\t\tdefault: 1,\n\t\t}),\n\t\tlimit: z.coerce.number().min(1).max(100).default(6).openapi({\n\t\t\tdescription: \"Number of conversations per page\",\n\t\t\tdefault: 6,\n\t\t}),\n\t\tstatus: z.enum([\"open\", \"closed\"]).optional().openapi({\n\t\t\tdescription: \"Filter by conversation status\",\n\t\t}),\n\t\torderBy: z.enum([\"createdAt\", \"updatedAt\"]).default(\"updatedAt\").openapi({\n\t\t\tdescription: \"Field to order conversations by\",\n\t\t\tdefault: \"updatedAt\",\n\t\t}),\n\t\torder: z.enum([\"asc\", \"desc\"]).default(\"desc\").openapi({\n\t\t\tdescription: \"Order direction\",\n\t\t\tdefault: \"desc\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Query parameters for listing conversations\",\n\t});\n\nexport type ListConversationsRequest = z.infer<\n\ttypeof listConversationsRequestSchema\n>;\n\nexport const listConversationsResponseSchema = z\n\t.object({\n\t\tconversations: z.array(conversationSchema),\n\t\tpagination: z.object({\n\t\t\tpage: z.number(),\n\t\t\tlimit: z.number(),\n\t\t\ttotal: z.number(),\n\t\t\ttotalPages: z.number(),\n\t\t\thasMore: z.boolean(),\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Paginated list of conversations\",\n\t});\n\nexport type ListConversationsResponse = z.infer<\n\ttypeof listConversationsResponseSchema\n>;\n\nexport const getConversationRequestSchema = z\n\t.object({\n\t\tconversationId: z.string().openapi({\n\t\t\tdescription: \"The ID of the conversation to retrieve\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Parameters for retrieving a single conversation\",\n\t});\n\nexport type GetConversationRequest = z.infer<\n\ttypeof getConversationRequestSchema\n>;\n\nexport const getConversationResponseSchema = z\n\t.object({\n\t\tconversation: conversationSchema,\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing a single conversation\",\n\t});\n\nexport type GetConversationResponse = z.infer<\n\ttypeof getConversationResponseSchema\n>;\n\nexport const markConversationSeenRequestSchema = z\n\t.object({\n\t\tvisitorId: z.string().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Visitor ID associated with the conversation. Optional if provided via the X-Visitor-Id header.\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Body for marking a conversation as seen. Either visitorId must be provided via body or headers.\",\n\t});\n\nexport type MarkConversationSeenRequestBody = z.infer<\n\ttypeof markConversationSeenRequestSchema\n>;\n\nexport const markConversationSeenResponseSchema = z\n\t.object({\n\t\tconversationId: z.string().openapi({\n\t\t\tdescription: \"The ID of the conversation that was marked as seen\",\n\t\t}),\n\t\tlastSeenAt: z.string().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Timestamp indicating when the visitor last saw the conversation\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response confirming the conversation has been marked as seen\",\n\t});\n\nexport type MarkConversationSeenResponseBody = z.infer<\n\ttypeof markConversationSeenResponseSchema\n>;\n\nexport const setConversationTypingRequestSchema = z\n\t.object({\n\t\tisTyping: z.boolean().openapi({\n\t\t\tdescription: \"Whether the visitor is currently typing\",\n\t\t}),\n\t\tvisitorPreview: z.string().max(2000).optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Optional preview of the visitor's message while typing. Only processed when the visitor is typing.\",\n\t\t}),\n\t\tvisitorId: z.string().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Visitor ID associated with the conversation. Optional if provided via the X-Visitor-Id header.\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Body for reporting a visitor typing state. Either visitorId must be provided via body or headers.\",\n\t});\n\nexport type SetConversationTypingRequestBody = z.infer<\n\ttypeof setConversationTypingRequestSchema\n>;\n\nexport const setConversationTypingResponseSchema = z\n\t.object({\n\t\tconversationId: z.string().openapi({\n\t\t\tdescription: \"The ID of the conversation receiving the typing update\",\n\t\t}),\n\t\tisTyping: z.boolean().openapi({\n\t\t\tdescription: \"Echo of the reported typing state\",\n\t\t}),\n\t\tvisitorPreview: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Preview text that was forwarded with the typing event, or null when none was sent.\",\n\t\t}),\n\t\tsentAt: z.string().openapi({\n\t\t\tdescription: \"Timestamp when the typing event was recorded\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response confirming the visitor typing state was recorded\",\n\t});\n\nexport type SetConversationTypingResponseBody = z.infer<\n\ttypeof setConversationTypingResponseSchema\n>;\n\nexport const getConversationSeenDataResponseSchema = z\n\t.object({\n\t\tseenData: z.array(\n\t\t\tz.object({\n\t\t\t\tid: z.string().openapi({\n\t\t\t\t\tdescription: \"The seen record's unique identifier\",\n\t\t\t\t}),\n\t\t\t\tconversationId: z.string().openapi({\n\t\t\t\t\tdescription: \"The conversation ID\",\n\t\t\t\t}),\n\t\t\t\tuserId: z.string().nullable().openapi({\n\t\t\t\t\tdescription: \"The user ID who saw the conversation, if applicable\",\n\t\t\t\t}),\n\t\t\t\tvisitorId: z.string().nullable().openapi({\n\t\t\t\t\tdescription: \"The visitor ID who saw the conversation, if applicable\",\n\t\t\t\t}),\n\t\t\t\taiAgentId: z.string().nullable().openapi({\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"The AI agent ID who saw the conversation, if applicable\",\n\t\t\t\t}),\n\t\t\t\tlastSeenAt: z.string().openapi({\n\t\t\t\t\tdescription: \"Timestamp when the conversation was last seen\",\n\t\t\t\t}),\n\t\t\t\tcreatedAt: z.string().openapi({\n\t\t\t\t\tdescription: \"When the seen record was created\",\n\t\t\t\t}),\n\t\t\t\tupdatedAt: z.string().openapi({\n\t\t\t\t\tdescription: \"When the seen record was last updated\",\n\t\t\t\t}),\n\t\t\t\tdeletedAt: z.string().nullable().openapi({\n\t\t\t\t\tdescription: \"When the seen record was deleted, if applicable\",\n\t\t\t\t}),\n\t\t\t})\n\t\t),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing seen data for a conversation\",\n\t});\n\nexport type GetConversationSeenDataResponse = z.infer<\n\ttypeof getConversationSeenDataResponseSchema\n>;\n"],"mappings":";;;;;AAIA,MAAa,kCAAkC,EAC7C,OAAO;CACP,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACxC,aACC,4EACD,CAAC;CACF,gBAAgB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAC7C,aACC,oFACD,CAAC;CACF,sBAAsB,EAAE,MAAM,mBAAmB,CAAC,QAAQ,EACzD,aAAa,4DACb,CAAC;CACF,SAAS,EAAE,QAAQ,CAAC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C;AAMH,MAAa,wCAAwC,EACnD,OAAO,EACP,UAAU,EAAE,MACX,EAAE,OAAO;CACR,IAAI,EAAE,QAAQ,CAAC,QAAQ,EACtB,aAAa,uCACb,CAAC;CACF,gBAAgB,EAAE,QAAQ,CAAC,QAAQ,EAClC,aAAa,uBACb,CAAC;CACF,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACrC,aAAa,uDACb,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACxC,aAAa,0DACb,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACxC,aACC,2DACD,CAAC;CACF,YAAY,EAAE,QAAQ,CAAC,QAAQ,EAC9B,aAAa,iDACb,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAC7B,aAAa,oCACb,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAC7B,aAAa,yCACb,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EACxC,aAAa,mDACb,CAAC;CACF,CAAC,CACF,EACD,CAAC,CACD,QAAQ,EACR,aAAa,oDACb,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { PaginationInput, PaginationResponse, emailSchema, optionalUserIdSchema, paginationResponseSchema, paginationSchema, referralCodeSchema, userIdSchema } from "./common.js";
2
+ import { Contact, ContactMetadata, ContactOrganizationResponse, ContactResponse, CreateContactOrganizationRequest, CreateContactRequest, IdentifyContactRequest, IdentifyContactResponse, UpdateContactMetadataRequest, UpdateContactOrganizationRequest, UpdateContactRequest, contactMetadataSchema, contactOrganization, contactOrganizationResponseSchema, contactResponseSchema, createContactOrganizationRequestSchema, createContactRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema } from "./contact.js";
3
+ import { CreateConversationRequestBody, CreateConversationResponseBody, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, ListConversationsRequest, ListConversationsResponse, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, SetConversationTypingRequestBody, SetConversationTypingResponseBody, createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema } from "./conversation.js";
4
+ import { OrganizationResponse, organizationResponseSchema } from "./organization.js";
5
+ import { GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, SendTimelineItemRequest, SendTimelineItemResponse, TimelineItem, TimelineItemParts, TimelinePartEvent, TimelinePartFile, TimelinePartImage, TimelinePartText, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, timelineItemPartsSchema, timelineItemSchema } from "./timeline-item.js";
6
+ import { GenerateUploadUrlRequest, GenerateUploadUrlResponse, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema } from "./upload.js";
7
+ import { UpdateUserProfileRequest, UserResponse, updateUserProfileRequestSchema, userResponseSchema } from "./user.js";
8
+ import { PublicContact, PublicVisitor, PublicVisitorResponse, UpdateVisitorMetadataRequest, UpdateVisitorRequest, Visitor, VisitorMetadata, VisitorResponse, publicContactResponseSchema, publicVisitorResponseSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema } from "./visitor.js";
9
+ import { AvailableAIAgent, AvailableAIAgentSchema, AvailableHumanAgent, CheckWebsiteDomainRequest, CreateWebsiteApiKeyRequest, CreateWebsiteRequest, CreateWebsiteResponse, ListByOrganizationRequest, PublicWebsiteResponse, RevokeWebsiteApiKeyRequest, UpdateWebsiteRequest, WebsiteApiKey, WebsiteDeveloperSettingsResponse, WebsiteListItem, WebsiteSummary, availableHumanAgentSchema, checkWebsiteDomainRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, listByOrganizationRequestSchema, publicWebsiteResponseSchema, revokeWebsiteApiKeyRequestSchema, updateWebsiteRequestSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema } from "./website.js";
10
+ export { AvailableAIAgent, AvailableAIAgentSchema, AvailableHumanAgent, CheckWebsiteDomainRequest, Contact, ContactMetadata, ContactOrganizationResponse, ContactResponse, CreateContactOrganizationRequest, CreateContactRequest, CreateConversationRequestBody, CreateConversationResponseBody, CreateWebsiteApiKeyRequest, CreateWebsiteRequest, CreateWebsiteResponse, GenerateUploadUrlRequest, GenerateUploadUrlResponse, GetConversationRequest, GetConversationResponse, GetConversationSeenDataResponse, GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, IdentifyContactRequest, IdentifyContactResponse, ListByOrganizationRequest, ListConversationsRequest, ListConversationsResponse, MarkConversationSeenRequestBody, MarkConversationSeenResponseBody, OrganizationResponse, PaginationInput, PaginationResponse, PublicContact, PublicVisitor, PublicVisitorResponse, PublicWebsiteResponse, RevokeWebsiteApiKeyRequest, SendTimelineItemRequest, SendTimelineItemResponse, SetConversationTypingRequestBody, SetConversationTypingResponseBody, TimelineItem, TimelineItemParts, TimelinePartEvent, TimelinePartFile, TimelinePartImage, TimelinePartText, UpdateContactMetadataRequest, UpdateContactOrganizationRequest, UpdateContactRequest, UpdateUserProfileRequest, UpdateVisitorMetadataRequest, UpdateVisitorRequest, UpdateWebsiteRequest, UserResponse, Visitor, VisitorMetadata, VisitorResponse, WebsiteApiKey, WebsiteDeveloperSettingsResponse, WebsiteListItem, WebsiteSummary, availableHumanAgentSchema, checkWebsiteDomainRequestSchema, contactMetadataSchema, contactOrganization, contactOrganizationResponseSchema, contactResponseSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, emailSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, identifyContactRequestSchema, identifyContactResponseSchema, listByOrganizationRequestSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, referralCodeSchema, revokeWebsiteApiKeyRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, timelineItemPartsSchema, timelineItemSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, userIdSchema, userResponseSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
@@ -0,0 +1,11 @@
1
+ import { emailSchema, optionalUserIdSchema, paginationResponseSchema, paginationSchema, referralCodeSchema, userIdSchema } from "./common.js";
2
+ import { contactMetadataSchema, contactOrganizationResponseSchema, contactResponseSchema, createContactOrganizationRequestSchema, createContactRequestSchema, identifyContactRequestSchema, identifyContactResponseSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema } from "./contact.js";
3
+ import { getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, timelineItemPartsSchema, timelineItemSchema } from "./timeline-item.js";
4
+ import { createConversationRequestSchema, createConversationResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema } from "./conversation.js";
5
+ import { organizationResponseSchema } from "./organization.js";
6
+ import { generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema } from "./upload.js";
7
+ import { updateUserProfileRequestSchema, userResponseSchema } from "./user.js";
8
+ import { publicContactResponseSchema, publicVisitorResponseSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema } from "./visitor.js";
9
+ import { AvailableAIAgentSchema, availableHumanAgentSchema, checkWebsiteDomainRequestSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, listByOrganizationRequestSchema, publicWebsiteResponseSchema, revokeWebsiteApiKeyRequestSchema, updateWebsiteRequestSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema } from "./website.js";
10
+
11
+ export { AvailableAIAgentSchema, availableHumanAgentSchema, checkWebsiteDomainRequestSchema, contactMetadataSchema, contactOrganizationResponseSchema, contactResponseSchema, createContactOrganizationRequestSchema, createContactRequestSchema, createConversationRequestSchema, createConversationResponseSchema, createWebsiteApiKeyRequestSchema, createWebsiteRequestSchema, createWebsiteResponseSchema, emailSchema, generateUploadUrlRequestSchema, generateUploadUrlResponseSchema, getConversationRequestSchema, getConversationResponseSchema, getConversationSeenDataResponseSchema, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, identifyContactRequestSchema, identifyContactResponseSchema, listByOrganizationRequestSchema, listConversationsRequestSchema, listConversationsResponseSchema, markConversationSeenRequestSchema, markConversationSeenResponseSchema, optionalUserIdSchema, organizationResponseSchema, paginationResponseSchema, paginationSchema, publicContactResponseSchema, publicVisitorResponseSchema, publicWebsiteResponseSchema, referralCodeSchema, revokeWebsiteApiKeyRequestSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, setConversationTypingRequestSchema, setConversationTypingResponseSchema, timelineItemPartsSchema, timelineItemSchema, updateContactMetadataRequestSchema, updateContactOrganizationRequestSchema, updateContactRequestSchema, updateUserProfileRequestSchema, updateVisitorMetadataRequestSchema, updateVisitorRequestSchema, updateWebsiteRequestSchema, uploadContactIdSchema, uploadConversationIdSchema, uploadFileExtensionSchema, uploadFileNameSchema, uploadOrganizationIdSchema, uploadPathSchema, uploadScopeContactSchema, uploadScopeConversationSchema, uploadScopeSchema, uploadScopeUserSchema, uploadScopeVisitorSchema, uploadUserIdSchema, uploadVisitorIdSchema, uploadWebsiteIdSchema, userIdSchema, userResponseSchema, visitorMetadataSchema, visitorProfileSchema, visitorResponseSchema, websiteApiKeySchema, websiteDeveloperSettingsResponseSchema, websiteListItemSchema, websiteSummarySchema };
@@ -0,0 +1,15 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ //#region src/api/organization.d.ts
4
+
5
+ /**
6
+ * Organization API response schema
7
+ */
8
+ declare const organizationResponseSchema: z.ZodObject<{
9
+ id: z.ZodULID;
10
+ name: z.ZodString;
11
+ }, z.core.$strip>;
12
+ type OrganizationResponse = z.infer<typeof organizationResponseSchema>;
13
+ //#endregion
14
+ export { OrganizationResponse, organizationResponseSchema };
15
+ //# sourceMappingURL=organization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.d.ts","names":[],"sources":["../../src/api/organization.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;cAAa,4BAA0B,CAAA,CAAA;;;CAAA,eAAA,CAAA;AAAA,KAW3B,oBAAA,GAAuB,CAAA,CAAE,KAXE,CAAA,OAWW,0BAXX,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ //#region src/api/organization.ts
4
+ /**
5
+ * Organization API response schema
6
+ */
7
+ const organizationResponseSchema = z.object({
8
+ id: z.ulid().openapi({
9
+ description: "The organization's unique identifier.",
10
+ example: "01JG000000000000000000000"
11
+ }),
12
+ name: z.string().openapi({
13
+ description: "The organization's name.",
14
+ example: "Acme Corp"
15
+ })
16
+ });
17
+
18
+ //#endregion
19
+ export { organizationResponseSchema };
20
+ //# sourceMappingURL=organization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.js","names":[],"sources":["../../src/api/organization.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\n/**\n * Organization API response schema\n */\nexport const organizationResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The organization's name.\",\n\t\texample: \"Acme Corp\",\n\t}),\n});\n\nexport type OrganizationResponse = z.infer<typeof organizationResponseSchema>;\n"],"mappings":";;;;;;AAKA,MAAa,6BAA6B,EAAE,OAAO;CAClD,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC"}
@@ -0,0 +1,270 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ //#region src/api/timeline-item.d.ts
4
+ declare const timelinePartImageSchema: z.ZodObject<{
5
+ type: z.ZodLiteral<"image">;
6
+ url: z.ZodString;
7
+ mediaType: z.ZodString;
8
+ fileName: z.ZodOptional<z.ZodString>;
9
+ size: z.ZodOptional<z.ZodNumber>;
10
+ width: z.ZodOptional<z.ZodNumber>;
11
+ height: z.ZodOptional<z.ZodNumber>;
12
+ }, z.core.$strip>;
13
+ declare const timelinePartTextSchema: z.ZodObject<{
14
+ type: z.ZodLiteral<"text">;
15
+ text: z.ZodString;
16
+ }, z.core.$strip>;
17
+ declare const timelineFileSchema: z.ZodObject<{
18
+ type: z.ZodLiteral<"file">;
19
+ url: z.ZodString;
20
+ mediaType: z.ZodString;
21
+ fileName: z.ZodOptional<z.ZodString>;
22
+ size: z.ZodOptional<z.ZodNumber>;
23
+ }, z.core.$strip>;
24
+ declare const timelinePartEventSchema: z.ZodObject<{
25
+ type: z.ZodLiteral<"event">;
26
+ eventType: z.ZodEnum<{
27
+ [x: string]: any;
28
+ }>;
29
+ actorUserId: z.ZodNullable<z.ZodString>;
30
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
31
+ targetUserId: z.ZodNullable<z.ZodString>;
32
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
33
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ }, z.core.$strip>;
35
+ declare const timelineItemPartsSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
36
+ type: z.ZodLiteral<"text">;
37
+ text: z.ZodString;
38
+ }, z.core.$strip>, z.ZodObject<{
39
+ type: z.ZodLiteral<"event">;
40
+ eventType: z.ZodEnum<{
41
+ [x: string]: any;
42
+ }>;
43
+ actorUserId: z.ZodNullable<z.ZodString>;
44
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
45
+ targetUserId: z.ZodNullable<z.ZodString>;
46
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
47
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ }, z.core.$strip>, z.ZodObject<{
49
+ type: z.ZodLiteral<"image">;
50
+ url: z.ZodString;
51
+ mediaType: z.ZodString;
52
+ fileName: z.ZodOptional<z.ZodString>;
53
+ size: z.ZodOptional<z.ZodNumber>;
54
+ width: z.ZodOptional<z.ZodNumber>;
55
+ height: z.ZodOptional<z.ZodNumber>;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ type: z.ZodLiteral<"file">;
58
+ url: z.ZodString;
59
+ mediaType: z.ZodString;
60
+ fileName: z.ZodOptional<z.ZodString>;
61
+ size: z.ZodOptional<z.ZodNumber>;
62
+ }, z.core.$strip>]>>;
63
+ declare const timelineItemSchema: z.ZodObject<{
64
+ id: z.ZodOptional<z.ZodString>;
65
+ conversationId: z.ZodString;
66
+ organizationId: z.ZodString;
67
+ visibility: z.ZodEnum<{
68
+ [x: string]: any;
69
+ }>;
70
+ type: z.ZodEnum<{
71
+ [x: string]: any;
72
+ }>;
73
+ text: z.ZodNullable<z.ZodString>;
74
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
76
+ type: z.ZodLiteral<"text">;
77
+ text: z.ZodString;
78
+ }, z.core.$strip>, z.ZodObject<{
79
+ type: z.ZodLiteral<"event">;
80
+ eventType: z.ZodEnum<{
81
+ [x: string]: any;
82
+ }>;
83
+ actorUserId: z.ZodNullable<z.ZodString>;
84
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
85
+ targetUserId: z.ZodNullable<z.ZodString>;
86
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
87
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ }, z.core.$strip>, z.ZodObject<{
89
+ type: z.ZodLiteral<"image">;
90
+ url: z.ZodString;
91
+ mediaType: z.ZodString;
92
+ fileName: z.ZodOptional<z.ZodString>;
93
+ size: z.ZodOptional<z.ZodNumber>;
94
+ width: z.ZodOptional<z.ZodNumber>;
95
+ height: z.ZodOptional<z.ZodNumber>;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ type: z.ZodLiteral<"file">;
98
+ url: z.ZodString;
99
+ mediaType: z.ZodString;
100
+ fileName: z.ZodOptional<z.ZodString>;
101
+ size: z.ZodOptional<z.ZodNumber>;
102
+ }, z.core.$strip>]>>;
103
+ userId: z.ZodNullable<z.ZodString>;
104
+ aiAgentId: z.ZodNullable<z.ZodString>;
105
+ visitorId: z.ZodNullable<z.ZodString>;
106
+ createdAt: z.ZodString;
107
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ }, z.core.$strip>;
109
+ type timelineItemSchema = z.infer<typeof timelineItemSchema>;
110
+ type TimelineItem = z.infer<typeof timelineItemSchema>;
111
+ type TimelineItemParts = z.infer<typeof timelineItemPartsSchema>;
112
+ type TimelinePartText = z.infer<typeof timelinePartTextSchema>;
113
+ type TimelinePartImage = z.infer<typeof timelinePartImageSchema>;
114
+ type TimelinePartFile = z.infer<typeof timelineFileSchema>;
115
+ type TimelinePartEvent = z.infer<typeof timelinePartEventSchema>;
116
+ declare const getConversationTimelineItemsRequestSchema: z.ZodObject<{
117
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
118
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ }, z.core.$strip>;
120
+ type GetConversationTimelineItemsRequest = z.infer<typeof getConversationTimelineItemsRequestSchema>;
121
+ declare const getConversationTimelineItemsResponseSchema: z.ZodObject<{
122
+ items: z.ZodArray<z.ZodObject<{
123
+ id: z.ZodOptional<z.ZodString>;
124
+ conversationId: z.ZodString;
125
+ organizationId: z.ZodString;
126
+ visibility: z.ZodEnum<{
127
+ [x: string]: any;
128
+ }>;
129
+ type: z.ZodEnum<{
130
+ [x: string]: any;
131
+ }>;
132
+ text: z.ZodNullable<z.ZodString>;
133
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
134
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
135
+ type: z.ZodLiteral<"text">;
136
+ text: z.ZodString;
137
+ }, z.core.$strip>, z.ZodObject<{
138
+ type: z.ZodLiteral<"event">;
139
+ eventType: z.ZodEnum<{
140
+ [x: string]: any;
141
+ }>;
142
+ actorUserId: z.ZodNullable<z.ZodString>;
143
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
144
+ targetUserId: z.ZodNullable<z.ZodString>;
145
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
146
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
+ }, z.core.$strip>, z.ZodObject<{
148
+ type: z.ZodLiteral<"image">;
149
+ url: z.ZodString;
150
+ mediaType: z.ZodString;
151
+ fileName: z.ZodOptional<z.ZodString>;
152
+ size: z.ZodOptional<z.ZodNumber>;
153
+ width: z.ZodOptional<z.ZodNumber>;
154
+ height: z.ZodOptional<z.ZodNumber>;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ type: z.ZodLiteral<"file">;
157
+ url: z.ZodString;
158
+ mediaType: z.ZodString;
159
+ fileName: z.ZodOptional<z.ZodString>;
160
+ size: z.ZodOptional<z.ZodNumber>;
161
+ }, z.core.$strip>]>>;
162
+ userId: z.ZodNullable<z.ZodString>;
163
+ aiAgentId: z.ZodNullable<z.ZodString>;
164
+ visitorId: z.ZodNullable<z.ZodString>;
165
+ createdAt: z.ZodString;
166
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
+ }, z.core.$strip>>;
168
+ nextCursor: z.ZodNullable<z.ZodString>;
169
+ hasNextPage: z.ZodBoolean;
170
+ }, z.core.$strip>;
171
+ type GetConversationTimelineItemsResponse = z.infer<typeof getConversationTimelineItemsResponseSchema>;
172
+ declare const sendTimelineItemRequestSchema: z.ZodObject<{
173
+ conversationId: z.ZodString;
174
+ item: z.ZodObject<{
175
+ id: z.ZodOptional<z.ZodString>;
176
+ type: z.ZodDefault<z.ZodEnum<{
177
+ [x: string]: any;
178
+ }>>;
179
+ text: z.ZodString;
180
+ parts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
181
+ type: z.ZodLiteral<"text">;
182
+ text: z.ZodString;
183
+ }, z.core.$strip>, z.ZodObject<{
184
+ type: z.ZodLiteral<"event">;
185
+ eventType: z.ZodEnum<{
186
+ [x: string]: any;
187
+ }>;
188
+ actorUserId: z.ZodNullable<z.ZodString>;
189
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
190
+ targetUserId: z.ZodNullable<z.ZodString>;
191
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
192
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
193
+ }, z.core.$strip>, z.ZodObject<{
194
+ type: z.ZodLiteral<"image">;
195
+ url: z.ZodString;
196
+ mediaType: z.ZodString;
197
+ fileName: z.ZodOptional<z.ZodString>;
198
+ size: z.ZodOptional<z.ZodNumber>;
199
+ width: z.ZodOptional<z.ZodNumber>;
200
+ height: z.ZodOptional<z.ZodNumber>;
201
+ }, z.core.$strip>, z.ZodObject<{
202
+ type: z.ZodLiteral<"file">;
203
+ url: z.ZodString;
204
+ mediaType: z.ZodString;
205
+ fileName: z.ZodOptional<z.ZodString>;
206
+ size: z.ZodOptional<z.ZodNumber>;
207
+ }, z.core.$strip>]>>>;
208
+ visibility: z.ZodDefault<z.ZodEnum<{
209
+ [x: string]: any;
210
+ }>>;
211
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
+ userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
+ aiAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ visitorId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
215
+ createdAt: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strip>;
217
+ }, z.core.$strip>;
218
+ type SendTimelineItemRequest = z.infer<typeof sendTimelineItemRequestSchema>;
219
+ declare const sendTimelineItemResponseSchema: z.ZodObject<{
220
+ item: z.ZodObject<{
221
+ id: z.ZodOptional<z.ZodString>;
222
+ conversationId: z.ZodString;
223
+ organizationId: z.ZodString;
224
+ visibility: z.ZodEnum<{
225
+ [x: string]: any;
226
+ }>;
227
+ type: z.ZodEnum<{
228
+ [x: string]: any;
229
+ }>;
230
+ text: z.ZodNullable<z.ZodString>;
231
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
233
+ type: z.ZodLiteral<"text">;
234
+ text: z.ZodString;
235
+ }, z.core.$strip>, z.ZodObject<{
236
+ type: z.ZodLiteral<"event">;
237
+ eventType: z.ZodEnum<{
238
+ [x: string]: any;
239
+ }>;
240
+ actorUserId: z.ZodNullable<z.ZodString>;
241
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
242
+ targetUserId: z.ZodNullable<z.ZodString>;
243
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
244
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ }, z.core.$strip>, z.ZodObject<{
246
+ type: z.ZodLiteral<"image">;
247
+ url: z.ZodString;
248
+ mediaType: z.ZodString;
249
+ fileName: z.ZodOptional<z.ZodString>;
250
+ size: z.ZodOptional<z.ZodNumber>;
251
+ width: z.ZodOptional<z.ZodNumber>;
252
+ height: z.ZodOptional<z.ZodNumber>;
253
+ }, z.core.$strip>, z.ZodObject<{
254
+ type: z.ZodLiteral<"file">;
255
+ url: z.ZodString;
256
+ mediaType: z.ZodString;
257
+ fileName: z.ZodOptional<z.ZodString>;
258
+ size: z.ZodOptional<z.ZodNumber>;
259
+ }, z.core.$strip>]>>;
260
+ userId: z.ZodNullable<z.ZodString>;
261
+ aiAgentId: z.ZodNullable<z.ZodString>;
262
+ visitorId: z.ZodNullable<z.ZodString>;
263
+ createdAt: z.ZodString;
264
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
+ }, z.core.$strip>;
266
+ }, z.core.$strip>;
267
+ type SendTimelineItemResponse = z.infer<typeof sendTimelineItemResponseSchema>;
268
+ //#endregion
269
+ export { GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, SendTimelineItemRequest, SendTimelineItemResponse, TimelineItem, TimelineItemParts, TimelinePartEvent, TimelinePartFile, TimelinePartImage, TimelinePartText, getConversationTimelineItemsRequestSchema, getConversationTimelineItemsResponseSchema, sendTimelineItemRequestSchema, sendTimelineItemResponseSchema, timelineItemPartsSchema, timelineItemSchema };
270
+ //# sourceMappingURL=timeline-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../src/api/timeline-item.ts"],"sourcesContent":[],"mappings":";;;cAQM,yBAAuB,CAAA,CAAA;;EAAvB,GAAA,aAAA;;;;;;;cAwBA,wBAAsB,CAAA,CAAA;;;;cAStB,oBAAkB,CAAA,CAAA;;EAjCK,GAAA,aAAA;EAAA,SAAA,aAAA;EAwBvB,QAAA,eAAA,YAOJ,CAAA;;;cAoBI,yBAAuB,CAAA,CAAA;EA3BD,IAAA,cAAA,CAAA,OAAA,CAAA;EAAA,SAAA,WAAA,CAAA;IAStB,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,GAAA;;;;;;;;cA2DO,yBAAuB,CAAA,CAAA,SAAA,CAAA,CAAA,mBAAA,CAAA,CAAA;EA3DZ,IAAA,cAAA,CAAA,MAAA,CAAA;EAAA,IAAA,aAAA;AAAA,CAAA,eAkBlB,CAAA,aAuCJ,CAAA;;;;;;;;;;;;;;;EAvC2B,IAAA,eAAA,YAAA,CAAA;EAAA,KAAA,eAAA,YAAA,CAAA;EAyChB,MAAA,eAAA,YAYV,CAAA;;;;EAZiC,SAAA,aAAA;;;;cAcvB,oBAAkB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAdK,IAAA,cAAA,CAAA,MAAA,CAAA;IAAA,GAAA,aAAA;IAAA,SAAA,aAAA;IAcvB,QAAA,eAkDX,YAAA,CAAA;;;;;;;;;KAEU,kBAAA,GAAq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