@djangocfg/api 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/index.cjs +18173 -8526
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +15000 -5567
  4. package/dist/index.d.ts +15000 -5567
  5. package/dist/index.mjs +17990 -8659
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +17 -17
  8. package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -2
  9. package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -1
  10. package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -6
  11. package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +1 -1
  12. package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -2
  13. package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +876 -0
  14. package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -6
  15. package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -1
  16. package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -3
  17. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -1
  18. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -6
  19. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -1
  20. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -2
  21. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -3
  22. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -1
  23. package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +171 -171
  24. package/src/cfg/generated/_utils/fetchers/cfg__payments__webhooks.ts +5 -5
  25. package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -12
  26. package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -10
  27. package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
  28. package/src/cfg/generated/_utils/hooks/cfg__knowbase.ts +997 -0
  29. package/src/cfg/generated/_utils/hooks/index.ts +1 -0
  30. package/src/cfg/generated/_utils/schemas/ArchiveItem.schema.ts +33 -0
  31. package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +29 -0
  32. package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +30 -0
  33. package/src/cfg/generated/_utils/schemas/ArchiveItemChunkRequest.schema.ts +22 -0
  34. package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +35 -0
  35. package/src/cfg/generated/_utils/schemas/ArchiveItemRequest.schema.ts +22 -0
  36. package/src/cfg/generated/_utils/schemas/ArchiveProcessingResult.schema.ts +26 -0
  37. package/src/cfg/generated/_utils/schemas/ArchiveSearchRequestRequest.schema.ts +25 -0
  38. package/src/cfg/generated/_utils/schemas/ArchiveSearchResult.schema.ts +24 -0
  39. package/src/cfg/generated/_utils/schemas/ArchiveStatistics.schema.ts +28 -0
  40. package/src/cfg/generated/_utils/schemas/ChatHistory.schema.ts +22 -0
  41. package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +27 -0
  42. package/src/cfg/generated/_utils/schemas/ChatQueryRequest.schema.ts +22 -0
  43. package/src/cfg/generated/_utils/schemas/ChatResponse.schema.ts +26 -0
  44. package/src/cfg/generated/_utils/schemas/ChatResponseRequest.schema.ts +26 -0
  45. package/src/cfg/generated/_utils/schemas/ChatSession.schema.ts +29 -0
  46. package/src/cfg/generated/_utils/schemas/ChatSessionCreateRequest.schema.ts +22 -0
  47. package/src/cfg/generated/_utils/schemas/ChatSessionRequest.schema.ts +25 -0
  48. package/src/cfg/generated/_utils/schemas/ChatSource.schema.ts +21 -0
  49. package/src/cfg/generated/_utils/schemas/ChatSourceRequest.schema.ts +21 -0
  50. package/src/cfg/generated/_utils/schemas/ChunkRevectorizationRequestRequest.schema.ts +20 -0
  51. package/src/cfg/generated/_utils/schemas/Document.schema.ts +32 -0
  52. package/src/cfg/generated/_utils/schemas/DocumentArchive.schema.ts +44 -0
  53. package/src/cfg/generated/_utils/schemas/DocumentArchiveDetail.schema.ts +48 -0
  54. package/src/cfg/generated/_utils/schemas/DocumentArchiveList.schema.ts +35 -0
  55. package/src/cfg/generated/_utils/schemas/DocumentArchiveRequest.schema.ts +21 -0
  56. package/src/cfg/generated/_utils/schemas/DocumentCategory.schema.ts +23 -0
  57. package/src/cfg/generated/_utils/schemas/DocumentCategoryRequest.schema.ts +21 -0
  58. package/src/cfg/generated/_utils/schemas/DocumentCreateRequest.schema.ts +22 -0
  59. package/src/cfg/generated/_utils/schemas/DocumentProcessingStatus.schema.ts +23 -0
  60. package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +22 -0
  61. package/src/cfg/generated/_utils/schemas/DocumentStats.schema.ts +25 -0
  62. package/src/cfg/generated/_utils/schemas/PaginatedArchiveItemChunkList.schema.ts +24 -0
  63. package/src/cfg/generated/_utils/schemas/PaginatedArchiveItemList.schema.ts +24 -0
  64. package/src/cfg/generated/_utils/schemas/PaginatedArchiveSearchResultList.schema.ts +24 -0
  65. package/src/cfg/generated/_utils/schemas/PaginatedChatResponseList.schema.ts +24 -0
  66. package/src/cfg/generated/_utils/schemas/PaginatedChatSessionList.schema.ts +24 -0
  67. package/src/cfg/generated/_utils/schemas/PaginatedDocumentArchiveListList.schema.ts +24 -0
  68. package/src/cfg/generated/_utils/schemas/PaginatedDocumentList.schema.ts +24 -0
  69. package/src/cfg/generated/_utils/schemas/PaginatedPublicCategoryList.schema.ts +24 -0
  70. package/src/cfg/generated/_utils/schemas/PaginatedPublicDocumentListList.schema.ts +24 -0
  71. package/src/cfg/generated/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +22 -0
  72. package/src/cfg/generated/_utils/schemas/PatchedArchiveItemRequest.schema.ts +22 -0
  73. package/src/cfg/generated/_utils/schemas/PatchedChatResponseRequest.schema.ts +26 -0
  74. package/src/cfg/generated/_utils/schemas/PatchedChatSessionRequest.schema.ts +25 -0
  75. package/src/cfg/generated/_utils/schemas/PatchedDocumentArchiveRequest.schema.ts +21 -0
  76. package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +22 -0
  77. package/src/cfg/generated/_utils/schemas/PublicCategory.schema.ts +21 -0
  78. package/src/cfg/generated/_utils/schemas/PublicDocument.schema.ts +25 -0
  79. package/src/cfg/generated/_utils/schemas/PublicDocumentList.schema.ts +24 -0
  80. package/src/cfg/generated/_utils/schemas/VectorizationResult.schema.ts +24 -0
  81. package/src/cfg/generated/_utils/schemas/VectorizationStatistics.schema.ts +26 -0
  82. package/src/cfg/generated/_utils/schemas/index.ts +52 -0
  83. package/src/cfg/generated/cfg__accounts/client.ts +1 -1
  84. package/src/cfg/generated/cfg__accounts__auth/client.ts +1 -1
  85. package/src/cfg/generated/cfg__accounts__user_profile/client.ts +1 -1
  86. package/src/cfg/generated/cfg__endpoints/client.ts +1 -1
  87. package/src/cfg/generated/cfg__health/client.ts +1 -1
  88. package/src/cfg/generated/cfg__knowbase/client.ts +666 -0
  89. package/src/cfg/generated/cfg__knowbase/index.ts +2 -0
  90. package/src/cfg/generated/cfg__knowbase/models.ts +1120 -0
  91. package/src/cfg/generated/cfg__leads/client.ts +1 -1
  92. package/src/cfg/generated/cfg__leads__lead_submission/client.ts +1 -1
  93. package/src/cfg/generated/cfg__newsletter/client.ts +1 -1
  94. package/src/cfg/generated/cfg__newsletter__bulk_email/client.ts +1 -1
  95. package/src/cfg/generated/cfg__newsletter__campaigns/client.ts +1 -1
  96. package/src/cfg/generated/cfg__newsletter__logs/client.ts +1 -1
  97. package/src/cfg/generated/cfg__newsletter__newsletters/client.ts +1 -1
  98. package/src/cfg/generated/cfg__newsletter__subscriptions/client.ts +1 -1
  99. package/src/cfg/generated/cfg__newsletter__testing/client.ts +1 -1
  100. package/src/cfg/generated/cfg__payments/client.ts +1 -1
  101. package/src/cfg/generated/cfg__payments__webhooks/client.ts +1 -1
  102. package/src/cfg/generated/cfg__support/client.ts +1 -1
  103. package/src/cfg/generated/cfg__tasks/client.ts +1 -1
  104. package/src/cfg/generated/client.ts +57 -54
  105. package/src/cfg/generated/enums.ts +241 -0
  106. package/src/cfg/generated/index.ts +81 -27
  107. package/src/cfg/generated/schema.ts +10236 -4400
  108. package/src/index.ts +4 -1
