@sequenceholdings/orm 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1440,19 +1440,20 @@ var variableIrSchema = zod.z.object({
1440
1440
  defaultValue: variableDefaultIrSchema.optional()
1441
1441
  });
1442
1442
  var sqlColumnSchema = zod.z.object({ name: zod.z.string(), type: zod.z.enum(["text", "boolean", "integer", "bigint", "numeric", "double", "uuid", "date", "timestamptz", "jsonb"]), nullable: zod.z.boolean() });
1443
+ var sqlObjectIrSchema = zod.z.object({
1444
+ ref: zod.z.string(),
1445
+ table: zod.z.string(),
1446
+ columns: zod.z.array(sqlColumnSchema.extend({ type: zod.z.string() })).min(1),
1447
+ scan: zod.z.string().min(1),
1448
+ read: zod.z.array(zod.z.string()).min(1)
1449
+ }).strict();
1443
1450
  var compiledOperationSchema = zod.z.object({
1444
1451
  language: zod.z.literal("sql").optional(),
1445
1452
  /** Server-compiled object catalog and permission ceiling, never caller SQL. */
1446
1453
  sqlQuery: zod.z.object({
1447
1454
  catalog: zod.z.object({
1448
1455
  identity: zod.z.string(),
1449
- objects: zod.z.array(zod.z.object({
1450
- ref: zod.z.string(),
1451
- table: zod.z.string(),
1452
- columns: zod.z.array(sqlColumnSchema.extend({ type: zod.z.string() })).min(1),
1453
- scan: zod.z.string().min(1),
1454
- read: zod.z.array(zod.z.string()).min(1)
1455
- }).strict()).min(1).max(256)
1456
+ objects: zod.z.array(sqlObjectIrSchema).min(1).max(256)
1456
1457
  }).strict(),
1457
1458
  read: zod.z.array(zod.z.string()).min(1).max(256),
1458
1459
  maxRows: zod.z.number().int().min(1).max(1e4)
@@ -1945,6 +1946,7 @@ var FLIPPED = {
1945
1946
  ">=": "<="
1946
1947
  };
1947
1948
  function resolveTable(resolver, table) {
1949
+ resolver.onTable?.(table);
1948
1950
  const info = resolver.tables[table];
1949
1951
  if (!info) {
1950
1952
  throw new PolicyCompileError(`unknown table '${table}'`, "unknown-table", Object.keys(resolver.tables));