@objectstack/spec 0.1.2 → 0.3.0

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 (152) hide show
  1. package/README.md +127 -5
  2. package/dist/ai/index.d.ts +14 -0
  3. package/dist/ai/index.d.ts.map +1 -0
  4. package/dist/ai/index.js +29 -0
  5. package/dist/ai/model-registry.zod.d.ts +1389 -0
  6. package/dist/ai/model-registry.zod.d.ts.map +1 -0
  7. package/dist/ai/model-registry.zod.js +164 -0
  8. package/dist/ai/nlq.zod.d.ts +1126 -0
  9. package/dist/ai/nlq.zod.d.ts.map +1 -0
  10. package/dist/ai/nlq.zod.js +246 -0
  11. package/dist/ai/rag-pipeline.zod.d.ts +1034 -0
  12. package/dist/ai/rag-pipeline.zod.d.ts.map +1 -0
  13. package/dist/ai/rag-pipeline.zod.js +244 -0
  14. package/dist/api/index.d.ts +9 -0
  15. package/dist/api/index.d.ts.map +1 -0
  16. package/dist/api/index.js +24 -0
  17. package/dist/data/filter.zod.d.ts +295 -0
  18. package/dist/data/filter.zod.d.ts.map +1 -0
  19. package/dist/data/filter.zod.js +226 -0
  20. package/dist/data/index.d.ts +21 -0
  21. package/dist/data/index.d.ts.map +1 -0
  22. package/dist/data/index.js +36 -0
  23. package/dist/data/query.zod.d.ts +386 -3
  24. package/dist/data/query.zod.d.ts.map +1 -1
  25. package/dist/data/query.zod.js +386 -3
  26. package/dist/data/validation.zod.d.ts +349 -0
  27. package/dist/data/validation.zod.d.ts.map +1 -1
  28. package/dist/data/validation.zod.js +395 -0
  29. package/dist/index.d.ts +36 -39
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +64 -47
  32. package/dist/system/auth-protocol.d.ts +175 -0
  33. package/dist/system/auth-protocol.d.ts.map +1 -0
  34. package/dist/system/auth-protocol.js +60 -0
  35. package/dist/system/auth.zod.d.ts +3319 -0
  36. package/dist/system/auth.zod.d.ts.map +1 -0
  37. package/dist/system/auth.zod.js +499 -0
  38. package/dist/system/datasource.zod.d.ts +118 -38
  39. package/dist/system/datasource.zod.d.ts.map +1 -1
  40. package/dist/system/datasource.zod.js +25 -6
  41. package/dist/system/driver.zod.d.ts +106 -0
  42. package/dist/system/driver.zod.d.ts.map +1 -1
  43. package/dist/system/driver.zod.js +47 -0
  44. package/dist/system/identity.zod.d.ts +234 -180
  45. package/dist/system/identity.zod.d.ts.map +1 -1
  46. package/dist/system/identity.zod.js +168 -51
  47. package/dist/system/index.d.ts +28 -0
  48. package/dist/system/index.d.ts.map +1 -0
  49. package/dist/system/index.js +43 -0
  50. package/dist/system/manifest.zod.d.ts +10 -10
  51. package/dist/system/organization.zod.d.ts +179 -0
  52. package/dist/system/organization.zod.d.ts.map +1 -0
  53. package/dist/system/organization.zod.js +129 -0
  54. package/dist/system/policy.zod.d.ts +10 -10
  55. package/dist/ui/action.zod.d.ts +2 -2
  56. package/dist/ui/dashboard.zod.d.ts +10 -10
  57. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  58. package/dist/ui/dashboard.zod.js +3 -2
  59. package/dist/ui/index.d.ts +17 -0
  60. package/dist/ui/index.d.ts.map +1 -0
  61. package/dist/ui/index.js +32 -0
  62. package/dist/ui/report.zod.d.ts +4 -32
  63. package/dist/ui/report.zod.d.ts.map +1 -1
  64. package/dist/ui/report.zod.js +3 -8
  65. package/dist/ui/theme.zod.d.ts +6 -6
  66. package/json-schema/Account.json +87 -0
  67. package/json-schema/AccountLinkingConfig.json +27 -0
  68. package/json-schema/AuthConfig.json +841 -0
  69. package/json-schema/AuthPluginConfig.json +28 -0
  70. package/json-schema/AuthStrategy.json +17 -0
  71. package/json-schema/AuthenticationConfig.json +601 -0
  72. package/json-schema/AuthenticationProvider.json +617 -0
  73. package/json-schema/CSRFConfig.json +31 -0
  74. package/json-schema/ChunkingStrategy.json +133 -0
  75. package/json-schema/ComparisonOperator.json +56 -0
  76. package/json-schema/Dashboard.json +20 -0
  77. package/json-schema/DashboardWidget.json +20 -0
  78. package/json-schema/DatabaseAdapter.json +38 -0
  79. package/json-schema/DatabaseMapping.json +48 -0
  80. package/json-schema/Datasource.json +25 -5
  81. package/json-schema/DatasourceCapabilities.json +25 -5
  82. package/json-schema/DocumentChunk.json +97 -0
  83. package/json-schema/DocumentLoaderConfig.json +69 -0
  84. package/json-schema/DocumentMetadata.json +61 -0
  85. package/json-schema/DriverCapabilities.json +30 -0
  86. package/json-schema/DriverDefinition.json +25 -5
  87. package/json-schema/DriverInterface.json +30 -0
  88. package/json-schema/EmailPasswordConfig.json +43 -0
  89. package/json-schema/EmbeddingModel.json +57 -0
  90. package/json-schema/EnterpriseAuthConfig.json +172 -0
  91. package/json-schema/Entity.json +55 -0
  92. package/json-schema/EqualityOperator.json +14 -0
  93. package/json-schema/FieldOperators.json +108 -0
  94. package/json-schema/FieldSynonymConfig.json +39 -0
  95. package/json-schema/FilterCondition.json +28 -0
  96. package/json-schema/Invitation.json +69 -0
  97. package/json-schema/InvitationStatus.json +15 -0
  98. package/json-schema/LDAPConfig.json +22 -5
  99. package/json-schema/MagicLinkConfig.json +21 -0
  100. package/json-schema/Member.json +46 -0
  101. package/json-schema/ModelCapability.json +47 -0
  102. package/json-schema/ModelConfig.json +181 -0
  103. package/json-schema/ModelLimits.json +45 -0
  104. package/json-schema/ModelPricing.json +28 -0
  105. package/json-schema/ModelProvider.json +19 -0
  106. package/json-schema/ModelRegistry.json +427 -0
  107. package/json-schema/ModelRegistryEntry.json +239 -0
  108. package/json-schema/ModelSelectionCriteria.json +50 -0
  109. package/json-schema/NLQAnalytics.json +106 -0
  110. package/json-schema/NLQFieldMapping.json +40 -0
  111. package/json-schema/NLQModelConfig.json +78 -0
  112. package/json-schema/NLQParseResult.json +252 -0
  113. package/json-schema/NLQRequest.json +110 -0
  114. package/json-schema/NLQResponse.json +288 -0
  115. package/json-schema/NLQTrainingExample.json +120 -0
  116. package/json-schema/NormalizedFilter.json +348 -0
  117. package/json-schema/OAuthProvider.json +66 -0
  118. package/json-schema/OIDCConfig.json +18 -3
  119. package/json-schema/Organization.json +52 -0
  120. package/json-schema/PasskeyConfig.json +54 -0
  121. package/json-schema/PromptTemplate.json +163 -0
  122. package/json-schema/PromptVariable.json +56 -0
  123. package/json-schema/QueryContext.json +72 -0
  124. package/json-schema/QueryFilter.json +34 -0
  125. package/json-schema/QueryIntent.json +21 -0
  126. package/json-schema/QueryTemplate.json +81 -0
  127. package/json-schema/RAGPipelineConfig.json +552 -0
  128. package/json-schema/RAGPipelineStatus.json +66 -0
  129. package/json-schema/RAGQueryRequest.json +64 -0
  130. package/json-schema/RAGQueryResponse.json +108 -0
  131. package/json-schema/RangeOperator.json +41 -0
  132. package/json-schema/RateLimitConfig.json +36 -0
  133. package/json-schema/Report.json +20 -26
  134. package/json-schema/RerankingConfig.json +34 -0
  135. package/json-schema/RetrievalStrategy.json +121 -0
  136. package/json-schema/SAMLConfig.json +17 -3
  137. package/json-schema/Session.json +63 -0
  138. package/json-schema/SessionConfig.json +56 -0
  139. package/json-schema/SetOperator.json +18 -0
  140. package/json-schema/SpecialOperator.json +18 -0
  141. package/json-schema/StandardAuthProvider.json +857 -0
  142. package/json-schema/StringOperator.json +21 -0
  143. package/json-schema/Timeframe.json +68 -0
  144. package/json-schema/TwoFactorConfig.json +40 -0
  145. package/json-schema/User.json +51 -0
  146. package/json-schema/UserFieldMapping.json +47 -0
  147. package/json-schema/VectorStoreConfig.json +82 -0
  148. package/json-schema/VectorStoreProvider.json +21 -0
  149. package/json-schema/VerificationToken.json +36 -0
  150. package/package.json +27 -1
  151. package/json-schema/AuthProtocol.json +0 -17
  152. package/json-schema/AuthProvider.json +0 -171
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rag-pipeline.zod.d.ts","sourceRoot":"","sources":["../../src/ai/rag-pipeline.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB,iIAWpC,CA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GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RAGPipelineStatusSchema = exports.RAGQueryResponseSchema = exports.RAGQueryRequestSchema = exports.RAGPipelineConfigSchema = exports.DocumentLoaderConfigSchema = exports.VectorStoreConfigSchema = exports.RerankingConfigSchema = exports.RetrievalStrategySchema = exports.DocumentChunkSchema = exports.DocumentMetadataSchema = exports.ChunkingStrategySchema = exports.EmbeddingModelSchema = exports.VectorStoreProviderSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * RAG (Retrieval-Augmented Generation) Pipeline Protocol
7
+ *
8
+ * Defines schemas for building context-aware AI assistants using RAG techniques.
9
+ * Enables vector search, document chunking, embeddings, and retrieval configuration.
10
+ */
11
+ /**
12
+ * Vector Store Provider
13
+ */
14
+ exports.VectorStoreProviderSchema = zod_1.z.enum([
15
+ 'pinecone',
16
+ 'weaviate',
17
+ 'qdrant',
18
+ 'milvus',
19
+ 'chroma',
20
+ 'pgvector',
21
+ 'redis',
22
+ 'opensearch',
23
+ 'elasticsearch',
24
+ 'custom',
25
+ ]);
26
+ /**
27
+ * Embedding Model
28
+ */
29
+ exports.EmbeddingModelSchema = zod_1.z.object({
30
+ provider: zod_1.z.enum(['openai', 'cohere', 'huggingface', 'azure_openai', 'local', 'custom']),
31
+ model: zod_1.z.string().describe('Model name (e.g., "text-embedding-3-large")'),
32
+ dimensions: zod_1.z.number().int().positive().describe('Embedding vector dimensions'),
33
+ maxTokens: zod_1.z.number().int().positive().optional().describe('Maximum tokens per embedding'),
34
+ batchSize: zod_1.z.number().int().positive().optional().default(100).describe('Batch size for embedding'),
35
+ endpoint: zod_1.z.string().url().optional().describe('Custom endpoint URL'),
36
+ apiKey: zod_1.z.string().optional().describe('API key or reference to secret'),
37
+ });
38
+ /**
39
+ * Text Chunking Strategy
40
+ */
41
+ exports.ChunkingStrategySchema = zod_1.z.discriminatedUnion('type', [
42
+ zod_1.z.object({
43
+ type: zod_1.z.literal('fixed'),
44
+ chunkSize: zod_1.z.number().int().positive().describe('Fixed chunk size in tokens/chars'),
45
+ chunkOverlap: zod_1.z.number().int().min(0).default(0).describe('Overlap between chunks'),
46
+ unit: zod_1.z.enum(['tokens', 'characters']).default('tokens'),
47
+ }),
48
+ zod_1.z.object({
49
+ type: zod_1.z.literal('semantic'),
50
+ model: zod_1.z.string().optional().describe('Model for semantic chunking'),
51
+ minChunkSize: zod_1.z.number().int().positive().default(100),
52
+ maxChunkSize: zod_1.z.number().int().positive().default(1000),
53
+ }),
54
+ zod_1.z.object({
55
+ type: zod_1.z.literal('recursive'),
56
+ separators: zod_1.z.array(zod_1.z.string()).default(['\n\n', '\n', ' ', '']),
57
+ chunkSize: zod_1.z.number().int().positive(),
58
+ chunkOverlap: zod_1.z.number().int().min(0).default(0),
59
+ }),
60
+ zod_1.z.object({
61
+ type: zod_1.z.literal('markdown'),
62
+ maxChunkSize: zod_1.z.number().int().positive().default(1000),
63
+ respectHeaders: zod_1.z.boolean().default(true).describe('Keep headers with content'),
64
+ respectCodeBlocks: zod_1.z.boolean().default(true).describe('Keep code blocks intact'),
65
+ }),
66
+ ]);
67
+ /**
68
+ * Document Metadata Schema
69
+ */
70
+ exports.DocumentMetadataSchema = zod_1.z.object({
71
+ source: zod_1.z.string().describe('Document source (file path, URL, etc.)'),
72
+ sourceType: zod_1.z.enum(['file', 'url', 'api', 'database', 'custom']).optional(),
73
+ title: zod_1.z.string().optional(),
74
+ author: zod_1.z.string().optional(),
75
+ createdAt: zod_1.z.string().optional().describe('ISO timestamp'),
76
+ updatedAt: zod_1.z.string().optional().describe('ISO timestamp'),
77
+ tags: zod_1.z.array(zod_1.z.string()).optional(),
78
+ category: zod_1.z.string().optional(),
79
+ language: zod_1.z.string().optional().describe('Document language (ISO 639-1 code)'),
80
+ custom: zod_1.z.record(zod_1.z.any()).optional().describe('Custom metadata fields'),
81
+ });
82
+ /**
83
+ * Document Chunk
84
+ */
85
+ exports.DocumentChunkSchema = zod_1.z.object({
86
+ id: zod_1.z.string().describe('Unique chunk identifier'),
87
+ content: zod_1.z.string().describe('Chunk text content'),
88
+ embedding: zod_1.z.array(zod_1.z.number()).optional().describe('Embedding vector'),
89
+ metadata: exports.DocumentMetadataSchema,
90
+ chunkIndex: zod_1.z.number().int().min(0).describe('Chunk position in document'),
91
+ tokens: zod_1.z.number().int().optional().describe('Token count'),
92
+ });
93
+ /**
94
+ * Retrieval Strategy
95
+ */
96
+ exports.RetrievalStrategySchema = zod_1.z.discriminatedUnion('type', [
97
+ zod_1.z.object({
98
+ type: zod_1.z.literal('similarity'),
99
+ topK: zod_1.z.number().int().positive().default(5).describe('Number of results to retrieve'),
100
+ scoreThreshold: zod_1.z.number().min(0).max(1).optional().describe('Minimum similarity score'),
101
+ }),
102
+ zod_1.z.object({
103
+ type: zod_1.z.literal('mmr'),
104
+ topK: zod_1.z.number().int().positive().default(5),
105
+ fetchK: zod_1.z.number().int().positive().default(20).describe('Initial fetch size'),
106
+ lambda: zod_1.z.number().min(0).max(1).default(0.5).describe('Diversity vs relevance (0=diverse, 1=relevant)'),
107
+ }),
108
+ zod_1.z.object({
109
+ type: zod_1.z.literal('hybrid'),
110
+ topK: zod_1.z.number().int().positive().default(5),
111
+ vectorWeight: zod_1.z.number().min(0).max(1).default(0.7).describe('Weight for vector search'),
112
+ keywordWeight: zod_1.z.number().min(0).max(1).default(0.3).describe('Weight for keyword search'),
113
+ }),
114
+ zod_1.z.object({
115
+ type: zod_1.z.literal('parent_document'),
116
+ topK: zod_1.z.number().int().positive().default(5),
117
+ retrieveParent: zod_1.z.boolean().default(true).describe('Retrieve full parent document'),
118
+ }),
119
+ ]);
120
+ /**
121
+ * Reranking Configuration
122
+ */
123
+ exports.RerankingConfigSchema = zod_1.z.object({
124
+ enabled: zod_1.z.boolean().default(false),
125
+ model: zod_1.z.string().optional().describe('Reranking model name'),
126
+ provider: zod_1.z.enum(['cohere', 'huggingface', 'custom']).optional(),
127
+ topK: zod_1.z.number().int().positive().default(3).describe('Final number of results after reranking'),
128
+ });
129
+ /**
130
+ * Vector Store Configuration
131
+ */
132
+ exports.VectorStoreConfigSchema = zod_1.z.object({
133
+ provider: exports.VectorStoreProviderSchema,
134
+ indexName: zod_1.z.string().describe('Index/collection name'),
135
+ namespace: zod_1.z.string().optional().describe('Namespace for multi-tenancy'),
136
+ /** Connection */
137
+ host: zod_1.z.string().optional().describe('Vector store host'),
138
+ port: zod_1.z.number().int().optional().describe('Vector store port'),
139
+ apiKey: zod_1.z.string().optional().describe('API key or reference to secret'),
140
+ /** Configuration */
141
+ dimensions: zod_1.z.number().int().positive().describe('Vector dimensions'),
142
+ metric: zod_1.z.enum(['cosine', 'euclidean', 'dotproduct']).optional().default('cosine'),
143
+ /** Performance */
144
+ batchSize: zod_1.z.number().int().positive().optional().default(100),
145
+ connectionPoolSize: zod_1.z.number().int().positive().optional().default(10),
146
+ timeout: zod_1.z.number().int().positive().optional().default(30000).describe('Timeout in milliseconds'),
147
+ });
148
+ /**
149
+ * Document Loader Configuration
150
+ */
151
+ exports.DocumentLoaderConfigSchema = zod_1.z.object({
152
+ type: zod_1.z.enum(['file', 'directory', 'url', 'api', 'database', 'custom']),
153
+ /** Source */
154
+ source: zod_1.z.string().describe('Source path, URL, or identifier'),
155
+ /** File Types */
156
+ fileTypes: zod_1.z.array(zod_1.z.string()).optional().describe('Accepted file extensions (e.g., [".pdf", ".md"])'),
157
+ /** Processing */
158
+ recursive: zod_1.z.boolean().optional().default(false).describe('Process directories recursively'),
159
+ maxFileSize: zod_1.z.number().int().optional().describe('Maximum file size in bytes'),
160
+ excludePatterns: zod_1.z.array(zod_1.z.string()).optional().describe('Patterns to exclude'),
161
+ /** Text Extraction */
162
+ extractImages: zod_1.z.boolean().optional().default(false).describe('Extract text from images (OCR)'),
163
+ extractTables: zod_1.z.boolean().optional().default(false).describe('Extract and format tables'),
164
+ /** Custom Loader */
165
+ loaderConfig: zod_1.z.record(zod_1.z.any()).optional().describe('Custom loader-specific config'),
166
+ });
167
+ /**
168
+ * RAG Pipeline Configuration
169
+ */
170
+ exports.RAGPipelineConfigSchema = zod_1.z.object({
171
+ /** Identity */
172
+ name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('Pipeline name (snake_case)'),
173
+ label: zod_1.z.string().describe('Display name'),
174
+ description: zod_1.z.string().optional(),
175
+ /** Components */
176
+ embedding: exports.EmbeddingModelSchema,
177
+ vectorStore: exports.VectorStoreConfigSchema,
178
+ chunking: exports.ChunkingStrategySchema,
179
+ retrieval: exports.RetrievalStrategySchema,
180
+ reranking: exports.RerankingConfigSchema.optional(),
181
+ /** Document Loading */
182
+ loaders: zod_1.z.array(exports.DocumentLoaderConfigSchema).optional().describe('Document loaders'),
183
+ /** Context Management */
184
+ maxContextTokens: zod_1.z.number().int().positive().default(4000).describe('Maximum tokens in context'),
185
+ contextWindow: zod_1.z.number().int().positive().optional().describe('LLM context window size'),
186
+ /** Metadata Filtering */
187
+ metadataFilters: zod_1.z.record(zod_1.z.union([
188
+ zod_1.z.string(),
189
+ zod_1.z.number(),
190
+ zod_1.z.boolean(),
191
+ zod_1.z.array(zod_1.z.union([zod_1.z.string(), zod_1.z.number()])),
192
+ ])).optional().describe('Filters for retrieval (e.g., {category: "docs", status: "published"})'),
193
+ /** Caching */
194
+ enableCache: zod_1.z.boolean().default(true),
195
+ cacheTTL: zod_1.z.number().int().positive().default(3600).describe('Cache TTL in seconds'),
196
+ cacheInvalidationStrategy: zod_1.z.enum(['time_based', 'manual', 'on_update']).default('time_based').optional(),
197
+ });
198
+ /**
199
+ * RAG Query Request
200
+ */
201
+ exports.RAGQueryRequestSchema = zod_1.z.object({
202
+ query: zod_1.z.string().describe('User query'),
203
+ pipelineName: zod_1.z.string().describe('Pipeline to use'),
204
+ /** Override defaults */
205
+ topK: zod_1.z.number().int().positive().optional(),
206
+ metadataFilters: zod_1.z.record(zod_1.z.any()).optional(),
207
+ /** Context */
208
+ conversationHistory: zod_1.z.array(zod_1.z.object({
209
+ role: zod_1.z.enum(['user', 'assistant', 'system']),
210
+ content: zod_1.z.string(),
211
+ })).optional(),
212
+ /** Options */
213
+ includeMetadata: zod_1.z.boolean().default(true),
214
+ includeSources: zod_1.z.boolean().default(true),
215
+ });
216
+ /**
217
+ * RAG Query Response
218
+ */
219
+ exports.RAGQueryResponseSchema = zod_1.z.object({
220
+ query: zod_1.z.string(),
221
+ results: zod_1.z.array(zod_1.z.object({
222
+ content: zod_1.z.string(),
223
+ score: zod_1.z.number(),
224
+ metadata: exports.DocumentMetadataSchema.optional(),
225
+ chunkId: zod_1.z.string().optional(),
226
+ })),
227
+ context: zod_1.z.string().describe('Assembled context for LLM'),
228
+ tokensUsed: zod_1.z.number().int().optional(),
229
+ retrievalTime: zod_1.z.number().optional().describe('Retrieval time in milliseconds'),
230
+ });
231
+ /**
232
+ * RAG Pipeline Status
233
+ */
234
+ exports.RAGPipelineStatusSchema = zod_1.z.object({
235
+ name: zod_1.z.string(),
236
+ status: zod_1.z.enum(['active', 'indexing', 'error', 'disabled']),
237
+ documentsIndexed: zod_1.z.number().int().min(0),
238
+ lastIndexed: zod_1.z.string().optional().describe('ISO timestamp'),
239
+ errorMessage: zod_1.z.string().optional(),
240
+ health: zod_1.z.object({
241
+ vectorStore: zod_1.z.enum(['healthy', 'unhealthy', 'unknown']),
242
+ embeddingService: zod_1.z.enum(['healthy', 'unhealthy', 'unknown']),
243
+ }).optional(),
244
+ });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * API Protocol Exports
3
+ *
4
+ * API Contracts & Envelopes
5
+ * - Request/Response schemas
6
+ * - Error handling
7
+ */
8
+ export * from './contract.zod';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * API Protocol Exports
4
+ *
5
+ * API Contracts & Envelopes
6
+ * - Request/Response schemas
7
+ * - Error handling
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ __exportStar(require("./contract.zod"), exports);
@@ -0,0 +1,295 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Unified Query DSL Specification
4
+ *
5
+ * Based on industry best practices from:
6
+ * - Prisma ORM
7
+ * - Strapi CMS
8
+ * - TypeORM
9
+ * - LoopBack Framework
10
+ *
11
+ * Version: 1.0.0
12
+ * Status: Draft
13
+ *
14
+ * Objective: Define a JSON-based, database-agnostic query syntax standard
15
+ * for data filtering interactions between frontend and backend APIs.
16
+ *
17
+ * Design Principles:
18
+ * 1. Declarative: Frontend describes "what data to get", not "how to query"
19
+ * 2. Database Agnostic: Syntax contains no database-specific directives
20
+ * 3. Type Safe: Structure can be statically inferred by TypeScript
21
+ * 4. Convention over Configuration: Implicit syntax for common queries
22
+ */
23
+ /**
24
+ * Comparison operators for equality and inequality checks.
25
+ * Supported data types: Any
26
+ */
27
+ export declare const EqualityOperatorSchema: z.ZodObject<{
28
+ /** Equal to (default) - SQL: = | MongoDB: $eq */
29
+ $eq: z.ZodOptional<z.ZodAny>;
30
+ /** Not equal to - SQL: <> or != | MongoDB: $ne */
31
+ $ne: z.ZodOptional<z.ZodAny>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ $eq?: any;
34
+ $ne?: any;
35
+ }, {
36
+ $eq?: any;
37
+ $ne?: any;
38
+ }>;
39
+ /**
40
+ * Comparison operators for numeric and date comparisons.
41
+ * Supported data types: Number, Date
42
+ */
43
+ export declare const ComparisonOperatorSchema: z.ZodObject<{
44
+ /** Greater than - SQL: > | MongoDB: $gt */
45
+ $gt: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodDate]>>;
46
+ /** Greater than or equal to - SQL: >= | MongoDB: $gte */
47
+ $gte: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodDate]>>;
48
+ /** Less than - SQL: < | MongoDB: $lt */
49
+ $lt: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodDate]>>;
50
+ /** Less than or equal to - SQL: <= | MongoDB: $lte */
51
+ $lte: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodDate]>>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ $gt?: number | Date | undefined;
54
+ $gte?: number | Date | undefined;
55
+ $lt?: number | Date | undefined;
56
+ $lte?: number | Date | undefined;
57
+ }, {
58
+ $gt?: number | Date | undefined;
59
+ $gte?: number | Date | undefined;
60
+ $lt?: number | Date | undefined;
61
+ $lte?: number | Date | undefined;
62
+ }>;
63
+ /**
64
+ * Set operators for membership checks.
65
+ */
66
+ export declare const SetOperatorSchema: z.ZodObject<{
67
+ /** In list - SQL: IN (?, ?, ?) | MongoDB: $in */
68
+ $in: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
69
+ /** Not in list - SQL: NOT IN (...) | MongoDB: $nin */
70
+ $nin: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ $in?: any[] | undefined;
73
+ $nin?: any[] | undefined;
74
+ }, {
75
+ $in?: any[] | undefined;
76
+ $nin?: any[] | undefined;
77
+ }>;
78
+ /**
79
+ * Range operator for interval checks (closed interval).
80
+ * SQL: BETWEEN ? AND ? | MongoDB: $gte AND $lte
81
+ */
82
+ export declare const RangeOperatorSchema: z.ZodObject<{
83
+ /** Between (inclusive) - takes [min, max] array */
84
+ $between: z.ZodOptional<z.ZodTuple<[z.ZodUnion<[z.ZodNumber, z.ZodDate]>, z.ZodUnion<[z.ZodNumber, z.ZodDate]>], null>>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ $between?: [number | Date, number | Date] | undefined;
87
+ }, {
88
+ $between?: [number | Date, number | Date] | undefined;
89
+ }>;
90
+ /**
91
+ * String pattern matching operators.
92
+ * Note: Case sensitivity should be handled at backend level.
93
+ */
94
+ export declare const StringOperatorSchema: z.ZodObject<{
95
+ /** Contains substring - SQL: LIKE %?% | MongoDB: $regex */
96
+ $contains: z.ZodOptional<z.ZodString>;
97
+ /** Starts with prefix - SQL: LIKE ?% | MongoDB: $regex */
98
+ $startsWith: z.ZodOptional<z.ZodString>;
99
+ /** Ends with suffix - SQL: LIKE %? | MongoDB: $regex */
100
+ $endsWith: z.ZodOptional<z.ZodString>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ $contains?: string | undefined;
103
+ $startsWith?: string | undefined;
104
+ $endsWith?: string | undefined;
105
+ }, {
106
+ $contains?: string | undefined;
107
+ $startsWith?: string | undefined;
108
+ $endsWith?: string | undefined;
109
+ }>;
110
+ /**
111
+ * Special check operators for null and existence.
112
+ */
113
+ export declare const SpecialOperatorSchema: z.ZodObject<{
114
+ /** Is null check - SQL: IS NULL (true) / IS NOT NULL (false) | MongoDB: field: null */
115
+ $null: z.ZodOptional<z.ZodBoolean>;
116
+ /** Field exists check (primarily for NoSQL) - MongoDB: $exists */
117
+ $exist: z.ZodOptional<z.ZodBoolean>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ $null?: boolean | undefined;
120
+ $exist?: boolean | undefined;
121
+ }, {
122
+ $null?: boolean | undefined;
123
+ $exist?: boolean | undefined;
124
+ }>;
125
+ /**
126
+ * All field-level operators combined.
127
+ * These can be applied to individual fields in a filter.
128
+ */
129
+ export declare const FieldOperatorsSchema: z.ZodObject<{
130
+ $eq: z.ZodOptional<z.ZodAny>;
131
+ $ne: z.ZodOptional<z.ZodAny>;
132
+ $gt: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodDate]>>;
133
+ $gte: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodDate]>>;
134
+ $lt: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodDate]>>;
135
+ $lte: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodDate]>>;
136
+ $in: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
137
+ $nin: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
138
+ $between: z.ZodOptional<z.ZodTuple<[z.ZodUnion<[z.ZodNumber, z.ZodDate]>, z.ZodUnion<[z.ZodNumber, z.ZodDate]>], null>>;
139
+ $contains: z.ZodOptional<z.ZodString>;
140
+ $startsWith: z.ZodOptional<z.ZodString>;
141
+ $endsWith: z.ZodOptional<z.ZodString>;
142
+ $null: z.ZodOptional<z.ZodBoolean>;
143
+ $exist: z.ZodOptional<z.ZodBoolean>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ $eq?: any;
146
+ $ne?: any;
147
+ $gt?: number | Date | undefined;
148
+ $gte?: number | Date | undefined;
149
+ $lt?: number | Date | undefined;
150
+ $lte?: number | Date | undefined;
151
+ $in?: any[] | undefined;
152
+ $nin?: any[] | undefined;
153
+ $between?: [number | Date, number | Date] | undefined;
154
+ $contains?: string | undefined;
155
+ $startsWith?: string | undefined;
156
+ $endsWith?: string | undefined;
157
+ $null?: boolean | undefined;
158
+ $exist?: boolean | undefined;
159
+ }, {
160
+ $eq?: any;
161
+ $ne?: any;
162
+ $gt?: number | Date | undefined;
163
+ $gte?: number | Date | undefined;
164
+ $lt?: number | Date | undefined;
165
+ $lte?: number | Date | undefined;
166
+ $in?: any[] | undefined;
167
+ $nin?: any[] | undefined;
168
+ $between?: [number | Date, number | Date] | undefined;
169
+ $contains?: string | undefined;
170
+ $startsWith?: string | undefined;
171
+ $endsWith?: string | undefined;
172
+ $null?: boolean | undefined;
173
+ $exist?: boolean | undefined;
174
+ }>;
175
+ /**
176
+ * Recursive filter type that supports:
177
+ * 1. Implicit equality: { field: value }
178
+ * 2. Explicit operators: { field: { $op: value } }
179
+ * 3. Logical combinations: { $and: [...], $or: [...], $not: {...} }
180
+ * 4. Nested relations: { relation: { field: value } }
181
+ */
182
+ export type FilterCondition = {
183
+ [key: string]: any | z.infer<typeof FieldOperatorsSchema> | FilterCondition;
184
+ } & {
185
+ /** Logical AND - combines all conditions that must be true */
186
+ $and?: FilterCondition[];
187
+ /** Logical OR - at least one condition must be true */
188
+ $or?: FilterCondition[];
189
+ /** Logical NOT - negates the condition */
190
+ $not?: FilterCondition;
191
+ };
192
+ /**
193
+ * Zod schema for recursive filter validation.
194
+ * Uses z.lazy() to handle recursive structure.
195
+ */
196
+ export declare const FilterConditionSchema: z.ZodType<FilterCondition>;
197
+ /**
198
+ * Top-level query filter wrapper.
199
+ * This is typically used as the "where" clause in a query.
200
+ *
201
+ * @example
202
+ * ```typescript
203
+ * const filter: QueryFilter = {
204
+ * where: {
205
+ * status: "active", // Implicit equality
206
+ * age: { $gte: 18 }, // Explicit operator
207
+ * $or: [ // Logical combination
208
+ * { role: "admin" },
209
+ * { email: { $contains: "@company.com" } }
210
+ * ],
211
+ * profile: { // Nested relation
212
+ * verified: true
213
+ * }
214
+ * }
215
+ * }
216
+ * ```
217
+ */
218
+ export declare const QueryFilterSchema: z.ZodObject<{
219
+ where: z.ZodOptional<z.ZodType<FilterCondition, z.ZodTypeDef, FilterCondition>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ where?: FilterCondition | undefined;
222
+ }, {
223
+ where?: FilterCondition | undefined;
224
+ }>;
225
+ /**
226
+ * Type-safe filter operators for use in TypeScript.
227
+ *
228
+ * @example
229
+ * ```typescript
230
+ * type UserFilter = Filter<User>;
231
+ *
232
+ * const filter: UserFilter = {
233
+ * age: { $gte: 18 },
234
+ * email: { $contains: "@example.com" }
235
+ * };
236
+ * ```
237
+ */
238
+ export type Filter<T = any> = {
239
+ [K in keyof T]?: T[K] | {
240
+ $eq?: T[K];
241
+ $ne?: T[K];
242
+ $gt?: T[K] extends number | Date ? T[K] : never;
243
+ $gte?: T[K] extends number | Date ? T[K] : never;
244
+ $lt?: T[K] extends number | Date ? T[K] : never;
245
+ $lte?: T[K] extends number | Date ? T[K] : never;
246
+ $in?: T[K][];
247
+ $nin?: T[K][];
248
+ $between?: T[K] extends number | Date ? [T[K], T[K]] : never;
249
+ $contains?: T[K] extends string ? string : never;
250
+ $startsWith?: T[K] extends string ? string : never;
251
+ $endsWith?: T[K] extends string ? string : never;
252
+ $null?: boolean;
253
+ $exist?: boolean;
254
+ } | (T[K] extends object ? Filter<T[K]> : never);
255
+ } & {
256
+ $and?: Filter<T>[];
257
+ $or?: Filter<T>[];
258
+ $not?: Filter<T>;
259
+ };
260
+ /**
261
+ * Scalar types supported by the filter system.
262
+ */
263
+ export type Scalar = string | number | boolean | Date | null;
264
+ export type FieldOperators = z.infer<typeof FieldOperatorsSchema>;
265
+ export type QueryFilter = z.infer<typeof QueryFilterSchema>;
266
+ /**
267
+ * Normalized filter AST structure.
268
+ * This is the internal representation after converting all syntactic sugar
269
+ * to explicit operators.
270
+ *
271
+ * Stage 1: Normalization Pass
272
+ * Input: { age: 18, role: "admin" }
273
+ * Output: { $and: [{ age: { $eq: 18 } }, { role: { $eq: "admin" } }] }
274
+ *
275
+ * This simplifies adapter implementation by providing a consistent structure.
276
+ */
277
+ export declare const NormalizedFilterSchema: z.ZodType<any>;
278
+ export type NormalizedFilter = z.infer<typeof NormalizedFilterSchema>;
279
+ /**
280
+ * All supported operator keys.
281
+ * Useful for validation and parsing.
282
+ */
283
+ export declare const FILTER_OPERATORS: readonly ["$eq", "$ne", "$gt", "$gte", "$lt", "$lte", "$in", "$nin", "$between", "$contains", "$startsWith", "$endsWith", "$null", "$exist"];
284
+ /**
285
+ * Logical operator keys.
286
+ */
287
+ export declare const LOGICAL_OPERATORS: readonly ["$and", "$or", "$not"];
288
+ /**
289
+ * All operator keys (field + logical).
290
+ */
291
+ export declare const ALL_OPERATORS: readonly ["$eq", "$ne", "$gt", "$gte", "$lt", "$lte", "$in", "$nin", "$between", "$contains", "$startsWith", "$endsWith", "$null", "$exist", "$and", "$or", "$not"];
292
+ export type FilterOperatorKey = typeof FILTER_OPERATORS[number];
293
+ export type LogicalOperatorKey = typeof LOGICAL_OPERATORS[number];
294
+ export type OperatorKey = typeof ALL_OPERATORS[number];
295
+ //# sourceMappingURL=filter.zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.zod.d.ts","sourceRoot":"","sources":["../../src/data/filter.zod.ts"],"names":[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