@objectstack/spec 2.0.3 → 2.0.5

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 (72) hide show
  1. package/dist/api/index.d.mts +1 -1
  2. package/dist/api/index.d.ts +1 -1
  3. package/dist/api/index.js +794 -686
  4. package/dist/api/index.js.map +1 -1
  5. package/dist/api/index.mjs +789 -686
  6. package/dist/api/index.mjs.map +1 -1
  7. package/dist/contracts/index.d.mts +2 -2
  8. package/dist/contracts/index.d.ts +2 -2
  9. package/dist/data/index.d.mts +2 -2
  10. package/dist/data/index.d.ts +2 -2
  11. package/dist/data/index.js +482 -453
  12. package/dist/data/index.js.map +1 -1
  13. package/dist/data/index.mjs +481 -453
  14. package/dist/data/index.mjs.map +1 -1
  15. package/dist/{driver.zod-DddW_4lJ.d.mts → driver.zod-DnOPgUGi.d.mts} +430 -1
  16. package/dist/{driver.zod-BJHWEbwG.d.ts → driver.zod-E3C6n0W-.d.ts} +430 -1
  17. package/dist/{index-yvEIvpa3.d.ts → index-BPhGHW32.d.ts} +4 -2
  18. package/dist/{index-DAQcdY6O.d.ts → index-BbtSaxHm.d.ts} +138 -2
  19. package/dist/{index-D9IaDTui.d.ts → index-BpP0MwlW.d.ts} +1 -1
  20. package/dist/{index-C8xlxqpA.d.ts → index-C6p-2KXV.d.ts} +1 -1
  21. package/dist/index-CDN6TRx9.d.mts +765 -0
  22. package/dist/index-CDN6TRx9.d.ts +765 -0
  23. package/dist/{index-wFiQRott.d.mts → index-CVnGe2b8.d.mts} +1 -1
  24. package/dist/{index-Cp6xnrOM.d.mts → index-D-tf4nDV.d.mts} +4 -2
  25. package/dist/{index-C_oDEJoO.d.mts → index-DRCh2NTZ.d.mts} +138 -2
  26. package/dist/{index-DRMAu-1t.d.mts → index-DTCkpGMm.d.mts} +1 -1
  27. package/dist/{index-DOuMlF5h.d.ts → index-DyawwLFZ.d.ts} +31 -2
  28. package/dist/{index-DPlvQwlz.d.mts → index-E1mP_eoE.d.mts} +31 -2
  29. package/dist/index.d.mts +41 -802
  30. package/dist/index.d.ts +41 -802
  31. package/dist/index.js +8656 -8523
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +8656 -8523
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/kernel/index.d.mts +1 -1
  36. package/dist/kernel/index.d.ts +1 -1
  37. package/dist/kernel/index.js +23 -0
  38. package/dist/kernel/index.js.map +1 -1
  39. package/dist/kernel/index.mjs +22 -0
  40. package/dist/kernel/index.mjs.map +1 -1
  41. package/dist/security/index.d.mts +2 -0
  42. package/dist/security/index.d.ts +2 -0
  43. package/dist/security/index.js +666 -0
  44. package/dist/security/index.js.map +1 -0
  45. package/dist/security/index.mjs +616 -0
  46. package/dist/security/index.mjs.map +1 -0
  47. package/dist/system/index.d.mts +1 -1
  48. package/dist/system/index.d.ts +1 -1
  49. package/dist/system/index.js +2 -1
  50. package/dist/system/index.js.map +1 -1
  51. package/dist/system/index.mjs +2 -1
  52. package/dist/system/index.mjs.map +1 -1
  53. package/json-schema/api/AuthEndpoint.json +201 -0
  54. package/json-schema/api/GetDiscoveryResponse.json +42 -0
  55. package/json-schema/data/BaseEngineOptions.json +49 -0
  56. package/json-schema/data/DataEngineAggregateOptions.json +42 -0
  57. package/json-schema/data/DataEngineAggregateRequest.json +42 -0
  58. package/json-schema/data/DataEngineBatchRequest.json +294 -0
  59. package/json-schema/data/DataEngineCountOptions.json +42 -0
  60. package/json-schema/data/DataEngineCountRequest.json +42 -0
  61. package/json-schema/data/DataEngineDeleteOptions.json +42 -0
  62. package/json-schema/data/DataEngineDeleteRequest.json +42 -0
  63. package/json-schema/data/DataEngineFindOneRequest.json +42 -0
  64. package/json-schema/data/DataEngineFindRequest.json +42 -0
  65. package/json-schema/data/DataEngineInsertOptions.json +42 -0
  66. package/json-schema/data/DataEngineInsertRequest.json +42 -0
  67. package/json-schema/data/DataEngineQueryOptions.json +42 -0
  68. package/json-schema/data/DataEngineRequest.json +588 -0
  69. package/json-schema/data/DataEngineUpdateOptions.json +42 -0
  70. package/json-schema/data/DataEngineUpdateRequest.json +42 -0
  71. package/json-schema/kernel/ExecutionContext.json +43 -0
  72. package/package.json +6 -1
@@ -1309,67 +1309,94 @@ var MappingSchema = z11.object({
1309
1309
  });
1310
1310
 
1311
1311
  // src/data/data-engine.zod.ts
1312
+ import { z as z13 } from "zod";
1313
+
1314
+ // src/kernel/execution-context.zod.ts
1312
1315
  import { z as z12 } from "zod";
