@sequenceholdings/orm 2.9.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -0
- package/dist/authoring.cjs +796 -7
- package/dist/authoring.cjs.map +1 -1
- package/dist/authoring.d.cts +11 -2
- package/dist/authoring.d.ts +11 -2
- package/dist/authoring.js +796 -7
- package/dist/authoring.js.map +1 -1
- package/dist/canonical.cjs +777 -6
- package/dist/canonical.cjs.map +1 -1
- package/dist/canonical.d.cts +43 -43
- package/dist/canonical.d.ts +43 -43
- package/dist/canonical.js +777 -6
- package/dist/canonical.js.map +1 -1
- package/dist/cli.cjs +7585 -7512
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +10 -1
- package/dist/cli.d.ts +10 -1
- package/dist/cli.js +7584 -7513
- package/dist/cli.js.map +1 -1
- package/dist/compiler.cjs +1059 -50
- package/dist/compiler.cjs.map +1 -1
- package/dist/compiler.d.cts +182 -2
- package/dist/compiler.d.ts +182 -2
- package/dist/compiler.js +1054 -51
- package/dist/compiler.js.map +1 -1
- package/dist/index.cjs +3720 -3447
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -31
- package/dist/index.d.ts +96 -31
- package/dist/index.js +3714 -3446
- package/dist/index.js.map +1 -1
- package/dist/ir.cjs +787 -14
- package/dist/ir.cjs.map +1 -1
- package/dist/ir.d.cts +70 -59
- package/dist/ir.d.ts +70 -59
- package/dist/ir.js +787 -15
- package/dist/ir.js.map +1 -1
- package/dist/predicate-v2.cjs +802 -30
- package/dist/predicate-v2.cjs.map +1 -1
- package/dist/predicate-v2.d.cts +2 -0
- package/dist/predicate-v2.d.ts +2 -0
- package/dist/predicate-v2.js +802 -30
- package/dist/predicate-v2.js.map +1 -1
- package/dist/sdl.cjs +794 -24
- package/dist/sdl.cjs.map +1 -1
- package/dist/sdl.js +794 -24
- package/dist/sdl.js.map +1 -1
- package/package.json +1 -1
- package/dist/{definition-B99BsOAO.d.cts → definition-CevES7lM.d.cts} +2 -2
- package/dist/{definition-B99BsOAO.d.ts → definition-CevES7lM.d.ts} +2 -2
package/dist/compiler.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ export { DynamicInputIssue, DynamicInputResult, NormalizedBoolExp, NormalizedOnC
|
|
|
5
5
|
export { CompilePolicyInput, CompilePredicateInput, POLICY_COMPARE_OPS, POLICY_MAX_LINK_DEPTH, ParsedPolicy, PolicyAccess, PolicyColumnInfo, PolicyCompareOp, PolicyCompileError, PolicyCompileErrorCode, PolicyLinkInfo, PolicyNode, PolicyOperand, PolicyParseError, PolicyResolver, PolicyTableInfo, assertClaimsOnlyWhen, compilePolicy, compilePredicateV2, parsePolicy, walkPolicy } from './predicate-v2.cjs';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export { P as PLATFORM_USER_TYPENAME, c as camelCase, g as enumTypeName, p as pascalCase } from './naming-BMZKFO0W.cjs';
|
|
8
|
-
export { S as SqlOperationDefinition, d as defineOperation, s as sqlOperationDefinitionSchema } from './definition-
|
|
8
|
+
export { S as SqlOperationDefinition, d as defineOperation, s as sqlOperationDefinitionSchema } from './definition-CevES7lM.cjs';
|
|
9
9
|
import './constants-D2o0vK6U.cjs';
|
|
10
10
|
import './policy-1iZbGnZZ.cjs';
|
|
11
11
|
|
|
@@ -522,6 +522,174 @@ declare function compileBuiltinSqlArtifact({ namespace, definitions, read, unbac
|
|
|
522
522
|
executionTarget?: string;
|
|
523
523
|
}): CompiledArtifact;
|
|
524
524
|
|
|
525
|
+
/** Bump whenever policy/compiler semantics change. Old projections fall back to
|
|
526
|
+
* authoritative namespace compilation until republished or backfilled. */
|
|
527
|
+
declare const OBJECT_METADATA_FORMAT = 1;
|
|
528
|
+
declare const objectSqlBundleSchema: z.ZodObject<{
|
|
529
|
+
format: z.ZodLiteral<1>;
|
|
530
|
+
dependencies: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
531
|
+
object: z.ZodObject<{
|
|
532
|
+
ref: z.ZodString;
|
|
533
|
+
table: z.ZodString;
|
|
534
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
535
|
+
name: z.ZodString;
|
|
536
|
+
nullable: z.ZodBoolean;
|
|
537
|
+
type: z.ZodString;
|
|
538
|
+
}, z.core.$strip>>;
|
|
539
|
+
scan: z.ZodString;
|
|
540
|
+
read: z.ZodArray<z.ZodString>;
|
|
541
|
+
}, z.core.$strict>;
|
|
542
|
+
tables: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
543
|
+
table: z.ZodString;
|
|
544
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
545
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
546
|
+
foreignReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
547
|
+
column: z.ZodString;
|
|
548
|
+
target: z.ZodString;
|
|
549
|
+
targetColumn: z.ZodString;
|
|
550
|
+
}, z.core.$strip>>>;
|
|
551
|
+
exportRead: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
552
|
+
capability: z.ZodString;
|
|
553
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
554
|
+
role: z.ZodString;
|
|
555
|
+
}, z.core.$strip>]>>;
|
|
556
|
+
exportWrite: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
557
|
+
capability: z.ZodString;
|
|
558
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
559
|
+
role: z.ZodString;
|
|
560
|
+
}, z.core.$strip>]>>;
|
|
561
|
+
schema: z.ZodString;
|
|
562
|
+
typename: z.ZodString;
|
|
563
|
+
claimsGated: z.ZodDefault<z.ZodBoolean>;
|
|
564
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
565
|
+
name: z.ZodString;
|
|
566
|
+
columnName: z.ZodString;
|
|
567
|
+
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
568
|
+
bigint: "bigint";
|
|
569
|
+
boolean: "boolean";
|
|
570
|
+
date: "date";
|
|
571
|
+
uuid: "uuid";
|
|
572
|
+
text: "text";
|
|
573
|
+
integer: "integer";
|
|
574
|
+
numeric: "numeric";
|
|
575
|
+
double: "double";
|
|
576
|
+
timestamptz: "timestamptz";
|
|
577
|
+
jsonb: "jsonb";
|
|
578
|
+
}>, z.ZodObject<{
|
|
579
|
+
enum: z.ZodString;
|
|
580
|
+
values: z.ZodArray<z.ZodString>;
|
|
581
|
+
}, z.core.$strip>]>;
|
|
582
|
+
nullable: z.ZodBoolean;
|
|
583
|
+
}, z.core.$strip>>;
|
|
584
|
+
primaryKey: z.ZodArray<z.ZodString>;
|
|
585
|
+
links: z.ZodArray<z.ZodObject<{
|
|
586
|
+
name: z.ZodString;
|
|
587
|
+
kind: z.ZodEnum<{
|
|
588
|
+
toOne: "toOne";
|
|
589
|
+
toMany: "toMany";
|
|
590
|
+
toPlatformUser: "toPlatformUser";
|
|
591
|
+
}>;
|
|
592
|
+
target: z.ZodString;
|
|
593
|
+
on: z.ZodString;
|
|
594
|
+
references: z.ZodString;
|
|
595
|
+
}, z.core.$strip>>;
|
|
596
|
+
filterable: z.ZodArray<z.ZodString>;
|
|
597
|
+
orderable: z.ZodArray<z.ZodString>;
|
|
598
|
+
insertable: z.ZodArray<z.ZodString>;
|
|
599
|
+
settable: z.ZodArray<z.ZodString>;
|
|
600
|
+
appendable: z.ZodArray<z.ZodString>;
|
|
601
|
+
touchOnUpdate: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
602
|
+
cells: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
603
|
+
at: z.ZodOptional<z.ZodString>;
|
|
604
|
+
by: z.ZodOptional<z.ZodString>;
|
|
605
|
+
rev: z.ZodOptional<z.ZodString>;
|
|
606
|
+
source: z.ZodOptional<z.ZodString>;
|
|
607
|
+
conflicts: z.ZodOptional<z.ZodString>;
|
|
608
|
+
}, z.core.$strict>>>;
|
|
609
|
+
resolved: z.ZodOptional<z.ZodObject<{
|
|
610
|
+
pk: z.ZodOptional<z.ZodString>;
|
|
611
|
+
manual: z.ZodString;
|
|
612
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
613
|
+
name: z.ZodString;
|
|
614
|
+
kind: z.ZodEnum<{
|
|
615
|
+
manual: "manual";
|
|
616
|
+
etl: "etl";
|
|
617
|
+
prefetch: "prefetch";
|
|
618
|
+
}>;
|
|
619
|
+
table: z.ZodString;
|
|
620
|
+
columns: z.ZodArray<z.ZodString>;
|
|
621
|
+
key: z.ZodOptional<z.ZodString>;
|
|
622
|
+
fetch: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
623
|
+
shape: z.ZodLiteral<"single">;
|
|
624
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
625
|
+
shape: z.ZodLiteral<"batch">;
|
|
626
|
+
maxKeys: z.ZodNumber;
|
|
627
|
+
}, z.core.$strip>]>>;
|
|
628
|
+
function: z.ZodOptional<z.ZodObject<{
|
|
629
|
+
kind: z.ZodEnum<{
|
|
630
|
+
managed: "managed";
|
|
631
|
+
native: "native";
|
|
632
|
+
}>;
|
|
633
|
+
id: z.ZodString;
|
|
634
|
+
}, z.core.$strip>>;
|
|
635
|
+
prefetchDefaults: z.ZodOptional<z.ZodObject<{
|
|
636
|
+
maxStalenessMs: z.ZodNumber;
|
|
637
|
+
timeoutMs: z.ZodNumber;
|
|
638
|
+
onError: z.ZodEnum<{
|
|
639
|
+
fallback: "fallback";
|
|
640
|
+
fail: "fail";
|
|
641
|
+
}>;
|
|
642
|
+
}, z.core.$strip>>;
|
|
643
|
+
writeback: z.ZodOptional<z.ZodObject<{
|
|
644
|
+
columns: z.ZodArray<z.ZodString>;
|
|
645
|
+
defaultMode: z.ZodEnum<{
|
|
646
|
+
sync: "sync";
|
|
647
|
+
async: "async";
|
|
648
|
+
}>;
|
|
649
|
+
timeoutMs: z.ZodNumber;
|
|
650
|
+
clearManualOnConfirm: z.ZodBoolean;
|
|
651
|
+
}, z.core.$strip>>;
|
|
652
|
+
}, z.core.$strip>>;
|
|
653
|
+
deletedBy: z.ZodArray<z.ZodString>;
|
|
654
|
+
materialized: z.ZodOptional<z.ZodObject<{
|
|
655
|
+
table: z.ZodString;
|
|
656
|
+
compute: z.ZodString;
|
|
657
|
+
}, z.core.$strip>>;
|
|
658
|
+
}, z.core.$strip>>;
|
|
659
|
+
constraints: z.ZodArray<z.ZodObject<{
|
|
660
|
+
name: z.ZodString;
|
|
661
|
+
columns: z.ZodArray<z.ZodString>;
|
|
662
|
+
}, z.core.$strip>>;
|
|
663
|
+
dynamicFilterMaxDepth: z.ZodDefault<z.ZodNumber>;
|
|
664
|
+
dynamicFilterMaxNodes: z.ZodDefault<z.ZodNumber>;
|
|
665
|
+
}, z.core.$strip>>;
|
|
666
|
+
readPolicies: z.ZodRecord<z.ZodString, z.ZodType<PredIr, unknown, z.core.$ZodTypeInternals<PredIr, unknown>>>;
|
|
667
|
+
}, z.core.$strict>;
|
|
668
|
+
type ObjectSqlBundle = z.infer<typeof objectSqlBundleSchema>;
|
|
669
|
+
interface ObjectMetadataProjection {
|
|
670
|
+
format: typeof OBJECT_METADATA_FORMAT;
|
|
671
|
+
/** Compact owner/RLS inventory, independent of query compilation metadata. */
|
|
672
|
+
relations: Array<{
|
|
673
|
+
schema: string;
|
|
674
|
+
table: string;
|
|
675
|
+
}>;
|
|
676
|
+
objects: Array<{
|
|
677
|
+
name: string;
|
|
678
|
+
contractHash: string;
|
|
679
|
+
bundle: ObjectSqlBundle | null;
|
|
680
|
+
}>;
|
|
681
|
+
}
|
|
682
|
+
/** Compile once at publication, then split the trusted result by SQL object.
|
|
683
|
+
* The full canonical document remains the authoring and migration contract. */
|
|
684
|
+
declare function compileObjectMetadata({ canonical: raw }: {
|
|
685
|
+
canonical: CanonicalDefinition;
|
|
686
|
+
}): Promise<ObjectMetadataProjection>;
|
|
687
|
+
/** Compose already-validated object catalogs. No full namespace parse/compile. */
|
|
688
|
+
declare function composeObjectSqlArtifact({ namespace, bundles }: {
|
|
689
|
+
namespace: string;
|
|
690
|
+
bundles: readonly ObjectSqlBundle[];
|
|
691
|
+
}): CompiledArtifact;
|
|
692
|
+
|
|
525
693
|
declare const DATASET_PREVIEW_LIMIT = 100;
|
|
526
694
|
/**
|
|
527
695
|
* Fixed runtime-owned reads, separate from the published operation manifest.
|
|
@@ -541,4 +709,16 @@ declare function validateManagedViewQueries({ canonical }: {
|
|
|
541
709
|
canonical: CanonicalDefinition;
|
|
542
710
|
}): Promise<void>;
|
|
543
711
|
|
|
544
|
-
|
|
712
|
+
/** Bump when the compiler's dependency or policy semantics change. */
|
|
713
|
+
declare const OPERATION_METADATA_FORMAT = 1;
|
|
714
|
+
/** Publication-time execution slice. Static operations retain only their
|
|
715
|
+
* logical, policy, write-reference and physical backing dependencies. Dynamic
|
|
716
|
+
* filters/order can follow caller-selected paths: retain the reachable graph
|
|
717
|
+
* for those input roots rather than silently narrowing accepted inputs. Keys
|
|
718
|
+
* stay identical to the compiled IR; no alias/namespace rewriting occurs. */
|
|
719
|
+
declare function projectOperationMetadata({ artifact, operation }: {
|
|
720
|
+
artifact: CompiledArtifact;
|
|
721
|
+
operation: CompiledOperation;
|
|
722
|
+
}): CompiledArtifact;
|
|
723
|
+
|
|
724
|
+
export { type BuildContextResult, COMPILER_MAJOR, CONST_TRUE, type ClientManifest, type ClientManifestOperation, type CompileContext, type CompileNamespaceInput, type CompileNamespaceResult, type CompilerDiagnostic, DATASET_PREVIEW_LIMIT, DEFAULT_LIMIT, type DiagnosticSeverity, DocumentCompileError, MAX_LIMIT, type MutationOp, type MutationRootInfo, NamespaceCompileError, OBJECT_METADATA_FORMAT, OPERATION_METADATA_FORMAT, type ObjectMetadataProjection, type ObjectSqlBundle, OperationLowerer, PLATFORM_USER_TABLE, type ParseDocumentsResult, type ParsedDocument, type PinnedColumn, type QueryRootInfo, type RestrictedOperation, type SourceDocument, type SqlQueryInput, andPred, bindNamedParameters, buildCompileContext, canonicalOperationText, classifyInputType, collectPinnedColumns, compileBuiltinSqlArtifact, compileDatasetPreviews, compileDefaultOperations, compileNamespace, compileNamespaceOrThrow, compileObjectMetadata, compileOperationDocuments, compileRuntimeSql, composeObjectSqlArtifact, computeOpHash, computeOpsHash, computePinnedColumnsByTable, computeSchemaHash, flattenOperation, generateDefaultOperations, injectPolicies, inputTypeName, isSqlOperationDocument, lowerOperation, mutationRootNames, objectSqlBundleSchema, parseDocuments, parseSdl, platformUserMeta, predContains, predContainsExists, projectOperationMetadata, queryRootNames, referencedSqlObjects, restrictOperation, sqlQueryInputSchema, typeNameForTable, validateManagedViewQueries, walkPred };
|
package/dist/compiler.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { DynamicInputIssue, DynamicInputResult, NormalizedBoolExp, NormalizedOnC
|
|
|
5
5
|
export { CompilePolicyInput, CompilePredicateInput, POLICY_COMPARE_OPS, POLICY_MAX_LINK_DEPTH, ParsedPolicy, PolicyAccess, PolicyColumnInfo, PolicyCompareOp, PolicyCompileError, PolicyCompileErrorCode, PolicyLinkInfo, PolicyNode, PolicyOperand, PolicyParseError, PolicyResolver, PolicyTableInfo, assertClaimsOnlyWhen, compilePolicy, compilePredicateV2, parsePolicy, walkPolicy } from './predicate-v2.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export { P as PLATFORM_USER_TYPENAME, c as camelCase, g as enumTypeName, p as pascalCase } from './naming-DUk7AcXs.js';
|
|
8
|
-
export { S as SqlOperationDefinition, d as defineOperation, s as sqlOperationDefinitionSchema } from './definition-
|
|
8
|
+
export { S as SqlOperationDefinition, d as defineOperation, s as sqlOperationDefinitionSchema } from './definition-CevES7lM.js';
|
|
9
9
|
import './constants-D2o0vK6U.js';
|
|
10
10
|
import './policy-1iZbGnZZ.js';
|
|
11
11
|
|
|
@@ -522,6 +522,174 @@ declare function compileBuiltinSqlArtifact({ namespace, definitions, read, unbac
|
|
|
522
522
|
executionTarget?: string;
|
|
523
523
|
}): CompiledArtifact;
|
|
524
524
|
|
|
525
|
+
/** Bump whenever policy/compiler semantics change. Old projections fall back to
|
|
526
|
+
* authoritative namespace compilation until republished or backfilled. */
|
|
527
|
+
declare const OBJECT_METADATA_FORMAT = 1;
|
|
528
|
+
declare const objectSqlBundleSchema: z.ZodObject<{
|
|
529
|
+
format: z.ZodLiteral<1>;
|
|
530
|
+
dependencies: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
531
|
+
object: z.ZodObject<{
|
|
532
|
+
ref: z.ZodString;
|
|
533
|
+
table: z.ZodString;
|
|
534
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
535
|
+
name: z.ZodString;
|
|
536
|
+
nullable: z.ZodBoolean;
|
|
537
|
+
type: z.ZodString;
|
|
538
|
+
}, z.core.$strip>>;
|
|
539
|
+
scan: z.ZodString;
|
|
540
|
+
read: z.ZodArray<z.ZodString>;
|
|
541
|
+
}, z.core.$strict>;
|
|
542
|
+
tables: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
543
|
+
table: z.ZodString;
|
|
544
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
545
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
546
|
+
foreignReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
547
|
+
column: z.ZodString;
|
|
548
|
+
target: z.ZodString;
|
|
549
|
+
targetColumn: z.ZodString;
|
|
550
|
+
}, z.core.$strip>>>;
|
|
551
|
+
exportRead: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
552
|
+
capability: z.ZodString;
|
|
553
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
554
|
+
role: z.ZodString;
|
|
555
|
+
}, z.core.$strip>]>>;
|
|
556
|
+
exportWrite: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
557
|
+
capability: z.ZodString;
|
|
558
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
559
|
+
role: z.ZodString;
|
|
560
|
+
}, z.core.$strip>]>>;
|
|
561
|
+
schema: z.ZodString;
|
|
562
|
+
typename: z.ZodString;
|
|
563
|
+
claimsGated: z.ZodDefault<z.ZodBoolean>;
|
|
564
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
565
|
+
name: z.ZodString;
|
|
566
|
+
columnName: z.ZodString;
|
|
567
|
+
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
568
|
+
bigint: "bigint";
|
|
569
|
+
boolean: "boolean";
|
|
570
|
+
date: "date";
|
|
571
|
+
uuid: "uuid";
|
|
572
|
+
text: "text";
|
|
573
|
+
integer: "integer";
|
|
574
|
+
numeric: "numeric";
|
|
575
|
+
double: "double";
|
|
576
|
+
timestamptz: "timestamptz";
|
|
577
|
+
jsonb: "jsonb";
|
|
578
|
+
}>, z.ZodObject<{
|
|
579
|
+
enum: z.ZodString;
|
|
580
|
+
values: z.ZodArray<z.ZodString>;
|
|
581
|
+
}, z.core.$strip>]>;
|
|
582
|
+
nullable: z.ZodBoolean;
|
|
583
|
+
}, z.core.$strip>>;
|
|
584
|
+
primaryKey: z.ZodArray<z.ZodString>;
|
|
585
|
+
links: z.ZodArray<z.ZodObject<{
|
|
586
|
+
name: z.ZodString;
|
|
587
|
+
kind: z.ZodEnum<{
|
|
588
|
+
toOne: "toOne";
|
|
589
|
+
toMany: "toMany";
|
|
590
|
+
toPlatformUser: "toPlatformUser";
|
|
591
|
+
}>;
|
|
592
|
+
target: z.ZodString;
|
|
593
|
+
on: z.ZodString;
|
|
594
|
+
references: z.ZodString;
|
|
595
|
+
}, z.core.$strip>>;
|
|
596
|
+
filterable: z.ZodArray<z.ZodString>;
|
|
597
|
+
orderable: z.ZodArray<z.ZodString>;
|
|
598
|
+
insertable: z.ZodArray<z.ZodString>;
|
|
599
|
+
settable: z.ZodArray<z.ZodString>;
|
|
600
|
+
appendable: z.ZodArray<z.ZodString>;
|
|
601
|
+
touchOnUpdate: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
602
|
+
cells: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
603
|
+
at: z.ZodOptional<z.ZodString>;
|
|
604
|
+
by: z.ZodOptional<z.ZodString>;
|
|
605
|
+
rev: z.ZodOptional<z.ZodString>;
|
|
606
|
+
source: z.ZodOptional<z.ZodString>;
|
|
607
|
+
conflicts: z.ZodOptional<z.ZodString>;
|
|
608
|
+
}, z.core.$strict>>>;
|
|
609
|
+
resolved: z.ZodOptional<z.ZodObject<{
|
|
610
|
+
pk: z.ZodOptional<z.ZodString>;
|
|
611
|
+
manual: z.ZodString;
|
|
612
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
613
|
+
name: z.ZodString;
|
|
614
|
+
kind: z.ZodEnum<{
|
|
615
|
+
manual: "manual";
|
|
616
|
+
etl: "etl";
|
|
617
|
+
prefetch: "prefetch";
|
|
618
|
+
}>;
|
|
619
|
+
table: z.ZodString;
|
|
620
|
+
columns: z.ZodArray<z.ZodString>;
|
|
621
|
+
key: z.ZodOptional<z.ZodString>;
|
|
622
|
+
fetch: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
623
|
+
shape: z.ZodLiteral<"single">;
|
|
624
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
625
|
+
shape: z.ZodLiteral<"batch">;
|
|
626
|
+
maxKeys: z.ZodNumber;
|
|
627
|
+
}, z.core.$strip>]>>;
|
|
628
|
+
function: z.ZodOptional<z.ZodObject<{
|
|
629
|
+
kind: z.ZodEnum<{
|
|
630
|
+
managed: "managed";
|
|
631
|
+
native: "native";
|
|
632
|
+
}>;
|
|
633
|
+
id: z.ZodString;
|
|
634
|
+
}, z.core.$strip>>;
|
|
635
|
+
prefetchDefaults: z.ZodOptional<z.ZodObject<{
|
|
636
|
+
maxStalenessMs: z.ZodNumber;
|
|
637
|
+
timeoutMs: z.ZodNumber;
|
|
638
|
+
onError: z.ZodEnum<{
|
|
639
|
+
fallback: "fallback";
|
|
640
|
+
fail: "fail";
|
|
641
|
+
}>;
|
|
642
|
+
}, z.core.$strip>>;
|
|
643
|
+
writeback: z.ZodOptional<z.ZodObject<{
|
|
644
|
+
columns: z.ZodArray<z.ZodString>;
|
|
645
|
+
defaultMode: z.ZodEnum<{
|
|
646
|
+
sync: "sync";
|
|
647
|
+
async: "async";
|
|
648
|
+
}>;
|
|
649
|
+
timeoutMs: z.ZodNumber;
|
|
650
|
+
clearManualOnConfirm: z.ZodBoolean;
|
|
651
|
+
}, z.core.$strip>>;
|
|
652
|
+
}, z.core.$strip>>;
|
|
653
|
+
deletedBy: z.ZodArray<z.ZodString>;
|
|
654
|
+
materialized: z.ZodOptional<z.ZodObject<{
|
|
655
|
+
table: z.ZodString;
|
|
656
|
+
compute: z.ZodString;
|
|
657
|
+
}, z.core.$strip>>;
|
|
658
|
+
}, z.core.$strip>>;
|
|
659
|
+
constraints: z.ZodArray<z.ZodObject<{
|
|
660
|
+
name: z.ZodString;
|
|
661
|
+
columns: z.ZodArray<z.ZodString>;
|
|
662
|
+
}, z.core.$strip>>;
|
|
663
|
+
dynamicFilterMaxDepth: z.ZodDefault<z.ZodNumber>;
|
|
664
|
+
dynamicFilterMaxNodes: z.ZodDefault<z.ZodNumber>;
|
|
665
|
+
}, z.core.$strip>>;
|
|
666
|
+
readPolicies: z.ZodRecord<z.ZodString, z.ZodType<PredIr, unknown, z.core.$ZodTypeInternals<PredIr, unknown>>>;
|
|
667
|
+
}, z.core.$strict>;
|
|
668
|
+
type ObjectSqlBundle = z.infer<typeof objectSqlBundleSchema>;
|
|
669
|
+
interface ObjectMetadataProjection {
|
|
670
|
+
format: typeof OBJECT_METADATA_FORMAT;
|
|
671
|
+
/** Compact owner/RLS inventory, independent of query compilation metadata. */
|
|
672
|
+
relations: Array<{
|
|
673
|
+
schema: string;
|
|
674
|
+
table: string;
|
|
675
|
+
}>;
|
|
676
|
+
objects: Array<{
|
|
677
|
+
name: string;
|
|
678
|
+
contractHash: string;
|
|
679
|
+
bundle: ObjectSqlBundle | null;
|
|
680
|
+
}>;
|
|
681
|
+
}
|
|
682
|
+
/** Compile once at publication, then split the trusted result by SQL object.
|
|
683
|
+
* The full canonical document remains the authoring and migration contract. */
|
|
684
|
+
declare function compileObjectMetadata({ canonical: raw }: {
|
|
685
|
+
canonical: CanonicalDefinition;
|
|
686
|
+
}): Promise<ObjectMetadataProjection>;
|
|
687
|
+
/** Compose already-validated object catalogs. No full namespace parse/compile. */
|
|
688
|
+
declare function composeObjectSqlArtifact({ namespace, bundles }: {
|
|
689
|
+
namespace: string;
|
|
690
|
+
bundles: readonly ObjectSqlBundle[];
|
|
691
|
+
}): CompiledArtifact;
|
|
692
|
+
|
|
525
693
|
declare const DATASET_PREVIEW_LIMIT = 100;
|
|
526
694
|
/**
|
|
527
695
|
* Fixed runtime-owned reads, separate from the published operation manifest.
|
|
@@ -541,4 +709,16 @@ declare function validateManagedViewQueries({ canonical }: {
|
|
|
541
709
|
canonical: CanonicalDefinition;
|
|
542
710
|
}): Promise<void>;
|
|
543
711
|
|
|
544
|
-
|
|
712
|
+
/** Bump when the compiler's dependency or policy semantics change. */
|
|
713
|
+
declare const OPERATION_METADATA_FORMAT = 1;
|
|
714
|
+
/** Publication-time execution slice. Static operations retain only their
|
|
715
|
+
* logical, policy, write-reference and physical backing dependencies. Dynamic
|
|
716
|
+
* filters/order can follow caller-selected paths: retain the reachable graph
|
|
717
|
+
* for those input roots rather than silently narrowing accepted inputs. Keys
|
|
718
|
+
* stay identical to the compiled IR; no alias/namespace rewriting occurs. */
|
|
719
|
+
declare function projectOperationMetadata({ artifact, operation }: {
|
|
720
|
+
artifact: CompiledArtifact;
|
|
721
|
+
operation: CompiledOperation;
|
|
722
|
+
}): CompiledArtifact;
|
|
723
|
+
|
|
724
|
+
export { type BuildContextResult, COMPILER_MAJOR, CONST_TRUE, type ClientManifest, type ClientManifestOperation, type CompileContext, type CompileNamespaceInput, type CompileNamespaceResult, type CompilerDiagnostic, DATASET_PREVIEW_LIMIT, DEFAULT_LIMIT, type DiagnosticSeverity, DocumentCompileError, MAX_LIMIT, type MutationOp, type MutationRootInfo, NamespaceCompileError, OBJECT_METADATA_FORMAT, OPERATION_METADATA_FORMAT, type ObjectMetadataProjection, type ObjectSqlBundle, OperationLowerer, PLATFORM_USER_TABLE, type ParseDocumentsResult, type ParsedDocument, type PinnedColumn, type QueryRootInfo, type RestrictedOperation, type SourceDocument, type SqlQueryInput, andPred, bindNamedParameters, buildCompileContext, canonicalOperationText, classifyInputType, collectPinnedColumns, compileBuiltinSqlArtifact, compileDatasetPreviews, compileDefaultOperations, compileNamespace, compileNamespaceOrThrow, compileObjectMetadata, compileOperationDocuments, compileRuntimeSql, composeObjectSqlArtifact, computeOpHash, computeOpsHash, computePinnedColumnsByTable, computeSchemaHash, flattenOperation, generateDefaultOperations, injectPolicies, inputTypeName, isSqlOperationDocument, lowerOperation, mutationRootNames, objectSqlBundleSchema, parseDocuments, parseSdl, platformUserMeta, predContains, predContainsExists, projectOperationMetadata, queryRootNames, referencedSqlObjects, restrictOperation, sqlQueryInputSchema, typeNameForTable, validateManagedViewQueries, walkPred };
|