@cossistant/types 0.0.29 → 0.0.31
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.
- package/api/ai-agent.d.ts +28 -40
- package/api/ai-agent.d.ts.map +1 -1
- package/api/ai-agent.js +17 -25
- package/api/ai-agent.js.map +1 -1
- package/api/common.d.ts.map +1 -1
- package/api/contact.d.ts.map +1 -1
- package/api/conversation.d.ts +468 -71
- package/api/conversation.d.ts.map +1 -1
- package/api/conversation.js +13 -1
- package/api/conversation.js.map +1 -1
- package/api/index.d.ts +4 -4
- package/api/index.js +4 -4
- package/api/knowledge.d.ts +57 -25
- package/api/knowledge.d.ts.map +1 -1
- package/api/knowledge.js +61 -11
- package/api/knowledge.js.map +1 -1
- package/api/link-source.d.ts +6 -4
- package/api/link-source.d.ts.map +1 -1
- package/api/link-source.js +8 -0
- package/api/link-source.js.map +1 -1
- package/api/timeline-item.d.ts +574 -85
- package/api/timeline-item.d.ts.map +1 -1
- package/api/timeline-item.js +68 -20
- package/api/timeline-item.js.map +1 -1
- package/index.d.ts +6 -6
- package/index.js +6 -6
- package/package.json +1 -1
- package/realtime-events.d.ts +445 -43
- package/realtime-events.d.ts.map +1 -1
- package/realtime-events.js +116 -1
- package/realtime-events.js.map +1 -1
- package/schemas.d.ts +92 -14
- package/schemas.d.ts.map +1 -1
- package/schemas.js +2 -0
- package/schemas.js.map +1 -1
- package/trpc/conversation.d.ts +406 -57
- package/trpc/conversation.d.ts.map +1 -1
- package/trpc/conversation.js +32 -1
- package/trpc/conversation.js.map +1 -1
- package/trpc/visitor.d.ts +2 -0
- package/trpc/visitor.d.ts.map +1 -1
package/api/knowledge.js.map
CHANGED
|
@@ -1 +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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AAU,CAAC,QAAQ;EACrD,aAAa;EACb,SAAS;EACT,CAAC;CACF,SAAS,EACP,MAAM;EACN;EACA;EACA;EACA,CAAC,CACD,UAAU;CACZ,UAAU;CACV,CAAC,CACD,QAAQ,EACR,aAAa,wDACb,CAAC;;;;AASH,MAAa,+BAA+B,EAC1C,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,uCACb,CAAC"}
|
|
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.nullish()\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\t// Note: We use .passthrough() to prevent Zod's union validation from stripping\n\t\t// fields when the first matching schema doesn't include all fields from other schemas.\n\t\tpayload: z.union([\n\t\t\turlKnowledgePayloadSchema.passthrough(),\n\t\t\tfaqKnowledgePayloadSchema.passthrough(),\n\t\t\tarticleKnowledgePayloadSchema.passthrough(),\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 *\n * Note: We use .passthrough() on payload schemas to prevent Zod's union validation\n * from stripping fields when the first matching schema (urlKnowledgePayloadSchema)\n * doesn't include all fields from other schemas (like articleKnowledgePayloadSchema's title).\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.passthrough(),\n\t\t\t\tfaqKnowledgePayloadSchema.passthrough(),\n\t\t\t\tarticleKnowledgePayloadSchema.passthrough(),\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 *\n * Note: We use .passthrough() on payload schemas to prevent Zod's union validation\n * from stripping fields. See updateKnowledgeRequestSchema for details.\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.passthrough(),\n\t\t\t\tfaqKnowledgePayloadSchema.passthrough(),\n\t\t\t\tarticleKnowledgePayloadSchema.passthrough(),\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\nexport type DeleteKnowledgeRequest = z.infer<\n\ttypeof deleteKnowledgeRequestSchema\n>;\n\n/**\n * Toggle knowledge entry included request schema (TRPC)\n * Named differently from link-source's toggleKnowledgeIncludedRequestSchema to avoid export conflict\n */\nexport const toggleKnowledgeEntryIncludedRequestSchema = 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\tisIncluded: z.boolean().openapi({\n\t\t\tdescription: \"Whether this entry should be included in training\",\n\t\t\texample: true,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to toggle knowledge entry inclusion in training\",\n\t});\n\nexport type ToggleKnowledgeEntryIncludedRequest = z.infer<\n\ttypeof toggleKnowledgeEntryIncludedRequestSchema\n>;\n\n/**\n * Upload knowledge file request schema (TRPC)\n */\nexport const uploadKnowledgeFileRequestSchema = 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\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\tfileName: z.string().min(1).openapi({\n\t\t\tdescription: \"Original file name\",\n\t\t\texample: \"getting-started.md\",\n\t\t}),\n\t\tfileContent: z.string().min(1).openapi({\n\t\t\tdescription: \"Raw file content\",\n\t\t\texample: \"# Getting Started\\n\\nWelcome to our documentation...\",\n\t\t}),\n\t\tfileExtension: z.enum([\"md\", \"txt\"]).openapi({\n\t\t\tdescription: \"File extension\",\n\t\t\texample: \"md\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to upload a file as a knowledge entry\",\n\t});\n\nexport type UploadKnowledgeFileRequest = z.infer<\n\ttypeof uploadKnowledgeFileRequestSchema\n>;\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;CACT,CAAC;AAEF,MAAM,cAAc,EAAE,OAAO;CAC5B,KAAK,EAAE,KAAK,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EAClC,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC;AAEF,MAAa,4BAA4B,EACvC,OAAO;CACP,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QAAQ,EACR,aAAa,wDACb,CAAC;;;;AASH,MAAa,+BAA+B,EAC1C,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,uCACb,CAAC;;;;;AAUH,MAAa,4CAA4C,EACvD,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,YAAY,EAAE,SAAS,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,2DACb,CAAC;;;;AASH,MAAa,mCAAmC,EAC9C,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ;EACjD,aACC;EACD,SAAS;EACT,CAAC;CACF,UAAU,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ;EACnC,aAAa;EACb,SAAS;EACT,CAAC;CACF,aAAa,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ;EACtC,aAAa;EACb,SAAS;EACT,CAAC;CACF,eAAe,EAAE,KAAK,CAAC,MAAM,MAAM,CAAC,CAAC,QAAQ;EAC5C,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,iDACb,CAAC"}
|
package/api/link-source.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { z } from "@hono/zod-openapi";
|
|
|
3
3
|
//#region src/api/link-source.d.ts
|
|
4
4
|
declare const linkSourceStatusSchema: z.ZodEnum<{
|
|
5
5
|
pending: "pending";
|
|
6
|
-
mapping: "mapping";
|
|
7
6
|
crawling: "crawling";
|
|
8
7
|
completed: "completed";
|
|
9
8
|
failed: "failed";
|
|
9
|
+
mapping: "mapping";
|
|
10
10
|
}>;
|
|
11
11
|
/**
|
|
12
12
|
* Link source response schema - used for single item responses
|
|
@@ -20,10 +20,10 @@ declare const linkSourceResponseSchema: z.ZodObject<{
|
|
|
20
20
|
url: z.ZodURL;
|
|
21
21
|
status: z.ZodEnum<{
|
|
22
22
|
pending: "pending";
|
|
23
|
-
mapping: "mapping";
|
|
24
23
|
crawling: "crawling";
|
|
25
24
|
completed: "completed";
|
|
26
25
|
failed: "failed";
|
|
26
|
+
mapping: "mapping";
|
|
27
27
|
}>;
|
|
28
28
|
firecrawlJobId: z.ZodNullable<z.ZodString>;
|
|
29
29
|
depth: z.ZodNumber;
|
|
@@ -49,10 +49,10 @@ declare const listLinkSourcesRequestSchema: z.ZodObject<{
|
|
|
49
49
|
aiAgentId: z.ZodOptional<z.ZodNullable<z.ZodULID>>;
|
|
50
50
|
status: z.ZodOptional<z.ZodEnum<{
|
|
51
51
|
pending: "pending";
|
|
52
|
-
mapping: "mapping";
|
|
53
52
|
crawling: "crawling";
|
|
54
53
|
completed: "completed";
|
|
55
54
|
failed: "failed";
|
|
55
|
+
mapping: "mapping";
|
|
56
56
|
}>>;
|
|
57
57
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
58
58
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -71,10 +71,10 @@ declare const listLinkSourcesResponseSchema: z.ZodObject<{
|
|
|
71
71
|
url: z.ZodURL;
|
|
72
72
|
status: z.ZodEnum<{
|
|
73
73
|
pending: "pending";
|
|
74
|
-
mapping: "mapping";
|
|
75
74
|
crawling: "crawling";
|
|
76
75
|
completed: "completed";
|
|
77
76
|
failed: "failed";
|
|
77
|
+
mapping: "mapping";
|
|
78
78
|
}>;
|
|
79
79
|
firecrawlJobId: z.ZodNullable<z.ZodString>;
|
|
80
80
|
depth: z.ZodNumber;
|
|
@@ -164,6 +164,8 @@ declare const trainingStatsResponseSchema: z.ZodObject<{
|
|
|
164
164
|
planLimitLinks: z.ZodNullable<z.ZodNumber>;
|
|
165
165
|
crawlPagesPerSourceLimit: z.ZodNullable<z.ZodNumber>;
|
|
166
166
|
totalPagesLimit: z.ZodNullable<z.ZodNumber>;
|
|
167
|
+
planLimitFaqs: z.ZodNullable<z.ZodNumber>;
|
|
168
|
+
planLimitFiles: z.ZodNullable<z.ZodNumber>;
|
|
167
169
|
}, z.core.$strip>;
|
|
168
170
|
type TrainingStatsResponse = z.infer<typeof trainingStatsResponseSchema>;
|
|
169
171
|
/**
|
package/api/link-source.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-source.d.ts","names":[],"sources":["../../src/api/link-source.ts"],"sourcesContent":[],"mappings":";;;cAEa,wBAAsB,CAAA,CAAA;;EAAtB,
|
|
1
|
+
{"version":3,"file":"link-source.d.ts","names":[],"sources":["../../src/api/link-source.ts"],"sourcesContent":[],"mappings":";;;cAEa,wBAAsB,CAAA,CAAA;;EAAtB,QAAA,EAAA,UAAA;EAUA,SAAA,EAAA,WAAA;;;;;;;cAAA,0BAAwB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,eAAA,CAAA;AAAA,KAiGzB,kBAAA,GAAqB,CAAA,CAAE,KAjGE,CAAA,OAiGW,wBAjGX,CAAA;AAiGzB,KACA,gBAAA,GAAmB,CAAA,CAAE,KADe,CAAA,OACF,sBADX,CAAA;AACnC;AASA;;cAAa,8BAA4B,CAAA,CAAA;;;;;;;;;;EAAA,IAAA,cAAA,mBAAA,CAAA,OAAA,CAAA,CAAA;EAAA,KAAA,cAAA,mBAAA,CAAA,OAAA,CAAA,CAAA;AA4BzC,CAAA,eAAY,CAAA;AAOC,KAPD,sBAAA,GAAyB,CAAA,CAAE,KAqCpC,CAAA,OApCK,4BAoCL,CAAA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
279
|
totalPagesLimit: z.number().int().nonnegative().nullable().openapi({
|
|
280
280
|
description: "Plan limit for total pages across all sources (null = unlimited)",
|
|
281
281
|
example: 10
|
|
282
|
+
}),
|
|
283
|
+
planLimitFaqs: z.number().int().nonnegative().nullable().openapi({
|
|
284
|
+
description: "Plan limit for number of FAQs (null = unlimited)",
|
|
285
|
+
example: 10
|
|
286
|
+
}),
|
|
287
|
+
planLimitFiles: z.number().int().nonnegative().nullable().openapi({
|
|
288
|
+
description: "Plan limit for number of files (null = unlimited)",
|
|
289
|
+
example: 5
|
|
282
290
|
})
|
|
283
291
|
}).openapi({ description: "Training statistics for the AI agent" });
|
|
284
292
|
/**
|
package/api/link-source.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-source.js","names":[],"sources":["../../src/api/link-source.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nexport const linkSourceStatusSchema = z\n\t.enum([\"pending\", \"mapping\", \"crawling\", \"completed\", \"failed\"])\n\t.openapi({\n\t\tdescription: \"Link source crawl status\",\n\t\texample: \"completed\",\n\t});\n\n/**\n * Link source response schema - used for single item responses\n */\nexport const linkSourceResponseSchema = z\n\t.object({\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"Link source 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\tparentLinkSourceId: z.ulid().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Parent link source ID for hierarchical crawling; null means root\",\n\t\t\texample: null,\n\t\t}),\n\t\turl: z.url().openapi({\n\t\t\tdescription: \"Root URL to crawl\",\n\t\t\texample: \"https://docs.example.com\",\n\t\t}),\n\t\tstatus: linkSourceStatusSchema,\n\t\tfirecrawlJobId: z.string().nullable().openapi({\n\t\t\tdescription: \"Firecrawl job ID for tracking async crawl\",\n\t\t\texample: \"fc_job_123456\",\n\t\t}),\n\t\tdepth: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Crawl depth from root (0 = root, 1 = direct subpage)\",\n\t\t\texample: 0,\n\t\t}),\n\t\tdiscoveredPagesCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Number of pages discovered during mapping phase\",\n\t\t\texample: 25,\n\t\t}),\n\t\tcrawledPagesCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Number of pages successfully crawled\",\n\t\t\texample: 15,\n\t\t}),\n\t\ttotalSizeBytes: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total size of crawled content in bytes\",\n\t\t\texample: 102_400,\n\t\t}),\n\t\tincludePaths: z\n\t\t\t.array(z.string())\n\t\t\t.nullable()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Paths to include in crawl (only URLs matching these)\",\n\t\t\t\texample: [\"/docs\", \"/blog\"],\n\t\t\t}),\n\t\texcludePaths: z\n\t\t\t.array(z.string())\n\t\t\t.nullable()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Paths to exclude from crawl (URLs matching these are skipped)\",\n\t\t\t\texample: [\"/admin\", \"/api\"],\n\t\t\t}),\n\t\tignoredUrls: z\n\t\t\t.array(z.string())\n\t\t\t.nullable()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"URLs explicitly ignored by user (excluded from future crawls)\",\n\t\t\t\texample: [\"https://docs.example.com/deprecated\"],\n\t\t\t}),\n\t\tlastCrawledAt: z.string().nullable().openapi({\n\t\t\tdescription: \"Timestamp of last successful crawl\",\n\t\t\texample: \"2024-06-10T12:00:00.000Z\",\n\t\t}),\n\t\terrorMessage: z.string().nullable().openapi({\n\t\t\tdescription: \"Error message if crawl failed\",\n\t\t\texample: null,\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: \"Link source response\",\n\t});\n\nexport type LinkSourceResponse = z.infer<typeof linkSourceResponseSchema>;\nexport type LinkSourceStatus = z.infer<typeof linkSourceStatusSchema>;\n\n// ============================================================================\n// API Request/Response Schemas\n// ============================================================================\n\n/**\n * List link sources request schema (TRPC) - with websiteSlug\n */\nexport const listLinkSourcesRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug to list link sources 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\"Filter by AI agent ID; null for shared entries; omit for all\",\n\t\t\texample: \"01JG000000000000000000002\",\n\t\t}),\n\t\tstatus: linkSourceStatusSchema.optional().openapi({\n\t\t\tdescription: \"Filter by crawl status\",\n\t\t\texample: \"completed\",\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: \"Request to list link sources with filters and pagination\",\n\t});\n\nexport type ListLinkSourcesRequest = z.infer<\n\ttypeof listLinkSourcesRequestSchema\n>;\n\n/**\n * List link sources response schema\n */\nexport const listLinkSourcesResponseSchema = z\n\t.object({\n\t\titems: z.array(linkSourceResponseSchema).openapi({\n\t\t\tdescription: \"Array of link sources\",\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 link sources\",\n\t});\n\nexport type ListLinkSourcesResponse = z.infer<\n\ttypeof listLinkSourcesResponseSchema\n>;\n\n/**\n * Get link source request schema (TRPC)\n */\nexport const getLinkSourceRequestSchema = 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: \"Link source ID\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to get a single link source\",\n\t});\n\nexport type GetLinkSourceRequest = z.infer<typeof getLinkSourceRequestSchema>;\n\n/**\n * Create link source request schema (TRPC)\n */\nexport const createLinkSourceRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug to create link source 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\tparentLinkSourceId: z.ulid().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Parent link source ID for hierarchical crawling; null/omit for root\",\n\t\t\texample: null,\n\t\t}),\n\t\turl: z.url().openapi({\n\t\t\tdescription: \"Root URL to crawl\",\n\t\t\texample: \"https://docs.example.com\",\n\t\t}),\n\t\tincludePaths: z\n\t\t\t.array(z.string())\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Paths to include in crawl (only URLs matching these)\",\n\t\t\t\texample: [\"/docs\", \"/blog\"],\n\t\t\t}),\n\t\texcludePaths: z\n\t\t\t.array(z.string())\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Paths to exclude from crawl (URLs matching these are skipped)\",\n\t\t\t\texample: [\"/admin\", \"/api\"],\n\t\t\t}),\n\t\tmaxDepth: z.number().int().nonnegative().default(1).optional().openapi({\n\t\t\tdescription: \"Maximum crawl depth (1 = direct subpages only)\",\n\t\t\texample: 1,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to create a new link source and trigger crawl\",\n\t});\n\nexport type CreateLinkSourceRequest = z.infer<\n\ttypeof createLinkSourceRequestSchema\n>;\n\n/**\n * Delete link source request schema (TRPC)\n */\nexport const deleteLinkSourceRequestSchema = 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: \"Link source ID to delete\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to delete a link source\",\n\t});\n\nexport type DeleteLinkSourceRequest = z.infer<\n\ttypeof deleteLinkSourceRequestSchema\n>;\n\n/**\n * Recrawl link source request schema (TRPC)\n */\nexport const recrawlLinkSourceRequestSchema = 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: \"Link source ID to recrawl\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to trigger a recrawl of an existing link source\",\n\t});\n\nexport type RecrawlLinkSourceRequest = z.infer<\n\ttypeof recrawlLinkSourceRequestSchema\n>;\n\n/**\n * Cancel link source request schema (TRPC)\n */\nexport const cancelLinkSourceRequestSchema = 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: \"Link source ID to cancel\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to cancel a crawl in progress\",\n\t});\n\nexport type CancelLinkSourceRequest = z.infer<\n\ttypeof cancelLinkSourceRequestSchema\n>;\n\n/**\n * Get crawl status request schema (TRPC)\n */\nexport const getCrawlStatusRequestSchema = 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: \"Link source ID to check status\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to get crawl status of a link source\",\n\t});\n\nexport type GetCrawlStatusRequest = z.infer<typeof getCrawlStatusRequestSchema>;\n\n/**\n * Training stats response schema\n */\nexport const trainingStatsResponseSchema = z\n\t.object({\n\t\tlinkSourcesCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total number of link sources\",\n\t\t\texample: 5,\n\t\t}),\n\t\turlKnowledgeCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total number of URL knowledge entries\",\n\t\t\texample: 50,\n\t\t}),\n\t\tfaqKnowledgeCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total number of FAQ knowledge entries\",\n\t\t\texample: 20,\n\t\t}),\n\t\tarticleKnowledgeCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total number of article knowledge entries\",\n\t\t\texample: 10,\n\t\t}),\n\t\ttotalSizeBytes: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total size of all knowledge in bytes\",\n\t\t\texample: 512_000,\n\t\t}),\n\t\tplanLimitBytes: z.number().int().nonnegative().nullable().openapi({\n\t\t\tdescription: \"Plan limit for knowledge size in bytes (null = unlimited)\",\n\t\t\texample: 10_485_760,\n\t\t}),\n\t\tplanLimitLinks: z.number().int().nonnegative().nullable().openapi({\n\t\t\tdescription: \"Plan limit for number of link sources (null = unlimited)\",\n\t\t\texample: 100,\n\t\t}),\n\t\tcrawlPagesPerSourceLimit: z\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.nonnegative()\n\t\t\t.nullable()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Plan limit for pages crawled per source (null = unlimited)\",\n\t\t\t\texample: 1000,\n\t\t\t}),\n\t\ttotalPagesLimit: z.number().int().nonnegative().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Plan limit for total pages across all sources (null = unlimited)\",\n\t\t\texample: 10,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Training statistics for the AI agent\",\n\t});\n\nexport type TrainingStatsResponse = z.infer<typeof trainingStatsResponseSchema>;\n\n/**\n * Get training stats request schema (TRPC)\n */\nexport const getTrainingStatsRequestSchema = 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\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})\n\t.openapi({\n\t\tdescription: \"Request to get training statistics\",\n\t});\n\nexport type GetTrainingStatsRequest = z.infer<\n\ttypeof getTrainingStatsRequestSchema\n>;\n\n/**\n * Scan subpages request schema (TRPC)\n * Used to trigger crawl of deeper subpages for a specific knowledge entry\n */\nexport const scanSubpagesRequestSchema = 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\tlinkSourceId: z.ulid().openapi({\n\t\t\tdescription: \"Parent link source ID\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to scan subpages for\",\n\t\t\texample: \"01JG00000000000000000000B\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to scan subpages of a specific page\",\n\t});\n\nexport type ScanSubpagesRequest = z.infer<typeof scanSubpagesRequestSchema>;\n\n/**\n * List knowledge by link source request schema (TRPC)\n */\nexport const listKnowledgeByLinkSourceRequestSchema = 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\tlinkSourceId: z.ulid().openapi({\n\t\t\tdescription: \"Link source ID to list knowledge for\",\n\t\t\texample: \"01JG00000000000000000000A\",\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(50).openapi({\n\t\t\tdescription: \"Items per page (max 100)\",\n\t\t\texample: 50,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to list knowledge entries for a link source\",\n\t});\n\nexport type ListKnowledgeByLinkSourceRequest = z.infer<\n\ttypeof listKnowledgeByLinkSourceRequestSchema\n>;\n\n/**\n * Toggle knowledge included request schema (TRPC)\n */\nexport const toggleKnowledgeIncludedRequestSchema = 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\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to toggle\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\tisIncluded: z.boolean().openapi({\n\t\t\tdescription: \"Whether to include this knowledge in training\",\n\t\t\texample: true,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to toggle knowledge inclusion in training\",\n\t});\n\nexport type ToggleKnowledgeIncludedRequest = z.infer<\n\ttypeof toggleKnowledgeIncludedRequestSchema\n>;\n\n/**\n * Discovered page schema for realtime updates\n */\nexport const discoveredPageSchema = z.object({\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the discovered page\",\n\t\texample: \"https://docs.example.com/getting-started\",\n\t}),\n\ttitle: z.string().nullable().openapi({\n\t\tdescription: \"Title of the page if available\",\n\t\texample: \"Getting Started Guide\",\n\t}),\n\tdepth: z.number().int().nonnegative().openapi({\n\t\tdescription: \"Depth from the root URL\",\n\t\texample: 1,\n\t}),\n});\n\nexport type DiscoveredPage = z.infer<typeof discoveredPageSchema>;\n\n/**\n * Crawl progress page schema for realtime updates\n */\nexport const crawlProgressPageSchema = z.object({\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the crawled page\",\n\t\texample: \"https://docs.example.com/getting-started\",\n\t}),\n\ttitle: z.string().nullable().openapi({\n\t\tdescription: \"Title of the page\",\n\t\texample: \"Getting Started Guide\",\n\t}),\n\tstatus: z.enum([\"pending\", \"crawling\", \"completed\", \"failed\"]).openapi({\n\t\tdescription: \"Status of this specific page\",\n\t\texample: \"completed\",\n\t}),\n\tsizeBytes: z.number().int().nonnegative().optional().openapi({\n\t\tdescription: \"Size of crawled content in bytes\",\n\t\texample: 4096,\n\t}),\n\terror: z.string().nullable().optional().openapi({\n\t\tdescription: \"Error message if page crawl failed\",\n\t\texample: null,\n\t}),\n});\n\nexport type CrawlProgressPage = z.infer<typeof crawlProgressPageSchema>;\n\n/**\n * Ignore page request schema (TRPC)\n * Adds URL to ignoredUrls and soft-deletes the knowledge entry\n */\nexport const ignorePageRequestSchema = 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\tlinkSourceId: z.ulid().openapi({\n\t\t\tdescription: \"Link source ID containing this page\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to ignore\",\n\t\t\texample: \"01JG00000000000000000000B\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to ignore a page (add to ignoredUrls and delete)\",\n\t});\n\nexport type IgnorePageRequest = z.infer<typeof ignorePageRequestSchema>;\n\n/**\n * Reindex page request schema (TRPC)\n * Re-scrapes a single URL and updates the knowledge entry\n */\nexport const reindexPageRequestSchema = 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\tlinkSourceId: z.ulid().openapi({\n\t\t\tdescription: \"Link source ID containing this page\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to reindex\",\n\t\t\texample: \"01JG00000000000000000000B\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to reindex (re-scrape) a specific page\",\n\t});\n\nexport type ReindexPageRequest = z.infer<typeof reindexPageRequestSchema>;\n\n/**\n * Delete page request schema (TRPC)\n * Soft-deletes a knowledge entry without ignoring future crawls\n */\nexport const deletePageRequestSchema = 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\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to delete\",\n\t\t\texample: \"01JG00000000000000000000B\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to delete a page from knowledge base\",\n\t});\n\nexport type DeletePageRequest = z.infer<typeof deletePageRequestSchema>;\n"],"mappings":";;;AAEA,MAAa,yBAAyB,EACpC,KAAK;CAAC;CAAW;CAAW;CAAY;CAAa;CAAS,CAAC,CAC/D,QAAQ;CACR,aAAa;CACb,SAAS;CACT,CAAC;;;;AAKH,MAAa,2BAA2B,EACtC,OAAO;CACP,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,gBAAgB,EAAE,MAAM,CAAC,QAAQ;EAChC,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,MAAM,CAAC,QAAQ;EAC3B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ;EACtC,aACC;EACD,SAAS;EACT,CAAC;CACF,oBAAoB,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ;EAC/C,aACC;EACD,SAAS;EACT,CAAC;CACF,KAAK,EAAE,KAAK,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,QAAQ;CACR,gBAAgB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EAC7C,aAAa;EACb,SAAS;EACT,CAAC;CACF,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ;EAC7C,aAAa;EACb,SAAS;EACT,CAAC;CACF,sBAAsB,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ;EAC5D,aAAa;EACb,SAAS;EACT,CAAC;CACF,mBAAmB,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ;EACz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a,4DACb,CAAC;;;;;AAQH,MAAa,2BAA2B,EACtC,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,cAAc,EAAE,MAAM,CAAC,QAAQ;EAC9B,aAAa;EACb,SAAS;EACT,CAAC;CACF,aAAa,EAAE,MAAM,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,kDACb,CAAC;;;;;AAQH,MAAa,0BAA0B,EACrC,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,aAAa,EAAE,MAAM,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,gDACb,CAAC"}
|
|
1
|
+
{"version":3,"file":"link-source.js","names":[],"sources":["../../src/api/link-source.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nexport const linkSourceStatusSchema = z\n\t.enum([\"pending\", \"mapping\", \"crawling\", \"completed\", \"failed\"])\n\t.openapi({\n\t\tdescription: \"Link source crawl status\",\n\t\texample: \"completed\",\n\t});\n\n/**\n * Link source response schema - used for single item responses\n */\nexport const linkSourceResponseSchema = z\n\t.object({\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"Link source 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\tparentLinkSourceId: z.ulid().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Parent link source ID for hierarchical crawling; null means root\",\n\t\t\texample: null,\n\t\t}),\n\t\turl: z.url().openapi({\n\t\t\tdescription: \"Root URL to crawl\",\n\t\t\texample: \"https://docs.example.com\",\n\t\t}),\n\t\tstatus: linkSourceStatusSchema,\n\t\tfirecrawlJobId: z.string().nullable().openapi({\n\t\t\tdescription: \"Firecrawl job ID for tracking async crawl\",\n\t\t\texample: \"fc_job_123456\",\n\t\t}),\n\t\tdepth: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Crawl depth from root (0 = root, 1 = direct subpage)\",\n\t\t\texample: 0,\n\t\t}),\n\t\tdiscoveredPagesCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Number of pages discovered during mapping phase\",\n\t\t\texample: 25,\n\t\t}),\n\t\tcrawledPagesCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Number of pages successfully crawled\",\n\t\t\texample: 15,\n\t\t}),\n\t\ttotalSizeBytes: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total size of crawled content in bytes\",\n\t\t\texample: 102_400,\n\t\t}),\n\t\tincludePaths: z\n\t\t\t.array(z.string())\n\t\t\t.nullable()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Paths to include in crawl (only URLs matching these)\",\n\t\t\t\texample: [\"/docs\", \"/blog\"],\n\t\t\t}),\n\t\texcludePaths: z\n\t\t\t.array(z.string())\n\t\t\t.nullable()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Paths to exclude from crawl (URLs matching these are skipped)\",\n\t\t\t\texample: [\"/admin\", \"/api\"],\n\t\t\t}),\n\t\tignoredUrls: z\n\t\t\t.array(z.string())\n\t\t\t.nullable()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"URLs explicitly ignored by user (excluded from future crawls)\",\n\t\t\t\texample: [\"https://docs.example.com/deprecated\"],\n\t\t\t}),\n\t\tlastCrawledAt: z.string().nullable().openapi({\n\t\t\tdescription: \"Timestamp of last successful crawl\",\n\t\t\texample: \"2024-06-10T12:00:00.000Z\",\n\t\t}),\n\t\terrorMessage: z.string().nullable().openapi({\n\t\t\tdescription: \"Error message if crawl failed\",\n\t\t\texample: null,\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: \"Link source response\",\n\t});\n\nexport type LinkSourceResponse = z.infer<typeof linkSourceResponseSchema>;\nexport type LinkSourceStatus = z.infer<typeof linkSourceStatusSchema>;\n\n// ============================================================================\n// API Request/Response Schemas\n// ============================================================================\n\n/**\n * List link sources request schema (TRPC) - with websiteSlug\n */\nexport const listLinkSourcesRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug to list link sources 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\"Filter by AI agent ID; null for shared entries; omit for all\",\n\t\t\texample: \"01JG000000000000000000002\",\n\t\t}),\n\t\tstatus: linkSourceStatusSchema.optional().openapi({\n\t\t\tdescription: \"Filter by crawl status\",\n\t\t\texample: \"completed\",\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: \"Request to list link sources with filters and pagination\",\n\t});\n\nexport type ListLinkSourcesRequest = z.infer<\n\ttypeof listLinkSourcesRequestSchema\n>;\n\n/**\n * List link sources response schema\n */\nexport const listLinkSourcesResponseSchema = z\n\t.object({\n\t\titems: z.array(linkSourceResponseSchema).openapi({\n\t\t\tdescription: \"Array of link sources\",\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 link sources\",\n\t});\n\nexport type ListLinkSourcesResponse = z.infer<\n\ttypeof listLinkSourcesResponseSchema\n>;\n\n/**\n * Get link source request schema (TRPC)\n */\nexport const getLinkSourceRequestSchema = 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: \"Link source ID\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to get a single link source\",\n\t});\n\nexport type GetLinkSourceRequest = z.infer<typeof getLinkSourceRequestSchema>;\n\n/**\n * Create link source request schema (TRPC)\n */\nexport const createLinkSourceRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug to create link source 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\tparentLinkSourceId: z.ulid().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Parent link source ID for hierarchical crawling; null/omit for root\",\n\t\t\texample: null,\n\t\t}),\n\t\turl: z.url().openapi({\n\t\t\tdescription: \"Root URL to crawl\",\n\t\t\texample: \"https://docs.example.com\",\n\t\t}),\n\t\tincludePaths: z\n\t\t\t.array(z.string())\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Paths to include in crawl (only URLs matching these)\",\n\t\t\t\texample: [\"/docs\", \"/blog\"],\n\t\t\t}),\n\t\texcludePaths: z\n\t\t\t.array(z.string())\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Paths to exclude from crawl (URLs matching these are skipped)\",\n\t\t\t\texample: [\"/admin\", \"/api\"],\n\t\t\t}),\n\t\tmaxDepth: z.number().int().nonnegative().default(1).optional().openapi({\n\t\t\tdescription: \"Maximum crawl depth (1 = direct subpages only)\",\n\t\t\texample: 1,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to create a new link source and trigger crawl\",\n\t});\n\nexport type CreateLinkSourceRequest = z.infer<\n\ttypeof createLinkSourceRequestSchema\n>;\n\n/**\n * Delete link source request schema (TRPC)\n */\nexport const deleteLinkSourceRequestSchema = 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: \"Link source ID to delete\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to delete a link source\",\n\t});\n\nexport type DeleteLinkSourceRequest = z.infer<\n\ttypeof deleteLinkSourceRequestSchema\n>;\n\n/**\n * Recrawl link source request schema (TRPC)\n */\nexport const recrawlLinkSourceRequestSchema = 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: \"Link source ID to recrawl\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to trigger a recrawl of an existing link source\",\n\t});\n\nexport type RecrawlLinkSourceRequest = z.infer<\n\ttypeof recrawlLinkSourceRequestSchema\n>;\n\n/**\n * Cancel link source request schema (TRPC)\n */\nexport const cancelLinkSourceRequestSchema = 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: \"Link source ID to cancel\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to cancel a crawl in progress\",\n\t});\n\nexport type CancelLinkSourceRequest = z.infer<\n\ttypeof cancelLinkSourceRequestSchema\n>;\n\n/**\n * Get crawl status request schema (TRPC)\n */\nexport const getCrawlStatusRequestSchema = 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: \"Link source ID to check status\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to get crawl status of a link source\",\n\t});\n\nexport type GetCrawlStatusRequest = z.infer<typeof getCrawlStatusRequestSchema>;\n\n/**\n * Training stats response schema\n */\nexport const trainingStatsResponseSchema = z\n\t.object({\n\t\tlinkSourcesCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total number of link sources\",\n\t\t\texample: 5,\n\t\t}),\n\t\turlKnowledgeCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total number of URL knowledge entries\",\n\t\t\texample: 50,\n\t\t}),\n\t\tfaqKnowledgeCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total number of FAQ knowledge entries\",\n\t\t\texample: 20,\n\t\t}),\n\t\tarticleKnowledgeCount: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total number of article knowledge entries\",\n\t\t\texample: 10,\n\t\t}),\n\t\ttotalSizeBytes: z.number().int().nonnegative().openapi({\n\t\t\tdescription: \"Total size of all knowledge in bytes\",\n\t\t\texample: 512_000,\n\t\t}),\n\t\tplanLimitBytes: z.number().int().nonnegative().nullable().openapi({\n\t\t\tdescription: \"Plan limit for knowledge size in bytes (null = unlimited)\",\n\t\t\texample: 10_485_760,\n\t\t}),\n\t\tplanLimitLinks: z.number().int().nonnegative().nullable().openapi({\n\t\t\tdescription: \"Plan limit for number of link sources (null = unlimited)\",\n\t\t\texample: 100,\n\t\t}),\n\t\tcrawlPagesPerSourceLimit: z\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.nonnegative()\n\t\t\t.nullable()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Plan limit for pages crawled per source (null = unlimited)\",\n\t\t\t\texample: 1000,\n\t\t\t}),\n\t\ttotalPagesLimit: z.number().int().nonnegative().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Plan limit for total pages across all sources (null = unlimited)\",\n\t\t\texample: 10,\n\t\t}),\n\t\tplanLimitFaqs: z.number().int().nonnegative().nullable().openapi({\n\t\t\tdescription: \"Plan limit for number of FAQs (null = unlimited)\",\n\t\t\texample: 10,\n\t\t}),\n\t\tplanLimitFiles: z.number().int().nonnegative().nullable().openapi({\n\t\t\tdescription: \"Plan limit for number of files (null = unlimited)\",\n\t\t\texample: 5,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Training statistics for the AI agent\",\n\t});\n\nexport type TrainingStatsResponse = z.infer<typeof trainingStatsResponseSchema>;\n\n/**\n * Get training stats request schema (TRPC)\n */\nexport const getTrainingStatsRequestSchema = 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\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})\n\t.openapi({\n\t\tdescription: \"Request to get training statistics\",\n\t});\n\nexport type GetTrainingStatsRequest = z.infer<\n\ttypeof getTrainingStatsRequestSchema\n>;\n\n/**\n * Scan subpages request schema (TRPC)\n * Used to trigger crawl of deeper subpages for a specific knowledge entry\n */\nexport const scanSubpagesRequestSchema = 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\tlinkSourceId: z.ulid().openapi({\n\t\t\tdescription: \"Parent link source ID\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to scan subpages for\",\n\t\t\texample: \"01JG00000000000000000000B\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to scan subpages of a specific page\",\n\t});\n\nexport type ScanSubpagesRequest = z.infer<typeof scanSubpagesRequestSchema>;\n\n/**\n * List knowledge by link source request schema (TRPC)\n */\nexport const listKnowledgeByLinkSourceRequestSchema = 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\tlinkSourceId: z.ulid().openapi({\n\t\t\tdescription: \"Link source ID to list knowledge for\",\n\t\t\texample: \"01JG00000000000000000000A\",\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(50).openapi({\n\t\t\tdescription: \"Items per page (max 100)\",\n\t\t\texample: 50,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to list knowledge entries for a link source\",\n\t});\n\nexport type ListKnowledgeByLinkSourceRequest = z.infer<\n\ttypeof listKnowledgeByLinkSourceRequestSchema\n>;\n\n/**\n * Toggle knowledge included request schema (TRPC)\n */\nexport const toggleKnowledgeIncludedRequestSchema = 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\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to toggle\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\tisIncluded: z.boolean().openapi({\n\t\t\tdescription: \"Whether to include this knowledge in training\",\n\t\t\texample: true,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to toggle knowledge inclusion in training\",\n\t});\n\nexport type ToggleKnowledgeIncludedRequest = z.infer<\n\ttypeof toggleKnowledgeIncludedRequestSchema\n>;\n\n/**\n * Discovered page schema for realtime updates\n */\nexport const discoveredPageSchema = z.object({\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the discovered page\",\n\t\texample: \"https://docs.example.com/getting-started\",\n\t}),\n\ttitle: z.string().nullable().openapi({\n\t\tdescription: \"Title of the page if available\",\n\t\texample: \"Getting Started Guide\",\n\t}),\n\tdepth: z.number().int().nonnegative().openapi({\n\t\tdescription: \"Depth from the root URL\",\n\t\texample: 1,\n\t}),\n});\n\nexport type DiscoveredPage = z.infer<typeof discoveredPageSchema>;\n\n/**\n * Crawl progress page schema for realtime updates\n */\nexport const crawlProgressPageSchema = z.object({\n\turl: z.string().openapi({\n\t\tdescription: \"URL of the crawled page\",\n\t\texample: \"https://docs.example.com/getting-started\",\n\t}),\n\ttitle: z.string().nullable().openapi({\n\t\tdescription: \"Title of the page\",\n\t\texample: \"Getting Started Guide\",\n\t}),\n\tstatus: z.enum([\"pending\", \"crawling\", \"completed\", \"failed\"]).openapi({\n\t\tdescription: \"Status of this specific page\",\n\t\texample: \"completed\",\n\t}),\n\tsizeBytes: z.number().int().nonnegative().optional().openapi({\n\t\tdescription: \"Size of crawled content in bytes\",\n\t\texample: 4096,\n\t}),\n\terror: z.string().nullable().optional().openapi({\n\t\tdescription: \"Error message if page crawl failed\",\n\t\texample: null,\n\t}),\n});\n\nexport type CrawlProgressPage = z.infer<typeof crawlProgressPageSchema>;\n\n/**\n * Ignore page request schema (TRPC)\n * Adds URL to ignoredUrls and soft-deletes the knowledge entry\n */\nexport const ignorePageRequestSchema = 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\tlinkSourceId: z.ulid().openapi({\n\t\t\tdescription: \"Link source ID containing this page\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to ignore\",\n\t\t\texample: \"01JG00000000000000000000B\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to ignore a page (add to ignoredUrls and delete)\",\n\t});\n\nexport type IgnorePageRequest = z.infer<typeof ignorePageRequestSchema>;\n\n/**\n * Reindex page request schema (TRPC)\n * Re-scrapes a single URL and updates the knowledge entry\n */\nexport const reindexPageRequestSchema = 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\tlinkSourceId: z.ulid().openapi({\n\t\t\tdescription: \"Link source ID containing this page\",\n\t\t\texample: \"01JG00000000000000000000A\",\n\t\t}),\n\t\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to reindex\",\n\t\t\texample: \"01JG00000000000000000000B\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to reindex (re-scrape) a specific page\",\n\t});\n\nexport type ReindexPageRequest = z.infer<typeof reindexPageRequestSchema>;\n\n/**\n * Delete page request schema (TRPC)\n * Soft-deletes a knowledge entry without ignoring future crawls\n */\nexport const deletePageRequestSchema = 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\tknowledgeId: z.ulid().openapi({\n\t\t\tdescription: \"Knowledge entry ID to delete\",\n\t\t\texample: \"01JG00000000000000000000B\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to delete a page from knowledge base\",\n\t});\n\nexport type DeletePageRequest = z.infer<typeof deletePageRequestSchema>;\n"],"mappings":";;;AAEA,MAAa,yBAAyB,EACpC,KAAK;CAAC;CAAW;CAAW;CAAY;CAAa;CAAS,CAAC,CAC/D,QAAQ;CACR,aAAa;CACb,SAAS;CACT,CAAC;;;;AAKH,MAAa,2BAA2B,EACtC,OAAO;CACP,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,gBAAgB,EAAE,MAAM,CAAC,QAAQ;EAChC,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,MAAM,CAAC,QAAQ;EAC3B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ;EACtC,aACC;EACD,SAAS;EACT,CAAC;CACF,oBAAoB,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ;EAC/C,aACC;EACD,SAAS;EACT,CAAC;CACF,KAAK,EAAE,KAAK,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,QAAQ;CACR,gBAAgB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ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