1313
- var DataEngineFilterSchema = z12.union([
1314
- z12.record(z12.string(), z12.unknown()),
1316
+ var ExecutionContextSchema = z12.object({
1317
+ /** Current user ID (resolved from session) */
1318
+ userId: z12.string().optional(),
1319
+ /** Current organization/tenant ID (resolved from session.activeOrganizationId) */
1320
+ tenantId: z12.string().optional(),
1321
+ /** User role names (resolved from Member + Role) */
1322
+ roles: z12.array(z12.string()).default([]),
1323
+ /** Aggregated permission names (resolved from PermissionSet) */
1324
+ permissions: z12.array(z12.string()).default([]),
1325
+ /** Whether this is a system-level operation (bypasses permission checks) */
1326
+ isSystem: z12.boolean().default(false),
1327
+ /** Raw access token (for external API call pass-through) */
1328
+ accessToken: z12.string().optional(),
1329
+ /** Database transaction handle */
1330
+ transaction: z12.unknown().optional(),
1331
+ /** Request trace ID (for distributed tracing) */
1332
+ traceId: z12.string().optional()
1333
+ });
1334
+
1335
+ // src/data/data-engine.zod.ts
1336
+ var DataEngineFilterSchema = z13.union([
1337
+ z13.record(z13.string(), z13.unknown()),
1315
1338
  FilterConditionSchema
1316
1339
  ]).describe("Data Engine query filter conditions");
1317
- var DataEngineSortSchema = z12.union([
1318
- z12.record(z12.string(), z12.enum(["asc", "desc"])),
1319
- z12.record(z12.string(), z12.union([z12.literal(1), z12.literal(-1)])),
1320
- z12.array(SortNodeSchema)
1340
+ var DataEngineSortSchema = z13.union([
1341
+ z13.record(z13.string(), z13.enum(["asc", "desc"])),
1342
+ z13.record(z13.string(), z13.union([z13.literal(1), z13.literal(-1)])),
1343
+ z13.array(SortNodeSchema)
1321
1344
  ]).describe("Sort order definition");
1322
- var DataEngineQueryOptionsSchema = z12.object({
1345
+ var BaseEngineOptionsSchema = z13.object({
1346
+ /** Execution context (identity, tenant, transaction) */
1347
+ context: ExecutionContextSchema.optional()
1348
+ });
1349
+ var DataEngineQueryOptionsSchema = BaseEngineOptionsSchema.extend({
1323
1350
  /** Filter conditions (WHERE) */
1324
1351
  filter: DataEngineFilterSchema.optional(),
1325
1352
  /** Fields to select (SELECT) */
1326
- select: z12.array(z12.string()).optional(),
1353
+ select: z13.array(z13.string()).optional(),
1327
1354
  /** Sort order (ORDER BY) */
1328
1355
  sort: DataEngineSortSchema.optional(),
1329
1356
  /** Limit number of results (LIMIT) */
1330
- limit: z12.number().int().min(1).optional(),
1357
+ limit: z13.number().int().min(1).optional(),
1331
1358
  /** Skip number of results (OFFSET) */
1332
- skip: z12.number().int().min(0).optional(),
1359
+ skip: z13.number().int().min(0).optional(),
1333
1360
  /**
1334
1361
  * Maximum number of results (OData style)
1335
1362
  * Takes precedence over limit if both specified
1336
1363
  */
1337
- top: z12.number().int().min(1).optional(),
1364
+ top: z13.number().int().min(1).optional(),
1338
1365
  /**
1339
1366
  * Include related records (JOIN/Populate)
1340
1367
  * List of relationship field names to expand
1341
1368
  */
1342
- populate: z12.array(z12.string()).optional()
1369
+ populate: z13.array(z13.string()).optional()
1343
1370
  }).describe("Query options for IDataEngine.find() operations");
1344
- var DataEngineInsertOptionsSchema = z12.object({
1371
+ var DataEngineInsertOptionsSchema = BaseEngineOptionsSchema.extend({
1345
1372
  /**
1346
1373
  * Return the inserted record(s)?
1347
1374
  * Some drivers support RETURNING clause for efficiency.
1348
1375
  * Default: true
1349
1376
  */
1350
- returning: z12.boolean().default(true).optional()
1377
+ returning: z13.boolean().default(true).optional()
1351
1378
  }).describe("Options for DataEngine.insert operations");
1352
- var DataEngineUpdateOptionsSchema = z12.object({
1379
+ var DataEngineUpdateOptionsSchema = BaseEngineOptionsSchema.extend({
1353
1380
  /** Filter conditions to identify records to update */
1354
1381
  filter: DataEngineFilterSchema.optional(),
1355
1382
  /**
1356
1383
  * Perform an upsert?
1357
1384
  * If true, insert if not found.
1358
1385
  */
1359
- upsert: z12.boolean().default(false).optional(),
1386
+ upsert: z13.boolean().default(false).optional(),
1360
1387
  /**
1361
1388
  * Update multiple records?
1362
1389
  * If false, only the first match is updated.
1363
1390
  * Default: false
1364
1391
  */
1365
- multi: z12.boolean().default(false).optional(),
1392
+ multi: z13.boolean().default(false).optional(),
1366
1393
  /**
1367
1394
  * Return the updated record(s)?
1368
1395
  * Default: false (returns update count/status)
1369
1396
  */
1370
- returning: z12.boolean().default(false).optional()
1397
+ returning: z13.boolean().default(false).optional()
1371
1398
  }).describe("Options for DataEngine.update operations");
1372
- var DataEngineDeleteOptionsSchema = z12.object({
1399
+ var DataEngineDeleteOptionsSchema = BaseEngineOptionsSchema.extend({
1373
1400
  /** Filter conditions to identify records to delete */
1374
1401
  filter: DataEngineFilterSchema.optional(),
1375
1402
  /**
@@ -1377,99 +1404,99 @@ var DataEngineDeleteOptionsSchema = z12.object({
1377
1404
  * If false, only the first match is deleted.
1378
1405
  * Default: false
1379
1406
  */
1380
- multi: z12.boolean().default(false).optional()
1407
+ multi: z13.boolean().default(false).optional()
1381
1408
  }).describe("Options for DataEngine.delete operations");
1382
- var DataEngineAggregateOptionsSchema = z12.object({
1409
+ var DataEngineAggregateOptionsSchema = BaseEngineOptionsSchema.extend({
1383
1410
  /** Filter conditions (WHERE) */
1384
1411
  filter: DataEngineFilterSchema.optional(),
1385
1412
  /** Group By fields */
1386
- groupBy: z12.array(z12.string()).optional(),
1413
+ groupBy: z13.array(z13.string()).optional(),
1387
1414
  /**
1388
1415
  * Aggregation definitions
1389
1416
  * e.g. [{ field: 'amount', method: 'sum', alias: 'total' }]
1390
1417
  */
1391
- aggregations: z12.array(z12.object({
1392
- field: z12.string(),
1393
- method: z12.enum(["count", "sum", "avg", "min", "max", "count_distinct"]),
1394
- alias: z12.string().optional()
1418
+ aggregations: z13.array(z13.object({
1419
+ field: z13.string(),
1420
+ method: z13.enum(["count", "sum", "avg", "min", "max", "count_distinct"]),
1421
+ alias: z13.string().optional()
1395
1422
  })).optional()
1396
1423
  }).describe("Options for DataEngine.aggregate operations");
1397
- var DataEngineCountOptionsSchema = z12.object({
1424
+ var DataEngineCountOptionsSchema = BaseEngineOptionsSchema.extend({
1398
1425
  /** Filter conditions */
1399
1426
  filter: DataEngineFilterSchema.optional()
1400
1427
  }).describe("Options for DataEngine.count operations");
1401
- var DataEngineContractSchema = z12.object({
1402
- find: z12.function().input(z12.tuple([z12.string(), DataEngineQueryOptionsSchema.optional()])).output(z12.promise(z12.array(z12.unknown()))),
1403
- findOne: z12.function().input(z12.tuple([z12.string(), DataEngineQueryOptionsSchema.optional()])).output(z12.promise(z12.unknown())),
1404
- insert: z12.function().input(z12.tuple([z12.string(), z12.union([z12.record(z12.string(), z12.unknown()), z12.array(z12.record(z12.string(), z12.unknown()))]), DataEngineInsertOptionsSchema.optional()])).output(z12.promise(z12.unknown())),
1405
- update: z12.function().input(z12.tuple([z12.string(), z12.record(z12.string(), z12.unknown()), DataEngineUpdateOptionsSchema.optional()])).output(z12.promise(z12.unknown())),
1406
- delete: z12.function().input(z12.tuple([z12.string(), DataEngineDeleteOptionsSchema.optional()])).output(z12.promise(z12.unknown())),
1407
- count: z12.function().input(z12.tuple([z12.string(), DataEngineCountOptionsSchema.optional()])).output(z12.promise(z12.number())),
1408
- aggregate: z12.function().input(z12.tuple([z12.string(), DataEngineAggregateOptionsSchema])).output(z12.promise(z12.array(z12.unknown())))
1428
+ var DataEngineContractSchema = z13.object({
1429
+ find: z13.function().input(z13.tuple([z13.string(), DataEngineQueryOptionsSchema.optional()])).output(z13.promise(z13.array(z13.unknown()))),
1430
+ findOne: z13.function().input(z13.tuple([z13.string(), DataEngineQueryOptionsSchema.optional()])).output(z13.promise(z13.unknown())),
1431
+ insert: z13.function().input(z13.tuple([z13.string(), z13.union([z13.record(z13.string(), z13.unknown()), z13.array(z13.record(z13.string(), z13.unknown()))]), DataEngineInsertOptionsSchema.optional()])).output(z13.promise(z13.unknown())),
1432
+ update: z13.function().input(z13.tuple([z13.string(), z13.record(z13.string(), z13.unknown()), DataEngineUpdateOptionsSchema.optional()])).output(z13.promise(z13.unknown())),
1433
+ delete: z13.function().input(z13.tuple([z13.string(), DataEngineDeleteOptionsSchema.optional()])).output(z13.promise(z13.unknown())),
1434
+ count: z13.function().input(z13.tuple([z13.string(), DataEngineCountOptionsSchema.optional()])).output(z13.promise(z13.number())),
1435
+ aggregate: z13.function().input(z13.tuple([z13.string(), DataEngineAggregateOptionsSchema])).output(z13.promise(z13.array(z13.unknown())))
1409
1436
  }).describe("Standard Data Engine Contract");
1410
- var DataEngineFindRequestSchema = z12.object({
1411
- method: z12.literal("find"),
1412
- object: z12.string(),
1437
+ var DataEngineFindRequestSchema = z13.object({
1438
+ method: z13.literal("find"),
1439
+ object: z13.string(),
1413
1440
  query: DataEngineQueryOptionsSchema.optional()
1414
1441
  });
1415
- var DataEngineFindOneRequestSchema = z12.object({
1416
- method: z12.literal("findOne"),
1417
- object: z12.string(),
1442
+ var DataEngineFindOneRequestSchema = z13.object({
1443
+ method: z13.literal("findOne"),
1444
+ object: z13.string(),
1418
1445
  query: DataEngineQueryOptionsSchema.optional()
1419
1446
  });
1420
- var DataEngineInsertRequestSchema = z12.object({
1421
- method: z12.literal("insert"),
1422
- object: z12.string(),
1423
- data: z12.union([z12.record(z12.string(), z12.unknown()), z12.array(z12.record(z12.string(), z12.unknown()))]),
1447
+ var DataEngineInsertRequestSchema = z13.object({
1448
+ method: z13.literal("insert"),
1449
+ object: z13.string(),
1450
+ data: z13.union([z13.record(z13.string(), z13.unknown()), z13.array(z13.record(z13.string(), z13.unknown()))]),
1424
1451
  options: DataEngineInsertOptionsSchema.optional()
1425
1452
  });
1426
- var DataEngineUpdateRequestSchema = z12.object({
1427
- method: z12.literal("update"),
1428
- object: z12.string(),
1429
- data: z12.record(z12.string(), z12.unknown()),
1430
- id: z12.union([z12.string(), z12.number()]).optional().describe("ID for single update, or use filter in options"),
1453
+ var DataEngineUpdateRequestSchema = z13.object({
1454
+ method: z13.literal("update"),
1455
+ object: z13.string(),
1456
+ data: z13.record(z13.string(), z13.unknown()),
1457
+ id: z13.union([z13.string(), z13.number()]).optional().describe("ID for single update, or use filter in options"),
1431
1458
  options: DataEngineUpdateOptionsSchema.optional()
1432
1459
  });
1433
- var DataEngineDeleteRequestSchema = z12.object({
1434
- method: z12.literal("delete"),
1435
- object: z12.string(),
1436
- id: z12.union([z12.string(), z12.number()]).optional().describe("ID for single delete, or use filter in options"),
1460
+ var DataEngineDeleteRequestSchema = z13.object({
1461
+ method: z13.literal("delete"),
1462
+ object: z13.string(),
1463
+ id: z13.union([z13.string(), z13.number()]).optional().describe("ID for single delete, or use filter in options"),
1437
1464
  options: DataEngineDeleteOptionsSchema.optional()
1438
1465
  });
1439
- var DataEngineCountRequestSchema = z12.object({
1440
- method: z12.literal("count"),
1441
- object: z12.string(),
1466
+ var DataEngineCountRequestSchema = z13.object({
1467
+ method: z13.literal("count"),
1468
+ object: z13.string(),
1442
1469
  query: DataEngineCountOptionsSchema.optional()
1443
1470
  });
1444
- var DataEngineAggregateRequestSchema = z12.object({
1445
- method: z12.literal("aggregate"),
1446
- object: z12.string(),
1471
+ var DataEngineAggregateRequestSchema = z13.object({
1472
+ method: z13.literal("aggregate"),
1473
+ object: z13.string(),
1447
1474
  query: DataEngineAggregateOptionsSchema
1448
1475
  });
1449
- var DataEngineExecuteRequestSchema = z12.object({
1450
- method: z12.literal("execute"),
1476
+ var DataEngineExecuteRequestSchema = z13.object({
1477
+ method: z13.literal("execute"),
1451
1478
  /** The abstract command (string SQL, or JSON object) */
1452
- command: z12.unknown(),
1479
+ command: z13.unknown(),
1453
1480
  /** Optional options */
1454
- options: z12.record(z12.string(), z12.unknown()).optional()
1481
+ options: z13.record(z13.string(), z13.unknown()).optional()
1455
1482
  });
1456
- var DataEngineVectorFindRequestSchema = z12.object({
1457
- method: z12.literal("vectorFind"),
1458
- object: z12.string(),
1483
+ var DataEngineVectorFindRequestSchema = z13.object({
1484
+ method: z13.literal("vectorFind"),
1485
+ object: z13.string(),
1459
1486
  /** The vector embedding to search for */
1460
- vector: z12.array(z12.number()),
1487
+ vector: z13.array(z13.number()),
1461
1488
  /** Optional pre-filter (Metadata filtering) */
1462
1489
  filter: DataEngineFilterSchema.optional(),
1463
1490
  /** Fields to select */
1464
- select: z12.array(z12.string()).optional(),
1491
+ select: z13.array(z13.string()).optional(),
1465
1492
  /** Number of results */
1466
- limit: z12.number().int().default(5).optional(),
1493
+ limit: z13.number().int().default(5).optional(),
1467
1494
  /** Minimum similarity score (0-1) or distance threshold */
1468
- threshold: z12.number().optional()
1495
+ threshold: z13.number().optional()
1469
1496
  });
1470
- var DataEngineBatchRequestSchema = z12.object({
1471
- method: z12.literal("batch"),
1472
- requests: z12.array(z12.discriminatedUnion("method", [
1497
+ var DataEngineBatchRequestSchema = z13.object({
1498
+ method: z13.literal("batch"),
1499
+ requests: z13.array(z13.discriminatedUnion("method", [
1473
1500
  DataEngineFindRequestSchema,
1474
1501
  DataEngineFindOneRequestSchema,
1475
1502
  DataEngineInsertRequestSchema,
@@ -1485,9 +1512,9 @@ var DataEngineBatchRequestSchema = z12.object({
1485
1512
  * - true: All or nothing (Atomic)
1486
1513
  * - false: Best effort, continue on error
1487
1514
  */
1488
- transaction: z12.boolean().default(true).optional()
1515
+ transaction: z13.boolean().default(true).optional()
1489
1516
  });
1490
- var DataEngineRequestSchema = z12.discriminatedUnion("method", [
1517
+ var DataEngineRequestSchema = z13.discriminatedUnion("method", [
1491
1518
  DataEngineFindRequestSchema,
1492
1519
  DataEngineFindOneRequestSchema,
1493
1520
  DataEngineInsertRequestSchema,
@@ -1501,11 +1528,11 @@ var DataEngineRequestSchema = z12.discriminatedUnion("method", [
1501
1528
  ]).describe("Virtual ObjectQL Request Protocol");
1502
1529
 
1503
1530
  // src/data/driver.zod.ts
1504
- import { z as z14 } from "zod";
1531
+ import { z as z15 } from "zod";
1505
1532
 
1506
1533
  // src/shared/enums.zod.ts
1507
- import { z as z13 } from "zod";
1508
- var AggregationFunctionEnum = z13.enum([
1534
+ import { z as z14 } from "zod";
1535
+ var AggregationFunctionEnum = z14.enum([
1509
1536
  "count",
1510
1537
  "sum",
1511
1538
  "avg",
@@ -1517,83 +1544,83 @@ var AggregationFunctionEnum = z13.enum([
1517
1544
  "stddev",
1518
1545
  "variance"
1519
1546
  ]).describe("Standard aggregation functions");
1520
- var SortDirectionEnum = z13.enum(["asc", "desc"]).describe("Sort order direction");
1521
- var MutationEventEnum = z13.enum([
1547
+ var SortDirectionEnum = z14.enum(["asc", "desc"]).describe("Sort order direction");
1548
+ var MutationEventEnum = z14.enum([
1522
1549
  "insert",
1523
1550
  "update",
1524
1551
  "delete",
1525
1552
  "upsert"
1526
1553
  ]).describe("Data mutation event types");
1527
- var IsolationLevelEnum = z13.enum([
1554
+ var IsolationLevelEnum = z14.enum([
1528
1555
  "read_uncommitted",
1529
1556
  "read_committed",
1530
1557
  "repeatable_read",
1531
1558
  "serializable",
1532
1559
  "snapshot"
1533
1560
  ]).describe("Transaction isolation levels (snake_case standard)");
1534
- var CacheStrategyEnum = z13.enum(["lru", "lfu", "ttl", "fifo"]).describe("Cache eviction strategy");
1561
+ var CacheStrategyEnum = z14.enum(["lru", "lfu", "ttl", "fifo"]).describe("Cache eviction strategy");
1535
1562
 
1536
1563
  // src/data/driver.zod.ts
1537
- var DriverOptionsSchema = z14.object({
1564
+ var DriverOptionsSchema = z15.object({
1538
1565
  /**
1539
1566
  * Transaction handle/identifier.
1540
1567
  * If provided, the operation must run within this transaction.
1541
1568
  */
1542
- transaction: z14.unknown().optional().describe("Transaction handle"),
1569
+ transaction: z15.unknown().optional().describe("Transaction handle"),
1543
1570
  /**
1544
1571
  * Operation timeout in milliseconds.
1545
1572
  */
1546
- timeout: z14.number().optional().describe("Timeout in ms"),
1573
+ timeout: z15.number().optional().describe("Timeout in ms"),
1547
1574
  /**
1548
1575
  * Whether to bypass cache and force a fresh read.
1549
1576
  */
1550
- skipCache: z14.boolean().optional().describe("Bypass cache"),
1577
+ skipCache: z15.boolean().optional().describe("Bypass cache"),
1551
1578
  /**
1552
1579
  * Distributed Tracing Context.
1553
1580
  * Used for passing OpenTelemetry span context or request IDs for observability.
1554
1581
  */
1555
- traceContext: z14.record(z14.string(), z14.string()).optional().describe("OpenTelemetry context or request ID"),
1582
+ traceContext: z15.record(z15.string(), z15.string()).optional().describe("OpenTelemetry context or request ID"),
1556
1583
  /**
1557
1584
  * Tenant Identifier.
1558
1585
  * For multi-tenant databases (row-level security or schema-per-tenant).
1559
1586
  */
1560
- tenantId: z14.string().optional().describe("Tenant Isolation identifier")
1587
+ tenantId: z15.string().optional().describe("Tenant Isolation identifier")
1561
1588
  });
1562
- var DriverCapabilitiesSchema = z14.object({
1589
+ var DriverCapabilitiesSchema = z15.object({
1563
1590
  // ============================================================================
1564
1591
  // Basic CRUD Operations
1565
1592
  // ============================================================================
1566
1593
  /**
1567
1594
  * Whether the driver supports create operations.
1568
1595
  */
1569
- create: z14.boolean().default(true).describe("Supports CREATE operations"),
1596
+ create: z15.boolean().default(true).describe("Supports CREATE operations"),
1570
1597
  /**
1571
1598
  * Whether the driver supports read operations.
1572
1599
  */
1573
- read: z14.boolean().default(true).describe("Supports READ operations"),
1600
+ read: z15.boolean().default(true).describe("Supports READ operations"),
1574
1601
  /**
1575
1602
  * Whether the driver supports update operations.
1576
1603
  */
1577
- update: z14.boolean().default(true).describe("Supports UPDATE operations"),
1604
+ update: z15.boolean().default(true).describe("Supports UPDATE operations"),
1578
1605
  /**
1579
1606
  * Whether the driver supports delete operations.
1580
1607
  */
1581
- delete: z14.boolean().default(true).describe("Supports DELETE operations"),
1608
+ delete: z15.boolean().default(true).describe("Supports DELETE operations"),
1582
1609
  // ============================================================================
1583
1610
  // Bulk Operations
1584
1611
  // ============================================================================
1585
1612
  /**
1586
1613
  * Whether the driver supports bulk create operations.
1587
1614
  */
1588
- bulkCreate: z14.boolean().default(false).describe("Supports bulk CREATE operations"),
1615
+ bulkCreate: z15.boolean().default(false).describe("Supports bulk CREATE operations"),
1589
1616
  /**
1590
1617
  * Whether the driver supports bulk update operations.
1591
1618
  */
1592
- bulkUpdate: z14.boolean().default(false).describe("Supports bulk UPDATE operations"),
1619
+ bulkUpdate: z15.boolean().default(false).describe("Supports bulk UPDATE operations"),
1593
1620
  /**
1594
1621
  * Whether the driver supports bulk delete operations.
1595
1622
  */
1596
- bulkDelete: z14.boolean().default(false).describe("Supports bulk DELETE operations"),
1623
+ bulkDelete: z15.boolean().default(false).describe("Supports bulk DELETE operations"),
1597
1624
  // ============================================================================
1598
1625
  // Transaction & Connection Management
1599
1626
  // ============================================================================
@@ -1601,15 +1628,15 @@ var DriverCapabilitiesSchema = z14.object({
1601
1628
  * Whether the driver supports database transactions.
1602
1629
  * If true, beginTransaction, commit, and rollback must be implemented.
1603
1630
  */
1604
- transactions: z14.boolean().default(false).describe("Supports ACID transactions"),
1631
+ transactions: z15.boolean().default(false).describe("Supports ACID transactions"),
1605
1632
  /**
1606
1633
  * Whether the driver supports savepoints within transactions.
1607
1634
  */
1608
- savepoints: z14.boolean().default(false).describe("Supports transaction savepoints"),
1635
+ savepoints: z15.boolean().default(false).describe("Supports transaction savepoints"),
1609
1636
  /**
1610
1637
  * Supported transaction isolation levels.
1611
1638
  */
1612
- isolationLevels: z14.array(IsolationLevelEnum).optional().describe("Supported isolation levels"),
1639
+ isolationLevels: z15.array(IsolationLevelEnum).optional().describe("Supported isolation levels"),
1613
1640
  // ============================================================================
1614
1641
  // Query Operations
1615
1642
  // ============================================================================
@@ -1619,41 +1646,41 @@ var DriverCapabilitiesSchema = z14.object({
1619
1646
  *
1620
1647
  * Example: Memory driver might not support complex filter conditions.
1621
1648
  */
1622
- queryFilters: z14.boolean().default(true).describe("Supports WHERE clause filtering"),
1649
+ queryFilters: z15.boolean().default(true).describe("Supports WHERE clause filtering"),
1623
1650
  /**
1624
1651
  * Whether the driver supports aggregation functions (COUNT, SUM, AVG, etc.).
1625
1652
  * If false, ObjectQL will compute aggregations in memory.
1626
1653
  */
1627
- queryAggregations: z14.boolean().default(false).describe("Supports GROUP BY and aggregation functions"),
1654
+ queryAggregations: z15.boolean().default(false).describe("Supports GROUP BY and aggregation functions"),
1628
1655
  /**
1629
1656
  * Whether the driver supports ORDER BY sorting.
1630
1657
  * If false, ObjectQL will sort results in memory.
1631
1658
  */
1632
- querySorting: z14.boolean().default(true).describe("Supports ORDER BY sorting"),
1659
+ querySorting: z15.boolean().default(true).describe("Supports ORDER BY sorting"),
1633
1660
  /**
1634
1661
  * Whether the driver supports LIMIT/OFFSET pagination.
1635
1662
  * If false, ObjectQL will fetch all records and paginate in memory.
1636
1663
  */
1637
- queryPagination: z14.boolean().default(true).describe("Supports LIMIT/OFFSET pagination"),
1664
+ queryPagination: z15.boolean().default(true).describe("Supports LIMIT/OFFSET pagination"),
1638
1665
  /**
1639
1666
  * Whether the driver supports window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.).
1640
1667
  * If false, ObjectQL will compute window functions in memory.
1641
1668
  */
1642
- queryWindowFunctions: z14.boolean().default(false).describe("Supports window functions with OVER clause"),
1669
+ queryWindowFunctions: z15.boolean().default(false).describe("Supports window functions with OVER clause"),
1643
1670
  /**
1644
1671
  * Whether the driver supports subqueries (nested SELECT statements).
1645
1672
  * If false, ObjectQL will execute queries separately and combine results.
1646
1673
  */
1647
- querySubqueries: z14.boolean().default(false).describe("Supports subqueries"),
1674
+ querySubqueries: z15.boolean().default(false).describe("Supports subqueries"),
1648
1675
  /**
1649
1676
  * Whether the driver supports Common Table Expressions (WITH clause).
1650
1677
  */
1651
- queryCTE: z14.boolean().default(false).describe("Supports Common Table Expressions (WITH clause)"),
1678
+ queryCTE: z15.boolean().default(false).describe("Supports Common Table Expressions (WITH clause)"),
1652
1679
  /**
1653
1680
  * Whether the driver supports SQL-style joins.
1654
1681
  * If false, ObjectQL will fetch related data separately and join in memory.
1655
1682
  */
1656
- joins: z14.boolean().default(false).describe("Supports SQL joins"),
1683
+ joins: z15.boolean().default(false).describe("Supports SQL joins"),
1657
1684
  // ============================================================================
1658
1685
  // Advanced Features
1659
1686
  // ============================================================================
@@ -1661,74 +1688,74 @@ var DriverCapabilitiesSchema = z14.object({
1661
1688
  * Whether the driver supports full-text search.
1662
1689
  * If true, text search queries can be pushed to the database.
1663
1690
  */
1664
- fullTextSearch: z14.boolean().default(false).describe("Supports full-text search"),
1691
+ fullTextSearch: z15.boolean().default(false).describe("Supports full-text search"),
1665
1692
  /**
1666
1693
  * Whether the driver supports JSON querying capabilities.
1667
1694
  */
1668
- jsonQuery: z14.boolean().default(false).describe("Supports JSON field querying"),
1695
+ jsonQuery: z15.boolean().default(false).describe("Supports JSON field querying"),
1669
1696
  /**
1670
1697
  * Whether the driver supports geospatial queries.
1671
1698
  */
1672
- geospatialQuery: z14.boolean().default(false).describe("Supports geospatial queries"),
1699
+ geospatialQuery: z15.boolean().default(false).describe("Supports geospatial queries"),
1673
1700
  /**
1674
1701
  * Whether the driver supports streaming large result sets.
1675
1702
  */
1676
- streaming: z14.boolean().default(false).describe("Supports result streaming (cursors/iterators)"),
1703
+ streaming: z15.boolean().default(false).describe("Supports result streaming (cursors/iterators)"),
1677
1704
  /**
1678
1705
  * Whether the driver supports JSON field types.
1679
1706
  * If false, JSON data will be serialized as strings.
1680
1707
  */
1681
- jsonFields: z14.boolean().default(false).describe("Supports JSON field types"),
1708
+ jsonFields: z15.boolean().default(false).describe("Supports JSON field types"),
1682
1709
  /**
1683
1710
  * Whether the driver supports array field types.
1684
1711
  * If false, arrays will be stored as JSON strings or in separate tables.
1685
1712
  */
1686
- arrayFields: z14.boolean().default(false).describe("Supports array field types"),
1713
+ arrayFields: z15.boolean().default(false).describe("Supports array field types"),
1687
1714
  /**
1688
1715
  * Whether the driver supports vector embeddings and similarity search.
1689
1716
  * Required for RAG (Retrieval-Augmented Generation) and AI features.
1690
1717
  */
1691
- vectorSearch: z14.boolean().default(false).describe("Supports vector embeddings and similarity search"),
1718
+ vectorSearch: z15.boolean().default(false).describe("Supports vector embeddings and similarity search"),
1692
1719
  // ============================================================================
1693
1720
  // Schema Management
1694
1721
  // ============================================================================
1695
1722
  /**
1696
1723
  * Whether the driver supports automatic schema synchronization.
1697
1724
  */
1698
- schemaSync: z14.boolean().default(false).describe("Supports automatic schema synchronization"),
1725
+ schemaSync: z15.boolean().default(false).describe("Supports automatic schema synchronization"),
1699
1726
  /**
1700
1727
  * Whether the driver supports database migrations.
1701
1728
  */
1702
- migrations: z14.boolean().default(false).describe("Supports database migrations"),
1729
+ migrations: z15.boolean().default(false).describe("Supports database migrations"),
1703
1730
  /**
1704
1731
  * Whether the driver supports index management.
1705
1732
  */
1706
- indexes: z14.boolean().default(false).describe("Supports index creation and management"),
1733
+ indexes: z15.boolean().default(false).describe("Supports index creation and management"),
1707
1734
  // ============================================================================
1708
1735
  // Performance & Optimization
1709
1736
  // ============================================================================
1710
1737
  /**
1711
1738
  * Whether the driver supports connection pooling.
1712
1739
  */
1713
- connectionPooling: z14.boolean().default(false).describe("Supports connection pooling"),
1740
+ connectionPooling: z15.boolean().default(false).describe("Supports connection pooling"),
1714
1741
  /**
1715
1742
  * Whether the driver supports prepared statements.
1716
1743
  */
1717
- preparedStatements: z14.boolean().default(false).describe("Supports prepared statements (SQL injection prevention)"),
1744
+ preparedStatements: z15.boolean().default(false).describe("Supports prepared statements (SQL injection prevention)"),
1718
1745
  /**
1719
1746
  * Whether the driver supports query result caching.
1720
1747
  */
1721
- queryCache: z14.boolean().default(false).describe("Supports query result caching")
1748
+ queryCache: z15.boolean().default(false).describe("Supports query result caching")
1722
1749
  });
1723
- var DriverInterfaceSchema = z14.object({
1750
+ var DriverInterfaceSchema = z15.object({
1724
1751
  /**
1725
1752
  * Driver name (e.g., 'postgresql', 'mongodb', 'rest_api').
1726
1753
  */
1727
- name: z14.string().describe("Driver unique name"),
1754
+ name: z15.string().describe("Driver unique name"),
1728
1755
  /**
1729
1756
  * Driver version.
1730
1757
  */
1731
- version: z14.string().describe("Driver version"),
1758
+ version: z15.string().describe("Driver version"),
1732
1759
  /**
1733
1760
  * Capabilities descriptor.
1734
1761
  */
@@ -1739,25 +1766,25 @@ var DriverInterfaceSchema = z14.object({
1739
1766
  /**
1740
1767
  * Initialize connection pool or authenticate.
1741
1768
  */
1742
- connect: z14.function().input(z14.tuple([])).output(z14.promise(z14.void())).describe("Establish connection"),
1769
+ connect: z15.function().input(z15.tuple([])).output(z15.promise(z15.void())).describe("Establish connection"),
1743
1770
  /**
1744
1771
  * Close connections and cleanup resources.
1745
1772
  */
1746
- disconnect: z14.function().input(z14.tuple([])).output(z14.promise(z14.void())).describe("Close connection"),
1773
+ disconnect: z15.function().input(z15.tuple([])).output(z15.promise(z15.void())).describe("Close connection"),
1747
1774
  /**
1748
1775
  * Check connection health.
1749
1776
  * @returns true if healthy, false otherwise.
1750
1777
  */
1751
- checkHealth: z14.function().input(z14.tuple([])).output(z14.promise(z14.boolean())).describe("Health check"),
1778
+ checkHealth: z15.function().input(z15.tuple([])).output(z15.promise(z15.boolean())).describe("Health check"),
1752
1779
  /**
1753
1780
  * Get Connection Pool Statistics.
1754
1781
  * Useful for monitoring database load.
1755
1782
  */
1756
- getPoolStats: z14.function().input(z14.tuple([])).output(z14.object({
1757
- total: z14.number(),
1758
- idle: z14.number(),
1759
- active: z14.number(),
1760
- waiting: z14.number()
1783
+ getPoolStats: z15.function().input(z15.tuple([])).output(z15.object({
1784
+ total: z15.number(),
1785
+ idle: z15.number(),
1786
+ active: z15.number(),
1787
+ waiting: z15.number()
1761
1788
  }).optional()).optional().describe("Get connection pool statistics"),
1762
1789
  // ============================================================================
1763
1790
  // Raw Execution (Escape Hatch)
@@ -1778,7 +1805,7 @@ var DriverInterfaceSchema = z14.object({
1778
1805
  * // Mongo Driver
1779
1806
  * await driver.execute({ aggregate: 'orders', pipeline: [...] });
1780
1807
  */
1781
- execute: z14.function().input(z14.tuple([z14.unknown(), z14.array(z14.unknown()).optional(), DriverOptionsSchema.optional()])).output(z14.promise(z14.unknown())).describe("Execute raw command"),
1808
+ execute: z15.function().input(z15.tuple([z15.unknown(), z15.array(z15.unknown()).optional(), DriverOptionsSchema.optional()])).output(z15.promise(z15.unknown())).describe("Execute raw command"),
1782
1809
  // ============================================================================
1783
1810
  // CRUD Operations
1784
1811
  // ============================================================================
@@ -1800,7 +1827,7 @@ var DriverInterfaceSchema = z14.object({
1800
1827
  * @returns Array of records.
1801
1828
  * MUST return `id` as string. MUST NOT return implementation details like `_id`.
1802
1829
  */
1803
- find: z14.function().input(z14.tuple([z14.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z14.promise(z14.array(z14.record(z14.string(), z14.unknown())))).describe("Find records"),
1830
+ find: z15.function().input(z15.tuple([z15.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z15.promise(z15.array(z15.record(z15.string(), z15.unknown())))).describe("Find records"),
1804
1831
  /**
1805
1832
  * Stream records matching the structured query.
1806
1833
  * Optimized for large datasets to avoid memory overflow.
@@ -1810,7 +1837,7 @@ var DriverInterfaceSchema = z14.object({
1810
1837
  * @param options - Driver options.
1811
1838
  * @returns AsyncIterable/ReadableStream of records.
1812
1839
  */
1813
- findStream: z14.function().input(z14.tuple([z14.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z14.unknown()).describe("Stream records (AsyncIterable)"),
1840
+ findStream: z15.function().input(z15.tuple([z15.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z15.unknown()).describe("Stream records (AsyncIterable)"),
1814
1841
  /**
1815
1842
  * Find a single record by query.
1816
1843
  * Similar to find(), but returns only the first match or null.
@@ -1821,7 +1848,7 @@ var DriverInterfaceSchema = z14.object({
1821
1848
  * @returns The record or null.
1822
1849
  * MUST return `id` as string. MUST NOT return implementation details like `_id`.
1823
1850
  */
1824
- findOne: z14.function().input(z14.tuple([z14.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z14.promise(z14.record(z14.string(), z14.unknown()).nullable())).describe("Find one record"),
1851
+ findOne: z15.function().input(z15.tuple([z15.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z15.promise(z15.record(z15.string(), z15.unknown()).nullable())).describe("Find one record"),
1825
1852
  /**
1826
1853
  * Create a new record.
1827
1854
  *
@@ -1831,7 +1858,7 @@ var DriverInterfaceSchema = z14.object({
1831
1858
  * @returns The created record, including server-generated fields (id, created_at, etc.).
1832
1859
  * MUST return `id` as string. MUST NOT return implementation details like `_id`.
1833
1860
  */
1834
- create: z14.function().input(z14.tuple([z14.string(), z14.record(z14.string(), z14.unknown()), DriverOptionsSchema.optional()])).output(z14.promise(z14.record(z14.string(), z14.unknown()))).describe("Create record"),
1861
+ create: z15.function().input(z15.tuple([z15.string(), z15.record(z15.string(), z15.unknown()), DriverOptionsSchema.optional()])).output(z15.promise(z15.record(z15.string(), z15.unknown()))).describe("Create record"),
1835
1862
  /**
1836
1863
  * Update an existing record by ID.
1837
1864
  *
@@ -1842,7 +1869,7 @@ var DriverInterfaceSchema = z14.object({
1842
1869
  * @returns The updated record.
1843
1870
  * MUST return `id` as string. MUST NOT return implementation details like `_id`.
1844
1871
  */
1845
- update: z14.function().input(z14.tuple([z14.string(), z14.string().or(z14.number()), z14.record(z14.string(), z14.unknown()), DriverOptionsSchema.optional()])).output(z14.promise(z14.record(z14.string(), z14.unknown()))).describe("Update record"),
1872
+ update: z15.function().input(z15.tuple([z15.string(), z15.string().or(z15.number()), z15.record(z15.string(), z15.unknown()), DriverOptionsSchema.optional()])).output(z15.promise(z15.record(z15.string(), z15.unknown()))).describe("Update record"),
1846
1873
  /**
1847
1874
  * Upsert (Update or Insert) a record.
1848
1875
  *
@@ -1852,7 +1879,7 @@ var DriverInterfaceSchema = z14.object({
1852
1879
  * @param options - Driver options.
1853
1880
  * @returns The created or updated record.
1854
1881
  */
1855
- upsert: z14.function().input(z14.tuple([z14.string(), z14.record(z14.string(), z14.unknown()), z14.array(z14.string()).optional(), DriverOptionsSchema.optional()])).output(z14.promise(z14.record(z14.string(), z14.unknown()))).describe("Upsert record"),
1882
+ upsert: z15.function().input(z15.tuple([z15.string(), z15.record(z15.string(), z15.unknown()), z15.array(z15.string()).optional(), DriverOptionsSchema.optional()])).output(z15.promise(z15.record(z15.string(), z15.unknown()))).describe("Upsert record"),
1856
1883
  /**
1857
1884
  * Delete a record by ID.
1858
1885
  *
@@ -1861,7 +1888,7 @@ var DriverInterfaceSchema = z14.object({
1861
1888
  * @param options - Driver options.
1862
1889
  * @returns True if deleted, false if not found.
1863
1890
  */
1864
- delete: z14.function().input(z14.tuple([z14.string(), z14.string().or(z14.number()), DriverOptionsSchema.optional()])).output(z14.promise(z14.boolean())).describe("Delete record"),
1891
+ delete: z15.function().input(z15.tuple([z15.string(), z15.string().or(z15.number()), DriverOptionsSchema.optional()])).output(z15.promise(z15.boolean())).describe("Delete record"),
1865
1892
  /**
1866
1893
  * Count records matching a query.
1867
1894
  *
@@ -1870,7 +1897,7 @@ var DriverInterfaceSchema = z14.object({
1870
1897
  * @param options - Driver options.
1871
1898
  * @returns Total count.
1872
1899
  */
1873
- count: z14.function().input(z14.tuple([z14.string(), QuerySchema.optional(), DriverOptionsSchema.optional()])).output(z14.promise(z14.number())).describe("Count records"),
1900
+ count: z15.function().input(z15.tuple([z15.string(), QuerySchema.optional(), DriverOptionsSchema.optional()])).output(z15.promise(z15.number())).describe("Count records"),
1874
1901
  // ============================================================================
1875
1902
  // Bulk Operations
1876
1903
  // ============================================================================
@@ -1882,7 +1909,7 @@ var DriverInterfaceSchema = z14.object({
1882
1909
  * @param dataArray - Array of record data.
1883
1910
  * @returns Array of created records.
1884
1911
  */
1885
- bulkCreate: z14.function().input(z14.tuple([z14.string(), z14.array(z14.record(z14.string(), z14.unknown())), DriverOptionsSchema.optional()])).output(z14.promise(z14.array(z14.record(z14.string(), z14.unknown())))),
1912
+ bulkCreate: z15.function().input(z15.tuple([z15.string(), z15.array(z15.record(z15.string(), z15.unknown())), DriverOptionsSchema.optional()])).output(z15.promise(z15.array(z15.record(z15.string(), z15.unknown())))),
1886
1913
  /**
1887
1914
  * Update multiple records in a single batch.
1888
1915
  *
@@ -1890,14 +1917,14 @@ var DriverInterfaceSchema = z14.object({
1890
1917
  * @param updates - Array of objects containing {id, data}.
1891
1918
  * @returns Array of updated records.
1892
1919
  */
1893
- bulkUpdate: z14.function().input(z14.tuple([z14.string(), z14.array(z14.object({ id: z14.string().or(z14.number()), data: z14.record(z14.string(), z14.unknown()) })), DriverOptionsSchema.optional()])).output(z14.promise(z14.array(z14.record(z14.string(), z14.unknown())))),
1920
+ bulkUpdate: z15.function().input(z15.tuple([z15.string(), z15.array(z15.object({ id: z15.string().or(z15.number()), data: z15.record(z15.string(), z15.unknown()) })), DriverOptionsSchema.optional()])).output(z15.promise(z15.array(z15.record(z15.string(), z15.unknown())))),
1894
1921
  /**
1895
1922
  * Delete multiple records in a single batch.
1896
1923
  *
1897
1924
  * @param object - The object name.
1898
1925
  * @param ids - Array of record IDs.
1899
1926
  */
1900
- bulkDelete: z14.function().input(z14.tuple([z14.string(), z14.array(z14.string().or(z14.number())), DriverOptionsSchema.optional()])).output(z14.promise(z14.void())),
1927
+ bulkDelete: z15.function().input(z15.tuple([z15.string(), z15.array(z15.string().or(z15.number())), DriverOptionsSchema.optional()])).output(z15.promise(z15.void())),
1901
1928
  /**
1902
1929
  * Update multiple records matching a query.
1903
1930
  * Direct database push-down. DOES NOT trigger per-record hooks.
@@ -1907,7 +1934,7 @@ var DriverInterfaceSchema = z14.object({
1907
1934
  * @param data - The data to update.
1908
1935
  * @returns Count of modified records.
1909
1936
  */
1910
- updateMany: z14.function().input(z14.tuple([z14.string(), QuerySchema, z14.record(z14.string(), z14.unknown()), DriverOptionsSchema.optional()])).output(z14.promise(z14.number())).optional(),
1937
+ updateMany: z15.function().input(z15.tuple([z15.string(), QuerySchema, z15.record(z15.string(), z15.unknown()), DriverOptionsSchema.optional()])).output(z15.promise(z15.number())).optional(),
1911
1938
  /**
1912
1939
  * Delete multiple records matching a query.
1913
1940
  * Direct database push-down. DOES NOT trigger per-record hooks.
@@ -1916,7 +1943,7 @@ var DriverInterfaceSchema = z14.object({
1916
1943
  * @param query - The filtering criteria.
1917
1944
  * @returns Count of deleted records.
1918
1945
  */
1919
- deleteMany: z14.function().input(z14.tuple([z14.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z14.promise(z14.number())).optional(),
1946
+ deleteMany: z15.function().input(z15.tuple([z15.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z15.promise(z15.number())).optional(),
1920
1947
  // ============================================================================
1921
1948
  // Transaction Management
1922
1949
  // ============================================================================
@@ -1925,19 +1952,19 @@ var DriverInterfaceSchema = z14.object({
1925
1952
  * @param options - Isolation level and other settings.
1926
1953
  * @returns A transaction handle to be passed to subsequent operations via `options.transaction`.
1927
1954
  */
1928
- beginTransaction: z14.function().input(z14.tuple([z14.object({
1955
+ beginTransaction: z15.function().input(z15.tuple([z15.object({
1929
1956
  isolationLevel: IsolationLevelEnum.optional()
1930
- }).optional()])).output(z14.promise(z14.unknown())).describe("Start transaction"),
1957
+ }).optional()])).output(z15.promise(z15.unknown())).describe("Start transaction"),
1931
1958
  /**
1932
1959
  * Commit the transaction.
1933
1960
  * @param transaction - The transaction handle.
1934
1961
  */
1935
- commit: z14.function().input(z14.tuple([z14.unknown()])).output(z14.promise(z14.void())).describe("Commit transaction"),
1962
+ commit: z15.function().input(z15.tuple([z15.unknown()])).output(z15.promise(z15.void())).describe("Commit transaction"),
1936
1963
  /**
1937
1964
  * Rollback the transaction.
1938
1965
  * @param transaction - The transaction handle.
1939
1966
  */
1940
- rollback: z14.function().input(z14.tuple([z14.unknown()])).output(z14.promise(z14.void())).describe("Rollback transaction"),
1967
+ rollback: z15.function().input(z15.tuple([z15.unknown()])).output(z15.promise(z15.void())).describe("Rollback transaction"),
1941
1968
  // ============================================================================
1942
1969
  // Schema Management
1943
1970
  // ============================================================================
@@ -1950,14 +1977,14 @@ var DriverInterfaceSchema = z14.object({
1950
1977
  * @param schema - The full Object Schema (fields, indexes, etc).
1951
1978
  * @param options - Driver options.
1952
1979
  */
1953
- syncSchema: z14.function().input(z14.tuple([z14.string(), z14.unknown(), DriverOptionsSchema.optional()])).output(z14.promise(z14.void())).describe("Sync object schema to DB"),
1980
+ syncSchema: z15.function().input(z15.tuple([z15.string(), z15.unknown(), DriverOptionsSchema.optional()])).output(z15.promise(z15.void())).describe("Sync object schema to DB"),
1954
1981
  /**
1955
1982
  * Drop the underlying table or collection for an object.
1956
1983
  * WARNING: Destructive operation.
1957
1984
  *
1958
1985
  * @param object - The object name.
1959
1986
  */
1960
- dropTable: z14.function().input(z14.tuple([z14.string(), DriverOptionsSchema.optional()])).output(z14.promise(z14.void())),
1987
+ dropTable: z15.function().input(z15.tuple([z15.string(), DriverOptionsSchema.optional()])).output(z15.promise(z15.void())),
1961
1988
  /**
1962
1989
  * Analyze query performance.
1963
1990
  * Returns execution plan without executing the query (where possible).
@@ -1966,25 +1993,25 @@ var DriverInterfaceSchema = z14.object({
1966
1993
  * @param query - The query to explain.
1967
1994
  * @returns The execution plan details.
1968
1995
  */
1969
- explain: z14.function().input(z14.tuple([z14.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z14.promise(z14.unknown())).optional()
1996
+ explain: z15.function().input(z15.tuple([z15.string(), QuerySchema, DriverOptionsSchema.optional()])).output(z15.promise(z15.unknown())).optional()
1970
1997
  });
1971
- var PoolConfigSchema = z14.object({
1972
- min: z14.number().min(0).default(2).describe("Minimum number of connections in pool"),
1973
- max: z14.number().min(1).default(10).describe("Maximum number of connections in pool"),
1974
- idleTimeoutMillis: z14.number().min(0).default(3e4).describe("Time in ms before idle connection is closed"),
1975
- connectionTimeoutMillis: z14.number().min(0).default(5e3).describe("Time in ms to wait for available connection")
1998
+ var PoolConfigSchema = z15.object({
1999
+ min: z15.number().min(0).default(2).describe("Minimum number of connections in pool"),
2000
+ max: z15.number().min(1).default(10).describe("Maximum number of connections in pool"),
2001
+ idleTimeoutMillis: z15.number().min(0).default(3e4).describe("Time in ms before idle connection is closed"),
2002
+ connectionTimeoutMillis: z15.number().min(0).default(5e3).describe("Time in ms to wait for available connection")
1976
2003
  });
1977
- var DriverConfigSchema = z14.object({
1978
- name: z14.string().describe("Driver instance name"),
1979
- type: z14.enum(["sql", "nosql", "cache", "search", "graph", "timeseries"]).describe("Driver type category"),
2004
+ var DriverConfigSchema = z15.object({
2005
+ name: z15.string().describe("Driver instance name"),
2006
+ type: z15.enum(["sql", "nosql", "cache", "search", "graph", "timeseries"]).describe("Driver type category"),
1980
2007
  capabilities: DriverCapabilitiesSchema.describe("Driver capability flags"),
1981
- connectionString: z14.string().optional().describe("Database connection string (driver-specific format)"),
2008
+ connectionString: z15.string().optional().describe("Database connection string (driver-specific format)"),
1982
2009
  poolConfig: PoolConfigSchema.optional().describe("Connection pool configuration")
1983
2010
  });
1984
2011
 
1985
2012
  // src/data/driver-sql.zod.ts
1986
- import { z as z15 } from "zod";
1987
- var SQLDialectSchema = z15.enum([
2013
+ import { z as z16 } from "zod";
2014
+ var SQLDialectSchema = z16.enum([
1988
2015
  "postgresql",
1989
2016
  "mysql",
1990
2017
  "sqlite",
@@ -1992,21 +2019,21 @@ var SQLDialectSchema = z15.enum([
1992
2019
  "oracle",
1993
2020
  "mariadb"
1994
2021
  ]);
1995
- var DataTypeMappingSchema = z15.object({
1996
- text: z15.string().describe("SQL type for text fields (e.g., VARCHAR, TEXT)"),
1997
- number: z15.string().describe("SQL type for number fields (e.g., NUMERIC, DECIMAL, INT)"),
1998
- boolean: z15.string().describe("SQL type for boolean fields (e.g., BOOLEAN, BIT)"),
1999
- date: z15.string().describe("SQL type for date fields (e.g., DATE)"),
2000
- datetime: z15.string().describe("SQL type for datetime fields (e.g., TIMESTAMP, DATETIME)"),
2001
- json: z15.string().optional().describe("SQL type for JSON fields (e.g., JSON, JSONB)"),
2002
- uuid: z15.string().optional().describe("SQL type for UUID fields (e.g., UUID, CHAR(36))"),
2003
- binary: z15.string().optional().describe("SQL type for binary fields (e.g., BLOB, BYTEA)")
2004
- });
2005
- var SSLConfigSchema = z15.object({
2006
- rejectUnauthorized: z15.boolean().default(true).describe("Reject connections with invalid certificates"),
2007
- ca: z15.string().optional().describe("CA certificate file path or content"),
2008
- cert: z15.string().optional().describe("Client certificate file path or content"),
2009
- key: z15.string().optional().describe("Client private key file path or content")
2022
+ var DataTypeMappingSchema = z16.object({
2023
+ text: z16.string().describe("SQL type for text fields (e.g., VARCHAR, TEXT)"),
2024
+ number: z16.string().describe("SQL type for number fields (e.g., NUMERIC, DECIMAL, INT)"),
2025
+ boolean: z16.string().describe("SQL type for boolean fields (e.g., BOOLEAN, BIT)"),
2026
+ date: z16.string().describe("SQL type for date fields (e.g., DATE)"),
2027
+ datetime: z16.string().describe("SQL type for datetime fields (e.g., TIMESTAMP, DATETIME)"),
2028
+ json: z16.string().optional().describe("SQL type for JSON fields (e.g., JSON, JSONB)"),
2029
+ uuid: z16.string().optional().describe("SQL type for UUID fields (e.g., UUID, CHAR(36))"),
2030
+ binary: z16.string().optional().describe("SQL type for binary fields (e.g., BLOB, BYTEA)")
2031
+ });
2032
+ var SSLConfigSchema = z16.object({
2033
+ rejectUnauthorized: z16.boolean().default(true).describe("Reject connections with invalid certificates"),
2034
+ ca: z16.string().optional().describe("CA certificate file path or content"),
2035
+ cert: z16.string().optional().describe("Client certificate file path or content"),
2036
+ key: z16.string().optional().describe("Client private key file path or content")
2010
2037
  }).refine((data) => {
2011
2038
  const hasCert = data.cert !== void 0;
2012
2039
  const hasKey = data.key !== void 0;
@@ -2015,10 +2042,10 @@ var SSLConfigSchema = z15.object({
2015
2042
  message: "Client certificate (cert) and private key (key) must be provided together"
2016
2043
  });
2017
2044
  var SQLDriverConfigSchema = DriverConfigSchema.extend({
2018
- type: z15.literal("sql").describe('Driver type must be "sql"'),
2045
+ type: z16.literal("sql").describe('Driver type must be "sql"'),
2019
2046
  dialect: SQLDialectSchema.describe("SQL database dialect"),
2020
2047
  dataTypeMapping: DataTypeMappingSchema.describe("SQL data type mapping configuration"),
2021
- ssl: z15.boolean().default(false).describe("Enable SSL/TLS connection"),
2048
+ ssl: z16.boolean().default(false).describe("Enable SSL/TLS connection"),
2022
2049
  sslConfig: SSLConfigSchema.optional().describe("SSL/TLS configuration (required when ssl is true)")
2023
2050
  }).refine((data) => {
2024
2051
  if (data.ssl && !data.sslConfig) {
@@ -2030,8 +2057,8 @@ var SQLDriverConfigSchema = DriverConfigSchema.extend({
2030
2057
  });
2031
2058
 
2032
2059
  // src/data/driver-nosql.zod.ts
2033
- import { z as z16 } from "zod";
2034
- var NoSQLDatabaseTypeSchema = z16.enum([
2060
+ import { z as z17 } from "zod";
2061
+ var NoSQLDatabaseTypeSchema = z17.enum([
2035
2062
  "mongodb",
2036
2063
  "couchdb",
2037
2064
  "dynamodb",
@@ -2041,7 +2068,7 @@ var NoSQLDatabaseTypeSchema = z16.enum([
2041
2068
  "neo4j",
2042
2069
  "orientdb"
2043
2070
  ]);
2044
- var NoSQLOperationTypeSchema = z16.enum([
2071
+ var NoSQLOperationTypeSchema = z17.enum([
2045
2072
  "find",
2046
2073
  // Query documents/records
2047
2074
  "findOne",
@@ -2065,7 +2092,7 @@ var NoSQLOperationTypeSchema = z16.enum([
2065
2092
  "dropIndex"
2066
2093
  // Drop index
2067
2094
  ]);
2068
- var ConsistencyLevelSchema = z16.enum([
2095
+ var ConsistencyLevelSchema = z17.enum([
2069
2096
  "all",
2070
2097
  "quorum",
2071
2098
  "one",
@@ -2073,7 +2100,7 @@ var ConsistencyLevelSchema = z16.enum([
2073
2100
  "each_quorum",
2074
2101
  "eventual"
2075
2102
  ]);
2076
- var NoSQLIndexTypeSchema = z16.enum([
2103
+ var NoSQLIndexTypeSchema = z17.enum([
2077
2104
  "single",
2078
2105
  // Single field index
2079
2106
  "compound",
@@ -2091,40 +2118,40 @@ var NoSQLIndexTypeSchema = z16.enum([
2091
2118
  "sparse"
2092
2119
  // Sparse index (only indexed documents with field)
2093
2120
  ]);
2094
- var ShardingConfigSchema = z16.object({
2095
- enabled: z16.boolean().default(false).describe("Enable sharding"),
2096
- shardKey: z16.string().optional().describe("Field to use as shard key"),
2097
- shardingStrategy: z16.enum(["hash", "range", "zone"]).optional().describe("Sharding strategy"),
2098
- numShards: z16.number().int().positive().optional().describe("Number of shards")
2099
- });
2100
- var ReplicationConfigSchema = z16.object({
2101
- enabled: z16.boolean().default(false).describe("Enable replication"),
2102
- replicaSetName: z16.string().optional().describe("Replica set name"),
2103
- replicas: z16.number().int().positive().optional().describe("Number of replicas"),
2104
- readPreference: z16.enum(["primary", "primaryPreferred", "secondary", "secondaryPreferred", "nearest"]).optional().describe("Read preference for replica set"),
2105
- writeConcern: z16.enum(["majority", "acknowledged", "unacknowledged"]).optional().describe("Write concern level")
2106
- });
2107
- var DocumentSchemaValidationSchema = z16.object({
2108
- enabled: z16.boolean().default(false).describe("Enable schema validation"),
2109
- validationLevel: z16.enum(["strict", "moderate", "off"]).optional().describe("Validation strictness"),
2110
- validationAction: z16.enum(["error", "warn"]).optional().describe("Action on validation failure"),
2111
- jsonSchema: z16.record(z16.string(), z16.unknown()).optional().describe("JSON Schema for validation")
2112
- });
2113
- var NoSQLDataTypeMappingSchema = z16.object({
2114
- text: z16.string().describe("NoSQL type for text fields"),
2115
- number: z16.string().describe("NoSQL type for number fields"),
2116
- boolean: z16.string().describe("NoSQL type for boolean fields"),
2117
- date: z16.string().describe("NoSQL type for date fields"),
2118
- datetime: z16.string().describe("NoSQL type for datetime fields"),
2119
- json: z16.string().optional().describe("NoSQL type for JSON/object fields"),
2120
- uuid: z16.string().optional().describe("NoSQL type for UUID fields"),
2121
- binary: z16.string().optional().describe("NoSQL type for binary fields"),
2122
- array: z16.string().optional().describe("NoSQL type for array fields"),
2123
- objectId: z16.string().optional().describe("NoSQL type for ObjectID fields (MongoDB)"),
2124
- geopoint: z16.string().optional().describe("NoSQL type for geospatial point fields")
2121
+ var ShardingConfigSchema = z17.object({
2122
+ enabled: z17.boolean().default(false).describe("Enable sharding"),
2123
+ shardKey: z17.string().optional().describe("Field to use as shard key"),
2124
+ shardingStrategy: z17.enum(["hash", "range", "zone"]).optional().describe("Sharding strategy"),
2125
+ numShards: z17.number().int().positive().optional().describe("Number of shards")
2126
+ });
2127
+ var ReplicationConfigSchema = z17.object({
2128
+ enabled: z17.boolean().default(false).describe("Enable replication"),
2129
+ replicaSetName: z17.string().optional().describe("Replica set name"),
2130
+ replicas: z17.number().int().positive().optional().describe("Number of replicas"),
2131
+ readPreference: z17.enum(["primary", "primaryPreferred", "secondary", "secondaryPreferred", "nearest"]).optional().describe("Read preference for replica set"),
2132
+ writeConcern: z17.enum(["majority", "acknowledged", "unacknowledged"]).optional().describe("Write concern level")
2133
+ });
2134
+ var DocumentSchemaValidationSchema = z17.object({
2135
+ enabled: z17.boolean().default(false).describe("Enable schema validation"),
2136
+ validationLevel: z17.enum(["strict", "moderate", "off"]).optional().describe("Validation strictness"),
2137
+ validationAction: z17.enum(["error", "warn"]).optional().describe("Action on validation failure"),
2138
+ jsonSchema: z17.record(z17.string(), z17.unknown()).optional().describe("JSON Schema for validation")
2139
+ });
2140
+ var NoSQLDataTypeMappingSchema = z17.object({
2141
+ text: z17.string().describe("NoSQL type for text fields"),
2142
+ number: z17.string().describe("NoSQL type for number fields"),
2143
+ boolean: z17.string().describe("NoSQL type for boolean fields"),
2144
+ date: z17.string().describe("NoSQL type for date fields"),
2145
+ datetime: z17.string().describe("NoSQL type for datetime fields"),
2146
+ json: z17.string().optional().describe("NoSQL type for JSON/object fields"),
2147
+ uuid: z17.string().optional().describe("NoSQL type for UUID fields"),
2148
+ binary: z17.string().optional().describe("NoSQL type for binary fields"),
2149
+ array: z17.string().optional().describe("NoSQL type for array fields"),
2150
+ objectId: z17.string().optional().describe("NoSQL type for ObjectID fields (MongoDB)"),
2151
+ geopoint: z17.string().optional().describe("NoSQL type for geospatial point fields")
2125
2152
  });
2126
2153
  var NoSQLDriverConfigSchema = DriverConfigSchema.extend({
2127
- type: z16.literal("nosql").describe('Driver type must be "nosql"'),
2154
+ type: z17.literal("nosql").describe('Driver type must be "nosql"'),
2128
2155
  databaseType: NoSQLDatabaseTypeSchema.describe("Specific NoSQL database type"),
2129
2156
  dataTypeMapping: NoSQLDataTypeMappingSchema.describe("NoSQL data type mapping configuration"),
2130
2157
  /**
@@ -2146,31 +2173,31 @@ var NoSQLDriverConfigSchema = DriverConfigSchema.extend({
2146
2173
  /**
2147
2174
  * AWS Region (for DynamoDB, DocumentDB, etc.)
2148
2175
  */
2149
- region: z16.string().optional().describe("AWS region (for managed NoSQL services)"),
2176
+ region: z17.string().optional().describe("AWS region (for managed NoSQL services)"),
2150
2177
  /**
2151
2178
  * AWS Access Key ID (for DynamoDB, DocumentDB, etc.)
2152
2179
  */
2153
- accessKeyId: z16.string().optional().describe("AWS access key ID"),
2180
+ accessKeyId: z17.string().optional().describe("AWS access key ID"),
2154
2181
  /**
2155
2182
  * AWS Secret Access Key (for DynamoDB, DocumentDB, etc.)
2156
2183
  */
2157
- secretAccessKey: z16.string().optional().describe("AWS secret access key"),
2184
+ secretAccessKey: z17.string().optional().describe("AWS secret access key"),
2158
2185
  /**
2159
2186
  * Time-to-live (TTL) field name
2160
2187
  * Automatically delete documents after a specified time
2161
2188
  */
2162
- ttlField: z16.string().optional().describe("Field name for TTL (auto-deletion)"),
2189
+ ttlField: z17.string().optional().describe("Field name for TTL (auto-deletion)"),
2163
2190
  /**
2164
2191
  * Maximum document size in bytes
2165
2192
  */
2166
- maxDocumentSize: z16.number().int().positive().optional().describe("Maximum document size in bytes"),
2193
+ maxDocumentSize: z17.number().int().positive().optional().describe("Maximum document size in bytes"),
2167
2194
  /**
2168
2195
  * Collection/Table name prefix
2169
2196
  * Useful for multi-tenancy or environment isolation
2170
2197
  */
2171
- collectionPrefix: z16.string().optional().describe("Prefix for collection/table names")
2198
+ collectionPrefix: z17.string().optional().describe("Prefix for collection/table names")
2172
2199
  });
2173
- var NoSQLQueryOptionsSchema = z16.object({
2200
+ var NoSQLQueryOptionsSchema = z17.object({
2174
2201
  /**
2175
2202
  * Consistency level for this query
2176
2203
  */
@@ -2178,61 +2205,61 @@ var NoSQLQueryOptionsSchema = z16.object({
2178
2205
  /**
2179
2206
  * Read from secondary replicas
2180
2207
  */
2181
- readFromSecondary: z16.boolean().optional().describe("Allow reading from secondary replicas"),
2208
+ readFromSecondary: z17.boolean().optional().describe("Allow reading from secondary replicas"),
2182
2209
  /**
2183
2210
  * Projection (fields to include/exclude)
2184
2211
  */
2185
- projection: z16.record(z16.string(), z16.union([z16.literal(0), z16.literal(1)])).optional().describe("Field projection"),
2212
+ projection: z17.record(z17.string(), z17.union([z17.literal(0), z17.literal(1)])).optional().describe("Field projection"),
2186
2213
  /**
2187
2214
  * Query timeout in milliseconds
2188
2215
  */
2189
- timeout: z16.number().int().positive().optional().describe("Query timeout (ms)"),
2216
+ timeout: z17.number().int().positive().optional().describe("Query timeout (ms)"),
2190
2217
  /**
2191
2218
  * Use cursor for large result sets
2192
2219
  */
2193
- useCursor: z16.boolean().optional().describe("Use cursor instead of loading all results"),
2220
+ useCursor: z17.boolean().optional().describe("Use cursor instead of loading all results"),
2194
2221
  /**
2195
2222
  * Batch size for cursor iteration
2196
2223
  */
2197
- batchSize: z16.number().int().positive().optional().describe("Cursor batch size"),
2224
+ batchSize: z17.number().int().positive().optional().describe("Cursor batch size"),
2198
2225
  /**
2199
2226
  * Enable query profiling
2200
2227
  */
2201
- profile: z16.boolean().optional().describe("Enable query profiling"),
2228
+ profile: z17.boolean().optional().describe("Enable query profiling"),
2202
2229
  /**
2203
2230
  * Use hinted index
2204
2231
  */
2205
- hint: z16.string().optional().describe("Index hint for query optimization")
2232
+ hint: z17.string().optional().describe("Index hint for query optimization")
2206
2233
  });
2207
- var AggregationStageSchema = z16.object({
2234
+ var AggregationStageSchema = z17.object({
2208
2235
  /**
2209
2236
  * Stage operator (e.g., $match, $group, $sort, $project)
2210
2237
  */
2211
- operator: z16.string().describe("Aggregation operator (e.g., $match, $group, $sort)"),
2238
+ operator: z17.string().describe("Aggregation operator (e.g., $match, $group, $sort)"),
2212
2239
  /**
2213
2240
  * Stage parameters/options
2214
2241
  */
2215
- options: z16.record(z16.string(), z16.unknown()).describe("Stage-specific options")
2242
+ options: z17.record(z17.string(), z17.unknown()).describe("Stage-specific options")
2216
2243
  });
2217
- var AggregationPipelineSchema = z16.object({
2244
+ var AggregationPipelineSchema = z17.object({
2218
2245
  /**
2219
2246
  * Collection/Table to aggregate
2220
2247
  */
2221
- collection: z16.string().describe("Collection/table name"),
2248
+ collection: z17.string().describe("Collection/table name"),
2222
2249
  /**
2223
2250
  * Pipeline stages
2224
2251
  */
2225
- stages: z16.array(AggregationStageSchema).describe("Aggregation pipeline stages"),
2252
+ stages: z17.array(AggregationStageSchema).describe("Aggregation pipeline stages"),
2226
2253
  /**
2227
2254
  * Additional options
2228
2255
  */
2229
2256
  options: NoSQLQueryOptionsSchema.optional().describe("Query options")
2230
2257
  });
2231
- var NoSQLIndexSchema = z16.object({
2258
+ var NoSQLIndexSchema = z17.object({
2232
2259
  /**
2233
2260
  * Index name
2234
2261
  */
2235
- name: z16.string().describe("Index name"),
2262
+ name: z17.string().describe("Index name"),
2236
2263
  /**
2237
2264
  * Index type
2238
2265
  */
@@ -2241,53 +2268,53 @@ var NoSQLIndexSchema = z16.object({
2241
2268
  * Fields to index
2242
2269
  * For compound indexes, order matters
2243
2270
  */
2244
- fields: z16.array(z16.object({
2245
- field: z16.string().describe("Field name"),
2246
- order: z16.enum(["asc", "desc", "text", "2dsphere"]).optional().describe("Index order or type")
2271
+ fields: z17.array(z17.object({
2272
+ field: z17.string().describe("Field name"),
2273
+ order: z17.enum(["asc", "desc", "text", "2dsphere"]).optional().describe("Index order or type")
2247
2274
  })).describe("Fields to index"),
2248
2275
  /**
2249
2276
  * Unique constraint
2250
2277
  */
2251
- unique: z16.boolean().default(false).describe("Enforce uniqueness"),
2278
+ unique: z17.boolean().default(false).describe("Enforce uniqueness"),
2252
2279
  /**
2253
2280
  * Sparse index (only index documents with the field)
2254
2281
  */
2255
- sparse: z16.boolean().default(false).describe("Sparse index"),
2282
+ sparse: z17.boolean().default(false).describe("Sparse index"),
2256
2283
  /**
2257
2284
  * TTL in seconds (for TTL indexes)
2258
2285
  */
2259
- expireAfterSeconds: z16.number().int().positive().optional().describe("TTL in seconds"),
2286
+ expireAfterSeconds: z17.number().int().positive().optional().describe("TTL in seconds"),
2260
2287
  /**
2261
2288
  * Partial index filter
2262
2289
  */
2263
- partialFilterExpression: z16.record(z16.string(), z16.unknown()).optional().describe("Partial index filter"),
2290
+ partialFilterExpression: z17.record(z17.string(), z17.unknown()).optional().describe("Partial index filter"),
2264
2291
  /**
2265
2292
  * Background index creation
2266
2293
  */
2267
- background: z16.boolean().default(false).describe("Create index in background")
2294
+ background: z17.boolean().default(false).describe("Create index in background")
2268
2295
  });
2269
- var NoSQLTransactionOptionsSchema = z16.object({
2296
+ var NoSQLTransactionOptionsSchema = z17.object({
2270
2297
  /**
2271
2298
  * Read concern level
2272
2299
  */
2273
- readConcern: z16.enum(["local", "majority", "linearizable", "snapshot"]).optional().describe("Read concern level"),
2300
+ readConcern: z17.enum(["local", "majority", "linearizable", "snapshot"]).optional().describe("Read concern level"),
2274
2301
  /**
2275
2302
  * Write concern level
2276
2303
  */
2277
- writeConcern: z16.enum(["majority", "acknowledged", "unacknowledged"]).optional().describe("Write concern level"),
2304
+ writeConcern: z17.enum(["majority", "acknowledged", "unacknowledged"]).optional().describe("Write concern level"),
2278
2305
  /**
2279
2306
  * Read preference
2280
2307
  */
2281
- readPreference: z16.enum(["primary", "primaryPreferred", "secondary", "secondaryPreferred", "nearest"]).optional().describe("Read preference"),
2308
+ readPreference: z17.enum(["primary", "primaryPreferred", "secondary", "secondaryPreferred", "nearest"]).optional().describe("Read preference"),
2282
2309
  /**
2283
2310
  * Transaction timeout in milliseconds
2284
2311
  */
2285
- maxCommitTimeMS: z16.number().int().positive().optional().describe("Transaction commit timeout (ms)")
2312
+ maxCommitTimeMS: z17.number().int().positive().optional().describe("Transaction commit timeout (ms)")
2286
2313
  });
2287
2314
 
2288
2315
  // src/data/dataset.zod.ts
2289
- import { z as z17 } from "zod";
2290
- var DatasetMode = z17.enum([
2316
+ import { z as z18 } from "zod";
2317
+ var DatasetMode = z18.enum([
2291
2318
  "insert",
2292
2319
  // Try to insert, fail on duplicate
2293
2320
  "update",
@@ -2299,19 +2326,19 @@ var DatasetMode = z17.enum([
2299
2326
  "ignore"
2300
2327
  // Try to insert, silently skip duplicates
2301
2328
  ]);
2302
- var DatasetSchema = z17.object({
2329
+ var DatasetSchema = z18.object({
2303
2330
  /**
2304
2331
  * Target Object
2305
2332
  * The machine name of the object to populate.
2306
2333
  */
2307
- object: z17.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Target Object Name"),
2334
+ object: z18.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Target Object Name"),
2308
2335
  /**
2309
2336
  * Idempotency Key (The "Upsert" Key)
2310
2337
  * The field used to check if a record already exists.
2311
2338
  * Best Practice: Use a natural key like 'code', 'slug', 'username' or 'external_id'.
2312
2339
  * Standard: '_id' (internal ID) is rarely used for portable seed data.
2313
2340
  */
2314
- externalId: z17.string().default("name").describe("Field match for uniqueness check"),
2341
+ externalId: z18.string().default("name").describe("Field match for uniqueness check"),
2315
2342
  /**
2316
2343
  * Import Strategy
2317
2344
  */
@@ -2322,182 +2349,182 @@ var DatasetSchema = z17.object({
2322
2349
  * - 'dev': Only for development/demo
2323
2350
  * - 'test': Only for CI/CD tests
2324
2351
  */
2325
- env: z17.array(z17.enum(["prod", "dev", "test"])).default(["prod", "dev", "test"]).describe("Applicable environments"),
2352
+ env: z18.array(z18.enum(["prod", "dev", "test"])).default(["prod", "dev", "test"]).describe("Applicable environments"),
2326
2353
  /**
2327
2354
  * The Payload
2328
2355
  * Array of raw JSON objects matching the Object Schema.
2329
2356
  */
2330
- records: z17.array(z17.record(z17.string(), z17.unknown())).describe("Data records")
2357
+ records: z18.array(z18.record(z18.string(), z18.unknown())).describe("Data records")
2331
2358
  });
2332
2359
 
2333
2360
  // src/data/document.zod.ts
2334
- import { z as z18 } from "zod";
2335
- var DocumentVersionSchema = z18.object({
2361
+ import { z as z19 } from "zod";
2362
+ var DocumentVersionSchema = z19.object({
2336
2363
  /**
2337
2364
  * Sequential version number (increments with each new version)
2338
2365
  */
2339
- versionNumber: z18.number().describe("Version number"),
2366
+ versionNumber: z19.number().describe("Version number"),
2340
2367
  /**
2341
2368
  * Timestamp when this version was created (Unix milliseconds)
2342
2369
  */
2343
- createdAt: z18.number().describe("Creation timestamp"),
2370
+ createdAt: z19.number().describe("Creation timestamp"),
2344
2371
  /**
2345
2372
  * User ID who created this version
2346
2373
  */
2347
- createdBy: z18.string().describe("Creator user ID"),
2374
+ createdBy: z19.string().describe("Creator user ID"),
2348
2375
  /**
2349
2376
  * File size in bytes
2350
2377
  */
2351
- size: z18.number().describe("File size in bytes"),
2378
+ size: z19.number().describe("File size in bytes"),
2352
2379
  /**
2353
2380
  * Checksum/hash of the file content (for integrity verification)
2354
2381
  */
2355
- checksum: z18.string().describe("File checksum"),
2382
+ checksum: z19.string().describe("File checksum"),
2356
2383
  /**
2357
2384
  * URL to download this specific version
2358
2385
  */
2359
- downloadUrl: z18.string().url().describe("Download URL"),
2386
+ downloadUrl: z19.string().url().describe("Download URL"),
2360
2387
  /**
2361
2388
  * Whether this is the latest version
2362
2389
  * @default false
2363
2390
  */
2364
- isLatest: z18.boolean().optional().default(false).describe("Is latest version")
2391
+ isLatest: z19.boolean().optional().default(false).describe("Is latest version")
2365
2392
  });
2366
- var DocumentTemplateSchema = z18.object({
2393
+ var DocumentTemplateSchema = z19.object({
2367
2394
  /**
2368
2395
  * Unique identifier for the template
2369
2396
  */
2370
- id: z18.string().describe("Template ID"),
2397
+ id: z19.string().describe("Template ID"),
2371
2398
  /**
2372
2399
  * Human-readable name of the template
2373
2400
  */
2374
- name: z18.string().describe("Template name"),
2401
+ name: z19.string().describe("Template name"),
2375
2402
  /**
2376
2403
  * Optional description of the template's purpose
2377
2404
  */
2378
- description: z18.string().optional().describe("Template description"),
2405
+ description: z19.string().optional().describe("Template description"),
2379
2406
  /**
2380
2407
  * URL to the template file
2381
2408
  */
2382
- fileUrl: z18.string().url().describe("Template file URL"),
2409
+ fileUrl: z19.string().url().describe("Template file URL"),
2383
2410
  /**
2384
2411
  * MIME type of the template file
2385
2412
  */
2386
- fileType: z18.string().describe("File MIME type"),
2413
+ fileType: z19.string().describe("File MIME type"),
2387
2414
  /**
2388
2415
  * List of dynamic placeholders in the template
2389
2416
  */
2390
- placeholders: z18.array(z18.object({
2417
+ placeholders: z19.array(z19.object({
2391
2418
  /**
2392
2419
  * Placeholder identifier (used in template)
2393
2420
  */
2394
- key: z18.string().describe("Placeholder key"),
2421
+ key: z19.string().describe("Placeholder key"),
2395
2422
  /**
2396
2423
  * Human-readable label for the placeholder
2397
2424
  */
2398
- label: z18.string().describe("Placeholder label"),
2425
+ label: z19.string().describe("Placeholder label"),
2399
2426
  /**
2400
2427
  * Data type of the placeholder value
2401
2428
  */
2402
- type: z18.enum(["text", "number", "date", "image"]).describe("Placeholder type"),
2429
+ type: z19.enum(["text", "number", "date", "image"]).describe("Placeholder type"),
2403
2430
  /**
2404
2431
  * Whether this placeholder must be filled
2405
2432
  * @default false
2406
2433
  */
2407
- required: z18.boolean().optional().default(false).describe("Is required")
2434
+ required: z19.boolean().optional().default(false).describe("Is required")
2408
2435
  })).describe("Template placeholders")
2409
2436
  });
2410
- var ESignatureConfigSchema = z18.object({
2437
+ var ESignatureConfigSchema = z19.object({
2411
2438
  /**
2412
2439
  * E-signature service provider
2413
2440
  */
2414
- provider: z18.enum(["docusign", "adobe-sign", "hellosign", "custom"]).describe("E-signature provider"),
2441
+ provider: z19.enum(["docusign", "adobe-sign", "hellosign", "custom"]).describe("E-signature provider"),
2415
2442
  /**
2416
2443
  * Whether e-signature is enabled for this document
2417
2444
  * @default false
2418
2445
  */
2419
- enabled: z18.boolean().optional().default(false).describe("E-signature enabled"),
2446
+ enabled: z19.boolean().optional().default(false).describe("E-signature enabled"),
2420
2447
  /**
2421
2448
  * List of signers in signing order
2422
2449
  */
2423
- signers: z18.array(z18.object({
2450
+ signers: z19.array(z19.object({
2424
2451
  /**
2425
2452
  * Signer's email address
2426
2453
  */
2427
- email: z18.string().email().describe("Signer email"),
2454
+ email: z19.string().email().describe("Signer email"),
2428
2455
  /**
2429
2456
  * Signer's full name
2430
2457
  */
2431
- name: z18.string().describe("Signer name"),
2458
+ name: z19.string().describe("Signer name"),
2432
2459
  /**
2433
2460
  * Signer's role in the document
2434
2461
  */
2435
- role: z18.string().describe("Signer role"),
2462
+ role: z19.string().describe("Signer role"),
2436
2463
  /**
2437
2464
  * Signing order (lower numbers sign first)
2438
2465
  */
2439
- order: z18.number().describe("Signing order")
2466
+ order: z19.number().describe("Signing order")
2440
2467
  })).describe("Document signers"),
2441
2468
  /**
2442
2469
  * Days until signature request expires
2443
2470
  * @default 30
2444
2471
  */
2445
- expirationDays: z18.number().optional().default(30).describe("Expiration days"),
2472
+ expirationDays: z19.number().optional().default(30).describe("Expiration days"),
2446
2473
  /**
2447
2474
  * Days between reminder emails
2448
2475
  * @default 7
2449
2476
  */
2450
- reminderDays: z18.number().optional().default(7).describe("Reminder interval days")
2477
+ reminderDays: z19.number().optional().default(7).describe("Reminder interval days")
2451
2478
  });
2452
- var DocumentSchema = z18.object({
2479
+ var DocumentSchema = z19.object({
2453
2480
  /**
2454
2481
  * Unique document identifier
2455
2482
  */
2456
- id: z18.string().describe("Document ID"),
2483
+ id: z19.string().describe("Document ID"),
2457
2484
  /**
2458
2485
  * Document name
2459
2486
  */
2460
- name: z18.string().describe("Document name"),
2487
+ name: z19.string().describe("Document name"),
2461
2488
  /**
2462
2489
  * Optional document description
2463
2490
  */
2464
- description: z18.string().optional().describe("Document description"),
2491
+ description: z19.string().optional().describe("Document description"),
2465
2492
  /**
2466
2493
  * MIME type of the document
2467
2494
  */
2468
- fileType: z18.string().describe("File MIME type"),
2495
+ fileType: z19.string().describe("File MIME type"),
2469
2496
  /**
2470
2497
  * File size in bytes
2471
2498
  */
2472
- fileSize: z18.number().describe("File size in bytes"),
2499
+ fileSize: z19.number().describe("File size in bytes"),
2473
2500
  /**
2474
2501
  * Document category for organization
2475
2502
  */
2476
- category: z18.string().optional().describe("Document category"),
2503
+ category: z19.string().optional().describe("Document category"),
2477
2504
  /**
2478
2505
  * Tags for searchability and organization
2479
2506
  */
2480
- tags: z18.array(z18.string()).optional().describe("Document tags"),
2507
+ tags: z19.array(z19.string()).optional().describe("Document tags"),
2481
2508
  /**
2482
2509
  * Version control configuration
2483
2510
  */
2484
- versioning: z18.object({
2511
+ versioning: z19.object({
2485
2512
  /**
2486
2513
  * Whether versioning is enabled
2487
2514
  */
2488
- enabled: z18.boolean().describe("Versioning enabled"),
2515
+ enabled: z19.boolean().describe("Versioning enabled"),
2489
2516
  /**
2490
2517
  * List of all document versions
2491
2518
  */
2492
- versions: z18.array(DocumentVersionSchema).describe("Version history"),
2519
+ versions: z19.array(DocumentVersionSchema).describe("Version history"),
2493
2520
  /**
2494
2521
  * Current major version number
2495
2522
  */
2496
- majorVersion: z18.number().describe("Major version"),
2523
+ majorVersion: z19.number().describe("Major version"),
2497
2524
  /**
2498
2525
  * Current minor version number
2499
2526
  */
2500
- minorVersion: z18.number().describe("Minor version")
2527
+ minorVersion: z19.number().describe("Minor version")
2501
2528
  }).optional().describe("Version control"),
2502
2529
  /**
2503
2530
  * Template configuration (if document is generated from template)
@@ -2510,65 +2537,65 @@ var DocumentSchema = z18.object({
2510
2537
  /**
2511
2538
  * Access control settings
2512
2539
  */
2513
- access: z18.object({
2540
+ access: z19.object({
2514
2541
  /**
2515
2542
  * Whether document is publicly accessible
2516
2543
  * @default false
2517
2544
  */
2518
- isPublic: z18.boolean().optional().default(false).describe("Public access"),
2545
+ isPublic: z19.boolean().optional().default(false).describe("Public access"),
2519
2546
  /**
2520
2547
  * List of user/team IDs with access
2521
2548
  */
2522
- sharedWith: z18.array(z18.string()).optional().describe("Shared with"),
2549
+ sharedWith: z19.array(z19.string()).optional().describe("Shared with"),
2523
2550
  /**
2524
2551
  * Timestamp when access expires (Unix milliseconds)
2525
2552
  */
2526
- expiresAt: z18.number().optional().describe("Access expiration")
2553
+ expiresAt: z19.number().optional().describe("Access expiration")
2527
2554
  }).optional().describe("Access control"),
2528
2555
  /**
2529
2556
  * Custom metadata fields
2530
2557
  */
2531
- metadata: z18.record(z18.string(), z18.unknown()).optional().describe("Custom metadata")
2558
+ metadata: z19.record(z19.string(), z19.unknown()).optional().describe("Custom metadata")
2532
2559
  });
2533
2560
 
2534
2561
  // src/data/external-lookup.zod.ts
2535
- import { z as z20 } from "zod";
2562
+ import { z as z21 } from "zod";
2536
2563
 
2537
2564
  // src/shared/mapping.zod.ts
2538
- import { z as z19 } from "zod";
2539
- var TransformTypeSchema = z19.discriminatedUnion("type", [
2540
- z19.object({
2541
- type: z19.literal("constant"),
2542
- value: z19.unknown().describe("Constant value to use")
2565
+ import { z as z20 } from "zod";
2566
+ var TransformTypeSchema = z20.discriminatedUnion("type", [
2567
+ z20.object({
2568
+ type: z20.literal("constant"),
2569
+ value: z20.unknown().describe("Constant value to use")
2543
2570
  }).describe("Set a constant value"),
2544
- z19.object({
2545
- type: z19.literal("cast"),
2546
- targetType: z19.enum(["string", "number", "boolean", "date"]).describe("Target data type")
2571
+ z20.object({
2572
+ type: z20.literal("cast"),
2573
+ targetType: z20.enum(["string", "number", "boolean", "date"]).describe("Target data type")
2547
2574
  }).describe("Cast to a specific data type"),
2548
- z19.object({
2549
- type: z19.literal("lookup"),
2550
- table: z19.string().describe("Lookup table name"),
2551
- keyField: z19.string().describe("Field to match on"),
2552
- valueField: z19.string().describe("Field to retrieve")
2575
+ z20.object({
2576
+ type: z20.literal("lookup"),
2577
+ table: z20.string().describe("Lookup table name"),
2578
+ keyField: z20.string().describe("Field to match on"),
2579
+ valueField: z20.string().describe("Field to retrieve")
2553
2580
  }).describe("Lookup value from another table"),
2554
- z19.object({
2555
- type: z19.literal("javascript"),
2556
- expression: z19.string().describe('JavaScript expression (e.g., "value.toUpperCase()")')
2581
+ z20.object({
2582
+ type: z20.literal("javascript"),
2583
+ expression: z20.string().describe('JavaScript expression (e.g., "value.toUpperCase()")')
2557
2584
  }).describe("Custom JavaScript transformation"),
2558
- z19.object({
2559
- type: z19.literal("map"),
2560
- mappings: z19.record(z19.string(), z19.unknown()).describe('Value mappings (e.g., {"Active": "active"})')
2585
+ z20.object({
2586
+ type: z20.literal("map"),
2587
+ mappings: z20.record(z20.string(), z20.unknown()).describe('Value mappings (e.g., {"Active": "active"})')
2561
2588
  }).describe("Map values using a dictionary")
2562
2589
  ]);
2563
- var FieldMappingSchema2 = z19.object({
2590
+ var FieldMappingSchema2 = z20.object({
2564
2591
  /**
2565
2592
  * Source field name
2566
2593
  */
2567
- source: z19.string().describe("Source field name"),
2594
+ source: z20.string().describe("Source field name"),
2568
2595
  /**
2569
2596
  * Target field name (should be snake_case for ObjectStack)
2570
2597
  */
2571
- target: z19.string().describe("Target field name"),
2598
+ target: z20.string().describe("Target field name"),
2572
2599
  /**
2573
2600
  * Transformation to apply
2574
2601
  */
@@ -2576,58 +2603,58 @@ var FieldMappingSchema2 = z19.object({
2576
2603
  /**
2577
2604
  * Default value if source is null/undefined
2578
2605
  */
2579
- defaultValue: z19.unknown().optional().describe("Default if source is null/undefined")
2606
+ defaultValue: z20.unknown().optional().describe("Default if source is null/undefined")
2580
2607
  });
2581
2608
 
2582
2609
  // src/data/external-lookup.zod.ts
2583
- var ExternalDataSourceSchema = z20.object({
2610
+ var ExternalDataSourceSchema = z21.object({
2584
2611
  /**
2585
2612
  * Unique identifier for the external data source
2586
2613
  */
2587
- id: z20.string().describe("Data source ID"),
2614
+ id: z21.string().describe("Data source ID"),
2588
2615
  /**
2589
2616
  * Human-readable name of the data source
2590
2617
  */
2591
- name: z20.string().describe("Data source name"),
2618
+ name: z21.string().describe("Data source name"),
2592
2619
  /**
2593
2620
  * Protocol type for connecting to the data source
2594
2621
  */
2595
- type: z20.enum(["odata", "rest-api", "graphql", "custom"]).describe("Protocol type"),
2622
+ type: z21.enum(["odata", "rest-api", "graphql", "custom"]).describe("Protocol type"),
2596
2623
  /**
2597
2624
  * Base URL endpoint for the external system
2598
2625
  */
2599
- endpoint: z20.string().url().describe("API endpoint URL"),
2626
+ endpoint: z21.string().url().describe("API endpoint URL"),
2600
2627
  /**
2601
2628
  * Authentication configuration
2602
2629
  */
2603
- authentication: z20.object({
2630
+ authentication: z21.object({
2604
2631
  /**
2605
2632
  * Authentication method
2606
2633
  */
2607
- type: z20.enum(["oauth2", "api-key", "basic", "none"]).describe("Auth type"),
2634
+ type: z21.enum(["oauth2", "api-key", "basic", "none"]).describe("Auth type"),
2608
2635
  /**
2609
2636
  * Authentication-specific configuration
2610
2637
  * Structure varies based on auth type
2611
2638
  */
2612
- config: z20.record(z20.string(), z20.unknown()).describe("Auth configuration")
2639
+ config: z21.record(z21.string(), z21.unknown()).describe("Auth configuration")
2613
2640
  }).describe("Authentication")
2614
2641
  });
2615
2642
  var ExternalFieldMappingSchema = FieldMappingSchema2.extend({
2616
2643
  /**
2617
2644
  * Field data type
2618
2645
  */
2619
- type: z20.string().optional().describe("Field type"),
2646
+ type: z21.string().optional().describe("Field type"),
2620
2647
  /**
2621
2648
  * Whether the field is read-only
2622
2649
  * @default true
2623
2650
  */
2624
- readonly: z20.boolean().optional().default(true).describe("Read-only field")
2651
+ readonly: z21.boolean().optional().default(true).describe("Read-only field")
2625
2652
  });
2626
- var ExternalLookupSchema = z20.object({
2653
+ var ExternalLookupSchema = z21.object({
2627
2654
  /**
2628
2655
  * Name of the field that uses external lookup
2629
2656
  */
2630
- fieldName: z20.string().describe("Field name"),
2657
+ fieldName: z21.string().describe("Field name"),
2631
2658
  /**
2632
2659
  * External data source configuration
2633
2660
  */
@@ -2635,137 +2662,137 @@ var ExternalLookupSchema = z20.object({
2635
2662
  /**
2636
2663
  * Query configuration for fetching external data
2637
2664
  */
2638
- query: z20.object({
2665
+ query: z21.object({
2639
2666
  /**
2640
2667
  * API endpoint path (relative to base endpoint)
2641
2668
  */
2642
- endpoint: z20.string().describe("Query endpoint path"),
2669
+ endpoint: z21.string().describe("Query endpoint path"),
2643
2670
  /**
2644
2671
  * HTTP method for the query
2645
2672
  * @default 'GET'
2646
2673
  */
2647
- method: z20.enum(["GET", "POST"]).optional().default("GET").describe("HTTP method"),
2674
+ method: z21.enum(["GET", "POST"]).optional().default("GET").describe("HTTP method"),
2648
2675
  /**
2649
2676
  * Query parameters or request body
2650
2677
  */
2651
- parameters: z20.record(z20.string(), z20.unknown()).optional().describe("Query parameters")
2678
+ parameters: z21.record(z21.string(), z21.unknown()).optional().describe("Query parameters")
2652
2679
  }).describe("Query configuration"),
2653
2680
  /**
2654
2681
  * Mapping between external and local fields
2655
2682
  */
2656
- fieldMappings: z20.array(ExternalFieldMappingSchema).describe("Field mappings"),
2683
+ fieldMappings: z21.array(ExternalFieldMappingSchema).describe("Field mappings"),
2657
2684
  /**
2658
2685
  * Cache configuration for external data
2659
2686
  */
2660
- caching: z20.object({
2687
+ caching: z21.object({
2661
2688
  /**
2662
2689
  * Whether caching is enabled
2663
2690
  * @default true
2664
2691
  */
2665
- enabled: z20.boolean().optional().default(true).describe("Cache enabled"),
2692
+ enabled: z21.boolean().optional().default(true).describe("Cache enabled"),
2666
2693
  /**
2667
2694
  * Time-to-live in seconds
2668
2695
  * @default 300
2669
2696
  */
2670
- ttl: z20.number().optional().default(300).describe("Cache TTL (seconds)"),
2697
+ ttl: z21.number().optional().default(300).describe("Cache TTL (seconds)"),
2671
2698
  /**
2672
2699
  * Cache eviction strategy
2673
2700
  * @default 'ttl'
2674
2701
  */
2675
- strategy: z20.enum(["lru", "lfu", "ttl"]).optional().default("ttl").describe("Cache strategy")
2702
+ strategy: z21.enum(["lru", "lfu", "ttl"]).optional().default("ttl").describe("Cache strategy")
2676
2703
  }).optional().describe("Caching configuration"),
2677
2704
  /**
2678
2705
  * Fallback behavior when external system is unavailable
2679
2706
  */
2680
- fallback: z20.object({
2707
+ fallback: z21.object({
2681
2708
  /**
2682
2709
  * Whether fallback is enabled
2683
2710
  * @default true
2684
2711
  */
2685
- enabled: z20.boolean().optional().default(true).describe("Fallback enabled"),
2712
+ enabled: z21.boolean().optional().default(true).describe("Fallback enabled"),
2686
2713
  /**
2687
2714
  * Default value to use when external system fails
2688
2715
  */
2689
- defaultValue: z20.unknown().optional().describe("Default fallback value"),
2716
+ defaultValue: z21.unknown().optional().describe("Default fallback value"),
2690
2717
  /**
2691
2718
  * Whether to show error message to user
2692
2719
  * @default true
2693
2720
  */
2694
- showError: z20.boolean().optional().default(true).describe("Show error to user")
2721
+ showError: z21.boolean().optional().default(true).describe("Show error to user")
2695
2722
  }).optional().describe("Fallback configuration"),
2696
2723
  /**
2697
2724
  * Rate limiting to prevent overwhelming external system
2698
2725
  */
2699
- rateLimit: z20.object({
2726
+ rateLimit: z21.object({
2700
2727
  /**
2701
2728
  * Maximum requests per second
2702
2729
  */
2703
- requestsPerSecond: z20.number().describe("Requests per second limit"),
2730
+ requestsPerSecond: z21.number().describe("Requests per second limit"),
2704
2731
  /**
2705
2732
  * Burst size for handling spikes
2706
2733
  */
2707
- burstSize: z20.number().optional().describe("Burst size")
2734
+ burstSize: z21.number().optional().describe("Burst size")
2708
2735
  }).optional().describe("Rate limiting")
2709
2736
  });
2710
2737
 
2711
2738
  // src/data/datasource.zod.ts
2712
- import { z as z21 } from "zod";
2713
- var DriverType = z21.string().describe("Underlying driver identifier");
2714
- var DriverDefinitionSchema = z21.object({
2715
- id: z21.string().describe('Unique driver identifier (e.g. "postgres")'),
2716
- label: z21.string().describe('Display label (e.g. "PostgreSQL")'),
2717
- description: z21.string().optional(),
2718
- icon: z21.string().optional(),
2739
+ import { z as z22 } from "zod";
2740
+ var DriverType = z22.string().describe("Underlying driver identifier");
2741
+ var DriverDefinitionSchema = z22.object({
2742
+ id: z22.string().describe('Unique driver identifier (e.g. "postgres")'),
2743
+ label: z22.string().describe('Display label (e.g. "PostgreSQL")'),
2744
+ description: z22.string().optional(),
2745
+ icon: z22.string().optional(),
2719
2746
  /**
2720
2747
  * Configuration Schema (JSON Schema)
2721
2748
  * Describes the structure of the `config` object needed for this driver.
2722
2749
  * Used by the UI to generate the connection form.
2723
2750
  */
2724
- configSchema: z21.record(z21.string(), z21.unknown()).describe("JSON Schema for connection configuration"),
2751
+ configSchema: z22.record(z22.string(), z22.unknown()).describe("JSON Schema for connection configuration"),
2725
2752
  /**
2726
2753
  * Default Capabilities
2727
2754
  * What this driver supports out-of-the-box.
2728
2755
  */
2729
- capabilities: z21.lazy(() => DatasourceCapabilities).optional()
2756
+ capabilities: z22.lazy(() => DatasourceCapabilities).optional()
2730
2757
  });
2731
- var DatasourceCapabilities = z21.object({
2758
+ var DatasourceCapabilities = z22.object({
2732
2759
  // ============================================================================
2733
2760
  // Transaction & Connection Management
2734
2761
  // ============================================================================
2735
2762
  /** Can handle ACID transactions? */
2736
- transactions: z21.boolean().default(false),
2763
+ transactions: z22.boolean().default(false),
2737
2764
  // ============================================================================
2738
2765
  // Query Operations
2739
2766
  // ============================================================================
2740
2767
  /** Can execute WHERE clause filters natively? */
2741
- queryFilters: z21.boolean().default(false),
2768
+ queryFilters: z22.boolean().default(false),
2742
2769
  /** Can perform aggregation (group by, sum, avg)? */
2743
- queryAggregations: z21.boolean().default(false),
2770
+ queryAggregations: z22.boolean().default(false),
2744
2771
  /** Can perform ORDER BY sorting? */
2745
- querySorting: z21.boolean().default(false),
2772
+ querySorting: z22.boolean().default(false),
2746
2773
  /** Can perform LIMIT/OFFSET pagination? */
2747
- queryPagination: z21.boolean().default(false),
2774
+ queryPagination: z22.boolean().default(false),
2748
2775
  /** Can perform window functions? */
2749
- queryWindowFunctions: z21.boolean().default(false),
2776
+ queryWindowFunctions: z22.boolean().default(false),
2750
2777
  /** Can perform subqueries? */
2751
- querySubqueries: z21.boolean().default(false),
2778
+ querySubqueries: z22.boolean().default(false),
2752
2779
  /** Can execute SQL-like joins natively? */
2753
- joins: z21.boolean().default(false),
2780
+ joins: z22.boolean().default(false),
2754
2781
  // ============================================================================
2755
2782
  // Advanced Features
2756
2783
  // ============================================================================
2757
2784
  /** Can perform full-text search? */
2758
- fullTextSearch: z21.boolean().default(false),
2785
+ fullTextSearch: z22.boolean().default(false),
2759
2786
  /** Is read-only? */
2760
- readOnly: z21.boolean().default(false),
2787
+ readOnly: z22.boolean().default(false),
2761
2788
  /** Is scheme-less (needs schema inference)? */
2762
- dynamicSchema: z21.boolean().default(false)
2789
+ dynamicSchema: z22.boolean().default(false)
2763
2790
  });
2764
- var DatasourceSchema = z21.object({
2791
+ var DatasourceSchema = z22.object({
2765
2792
  /** Machine Name */
2766
- name: z21.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Unique datasource identifier"),
2793
+ name: z22.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Unique datasource identifier"),
2767
2794
  /** Human Label */
2768
- label: z21.string().optional().describe("Display label"),
2795
+ label: z22.string().optional().describe("Display label"),
2769
2796
  /** Driver */
2770
2797
  driver: DriverType.describe("Underlying driver type"),
2771
2798
  /**
@@ -2773,50 +2800,50 @@ var DatasourceSchema = z21.object({
2773
2800
  * Specific to the driver (e.g., host, port, user, password, bucket, etc.)
2774
2801
  * Stored securely (passwords usually interpolated from ENV).
2775
2802
  */
2776
- config: z21.record(z21.string(), z21.unknown()).describe("Driver specific configuration"),
2803
+ config: z22.record(z22.string(), z22.unknown()).describe("Driver specific configuration"),
2777
2804
  /**
2778
2805
  * Connection Pool Configuration
2779
2806
  * Standard connection pooling settings.
2780
2807
  */
2781
- pool: z21.object({
2782
- min: z21.number().default(0).describe("Minimum connections"),
2783
- max: z21.number().default(10).describe("Maximum connections"),
2784
- idleTimeoutMillis: z21.number().default(3e4).describe("Idle timeout"),
2785
- connectionTimeoutMillis: z21.number().default(3e3).describe("Connection establishment timeout")
2808
+ pool: z22.object({
2809
+ min: z22.number().default(0).describe("Minimum connections"),
2810
+ max: z22.number().default(10).describe("Maximum connections"),
2811
+ idleTimeoutMillis: z22.number().default(3e4).describe("Idle timeout"),
2812
+ connectionTimeoutMillis: z22.number().default(3e3).describe("Connection establishment timeout")
2786
2813
  }).optional().describe("Connection pool settings"),
2787
2814
  /**
2788
2815
  * Read Replicas
2789
2816
  * Optional list of duplicate configurations for read-only operations.
2790
2817
  * Useful for scaling read throughput.
2791
2818
  */
2792
- readReplicas: z21.array(z21.record(z21.string(), z21.unknown())).optional().describe("Read-only replica configurations"),
2819
+ readReplicas: z22.array(z22.record(z22.string(), z22.unknown())).optional().describe("Read-only replica configurations"),
2793
2820
  /**
2794
2821
  * Capability Overrides
2795
2822
  * Manually override what the driver claims to support.
2796
2823
  */
2797
2824
  capabilities: DatasourceCapabilities.optional().describe("Capability overrides"),
2798
2825
  /** Health Check */
2799
- healthCheck: z21.object({
2800
- enabled: z21.boolean().default(true).describe("Enable health check endpoint"),
2801
- intervalMs: z21.number().default(3e4).describe("Health check interval in milliseconds"),
2802
- timeoutMs: z21.number().default(5e3).describe("Health check timeout in milliseconds")
2826
+ healthCheck: z22.object({
2827
+ enabled: z22.boolean().default(true).describe("Enable health check endpoint"),
2828
+ intervalMs: z22.number().default(3e4).describe("Health check interval in milliseconds"),
2829
+ timeoutMs: z22.number().default(5e3).describe("Health check timeout in milliseconds")
2803
2830
  }).optional().describe("Datasource health check configuration"),
2804
2831
  /** Retry Policy */
2805
- retryPolicy: z21.object({
2806
- maxRetries: z21.number().default(3).describe("Maximum number of retry attempts"),
2807
- baseDelayMs: z21.number().default(1e3).describe("Base delay between retries in milliseconds"),
2808
- maxDelayMs: z21.number().default(3e4).describe("Maximum delay between retries in milliseconds"),
2809
- backoffMultiplier: z21.number().default(2).describe("Exponential backoff multiplier")
2832
+ retryPolicy: z22.object({
2833
+ maxRetries: z22.number().default(3).describe("Maximum number of retry attempts"),
2834
+ baseDelayMs: z22.number().default(1e3).describe("Base delay between retries in milliseconds"),
2835
+ maxDelayMs: z22.number().default(3e4).describe("Maximum delay between retries in milliseconds"),
2836
+ backoffMultiplier: z22.number().default(2).describe("Exponential backoff multiplier")
2810
2837
  }).optional().describe("Connection retry policy for transient failures"),
2811
2838
  /** Description */
2812
- description: z21.string().optional().describe("Internal description"),
2839
+ description: z22.string().optional().describe("Internal description"),
2813
2840
  /** Is enabled? */
2814
- active: z21.boolean().default(true).describe("Is datasource enabled")
2841
+ active: z22.boolean().default(true).describe("Is datasource enabled")
2815
2842
  });
2816
2843
 
2817
2844
  // src/data/analytics.zod.ts
2818
- import { z as z22 } from "zod";
2819
- var AggregationMetricType = z22.enum([
2845
+ import { z as z23 } from "zod";
2846
+ var AggregationMetricType = z23.enum([
2820
2847
  "count",
2821
2848
  "sum",
2822
2849
  "avg",
@@ -2830,14 +2857,14 @@ var AggregationMetricType = z22.enum([
2830
2857
  "boolean"
2831
2858
  // Custom SQL expression returning a boolean
2832
2859
  ]);
2833
- var DimensionType = z22.enum([
2860
+ var DimensionType = z23.enum([
2834
2861
  "string",
2835
2862
  "number",
2836
2863
  "boolean",
2837
2864
  "time",
2838
2865
  "geo"
2839
2866
  ]);
2840
- var TimeUpdateInterval = z22.enum([
2867
+ var TimeUpdateInterval = z23.enum([
2841
2868
  "second",
2842
2869
  "minute",
2843
2870
  "hour",
@@ -2847,78 +2874,78 @@ var TimeUpdateInterval = z22.enum([
2847
2874
  "quarter",
2848
2875
  "year"
2849
2876
  ]);
2850
- var MetricSchema = z22.object({
2851
- name: z22.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Unique metric ID"),
2852
- label: z22.string().describe("Human readable label"),
2853
- description: z22.string().optional(),
2877
+ var MetricSchema = z23.object({
2878
+ name: z23.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Unique metric ID"),
2879
+ label: z23.string().describe("Human readable label"),
2880
+ description: z23.string().optional(),
2854
2881
  type: AggregationMetricType,
2855
2882
  /** Source Calculation */
2856
- sql: z22.string().describe("SQL expression or field reference"),
2883
+ sql: z23.string().describe("SQL expression or field reference"),
2857
2884
  /** Filtering for this specific metric (e.g. "Revenue from Premium Users") */
2858
- filters: z22.array(z22.object({
2859
- sql: z22.string()
2885
+ filters: z23.array(z23.object({
2886
+ sql: z23.string()
2860
2887
  })).optional(),
2861
2888
  /** Format for display (e.g. "currency", "percent") */
2862
- format: z22.string().optional()
2889
+ format: z23.string().optional()
2863
2890
  });
2864
- var DimensionSchema = z22.object({
2865
- name: z22.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Unique dimension ID"),
2866
- label: z22.string().describe("Human readable label"),
2867
- description: z22.string().optional(),
2891
+ var DimensionSchema = z23.object({
2892
+ name: z23.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Unique dimension ID"),
2893
+ label: z23.string().describe("Human readable label"),
2894
+ description: z23.string().optional(),
2868
2895
  type: DimensionType,
2869
2896
  /** Source Column */
2870
- sql: z22.string().describe("SQL expression or column reference"),
2897
+ sql: z23.string().describe("SQL expression or column reference"),
2871
2898
  /** For Time Dimensions: Supported Granularities */
2872
- granularities: z22.array(TimeUpdateInterval).optional()
2899
+ granularities: z23.array(TimeUpdateInterval).optional()
2873
2900
  });
2874
- var CubeJoinSchema = z22.object({
2875
- name: z22.string().describe("Target cube name"),
2876
- relationship: z22.enum(["one_to_one", "one_to_many", "many_to_one"]).default("many_to_one"),
2877
- sql: z22.string().describe("Join condition (ON clause)")
2901
+ var CubeJoinSchema = z23.object({
2902
+ name: z23.string().describe("Target cube name"),
2903
+ relationship: z23.enum(["one_to_one", "one_to_many", "many_to_one"]).default("many_to_one"),
2904
+ sql: z23.string().describe("Join condition (ON clause)")
2878
2905
  });
2879
- var CubeSchema = z22.object({
2880
- name: z22.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Cube name (snake_case)"),
2881
- title: z22.string().optional(),
2882
- description: z22.string().optional(),
2906
+ var CubeSchema = z23.object({
2907
+ name: z23.string().regex(/^[a-z_][a-z0-9_]*$/).describe("Cube name (snake_case)"),
2908
+ title: z23.string().optional(),
2909
+ description: z23.string().optional(),
2883
2910
  /** Physical Data Source */
2884
- sql: z22.string().describe("Base SQL statement or Table Name"),
2911
+ sql: z23.string().describe("Base SQL statement or Table Name"),
2885
2912
  /** Semantic Definitions */
2886
- measures: z22.record(z22.string(), MetricSchema).describe("Quantitative metrics"),
2887
- dimensions: z22.record(z22.string(), DimensionSchema).describe("Qualitative attributes"),
2913
+ measures: z23.record(z23.string(), MetricSchema).describe("Quantitative metrics"),
2914
+ dimensions: z23.record(z23.string(), DimensionSchema).describe("Qualitative attributes"),
2888
2915
  /** Relationships */
2889
- joins: z22.record(z22.string(), CubeJoinSchema).optional(),
2916
+ joins: z23.record(z23.string(), CubeJoinSchema).optional(),
2890
2917
  /** Pre-aggregations / Caching */
2891
- refreshKey: z22.object({
2892
- every: z22.string().optional(),
2918
+ refreshKey: z23.object({
2919
+ every: z23.string().optional(),
2893
2920
  // e.g. "1 hour"
2894
- sql: z22.string().optional()
2921
+ sql: z23.string().optional()
2895
2922
  // SQL to check for data changes
2896
2923
  }).optional(),
2897
2924
  /** Access Control */
2898
- public: z22.boolean().default(false)
2899
- });
2900
- var AnalyticsQuerySchema = z22.object({
2901
- measures: z22.array(z22.string()).describe("List of metrics to calculate"),
2902
- dimensions: z22.array(z22.string()).optional().describe("List of dimensions to group by"),
2903
- filters: z22.array(z22.object({
2904
- member: z22.string().describe("Dimension or Measure"),
2905
- operator: z22.enum(["equals", "notEquals", "contains", "notContains", "gt", "gte", "lt", "lte", "set", "notSet", "inDateRange"]),
2906
- values: z22.array(z22.string()).optional()
2925
+ public: z23.boolean().default(false)
2926
+ });
2927
+ var AnalyticsQuerySchema = z23.object({
2928
+ measures: z23.array(z23.string()).describe("List of metrics to calculate"),
2929
+ dimensions: z23.array(z23.string()).optional().describe("List of dimensions to group by"),
2930
+ filters: z23.array(z23.object({
2931
+ member: z23.string().describe("Dimension or Measure"),
2932
+ operator: z23.enum(["equals", "notEquals", "contains", "notContains", "gt", "gte", "lt", "lte", "set", "notSet", "inDateRange"]),
2933
+ values: z23.array(z23.string()).optional()
2907
2934
  })).optional(),
2908
- timeDimensions: z22.array(z22.object({
2909
- dimension: z22.string(),
2935
+ timeDimensions: z23.array(z23.object({
2936
+ dimension: z23.string(),
2910
2937
  granularity: TimeUpdateInterval.optional(),
2911
- dateRange: z22.union([
2912
- z22.string(),
2938
+ dateRange: z23.union([
2939
+ z23.string(),
2913
2940
  // "Last 7 days"
2914
- z22.array(z22.string())
2941
+ z23.array(z23.string())
2915
2942
  // ["2023-01-01", "2023-01-31"]
2916
2943
  ]).optional()
2917
2944
  })).optional(),
2918
- order: z22.record(z22.string(), z22.enum(["asc", "desc"])).optional(),
2919
- limit: z22.number().optional(),
2920
- offset: z22.number().optional(),
2921
- timezone: z22.string().default("UTC")
2945
+ order: z23.record(z23.string(), z23.enum(["asc", "desc"])).optional(),
2946
+ limit: z23.number().optional(),
2947
+ offset: z23.number().optional(),
2948
+ timezone: z23.string().default("UTC")
2922
2949
  });
2923
2950
  export {
2924
2951
  ALL_OPERATORS,
@@ -2931,6 +2958,7 @@ export {
2931
2958
  AnalyticsQuerySchema,
2932
2959
  ApiMethod,
2933
2960
  AsyncValidationSchema,
2961
+ BaseEngineOptionsSchema,
2934
2962
  CDCConfigSchema,
2935
2963
  ComparisonOperatorSchema,
2936
2964
  ComputedFieldCacheSchema,