@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,453 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ //#region src/api/link-source.ts
4
+ const linkSourceStatusSchema = z.enum([
5
+ "pending",
6
+ "mapping",
7
+ "crawling",
8
+ "completed",
9
+ "failed"
10
+ ]).openapi({
11
+ description: "Link source crawl status",
12
+ example: "completed"
13
+ });
14
+ /**
15
+ * Link source response schema - used for single item responses
16
+ */
17
+ const linkSourceResponseSchema = z.object({
18
+ id: z.ulid().openapi({
19
+ description: "Link source identifier",
20
+ example: "01JG00000000000000000000A"
21
+ }),
22
+ organizationId: z.ulid().openapi({
23
+ description: "Owning organization identifier",
24
+ example: "01JG000000000000000000000"
25
+ }),
26
+ websiteId: z.ulid().openapi({
27
+ description: "Website identifier",
28
+ example: "01JG000000000000000000001"
29
+ }),
30
+ aiAgentId: z.ulid().nullable().openapi({
31
+ description: "Optional AI agent identifier; null means shared at website scope",
32
+ example: "01JG000000000000000000002"
33
+ }),
34
+ parentLinkSourceId: z.ulid().nullable().openapi({
35
+ description: "Parent link source ID for hierarchical crawling; null means root",
36
+ example: null
37
+ }),
38
+ url: z.url().openapi({
39
+ description: "Root URL to crawl",
40
+ example: "https://docs.example.com"
41
+ }),
42
+ status: linkSourceStatusSchema,
43
+ firecrawlJobId: z.string().nullable().openapi({
44
+ description: "Firecrawl job ID for tracking async crawl",
45
+ example: "fc_job_123456"
46
+ }),
47
+ depth: z.number().int().nonnegative().openapi({
48
+ description: "Crawl depth from root (0 = root, 1 = direct subpage)",
49
+ example: 0
50
+ }),
51
+ discoveredPagesCount: z.number().int().nonnegative().openapi({
52
+ description: "Number of pages discovered during mapping phase",
53
+ example: 25
54
+ }),
55
+ crawledPagesCount: z.number().int().nonnegative().openapi({
56
+ description: "Number of pages successfully crawled",
57
+ example: 15
58
+ }),
59
+ totalSizeBytes: z.number().int().nonnegative().openapi({
60
+ description: "Total size of crawled content in bytes",
61
+ example: 102400
62
+ }),
63
+ includePaths: z.array(z.string()).nullable().openapi({
64
+ description: "Paths to include in crawl (only URLs matching these)",
65
+ example: ["/docs", "/blog"]
66
+ }),
67
+ excludePaths: z.array(z.string()).nullable().openapi({
68
+ description: "Paths to exclude from crawl (URLs matching these are skipped)",
69
+ example: ["/admin", "/api"]
70
+ }),
71
+ ignoredUrls: z.array(z.string()).nullable().openapi({
72
+ description: "URLs explicitly ignored by user (excluded from future crawls)",
73
+ example: ["https://docs.example.com/deprecated"]
74
+ }),
75
+ lastCrawledAt: z.string().nullable().openapi({
76
+ description: "Timestamp of last successful crawl",
77
+ example: "2024-06-10T12:00:00.000Z"
78
+ }),
79
+ errorMessage: z.string().nullable().openapi({
80
+ description: "Error message if crawl failed",
81
+ example: null
82
+ }),
83
+ createdAt: z.string().openapi({
84
+ description: "Creation timestamp",
85
+ example: "2024-06-10T12:00:00.000Z"
86
+ }),
87
+ updatedAt: z.string().openapi({
88
+ description: "Last update timestamp",
89
+ example: "2024-06-11T08:00:00.000Z"
90
+ }),
91
+ deletedAt: z.string().nullable().openapi({
92
+ description: "Soft delete timestamp",
93
+ example: null
94
+ })
95
+ }).openapi({ description: "Link source response" });
96
+ /**
97
+ * List link sources request schema (TRPC) - with websiteSlug
98
+ */
99
+ const listLinkSourcesRequestSchema = z.object({
100
+ websiteSlug: z.string().openapi({
101
+ description: "The website slug to list link sources for",
102
+ example: "my-website"
103
+ }),
104
+ aiAgentId: z.ulid().nullable().optional().openapi({
105
+ description: "Filter by AI agent ID; null for shared entries; omit for all",
106
+ example: "01JG000000000000000000002"
107
+ }),
108
+ status: linkSourceStatusSchema.optional().openapi({
109
+ description: "Filter by crawl status",
110
+ example: "completed"
111
+ }),
112
+ page: z.coerce.number().int().positive().default(1).openapi({
113
+ description: "Page number (1-indexed)",
114
+ example: 1
115
+ }),
116
+ limit: z.coerce.number().int().positive().max(100).default(20).openapi({
117
+ description: "Items per page (max 100)",
118
+ example: 20
119
+ })
120
+ }).openapi({ description: "Request to list link sources with filters and pagination" });
121
+ /**
122
+ * List link sources response schema
123
+ */
124
+ const listLinkSourcesResponseSchema = z.object({
125
+ items: z.array(linkSourceResponseSchema).openapi({ description: "Array of link sources" }),
126
+ pagination: z.object({
127
+ page: z.number().int().positive().openapi({
128
+ description: "Current page number",
129
+ example: 1
130
+ }),
131
+ limit: z.number().int().positive().openapi({
132
+ description: "Items per page",
133
+ example: 20
134
+ }),
135
+ total: z.number().int().nonnegative().openapi({
136
+ description: "Total number of items",
137
+ example: 100
138
+ }),
139
+ hasMore: z.boolean().openapi({
140
+ description: "Whether there are more items available",
141
+ example: true
142
+ })
143
+ }).openapi({ description: "Pagination metadata" })
144
+ }).openapi({ description: "Paginated list of link sources" });
145
+ /**
146
+ * Get link source request schema (TRPC)
147
+ */
148
+ const getLinkSourceRequestSchema = z.object({
149
+ websiteSlug: z.string().openapi({
150
+ description: "The website slug",
151
+ example: "my-website"
152
+ }),
153
+ id: z.ulid().openapi({
154
+ description: "Link source ID",
155
+ example: "01JG00000000000000000000A"
156
+ })
157
+ }).openapi({ description: "Request to get a single link source" });
158
+ /**
159
+ * Create link source request schema (TRPC)
160
+ */
161
+ const createLinkSourceRequestSchema = z.object({
162
+ websiteSlug: z.string().openapi({
163
+ description: "The website slug to create link source for",
164
+ example: "my-website"
165
+ }),
166
+ aiAgentId: z.ulid().nullable().optional().openapi({
167
+ description: "Optional AI agent ID; null/omit for shared at website scope",
168
+ example: "01JG000000000000000000002"
169
+ }),
170
+ parentLinkSourceId: z.ulid().nullable().optional().openapi({
171
+ description: "Parent link source ID for hierarchical crawling; null/omit for root",
172
+ example: null
173
+ }),
174
+ url: z.url().openapi({
175
+ description: "Root URL to crawl",
176
+ example: "https://docs.example.com"
177
+ }),
178
+ includePaths: z.array(z.string()).optional().openapi({
179
+ description: "Paths to include in crawl (only URLs matching these)",
180
+ example: ["/docs", "/blog"]
181
+ }),
182
+ excludePaths: z.array(z.string()).optional().openapi({
183
+ description: "Paths to exclude from crawl (URLs matching these are skipped)",
184
+ example: ["/admin", "/api"]
185
+ }),
186
+ maxDepth: z.number().int().nonnegative().default(1).optional().openapi({
187
+ description: "Maximum crawl depth (1 = direct subpages only)",
188
+ example: 1
189
+ })
190
+ }).openapi({ description: "Request to create a new link source and trigger crawl" });
191
+ /**
192
+ * Delete link source request schema (TRPC)
193
+ */
194
+ const deleteLinkSourceRequestSchema = z.object({
195
+ websiteSlug: z.string().openapi({
196
+ description: "The website slug",
197
+ example: "my-website"
198
+ }),
199
+ id: z.ulid().openapi({
200
+ description: "Link source ID to delete",
201
+ example: "01JG00000000000000000000A"
202
+ })
203
+ }).openapi({ description: "Request to delete a link source" });
204
+ /**
205
+ * Recrawl link source request schema (TRPC)
206
+ */
207
+ const recrawlLinkSourceRequestSchema = z.object({
208
+ websiteSlug: z.string().openapi({
209
+ description: "The website slug",
210
+ example: "my-website"
211
+ }),
212
+ id: z.ulid().openapi({
213
+ description: "Link source ID to recrawl",
214
+ example: "01JG00000000000000000000A"
215
+ })
216
+ }).openapi({ description: "Request to trigger a recrawl of an existing link source" });
217
+ /**
218
+ * Cancel link source request schema (TRPC)
219
+ */
220
+ const cancelLinkSourceRequestSchema = z.object({
221
+ websiteSlug: z.string().openapi({
222
+ description: "The website slug",
223
+ example: "my-website"
224
+ }),
225
+ id: z.ulid().openapi({
226
+ description: "Link source ID to cancel",
227
+ example: "01JG00000000000000000000A"
228
+ })
229
+ }).openapi({ description: "Request to cancel a crawl in progress" });
230
+ /**
231
+ * Get crawl status request schema (TRPC)
232
+ */
233
+ const getCrawlStatusRequestSchema = z.object({
234
+ websiteSlug: z.string().openapi({
235
+ description: "The website slug",
236
+ example: "my-website"
237
+ }),
238
+ id: z.ulid().openapi({
239
+ description: "Link source ID to check status",
240
+ example: "01JG00000000000000000000A"
241
+ })
242
+ }).openapi({ description: "Request to get crawl status of a link source" });
243
+ /**
244
+ * Training stats response schema
245
+ */
246
+ const trainingStatsResponseSchema = z.object({
247
+ linkSourcesCount: z.number().int().nonnegative().openapi({
248
+ description: "Total number of link sources",
249
+ example: 5
250
+ }),
251
+ urlKnowledgeCount: z.number().int().nonnegative().openapi({
252
+ description: "Total number of URL knowledge entries",
253
+ example: 50
254
+ }),
255
+ faqKnowledgeCount: z.number().int().nonnegative().openapi({
256
+ description: "Total number of FAQ knowledge entries",
257
+ example: 20
258
+ }),
259
+ articleKnowledgeCount: z.number().int().nonnegative().openapi({
260
+ description: "Total number of article knowledge entries",
261
+ example: 10
262
+ }),
263
+ totalSizeBytes: z.number().int().nonnegative().openapi({
264
+ description: "Total size of all knowledge in bytes",
265
+ example: 512e3
266
+ }),
267
+ planLimitBytes: z.number().int().nonnegative().nullable().openapi({
268
+ description: "Plan limit for knowledge size in bytes (null = unlimited)",
269
+ example: 10485760
270
+ }),
271
+ planLimitLinks: z.number().int().nonnegative().nullable().openapi({
272
+ description: "Plan limit for number of link sources (null = unlimited)",
273
+ example: 100
274
+ }),
275
+ crawlPagesPerSourceLimit: z.number().int().nonnegative().nullable().openapi({
276
+ description: "Plan limit for pages crawled per source (null = unlimited)",
277
+ example: 1e3
278
+ }),
279
+ totalPagesLimit: z.number().int().nonnegative().nullable().openapi({
280
+ description: "Plan limit for total pages across all sources (null = unlimited)",
281
+ example: 10
282
+ })
283
+ }).openapi({ description: "Training statistics for the AI agent" });
284
+ /**
285
+ * Get training stats request schema (TRPC)
286
+ */
287
+ const getTrainingStatsRequestSchema = z.object({
288
+ websiteSlug: z.string().openapi({
289
+ description: "The website slug",
290
+ example: "my-website"
291
+ }),
292
+ aiAgentId: z.ulid().nullable().optional().openapi({
293
+ description: "Filter by AI agent ID; null for shared entries; omit for all",
294
+ example: "01JG000000000000000000002"
295
+ })
296
+ }).openapi({ description: "Request to get training statistics" });
297
+ /**
298
+ * Scan subpages request schema (TRPC)
299
+ * Used to trigger crawl of deeper subpages for a specific knowledge entry
300
+ */
301
+ const scanSubpagesRequestSchema = z.object({
302
+ websiteSlug: z.string().openapi({
303
+ description: "The website slug",
304
+ example: "my-website"
305
+ }),
306
+ linkSourceId: z.ulid().openapi({
307
+ description: "Parent link source ID",
308
+ example: "01JG00000000000000000000A"
309
+ }),
310
+ knowledgeId: z.ulid().openapi({
311
+ description: "Knowledge entry ID to scan subpages for",
312
+ example: "01JG00000000000000000000B"
313
+ })
314
+ }).openapi({ description: "Request to scan subpages of a specific page" });
315
+ /**
316
+ * List knowledge by link source request schema (TRPC)
317
+ */
318
+ const listKnowledgeByLinkSourceRequestSchema = z.object({
319
+ websiteSlug: z.string().openapi({
320
+ description: "The website slug",
321
+ example: "my-website"
322
+ }),
323
+ linkSourceId: z.ulid().openapi({
324
+ description: "Link source ID to list knowledge for",
325
+ example: "01JG00000000000000000000A"
326
+ }),
327
+ page: z.coerce.number().int().positive().default(1).openapi({
328
+ description: "Page number (1-indexed)",
329
+ example: 1
330
+ }),
331
+ limit: z.coerce.number().int().positive().max(100).default(50).openapi({
332
+ description: "Items per page (max 100)",
333
+ example: 50
334
+ })
335
+ }).openapi({ description: "Request to list knowledge entries for a link source" });
336
+ /**
337
+ * Toggle knowledge included request schema (TRPC)
338
+ */
339
+ const toggleKnowledgeIncludedRequestSchema = z.object({
340
+ websiteSlug: z.string().openapi({
341
+ description: "The website slug",
342
+ example: "my-website"
343
+ }),
344
+ knowledgeId: z.ulid().openapi({
345
+ description: "Knowledge entry ID to toggle",
346
+ example: "01JG00000000000000000000A"
347
+ }),
348
+ isIncluded: z.boolean().openapi({
349
+ description: "Whether to include this knowledge in training",
350
+ example: true
351
+ })
352
+ }).openapi({ description: "Request to toggle knowledge inclusion in training" });
353
+ /**
354
+ * Discovered page schema for realtime updates
355
+ */
356
+ const discoveredPageSchema = z.object({
357
+ url: z.string().openapi({
358
+ description: "URL of the discovered page",
359
+ example: "https://docs.example.com/getting-started"
360
+ }),
361
+ title: z.string().nullable().openapi({
362
+ description: "Title of the page if available",
363
+ example: "Getting Started Guide"
364
+ }),
365
+ depth: z.number().int().nonnegative().openapi({
366
+ description: "Depth from the root URL",
367
+ example: 1
368
+ })
369
+ });
370
+ /**
371
+ * Crawl progress page schema for realtime updates
372
+ */
373
+ const crawlProgressPageSchema = z.object({
374
+ url: z.string().openapi({
375
+ description: "URL of the crawled page",
376
+ example: "https://docs.example.com/getting-started"
377
+ }),
378
+ title: z.string().nullable().openapi({
379
+ description: "Title of the page",
380
+ example: "Getting Started Guide"
381
+ }),
382
+ status: z.enum([
383
+ "pending",
384
+ "crawling",
385
+ "completed",
386
+ "failed"
387
+ ]).openapi({
388
+ description: "Status of this specific page",
389
+ example: "completed"
390
+ }),
391
+ sizeBytes: z.number().int().nonnegative().optional().openapi({
392
+ description: "Size of crawled content in bytes",
393
+ example: 4096
394
+ }),
395
+ error: z.string().nullable().optional().openapi({
396
+ description: "Error message if page crawl failed",
397
+ example: null
398
+ })
399
+ });
400
+ /**
401
+ * Ignore page request schema (TRPC)
402
+ * Adds URL to ignoredUrls and soft-deletes the knowledge entry
403
+ */
404
+ const ignorePageRequestSchema = z.object({
405
+ websiteSlug: z.string().openapi({
406
+ description: "The website slug",
407
+ example: "my-website"
408
+ }),
409
+ linkSourceId: z.ulid().openapi({
410
+ description: "Link source ID containing this page",
411
+ example: "01JG00000000000000000000A"
412
+ }),
413
+ knowledgeId: z.ulid().openapi({
414
+ description: "Knowledge entry ID to ignore",
415
+ example: "01JG00000000000000000000B"
416
+ })
417
+ }).openapi({ description: "Request to ignore a page (add to ignoredUrls and delete)" });
418
+ /**
419
+ * Reindex page request schema (TRPC)
420
+ * Re-scrapes a single URL and updates the knowledge entry
421
+ */
422
+ const reindexPageRequestSchema = z.object({
423
+ websiteSlug: z.string().openapi({
424
+ description: "The website slug",
425
+ example: "my-website"
426
+ }),
427
+ linkSourceId: z.ulid().openapi({
428
+ description: "Link source ID containing this page",
429
+ example: "01JG00000000000000000000A"
430
+ }),
431
+ knowledgeId: z.ulid().openapi({
432
+ description: "Knowledge entry ID to reindex",
433
+ example: "01JG00000000000000000000B"
434
+ })
435
+ }).openapi({ description: "Request to reindex (re-scrape) a specific page" });
436
+ /**
437
+ * Delete page request schema (TRPC)
438
+ * Soft-deletes a knowledge entry without ignoring future crawls
439
+ */
440
+ const deletePageRequestSchema = z.object({
441
+ websiteSlug: z.string().openapi({
442
+ description: "The website slug",
443
+ example: "my-website"
444
+ }),
445
+ knowledgeId: z.ulid().openapi({
446
+ description: "Knowledge entry ID to delete",
447
+ example: "01JG00000000000000000000B"
448
+ })
449
+ }).openapi({ description: "Request to delete a page from knowledge base" });
450
+
451
+ //#endregion
452
+ export { cancelLinkSourceRequestSchema, crawlProgressPageSchema, createLinkSourceRequestSchema, deleteLinkSourceRequestSchema, deletePageRequestSchema, discoveredPageSchema, getCrawlStatusRequestSchema, getLinkSourceRequestSchema, getTrainingStatsRequestSchema, ignorePageRequestSchema, linkSourceResponseSchema, linkSourceStatusSchema, listKnowledgeByLinkSourceRequestSchema, listLinkSourcesRequestSchema, listLinkSourcesResponseSchema, recrawlLinkSourceRequestSchema, reindexPageRequestSchema, scanSubpagesRequestSchema, toggleKnowledgeIncludedRequestSchema, trainingStatsResponseSchema };
453
+ //# sourceMappingURL=link-source.js.map
@@ -0,0 +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,CA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Q;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,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"}
package/api/upload.d.ts CHANGED
@@ -87,12 +87,12 @@ declare const generateUploadUrlRequestSchema: z.ZodObject<{
87
87
  }, z.core.$strip>;