@@ -36,6 +36,7 @@ export * from './cfg__payments__webhooks'
36
36
  export * from './cfg__accounts'
37
37
  export * from './cfg__endpoints'
38
38
  export * from './cfg__health'
39
+ export * from './cfg__knowbase'
39
40
  export * from './cfg__leads'
40
41
  export * from './cfg__newsletter'
41
42
  export * from './cfg__payments'
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Zod schema for ArchiveItem
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Archive item serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import * as Enums from '../../enums'
9
+
10
+ /**
11
+ * Archive item serializer.
12
+ */
13
+ export const ArchiveItemSchema = z.object({
14
+ id: z.uuid(),
15
+ relative_path: z.string().max(1024),
16
+ item_name: z.string().max(255),
17
+ item_type: z.string().max(100),
18
+ content_type: z.nativeEnum(Enums.ArchiveItemContentType),
19
+ file_size: z.int().min(0.0).max(9.223372036854776e+18).optional(),
20
+ is_processable: z.boolean(),
21
+ language: z.string(),
22
+ encoding: z.string(),
23
+ chunks_count: z.int(),
24
+ total_tokens: z.int(),
25
+ processing_cost: z.number(),
26
+ created_at: z.iso.datetime(),
27
+ updated_at: z.iso.datetime(),
28
+ })
29
+
30
+ /**
31
+ * Infer TypeScript type from Zod schema
32
+ */
33
+ export type ArchiveItem = z.infer<typeof ArchiveItemSchema>
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Zod schema for ArchiveItemChunk
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Archive item chunk serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import * as Enums from '../../enums'
9
+
10
+ /**
11
+ * Archive item chunk serializer.
12
+ */
13
+ export const ArchiveItemChunkSchema = z.object({
14
+ id: z.uuid(),
15
+ content: z.string(),
16
+ chunk_index: z.int().min(0.0).max(9.223372036854776e+18),
17
+ chunk_type: z.nativeEnum(Enums.ArchiveItemChunkChunkType).optional(),
18
+ token_count: z.int(),
19
+ character_count: z.int(),
20
+ embedding_model: z.string(),
21
+ embedding_cost: z.number(),
22
+ context_summary: z.record(z.string(), z.any()),
23
+ created_at: z.iso.datetime(),
24
+ })
25
+
26
+ /**
27
+ * Infer TypeScript type from Zod schema
28
+ */
29
+ export type ArchiveItemChunk = z.infer<typeof ArchiveItemChunkSchema>
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Zod schema for ArchiveItemChunkDetail
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Detailed chunk serializer with full context.
6
+ * */
7
+ import { z } from 'zod'
8
+ import * as Enums from '../../enums'
9
+
10
+ /**
11
+ * Detailed chunk serializer with full context.
12
+ */
13
+ export const ArchiveItemChunkDetailSchema = z.object({
14
+ id: z.uuid(),
15
+ content: z.string(),
16
+ chunk_index: z.int().min(0.0).max(9.223372036854776e+18),
17
+ chunk_type: z.nativeEnum(Enums.ArchiveItemChunkDetailChunkType).optional(),
18
+ token_count: z.int(),
19
+ character_count: z.int(),
20
+ embedding_model: z.string(),
21
+ embedding_cost: z.number(),
22
+ context_summary: z.record(z.string(), z.any()),
23
+ created_at: z.iso.datetime(),
24
+ context_metadata: z.string(),
25
+ })
26
+
27
+ /**
28
+ * Infer TypeScript type from Zod schema
29
+ */
30
+ export type ArchiveItemChunkDetail = z.infer<typeof ArchiveItemChunkDetailSchema>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for ArchiveItemChunkRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Archive item chunk serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import * as Enums from '../../enums'
9
+
10
+ /**
11
+ * Archive item chunk serializer.
12
+ */
13
+ export const ArchiveItemChunkRequestSchema = z.object({
14
+ content: z.string().min(1),
15
+ chunk_index: z.int().min(0.0).max(9.223372036854776e+18),
16
+ chunk_type: z.nativeEnum(Enums.ArchiveItemChunkRequestChunkType).optional(),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type ArchiveItemChunkRequest = z.infer<typeof ArchiveItemChunkRequestSchema>
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Zod schema for ArchiveItemDetail
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Detailed archive item serializer with content.
6
+ * */
7
+ import { z } from 'zod'
8
+ import * as Enums from '../../enums'
9
+
10
+ /**
11
+ * Detailed archive item serializer with content.
12
+ */
13
+ export const ArchiveItemDetailSchema = z.object({
14
+ id: z.uuid(),
15
+ relative_path: z.string().max(1024),
16
+ item_name: z.string().max(255),
17
+ item_type: z.string().max(100),
18
+ content_type: z.nativeEnum(Enums.ArchiveItemDetailContentType),
19
+ file_size: z.int().min(0.0).max(9.223372036854776e+18).optional(),
20
+ is_processable: z.boolean(),
21
+ language: z.string(),
22
+ encoding: z.string(),
23
+ chunks_count: z.int(),
24
+ total_tokens: z.int(),
25
+ processing_cost: z.number(),
26
+ created_at: z.iso.datetime(),
27
+ updated_at: z.iso.datetime(),
28
+ raw_content: z.string(),
29
+ metadata: z.string(),
30
+ })
31
+
32
+ /**
33
+ * Infer TypeScript type from Zod schema
34
+ */
35
+ export type ArchiveItemDetail = z.infer<typeof ArchiveItemDetailSchema>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for ArchiveItemRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Archive item serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Archive item serializer.
11
+ */
12
+ export const ArchiveItemRequestSchema = z.object({
13
+ relative_path: z.string().min(1).max(1024),
14
+ item_name: z.string().min(1).max(255),
15
+ item_type: z.string().min(1).max(100),
16
+ file_size: z.int().min(0.0).max(9.223372036854776e+18).optional(),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type ArchiveItemRequest = z.infer<typeof ArchiveItemRequestSchema>
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Zod schema for ArchiveProcessingResult
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Archive processing result serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Archive processing result serializer.
11
+ */
12
+ export const ArchiveProcessingResultSchema = z.object({
13
+ archive_id: z.uuid(),
14
+ status: z.string(),
15
+ processing_time_ms: z.int(),
16
+ items_processed: z.int(),
17
+ chunks_created: z.int(),
18
+ vectorized_chunks: z.int(),
19
+ total_cost_usd: z.number(),
20
+ error_message: z.string(),
21
+ })
22
+
23
+ /**
24
+ * Infer TypeScript type from Zod schema
25
+ */
26
+ export type ArchiveProcessingResult = z.infer<typeof ArchiveProcessingResultSchema>
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Zod schema for ArchiveSearchRequestRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Archive search request serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Archive search request serializer.
11
+ */
12
+ export const ArchiveSearchRequestRequestSchema = z.object({
13
+ query: z.string().min(1).max(500),
14
+ content_types: z.array(z.string()).optional(),
15
+ languages: z.array(z.string().min(1).max(50)).optional(),
16
+ chunk_types: z.array(z.string()).optional(),
17
+ archive_ids: z.array(z.uuid()).optional(),
18
+ limit: z.int().min(1.0).max(50.0).optional(),
19
+ similarity_threshold: z.number().min(0.0).max(1.0).optional(),
20
+ })
21
+
22
+ /**
23
+ * Infer TypeScript type from Zod schema
24
+ */
25
+ export type ArchiveSearchRequestRequest = z.infer<typeof ArchiveSearchRequestRequestSchema>
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Zod schema for ArchiveSearchResult
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Archive search result serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { ArchiveItemChunkSchema } from './ArchiveItemChunk.schema'
9
+
10
+ /**
11
+ * Archive search result serializer.
12
+ */
13
+ export const ArchiveSearchResultSchema = z.object({
14
+ chunk: ArchiveItemChunkSchema,
15
+ similarity_score: z.number(),
16
+ context_summary: z.record(z.string(), z.any()),
17
+ archive_info: z.record(z.string(), z.any()),
18
+ item_info: z.record(z.string(), z.any()),
19
+ })
20
+
21
+ /**
22
+ * Infer TypeScript type from Zod schema
23
+ */
24
+ export type ArchiveSearchResult = z.infer<typeof ArchiveSearchResultSchema>
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Zod schema for ArchiveStatistics
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Archive statistics serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Archive statistics serializer.
11
+ */
12
+ export const ArchiveStatisticsSchema = z.object({
13
+ total_archives: z.int(),
14
+ processed_archives: z.int(),
15
+ failed_archives: z.int(),
16
+ total_items: z.int(),
17
+ total_chunks: z.int(),
18
+ total_tokens: z.int(),
19
+ total_cost: z.number(),
20
+ avg_processing_time: z.number(),
21
+ avg_items_per_archive: z.number(),
22
+ avg_chunks_per_archive: z.number(),
23
+ })
24
+
25
+ /**
26
+ * Infer TypeScript type from Zod schema
27
+ */
28
+ export type ArchiveStatistics = z.infer<typeof ArchiveStatisticsSchema>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for ChatHistory
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat history response serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { ChatMessageSchema } from './ChatMessage.schema'
9
+
10
+ /**
11
+ * Chat history response serializer.
12
+ */
13
+ export const ChatHistorySchema = z.object({
14
+ session_id: z.uuid(),
15
+ messages: z.array(ChatMessageSchema),
16
+ total_messages: z.int(),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type ChatHistory = z.infer<typeof ChatHistorySchema>
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Zod schema for ChatMessage
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat message response serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import * as Enums from '../../enums'
9
+
10
+ /**
11
+ * Chat message response serializer.
12
+ */
13
+ export const ChatMessageSchema = z.object({
14
+ id: z.uuid(),
15
+ role: z.nativeEnum(Enums.ChatMessageRole),
16
+ content: z.string(),
17
+ tokens_used: z.int().min(0.0).max(9.223372036854776e+18).optional(),
18
+ cost_usd: z.number(),
19
+ processing_time_ms: z.int().min(0.0).max(9.223372036854776e+18).optional(),
20
+ created_at: z.iso.datetime(),
21
+ context_chunks: z.string().optional(),
22
+ })
23
+
24
+ /**
25
+ * Infer TypeScript type from Zod schema
26
+ */
27
+ export type ChatMessage = z.infer<typeof ChatMessageSchema>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for ChatQueryRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat query request serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Chat query request serializer.
11
+ */
12
+ export const ChatQueryRequestSchema = z.object({
13
+ session_id: z.uuid().nullable().optional(),
14
+ query: z.string().min(1).max(2000),
15
+ max_tokens: z.int().min(1.0).max(4000.0).optional(),
16
+ include_sources: z.boolean().optional(),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type ChatQueryRequest = z.infer<typeof ChatQueryRequestSchema>
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Zod schema for ChatResponse
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat response serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { ChatSourceSchema } from './ChatSource.schema'
9
+
10
+ /**
11
+ * Chat response serializer.
12
+ */
13
+ export const ChatResponseSchema = z.object({
14
+ message_id: z.uuid(),
15
+ content: z.string(),
16
+ tokens_used: z.int(),
17
+ cost_usd: z.number(),
18
+ processing_time_ms: z.int(),
19
+ model_used: z.string(),
20
+ sources: z.array(ChatSourceSchema).nullable().optional(),
21
+ })
22
+
23
+ /**
24
+ * Infer TypeScript type from Zod schema
25
+ */
26
+ export type ChatResponse = z.infer<typeof ChatResponseSchema>
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Zod schema for ChatResponseRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat response serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import { ChatSourceRequestSchema } from './ChatSourceRequest.schema'
9
+
10
+ /**
11
+ * Chat response serializer.
12
+ */
13
+ export const ChatResponseRequestSchema = z.object({
14
+ message_id: z.uuid(),
15
+ content: z.string().min(1),
16
+ tokens_used: z.int(),
17
+ cost_usd: z.number(),
18
+ processing_time_ms: z.int(),
19
+ model_used: z.string().min(1),
20
+ sources: z.array(ChatSourceRequestSchema).nullable().optional(),
21
+ })
22
+
23
+ /**
24
+ * Infer TypeScript type from Zod schema
25
+ */
26
+ export type ChatResponseRequest = z.infer<typeof ChatResponseRequestSchema>
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Zod schema for ChatSession
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat session response serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Chat session response serializer.
11
+ */
12
+ export const ChatSessionSchema = z.object({
13
+ id: z.uuid(),
14
+ title: z.string().max(255).optional(),
15
+ is_active: z.boolean().optional(),
16
+ messages_count: z.int().min(0.0).max(9.223372036854776e+18).optional(),
17
+ total_tokens_used: z.int().min(0.0).max(9.223372036854776e+18).optional(),
18
+ total_cost_usd: z.number(),
19
+ model_name: z.string().max(100).optional(),
20
+ temperature: z.number().optional(),
21
+ max_context_chunks: z.int().min(0.0).max(9.223372036854776e+18).optional(),
22
+ created_at: z.iso.datetime(),
23
+ updated_at: z.iso.datetime(),
24
+ })
25
+
26
+ /**
27
+ * Infer TypeScript type from Zod schema
28
+ */
29
+ export type ChatSession = z.infer<typeof ChatSessionSchema>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Zod schema for ChatSessionCreateRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat session creation request serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Chat session creation request serializer.
11
+ */
12
+ export const ChatSessionCreateRequestSchema = z.object({
13
+ title: z.string().max(255).optional(),
14
+ model_name: z.string().min(1).max(100).optional(),
15
+ temperature: z.number().min(0.0).max(2.0).optional(),
16
+ max_context_chunks: z.int().min(1.0).max(10.0).optional(),
17
+ })
18
+
19
+ /**
20
+ * Infer TypeScript type from Zod schema
21
+ */
22
+ export type ChatSessionCreateRequest = z.infer<typeof ChatSessionCreateRequestSchema>
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Zod schema for ChatSessionRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat session response serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Chat session response serializer.
11
+ */
12
+ export const ChatSessionRequestSchema = z.object({
13
+ title: z.string().max(255).optional(),
14
+ is_active: z.boolean().optional(),
15
+ messages_count: z.int().min(0.0).max(9.223372036854776e+18).optional(),
16
+ total_tokens_used: z.int().min(0.0).max(9.223372036854776e+18).optional(),
17
+ model_name: z.string().min(1).max(100).optional(),
18
+ temperature: z.number().optional(),
19
+ max_context_chunks: z.int().min(0.0).max(9.223372036854776e+18).optional(),
20
+ })
21
+
22
+ /**
23
+ * Infer TypeScript type from Zod schema
24
+ */
25
+ export type ChatSessionRequest = z.infer<typeof ChatSessionRequestSchema>
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Zod schema for ChatSource
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat source document information serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Chat source document information serializer.
11
+ */
12
+ export const ChatSourceSchema = z.object({
13
+ document_title: z.string(),
14
+ chunk_content: z.string(),
15
+ similarity: z.number(),
16
+ })
17
+
18
+ /**
19
+ * Infer TypeScript type from Zod schema
20
+ */
21
+ export type ChatSource = z.infer<typeof ChatSourceSchema>
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Zod schema for ChatSourceRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chat source document information serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Chat source document information serializer.
11
+ */
12
+ export const ChatSourceRequestSchema = z.object({
13
+ document_title: z.string().min(1),
14
+ chunk_content: z.string().min(1),
15
+ similarity: z.number(),
16
+ })
17
+
18
+ /**
19
+ * Infer TypeScript type from Zod schema
20
+ */
21
+ export type ChatSourceRequest = z.infer<typeof ChatSourceRequestSchema>
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Zod schema for ChunkRevectorizationRequestRequest
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Chunk re-vectorization request serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Chunk re-vectorization request serializer.
11
+ */
12
+ export const ChunkRevectorizationRequestRequestSchema = z.object({
13
+ chunk_ids: z.array(z.uuid()),
14
+ force: z.boolean().optional(),
15
+ })
16
+
17
+ /**
18
+ * Infer TypeScript type from Zod schema
19
+ */
20
+ export type ChunkRevectorizationRequestRequest = z.infer<typeof ChunkRevectorizationRequestRequestSchema>
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Zod schema for Document
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Document response serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+
9
+ /**
10
+ * Document response serializer.
11
+ */
12
+ export const DocumentSchema = z.object({
13
+ id: z.uuid(),
14
+ title: z.string().max(512),
15
+ file_type: z.string().max(100).optional(),
16
+ file_size: z.int().min(0.0).max(9.223372036854776e+18).optional(),
17
+ processing_status: z.string(),
18
+ chunks_count: z.int(),
19
+ total_tokens: z.int(),
20
+ total_cost_usd: z.number(),
21
+ created_at: z.iso.datetime(),
22
+ updated_at: z.iso.datetime(),
23
+ processing_started_at: z.iso.datetime(),
24
+ processing_completed_at: z.iso.datetime(),
25
+ processing_error: z.string(),
26
+ metadata: z.string().nullable().optional(),
27
+ })
28
+
29
+ /**
30
+ * Infer TypeScript type from Zod schema
31
+ */
32
+ export type Document = z.infer<typeof DocumentSchema>
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Zod schema for DocumentArchive
3
+ *
4
+ * This schema provides runtime validation and type inference.
5
+ * * Document archive serializer.
6
+ * */
7
+ import { z } from 'zod'
8
+ import * as Enums from '../../enums'
9
+ import { DocumentCategorySchema } from './DocumentCategory.schema'
10
+
11
+ /**
12
+ * Document archive serializer.
13
+ */
14
+ export const DocumentArchiveSchema = z.object({
15
+ id: z.uuid(),
16
+ title: z.string().max(512),
17
+ description: z.string().optional(),
18
+ categories: z.array(DocumentCategorySchema),
19
+ is_public: z.boolean().optional(),
20
+ archive_file: z.url(),
21
+ original_filename: z.string(),
22
+ file_size: z.int(),
23
+ archive_type: z.nativeEnum(Enums.DocumentArchiveArchiveType),
24
+ processing_status: z.nativeEnum(Enums.DocumentArchiveProcessingStatus),
25
+ processed_at: z.iso.datetime().nullable(),
26
+ processing_duration_ms: z.int(),
27
+ processing_error: z.string(),
28
+ total_items: z.int(),
29
+ processed_items: z.int(),
30
+ total_chunks: z.int(),
31
+ vectorized_chunks: z.int(),
32
+ total_tokens: z.int(),
33
+ total_cost_usd: z.number(),
34
+ processing_progress: z.number(),
35
+ vectorization_progress: z.number(),
36
+ is_processed: z.boolean(),
37
+ created_at: z.iso.datetime(),
38
+ updated_at: z.iso.datetime(),
39
+ })
40
+
41
+ /**
42
+ * Infer TypeScript type from Zod schema
43
+ */
44
+ export type DocumentArchive = z.infer<typeof DocumentArchiveSchema>