@uncutsql/core 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Effect } from "effect";
1
+ import { Effect, Schema } from "effect";
2
2
  /** Serializable semantic values. Dialects normalize their details before comparison. */
3
3
  export type SchemaValue = null | boolean | number | string | readonly SchemaValue[] | {
4
4
  readonly [key: string]: SchemaValue;
@@ -54,12 +54,30 @@ export interface DatabaseTrigger {
54
54
  /** Normalized identity of the table or view that owns this trigger. */
55
55
  readonly target: TableIdentity;
56
56
  }
57
+ /** A container of named objects one level below an optional catalog. Keys are already normalized by the dialect. */
58
+ export interface NamespaceIdentity {
59
+ readonly catalog?: string;
60
+ readonly name: string;
61
+ }
62
+ export interface DatabaseNamespace {
63
+ readonly identity: NamespaceIdentity;
64
+ readonly name: string;
65
+ /** Namespaced keys retain vendor-specific features without teaching core their meaning. */
66
+ readonly options: {
67
+ readonly [key: string]: SchemaValue;
68
+ };
69
+ }
57
70
  export interface DatabaseSchema {
71
+ /** Absent means namespaces are not declared and no namespace check runs. */
72
+ readonly namespaces?: readonly DatabaseNamespace[];
58
73
  readonly tables: readonly DatabaseTable[];
59
74
  readonly triggers?: readonly DatabaseTrigger[];
60
75
  readonly views?: readonly DatabaseView[];
61
76
  }
62
77
  export declare const tableKey: (table: TableIdentity) => string;
78
+ export declare const namespaceKey: (namespace: NamespaceIdentity) => string;
79
+ /** The namespace that contains an object, or undefined when its identity has no schema level. */
80
+ export declare const namespaceOf: (identity: TableIdentity) => NamespaceIdentity | undefined;
63
81
  /** Object property insertion order is not semantic; array order is retained. */
64
82
  export declare const schemaValueEqual: (before: SchemaValue, after: SchemaValue) => boolean;
65
83
  export interface DiffDiagnostic {
@@ -158,13 +176,22 @@ export type TriggerChange = {
158
176
  readonly after: DatabaseTrigger;
159
177
  readonly before: DatabaseTrigger;
160
178
  };
179
+ /** A namespace change lists the namespace only; objects inside it keep their own changes. */
180
+ export type NamespaceChange = {
181
+ readonly _tag: "NamespaceAdded" | "NamespaceRemoved";
182
+ readonly namespace: DatabaseNamespace;
183
+ } | {
184
+ readonly _tag: "NamespaceChanged";
185
+ readonly after: DatabaseNamespace;
186
+ readonly before: DatabaseNamespace;
187
+ };
161
188
  export interface DropGuard {
162
189
  /** Source column name. Omit to require an empty table. */
163
190
  readonly column?: string;
164
191
  readonly table: TableIdentity;
165
192
  }
166
193
  export interface DatabaseDiff {
167
- readonly changes: readonly (TableChange | ViewChange | TriggerChange)[];
194
+ readonly changes: readonly (NamespaceChange | TableChange | ViewChange | TriggerChange)[];
168
195
  readonly dropGuards?: readonly DropGuard[];
169
196
  }
170
197
  export declare const validateDatabase: (database: DatabaseSchema, side: DiffDiagnostic["side"]) => readonly DiffDiagnostic[];
@@ -178,6 +205,13 @@ interface TableProcedure {
178
205
  }
179
206
  /** Logical procedures, not execution order or physical operations such as a rebuild. */
180
207
  export type MigrationProcedure = {
208
+ readonly _tag: "CreateNamespace" | "DropNamespace";
209
+ readonly namespace: DatabaseNamespace;
210
+ } | {
211
+ readonly _tag: "AlterNamespace";
212
+ readonly after: DatabaseNamespace;
213
+ readonly before: DatabaseNamespace;
214
+ } | {
181
215
  readonly _tag: "CreateTrigger" | "DropTrigger";
182
216
  readonly trigger: DatabaseTrigger;
183
217
  } | {
@@ -210,15 +244,180 @@ export interface DatabaseMigration {
210
244
  export declare const planDatabaseMigration: (diff: DatabaseDiff) => DatabaseMigration;
211
245
  /** Reverse reviewed intent, retaining rename pairs and guarding newly added data. */
212
246
  export declare const planDownMigration: (up: DatabaseMigration) => DatabaseMigration | string;
247
+ /** A normalized column key scoped to its qualified relation. */
248
+ interface ColumnIdentity {
249
+ readonly key: DatabaseColumn["key"];
250
+ readonly table: TableIdentity;
251
+ }
252
+ /** A condition describes a dependency on database behavior, such as a default expression's result. */
253
+ type SemanticFact<T> = {
254
+ readonly status: "known";
255
+ readonly value: T;
256
+ } | {
257
+ readonly status: "unknown";
258
+ } | {
259
+ readonly reason: string;
260
+ readonly status: "conditional";
261
+ };
262
+ /** A nested value: its non-null domain and whether it may be NULL. */
263
+ interface SemanticElement {
264
+ readonly domain: SemanticValueDomain;
265
+ /** False only when the dialect proves that the element is never NULL. */
266
+ readonly nullable: boolean;
267
+ }
268
+ /** A struct field. Names are unique within a struct, compared exactly. */
269
+ interface SemanticStructField extends SemanticElement {
270
+ /** Original field name, as the database returns it. */
271
+ readonly name: string;
272
+ }
273
+ /**
274
+ * Dialect-neutral, non-null database values. Numeric bounds are inclusive and exact decimal strings.
275
+ * Nested domains are equal when they are structurally equal, field order included.
276
+ */
277
+ type SemanticValueDomain = {
278
+ readonly kind: "decimal" | "integer" | "real";
279
+ readonly maximum?: string;
280
+ readonly minimum?: string;
281
+ readonly precision?: {
282
+ readonly digits: number;
283
+ readonly radix: 2 | 10;
284
+ /** Decimal scale, when known. */
285
+ readonly scale?: number;
286
+ };
287
+ } | {
288
+ readonly kind: "binary" | "boolean" | "date" | "json" | "opaque" | "text" | "time" | "timestamp";
289
+ } | {
290
+ /** An ordered sequence. */
291
+ readonly element: SemanticElement;
292
+ readonly kind: "list";
293
+ /** Exact number of elements, when the type fixes it. A positive integer. */
294
+ readonly length?: number;
295
+ } | {
296
+ /** Fields in declaration order, always present (a NULL field holds NULL). At least one. */
297
+ readonly fields: readonly SemanticStructField[];
298
+ readonly kind: "struct";
299
+ } | {
300
+ /** A dictionary with unique keys. A map key is never NULL. */
301
+ readonly key: SemanticValueDomain;
302
+ readonly kind: "map";
303
+ readonly value: SemanticElement;
304
+ };
305
+ interface SemanticColumnType {
306
+ /** A known null means there is no declared expectation. Opaque describes an unclassified type. */
307
+ readonly declared: SemanticFact<SemanticValueDomain | null>;
308
+ /** Whether the declared expectation constrains stored values, after any coercion. */
309
+ readonly enforcement: SemanticFact<"advisory" | "enforced" | "unconstrained">;
310
+ /** Exhaustive non-null database value domains when known. Read nullability is separate. */
311
+ readonly possibleValues: SemanticFact<readonly SemanticValueDomain[]>;
312
+ }
313
+ interface SemanticWritePolicy {
314
+ /** Whether an explicit value can be written to the column. */
315
+ readonly allowed: SemanticFact<boolean>;
316
+ /** Effect of supplying SQL NULL as an explicit value. */
317
+ readonly explicitNull: SemanticFact<"accepted" | "generates-value" | "rejected">;
318
+ }
319
+ interface SemanticInsertPolicy extends SemanticWritePolicy {
320
+ /** Whether the caller may leave out the column. */
321
+ readonly omission: SemanticFact<"allowed" | "required">;
322
+ }
323
+ interface SemanticColumn {
324
+ /** A known null means there is no computed expression. */
325
+ readonly computed: SemanticFact<{
326
+ readonly storage: SemanticFact<"stored" | "virtual">;
327
+ } | null>;
328
+ /** The kind of declared default, independently of whether omission succeeds. */
329
+ readonly default: SemanticFact<"expression" | "none" | "null">;
330
+ readonly identity: ColumnIdentity;
331
+ /** Automatic identity behavior, independently of ordinary defaults and computed expressions. */
332
+ readonly identityGeneration: SemanticFact<"always" | "by-default" | "none">;
333
+ readonly insert: SemanticInsertPolicy;
334
+ /** Original SQL column name. */
335
+ readonly name: string;
336
+ readonly readNullable: SemanticFact<boolean>;
337
+ readonly type: SemanticColumnType;
338
+ readonly update: SemanticWritePolicy;
339
+ }
340
+ interface SemanticKey {
341
+ /** Normalized column keys in key order, scoped to the containing relation. */
342
+ readonly columns: readonly DatabaseColumn["key"][];
343
+ readonly kind: "primary" | "unique";
344
+ }
345
+ type SemanticForeignKeyTarget = {
346
+ readonly columns: readonly DatabaseColumn["key"][];
347
+ readonly status: "resolved";
348
+ readonly table: TableIdentity;
349
+ } | {
350
+ /** Original referenced column names when the declaration specifies them. */
351
+ readonly columnNames?: readonly string[];
352
+ readonly name: string;
353
+ readonly status: "unresolved";
354
+ /** Intended normalized target identity with qualification supplied by the resolver. */
355
+ readonly table: TableIdentity;
356
+ };
357
+ interface SemanticForeignKey {
358
+ /** Local column keys in declaration order, paired by position with resolved target columns. */
359
+ readonly columns: readonly DatabaseColumn["key"][];
360
+ readonly target: SemanticForeignKeyTarget;
361
+ }
362
+ interface SemanticRelationIdentity {
363
+ readonly identity: TableIdentity;
364
+ readonly kind: "table" | "view";
365
+ /** Original SQL relation name. */
366
+ readonly name: string;
367
+ }
368
+ type SemanticRelation = (SemanticRelationIdentity & {
369
+ readonly columns: readonly SemanticColumn[];
370
+ readonly foreignKeys: readonly SemanticForeignKey[];
371
+ readonly keys: readonly SemanticKey[];
372
+ readonly status: "resolved";
373
+ }) | (SemanticRelationIdentity & {
374
+ /** Declared SQL column names, if available. */
375
+ readonly columnNames?: readonly string[];
376
+ readonly status: "unresolved" | "unsupported";
377
+ });
378
+ /** Derived from the structural schema for consumers of database semantics. */
379
+ interface SemanticDatabaseSchema {
380
+ readonly relations: readonly SemanticRelation[];
381
+ }
382
+ type SemanticDiagnosticSubject = {
383
+ readonly identity: ColumnIdentity;
384
+ readonly kind: "column";
385
+ } | {
386
+ readonly identity: TableIdentity;
387
+ readonly kind: "relation";
388
+ };
389
+ interface SemanticDiagnostic {
390
+ /** Stable diagnostic identifier owned by the producer. */
391
+ readonly code: string;
392
+ /** Explain the issue and how the caller can address it. */
393
+ readonly message: string;
394
+ readonly severity: "error" | "warning";
395
+ readonly subjects: readonly SemanticDiagnosticSubject[];
396
+ }
397
+ /** Successful resolution can carry diagnostics alongside usable facts. */
398
+ interface SemanticSchemaResolution {
399
+ readonly diagnostics: readonly SemanticDiagnostic[];
400
+ readonly schema: SemanticDatabaseSchema;
401
+ }
213
402
  /** Dialect capabilities. The caller owns comparison and logical planning. */
214
- interface Dialect<Ast, PhysicalPlan, E extends Error = Error, R = never> {
403
+ interface Dialect<Ast, PhysicalPlan, E extends Error = Error, R = never, SemanticError extends Error = E, SemanticServices = R> {
215
404
  /** Combine independently parsed schema documents in source order. */
216
405
  readonly combineSchemas?: (parts: readonly Ast[]) => Ast;
406
+ /** The model of an empty database, used as the migration baseline before the first migration. Defaults to `{ tables: [] }`. */
407
+ readonly emptyDatabaseSchema?: DatabaseSchema;
217
408
  readonly encodeMigration: (plan: PhysicalPlan) => Effect.Effect<string, E, R>;
218
409
  readonly format: (ast: Ast) => Effect.Effect<string, E, R>;
219
410
  readonly lowerMigration: (migration: DatabaseMigration, before: DatabaseSchema, after: DatabaseSchema) => Effect.Effect<PhysicalPlan, E, R>;
220
411
  readonly name: string;
221
412
  readonly parse: (source: string) => Effect.Effect<Ast, E, R>;
413
+ /** Derive semantic facts from a structural schema, including decoded snapshots. */
414
+ readonly resolveSemanticSchema?: (schema: DatabaseSchema) => Effect.Effect<SemanticSchemaResolution, SemanticError, SemanticServices>;
415
+ /**
416
+ * When `true`, `lowerMigration` turns every `DatabaseMigration.dropGuards` entry into a check
417
+ * that runs before any other statement of the migration. If the table has a row, or the column
418
+ * has a non-NULL value, the check fails and the migration is not applied. When absent or
419
+ * `false`, a migration with guards is refused before lowering.
420
+ */
222
421
  readonly supportsDropGuards?: boolean;
223
422
  readonly toDatabaseSchema: (ast: Ast, side?: DiffDiagnostic["side"]) => Effect.Effect<DatabaseSchema, E, R>;
224
423
  }
@@ -241,6 +440,7 @@ interface MigrationSource {
241
440
  };
242
441
  readonly id: number;
243
442
  readonly sha256: string;
443
+ /** The whole migration file, including the CLI's `-- ` header lines. */
244
444
  readonly sql: string;
245
445
  }
246
446
  interface MigrationCheckpoint {
@@ -263,6 +463,7 @@ interface MigrationExecutor<E extends Error = Error, R = never> {
263
463
  readonly checkpoint: (target: string) => Effect.Effect<MigrationCheckpoint, E, R>;
264
464
  /** Replay a verified prefix on an empty database and render its state as one SQL migration. */
265
465
  readonly compact?: (migrations: readonly MigrationSource[]) => Effect.Effect<string, E, R>;
466
+ /** Equal to the `Dialect.name` that produced the lock. Core and the CLI compare it only for equality. */
266
467
  readonly dialect: string;
267
468
  /** Schema-only SQL grouped by owning relation, in declaration order. */
268
469
  readonly extract?: (target: string) => Effect.Effect<readonly {
@@ -272,6 +473,21 @@ interface MigrationExecutor<E extends Error = Error, R = never> {
272
473
  /** Undo only the most recently applied migration. */
273
474
  readonly rollback?: MigrationExecutor<E, R>["apply"];
274
475
  }
476
+ /** The positions a run of migration files covers. */
477
+ interface MigrationRun {
478
+ /** A root baseline: the first file, when it carries `baselineCheckpoint`. */
479
+ readonly baseline?: MigrationSource;
480
+ readonly direction: "up" | "down";
481
+ readonly lastId: number;
482
+ /** The ID before the first file. */
483
+ readonly offset: number;
484
+ }
485
+ /** The run, or `undefined` when IDs, baseline, checkpoint, SQL or checksums are invalid. */
486
+ export declare const migrationRun: (direction: "up" | "down", migrations: readonly MigrationSource[], checkpoint: MigrationCheckpoint | undefined, sha256: (sql: string) => string) => MigrationRun | undefined;
487
+ /** Whether the history tip read under the write transaction is a matching prefix of the run. */
488
+ export declare const continuesRun: (run: MigrationRun, migrations: readonly MigrationSource[], checkpoint: MigrationCheckpoint | undefined, tip: MigrationCheckpoint) => boolean;
489
+ /** The file to execute after the tip, or `undefined` when the run is complete. */
490
+ export declare const nextMigration: (run: MigrationRun, migrations: readonly MigrationSource[], tipId: number) => MigrationSource | undefined;
275
491
  export interface MigrationDecision {
276
492
  /** Added table names or column keys, not guesses: no candidate is selected automatically. */
277
493
  readonly candidates: readonly string[];
@@ -313,10 +529,157 @@ export declare const mergeMigrationDecisions: (fresh: MigrationDecisions, previo
313
529
  after: DatabaseSchema;
314
530
  before: DatabaseSchema;
315
531
  version: 1;
316
- }, MigrationDecisionError | SchemaDiffError | SchemaModelError, never>;
532
+ }, SchemaDiffError | SchemaModelError | MigrationDecisionError, never>;
317
533
  /** Validate untrusted JSON and resolve intent against fresh comparison results. */
318
534
  export declare const resolveMigrationDecisions: (before: DatabaseSchema, after: DatabaseSchema, supplied?: unknown) => Effect.Effect<{
319
535
  decisions: MigrationDecisions;
320
536
  diff: DatabaseDiff;
321
- }, MigrationDecisionError | SchemaDiffError, never>;
322
- export type { Dialect, ExecutionResult, MigrationCheckpoint, MigrationExecutor, MigrationSource };
537
+ }, SchemaDiffError | MigrationDecisionError, never>;
538
+ /** Zero-based UTF-16 offsets into the analyzed text; `end` is exclusive. */
539
+ export interface SourceSpan {
540
+ readonly end: number;
541
+ readonly start: number;
542
+ }
543
+ export type SchemaSymbolKind = "column" | "index" | "namespace" | "table" | "trigger" | "view";
544
+ export interface SchemaSymbol {
545
+ readonly children: readonly SchemaSymbol[];
546
+ /** Short context shown next to the name, such as the written namespace. */
547
+ readonly detail?: string;
548
+ readonly kind: SchemaSymbolKind;
549
+ readonly name: string;
550
+ readonly range: SourceSpan;
551
+ readonly selection: SourceSpan;
552
+ }
553
+ export interface SchemaDiagnostic extends SourceSpan {
554
+ readonly message: string;
555
+ }
556
+ /** A declaration that references can target. `key` is opaque and normalized by the dialect. */
557
+ export interface SchemaDeclaration {
558
+ readonly key: string;
559
+ readonly selection: SourceSpan;
560
+ }
561
+ export interface SchemaReference extends SourceSpan {
562
+ readonly key: string;
563
+ }
564
+ export interface SchemaAnalysis {
565
+ readonly declarations: readonly SchemaDeclaration[];
566
+ readonly diagnostics: readonly SchemaDiagnostic[];
567
+ readonly references: readonly SchemaReference[];
568
+ readonly symbols: readonly SchemaSymbol[];
569
+ }
570
+ export interface LanguageService {
571
+ /** Analyzes one document. Synchronous and total: it never throws, and a parse failure is a diagnostic. */
572
+ readonly analyze: (source: string) => SchemaAnalysis;
573
+ }
574
+ /** Returns the first reference whose half-open span contains `offset`. */
575
+ export declare const referenceAt: (analysis: SchemaAnalysis, offset: number) => SchemaReference | undefined;
576
+ /** Returns the selections of the declarations whose key equals the reference key, in declaration order. */
577
+ export declare const definitions: (reference: SchemaReference, analysis: SchemaAnalysis) => SourceSpan[];
578
+ /** Stable application contract identity, independent of the plugin package version. */
579
+ interface ApplicationContract {
580
+ readonly id: string;
581
+ /** Positive safe integer. */
582
+ readonly version: number;
583
+ }
584
+ interface MapperDescriptor {
585
+ readonly name: string;
586
+ readonly output: ApplicationContract;
587
+ }
588
+ interface GeneratorDescriptor {
589
+ readonly input: {
590
+ readonly id: string;
591
+ /** Explicitly supported versions of this application contract. */
592
+ readonly versions: readonly number[];
593
+ };
594
+ readonly name: string;
595
+ }
596
+ /** A diagnostic can name database relations or columns, or have no subjects. */
597
+ type CodegenDiagnostic = SemanticDiagnostic;
598
+ declare const CodegenError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
599
+ readonly _tag: "CodegenError";
600
+ } & Readonly<A>;
601
+ export declare class CodegenError extends CodegenError_base<{
602
+ readonly cause?: unknown;
603
+ readonly code: string;
604
+ readonly diagnostics?: readonly CodegenDiagnostic[];
605
+ readonly message: string;
606
+ readonly path?: string;
607
+ }> {}
608
+ interface MappingResult<Schema> {
609
+ readonly diagnostics: readonly CodegenDiagnostic[];
610
+ readonly schema: Schema;
611
+ }
612
+ export declare const generatedFileHeader = "// Generated by UncutSQL. Do not edit.";
613
+ interface GeneratedFile {
614
+ readonly content: string;
615
+ /** Slash-separated relative path under the consumer's output directory. */
616
+ readonly path: string;
617
+ }
618
+ interface GenerationResult {
619
+ readonly artifacts: readonly GeneratedFile[];
620
+ readonly diagnostics: readonly CodegenDiagnostic[];
621
+ }
622
+ interface ApplicationMapper<Input, Output, Options, E = never, R = never> {
623
+ readonly map: (schema: Input, options: Options) => Effect.Effect<MappingResult<Output>, E, R>;
624
+ }
625
+ interface Generator<Schema, Options, E = never, R = never> {
626
+ readonly generate: (schema: Schema, options: Options) => Effect.Effect<GenerationResult, E, R>;
627
+ }
628
+ /** Programmatic plugin contract. A dynamically exported mapper supplies its own services. */
629
+ interface MapperPlugin<Input, Output, Options, E = never, R = never> extends ApplicationMapper<Input, Output, Options, E, R> {
630
+ readonly decodeInput: (value: unknown) => Effect.Effect<Input, E, R>;
631
+ readonly decodeOptions: (value: unknown) => Effect.Effect<Options, E, R>;
632
+ readonly descriptor: MapperDescriptor;
633
+ }
634
+ /** Programmatic plugin contract. A dynamically exported generator supplies its own services. */
635
+ interface GeneratorPlugin<Schema, Options, E = never, R = never> extends Generator<Schema, Options, E, R> {
636
+ readonly decodeInput: (value: unknown, contract: ApplicationContract) => Effect.Effect<Schema, E, R>;
637
+ readonly decodeOptions: (value: unknown) => Effect.Effect<Options, E, R>;
638
+ readonly descriptor: GeneratorDescriptor;
639
+ }
640
+ export declare const relationIdentitySchema: Schema.Struct<{
641
+ readonly catalog: Schema.optionalKey<Schema.String>;
642
+ readonly name: Schema.String;
643
+ readonly schema: Schema.optionalKey<Schema.String>;
644
+ }>;
645
+ export declare const codegenDiagnosticSchema: Schema.Struct<{
646
+ readonly code: Schema.Trimmed;
647
+ readonly message: Schema.NonEmptyString;
648
+ readonly severity: Schema.Literals<readonly ["error", "warning"]>;
649
+ readonly subjects: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
650
+ readonly identity: Schema.Struct<{
651
+ readonly key: Schema.String;
652
+ readonly table: Schema.Struct<{
653
+ readonly catalog: Schema.optionalKey<Schema.String>;
654
+ readonly name: Schema.String;
655
+ readonly schema: Schema.optionalKey<Schema.String>;
656
+ }>;
657
+ }>;
658
+ readonly kind: Schema.Literal<"column">;
659
+ }>, Schema.Struct<{
660
+ readonly identity: Schema.Struct<{
661
+ readonly catalog: Schema.optionalKey<Schema.String>;
662
+ readonly name: Schema.String;
663
+ readonly schema: Schema.optionalKey<Schema.String>;
664
+ }>;
665
+ readonly kind: Schema.Literal<"relation">;
666
+ }>]>>;
667
+ }>;
668
+ export declare const artifactPathSchema: Schema.String;
669
+ /** Check the exact application contract ID and an explicitly accepted version. */
670
+ export declare const validateApplicationCompatibility: (output: ApplicationContract, input: GeneratorDescriptor["input"]) => Effect.Effect<ApplicationContract, CodegenError>;
671
+ /** Validate the text artifact and diagnostic envelopes before handing results to a consumer. */
672
+ export declare const decodeGenerationResult: (value: unknown) => Effect.Effect<GenerationResult, CodegenError>;
673
+ interface DynamicMapperPlugin {
674
+ readonly descriptor: MapperDescriptor;
675
+ readonly map: (schema: unknown, options: unknown) => Effect.Effect<MappingResult<unknown>, CodegenError>;
676
+ }
677
+ interface DynamicGeneratorPlugin {
678
+ readonly descriptor: GeneratorDescriptor;
679
+ readonly generate: (contract: ApplicationContract, schema: unknown, options: unknown) => Effect.Effect<GenerationResult, CodegenError>;
680
+ }
681
+ /** Validate the mapper value selected from a module by the consumer. */
682
+ export declare const decodeMapperPlugin: (value: unknown) => Effect.Effect<DynamicMapperPlugin, CodegenError>;
683
+ /** Validate the generator value selected from a module by the consumer. */
684
+ export declare const decodeGeneratorPlugin: (value: unknown) => Effect.Effect<DynamicGeneratorPlugin, CodegenError>;
685
+ export type { ApplicationContract, ApplicationMapper, CodegenDiagnostic, ColumnIdentity, Dialect, DynamicGeneratorPlugin, DynamicMapperPlugin, ExecutionResult, GeneratedFile, GenerationResult, Generator, GeneratorDescriptor, GeneratorPlugin, MapperDescriptor, MapperPlugin, MappingResult, MigrationCheckpoint, MigrationExecutor, MigrationRun, MigrationSource, SemanticColumn, SemanticColumnType, SemanticDatabaseSchema, SemanticDiagnostic, SemanticDiagnosticSubject, SemanticElement, SemanticFact, SemanticForeignKey, SemanticForeignKeyTarget, SemanticInsertPolicy, SemanticKey, SemanticRelation, SemanticSchemaResolution, SemanticStructField, SemanticValueDomain, SemanticWritePolicy };