@objectstack/spec 0.1.2 → 0.2.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/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/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/system/auth.zod.d.ts +2287 -0
- package/dist/system/auth.zod.d.ts.map +1 -0
- package/dist/system/auth.zod.js +365 -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/policy.zod.d.ts +10 -10
- 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/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/json-schema/AccountLinkingConfig.json +27 -0
- package/json-schema/AuthConfig.json +606 -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/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/Datasource.json +25 -5
- package/json-schema/DatasourceCapabilities.json +25 -5
- 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/EqualityOperator.json +14 -0
- package/json-schema/FieldOperators.json +108 -0
- package/json-schema/FilterCondition.json +28 -0
- package/json-schema/MagicLinkConfig.json +21 -0
- package/json-schema/NormalizedFilter.json +348 -0
- package/json-schema/OAuthProvider.json +66 -0
- package/json-schema/PasskeyConfig.json +54 -0
- package/json-schema/QueryFilter.json +34 -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/SessionConfig.json +56 -0
- package/json-schema/SetOperator.json +18 -0
- package/json-schema/SpecialOperator.json +18 -0
- package/json-schema/StandardAuthProvider.json +622 -0
- package/json-schema/StringOperator.json +21 -0
- package/json-schema/TwoFactorConfig.json +40 -0
- package/json-schema/UserFieldMapping.json +47 -0
- package/package.json +1 -1
|
@@ -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())
|
|
@@ -161,16 +161,16 @@ export declare const PolicySchema: z.ZodObject<{
|
|
|
161
161
|
expirationDays?: number | undefined;
|
|
162
162
|
} | undefined;
|
|
163
163
|
assignedProfiles?: string[] | undefined;
|
|
164
|
-
network?: {
|
|
165
|
-
trustedRanges: string[];
|
|
166
|
-
blockUnknown: boolean;
|
|
167
|
-
vpnRequired: boolean;
|
|
168
|
-
} | undefined;
|
|
169
164
|
session?: {
|
|
170
165
|
idleTimeout: number;
|
|
171
166
|
absoluteTimeout: number;
|
|
172
167
|
forceMfa: boolean;
|
|
173
168
|
} | undefined;
|
|
169
|
+
network?: {
|
|
170
|
+
trustedRanges: string[];
|
|
171
|
+
blockUnknown: boolean;
|
|
172
|
+
vpnRequired: boolean;
|
|
173
|
+
} | undefined;
|
|
174
174
|
audit?: {
|
|
175
175
|
logRetentionDays: number;
|
|
176
176
|
sensitiveFields: string[];
|
|
@@ -189,16 +189,16 @@ export declare const PolicySchema: z.ZodObject<{
|
|
|
189
189
|
} | undefined;
|
|
190
190
|
isDefault?: boolean | undefined;
|
|
191
191
|
assignedProfiles?: string[] | undefined;
|
|
192
|
-
network?: {
|
|
193
|
-
trustedRanges: string[];
|
|
194
|
-
blockUnknown?: boolean | undefined;
|
|
195
|
-
vpnRequired?: boolean | undefined;
|
|
196
|
-
} | undefined;
|
|
197
192
|
session?: {
|
|
198
193
|
idleTimeout?: number | undefined;
|
|
199
194
|
absoluteTimeout?: number | undefined;
|
|
200
195
|
forceMfa?: boolean | undefined;
|
|
201
196
|
} | undefined;
|
|
197
|
+
network?: {
|
|
198
|
+
trustedRanges: string[];
|
|
199
|
+
blockUnknown?: boolean | undefined;
|
|
200
|
+
vpnRequired?: boolean | undefined;
|
|
201
|
+
} | undefined;
|
|
202
202
|
audit?: {
|
|
203
203
|
sensitiveFields: string[];
|
|
204
204
|
logRetentionDays?: number | undefined;
|
|
@@ -14,8 +14,8 @@ export declare const DashboardWidgetSchema: z.ZodObject<{
|
|
|
14
14
|
type: z.ZodDefault<z.ZodEnum<["metric", "bar", "line", "pie", "donut", "funnel", "table", "text"]>>;
|
|
15
15
|
/** Data Source Object */
|
|
16
16
|
object: z.ZodOptional<z.ZodString>;
|
|
17
|
-
/** Data Filter (
|
|
18
|
-
filter: z.ZodOptional<z.
|
|
17
|
+
/** Data Filter (MongoDB-style FilterCondition) */
|
|
18
|
+
filter: z.ZodOptional<z.ZodType<import("../data/filter.zod").FilterCondition, z.ZodTypeDef, import("../data/filter.zod").FilterCondition>>;
|
|
19
19
|
/** Category Field (X-Axis / Group By) */
|
|
20
20
|
categoryField: z.ZodOptional<z.ZodString>;
|
|
21
21
|
/** Value Field (Y-Axis) */
|
|
@@ -57,7 +57,7 @@ export declare const DashboardWidgetSchema: z.ZodObject<{
|
|
|
57
57
|
h: number;
|
|
58
58
|
};
|
|
59
59
|
object?: string | undefined;
|
|
60
|
-
filter?:
|
|
60
|
+
filter?: import("../data/filter.zod").FilterCondition | undefined;
|
|
61
61
|
options?: any;
|
|
62
62
|
title?: string | undefined;
|
|
63
63
|
categoryField?: string | undefined;
|
|
@@ -70,7 +70,7 @@ export declare const DashboardWidgetSchema: z.ZodObject<{
|
|
|
70
70
|
h: number;
|
|
71
71
|
};
|
|
72
72
|
object?: string | undefined;
|
|
73
|
-
filter?:
|
|
73
|
+
filter?: import("../data/filter.zod").FilterCondition | undefined;
|
|
74
74
|
options?: any;
|
|
75
75
|
type?: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table" | undefined;
|
|
76
76
|
aggregate?: "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
@@ -97,8 +97,8 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
97
97
|
type: z.ZodDefault<z.ZodEnum<["metric", "bar", "line", "pie", "donut", "funnel", "table", "text"]>>;
|
|
98
98
|
/** Data Source Object */
|
|
99
99
|
object: z.ZodOptional<z.ZodString>;
|
|
100
|
-
/** Data Filter (
|
|
101
|
-
filter: z.ZodOptional<z.
|
|
100
|
+
/** Data Filter (MongoDB-style FilterCondition) */
|
|
101
|
+
filter: z.ZodOptional<z.ZodType<import("../data/filter.zod").FilterCondition, z.ZodTypeDef, import("../data/filter.zod").FilterCondition>>;
|
|
102
102
|
/** Category Field (X-Axis / Group By) */
|
|
103
103
|
categoryField: z.ZodOptional<z.ZodString>;
|
|
104
104
|
/** Value Field (Y-Axis) */
|
|
@@ -140,7 +140,7 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
140
140
|
h: number;
|
|
141
141
|
};
|
|
142
142
|
object?: string | undefined;
|
|
143
|
-
filter?:
|
|
143
|
+
filter?: import("../data/filter.zod").FilterCondition | undefined;
|
|
144
144
|
options?: any;
|
|
145
145
|
title?: string | undefined;
|
|
146
146
|
categoryField?: string | undefined;
|
|
@@ -153,7 +153,7 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
153
153
|
h: number;
|
|
154
154
|
};
|
|
155
155
|
object?: string | undefined;
|
|
156
|
-
filter?:
|
|
156
|
+
filter?: import("../data/filter.zod").FilterCondition | undefined;
|
|
157
157
|
options?: any;
|
|
158
158
|
type?: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table" | undefined;
|
|
159
159
|
aggregate?: "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
@@ -174,7 +174,7 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
174
174
|
h: number;
|
|
175
175
|
};
|
|
176
176
|
object?: string | undefined;
|
|
177
|
-
filter?:
|
|
177
|
+
filter?: import("../data/filter.zod").FilterCondition | undefined;
|
|
178
178
|
options?: any;
|
|
179
179
|
title?: string | undefined;
|
|
180
180
|
categoryField?: string | undefined;
|
|
@@ -192,7 +192,7 @@ export declare const DashboardSchema: z.ZodObject<{
|
|
|
192
192
|
h: number;
|
|
193
193
|
};
|
|
194
194
|
object?: string | undefined;
|
|
195
|
-
filter?:
|
|
195
|
+
filter?: import("../data/filter.zod").FilterCondition | undefined;
|
|
196
196
|
options?: any;
|
|
197
197
|
type?: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table" | undefined;
|
|
198
198
|
aggregate?: "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.zod.d.ts","sourceRoot":"","sources":["../../src/ui/dashboard.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboard.zod.d.ts","sourceRoot":"","sources":["../../src/ui/dashboard.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,SAAS,iFASpB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;IAChC,mBAAmB;;IAGnB,yBAAyB;;IAGzB,yBAAyB;;IAGzB,kDAAkD;;IAGlD,yCAAyC;;IAGzC,2BAA2B;;IAG3B,0BAA0B;;IAG1B;;;;;;OAMG;;;;;;;;;;;;;;;;;IAQH,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,mBAAmB;;IAGnB,oBAAoB;;IAGpB,kBAAkB;;IAGlB,4BAA4B;;QArD5B,mBAAmB;;QAGnB,yBAAyB;;QAGzB,yBAAyB;;QAGzB,kDAAkD;;QAGlD,yCAAyC;;QAGzC,2BAA2B;;QAG3B,0BAA0B;;QAG1B;;;;;;WAMG;;;;;;;;;;;;;;;;;QAQH,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBrD,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,SAAS;8BACH,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,KAAG,SAAS;CACpD,CAAC"}
|
package/dist/ui/dashboard.zod.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Dashboard = exports.DashboardSchema = exports.DashboardWidgetSchema = exports.ChartType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const filter_zod_1 = require("../data/filter.zod");
|
|
5
6
|
/**
|
|
6
7
|
* Chart Type Enum
|
|
7
8
|
*/
|
|
@@ -26,8 +27,8 @@ exports.DashboardWidgetSchema = zod_1.z.object({
|
|
|
26
27
|
type: exports.ChartType.default('metric').describe('Visualization type'),
|
|
27
28
|
/** Data Source Object */
|
|
28
29
|
object: zod_1.z.string().optional().describe('Data source object name'),
|
|
29
|
-
/** Data Filter (
|
|
30
|
-
filter:
|
|
30
|
+
/** Data Filter (MongoDB-style FilterCondition) */
|
|
31
|
+
filter: filter_zod_1.FilterConditionSchema.optional().describe('Data filter criteria'),
|
|
31
32
|
/** Category Field (X-Axis / Group By) */
|
|
32
33
|
categoryField: zod_1.z.string().optional().describe('Field for grouping (X-Axis)'),
|
|
33
34
|
/** Value Field (Y-Axis) */
|
package/dist/ui/report.zod.d.ts
CHANGED
|
@@ -111,24 +111,8 @@ export declare const ReportSchema: z.ZodObject<{
|
|
|
111
111
|
sortOrder?: "asc" | "desc" | undefined;
|
|
112
112
|
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
113
113
|
}>, "many">>;
|
|
114
|
-
/** Filtering */
|
|
115
|
-
filter: z.ZodOptional<z.
|
|
116
|
-
filterItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
-
id: z.ZodNumber;
|
|
118
|
-
field: z.ZodString;
|
|
119
|
-
operator: z.ZodString;
|
|
120
|
-
value: z.ZodAny;
|
|
121
|
-
}, "strip", z.ZodTypeAny, {
|
|
122
|
-
field: string;
|
|
123
|
-
id: number;
|
|
124
|
-
operator: string;
|
|
125
|
-
value?: any;
|
|
126
|
-
}, {
|
|
127
|
-
field: string;
|
|
128
|
-
id: number;
|
|
129
|
-
operator: string;
|
|
130
|
-
value?: any;
|
|
131
|
-
}>, "many">>;
|
|
114
|
+
/** Filtering (MongoDB-style FilterCondition) */
|
|
115
|
+
filter: z.ZodOptional<z.ZodType<import("../data/filter.zod").FilterCondition, z.ZodTypeDef, import("../data/filter.zod").FilterCondition>>;
|
|
132
116
|
/** Visualization */
|
|
133
117
|
chart: z.ZodOptional<z.ZodObject<{
|
|
134
118
|
type: z.ZodEnum<["bar", "column", "line", "pie", "donut", "scatter", "funnel"]>;
|
|
@@ -159,7 +143,7 @@ export declare const ReportSchema: z.ZodObject<{
|
|
|
159
143
|
label?: string | undefined;
|
|
160
144
|
aggregate?: "unique" | "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
161
145
|
}[];
|
|
162
|
-
filter?:
|
|
146
|
+
filter?: import("../data/filter.zod").FilterCondition | undefined;
|
|
163
147
|
description?: string | undefined;
|
|
164
148
|
groupingsDown?: {
|
|
165
149
|
field: string;
|
|
@@ -171,12 +155,6 @@ export declare const ReportSchema: z.ZodObject<{
|
|
|
171
155
|
sortOrder: "asc" | "desc";
|
|
172
156
|
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
173
157
|
}[] | undefined;
|
|
174
|
-
filterItems?: {
|
|
175
|
-
field: string;
|
|
176
|
-
id: number;
|
|
177
|
-
operator: string;
|
|
178
|
-
value?: any;
|
|
179
|
-
}[] | undefined;
|
|
180
158
|
chart?: {
|
|
181
159
|
type: "bar" | "line" | "pie" | "donut" | "funnel" | "column" | "scatter";
|
|
182
160
|
showLegend: boolean;
|
|
@@ -193,7 +171,7 @@ export declare const ReportSchema: z.ZodObject<{
|
|
|
193
171
|
label?: string | undefined;
|
|
194
172
|
aggregate?: "unique" | "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
195
173
|
}[];
|
|
196
|
-
filter?:
|
|
174
|
+
filter?: import("../data/filter.zod").FilterCondition | undefined;
|
|
197
175
|
type?: "summary" | "tabular" | "matrix" | "joined" | undefined;
|
|
198
176
|
description?: string | undefined;
|
|
199
177
|
groupingsDown?: {
|
|
@@ -206,12 +184,6 @@ export declare const ReportSchema: z.ZodObject<{
|
|
|
206
184
|
sortOrder?: "asc" | "desc" | undefined;
|
|
207
185
|
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
208
186
|
}[] | undefined;
|
|
209
|
-
filterItems?: {
|
|
210
|
-
field: string;
|
|
211
|
-
id: number;
|
|
212
|
-
operator: string;
|
|
213
|
-
value?: any;
|
|
214
|
-
}[] | undefined;
|
|
215
187
|
chart?: {
|
|
216
188
|
type: "bar" | "line" | "pie" | "donut" | "funnel" | "column" | "scatter";
|
|
217
189
|
xAxis: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.zod.d.ts","sourceRoot":"","sources":["../../src/ui/report.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"report.zod.d.ts","sourceRoot":"","sources":["../../src/ui/report.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,UAAU,uDAKrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB,eAAe;;;;IAKf,kBAAkB;;IAGlB,2BAA2B;;;;;;;;;;;;;;;IAK3B,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIpC,gDAAgD;;IAGhD,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,MAAM;8BACA,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,KAAG,MAAM;CAC9C,CAAC"}
|
package/dist/ui/report.zod.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Report = exports.ReportSchema = exports.ReportChartSchema = exports.ReportGroupingSchema = exports.ReportColumnSchema = exports.ReportType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const filter_zod_1 = require("../data/filter.zod");
|
|
5
6
|
/**
|
|
6
7
|
* Report Type Enum
|
|
7
8
|
*/
|
|
@@ -55,14 +56,8 @@ exports.ReportSchema = zod_1.z.object({
|
|
|
55
56
|
/** Grouping (for Summary/Matrix) */
|
|
56
57
|
groupingsDown: zod_1.z.array(exports.ReportGroupingSchema).optional().describe('Row groupings'),
|
|
57
58
|
groupingsAcross: zod_1.z.array(exports.ReportGroupingSchema).optional().describe('Column groupings (Matrix only)'),
|
|
58
|
-
/** Filtering */
|
|
59
|
-
filter:
|
|
60
|
-
filterItems: zod_1.z.array(zod_1.z.object({
|
|
61
|
-
id: zod_1.z.number(),
|
|
62
|
-
field: zod_1.z.string(),
|
|
63
|
-
operator: zod_1.z.string(),
|
|
64
|
-
value: zod_1.z.any()
|
|
65
|
-
})).optional().describe('Filter criteria lines'),
|
|
59
|
+
/** Filtering (MongoDB-style FilterCondition) */
|
|
60
|
+
filter: filter_zod_1.FilterConditionSchema.optional().describe('Filter criteria'),
|
|
66
61
|
/** Visualization */
|
|
67
62
|
chart: exports.ReportChartSchema.optional().describe('Embedded chart configuration'),
|
|
68
63
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/AccountLinkingConfig",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"AccountLinkingConfig": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"enabled": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"default": true,
|
|
10
|
+
"description": "Allow account linking"
|
|
11
|
+
},
|
|
12
|
+
"autoLink": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"default": false,
|
|
15
|
+
"description": "Automatically link accounts with same email"
|
|
16
|
+
},
|
|
17
|
+
"requireVerification": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": true,
|
|
20
|
+
"description": "Require email verification before linking"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
27
|
+
}
|