@cossistant/types 0.0.26 → 0.0.29

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 (47) hide show
  1. package/api/ai-agent.d.ts +283 -0
  2. package/api/ai-agent.d.ts.map +1 -0
  3. package/api/ai-agent.js +416 -0
  4. package/api/ai-agent.js.map +1 -0
  5. package/api/contact.d.ts.map +1 -1
  6. package/api/conversation.d.ts +3 -0
  7. package/api/conversation.d.ts.map +1 -1
  8. package/api/index.d.ts +4 -1
  9. package/api/index.js +4 -1
  10. package/api/knowledge.d.ts +500 -0
  11. package/api/knowledge.d.ts.map +1 -0
  12. package/api/knowledge.js +446 -0
  13. package/api/knowledge.js.map +1 -0
  14. package/api/link-source.d.ts +262 -0
  15. package/api/link-source.d.ts.map +1 -0
  16. package/api/link-source.js +453 -0
  17. package/api/link-source.js.map +1 -0
  18. package/api/upload.d.ts +2 -2
  19. package/api/upload.d.ts.map +1 -1
  20. package/api/upload.js +2 -2
  21. package/api/upload.js.map +1 -1
  22. package/api/website.d.ts +4 -4
  23. package/api/website.d.ts.map +1 -1
  24. package/api/website.js +3 -3
  25. package/api/website.js.map +1 -1
  26. package/enums.d.ts +3 -0
  27. package/enums.d.ts.map +1 -1
  28. package/enums.js +4 -1
  29. package/enums.js.map +1 -1
  30. package/index.d.ts +4 -1
  31. package/index.d.ts.map +1 -1
  32. package/index.js +4 -1
  33. package/package.json +17 -1
  34. package/realtime-events.d.ts +163 -0
  35. package/realtime-events.d.ts.map +1 -1
  36. package/realtime-events.js +121 -1
  37. package/realtime-events.js.map +1 -1
  38. package/schemas.d.ts +1 -0
  39. package/schemas.d.ts.map +1 -1
  40. package/schemas.js +1 -0
  41. package/schemas.js.map +1 -1
  42. package/trpc/conversation.d.ts +24 -0
  43. package/trpc/conversation.d.ts.map +1 -1
  44. package/trpc/conversation.js +12 -0
  45. package/trpc/conversation.js.map +1 -1
  46. package/trpc/visitor.d.ts +6 -0
  47. package/trpc/visitor.d.ts.map +1 -1
