@sequenceholdings/orm 2.6.2 → 2.7.1
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 +75 -1
- package/dist/authoring.cjs +9 -0
- package/dist/authoring.cjs.map +1 -1
- package/dist/authoring.d.cts +6 -0
- package/dist/authoring.d.ts +6 -0
- package/dist/authoring.js +9 -0
- package/dist/authoring.js.map +1 -1
- package/dist/cli.cjs +89 -29
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +89 -29
- package/dist/cli.js.map +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +4 -1
- package/dist/client.d.ts +4 -1
- package/dist/client.js.map +1 -1
- package/dist/compiler.cjs +68 -29
- package/dist/compiler.cjs.map +1 -1
- package/dist/compiler.js +68 -29
- package/dist/compiler.js.map +1 -1
- package/dist/index.cjs +82 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +81 -5
- package/dist/index.js.map +1 -1
- package/dist/ir.cjs +19 -3
- package/dist/ir.cjs.map +1 -1
- package/dist/ir.d.cts +13 -6
- package/dist/ir.d.ts +13 -6
- package/dist/ir.js +18 -4
- package/dist/ir.js.map +1 -1
- package/dist/predicate-v2.cjs +24 -2
- package/dist/predicate-v2.cjs.map +1 -1
- package/dist/predicate-v2.d.cts +4 -0
- package/dist/predicate-v2.d.ts +4 -0
- package/dist/predicate-v2.js +24 -2
- package/dist/predicate-v2.js.map +1 -1
- package/dist/sdl.cjs +16 -2
- package/dist/sdl.cjs.map +1 -1
- package/dist/sdl.js +16 -2
- package/dist/sdl.js.map +1 -1
- package/package.json +1 -1
- package/src/codegen-gql/preset.cjs +45 -8
- package/templates/orm-namespace/codegen.ts +5 -0
package/dist/index.d.cts
CHANGED
|
@@ -5,8 +5,8 @@ export { CANONICAL_FORMAT, CanonicalColumn, CanonicalEnum, CanonicalLink, Canoni
|
|
|
5
5
|
import { CustomRolesBlock } from '@sequenceholdings/custom-roles-manifest';
|
|
6
6
|
export { CustomRolesBlock, capabilityPinsSchema, customRolesBlockSchema, customRolesDeclared, parseCapabilityPin, validateCapabilityPins } from '@sequenceholdings/custom-roles-manifest';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { PredIr } from './ir.cjs';
|
|
9
|
-
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, CellSelectionIr, ClaimKey, CmpOp, CompiledArtifact, CompiledOperation, DATE_BUCKETS, DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, ExternalPolicyClaimKey, GUARDED_IR_VERSION, GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, InputRefKind, IrVersionError, LEGACY_IR_VERSION, LimitIr, OrderIr, PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, ResolvedMetaIr, ResolvedSourceIr, RootIr, SQL_IR_VERSION, SelectionIr,
|
|
8
|
+
import { PredIr, TableMetaIr } from './ir.cjs';
|
|
9
|
+
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, CellSelectionIr, ClaimKey, CmpOp, CompiledArtifact, CompiledOperation, DATE_BUCKETS, DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, ExternalPolicyClaimKey, GUARDED_IR_VERSION, GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, InputRefKind, IrVersionError, LEGACY_IR_VERSION, LimitIr, OrderIr, PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, ResolvedMetaIr, ResolvedSourceIr, RootIr, SERVICE_PRINCIPAL_IR_VERSION, SQL_IR_VERSION, SelectionIr, ValueIr, VariableDefaultIr, VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, isExternalPolicyClaimKey, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, usesServicePrincipal, valueIrSchema, variableDefaultIrSchema, variableIrSchema } from './ir.cjs';
|
|
10
10
|
export { e as CAPABILITY_KEY_PATTERN, C as CELLS_FIELD, a as CELL_PARTS, f as CELL_PART_SUFFIX, g as CLAIM_KEY_PATTERN, h as COLUMN_IDENTIFIER_PATTERN, i as CONSUMER_ROLE_SUFFIX, b as CellPart, D as DEFINITION_FILE_EXTENSIONS, H as HASH_DOMAIN, I as IDENTIFIER_PATTERN, M as MATERIALIZE_ACTOR, j as MATERIALIZE_CLAIMS_JSON, k as MAX_DEFINITION_FILE_BYTES, l as MAX_GENERATED_SDL_BYTES, m as MAX_IDENTIFIER_LENGTH, n as MAX_PERSISTED_READ_ROWS, o as MAX_TRACKED_COLUMN_NAME, p as NAMESPACE_CONFIG_FILENAMES, N as NAMESPACE_PATTERN, O as ORM_DATA_TOKEN_HEADER, q as ORM_REGISTRATION_MAX_BYTES, r as ORM_SCHEMA_PREFIX, d as ORM_SERVICE_DATA_TOKEN_HEADER, Q as QUALIFIED_TABLE_PATTERN, R as RESERVED_COLUMN_NAMES, s as RESERVED_TABLE_NAMES, S as SYNCED_SOURCE_PATTERN, c as cellColumnName, t as consumerRoleName, u as materializeLockKey, v as materializedRefreshFunctionName, w as ormSchemaName } from './constants-Dou1RkTo.cjs';
|
|
11
11
|
import { generateDrizzleJson } from 'drizzle-kit/api';
|
|
12
12
|
import { PgTableWithColumns } from 'drizzle-orm/pg-core';
|
|
@@ -592,11 +592,13 @@ interface SyncedBacking {
|
|
|
592
592
|
* SELECT before CREATE VIEW, or preserve a separately verified publisher grant.
|
|
593
593
|
*/
|
|
594
594
|
declare const SYNCED_VIEW_EXECUTION_OWNER_ROLE = "orm_exec";
|
|
595
|
-
declare function syncedViewStatements({ definition, backings, readPolicyIrByTable, columnNamesByTable, columnTypesByTable, executionOwnerRole, backingPrivileges, viewPrivileges, statementClaimChecks, }: {
|
|
595
|
+
declare function syncedViewStatements({ definition, backings, readPolicyIrByTable, policyTables, columnNamesByTable, columnTypesByTable, executionOwnerRole, backingPrivileges, viewPrivileges, statementClaimChecks, }: {
|
|
596
596
|
definition: NamespaceDefinition;
|
|
597
597
|
backings: readonly SyncedBacking[];
|
|
598
598
|
/** v2 compiled read policies (preserves capability/role variants). */
|
|
599
599
|
readPolicyIrByTable?: ReadonlyMap<string, PredIr>;
|
|
600
|
+
/** Shared compiler metadata, including qualified imported targets and platform users. */
|
|
601
|
+
policyTables?: Readonly<Record<string, TableMetaIr>>;
|
|
600
602
|
/** Logical column name → physical backing column name per synced table. */
|
|
601
603
|
columnNamesByTable?: ReadonlyMap<string, Readonly<Record<string, string>>>;
|
|
602
604
|
/**
|
|
@@ -1877,4 +1879,4 @@ declare function planTableImport({ definition, spec, after, }: {
|
|
|
1877
1879
|
after?: string;
|
|
1878
1880
|
}): ImportPlanResult;
|
|
1879
1881
|
|
|
1880
|
-
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, type ActionDefinition, CAPABILITIES_CLAIM_KEY, CLAIMS_SETTING, COLUMN_TYPES, COMPARE_OPS, CanonicalDefinition, type ColumnDefault, type ColumnDefinition, type ColumnType, type CommittedChainEntry, type CommittedMigration, type CompareOp, type CompilePredIrToSqlOptions, type CompiledStatement, type DefinitionFile, type DefinitionSource, type DestructiveStatement, type DiffOptions, type DrizzleEntities, IMPORT_CONFLICT_MODES, type ImportConflictMode, type ImportPlan, type ImportPlanResult, type ImportSpec, type IndexDefinition, type JournalEntry, type LinkDefinition, type LoadedNamespace, MIGRATIONS_DIRNAME, type MigrationJournal, type MigrationWorkspace, type NamespaceCapabilities, type NamespaceConfig, type NamespaceDefinition, type NamespaceSnapshot, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, type Operand, OrmDefinitionError, type OrmMigrationExport, type ParsedPredicate, type PlannedMigration, PredIr, type Predicate, type PredicateColumnTypes, PredicateParseError, ROLES_CLAIM_KEY, type RebaseEntry, type RebaseEntryInput, type RebaseNoopOptions, STATEMENT_KINDS, SYNCED_VIEW_EXECUTION_OWNER_ROLE, type StatementKind, type SyncedBacking, type SyncedColumnType, type SyncedPredicateColumnTypes, type TableFile, type ValidatesEntry, type WrittenMigration, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalizeDefinition, capabilityExpression, castParts, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, computeDefinitionHash, convertV1DefinitionToCanonical, createOrmMigrationExport, declaredCapabilityKeys, diffCommand, diffStatements, emptyJournal, emptySnapshot, extractNamedParams, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, identifierSchema, importSpecSchema, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, migrationName, namespaceConfigSchema, namespaceSchema, normalizeSnapshot, ormMigrationExportSchema, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, predicateOperands, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, rewriteSyncedSourceRelationsInViewQuery, roleExpression, securityStatements, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, tableFileSchema, tableReferenceSchema, typesInterfaceName, validateViewCatalogStatement, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
|
1882
|
+
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, type ActionDefinition, CAPABILITIES_CLAIM_KEY, CLAIMS_SETTING, COLUMN_TYPES, COMPARE_OPS, CanonicalDefinition, type ColumnDefault, type ColumnDefinition, type ColumnType, type CommittedChainEntry, type CommittedMigration, type CompareOp, type CompilePredIrToSqlOptions, type CompiledStatement, type DefinitionFile, type DefinitionSource, type DestructiveStatement, type DiffOptions, type DrizzleEntities, IMPORT_CONFLICT_MODES, type ImportConflictMode, type ImportPlan, type ImportPlanResult, type ImportSpec, type IndexDefinition, type JournalEntry, type LinkDefinition, type LoadedNamespace, MIGRATIONS_DIRNAME, type MigrationJournal, type MigrationWorkspace, type NamespaceCapabilities, type NamespaceConfig, type NamespaceDefinition, type NamespaceSnapshot, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, type Operand, OrmDefinitionError, type OrmMigrationExport, type ParsedPredicate, type PlannedMigration, PredIr, type Predicate, type PredicateColumnTypes, PredicateParseError, ROLES_CLAIM_KEY, type RebaseEntry, type RebaseEntryInput, type RebaseNoopOptions, STATEMENT_KINDS, SYNCED_VIEW_EXECUTION_OWNER_ROLE, type StatementKind, type SyncedBacking, type SyncedColumnType, type SyncedPredicateColumnTypes, type TableFile, TableMetaIr, type ValidatesEntry, type WrittenMigration, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalizeDefinition, capabilityExpression, castParts, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, computeDefinitionHash, convertV1DefinitionToCanonical, createOrmMigrationExport, declaredCapabilityKeys, diffCommand, diffStatements, emptyJournal, emptySnapshot, extractNamedParams, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, identifierSchema, importSpecSchema, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, migrationName, namespaceConfigSchema, namespaceSchema, normalizeSnapshot, ormMigrationExportSchema, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, predicateOperands, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, rewriteSyncedSourceRelationsInViewQuery, roleExpression, securityStatements, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, tableFileSchema, tableReferenceSchema, typesInterfaceName, validateViewCatalogStatement, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { CANONICAL_FORMAT, CanonicalColumn, CanonicalEnum, CanonicalLink, Canoni
|
|
|
5
5
|
import { CustomRolesBlock } from '@sequenceholdings/custom-roles-manifest';
|
|
6
6
|
export { CustomRolesBlock, capabilityPinsSchema, customRolesBlockSchema, customRolesDeclared, parseCapabilityPin, validateCapabilityPins } from '@sequenceholdings/custom-roles-manifest';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { PredIr } from './ir.js';
|
|
9
|
-
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, CellSelectionIr, ClaimKey, CmpOp, CompiledArtifact, CompiledOperation, DATE_BUCKETS, DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, ExternalPolicyClaimKey, GUARDED_IR_VERSION, GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, InputRefKind, IrVersionError, LEGACY_IR_VERSION, LimitIr, OrderIr, PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, ResolvedMetaIr, ResolvedSourceIr, RootIr, SQL_IR_VERSION, SelectionIr,
|
|
8
|
+
import { PredIr, TableMetaIr } from './ir.js';
|
|
9
|
+
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, CellSelectionIr, ClaimKey, CmpOp, CompiledArtifact, CompiledOperation, DATE_BUCKETS, DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, ExternalPolicyClaimKey, GUARDED_IR_VERSION, GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, InputRefKind, IrVersionError, LEGACY_IR_VERSION, LimitIr, OrderIr, PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, ResolvedMetaIr, ResolvedSourceIr, RootIr, SERVICE_PRINCIPAL_IR_VERSION, SQL_IR_VERSION, SelectionIr, ValueIr, VariableDefaultIr, VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, isExternalPolicyClaimKey, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, usesServicePrincipal, valueIrSchema, variableDefaultIrSchema, variableIrSchema } from './ir.js';
|
|
10
10
|
export { e as CAPABILITY_KEY_PATTERN, C as CELLS_FIELD, a as CELL_PARTS, f as CELL_PART_SUFFIX, g as CLAIM_KEY_PATTERN, h as COLUMN_IDENTIFIER_PATTERN, i as CONSUMER_ROLE_SUFFIX, b as CellPart, D as DEFINITION_FILE_EXTENSIONS, H as HASH_DOMAIN, I as IDENTIFIER_PATTERN, M as MATERIALIZE_ACTOR, j as MATERIALIZE_CLAIMS_JSON, k as MAX_DEFINITION_FILE_BYTES, l as MAX_GENERATED_SDL_BYTES, m as MAX_IDENTIFIER_LENGTH, n as MAX_PERSISTED_READ_ROWS, o as MAX_TRACKED_COLUMN_NAME, p as NAMESPACE_CONFIG_FILENAMES, N as NAMESPACE_PATTERN, O as ORM_DATA_TOKEN_HEADER, q as ORM_REGISTRATION_MAX_BYTES, r as ORM_SCHEMA_PREFIX, d as ORM_SERVICE_DATA_TOKEN_HEADER, Q as QUALIFIED_TABLE_PATTERN, R as RESERVED_COLUMN_NAMES, s as RESERVED_TABLE_NAMES, S as SYNCED_SOURCE_PATTERN, c as cellColumnName, t as consumerRoleName, u as materializeLockKey, v as materializedRefreshFunctionName, w as ormSchemaName } from './constants-Dou1RkTo.js';
|
|
11
11
|
import { generateDrizzleJson } from 'drizzle-kit/api';
|
|
12
12
|
import { PgTableWithColumns } from 'drizzle-orm/pg-core';
|
|
@@ -592,11 +592,13 @@ interface SyncedBacking {
|
|
|
592
592
|
* SELECT before CREATE VIEW, or preserve a separately verified publisher grant.
|
|
593
593
|
*/
|
|
594
594
|
declare const SYNCED_VIEW_EXECUTION_OWNER_ROLE = "orm_exec";
|
|
595
|
-
declare function syncedViewStatements({ definition, backings, readPolicyIrByTable, columnNamesByTable, columnTypesByTable, executionOwnerRole, backingPrivileges, viewPrivileges, statementClaimChecks, }: {
|
|
595
|
+
declare function syncedViewStatements({ definition, backings, readPolicyIrByTable, policyTables, columnNamesByTable, columnTypesByTable, executionOwnerRole, backingPrivileges, viewPrivileges, statementClaimChecks, }: {
|
|
596
596
|
definition: NamespaceDefinition;
|
|
597
597
|
backings: readonly SyncedBacking[];
|
|
598
598
|
/** v2 compiled read policies (preserves capability/role variants). */
|
|
599
599
|
readPolicyIrByTable?: ReadonlyMap<string, PredIr>;
|
|
600
|
+
/** Shared compiler metadata, including qualified imported targets and platform users. */
|
|
601
|
+
policyTables?: Readonly<Record<string, TableMetaIr>>;
|
|
600
602
|
/** Logical column name → physical backing column name per synced table. */
|
|
601
603
|
columnNamesByTable?: ReadonlyMap<string, Readonly<Record<string, string>>>;
|
|
602
604
|
/**
|
|
@@ -1877,4 +1879,4 @@ declare function planTableImport({ definition, spec, after, }: {
|
|
|
1877
1879
|
after?: string;
|
|
1878
1880
|
}): ImportPlanResult;
|
|
1879
1881
|
|
|
1880
|
-
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, type ActionDefinition, CAPABILITIES_CLAIM_KEY, CLAIMS_SETTING, COLUMN_TYPES, COMPARE_OPS, CanonicalDefinition, type ColumnDefault, type ColumnDefinition, type ColumnType, type CommittedChainEntry, type CommittedMigration, type CompareOp, type CompilePredIrToSqlOptions, type CompiledStatement, type DefinitionFile, type DefinitionSource, type DestructiveStatement, type DiffOptions, type DrizzleEntities, IMPORT_CONFLICT_MODES, type ImportConflictMode, type ImportPlan, type ImportPlanResult, type ImportSpec, type IndexDefinition, type JournalEntry, type LinkDefinition, type LoadedNamespace, MIGRATIONS_DIRNAME, type MigrationJournal, type MigrationWorkspace, type NamespaceCapabilities, type NamespaceConfig, type NamespaceDefinition, type NamespaceSnapshot, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, type Operand, OrmDefinitionError, type OrmMigrationExport, type ParsedPredicate, type PlannedMigration, PredIr, type Predicate, type PredicateColumnTypes, PredicateParseError, ROLES_CLAIM_KEY, type RebaseEntry, type RebaseEntryInput, type RebaseNoopOptions, STATEMENT_KINDS, SYNCED_VIEW_EXECUTION_OWNER_ROLE, type StatementKind, type SyncedBacking, type SyncedColumnType, type SyncedPredicateColumnTypes, type TableFile, type ValidatesEntry, type WrittenMigration, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalizeDefinition, capabilityExpression, castParts, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, computeDefinitionHash, convertV1DefinitionToCanonical, createOrmMigrationExport, declaredCapabilityKeys, diffCommand, diffStatements, emptyJournal, emptySnapshot, extractNamedParams, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, identifierSchema, importSpecSchema, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, migrationName, namespaceConfigSchema, namespaceSchema, normalizeSnapshot, ormMigrationExportSchema, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, predicateOperands, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, rewriteSyncedSourceRelationsInViewQuery, roleExpression, securityStatements, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, tableFileSchema, tableReferenceSchema, typesInterfaceName, validateViewCatalogStatement, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
|
1882
|
+
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, type ActionDefinition, CAPABILITIES_CLAIM_KEY, CLAIMS_SETTING, COLUMN_TYPES, COMPARE_OPS, CanonicalDefinition, type ColumnDefault, type ColumnDefinition, type ColumnType, type CommittedChainEntry, type CommittedMigration, type CompareOp, type CompilePredIrToSqlOptions, type CompiledStatement, type DefinitionFile, type DefinitionSource, type DestructiveStatement, type DiffOptions, type DrizzleEntities, IMPORT_CONFLICT_MODES, type ImportConflictMode, type ImportPlan, type ImportPlanResult, type ImportSpec, type IndexDefinition, type JournalEntry, type LinkDefinition, type LoadedNamespace, MIGRATIONS_DIRNAME, type MigrationJournal, type MigrationWorkspace, type NamespaceCapabilities, type NamespaceConfig, type NamespaceDefinition, type NamespaceSnapshot, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, type Operand, OrmDefinitionError, type OrmMigrationExport, type ParsedPredicate, type PlannedMigration, PredIr, type Predicate, type PredicateColumnTypes, PredicateParseError, ROLES_CLAIM_KEY, type RebaseEntry, type RebaseEntryInput, type RebaseNoopOptions, STATEMENT_KINDS, SYNCED_VIEW_EXECUTION_OWNER_ROLE, type StatementKind, type SyncedBacking, type SyncedColumnType, type SyncedPredicateColumnTypes, type TableFile, TableMetaIr, type ValidatesEntry, type WrittenMigration, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalizeDefinition, capabilityExpression, castParts, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, computeDefinitionHash, convertV1DefinitionToCanonical, createOrmMigrationExport, declaredCapabilityKeys, diffCommand, diffStatements, emptyJournal, emptySnapshot, extractNamedParams, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, identifierSchema, importSpecSchema, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, migrationName, namespaceConfigSchema, namespaceSchema, normalizeSnapshot, ormMigrationExportSchema, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, predicateOperands, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, rewriteSyncedSourceRelationsInViewQuery, roleExpression, securityStatements, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, tableFileSchema, tableReferenceSchema, typesInterfaceName, validateViewCatalogStatement, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
package/dist/index.js
CHANGED
|
@@ -421,6 +421,7 @@ function defineSyncedTable(name2, columnsOrConfig, maybeConfig) {
|
|
|
421
421
|
if (config.primaryKey !== void 0) tableConfig.primaryKey = config.primaryKey;
|
|
422
422
|
if (config.links !== void 0) tableConfig.links = config.links;
|
|
423
423
|
if (config.policies !== void 0) tableConfig.policies = { read: config.policies.read };
|
|
424
|
+
if (config.internal === true) tableConfig.internal = true;
|
|
424
425
|
const table = {
|
|
425
426
|
kind: TABLE_BRAND,
|
|
426
427
|
tableName: name2,
|
|
@@ -2887,6 +2888,11 @@ function serializeNamespace(input) {
|
|
|
2887
2888
|
enumsByName.set(ref.name, ref);
|
|
2888
2889
|
}
|
|
2889
2890
|
const canonicalTables = tables.map((table) => buildCanonicalTable({ table, relationsByName, enumsByName }));
|
|
2891
|
+
for (const table of tables) {
|
|
2892
|
+
if (table.source !== void 0 && table.config.internal === true && config.exports && Object.hasOwn(config.exports, table.tableName)) {
|
|
2893
|
+
throw new OrmDefinitionError(`internal synced source "${table.tableName}" cannot be exported; export a permitted managed view instead`, table.file);
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2890
2896
|
const canonicalEnums = [...enumsByName.values()].map((ref) => ({
|
|
2891
2897
|
name: ref.name,
|
|
2892
2898
|
values: [...ref.values]
|
|
@@ -3220,6 +3226,9 @@ function buildCanonicalLink({
|
|
|
3220
3226
|
if (!relationsByName.has(targetName)) {
|
|
3221
3227
|
return fail3(`targets ${relationKind(target)} "${targetName}" which is not part of this namespace`);
|
|
3222
3228
|
}
|
|
3229
|
+
if (isSeqTable(target) && target.source !== void 0 && target.config.internal === true) {
|
|
3230
|
+
return fail3(`targets internal synced source "${targetName}"; expose a permitted managed view instead`);
|
|
3231
|
+
}
|
|
3223
3232
|
if (link.enforce && (!isSeqTable(relation) || !isSeqTable(target))) {
|
|
3224
3233
|
return fail3("cannot enforce a PostgreSQL foreign key involving a view");
|
|
3225
3234
|
}
|
|
@@ -4218,6 +4227,8 @@ function compilePredIrToSql(pred, options = {}) {
|
|
|
4218
4227
|
return `(NOT ${compilePredIrToSql(pred.operand, options)})`;
|
|
4219
4228
|
case "cmp":
|
|
4220
4229
|
return compileCmp(pred.op, pred.column, pred.value, options);
|
|
4230
|
+
case "servicePrincipal":
|
|
4231
|
+
return `coalesce(${claimExpression("servicePrincipal")} = 'true', false)`;
|
|
4221
4232
|
case "capability":
|
|
4222
4233
|
return `(${options.statementClaimChecks ? "SELECT " : ""}${capabilityExpression(pred.key, pred.namespace ?? options.namespace)})`;
|
|
4223
4234
|
case "role":
|
|
@@ -4445,6 +4456,39 @@ function resolveValidatesTarget(definition, entry) {
|
|
|
4445
4456
|
}
|
|
4446
4457
|
return { schema: ormSchemaName(definition.namespace), table: entry.table, key };
|
|
4447
4458
|
}
|
|
4459
|
+
|
|
4460
|
+
// src/compiler/static-policy-sql.ts
|
|
4461
|
+
function compileStaticPolicySql({ table, predicate, tables, namespace, alias, rootRelation, statementClaimChecks, onRead }) {
|
|
4462
|
+
let sequence = 0;
|
|
4463
|
+
const aliases = new Set([alias, rootRelation].filter((value) => value !== void 0));
|
|
4464
|
+
const column = (meta, qualifier, name2) => {
|
|
4465
|
+
const found = meta.columns.find((c) => c.name === name2 || c.columnName === name2);
|
|
4466
|
+
if (!found) throw new OrmDefinitionError("Static policy relationship column is unavailable");
|
|
4467
|
+
return `${quoteIdentifier(qualifier)}.${quoteIdentifier(found.columnName)}`;
|
|
4468
|
+
};
|
|
4469
|
+
const render = (meta, pred, qualifier, outerRelation) => compilePredIrToSql(pred, {
|
|
4470
|
+
alias: qualifier,
|
|
4471
|
+
namespace: meta.namespace ?? namespace,
|
|
4472
|
+
statementClaimChecks,
|
|
4473
|
+
columnNames: Object.fromEntries(meta.columns.map((c) => [c.name, c.columnName])),
|
|
4474
|
+
columnTypes: Object.fromEntries(meta.columns.map((c) => [c.name, c.type])),
|
|
4475
|
+
exists: (node) => {
|
|
4476
|
+
const link = meta.links.find((candidate) => candidate.name === node.link);
|
|
4477
|
+
const target = link?.target ? tables[link.target] : void 0;
|
|
4478
|
+
const parent = qualifier ?? outerRelation;
|
|
4479
|
+
if (!link || !target || !parent) throw new OrmDefinitionError("Static policy relationship metadata is unavailable");
|
|
4480
|
+
onRead?.(target);
|
|
4481
|
+
let child;
|
|
4482
|
+
do {
|
|
4483
|
+
child = `policy_${++sequence}`;
|
|
4484
|
+
} while (aliases.has(child));
|
|
4485
|
+
aliases.add(child);
|
|
4486
|
+
const join4 = link.kind === "toMany" ? `${column(target, child, link.on)} = ${column(meta, parent, link.references)}` : `${column(meta, parent, link.on)} = ${column(target, child, link.references)}`;
|
|
4487
|
+
return `EXISTS (SELECT 1 FROM ${quoteIdentifier(target.schema)}.${quoteIdentifier(target.table)} AS ${quoteIdentifier(child)} WHERE ${join4} AND (${render(target, node.where, child)}))`;
|
|
4488
|
+
}
|
|
4489
|
+
});
|
|
4490
|
+
return render(table, predicate, alias, rootRelation);
|
|
4491
|
+
}
|
|
4448
4492
|
var linkSchema = z.strictObject({
|
|
4449
4493
|
to: tableReferenceSchema,
|
|
4450
4494
|
on: identifierSchema,
|
|
@@ -4794,6 +4838,7 @@ function syncedViewStatements({
|
|
|
4794
4838
|
definition,
|
|
4795
4839
|
backings,
|
|
4796
4840
|
readPolicyIrByTable,
|
|
4841
|
+
policyTables,
|
|
4797
4842
|
columnNamesByTable,
|
|
4798
4843
|
columnTypesByTable,
|
|
4799
4844
|
executionOwnerRole = SYNCED_VIEW_EXECUTION_OWNER_ROLE,
|
|
@@ -4840,7 +4885,15 @@ function syncedViewStatements({
|
|
|
4840
4885
|
});
|
|
4841
4886
|
const readPolicyIr = readPolicyIrByTable?.get(table.table);
|
|
4842
4887
|
const readPolicy = table.policies?.read;
|
|
4843
|
-
const
|
|
4888
|
+
const policyTable = policyTables?.[table.table];
|
|
4889
|
+
const policyClause = readPolicyIr ? ` WHERE ${policyTable && policyTables ? compileStaticPolicySql({
|
|
4890
|
+
table: policyTable,
|
|
4891
|
+
predicate: readPolicyIr,
|
|
4892
|
+
tables: policyTables,
|
|
4893
|
+
namespace: definition.namespace,
|
|
4894
|
+
rootRelation: physical2.table,
|
|
4895
|
+
statementClaimChecks
|
|
4896
|
+
}) : compilePredIrToSql(readPolicyIr, {
|
|
4844
4897
|
namespace: definition.namespace,
|
|
4845
4898
|
statementClaimChecks,
|
|
4846
4899
|
columnTypes,
|
|
@@ -6425,6 +6478,15 @@ function correctIntrospectionQuery(query) {
|
|
|
6425
6478
|
if (!is(query, SQL)) return query;
|
|
6426
6479
|
const compiled = new PgDialect().sqlToQuery(query);
|
|
6427
6480
|
let text4 = compiled.sql;
|
|
6481
|
+
if (text4.includes("JOIN information_schema.constraint_column_usage AS ccu USING (constraint_schema, constraint_name)")) {
|
|
6482
|
+
text4 = text4.replace(/;\s*$/, "") + ` ORDER BY tc.constraint_name,
|
|
6483
|
+
(SELECT key_usage.ordinal_position FROM information_schema.key_column_usage AS key_usage
|
|
6484
|
+
WHERE key_usage.constraint_schema = tc.constraint_schema
|
|
6485
|
+
AND key_usage.constraint_name = tc.constraint_name
|
|
6486
|
+
AND key_usage.table_schema = tc.table_schema
|
|
6487
|
+
AND key_usage.table_name = tc.table_name
|
|
6488
|
+
AND key_usage.column_name = c.column_name)`;
|
|
6489
|
+
}
|
|
6428
6490
|
const indexJoin = "pg_constraint con ON con.conindid = idx.indexrelid";
|
|
6429
6491
|
if (text4.includes("AS generated_by_constraint") && text4.includes(indexJoin)) {
|
|
6430
6492
|
text4 = text4.replace(indexJoin, `${indexJoin} AND con.contype IN ('p', 'u', 'x')`);
|
|
@@ -6657,14 +6719,21 @@ function renderOrmMigrationExport(exported) {
|
|
|
6657
6719
|
var BUILTIN_SQL_READ_HASH = "sha256:a50c477c952a5e0fe68ed158a4530e4aab573c09bcbb1a8ac454dc88a39a6258";
|
|
6658
6720
|
|
|
6659
6721
|
// src/ir/index.ts
|
|
6660
|
-
var IR_VERSION =
|
|
6722
|
+
var IR_VERSION = 6;
|
|
6661
6723
|
var LEGACY_IR_VERSION = 1;
|
|
6662
6724
|
var GUARDED_IR_VERSION = 2;
|
|
6663
6725
|
var COMPOSED_IR_VERSION = 3;
|
|
6664
6726
|
var SQL_IR_VERSION = 4;
|
|
6665
6727
|
var RUNTIME_SQL_IR_VERSION = 5;
|
|
6666
|
-
var
|
|
6728
|
+
var SERVICE_PRINCIPAL_IR_VERSION = 6;
|
|
6729
|
+
var irVersionSchema = z.union([z.literal(LEGACY_IR_VERSION), z.literal(GUARDED_IR_VERSION), z.literal(COMPOSED_IR_VERSION), z.literal(SQL_IR_VERSION), z.literal(RUNTIME_SQL_IR_VERSION), z.literal(SERVICE_PRINCIPAL_IR_VERSION)]);
|
|
6667
6730
|
var operationVersionSchema = z.object({ irVersion: irVersionSchema });
|
|
6731
|
+
function usesServicePrincipal(value) {
|
|
6732
|
+
if (value === null || typeof value !== "object") return false;
|
|
6733
|
+
if (Array.isArray(value)) return value.some(usesServicePrincipal);
|
|
6734
|
+
const row = value;
|
|
6735
|
+
return row.kind === "servicePrincipal" || Object.values(row).some(usesServicePrincipal);
|
|
6736
|
+
}
|
|
6668
6737
|
function requiredArtifactIrVersion(operations) {
|
|
6669
6738
|
let required = LEGACY_IR_VERSION;
|
|
6670
6739
|
for (const operation of operations) {
|
|
@@ -6724,6 +6793,7 @@ var predIrSchema = z.lazy(
|
|
|
6724
6793
|
z.object({ kind: z.literal("capability"), key: z.string(), namespace: z.string().optional() }),
|
|
6725
6794
|
z.object({ kind: z.literal("role"), key: z.string(), namespace: z.string().optional() }),
|
|
6726
6795
|
z.object({ kind: z.literal("dynamicFilter"), slot: z.string() }),
|
|
6796
|
+
z.object({ kind: z.literal("servicePrincipal") }).strict(),
|
|
6727
6797
|
z.object({ kind: z.literal("const"), value: z.boolean() })
|
|
6728
6798
|
])
|
|
6729
6799
|
);
|
|
@@ -6949,7 +7019,7 @@ var variableIrSchema = z.object({
|
|
|
6949
7019
|
/** Absent = no default declared; see {@link variableDefaultIrSchema}. */
|
|
6950
7020
|
defaultValue: variableDefaultIrSchema.optional()
|
|
6951
7021
|
});
|
|
6952
|
-
var sqlColumnSchema = z.object({ name: z.string(), type: z.enum(["text", "boolean", "integer", "bigint", "numeric", "double", "uuid", "date", "timestamptz"]), nullable: z.boolean() });
|
|
7022
|
+
var sqlColumnSchema = z.object({ name: z.string(), type: z.enum(["text", "boolean", "integer", "bigint", "numeric", "double", "uuid", "date", "timestamptz", "jsonb"]), nullable: z.boolean() });
|
|
6953
7023
|
var compiledOperationSchema = z.object({
|
|
6954
7024
|
language: z.literal("sql").optional(),
|
|
6955
7025
|
/** Server-compiled object catalog and permission ceiling, never caller SQL. */
|
|
@@ -6987,6 +7057,9 @@ var compiledOperationSchema = z.object({
|
|
|
6987
7057
|
tableSet: z.array(z.string()).min(1),
|
|
6988
7058
|
roots: z.array(rootIrSchema)
|
|
6989
7059
|
}).superRefine((operation, ctx) => {
|
|
7060
|
+
if (operation.irVersion < SERVICE_PRINCIPAL_IR_VERSION && usesServicePrincipal(operation.roots)) {
|
|
7061
|
+
ctx.addIssue({ code: "custom", message: "servicePrincipal() requires IR v6" });
|
|
7062
|
+
}
|
|
6990
7063
|
if (operation.language === "sql") {
|
|
6991
7064
|
const validPlan = operation.sqlQuery ? !operation.sql && operation.irVersion === RUNTIME_SQL_IR_VERSION : !!operation.sql && operation.irVersion === SQL_IR_VERSION;
|
|
6992
7065
|
const builtin = operation.name === "BuiltinSqlRead" && operation.opHash === BUILTIN_SQL_READ_HASH && operation.requires === null;
|
|
@@ -7119,6 +7192,9 @@ var compiledArtifactSchema = z.object({
|
|
|
7119
7192
|
tables: z.record(z.string(), tableMetaIrSchema),
|
|
7120
7193
|
operations: z.record(z.string(), compiledOperationSchema)
|
|
7121
7194
|
}).superRefine((artifact, ctx) => {
|
|
7195
|
+
if (artifact.irVersion < SERVICE_PRINCIPAL_IR_VERSION && usesServicePrincipal(artifact)) {
|
|
7196
|
+
ctx.addIssue({ code: "custom", message: "servicePrincipal() requires IR v6" });
|
|
7197
|
+
}
|
|
7122
7198
|
if (Object.keys(artifact.dependencies ?? {}).length > 0 && artifact.irVersion < COMPOSED_IR_VERSION) {
|
|
7123
7199
|
ctx.addIssue({ code: "custom", path: ["irVersion"], message: "cross-namespace dependencies require IR v3" });
|
|
7124
7200
|
}
|
|
@@ -8361,6 +8437,6 @@ function resumeArguments({
|
|
|
8361
8437
|
return [literal2.sql];
|
|
8362
8438
|
}
|
|
8363
8439
|
|
|
8364
|
-
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, CANONICAL_FORMAT, CAPABILITIES_CLAIM_KEY, CAPABILITY_KEY_PATTERN, CELLS_FIELD, CELL_PARTS, CELL_PART_SUFFIX, CLAIMS_CONTRACT, CLAIMS_SETTING, CLAIM_KEY_PATTERN, CMP_OPS, COLUMN_BRAND, COLUMN_DEFAULT_FNS, COLUMN_IDENTIFIER_PATTERN, COLUMN_TYPES2 as COLUMN_TYPES, COMPARE_OPS, COMPOSED_IR_VERSION, CONSUMER_ROLE_SUFFIX, ColumnBuilder, DATE_BUCKETS, DEFINITION_FILE_EXTENSIONS, ENUM_BRAND, EXTERNAL_POLICY_CLAIM_KEYS, GUARDED_IR_VERSION, HASH_DOMAIN, IDENTIFIER_PATTERN, IDENTIFIER_RE, IMPORT_CONFLICT_MODES, INPUT_REF_KINDS, IR_VERSION, IrVersionError, LEGACY_IR_VERSION, LINK_BRAND, MATERIALIZE_ACTOR, MATERIALIZE_CLAIMS_JSON, MAX_DEFINITION_FILE_BYTES, MAX_GENERATED_SDL_BYTES, MAX_IDENTIFIER_LENGTH, MAX_PERSISTED_READ_ROWS, MAX_TRACKED_COLUMN_NAME, MIGRATIONS_DIRNAME, NAMESPACE_CONFIG_BRAND, NAMESPACE_CONFIG_FILE, NAMESPACE_CONFIG_FILENAMES, NAMESPACE_PATTERN, ORM_DATA_TOKEN_HEADER, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, ORM_REGISTRATION_MAX_BYTES, ORM_SCHEMA_PREFIX, ORM_SERVICE_DATA_TOKEN_HEADER, ORM_TO_PIPELINE_TYPE, OrmDefinitionError, PredicateParseError, QUALIFIED_TABLE_PATTERN, RESERVED_COLUMN_NAMES, RESERVED_TABLE_NAMES, ROLES_CLAIM_KEY, RUNTIME_SQL_IR_VERSION, SCHEMA_DIR, SQL_IR_VERSION, STATEMENT_KINDS, SYNCED_CONTRACT_HASH_DOMAIN, SYNCED_SOURCE_PATTERN, SYNCED_VIEW_EXECUTION_OWNER_ROLE, TABLE_BRAND, VIEW_BRAND, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, activeAuthoringContext, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, beginAuthoringContext, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalActionSchema, canonicalColumnSchema, canonicalDefinitionSchema, canonicalEnumSchema, canonicalIndexSchema, canonicalLinkSchema, canonicalPoliciesSchema, canonicalRelations, canonicalTableSchema, canonicalViewSchema, canonicalizeDefinition, capabilityExpression, castParts, cellColumnName, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema2 as columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, compiledArtifactSchema, compiledOperationSchema, computeCanonicalHash, computeDefinitionHash, computeSyncedContractHash, consumerRoleName, convertV1DefinitionToCanonical, createOrmMigrationExport, custom, declaredCapabilityKeys, defineEnum, defineNamespace, defineOperation, defineResolvedTable, defineSyncedTable, defineTable, defineView, deriveColumnName, diffCommand, diffStatements, emptyJournal, emptySnapshot, endAuthoringContext, etlSource, extractNamedParams, extractOrmSyncedTableContract, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, highest, identifierSchema, importSpecSchema, indexByHash, isColumnBuilder, isEnumRef, isExternalPolicyClaimKey, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, isSeqLink, isSeqNamespaceConfig, isSeqTable, isSeqView, latest, limitIrSchema, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, loadNamespaceFromDir, lowest, managedFn, manualSource, materializeLockKey, materializedRefreshFunctionName, migrationName, namespaceConfigSchema, namespaceSchema, nonNullFirst, normalizeCanonical, normalizeIr, normalizeSnapshot, objectRef, ontologyContractSchema, orderIrSchema, ormMigrationExportSchema, ormSchemaName, overlayWinsUnion, overrideRowMutation, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, policyExpressionSchema, policyVariantSchema, predIrSchema, predicateOperands, prefetchPlanIrSchema, prefetchSource, priority, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readOntologyContract, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, revertOverlayMutation, rewriteSyncedSourceRelationsInViewQuery, roleExpression, rootIrSchema, securityStatements, selectionIrSchema, serializeNamespace, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedContractSurface, syncedTables, syncedViewDropStatements, syncedViewStatements, t, tableFileSchema, tableMetaIrSchema, tableReferenceSchema, toMany, toOne, toPlatformUser, typesInterfaceName, validateNamespaceCatalog, validateViewCatalogStatement, valueIrSchema, variableDefaultIrSchema, variableIrSchema, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
|
8440
|
+
export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, CANONICAL_FORMAT, CAPABILITIES_CLAIM_KEY, CAPABILITY_KEY_PATTERN, CELLS_FIELD, CELL_PARTS, CELL_PART_SUFFIX, CLAIMS_CONTRACT, CLAIMS_SETTING, CLAIM_KEY_PATTERN, CMP_OPS, COLUMN_BRAND, COLUMN_DEFAULT_FNS, COLUMN_IDENTIFIER_PATTERN, COLUMN_TYPES2 as COLUMN_TYPES, COMPARE_OPS, COMPOSED_IR_VERSION, CONSUMER_ROLE_SUFFIX, ColumnBuilder, DATE_BUCKETS, DEFINITION_FILE_EXTENSIONS, ENUM_BRAND, EXTERNAL_POLICY_CLAIM_KEYS, GUARDED_IR_VERSION, HASH_DOMAIN, IDENTIFIER_PATTERN, IDENTIFIER_RE, IMPORT_CONFLICT_MODES, INPUT_REF_KINDS, IR_VERSION, IrVersionError, LEGACY_IR_VERSION, LINK_BRAND, MATERIALIZE_ACTOR, MATERIALIZE_CLAIMS_JSON, MAX_DEFINITION_FILE_BYTES, MAX_GENERATED_SDL_BYTES, MAX_IDENTIFIER_LENGTH, MAX_PERSISTED_READ_ROWS, MAX_TRACKED_COLUMN_NAME, MIGRATIONS_DIRNAME, NAMESPACE_CONFIG_BRAND, NAMESPACE_CONFIG_FILE, NAMESPACE_CONFIG_FILENAMES, NAMESPACE_PATTERN, ORM_DATA_TOKEN_HEADER, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, ORM_REGISTRATION_MAX_BYTES, ORM_SCHEMA_PREFIX, ORM_SERVICE_DATA_TOKEN_HEADER, ORM_TO_PIPELINE_TYPE, OrmDefinitionError, PredicateParseError, QUALIFIED_TABLE_PATTERN, RESERVED_COLUMN_NAMES, RESERVED_TABLE_NAMES, ROLES_CLAIM_KEY, RUNTIME_SQL_IR_VERSION, SCHEMA_DIR, SERVICE_PRINCIPAL_IR_VERSION, SQL_IR_VERSION, STATEMENT_KINDS, SYNCED_CONTRACT_HASH_DOMAIN, SYNCED_SOURCE_PATTERN, SYNCED_VIEW_EXECUTION_OWNER_ROLE, TABLE_BRAND, VIEW_BRAND, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, activeAuthoringContext, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, beginAuthoringContext, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalActionSchema, canonicalColumnSchema, canonicalDefinitionSchema, canonicalEnumSchema, canonicalIndexSchema, canonicalLinkSchema, canonicalPoliciesSchema, canonicalRelations, canonicalTableSchema, canonicalViewSchema, canonicalizeDefinition, capabilityExpression, castParts, cellColumnName, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema2 as columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, compiledArtifactSchema, compiledOperationSchema, computeCanonicalHash, computeDefinitionHash, computeSyncedContractHash, consumerRoleName, convertV1DefinitionToCanonical, createOrmMigrationExport, custom, declaredCapabilityKeys, defineEnum, defineNamespace, defineOperation, defineResolvedTable, defineSyncedTable, defineTable, defineView, deriveColumnName, diffCommand, diffStatements, emptyJournal, emptySnapshot, endAuthoringContext, etlSource, extractNamedParams, extractOrmSyncedTableContract, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, highest, identifierSchema, importSpecSchema, indexByHash, isColumnBuilder, isEnumRef, isExternalPolicyClaimKey, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, isSeqLink, isSeqNamespaceConfig, isSeqTable, isSeqView, latest, limitIrSchema, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, loadNamespaceFromDir, lowest, managedFn, manualSource, materializeLockKey, materializedRefreshFunctionName, migrationName, namespaceConfigSchema, namespaceSchema, nonNullFirst, normalizeCanonical, normalizeIr, normalizeSnapshot, objectRef, ontologyContractSchema, orderIrSchema, ormMigrationExportSchema, ormSchemaName, overlayWinsUnion, overrideRowMutation, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, policyExpressionSchema, policyVariantSchema, predIrSchema, predicateOperands, prefetchPlanIrSchema, prefetchSource, priority, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readOntologyContract, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, revertOverlayMutation, rewriteSyncedSourceRelationsInViewQuery, roleExpression, rootIrSchema, securityStatements, selectionIrSchema, serializeNamespace, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedContractSurface, syncedTables, syncedViewDropStatements, syncedViewStatements, t, tableFileSchema, tableMetaIrSchema, tableReferenceSchema, toMany, toOne, toPlatformUser, typesInterfaceName, usesServicePrincipal, validateNamespaceCatalog, validateViewCatalogStatement, valueIrSchema, variableDefaultIrSchema, variableIrSchema, verifyRebaseIsNoop, walkPredicate, writeMigration };
|
|
8365
8441
|
//# sourceMappingURL=index.js.map
|
|
8366
8442
|
//# sourceMappingURL=index.js.map
|