88
88
  type GenerateUploadUrlRequest = z.infer<typeof generateUploadUrlRequestSchema>;
89
89
  declare const generateUploadUrlResponseSchema: z.ZodObject<{
90
- uploadUrl: z.ZodString;
90
+ uploadUrl: z.ZodURL;
91
91
  key: z.ZodString;
92
92
  bucket: z.ZodString;
93
93
  expiresAt: z.ZodString;
94
94
  contentType: z.ZodString;
95
- publicUrl: z.ZodString;
95
+ publicUrl: z.ZodURL;
96
96
  }, z.core.$strip>;
97
97
  type GenerateUploadUrlResponse = z.infer<typeof generateUploadUrlResponseSchema>;
98
98
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"upload.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wBAAA,GAA2B,CAAA,CAAE,aACjC;cAGK,iCAA+B,CAAA,CAAA;;;;;;;;KAmChC,yBAAA,GAA4B,CAAA,CAAE,aAClC"}
package/api/upload.js CHANGED
@@ -88,7 +88,7 @@ const generateUploadUrlRequestSchema = z.object({
88
88
  }).optional()
89
89
  }).openapi({ description: "Request payload to create a signed S3 upload URL." });
90
90
  const generateUploadUrlResponseSchema = z.object({
91
- uploadUrl: z.string().url().openapi({
91
+ uploadUrl: z.url().openapi({
92
92
  description: "Pre-signed URL that accepts a PUT request to upload the file to S3.",
93
93
  example: "https://example-bucket.s3.amazonaws.com/org-id/file.png?X-Amz-Signature=..."
94
94
  }),
@@ -108,7 +108,7 @@ const generateUploadUrlResponseSchema = z.object({
108
108
  description: "MIME type that should be used when uploading the file.",
109
109
  example: "image/png"
110
110
  }),
111
- publicUrl: z.string().url().openapi({
111
+ publicUrl: z.url().openapi({
112
112
  description: "Publicly accessible URL (or CDN URL when requested) that can be used to read the uploaded file.",
113
113
  example: "https://cdn.example.com/org-id/file.png"
114
114
  })
package/api/upload.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"upload.js","names":[],"sources":["../../src/api/upload.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nconst idSchema = z.string().min(1).max(128);\n\nexport const uploadOrganizationIdSchema = idSchema.openapi({\n\tdescription: \"Identifier of the organization that owns the uploaded file.\",\n\texample: \"org_01HZYFG9W5V6YB5R6T6V7N9M2Q\",\n});\n\nexport const uploadWebsiteIdSchema = idSchema.openapi({\n\tdescription: \"Identifier of the website associated with the uploaded file.\",\n\texample: \"site_01HZYFH3KJ3MYHJJ3JJ6Y2RNAV\",\n});\n\nexport const uploadConversationIdSchema = idSchema.openapi({\n\tdescription: \"Conversation identifier that will scope the uploaded asset.\",\n\texample: \"conv_01HZYFJ5P7DQ0VE8F68G5VYBAQ\",\n});\n\nexport const uploadUserIdSchema = idSchema.openapi({\n\tdescription: \"User identifier that will scope the uploaded asset.\",\n\texample: \"user_01HZYFKJS3K0M9W6PQZ0J6G1WR\",\n});\n\nexport const uploadContactIdSchema = idSchema.openapi({\n\tdescription: \"Contact identifier that will scope the uploaded asset.\",\n\texample: \"contact_01HZYFMN7J2J4F2SW3Q2N1H0D9\",\n});\n\nexport const uploadVisitorIdSchema = idSchema.openapi({\n\tdescription: \"Visitor identifier that will scope the uploaded asset.\",\n\texample: \"visitor_01HZYFPQ8R2FK1D9V7ZQ6CG6TN\",\n});\n\nexport const uploadPathSchema = z.string().max(512).openapi({\n\tdescription:\n\t\t\"Optional relative path used to group uploads inside the bucket. Nested paths are supported.\",\n\texample: \"assets/avatars\",\n});\n\nexport const uploadFileNameSchema = z\n\t.string()\n\t.min(1)\n\t.max(128)\n\t.regex(/^[^\\\\/]+$/)\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Optional file name to use for the object. Invalid characters will be sanitized on the server side.\",\n\t\texample: \"profile-picture.png\",\n\t});\n\nexport const uploadFileExtensionSchema = z\n\t.string()\n\t.min(1)\n\t.max(16)\n\t.regex(/^[a-zA-Z0-9]+$/)\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Optional file extension without the leading dot. Use this when providing a custom file name without an extension.\",\n\t\texample: \"png\",\n\t});\n\nconst baseScope = {\n\torganizationId: uploadOrganizationIdSchema,\n\twebsiteId: uploadWebsiteIdSchema,\n};\n\nexport const uploadScopeConversationSchema = z\n\t.object({\n\t\t...baseScope,\n\t\ttype: z.literal(\"conversation\"),\n\t\tconversationId: uploadConversationIdSchema,\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Scope uploads to a specific conversation. Files will be placed under /{organizationId}/{websiteId}/{conversationId}.\",\n\t});\n\nexport const uploadScopeUserSchema = z\n\t.object({\n\t\t...baseScope,\n\t\ttype: z.literal(\"user\"),\n\t\tuserId: uploadUserIdSchema,\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Scope uploads to a specific user. Files will be placed under /{organizationId}/{websiteId}/{userId}.\",\n\t});\n\nexport const uploadScopeContactSchema = z\n\t.object({\n\t\t...baseScope,\n\t\ttype: z.literal(\"contact\"),\n\t\tcontactId: uploadContactIdSchema,\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Scope uploads to a specific contact. Files will be placed under /{organizationId}/{websiteId}/{contactId}.\",\n\t});\n\nexport const uploadScopeVisitorSchema = z\n\t.object({\n\t\t...baseScope,\n\t\ttype: z.literal(\"visitor\"),\n\t\tvisitorId: uploadVisitorIdSchema,\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Scope uploads to a specific visitor. Files will be placed under /{organizationId}/{websiteId}/{visitorId}.\",\n\t});\n\nexport const uploadScopeSchema = z\n\t.discriminatedUnion(\"type\", [\n\t\tuploadScopeConversationSchema,\n\t\tuploadScopeUserSchema,\n\t\tuploadScopeContactSchema,\n\t\tuploadScopeVisitorSchema,\n\t])\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Defines how uploaded files should be grouped inside the S3 bucket.\",\n\t});\n\nexport const generateUploadUrlRequestSchema = z\n\t.object({\n\t\tcontentType: z.string().min(1).max(256).openapi({\n\t\t\tdescription: \"MIME type of the file to upload.\",\n\t\t\texample: \"image/png\",\n\t\t}),\n\t\twebsiteId: z.string(),\n\t\tscope: uploadScopeSchema,\n\t\tpath: uploadPathSchema.optional(),\n\t\tfileName: uploadFileNameSchema.optional(),\n\t\tfileExtension: uploadFileExtensionSchema.optional(),\n\t\tuseCdn: z.boolean().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Set to true to place the file under the /cdn prefix so it is cached by the CDN.\",\n\t\t\texample: true,\n\t\t}),\n\t\texpiresInSeconds: z\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.min(60)\n\t\t\t.max(3600)\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Number of seconds before the signed URL expires. Defaults to 900 seconds (15 minutes).\",\n\t\t\t\texample: 900,\n\t\t\t})\n\t\t\t.optional(),\n\t})\n\t.openapi({\n\t\tdescription: \"Request payload to create a signed S3 upload URL.\",\n\t});\n\nexport type GenerateUploadUrlRequest = z.infer<\n\ttypeof generateUploadUrlRequestSchema\n>;\n\nexport const generateUploadUrlResponseSchema = z\n\t.object({\n\t\tuploadUrl: z.string().url().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Pre-signed URL that accepts a PUT request to upload the file to S3.\",\n\t\t\texample:\n\t\t\t\t\"https://example-bucket.s3.amazonaws.com/org-id/file.png?X-Amz-Signature=...\",\n\t\t}),\n\t\tkey: z.string().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Resolved object key that can be used to reference the uploaded asset.\",\n\t\t\texample: \"01JG000000000000000000000/assets/file.png\",\n\t\t}),\n\t\tbucket: z.string().openapi({\n\t\t\tdescription: \"Name of the S3 bucket that will receive the upload.\",\n\t\t\texample: \"cossistant-uploads\",\n\t\t}),\n\t\texpiresAt: z.string().openapi({\n\t\t\tdescription: \"ISO timestamp indicating when the signed URL will expire.\",\n\t\t\texample: \"2024-01-01T12:00:00.000Z\",\n\t\t}),\n\t\tcontentType: z.string().openapi({\n\t\t\tdescription: \"MIME type that should be used when uploading the file.\",\n\t\t\texample: \"image/png\",\n\t\t}),\n\t\tpublicUrl: z.string().url().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Publicly accessible URL (or CDN URL when requested) that can be used to read the uploaded file.\",\n\t\t\texample: \"https://cdn.example.com/org-id/file.png\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response payload containing the signed upload URL.\",\n\t});\n\nexport type GenerateUploadUrlResponse = z.infer<\n\ttypeof generateUploadUrlResponseSchema\n>;\n"],"mappings":";;;AAEA,MAAM,WAAW,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,IAAI;AAE3C,MAAa,6BAA6B,SAAS,QAAQ;CAC1D,aAAa;CACb,SAAS;CACT,CAAC;AAEF,MAAa,wBAAwB,SAAS,QAAQ;CACrD,aAAa;CACb,SAAS;CACT,CAA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C/B,mBAAmB,QAAQ;CAC3B;CACA;CACA;CACA;CACA,CAAC,CACD,QAAQ,EACR,aACC,sEACD,CAAC;AAEH,MAAa,iCAAiC,EAC5C,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,QAAQ;EAC/C,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ;CACrB,OAAO;CACP,MAAM,iBAAiB,UAAU;CACjC,UAAU,qBAAqB,UAAU;CACzC,eAAe,0BAA0B,UAAU;CACnD,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,QAAQ;EACtC,aACC;EACD,SAAS;EACT,CAAC;CACF,kBAAkB,EAChB,QAAQ,CACR,KAAK,CACL,IAAI,GAAG,CACP,IAAI,KAAK,CACT,QAAQ;EACR,aACC;EACD,SAAS;EACT,CAAC,CACD,UAAU;CACZ,CAAC,CACD,QAAQ,EACR,aAAa,qDACb,CAAC;AAMH,MAAa,kCAAkC,EAC7C,OAAO;CACP,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ;EACnC,aACC;EACD,SACC;EACD,CAAC;CACF,KAAK,EAAE,QAAQ,CAAC,QAAQ;EACvB,aACC;EACD,SAAS;EACT,CAAC;CACF,QAAQ,EAAE,QAAQ,CAAC,QAAQ;EAC1B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ;EACnC,aACC;EACD,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,sDACb,CAAC"}
1
+ {"version":3,"file":"upload.js","names":[],"sources":["../../src/api/upload.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\nconst idSchema = z.string().min(1).max(128);\n\nexport const uploadOrganizationIdSchema = idSchema.openapi({\n\tdescription: \"Identifier of the organization that owns the uploaded file.\",\n\texample: \"org_01HZYFG9W5V6YB5R6T6V7N9M2Q\",\n});\n\nexport const uploadWebsiteIdSchema = idSchema.openapi({\n\tdescription: \"Identifier of the website associated with the uploaded file.\",\n\texample: \"site_01HZYFH3KJ3MYHJJ3JJ6Y2RNAV\",\n});\n\nexport const uploadConversationIdSchema = idSchema.openapi({\n\tdescription: \"Conversation identifier that will scope the uploaded asset.\",\n\texample: \"conv_01HZYFJ5P7DQ0VE8F68G5VYBAQ\",\n});\n\nexport const uploadUserIdSchema = idSchema.openapi({\n\tdescription: \"User identifier that will scope the uploaded asset.\",\n\texample: \"user_01HZYFKJS3K0M9W6PQZ0J6G1WR\",\n});\n\nexport const uploadContactIdSchema = idSchema.openapi({\n\tdescription: \"Contact identifier that will scope the uploaded asset.\",\n\texample: \"contact_01HZYFMN7J2J4F2SW3Q2N1H0D9\",\n});\n\nexport const uploadVisitorIdSchema = idSchema.openapi({\n\tdescription: \"Visitor identifier that will scope the uploaded asset.\",\n\texample: \"visitor_01HZYFPQ8R2FK1D9V7ZQ6CG6TN\",\n});\n\nexport const uploadPathSchema = z.string().max(512).openapi({\n\tdescription:\n\t\t\"Optional relative path used to group uploads inside the bucket. Nested paths are supported.\",\n\texample: \"assets/avatars\",\n});\n\nexport const uploadFileNameSchema = z\n\t.string()\n\t.min(1)\n\t.max(128)\n\t.regex(/^[^\\\\/]+$/)\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Optional file name to use for the object. Invalid characters will be sanitized on the server side.\",\n\t\texample: \"profile-picture.png\",\n\t});\n\nexport const uploadFileExtensionSchema = z\n\t.string()\n\t.min(1)\n\t.max(16)\n\t.regex(/^[a-zA-Z0-9]+$/)\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Optional file extension without the leading dot. Use this when providing a custom file name without an extension.\",\n\t\texample: \"png\",\n\t});\n\nconst baseScope = {\n\torganizationId: uploadOrganizationIdSchema,\n\twebsiteId: uploadWebsiteIdSchema,\n};\n\nexport const uploadScopeConversationSchema = z\n\t.object({\n\t\t...baseScope,\n\t\ttype: z.literal(\"conversation\"),\n\t\tconversationId: uploadConversationIdSchema,\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Scope uploads to a specific conversation. Files will be placed under /{organizationId}/{websiteId}/{conversationId}.\",\n\t});\n\nexport const uploadScopeUserSchema = z\n\t.object({\n\t\t...baseScope,\n\t\ttype: z.literal(\"user\"),\n\t\tuserId: uploadUserIdSchema,\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Scope uploads to a specific user. Files will be placed under /{organizationId}/{websiteId}/{userId}.\",\n\t});\n\nexport const uploadScopeContactSchema = z\n\t.object({\n\t\t...baseScope,\n\t\ttype: z.literal(\"contact\"),\n\t\tcontactId: uploadContactIdSchema,\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Scope uploads to a specific contact. Files will be placed under /{organizationId}/{websiteId}/{contactId}.\",\n\t});\n\nexport const uploadScopeVisitorSchema = z\n\t.object({\n\t\t...baseScope,\n\t\ttype: z.literal(\"visitor\"),\n\t\tvisitorId: uploadVisitorIdSchema,\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Scope uploads to a specific visitor. Files will be placed under /{organizationId}/{websiteId}/{visitorId}.\",\n\t});\n\nexport const uploadScopeSchema = z\n\t.discriminatedUnion(\"type\", [\n\t\tuploadScopeConversationSchema,\n\t\tuploadScopeUserSchema,\n\t\tuploadScopeContactSchema,\n\t\tuploadScopeVisitorSchema,\n\t])\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Defines how uploaded files should be grouped inside the S3 bucket.\",\n\t});\n\nexport const generateUploadUrlRequestSchema = z\n\t.object({\n\t\tcontentType: z.string().min(1).max(256).openapi({\n\t\t\tdescription: \"MIME type of the file to upload.\",\n\t\t\texample: \"image/png\",\n\t\t}),\n\t\twebsiteId: z.string(),\n\t\tscope: uploadScopeSchema,\n\t\tpath: uploadPathSchema.optional(),\n\t\tfileName: uploadFileNameSchema.optional(),\n\t\tfileExtension: uploadFileExtensionSchema.optional(),\n\t\tuseCdn: z.boolean().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Set to true to place the file under the /cdn prefix so it is cached by the CDN.\",\n\t\t\texample: true,\n\t\t}),\n\t\texpiresInSeconds: z\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.min(60)\n\t\t\t.max(3600)\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Number of seconds before the signed URL expires. Defaults to 900 seconds (15 minutes).\",\n\t\t\t\texample: 900,\n\t\t\t})\n\t\t\t.optional(),\n\t})\n\t.openapi({\n\t\tdescription: \"Request payload to create a signed S3 upload URL.\",\n\t});\n\nexport type GenerateUploadUrlRequest = z.infer<\n\ttypeof generateUploadUrlRequestSchema\n>;\n\nexport const generateUploadUrlResponseSchema = z\n\t.object({\n\t\tuploadUrl: z.url().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Pre-signed URL that accepts a PUT request to upload the file to S3.\",\n\t\t\texample:\n\t\t\t\t\"https://example-bucket.s3.amazonaws.com/org-id/file.png?X-Amz-Signature=...\",\n\t\t}),\n\t\tkey: z.string().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Resolved object key that can be used to reference the uploaded asset.\",\n\t\t\texample: \"01JG000000000000000000000/assets/file.png\",\n\t\t}),\n\t\tbucket: z.string().openapi({\n\t\t\tdescription: \"Name of the S3 bucket that will receive the upload.\",\n\t\t\texample: \"cossistant-uploads\",\n\t\t}),\n\t\texpiresAt: z.string().openapi({\n\t\t\tdescription: \"ISO timestamp indicating when the signed URL will expire.\",\n\t\t\texample: \"2024-01-01T12:00:00.000Z\",\n\t\t}),\n\t\tcontentType: z.string().openapi({\n\t\t\tdescription: \"MIME type that should be used when uploading the file.\",\n\t\t\texample: \"image/png\",\n\t\t}),\n\t\tpublicUrl: z.url().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Publicly accessible URL (or CDN URL when requested) that can be used to read the uploaded file.\",\n\t\t\texample: \"https://cdn.example.com/org-id/file.png\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response payload containing the signed upload URL.\",\n\t});\n\nexport type GenerateUploadUrlResponse = z.infer<\n\ttypeof generateUploadUrlResponseSchema\n>;\n"],"mappings":";;;AAEA,MAAM,WAAW,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,IAAI;AAE3C,MAAa,6BAA6B,SAAS,QAAQ;CAC1D,aAAa;CACb,SAAS;CACT,CAAC;AAEF,MAAa,wBAAwB,SAAS,QAAQ;CACrD,aAAa;CACb,SAAS;CACT,CAAC;AAEF,MAAa,6BAA6B,SAAS,QAAQ;CAC1D,aAAa;CACb,SAAS;CACT,CAAC;AAEF,MAAa,qBAAqB,SAAS,QAAQ;CAClD,aAAa;CACb,SAAS;CACT,CAAC;AAEF,MAAa,wBAAwB,SAAS,QAAQ;CACrD,aAAa;CACb,SAAS;CACT,CAAC;AAEF,MAAa,wBAAwB,SAAS,QAAQ;CACrD,aAAa;CACb,SAAS;CACT,CAAC;AAEF,MAAa,mBAAmB,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ;CAC3D,aACC;CACD,SAAS;CACT,CAAC;AAEF,MAAa,uBAAuB,EAClC,QAAQ,CACR,IAAI,EAAE,CACN,IAAI,IAAI,CACR,MAAM,YAAY,CAClB,QAAQ;CACR,aACC;CACD,SAAS;CACT,CAAC;AAEH,MAAa,4BAA4B,EACvC,QAAQ,CACR,IAAI,EAAE,CACN,IAAI,GAAG,CACP,MAAM,iBAAiB,CACvB,QAAQ;CACR,aACC;CACD,SAAS;CACT,CAAC;AAEH,MAAM,YAAY;CACjB,gBAAgB;CAChB,WAAW;CACX;AAED,MAAa,gCAAgC,EAC3C,OAAO;CACP,GAAG;CACH,MAAM,EAAE,QAAQ,eAAe;CAC/B,gBAAgB;CAChB,CAAC,CACD,QAAQ,E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CAAC,QAAQ;EAC1B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,KAAK,CAAC,QAAQ;EAC1B,aACC;EACD,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,sDACb,CAAC"}
package/api/website.d.ts CHANGED
@@ -36,7 +36,7 @@ declare const websiteSummarySchema: z.ZodObject<{
36
36
  name: z.ZodString;
37
37
  domain: z.ZodString;
38
38
  contactEmail: z.ZodNullable<z.ZodString>;
39
- logoUrl: z.ZodNullable<z.ZodString>;
39
+ logoUrl: z.ZodNullable<z.ZodURL>;
40
40
  organizationId: z.ZodULID;
41
41
  whitelistedDomains: z.ZodArray<z.ZodURL>;
42
42
  defaultParticipantIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
@@ -49,7 +49,7 @@ declare const websiteDeveloperSettingsResponseSchema: z.ZodObject<{
49
49
  name: z.ZodString;
50
50
  domain: z.ZodString;
51
51
  contactEmail: z.ZodNullable<z.ZodString>;
52
- logoUrl: z.ZodNullable<z.ZodString>;
52
+ logoUrl: z.ZodNullable<z.ZodURL>;
53
53
  organizationId: z.ZodULID;
54
54
  whitelistedDomains: z.ZodArray<z.ZodURL>;
55
55
  defaultParticipantIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
@@ -96,7 +96,7 @@ declare const updateWebsiteRequestSchema: z.ZodObject<{
96
96
  domain: z.ZodOptional<z.ZodString>;
97
97
  contactEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
98
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
- logoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ logoUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
100
100
  whitelistedDomains: z.ZodOptional<z.ZodArray<z.ZodURL>>;
101
101
  defaultParticipantIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
102
102
  installationTarget: z.ZodOptional<z.ZodEnum<{
@@ -207,7 +207,7 @@ declare const websiteListItemSchema: z.ZodObject<{
207
207
  id: z.ZodULID;
208
208
  name: z.ZodString;
209
209
  slug: z.ZodString;
210
- logoUrl: z.ZodNullable<z.ZodString>;
210
+ logoUrl: z.ZodNullable<z.ZodURL>;
211
211
  domain: z.ZodString;
212
212
  organizationId: z.ZodULID;
213
213
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"website.d.ts","names":[],"sources":["../../src/api/website.ts"],"sourcesContent":[],"mappings":";;;;;;AAOA;cAAa,4BAA0B,CAAA,CAAA;;;;;IAAA,SAAA,MAAA,EAAA,QAAA;IAAA,SAAA,KAAA,EAAA,OAAA;EA8B3B,CAAA,CAAA;AASZ,CAAA,eAAa,CAAA;KATD,oBAAA,GAAuB,CAAA,CAAE,aAAa;cASrC,qBAAmB,CAAA,CAAA;;;;;;;;;;;;EAAA,SAAA,eAAA,YAAA,CAAA;CAAA,eAAA,CAAA;AA6CpB,KAAA,aAAA,GAAgB,CAAA,CAAE,KAAa,CAAA,OAAA,mBAAR,CAAA;AAEtB,cAAA,oBA6CV,EA7C8B,CAAA,CAAA,SA6C9B,CAAA;;;;;;;;;;;KAES,cAAA,GAAiB,CAAA,CAAE,aAAa;cAE/B,wCAAsC,CAAA,CAAA;;;;IAjDlB,IAAA,aAAA;IAAA,MAAA,aAAA;IA+CrB,YAAA,eAAgC,YAAA,CAAA;IAE/B,OAAA,eAAA,YAAA,CAAA;;;;;;;;;;;;;;;;;;;;KAUD,gCAAA,GAAmC,CAAA,CAAE,aACzC;cAGK,kCAAgC,CAAA,CAAA;;;;;;;;;;KA2BjC,0BAAA,GAA6B,CAAA,CAAE,aACnC;cAGK,kCAAgC,CAAA,CAAA;EA7CM,cAAA,WAAA;EAAA,SAAA,WAAA;EAUvC,QA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