@@ -0,0 +1,446 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ //#region src/api/knowledge.ts
4
+ const knowledgeTypeSchema = z.enum([
5
+ "url",
6
+ "faq",
7
+ "article"
8
+ ]).openapi({
9
+ description: "Knowledge entry type",
10
+ example: "url"
11
+ });
12
+ const headingSchema = z.object({
13
+ level: z.number().int().min(1).max(6).openapi({
14
+ description: "Heading level (1-6)",
15
+ example: 2
16
+ }),
17
+ text: z.string().min(1).openapi({
18
+ description: "Heading text content",
19
+ example: "Getting started"
20
+ })
21
+ });
22
+ const linkSchema = z.url().openapi({
23
+ description: "Absolute URL discovered in the document",
24
+ example: "https://docs.cossistant.com/guide"
25
+ });
26
+ const imageSchema = z.object({
27
+ src: z.url().openapi({
28
+ description: "Image URL captured during scraping",
29
+ example: "https://cdn.cossistant.com/assets/hero.png"
30
+ }),
31
+ alt: z.string().nullable().openapi({
32
+ description: "Optional alt text attached to the image",
33
+ example: "Agent dashboard hero illustration"
34
+ })
35
+ });
36
+ const urlKnowledgePayloadSchema = z.object({
37
+ markdown: z.string().min(1).openapi({
38
+ description: "Scraped markdown body",
39
+ example: "# Welcome to the Help Center"
40
+ }),
41
+ headings: z.array(headingSchema).default([]),
42
+ links: z.array(linkSchema).default([]),
43
+ images: z.array(imageSchema).default([]),
44
+ estimatedTokens: z.number().int().nonnegative().optional().openapi({
45
+ description: "Heuristic token count to assist chunking",
46
+ example: 2048
47
+ })
48
+ }).openapi({ description: "Structured payload for raw page content" });
49
+ const faqKnowledgePayloadSchema = z.object({
50
+ question: z.string().min(1).openapi({
51
+ description: "FAQ question",
52
+ example: "How do I reset my password?"
53
+ }),
54
+ answer: z.string().min(1).openapi({
55
+ description: "Answer shown to customers",
56
+ example: "Go to Settings → Security and click Reset password."
57
+ }),
58
+ categories: z.array(z.string()).default([]),
59
+ relatedQuestions: z.array(z.string()).default([])
60
+ }).openapi({ description: "Payload describing a single FAQ entry" });
61
+ const articleKnowledgePayloadSchema = z.object({
62
+ title: z.string().min(1).openapi({
63
+ description: "Article title",
64
+ example: "Billing and invoicing overview"
65
+ }),
66
+ summary: z.string().nullable().optional().openapi({
67
+ description: "Short synopsis or excerpt",
68
+ example: "Understand how billing cycles and invoices are generated."
69
+ }),
70
+ markdown: z.string().min(1).openapi({
71
+ description: "Article body in markdown format",
72
+ example: "## Billing cycles\n\nCossistant bills you monthly..."
73
+ }),
74
+ keywords: z.array(z.string()).default([]),
75
+ heroImage: imageSchema.optional()
76
+ }).openapi({ description: "Payload describing a full article or help doc" });
77
+ const metadataSchema = z.record(z.string(), z.unknown()).optional().openapi({
78
+ description: "Arbitrary metadata such as locale or crawl depth",
79
+ example: {
80
+ locale: "en-US",
81
+ source: "firecrawl"
82
+ }
83
+ });
84
+ const baseKnowledgeFields = {
85
+ organizationId: z.ulid().openapi({
86
+ description: "Owning organization identifier",
87
+ example: "01JG000000000000000000000"
88
+ }),
89
+ websiteId: z.ulid().openapi({
90
+ description: "Website identifier",
91
+ example: "01JG000000000000000000001"
92
+ }),
93
+ aiAgentId: z.ulid().nullable().optional().openapi({
94
+ description: "Optional AI agent identifier; null/omitted means the entry is shared at the website scope.",
95
+ example: "01JG000000000000000000002"
96
+ }),
97
+ sourceUrl: z.url().nullable().openapi({
98
+ description: "Origin URL for this entry (required for url knowledge; optional for others)",
99
+ example: "https://docs.cossistant.com/getting-started"
100
+ }),
101
+ sourceTitle: z.string().nullable().openapi({
102
+ description: "Readable title captured during scraping",
103
+ example: "Getting started with the Cossistant dashboard"
104
+ }),
105
+ origin: z.string().min(1).openapi({
106
+ description: "Describes how this entry was created (crawl, manual, agent, etc.)",
107
+ example: "crawl"
108
+ }),
109
+ createdBy: z.string().min(1).openapi({
110
+ description: "Identifier of the actor (user, agent, system) that created this entry",
111
+ example: "user_01JG00000000000000000000"
112
+ }),
113
+ contentHash: z.string().min(1).openapi({
114
+ description: "Deterministic hash of the payload for deduping",
115
+ example: "5d41402abc4b2a76b9719d911017c592"
116
+ }),
117
+ metadata: metadataSchema
118
+ };
119
+ const urlKnowledgeSchema = z.object(baseKnowledgeFields).extend({
120
+ type: z.literal("url"),
121
+ sourceUrl: z.url(),
122
+ payload: urlKnowledgePayloadSchema
123
+ }).openapi({ description: "URL knowledge entry" });
124
+ const faqKnowledgeSchema = z.object(baseKnowledgeFields).extend({
125
+ type: z.literal("faq"),
126
+ payload: faqKnowledgePayloadSchema
127
+ }).openapi({ description: "FAQ knowledge entry" });
128
+ const articleKnowledgeSchema = z.object(baseKnowledgeFields).extend({
129
+ type: z.literal("article"),
130
+ sourceUrl: z.url().nullable(),
131
+ payload: articleKnowledgePayloadSchema
132
+ }).openapi({ description: "Article knowledge entry" });
133
+ const knowledgeCreateSchema = z.discriminatedUnion("type", [
134
+ urlKnowledgeSchema,
135
+ faqKnowledgeSchema,
136
+ articleKnowledgeSchema
137
+ ]);
138
+ const knowledgeAuditFieldsSchema = z.object({
139
+ id: z.ulid().openapi({
140
+ description: "Knowledge entry identifier",
141
+ example: "01JG00000000000000000000A"
142
+ }),
143
+ createdAt: z.string().openapi({
144
+ description: "Creation timestamp",
145
+ example: "2024-06-10T12:00:00.000Z"
146
+ }),
147
+ updatedAt: z.string().openapi({
148
+ description: "Last update timestamp",
149
+ example: "2024-06-11T08:00:00.000Z"
150
+ }),
151
+ deletedAt: z.string().nullable().openapi({
152
+ description: "Soft delete timestamp",
153
+ example: null
154
+ })
155
+ });
156
+ const knowledgeSchema = knowledgeCreateSchema.and(knowledgeAuditFieldsSchema).openapi({ description: "Persisted knowledge entry" });
157
+ /**
158
+ * Knowledge response schema - used for single item responses
159
+ */
160
+ const knowledgeResponseSchema = z.object({
161
+ id: z.ulid().openapi({
162
+ description: "Knowledge entry identifier",
163
+ example: "01JG00000000000000000000A"
164
+ }),
165
+ organizationId: z.ulid().openapi({
166
+ description: "Owning organization identifier",
167
+ example: "01JG000000000000000000000"
168
+ }),
169
+ websiteId: z.ulid().openapi({
170
+ description: "Website identifier",
171
+ example: "01JG000000000000000000001"
172
+ }),
173
+ aiAgentId: z.ulid().nullable().openapi({
174
+ description: "Optional AI agent identifier; null means shared at website scope",
175
+ example: "01JG000000000000000000002"
176
+ }),
177
+ linkSourceId: z.ulid().nullable().openapi({
178
+ description: "Reference to the link source that created this entry",
179
+ example: "01JG000000000000000000003"
180
+ }),
181
+ type: knowledgeTypeSchema,
182
+ sourceUrl: z.url().nullable().openapi({
183
+ description: "Origin URL for this entry",
184
+ example: "https://docs.cossistant.com/getting-started"
185
+ }),
186
+ sourceTitle: z.string().nullable().openapi({
187
+ description: "Readable title captured during scraping",
188
+ example: "Getting started with the Cossistant dashboard"
189
+ }),
190
+ origin: z.string().openapi({
191
+ description: "How this entry was created (crawl, manual, agent, etc.)",
192
+ example: "crawl"
193
+ }),
194
+ createdBy: z.string().openapi({
195
+ description: "Identifier of the actor that created this entry",
196
+ example: "user_01JG00000000000000000000"
197
+ }),
198
+ contentHash: z.string().openapi({
199
+ description: "Deterministic hash of the payload for deduping",
200
+ example: "5d41402abc4b2a76b9719d911017c592"
201
+ }),
202
+ payload: z.union([
203
+ urlKnowledgePayloadSchema,
204
+ faqKnowledgePayloadSchema,
205
+ articleKnowledgePayloadSchema
206
+ ]),
207
+ metadata: metadataSchema,
208
+ isIncluded: z.boolean().openapi({
209
+ description: "Whether this entry is included in training",
210
+ example: true
211
+ }),
212
+ sizeBytes: z.number().int().nonnegative().openapi({
213
+ description: "Size of this entry in bytes",
214
+ example: 4096
215
+ }),
216
+ createdAt: z.string().openapi({
217
+ description: "Creation timestamp",
218
+ example: "2024-06-10T12:00:00.000Z"
219
+ }),
220
+ updatedAt: z.string().openapi({
221
+ description: "Last update timestamp",
222
+ example: "2024-06-11T08:00:00.000Z"
223
+ }),
224
+ deletedAt: z.string().nullable().openapi({
225
+ description: "Soft delete timestamp",
226
+ example: null
227
+ })
228
+ }).openapi({ description: "Knowledge entry response" });
229
+ /**
230
+ * List knowledge request schema (TRPC) - with websiteSlug
231
+ */
232
+ const listKnowledgeRequestSchema = z.object({
233
+ websiteSlug: z.string().openapi({
234
+ description: "The website slug to list knowledge for",
235
+ example: "my-website"
236
+ }),
237
+ type: knowledgeTypeSchema.optional().openapi({
238
+ description: "Filter by knowledge type",
239
+ example: "url"
240
+ }),
241
+ aiAgentId: z.ulid().nullable().optional().openapi({
242
+ description: "Filter by AI agent ID; null for shared entries; omit for all",
243
+ example: "01JG000000000000000000002"
244
+ }),
245
+ page: z.coerce.number().int().positive().default(1).openapi({
246
+ description: "Page number (1-indexed)",
247
+ example: 1
248
+ }),
249
+ limit: z.coerce.number().int().positive().max(100).default(20).openapi({
250
+ description: "Items per page (max 100)",
251
+ example: 20
252
+ })
253
+ }).openapi({ description: "Request to list knowledge entries with filters and pagination" });
254
+ /**
255
+ * List knowledge request schema (REST) - without websiteSlug (derived from API key)
256
+ */
257
+ const listKnowledgeRestRequestSchema = z.object({
258
+ type: knowledgeTypeSchema.optional().openapi({
259
+ description: "Filter by knowledge type",
260
+ example: "url"
261
+ }),
262
+ aiAgentId: z.union([
263
+ z.ulid(),
264
+ z.literal("null"),
265
+ z.literal("")
266
+ ]).optional().openapi({
267
+ description: "Filter by AI agent ID. Pass a valid ULID to filter by agent, pass \"null\" or empty string to filter for shared/website-scoped entries only, or omit entirely to return all entries.",
268
+ example: "01JG000000000000000000002"
269
+ }),
270
+ page: z.coerce.number().int().positive().default(1).openapi({
271
+ description: "Page number (1-indexed)",
272
+ example: 1
273
+ }),
274
+ limit: z.coerce.number().int().positive().max(100).default(20).openapi({
275
+ description: "Items per page (max 100)",
276
+ example: 20
277
+ })
278
+ }).openapi({ description: "Request to list knowledge entries with filters and pagination (REST)" });
279
+ /**
280
+ * List knowledge response schema
281
+ */
282
+ const listKnowledgeResponseSchema = z.object({
283
+ items: z.array(knowledgeResponseSchema).openapi({ description: "Array of knowledge entries" }),
284
+ pagination: z.object({
285
+ page: z.number().int().positive().openapi({
286
+ description: "Current page number",
287
+ example: 1
288
+ }),
289
+ limit: z.number().int().positive().openapi({
290
+ description: "Items per page",
291
+ example: 20
292
+ }),
293
+ total: z.number().int().nonnegative().openapi({
294
+ description: "Total number of items",
295
+ example: 100
296
+ }),
297
+ hasMore: z.boolean().openapi({
298
+ description: "Whether there are more items available",
299
+ example: true
300
+ })
301
+ }).openapi({ description: "Pagination metadata" })
302
+ }).openapi({ description: "Paginated list of knowledge entries" });
303
+ /**
304
+ * Get knowledge request schema (TRPC)
305
+ */
306
+ const getKnowledgeRequestSchema = z.object({
307
+ websiteSlug: z.string().openapi({
308
+ description: "The website slug",
309
+ example: "my-website"
310
+ }),
311
+ id: z.ulid().openapi({
312
+ description: "Knowledge entry ID",
313
+ example: "01JG00000000000000000000A"
314
+ })
315
+ }).openapi({ description: "Request to get a single knowledge entry" });
316
+ /**
317
+ * Create knowledge request schema (TRPC) - extends create input with websiteSlug
318
+ */
319
+ const createKnowledgeRequestSchema = z.object({
320
+ websiteSlug: z.string().openapi({
321
+ description: "The website slug to create knowledge for",
322
+ example: "my-website"
323
+ }),
324
+ aiAgentId: z.ulid().nullable().optional().openapi({
325
+ description: "Optional AI agent ID; null/omit for shared at website scope",
326
+ example: "01JG000000000000000000002"
327
+ }),
328
+ type: knowledgeTypeSchema,
329
+ sourceUrl: z.url().nullable().optional().openapi({
330
+ description: "Origin URL for this entry",
331
+ example: "https://docs.cossistant.com/getting-started"
332
+ }),
333
+ sourceTitle: z.string().nullable().optional().openapi({
334
+ description: "Readable title",
335
+ example: "Getting started with the Cossistant dashboard"
336
+ }),
337
+ origin: z.string().min(1).openapi({
338
+ description: "How this entry was created (crawl, manual, agent, etc.)",
339
+ example: "manual"
340
+ }),
341
+ payload: z.union([
342
+ urlKnowledgePayloadSchema,
343
+ faqKnowledgePayloadSchema,
344
+ articleKnowledgePayloadSchema
345
+ ]),
346
+ metadata: metadataSchema
347
+ }).openapi({ description: "Request to create a new knowledge entry" });
348
+ /**
349
+ * Create knowledge request schema (REST) - without websiteSlug
350
+ */
351
+ const createKnowledgeRestRequestSchema = z.object({
352
+ aiAgentId: z.ulid().nullable().optional().openapi({
353
+ description: "Optional AI agent ID; null/omit for shared at website scope",
354
+ example: "01JG000000000000000000002"
355
+ }),
356
+ type: knowledgeTypeSchema,
357
+ sourceUrl: z.url().nullable().optional().openapi({
358
+ description: "Origin URL for this entry",
359
+ example: "https://docs.cossistant.com/getting-started"
360
+ }),
361
+ sourceTitle: z.string().nullable().optional().openapi({
362
+ description: "Readable title",
363
+ example: "Getting started with the Cossistant dashboard"
364
+ }),
365
+ origin: z.string().min(1).openapi({
366
+ description: "How this entry was created (crawl, manual, agent, etc.)",
367
+ example: "manual"
368
+ }),
369
+ payload: z.union([
370
+ urlKnowledgePayloadSchema,
371
+ faqKnowledgePayloadSchema,
372
+ articleKnowledgePayloadSchema
373
+ ]),
374
+ metadata: metadataSchema
375
+ }).openapi({ description: "Request to create a new knowledge entry (REST)" });
376
+ /**
377
+ * Update knowledge request schema (TRPC)
378
+ */
379
+ const updateKnowledgeRequestSchema = z.object({
380
+ websiteSlug: z.string().openapi({
381
+ description: "The website slug",
382
+ example: "my-website"
383
+ }),
384
+ id: z.ulid().openapi({
385
+ description: "Knowledge entry ID to update",
386
+ example: "01JG00000000000000000000A"
387
+ }),
388
+ aiAgentId: z.ulid().nullable().optional().openapi({
389
+ description: "Update AI agent association",
390
+ example: "01JG000000000000000000002"
391
+ }),
392
+ sourceUrl: z.url().nullable().optional().openapi({
393
+ description: "Update origin URL",
394
+ example: "https://docs.cossistant.com/getting-started"
395
+ }),
396
+ sourceTitle: z.string().nullable().optional().openapi({
397
+ description: "Update readable title",
398
+ example: "Getting started with the Cossistant dashboard"
399
+ }),
400
+ payload: z.union([
401
+ urlKnowledgePayloadSchema,
402
+ faqKnowledgePayloadSchema,
403
+ articleKnowledgePayloadSchema
404
+ ]).optional(),
405
+ metadata: metadataSchema
406
+ }).openapi({ description: "Request to update an existing knowledge entry" });
407
+ /**
408
+ * Update knowledge request schema (REST) - without websiteSlug
409
+ */
410
+ const updateKnowledgeRestRequestSchema = z.object({
411
+ aiAgentId: z.ulid().nullable().optional().openapi({
412
+ description: "Update AI agent association",
413
+ example: "01JG000000000000000000002"
414
+ }),
415
+ sourceUrl: z.url().nullable().optional().openapi({
416
+ description: "Update origin URL",
417
+ example: "https://docs.cossistant.com/getting-started"
418
+ }),
419
+ sourceTitle: z.string().nullable().optional().openapi({
420
+ description: "Update readable title",
421
+ example: "Getting started with the Cossistant dashboard"
422
+ }),
423
+ payload: z.union([
424
+ urlKnowledgePayloadSchema,
425
+ faqKnowledgePayloadSchema,
426
+ articleKnowledgePayloadSchema
427
+ ]).optional(),
428
+ metadata: metadataSchema
429
+ }).openapi({ description: "Request to update an existing knowledge entry (REST)" });
430
+ /**
431
+ * Delete knowledge request schema (TRPC)
432
+ */
433
+ const deleteKnowledgeRequestSchema = z.object({
434
+ websiteSlug: z.string().openapi({
435
+ description: "The website slug",
436
+ example: "my-website"
437
+ }),
438
+ id: z.ulid().openapi({
439
+ description: "Knowledge entry ID to delete",
440
+ example: "01JG00000000000000000000A"
441
+ })
442
+ }).openapi({ description: "Request to delete a knowledge entry" });
443
+
444
+ //#endregion
445
+ export { articleKnowledgePayloadSchema, createKnowledgeRequestSchema, createKnowledgeRestRequestSchema, deleteKnowledgeRequestSchema, faqKnowledgePayloadSchema, getKnowledgeRequestSchema, knowledgeCreateSchema, knowledgeResponseSchema, knowledgeSchema, knowledgeTypeSchema, listKnowledgeRequestSchema, listKnowledgeResponseSchema, listKnowledgeRestRequestSchema, updateKnowledgeRequestSchema, updateKnowledgeRestRequestSchema, urlKnowledgePayloadSchema };
446
+ //# sourceMappingURL=knowledge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge.js","names":[],"sources":["../../src/api/knowledge.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nexport const knowledgeTypeSchema = z.enum([\"url\", \"faq\", \"article\"]).openapi({\n\tdescription: \"Knowledge entry type\",\n\texample: \"url\",\n});\n\nconst headingSchema = z.object({\n\tlevel: z.number().int().min(1).max(6).openapi({\n\t\tdescription: \"Heading level (1-6)\",\n\t\texample: 2,\n\t}),\n\ttext: z.string().min(1).openapi({\n\t\tdescription: \"Heading text content\",\n\t\texample: \"Getting started\",\n\t}),\n});\n\nconst linkSchema = z.url().openapi({\n\tdescription: \"Absolute URL discovered in the document\",\n\texample: \"https://docs.cossistant.com/guide\",\n});\n\nconst imageSchema = z.object({\n\tsrc: z.url().openapi({\n\t\tdescription: \"Image URL captured during scraping\",\n\t\texample: \"https://cdn.cossistant.com/assets/hero.png\",\n\t}),\n\talt: z.string().nullable().openapi({\n\t\tdescription: \"Optional alt text attached to the image\",\n\t\texample: \"Agent dashboard hero illustration\",\n\t}),\n});\n\nexport const urlKnowledgePayloadSchema = z\n\t.object({\n\t\tmarkdown: z.string().min(1).openapi({\n\t\t\tdescription: \"Scraped markdown body\",\n\t\t\texample: \"# Welcome to the Help Center\",\n\t\t}),\n\t\theadings: z.array(headingSchema).default([]),\n\t\tlinks: z.array(linkSchema).default([]),\n\t\timages: z.array(imageSchema).default([]),\n\t\testimatedTokens: z.number().int().nonnegative().optional().openapi({\n\t\t\tdescription: \"Heuristic token count to assist chunking\",\n\t\t\texample: 2048,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Structured payload for raw page content\",\n\t});\n\nexport const faqKnowledgePayloadSchema = z\n\t.object({\n\t\tquestion: z.string().min(1).openapi({\n\t\t\tdescription: \"FAQ question\",\n\t\t\texample: \"How do I reset my password?\",\n\t\t}),\n\t\tanswer: z.string().min(1).openapi({\n\t\t\tdescription: \"Answer shown to customers\",\n\t\t\texample: \"Go to Settings → Security and click Reset password.\",\n\t\t}),\n\t\tcategories: z.array(z.string()).default([]),\n\t\trelatedQuestions: z.array(z.string()).default([]),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload describing a single FAQ entry\",\n\t});\n\nexport const articleKnowledgePayloadSchema = z\n\t.object({\n\t\ttitle: z.string().min(1).openapi({\n\t\t\tdescription: \"Article title\",\n\t\t\texample: \"Billing and invoicing overview\",\n\t\t}),\n\t\tsummary: z.string().nullable().optional().openapi({\n\t\t\tdescription: \"Short synopsis or excerpt\",\n\t\t\texample: \"Understand how billing cycles and invoices are generated.\",\n\t\t}),\n\t\tmarkdown: z.string().min(1).openapi({\n\t\t\tdescription: \"Article body in markdown format\",\n\t\t\texample: \"## Billing cycles\\n\\nCossistant bills you monthly...\",\n\t\t}),\n\t\tkeywords: z.array(z.string()).default([]),\n\t\theroImage: imageSchema.optional(),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload describing a full article or help doc\",\n\t});\n\nconst metadataSchema = z\n\t.record(z.string(), z.unknown())\n\t.optional()\n\t.openapi({\n\t\tdescription: \"Arbitrary metadata such as locale or crawl depth\",\n\t\texample: {\n\t\t\tlocale: \"en-US\",\n\t\t\tsource: \"firecrawl\",\n\t\t},\n\t});\n\nconst baseKnowledgeFields = {\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"Owning organization identifier\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\twebsiteId: z.ulid().openapi({\n\t\tdescription: \"Website identifier\",\n\t\texample: \"01JG000000000000000000001\",\n\t}),\n\taiAgentId: z.ulid().nullable().optional().openapi({\n\t\tdescription:\n\t\t\t\"Optional AI agent identifier; null/omitted means the entry is shared at the website scope.\",\n\t\texample: \"01JG000000000000000000002\",\n\t}),\n\tsourceUrl: z.url().nullable().openapi({\n\t\tdescription:\n\t\t\t\"Origin URL for this entry (required for url knowledge; optional for others)\",\n\t\texample: \"https://docs.cossistant.com/getting-started\",\n\t}),\n\tsourceTitle: z.string().nullable().openapi({\n\t\tdescription: \"Readable title captured during scraping\",\n\t\texample: \"Getting started with the Cossistant dashboard\",\n\t}),\n\torigin: z.string().min(1).openapi({\n\t\tdescription:\n\t\t\t\"Describes how this entry was created (crawl, manual, agent, etc.)\",\n\t\texample: \"crawl\",\n\t}),\n\tcreatedBy: z.string().min(1).openapi({\n\t\tdescription:\n\t\t\t\"Identifier of the actor (user, agent, system) that created this entry\",\n\t\texample: \"user_01JG00000000000000000000\",\n\t}),\n\tcontentHash: z.string().min(1).openapi({\n\t\tdescription: \"Deterministic hash of the payload for deduping\",\n\t\texample: \"5d41402abc4b2a76b9719d911017c592\",\n\t}),\n\tmetadata: metadataSchema,\n};\n\nconst urlKnowledgeSchema = z\n\t.object(baseKnowledgeFields)\n\t.extend({\n\t\ttype: z.literal(\"url\"),\n\t\tsourceUrl: z.url(),\n\t\tpayload: urlKnowledgePayloadSchema,\n\t})\n\t.openapi({ description: \"URL knowledge entry\" });\n\nconst faqKnowledgeSchema = z\n\t.object(baseKnowledgeFields)\n\t.extend({\n\t\ttype: z.literal(\"faq\"),\n\t\tpayload: faqKnowledgePayloadSchema,\n\t})\n\t.openapi({ description: \"FAQ knowledge entry\" });\n\nconst articleKnowledgeSchema = z\n\t.object(baseKnowledgeFields)\n\t.extend({\n\t\ttype: z.literal(\"article\"),\n\t\tsourceUrl: z.url().nullable(),\n\t\tpayload: articleKnowledgePayloadSchema,\n\t})\n\t.openapi({ description: \"Article knowledge entry\" });\n\nexport const knowledgeCreateSchema = z.discriminatedUnion(\"type\", [\n\turlKnowledgeSchema,\n\tfaqKnowledgeSchema,\n\tarticleKnowledgeSchema,\n]);\n\nconst knowledgeAuditFieldsSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"Knowledge entry identifier\",\n\t\texample: \"01JG00000000000000000000A\",\n\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"Creation timestamp\",\n\t\texample: \"2024-06-10T12:00:00.000Z\",\n\t}),\n\tupdatedAt: z.string().openapi({\n\t\tdescription: \"Last update timestamp\",\n\t\texample: \"2024-06-11T08:00:00.000Z\",\n\t}),\n\tdeletedAt: z.string().nullable().openapi({\n\t\tdescription: \"Soft delete timestamp\",\n\t\texample: null,\n\t}),\n});\n\nexport const knowledgeSchema = knowledgeCreateSchema\n\t// Intersection preserves the discriminated union while adding persisted fields.\n\t.and(knowledgeAuditFieldsSchema)\n\t.openapi({\n\t\tdescription: \"Persisted knowledge entry\",\n\t});\n\nexport type KnowledgeType = z.infer<typeof knowledgeTypeSchema>;\nexport type UrlKnowledgePayload = z.infer<typeof urlKnowledgePayloadSchema>;\nexport type FaqKnowledgePayload = z.infer<typeof faqKnowledgePayloadSchema>;\nexport type ArticleKnowledgePayload = z.infer<\n\ttypeof articleKnowledgePayloadSchema\n>;\nexport type KnowledgeCreateInput = z.infer<typeof knowledgeCreateSchema>;\nexport type Knowledge = z.infer<typeof knowledgeSchema>;\n\n// ============================================================================\n// API Request/Response Schemas\n// ============================================================================\n\n/**\n * Knowledge response schema - used for single item responses\n */\nexport const knowledgeResponseSchema = z\n\t.object({\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry identifier\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\torganizationId: z.ulid().openapi({\n\t\t\tdescription: \"Owning organization identifier\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\twebsiteId: z.ulid().openapi({\n\t\t\tdescription: \"Website identifier\",\n\t\t\texample: \"01JG000000000000000000001\",\n\t\t}),\n\t\taiAgentId: z.ulid().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Optional AI agent identifier; null means shared at website scope\",\n\t\t\texample: \"01JG000000000000000000002\",\n\t\t}),\n\t\tlinkSourceId: z.ulid().nullable().openapi({\n\t\t\tdescription: \"Reference to the link source that created this entry\",\n\t\t\texample: \"01JG000000000000000000003\",\n\t\t}),\n\t\ttype: knowledgeTypeSchema,\n\t\tsourceUrl: z.url().nullable().openapi({\n\t\t\tdescription: \"Origin URL for this entry\",\n\t\t\texample: \"https://docs.cossistant.com/getting-started\",\n\t\t}),\n\t\tsourceTitle: z.string().nullable().openapi({\n\t\t\tdescription: \"Readable title captured during scraping\",\n\t\t\texample: \"Getting started with the Cossistant dashboard\",\n\t\t}),\n\t\torigin: z.string().openapi({\n\t\t\tdescription: \"How this entry was created (crawl, manual, agent, etc.)\",\n\t\t\texample: \"crawl\",\n\t\t}),\n\t\tcreatedBy: z.string().openapi({\n\t\t\tdescription: \"Identifier of the actor that created this entry\",\n\t\t\texample: \"user_01JG00000000000000000000\",\n\t\t}),\n\t\tcontentHash: z.string().openapi({\n\t\t\tdescription: \"Deterministic hash of the payload for deduping\",\n\t\t\texample: \"5d41402abc4b2a76b9719d911017c592\",\n\t\t}),\n\t\tpayload: z.union([\n\t\t\turlKnowledgePayloadSchema,\n\t\t\tfaqKnowledgePayloadSchema,\n\t\t\tarticleKnowledgePayloadSchema,\n\t\t]),\n\t\tmetadata: metadataSchema,\n\t\tisIncluded: z.boolean().openapi({\n\t\t\tdescription: \"Whether this entry is included in training\",\n\t\t\texample: true,\n\t\t}),\n\t\tsizeBytes: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Size of this entry in bytes\",\n\t\t\texample: 4096,\n\t\t}),\n\t\tcreatedAt: z.string().openapi({\n\t\t\tdescription: \"Creation timestamp\",\n\t\t\texample: \"2024-06-10T12:00:00.000Z\",\n\t\t}),\n\t\tupdatedAt: z.string().openapi({\n\t\t\tdescription: \"Last update timestamp\",\n\t\t\texample: \"2024-06-11T08:00:00.000Z\",\n\t\t}),\n\t\tdeletedAt: z.string().nullable().openapi({\n\t\t\tdescription: \"Soft delete timestamp\",\n\t\t\texample: null,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Knowledge entry response\",\n\t});\n\nexport type KnowledgeResponse = z.infer<typeof knowledgeResponseSchema>;\n\n/**\n * List knowledge request schema (TRPC) - with websiteSlug\n */\nexport const listKnowledgeRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug to list knowledge for\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\ttype: knowledgeTypeSchema.optional().openapi({\n\t\t\tdescription: \"Filter by knowledge type\",\n\t\t\texample: \"url\",\n\t\t}),\n\t\taiAgentId: z.ulid().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Filter by AI agent ID; null for shared entries; omit for all\",\n\t\t\texample: \"01JG000000000000000000002\",\n\t\t}),\n\t\tpage: z.coerce.number().int().positive().default(1).openapi({\n\t\t\tdescription: \"Page number (1-indexed)\",\n\t\t\texample: 1,\n\t\t}),\n\t\tlimit: z.coerce.number().int().positive().max(100).default(20).openapi({\n\t\t\tdescription: \"Items per page (max 100)\",\n\t\t\texample: 20,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Request to list knowledge entries with filters and pagination\",\n\t});\n\nexport type ListKnowledgeRequest = z.infer<typeof listKnowledgeRequestSchema>;\n\n/**\n * List knowledge request schema (REST) - without websiteSlug (derived from API key)\n */\nexport const listKnowledgeRestRequestSchema = z\n\t.object({\n\t\ttype: knowledgeTypeSchema.optional().openapi({\n\t\t\tdescription: \"Filter by knowledge type\",\n\t\t\texample: \"url\",\n\t\t}),\n\t\taiAgentId: z\n\t\t\t.union([z.ulid(), z.literal(\"null\"), z.literal(\"\")])\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t'Filter by AI agent ID. Pass a valid ULID to filter by agent, pass \"null\" or empty string to filter for shared/website-scoped entries only, or omit entirely to return all entries.',\n\t\t\t\texample: \"01JG000000000000000000002\",\n\t\t\t}),\n\t\tpage: z.coerce.number().int().positive().default(1).openapi({\n\t\t\tdescription: \"Page number (1-indexed)\",\n\t\t\texample: 1,\n\t\t}),\n\t\tlimit: z.coerce.number().int().positive().max(100).default(20).openapi({\n\t\t\tdescription: \"Items per page (max 100)\",\n\t\t\texample: 20,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Request to list knowledge entries with filters and pagination (REST)\",\n\t});\n\nexport type ListKnowledgeRestRequest = z.infer<\n\ttypeof listKnowledgeRestRequestSchema\n>;\n\n/**\n * List knowledge response schema\n */\nexport const listKnowledgeResponseSchema = z\n\t.object({\n\t\titems: z.array(knowledgeResponseSchema).openapi({\n\t\t\tdescription: \"Array of knowledge entries\",\n\t\t}),\n\t\tpagination: z\n\t\t\t.object({\n\t\t\t\tpage: z.number().int().positive().openapi({\n\t\t\t\t\tdescription: \"Current page number\",\n\t\t\t\t\texample: 1,\n\t\t\t\t}),\n\t\t\t\tlimit: z.number().int().positive().openapi({\n\t\t\t\t\tdescription: \"Items per page\",\n\t\t\t\t\texample: 20,\n\t\t\t\t}),\n\t\t\t\ttotal: z.number().int().nonnegative().openapi({\n\t\t\t\t\tdescription: \"Total number of items\",\n\t\t\t\t\texample: 100,\n\t\t\t\t}),\n\t\t\t\thasMore: z.boolean().openapi({\n\t\t\t\t\tdescription: \"Whether there are more items available\",\n\t\t\t\t\texample: true,\n\t\t\t\t}),\n\t\t\t})\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Pagination metadata\",\n\t\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Paginated list of knowledge entries\",\n\t});\n\nexport type ListKnowledgeResponse = z.infer<typeof listKnowledgeResponseSchema>;\n\n/**\n * Get knowledge request schema (TRPC)\n */\nexport const getKnowledgeRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to get a single knowledge entry\",\n\t});\n\nexport type GetKnowledgeRequest = z.infer<typeof getKnowledgeRequestSchema>;\n\n/**\n * Create knowledge request schema (TRPC) - extends create input with websiteSlug\n */\nexport const createKnowledgeRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug to create knowledge for\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\taiAgentId: z.ulid().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Optional AI agent ID; null/omit for shared at website scope\",\n\t\t\texample: \"01JG000000000000000000002\",\n\t\t}),\n\t\ttype: knowledgeTypeSchema,\n\t\tsourceUrl: z.url().nullable().optional().openapi({\n\t\t\tdescription: \"Origin URL for this entry\",\n\t\t\texample: \"https://docs.cossistant.com/getting-started\",\n\t\t}),\n\t\tsourceTitle: z.string().nullable().optional().openapi({\n\t\t\tdescription: \"Readable title\",\n\t\t\texample: \"Getting started with the Cossistant dashboard\",\n\t\t}),\n\t\torigin: z.string().min(1).openapi({\n\t\t\tdescription: \"How this entry was created (crawl, manual, agent, etc.)\",\n\t\t\texample: \"manual\",\n\t\t}),\n\t\tpayload: z.union([\n\t\t\turlKnowledgePayloadSchema,\n\t\t\tfaqKnowledgePayloadSchema,\n\t\t\tarticleKnowledgePayloadSchema,\n\t\t]),\n\t\tmetadata: metadataSchema,\n\t})\n\t.openapi({\n\t\tdescription: \"Request to create a new knowledge entry\",\n\t});\n\nexport type CreateKnowledgeRequest = z.infer<\n\ttypeof createKnowledgeRequestSchema\n>;\n\n/**\n * Create knowledge request schema (REST) - without websiteSlug\n */\nexport const createKnowledgeRestRequestSchema = z\n\t.object({\n\t\taiAgentId: z.ulid().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Optional AI agent ID; null/omit for shared at website scope\",\n\t\t\texample: \"01JG000000000000000000002\",\n\t\t}),\n\t\ttype: knowledgeTypeSchema,\n\t\tsourceUrl: z.url().nullable().optional().openapi({\n\t\t\tdescription: \"Origin URL for this entry\",\n\t\t\texample: \"https://docs.cossistant.com/getting-started\",\n\t\t}),\n\t\tsourceTitle: z.string().nullable().optional().openapi({\n\t\t\tdescription: \"Readable title\",\n\t\t\texample: \"Getting started with the Cossistant dashboard\",\n\t\t}),\n\t\torigin: z.string().min(1).openapi({\n\t\t\tdescription: \"How this entry was created (crawl, manual, agent, etc.)\",\n\t\t\texample: \"manual\",\n\t\t}),\n\t\tpayload: z.union([\n\t\t\turlKnowledgePayloadSchema,\n\t\t\tfaqKnowledgePayloadSchema,\n\t\t\tarticleKnowledgePayloadSchema,\n\t\t]),\n\t\tmetadata: metadataSchema,\n\t})\n\t.openapi({\n\t\tdescription: \"Request to create a new knowledge entry (REST)\",\n\t});\n\nexport type CreateKnowledgeRestRequest = z.infer<\n\ttypeof createKnowledgeRestRequestSchema\n>;\n\n/**\n * Update knowledge request schema (TRPC)\n */\nexport const updateKnowledgeRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to update\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\taiAgentId: z.ulid().nullable().optional().openapi({\n\t\t\tdescription: \"Update AI agent association\",\n\t\t\texample: \"01JG000000000000000000002\",\n\t\t}),\n\t\tsourceUrl: z.url().nullable().optional().openapi({\n\t\t\tdescription: \"Update origin URL\",\n\t\t\texample: \"https://docs.cossistant.com/getting-started\",\n\t\t}),\n\t\tsourceTitle: z.string().nullable().optional().openapi({\n\t\t\tdescription: \"Update readable title\",\n\t\t\texample: \"Getting started with the Cossistant dashboard\",\n\t\t}),\n\t\tpayload: z\n\t\t\t.union([\n\t\t\t\turlKnowledgePayloadSchema,\n\t\t\t\tfaqKnowledgePayloadSchema,\n\t\t\t\tarticleKnowledgePayloadSchema,\n\t\t\t])\n\t\t\t.optional(),\n\t\tmetadata: metadataSchema,\n\t})\n\t.openapi({\n\t\tdescription: \"Request to update an existing knowledge entry\",\n\t});\n\nexport type UpdateKnowledgeRequest = z.infer<\n\ttypeof updateKnowledgeRequestSchema\n>;\n\n/**\n * Update knowledge request schema (REST) - without websiteSlug\n */\nexport const updateKnowledgeRestRequestSchema = z\n\t.object({\n\t\taiAgentId: z.ulid().nullable().optional().openapi({\n\t\t\tdescription: \"Update AI agent association\",\n\t\t\texample: \"01JG000000000000000000002\",\n\t\t}),\n\t\tsourceUrl: z.url().nullable().optional().openapi({\n\t\t\tdescription: \"Update origin URL\",\n\t\t\texample: \"https://docs.cossistant.com/getting-started\",\n\t\t}),\n\t\tsourceTitle: z.string().nullable().optional().openapi({\n\t\t\tdescription: \"Update readable title\",\n\t\t\texample: \"Getting started with the Cossistant dashboard\",\n\t\t}),\n\t\tpayload: z\n\t\t\t.union([\n\t\t\t\turlKnowledgePayloadSchema,\n\t\t\t\tfaqKnowledgePayloadSchema,\n\t\t\t\tarticleKnowledgePayloadSchema,\n\t\t\t])\n\t\t\t.optional(),\n\t\tmetadata: metadataSchema,\n\t})\n\t.openapi({\n\t\tdescription: \"Request to update an existing knowledge entry (REST)\",\n\t});\n\nexport type UpdateKnowledgeRestRequest = z.infer<\n\ttypeof updateKnowledgeRestRequestSchema\n>;\n\n/**\n * Delete knowledge request schema (TRPC)\n */\nexport const deleteKnowledgeRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to delete\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to delete a knowledge entry\",\n\t});\n"],"mappings":";;;AAEA,MAAa,sBAAsB,EAAE,KAAK;CAAC;CAAO;CAAO;CAAU,CAAC,CAAC,QAAQ;CAC5E,aAAa;CACb,SAAS;CACT,CAAC;AAEF,MAAM,gBAAgB,EAAE,OAAO;CAC9B,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ;EAC7C,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC;AAEF,MAAM,aAAa,EAAE,KAAK,CAAC,QAAQ;CAClC,aAAa;CACb,SAAS;C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