@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.
- package/README.md +127 -5
- package/dist/ai/index.d.ts +14 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +29 -0
- package/dist/ai/model-registry.zod.d.ts +1389 -0
- package/dist/ai/model-registry.zod.d.ts.map +1 -0
- package/dist/ai/model-registry.zod.js +164 -0
- package/dist/ai/nlq.zod.d.ts +1126 -0
- package/dist/ai/nlq.zod.d.ts.map +1 -0
- package/dist/ai/nlq.zod.js +246 -0
- package/dist/ai/rag-pipeline.zod.d.ts +1034 -0
- package/dist/ai/rag-pipeline.zod.d.ts.map +1 -0
- package/dist/ai/rag-pipeline.zod.js +244 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +24 -0
- package/dist/data/filter.zod.d.ts +295 -0
- package/dist/data/filter.zod.d.ts.map +1 -0
- package/dist/data/filter.zod.js +226 -0
- package/dist/data/index.d.ts +21 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +36 -0
- package/dist/data/query.zod.d.ts +386 -3
- package/dist/data/query.zod.d.ts.map +1 -1
- package/dist/data/query.zod.js +386 -3
- package/dist/data/validation.zod.d.ts +349 -0
- package/dist/data/validation.zod.d.ts.map +1 -1
- package/dist/data/validation.zod.js +395 -0
- package/dist/index.d.ts +36 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -47
- package/dist/system/auth-protocol.d.ts +175 -0
- package/dist/system/auth-protocol.d.ts.map +1 -0
- package/dist/system/auth-protocol.js +60 -0
- package/dist/system/auth.zod.d.ts +3319 -0
- package/dist/system/auth.zod.d.ts.map +1 -0
- package/dist/system/auth.zod.js +499 -0
- package/dist/system/datasource.zod.d.ts +118 -38
- package/dist/system/datasource.zod.d.ts.map +1 -1
- package/dist/system/datasource.zod.js +25 -6
- package/dist/system/driver.zod.d.ts +106 -0
- package/dist/system/driver.zod.d.ts.map +1 -1
- package/dist/system/driver.zod.js +47 -0
- package/dist/system/identity.zod.d.ts +234 -180
- package/dist/system/identity.zod.d.ts.map +1 -1
- package/dist/system/identity.zod.js +168 -51
- package/dist/system/index.d.ts +28 -0
- package/dist/system/index.d.ts.map +1 -0
- package/dist/system/index.js +43 -0
- package/dist/system/manifest.zod.d.ts +10 -10
- package/dist/system/organization.zod.d.ts +179 -0
- package/dist/system/organization.zod.d.ts.map +1 -0
- package/dist/system/organization.zod.js +129 -0
- package/dist/system/policy.zod.d.ts +10 -10
- package/dist/ui/action.zod.d.ts +2 -2
- package/dist/ui/dashboard.zod.d.ts +10 -10
- package/dist/ui/dashboard.zod.d.ts.map +1 -1
- package/dist/ui/dashboard.zod.js +3 -2
- package/dist/ui/index.d.ts +17 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +32 -0
- package/dist/ui/report.zod.d.ts +4 -32
- package/dist/ui/report.zod.d.ts.map +1 -1
- package/dist/ui/report.zod.js +3 -8
- package/dist/ui/theme.zod.d.ts +6 -6
- package/json-schema/Account.json +87 -0
- package/json-schema/AccountLinkingConfig.json +27 -0
- package/json-schema/AuthConfig.json +841 -0
- package/json-schema/AuthPluginConfig.json +28 -0
- package/json-schema/AuthStrategy.json +17 -0
- package/json-schema/AuthenticationConfig.json +601 -0
- package/json-schema/AuthenticationProvider.json +617 -0
- package/json-schema/CSRFConfig.json +31 -0
- package/json-schema/ChunkingStrategy.json +133 -0
- package/json-schema/ComparisonOperator.json +56 -0
- package/json-schema/Dashboard.json +20 -0
- package/json-schema/DashboardWidget.json +20 -0
- package/json-schema/DatabaseAdapter.json +38 -0
- package/json-schema/DatabaseMapping.json +48 -0
- package/json-schema/Datasource.json +25 -5
- package/json-schema/DatasourceCapabilities.json +25 -5
- package/json-schema/DocumentChunk.json +97 -0
- package/json-schema/DocumentLoaderConfig.json +69 -0
- package/json-schema/DocumentMetadata.json +61 -0
- package/json-schema/DriverCapabilities.json +30 -0
- package/json-schema/DriverDefinition.json +25 -5
- package/json-schema/DriverInterface.json +30 -0
- package/json-schema/EmailPasswordConfig.json +43 -0
- package/json-schema/EmbeddingModel.json +57 -0
- package/json-schema/EnterpriseAuthConfig.json +172 -0
- package/json-schema/Entity.json +55 -0
- package/json-schema/EqualityOperator.json +14 -0
- package/json-schema/FieldOperators.json +108 -0
- package/json-schema/FieldSynonymConfig.json +39 -0
- package/json-schema/FilterCondition.json +28 -0
- package/json-schema/Invitation.json +69 -0
- package/json-schema/InvitationStatus.json +15 -0
- package/json-schema/LDAPConfig.json +22 -5
- package/json-schema/MagicLinkConfig.json +21 -0
- package/json-schema/Member.json +46 -0
- package/json-schema/ModelCapability.json +47 -0
- package/json-schema/ModelConfig.json +181 -0
- package/json-schema/ModelLimits.json +45 -0
- package/json-schema/ModelPricing.json +28 -0
- package/json-schema/ModelProvider.json +19 -0
- package/json-schema/ModelRegistry.json +427 -0
- package/json-schema/ModelRegistryEntry.json +239 -0
- package/json-schema/ModelSelectionCriteria.json +50 -0
- package/json-schema/NLQAnalytics.json +106 -0
- package/json-schema/NLQFieldMapping.json +40 -0
- package/json-schema/NLQModelConfig.json +78 -0
- package/json-schema/NLQParseResult.json +252 -0
- package/json-schema/NLQRequest.json +110 -0
- package/json-schema/NLQResponse.json +288 -0
- package/json-schema/NLQTrainingExample.json +120 -0
- package/json-schema/NormalizedFilter.json +348 -0
- package/json-schema/OAuthProvider.json +66 -0
- package/json-schema/OIDCConfig.json +18 -3
- package/json-schema/Organization.json +52 -0
- package/json-schema/PasskeyConfig.json +54 -0
- package/json-schema/PromptTemplate.json +163 -0
- package/json-schema/PromptVariable.json +56 -0
- package/json-schema/QueryContext.json +72 -0
- package/json-schema/QueryFilter.json +34 -0
- package/json-schema/QueryIntent.json +21 -0
- package/json-schema/QueryTemplate.json +81 -0
- package/json-schema/RAGPipelineConfig.json +552 -0
- package/json-schema/RAGPipelineStatus.json +66 -0
- package/json-schema/RAGQueryRequest.json +64 -0
- package/json-schema/RAGQueryResponse.json +108 -0
- package/json-schema/RangeOperator.json +41 -0
- package/json-schema/RateLimitConfig.json +36 -0
- package/json-schema/Report.json +20 -26
- package/json-schema/RerankingConfig.json +34 -0
- package/json-schema/RetrievalStrategy.json +121 -0
- package/json-schema/SAMLConfig.json +17 -3
- package/json-schema/Session.json +63 -0
- package/json-schema/SessionConfig.json +56 -0
- package/json-schema/SetOperator.json +18 -0
- package/json-schema/SpecialOperator.json +18 -0
- package/json-schema/StandardAuthProvider.json +857 -0
- package/json-schema/StringOperator.json +21 -0
- package/json-schema/Timeframe.json +68 -0
- package/json-schema/TwoFactorConfig.json +40 -0
- package/json-schema/User.json +51 -0
- package/json-schema/UserFieldMapping.json +47 -0
- package/json-schema/VectorStoreConfig.json +82 -0
- package/json-schema/VectorStoreProvider.json +21 -0
- package/json-schema/VerificationToken.json +36 -0
- package/package.json +27 -1
- package/json-schema/AuthProtocol.json +0 -17
- package/json-schema/AuthProvider.json +0 -171
|
@@ -31,32 +31,52 @@ export declare const DriverDefinitionSchema: z.ZodObject<{
|
|
|
31
31
|
* What this driver supports out-of-the-box.
|
|
32
32
|
*/
|
|
33
33
|
capabilities: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
34
|
-
/** Can execute SQL-like joins natively? */
|
|
35
|
-
joins: z.ZodDefault<z.ZodBoolean>;
|
|
36
34
|
/** Can handle ACID transactions? */
|
|
37
35
|
transactions: z.ZodDefault<z.ZodBoolean>;
|
|
36
|
+
/** Can execute WHERE clause filters natively? */
|
|
37
|
+
queryFilters: z.ZodDefault<z.ZodBoolean>;
|
|
38
|
+
/** Can perform aggregation (group by, sum, avg)? */
|
|
39
|
+
queryAggregations: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
/** Can perform ORDER BY sorting? */
|
|
41
|
+
querySorting: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
+
/** Can perform LIMIT/OFFSET pagination? */
|
|
43
|
+
queryPagination: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
/** Can perform window functions? */
|
|
45
|
+
queryWindowFunctions: z.ZodDefault<z.ZodBoolean>;
|
|
46
|
+
/** Can perform subqueries? */
|
|
47
|
+
querySubqueries: z.ZodDefault<z.ZodBoolean>;
|
|
48
|
+
/** Can execute SQL-like joins natively? */
|
|
49
|
+
joins: z.ZodDefault<z.ZodBoolean>;
|
|
38
50
|
/** Can perform full-text search? */
|
|
39
51
|
fullTextSearch: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
-
/** Can perform aggregation (group by, sum, avg)? */
|
|
41
|
-
aggregation: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
-
/** Is scheme-less (needs schema inference)? */
|
|
43
|
-
dynamicSchema: z.ZodDefault<z.ZodBoolean>;
|
|
44
52
|
/** Is read-only? */
|
|
45
53
|
readOnly: z.ZodDefault<z.ZodBoolean>;
|
|
54
|
+
/** Is scheme-less (needs schema inference)? */
|
|
55
|
+
dynamicSchema: z.ZodDefault<z.ZodBoolean>;
|
|
46
56
|
}, "strip", z.ZodTypeAny, {
|
|
47
57
|
joins: boolean;
|
|
48
58
|
transactions: boolean;
|
|
59
|
+
queryFilters: boolean;
|
|
60
|
+
queryAggregations: boolean;
|
|
61
|
+
querySorting: boolean;
|
|
62
|
+
queryPagination: boolean;
|
|
63
|
+
queryWindowFunctions: boolean;
|
|
64
|
+
querySubqueries: boolean;
|
|
49
65
|
fullTextSearch: boolean;
|
|
50
|
-
aggregation: boolean;
|
|
51
|
-
dynamicSchema: boolean;
|
|
52
66
|
readOnly: boolean;
|
|
67
|
+
dynamicSchema: boolean;
|
|
53
68
|
}, {
|
|
54
69
|
joins?: boolean | undefined;
|
|
55
70
|
transactions?: boolean | undefined;
|
|
71
|
+
queryFilters?: boolean | undefined;
|
|
72
|
+
queryAggregations?: boolean | undefined;
|
|
73
|
+
querySorting?: boolean | undefined;
|
|
74
|
+
queryPagination?: boolean | undefined;
|
|
75
|
+
queryWindowFunctions?: boolean | undefined;
|
|
76
|
+
querySubqueries?: boolean | undefined;
|
|
56
77
|
fullTextSearch?: boolean | undefined;
|
|
57
|
-
aggregation?: boolean | undefined;
|
|
58
|
-
dynamicSchema?: boolean | undefined;
|
|
59
78
|
readOnly?: boolean | undefined;
|
|
79
|
+
dynamicSchema?: boolean | undefined;
|
|
60
80
|
}>>>;
|
|
61
81
|
}, "strip", z.ZodTypeAny, {
|
|
62
82
|
label: string;
|
|
@@ -67,10 +87,15 @@ export declare const DriverDefinitionSchema: z.ZodObject<{
|
|
|
67
87
|
capabilities?: {
|
|
68
88
|
joins: boolean;
|
|
69
89
|
transactions: boolean;
|
|
90
|
+
queryFilters: boolean;
|
|
91
|
+
queryAggregations: boolean;
|
|
92
|
+
querySorting: boolean;
|
|
93
|
+
queryPagination: boolean;
|
|
94
|
+
queryWindowFunctions: boolean;
|
|
95
|
+
querySubqueries: boolean;
|
|
70
96
|
fullTextSearch: boolean;
|
|
71
|
-
aggregation: boolean;
|
|
72
|
-
dynamicSchema: boolean;
|
|
73
97
|
readOnly: boolean;
|
|
98
|
+
dynamicSchema: boolean;
|
|
74
99
|
} | undefined;
|
|
75
100
|
}, {
|
|
76
101
|
label: string;
|
|
@@ -81,10 +106,15 @@ export declare const DriverDefinitionSchema: z.ZodObject<{
|
|
|
81
106
|
capabilities?: {
|
|
82
107
|
joins?: boolean | undefined;
|
|
83
108
|
transactions?: boolean | undefined;
|
|
109
|
+
queryFilters?: boolean | undefined;
|
|
110
|
+
queryAggregations?: boolean | undefined;
|
|
111
|
+
querySorting?: boolean | undefined;
|
|
112
|
+
queryPagination?: boolean | undefined;
|
|
113
|
+
queryWindowFunctions?: boolean | undefined;
|
|
114
|
+
querySubqueries?: boolean | undefined;
|
|
84
115
|
fullTextSearch?: boolean | undefined;
|
|
85
|
-
aggregation?: boolean | undefined;
|
|
86
|
-
dynamicSchema?: boolean | undefined;
|
|
87
116
|
readOnly?: boolean | undefined;
|
|
117
|
+
dynamicSchema?: boolean | undefined;
|
|
88
118
|
} | undefined;
|
|
89
119
|
}>;
|
|
90
120
|
/**
|
|
@@ -94,32 +124,52 @@ export declare const DriverDefinitionSchema: z.ZodObject<{
|
|
|
94
124
|
* and what to compute in memory.
|
|
95
125
|
*/
|
|
96
126
|
export declare const DatasourceCapabilities: z.ZodObject<{
|
|
97
|
-
/** Can execute SQL-like joins natively? */
|
|
98
|
-
joins: z.ZodDefault<z.ZodBoolean>;
|
|
99
127
|
/** Can handle ACID transactions? */
|
|
100
128
|
transactions: z.ZodDefault<z.ZodBoolean>;
|
|
129
|
+
/** Can execute WHERE clause filters natively? */
|
|
130
|
+
queryFilters: z.ZodDefault<z.ZodBoolean>;
|
|
131
|
+
/** Can perform aggregation (group by, sum, avg)? */
|
|
132
|
+
queryAggregations: z.ZodDefault<z.ZodBoolean>;
|
|
133
|
+
/** Can perform ORDER BY sorting? */
|
|
134
|
+
querySorting: z.ZodDefault<z.ZodBoolean>;
|
|
135
|
+
/** Can perform LIMIT/OFFSET pagination? */
|
|
136
|
+
queryPagination: z.ZodDefault<z.ZodBoolean>;
|
|
137
|
+
/** Can perform window functions? */
|
|
138
|
+
queryWindowFunctions: z.ZodDefault<z.ZodBoolean>;
|
|
139
|
+
/** Can perform subqueries? */
|
|
140
|
+
querySubqueries: z.ZodDefault<z.ZodBoolean>;
|
|
141
|
+
/** Can execute SQL-like joins natively? */
|
|
142
|
+
joins: z.ZodDefault<z.ZodBoolean>;
|
|
101
143
|
/** Can perform full-text search? */
|
|
102
144
|
fullTextSearch: z.ZodDefault<z.ZodBoolean>;
|
|
103
|
-
/** Can perform aggregation (group by, sum, avg)? */
|
|
104
|
-
aggregation: z.ZodDefault<z.ZodBoolean>;
|
|
105
|
-
/** Is scheme-less (needs schema inference)? */
|
|
106
|
-
dynamicSchema: z.ZodDefault<z.ZodBoolean>;
|
|
107
145
|
/** Is read-only? */
|
|
108
146
|
readOnly: z.ZodDefault<z.ZodBoolean>;
|
|
147
|
+
/** Is scheme-less (needs schema inference)? */
|
|
148
|
+
dynamicSchema: z.ZodDefault<z.ZodBoolean>;
|
|
109
149
|
}, "strip", z.ZodTypeAny, {
|
|
110
150
|
joins: boolean;
|
|
111
151
|
transactions: boolean;
|
|
152
|
+
queryFilters: boolean;
|
|
153
|
+
queryAggregations: boolean;
|
|
154
|
+
querySorting: boolean;
|
|
155
|
+
queryPagination: boolean;
|
|
156
|
+
queryWindowFunctions: boolean;
|
|
157
|
+
querySubqueries: boolean;
|
|
112
158
|
fullTextSearch: boolean;
|
|
113
|
-
aggregation: boolean;
|
|
114
|
-
dynamicSchema: boolean;
|
|
115
159
|
readOnly: boolean;
|
|
160
|
+
dynamicSchema: boolean;
|
|
116
161
|
}, {
|
|
117
162
|
joins?: boolean | undefined;
|
|
118
163
|
transactions?: boolean | undefined;
|
|
164
|
+
queryFilters?: boolean | undefined;
|
|
165
|
+
queryAggregations?: boolean | undefined;
|
|
166
|
+
querySorting?: boolean | undefined;
|
|
167
|
+
queryPagination?: boolean | undefined;
|
|
168
|
+
queryWindowFunctions?: boolean | undefined;
|
|
169
|
+
querySubqueries?: boolean | undefined;
|
|
119
170
|
fullTextSearch?: boolean | undefined;
|
|
120
|
-
aggregation?: boolean | undefined;
|
|
121
|
-
dynamicSchema?: boolean | undefined;
|
|
122
171
|
readOnly?: boolean | undefined;
|
|
172
|
+
dynamicSchema?: boolean | undefined;
|
|
123
173
|
}>;
|
|
124
174
|
/**
|
|
125
175
|
* Datasource Schema
|
|
@@ -143,32 +193,52 @@ export declare const DatasourceSchema: z.ZodObject<{
|
|
|
143
193
|
* Manually override what the driver claims to support.
|
|
144
194
|
*/
|
|
145
195
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
146
|
-
/** Can execute SQL-like joins natively? */
|
|
147
|
-
joins: z.ZodDefault<z.ZodBoolean>;
|
|
148
196
|
/** Can handle ACID transactions? */
|
|
149
197
|
transactions: z.ZodDefault<z.ZodBoolean>;
|
|
198
|
+
/** Can execute WHERE clause filters natively? */
|
|
199
|
+
queryFilters: z.ZodDefault<z.ZodBoolean>;
|
|
200
|
+
/** Can perform aggregation (group by, sum, avg)? */
|
|
201
|
+
queryAggregations: z.ZodDefault<z.ZodBoolean>;
|
|
202
|
+
/** Can perform ORDER BY sorting? */
|
|
203
|
+
querySorting: z.ZodDefault<z.ZodBoolean>;
|
|
204
|
+
/** Can perform LIMIT/OFFSET pagination? */
|
|
205
|
+
queryPagination: z.ZodDefault<z.ZodBoolean>;
|
|
206
|
+
/** Can perform window functions? */
|
|
207
|
+
queryWindowFunctions: z.ZodDefault<z.ZodBoolean>;
|
|
208
|
+
/** Can perform subqueries? */
|
|
209
|
+
querySubqueries: z.ZodDefault<z.ZodBoolean>;
|
|
210
|
+
/** Can execute SQL-like joins natively? */
|
|
211
|
+
joins: z.ZodDefault<z.ZodBoolean>;
|
|
150
212
|
/** Can perform full-text search? */
|
|
151
213
|
fullTextSearch: z.ZodDefault<z.ZodBoolean>;
|
|
152
|
-
/** Can perform aggregation (group by, sum, avg)? */
|
|
153
|
-
aggregation: z.ZodDefault<z.ZodBoolean>;
|
|
154
|
-
/** Is scheme-less (needs schema inference)? */
|
|
155
|
-
dynamicSchema: z.ZodDefault<z.ZodBoolean>;
|
|
156
214
|
/** Is read-only? */
|
|
157
215
|
readOnly: z.ZodDefault<z.ZodBoolean>;
|
|
216
|
+
/** Is scheme-less (needs schema inference)? */
|
|
217
|
+
dynamicSchema: z.ZodDefault<z.ZodBoolean>;
|
|
158
218
|
}, "strip", z.ZodTypeAny, {
|
|
159
219
|
joins: boolean;
|
|
160
220
|
transactions: boolean;
|
|
221
|
+
queryFilters: boolean;
|
|
222
|
+
queryAggregations: boolean;
|
|
223
|
+
querySorting: boolean;
|
|
224
|
+
queryPagination: boolean;
|
|
225
|
+
queryWindowFunctions: boolean;
|
|
226
|
+
querySubqueries: boolean;
|
|
161
227
|
fullTextSearch: boolean;
|
|
162
|
-
aggregation: boolean;
|
|
163
|
-
dynamicSchema: boolean;
|
|
164
228
|
readOnly: boolean;
|
|
229
|
+
dynamicSchema: boolean;
|
|
165
230
|
}, {
|
|
166
231
|
joins?: boolean | undefined;
|
|
167
232
|
transactions?: boolean | undefined;
|
|
233
|
+
queryFilters?: boolean | undefined;
|
|
234
|
+
queryAggregations?: boolean | undefined;
|
|
235
|
+
querySorting?: boolean | undefined;
|
|
236
|
+
queryPagination?: boolean | undefined;
|
|
237
|
+
queryWindowFunctions?: boolean | undefined;
|
|
238
|
+
querySubqueries?: boolean | undefined;
|
|
168
239
|
fullTextSearch?: boolean | undefined;
|
|
169
|
-
aggregation?: boolean | undefined;
|
|
170
|
-
dynamicSchema?: boolean | undefined;
|
|
171
240
|
readOnly?: boolean | undefined;
|
|
241
|
+
dynamicSchema?: boolean | undefined;
|
|
172
242
|
}>>;
|
|
173
243
|
/** Description */
|
|
174
244
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -184,10 +254,15 @@ export declare const DatasourceSchema: z.ZodObject<{
|
|
|
184
254
|
capabilities?: {
|
|
185
255
|
joins: boolean;
|
|
186
256
|
transactions: boolean;
|
|
257
|
+
queryFilters: boolean;
|
|
258
|
+
queryAggregations: boolean;
|
|
259
|
+
querySorting: boolean;
|
|
260
|
+
queryPagination: boolean;
|
|
261
|
+
queryWindowFunctions: boolean;
|
|
262
|
+
querySubqueries: boolean;
|
|
187
263
|
fullTextSearch: boolean;
|
|
188
|
-
aggregation: boolean;
|
|
189
|
-
dynamicSchema: boolean;
|
|
190
264
|
readOnly: boolean;
|
|
265
|
+
dynamicSchema: boolean;
|
|
191
266
|
} | undefined;
|
|
192
267
|
}, {
|
|
193
268
|
name: string;
|
|
@@ -199,10 +274,15 @@ export declare const DatasourceSchema: z.ZodObject<{
|
|
|
199
274
|
capabilities?: {
|
|
200
275
|
joins?: boolean | undefined;
|
|
201
276
|
transactions?: boolean | undefined;
|
|
277
|
+
queryFilters?: boolean | undefined;
|
|
278
|
+
queryAggregations?: boolean | undefined;
|
|
279
|
+
querySorting?: boolean | undefined;
|
|
280
|
+
queryPagination?: boolean | undefined;
|
|
281
|
+
queryWindowFunctions?: boolean | undefined;
|
|
282
|
+
querySubqueries?: boolean | undefined;
|
|
202
283
|
fullTextSearch?: boolean | undefined;
|
|
203
|
-
aggregation?: boolean | undefined;
|
|
204
|
-
dynamicSchema?: boolean | undefined;
|
|
205
284
|
readOnly?: boolean | undefined;
|
|
285
|
+
dynamicSchema?: boolean | undefined;
|
|
206
286
|
} | undefined;
|
|
207
287
|
}>;
|
|
208
288
|
export type Datasource = z.infer<typeof DatasourceSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasource.zod.d.ts","sourceRoot":"","sources":["../../src/system/datasource.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,cAAc,+KAMjB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,UAAU,aAAsD,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;IAMjC;;;;OAIG;;IAGH;;;OAGG;;
|
|
1
|
+
{"version":3,"file":"datasource.zod.d.ts","sourceRoot":"","sources":["../../src/system/datasource.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,cAAc,+KAMjB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,UAAU,aAAsD,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;IAMjC;;;;OAIG;;IAGH;;;OAGG;;QAeH,oCAAoC;;QAOpC,iDAAiD;;QAGjD,oDAAoD;;QAGpD,oCAAoC;;QAGpC,2CAA2C;;QAG3C,oCAAoC;;QAGpC,8BAA8B;;QAG9B,2CAA2C;;QAO3C,oCAAoC;;QAGpC,oBAAoB;;QAGpB,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAnD/C,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;IAKjC,oCAAoC;;IAOpC,iDAAiD;;IAGjD,oDAAoD;;IAGpD,oCAAoC;;IAGpC,2CAA2C;;IAG3C,oCAAoC;;IAGpC,8BAA8B;;IAG9B,2CAA2C;;IAO3C,oCAAoC;;IAGpC,oBAAoB;;IAGpB,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAC3B,mBAAmB;;IAGnB,kBAAkB;;IAGlB,aAAa;;IAGb;;;;OAIG;;IAGH;;;OAGG;;QAlEH,oCAAoC;;QAOpC,iDAAiD;;QAGjD,oDAAoD;;QAGpD,oCAAoC;;QAGpC,2CAA2C;;QAG3C,oCAAoC;;QAGpC,8BAA8B;;QAG9B,2CAA2C;;QAO3C,oCAAoC;;QAGpC,oBAAoB;;QAGpB,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+B/C,kBAAkB;;IAGlB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAElB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -48,18 +48,37 @@ exports.DriverDefinitionSchema = zod_1.z.object({
|
|
|
48
48
|
* and what to compute in memory.
|
|
49
49
|
*/
|
|
50
50
|
exports.DatasourceCapabilities = zod_1.z.object({
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// ============================================================================
|
|
52
|
+
// Transaction & Connection Management
|
|
53
|
+
// ============================================================================
|
|
53
54
|
/** Can handle ACID transactions? */
|
|
54
55
|
transactions: zod_1.z.boolean().default(false),
|
|
56
|
+
// ============================================================================
|
|
57
|
+
// Query Operations
|
|
58
|
+
// ============================================================================
|
|
59
|
+
/** Can execute WHERE clause filters natively? */
|
|
60
|
+
queryFilters: zod_1.z.boolean().default(false),
|
|
61
|
+
/** Can perform aggregation (group by, sum, avg)? */
|
|
62
|
+
queryAggregations: zod_1.z.boolean().default(false),
|
|
63
|
+
/** Can perform ORDER BY sorting? */
|
|
64
|
+
querySorting: zod_1.z.boolean().default(false),
|
|
65
|
+
/** Can perform LIMIT/OFFSET pagination? */
|
|
66
|
+
queryPagination: zod_1.z.boolean().default(false),
|
|
67
|
+
/** Can perform window functions? */
|
|
68
|
+
queryWindowFunctions: zod_1.z.boolean().default(false),
|
|
69
|
+
/** Can perform subqueries? */
|
|
70
|
+
querySubqueries: zod_1.z.boolean().default(false),
|
|
71
|
+
/** Can execute SQL-like joins natively? */
|
|
72
|
+
joins: zod_1.z.boolean().default(false),
|
|
73
|
+
// ============================================================================
|
|
74
|
+
// Advanced Features
|
|
75
|
+
// ============================================================================
|
|
55
76
|
/** Can perform full-text search? */
|
|
56
77
|
fullTextSearch: zod_1.z.boolean().default(false),
|
|
57
|
-
/** Can perform aggregation (group by, sum, avg)? */
|
|
58
|
-
aggregation: zod_1.z.boolean().default(false),
|
|
59
|
-
/** Is scheme-less (needs schema inference)? */
|
|
60
|
-
dynamicSchema: zod_1.z.boolean().default(false),
|
|
61
78
|
/** Is read-only? */
|
|
62
79
|
readOnly: zod_1.z.boolean().default(false),
|
|
80
|
+
/** Is scheme-less (needs schema inference)? */
|
|
81
|
+
dynamicSchema: zod_1.z.boolean().default(false),
|
|
63
82
|
});
|
|
64
83
|
/**
|
|
65
84
|
* Datasource Schema
|
|
@@ -38,6 +38,38 @@ export declare const DriverCapabilitiesSchema: z.ZodObject<{
|
|
|
38
38
|
* If true, beginTransaction, commit, and rollback must be implemented.
|
|
39
39
|
*/
|
|
40
40
|
transactions: z.ZodBoolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the driver supports WHERE clause filters.
|
|
43
|
+
* If false, ObjectQL will fetch all records and filter in memory.
|
|
44
|
+
*
|
|
45
|
+
* Example: Memory driver might not support complex filter conditions.
|
|
46
|
+
*/
|
|
47
|
+
queryFilters: z.ZodBoolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the driver supports aggregation functions (COUNT, SUM, AVG, etc.).
|
|
50
|
+
* If false, ObjectQL will compute aggregations in memory.
|
|
51
|
+
*/
|
|
52
|
+
queryAggregations: z.ZodBoolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the driver supports ORDER BY sorting.
|
|
55
|
+
* If false, ObjectQL will sort results in memory.
|
|
56
|
+
*/
|
|
57
|
+
querySorting: z.ZodBoolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the driver supports LIMIT/OFFSET pagination.
|
|
60
|
+
* If false, ObjectQL will fetch all records and paginate in memory.
|
|
61
|
+
*/
|
|
62
|
+
queryPagination: z.ZodBoolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the driver supports window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.).
|
|
65
|
+
* If false, ObjectQL will compute window functions in memory.
|
|
66
|
+
*/
|
|
67
|
+
queryWindowFunctions: z.ZodBoolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the driver supports subqueries (nested SELECT statements).
|
|
70
|
+
* If false, ObjectQL will execute queries separately and combine results.
|
|
71
|
+
*/
|
|
72
|
+
querySubqueries: z.ZodBoolean;
|
|
41
73
|
/**
|
|
42
74
|
* Whether the driver supports SQL-style joins.
|
|
43
75
|
* If false, ObjectQL will fetch related data separately and join in memory.
|
|
@@ -61,12 +93,24 @@ export declare const DriverCapabilitiesSchema: z.ZodObject<{
|
|
|
61
93
|
}, "strip", z.ZodTypeAny, {
|
|
62
94
|
joins: boolean;
|
|
63
95
|
transactions: boolean;
|
|
96
|
+
queryFilters: boolean;
|
|
97
|
+
queryAggregations: boolean;
|
|
98
|
+
querySorting: boolean;
|
|
99
|
+
queryPagination: boolean;
|
|
100
|
+
queryWindowFunctions: boolean;
|
|
101
|
+
querySubqueries: boolean;
|
|
64
102
|
fullTextSearch: boolean;
|
|
65
103
|
jsonFields: boolean;
|
|
66
104
|
arrayFields: boolean;
|
|
67
105
|
}, {
|
|
68
106
|
joins: boolean;
|
|
69
107
|
transactions: boolean;
|
|
108
|
+
queryFilters: boolean;
|
|
109
|
+
queryAggregations: boolean;
|
|
110
|
+
querySorting: boolean;
|
|
111
|
+
queryPagination: boolean;
|
|
112
|
+
queryWindowFunctions: boolean;
|
|
113
|
+
querySubqueries: boolean;
|
|
70
114
|
fullTextSearch: boolean;
|
|
71
115
|
jsonFields: boolean;
|
|
72
116
|
arrayFields: boolean;
|
|
@@ -95,6 +139,38 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
|
|
|
95
139
|
* If true, beginTransaction, commit, and rollback must be implemented.
|
|
96
140
|
*/
|
|
97
141
|
transactions: z.ZodBoolean;
|
|
142
|
+
/**
|
|
143
|
+
* Whether the driver supports WHERE clause filters.
|
|
144
|
+
* If false, ObjectQL will fetch all records and filter in memory.
|
|
145
|
+
*
|
|
146
|
+
* Example: Memory driver might not support complex filter conditions.
|
|
147
|
+
*/
|
|
148
|
+
queryFilters: z.ZodBoolean;
|
|
149
|
+
/**
|
|
150
|
+
* Whether the driver supports aggregation functions (COUNT, SUM, AVG, etc.).
|
|
151
|
+
* If false, ObjectQL will compute aggregations in memory.
|
|
152
|
+
*/
|
|
153
|
+
queryAggregations: z.ZodBoolean;
|
|
154
|
+
/**
|
|
155
|
+
* Whether the driver supports ORDER BY sorting.
|
|
156
|
+
* If false, ObjectQL will sort results in memory.
|
|
157
|
+
*/
|
|
158
|
+
querySorting: z.ZodBoolean;
|
|
159
|
+
/**
|
|
160
|
+
* Whether the driver supports LIMIT/OFFSET pagination.
|
|
161
|
+
* If false, ObjectQL will fetch all records and paginate in memory.
|
|
162
|
+
*/
|
|
163
|
+
queryPagination: z.ZodBoolean;
|
|
164
|
+
/**
|
|
165
|
+
* Whether the driver supports window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.).
|
|
166
|
+
* If false, ObjectQL will compute window functions in memory.
|
|
167
|
+
*/
|
|
168
|
+
queryWindowFunctions: z.ZodBoolean;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the driver supports subqueries (nested SELECT statements).
|
|
171
|
+
* If false, ObjectQL will execute queries separately and combine results.
|
|
172
|
+
*/
|
|
173
|
+
querySubqueries: z.ZodBoolean;
|
|
98
174
|
/**
|
|
99
175
|
* Whether the driver supports SQL-style joins.
|
|
100
176
|
* If false, ObjectQL will fetch related data separately and join in memory.
|
|
@@ -118,12 +194,24 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
|
|
|
118
194
|
}, "strip", z.ZodTypeAny, {
|
|
119
195
|
joins: boolean;
|
|
120
196
|
transactions: boolean;
|
|
197
|
+
queryFilters: boolean;
|
|
198
|
+
queryAggregations: boolean;
|
|
199
|
+
querySorting: boolean;
|
|
200
|
+
queryPagination: boolean;
|
|
201
|
+
queryWindowFunctions: boolean;
|
|
202
|
+
querySubqueries: boolean;
|
|
121
203
|
fullTextSearch: boolean;
|
|
122
204
|
jsonFields: boolean;
|
|
123
205
|
arrayFields: boolean;
|
|
124
206
|
}, {
|
|
125
207
|
joins: boolean;
|
|
126
208
|
transactions: boolean;
|
|
209
|
+
queryFilters: boolean;
|
|
210
|
+
queryAggregations: boolean;
|
|
211
|
+
querySorting: boolean;
|
|
212
|
+
queryPagination: boolean;
|
|
213
|
+
queryWindowFunctions: boolean;
|
|
214
|
+
querySubqueries: boolean;
|
|
127
215
|
fullTextSearch: boolean;
|
|
128
216
|
jsonFields: boolean;
|
|
129
217
|
arrayFields: boolean;
|
|
@@ -195,6 +283,8 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
|
|
|
195
283
|
* sort: [{ field: 'created_at', order: 'desc' }],
|
|
196
284
|
* top: 10
|
|
197
285
|
* });
|
|
286
|
+
* @returns Array of records.
|
|
287
|
+
* MUST return `id` as string. MUST NOT return implementation details like `_id`.
|
|
198
288
|
*/
|
|
199
289
|
find: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
|
|
200
290
|
object: z.ZodString;
|
|
@@ -421,6 +511,8 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
|
|
|
421
511
|
* @param object - The name of the object.
|
|
422
512
|
* @param query - QueryAST.
|
|
423
513
|
* @param options - Driver options.
|
|
514
|
+
* @returns The record or null.
|
|
515
|
+
* MUST return `id` as string. MUST NOT return implementation details like `_id`.
|
|
424
516
|
*/
|
|
425
517
|
findOne: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
|
|
426
518
|
object: z.ZodString;
|
|
@@ -647,6 +739,7 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
|
|
|
647
739
|
* @param data - Key-value map of field data.
|
|
648
740
|
* @param options - Driver options.
|
|
649
741
|
* @returns The created record, including server-generated fields (id, created_at, etc.).
|
|
742
|
+
* MUST return `id` as string. MUST NOT return implementation details like `_id`.
|
|
650
743
|
*/
|
|
651
744
|
create: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
|
|
652
745
|
/**
|
|
@@ -679,6 +772,7 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
|
|
|
679
772
|
* @param data - The fields to update.
|
|
680
773
|
* @param options - Driver options.
|
|
681
774
|
* @returns The updated record.
|
|
775
|
+
* MUST return `id` as string. MUST NOT return implementation details like `_id`.
|
|
682
776
|
*/
|
|
683
777
|
update: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
|
|
684
778
|
/**
|
|
@@ -1263,6 +1357,12 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
|
|
|
1263
1357
|
supports: {
|
|
1264
1358
|
joins: boolean;
|
|
1265
1359
|
transactions: boolean;
|
|
1360
|
+
queryFilters: boolean;
|
|
1361
|
+
queryAggregations: boolean;
|
|
1362
|
+
querySorting: boolean;
|
|
1363
|
+
queryPagination: boolean;
|
|
1364
|
+
queryWindowFunctions: boolean;
|
|
1365
|
+
querySubqueries: boolean;
|
|
1266
1366
|
fullTextSearch: boolean;
|
|
1267
1367
|
jsonFields: boolean;
|
|
1268
1368
|
arrayFields: boolean;
|
|
@@ -1453,6 +1553,12 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
|
|
|
1453
1553
|
supports: {
|
|
1454
1554
|
joins: boolean;
|
|
1455
1555
|
transactions: boolean;
|
|
1556
|
+
queryFilters: boolean;
|
|
1557
|
+
queryAggregations: boolean;
|
|
1558
|
+
querySorting: boolean;
|
|
1559
|
+
queryPagination: boolean;
|
|
1560
|
+
queryWindowFunctions: boolean;
|
|
1561
|
+
querySubqueries: boolean;
|
|
1456
1562
|
fullTextSearch: boolean;
|
|
1457
1563
|
jsonFields: boolean;
|
|
1458
1564
|
arrayFields: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.zod.d.ts","sourceRoot":"","sources":["../../src/system/driver.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;EAEH,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;
|
|
1
|
+
{"version":3,"file":"driver.zod.d.ts","sourceRoot":"","sources":["../../src/system/driver.zod.ts"],"names":[],"mappings":"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"}
|
|
@@ -29,16 +29,57 @@ exports.DriverOptionsSchema = zod_1.z.object({
|
|
|
29
29
|
* This allows ObjectQL to adapt its behavior based on underlying database capabilities.
|
|
30
30
|
*/
|
|
31
31
|
exports.DriverCapabilitiesSchema = zod_1.z.object({
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// Transaction & Connection Management
|
|
34
|
+
// ============================================================================
|
|
32
35
|
/**
|
|
33
36
|
* Whether the driver supports database transactions.
|
|
34
37
|
* If true, beginTransaction, commit, and rollback must be implemented.
|
|
35
38
|
*/
|
|
36
39
|
transactions: zod_1.z.boolean().describe('Supports transactions'),
|
|
40
|
+
// ============================================================================
|
|
41
|
+
// Query Operations
|
|
42
|
+
// ============================================================================
|
|
43
|
+
/**
|
|
44
|
+
* Whether the driver supports WHERE clause filters.
|
|
45
|
+
* If false, ObjectQL will fetch all records and filter in memory.
|
|
46
|
+
*
|
|
47
|
+
* Example: Memory driver might not support complex filter conditions.
|
|
48
|
+
*/
|
|
49
|
+
queryFilters: zod_1.z.boolean().describe('Supports WHERE clause filtering'),
|
|
50
|
+
/**
|
|
51
|
+
* Whether the driver supports aggregation functions (COUNT, SUM, AVG, etc.).
|
|
52
|
+
* If false, ObjectQL will compute aggregations in memory.
|
|
53
|
+
*/
|
|
54
|
+
queryAggregations: zod_1.z.boolean().describe('Supports GROUP BY and aggregation functions'),
|
|
55
|
+
/**
|
|
56
|
+
* Whether the driver supports ORDER BY sorting.
|
|
57
|
+
* If false, ObjectQL will sort results in memory.
|
|
58
|
+
*/
|
|
59
|
+
querySorting: zod_1.z.boolean().describe('Supports ORDER BY sorting'),
|
|
60
|
+
/**
|
|
61
|
+
* Whether the driver supports LIMIT/OFFSET pagination.
|
|
62
|
+
* If false, ObjectQL will fetch all records and paginate in memory.
|
|
63
|
+
*/
|
|
64
|
+
queryPagination: zod_1.z.boolean().describe('Supports LIMIT/OFFSET pagination'),
|
|
65
|
+
/**
|
|
66
|
+
* Whether the driver supports window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.).
|
|
67
|
+
* If false, ObjectQL will compute window functions in memory.
|
|
68
|
+
*/
|
|
69
|
+
queryWindowFunctions: zod_1.z.boolean().describe('Supports window functions with OVER clause'),
|
|
70
|
+
/**
|
|
71
|
+
* Whether the driver supports subqueries (nested SELECT statements).
|
|
72
|
+
* If false, ObjectQL will execute queries separately and combine results.
|
|
73
|
+
*/
|
|
74
|
+
querySubqueries: zod_1.z.boolean().describe('Supports subqueries'),
|
|
37
75
|
/**
|
|
38
76
|
* Whether the driver supports SQL-style joins.
|
|
39
77
|
* If false, ObjectQL will fetch related data separately and join in memory.
|
|
40
78
|
*/
|
|
41
79
|
joins: zod_1.z.boolean().describe('Supports SQL joins'),
|
|
80
|
+
// ============================================================================
|
|
81
|
+
// Advanced Features
|
|
82
|
+
// ============================================================================
|
|
42
83
|
/**
|
|
43
84
|
* Whether the driver supports full-text search.
|
|
44
85
|
* If true, text search queries can be pushed to the database.
|
|
@@ -137,6 +178,8 @@ exports.DriverInterfaceSchema = zod_1.z.object({
|
|
|
137
178
|
* sort: [{ field: 'created_at', order: 'desc' }],
|
|
138
179
|
* top: 10
|
|
139
180
|
* });
|
|
181
|
+
* @returns Array of records.
|
|
182
|
+
* MUST return `id` as string. MUST NOT return implementation details like `_id`.
|
|
140
183
|
*/
|
|
141
184
|
find: zod_1.z.function()
|
|
142
185
|
.args(zod_1.z.string(), query_zod_1.QuerySchema, exports.DriverOptionsSchema.optional())
|
|
@@ -149,6 +192,8 @@ exports.DriverInterfaceSchema = zod_1.z.object({
|
|
|
149
192
|
* @param object - The name of the object.
|
|
150
193
|
* @param query - QueryAST.
|
|
151
194
|
* @param options - Driver options.
|
|
195
|
+
* @returns The record or null.
|
|
196
|
+
* MUST return `id` as string. MUST NOT return implementation details like `_id`.
|
|
152
197
|
*/
|
|
153
198
|
findOne: zod_1.z.function()
|
|
154
199
|
.args(zod_1.z.string(), query_zod_1.QuerySchema, exports.DriverOptionsSchema.optional())
|
|
@@ -161,6 +206,7 @@ exports.DriverInterfaceSchema = zod_1.z.object({
|
|
|
161
206
|
* @param data - Key-value map of field data.
|
|
162
207
|
* @param options - Driver options.
|
|
163
208
|
* @returns The created record, including server-generated fields (id, created_at, etc.).
|
|
209
|
+
* MUST return `id` as string. MUST NOT return implementation details like `_id`.
|
|
164
210
|
*/
|
|
165
211
|
create: zod_1.z.function()
|
|
166
212
|
.args(zod_1.z.string(), zod_1.z.record(zod_1.z.any()), exports.DriverOptionsSchema.optional())
|
|
@@ -174,6 +220,7 @@ exports.DriverInterfaceSchema = zod_1.z.object({
|
|
|
174
220
|
* @param data - The fields to update.
|
|
175
221
|
* @param options - Driver options.
|
|
176
222
|
* @returns The updated record.
|
|
223
|
+
* MUST return `id` as string. MUST NOT return implementation details like `_id`.
|
|
177
224
|
*/
|
|
178
225
|
update: zod_1.z.function()
|
|
179
226
|
.args(zod_1.z.string(), zod_1.z.string().or(zod_1.z.number()), zod_1.z.record(zod_1.z.any()), exports.DriverOptionsSchema.optional())
|