@xylex-group/athena 1.6.0 → 1.6.2

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.
@@ -0,0 +1,338 @@
1
+ import { g as BackendType } from './types-v6UyGg-x.js';
2
+
3
+ type ModelKey = string;
4
+ type ColumnKey = string;
5
+ /**
6
+ * Runtime values that can safely be serialized into tenant-scoped headers.
7
+ */
8
+ type TenantContextValue = string | number | boolean | null | undefined;
9
+ /**
10
+ * Compile-time map of tenant context keys to outbound header names.
11
+ */
12
+ type TenantKeyMap = Record<string, string>;
13
+ /**
14
+ * Partial tenant context keyed by `TenantKeyMap`.
15
+ */
16
+ type TenantContext<TMap extends TenantKeyMap> = Partial<Record<keyof TMap, TenantContextValue>>;
17
+ /**
18
+ * Supported relationship cardinalities for model metadata and introspection snapshots.
19
+ */
20
+ type ModelRelationKind = 'one-to-one' | 'one-to-many' | 'many-to-one' | 'many-to-many';
21
+ /**
22
+ * Base metadata shape shared by typed model definitions and introspection snapshots.
23
+ * This type is intentionally row-agnostic so it can be used for generic registries.
24
+ */
25
+ interface ModelMetadataBase {
26
+ database?: string;
27
+ schema?: string;
28
+ model?: string;
29
+ tableName?: string;
30
+ primaryKey: string[];
31
+ nullable?: Partial<Record<string, boolean>>;
32
+ relations?: Record<string, ModelRelationMetadata>;
33
+ }
34
+ /**
35
+ * Strongly-typed model metadata linked to a row shape.
36
+ */
37
+ type ModelMetadata<Row> = Omit<ModelMetadataBase, 'primaryKey' | 'nullable'> & {
38
+ primaryKey: Array<Extract<keyof Row, string>>;
39
+ nullable?: Partial<Record<Extract<keyof Row, string>, boolean>>;
40
+ };
41
+ /**
42
+ * Relation metadata for model contracts and introspection snapshots.
43
+ */
44
+ interface ModelRelationMetadata {
45
+ kind: ModelRelationKind;
46
+ sourceColumns: ColumnKey[];
47
+ targetSchema: string;
48
+ targetModel: ModelKey;
49
+ targetColumns: ColumnKey[];
50
+ targetDatabase?: string;
51
+ through?: {
52
+ schema: string;
53
+ model: string;
54
+ sourceColumns: ColumnKey[];
55
+ targetColumns: ColumnKey[];
56
+ };
57
+ }
58
+ /**
59
+ * Core model definition contract used by typed registries.
60
+ */
61
+ interface ModelDef<Row, Insert = Partial<Row>, Update = Partial<Insert>, Meta extends ModelMetadataBase = ModelMetadata<Row>> {
62
+ readonly meta: Meta;
63
+ readonly __types?: {
64
+ row: Row;
65
+ insert: Insert;
66
+ update: Update;
67
+ };
68
+ }
69
+ /**
70
+ * Row-agnostic model definition used as a generic constraint.
71
+ */
72
+ type AnyModelDef = ModelDef<unknown, unknown, unknown, ModelMetadataBase>;
73
+ /**
74
+ * Schema-level model registry.
75
+ */
76
+ interface SchemaDef<Models extends Record<ModelKey, AnyModelDef>> {
77
+ readonly models: Models;
78
+ }
79
+ /**
80
+ * Database-level schema registry.
81
+ */
82
+ interface DatabaseDef<Schemas extends Record<string, SchemaDef<Record<ModelKey, AnyModelDef>>>> {
83
+ readonly schemas: Schemas;
84
+ }
85
+ /**
86
+ * Top-level registry keyed by logical database names.
87
+ */
88
+ type RegistryDef<Databases extends Record<string, DatabaseDef<Record<string, SchemaDef<Record<ModelKey, AnyModelDef>>>>>> = Databases;
89
+ /**
90
+ * Extracts row type from a model definition.
91
+ */
92
+ type RowOf<TModel extends AnyModelDef> = TModel extends ModelDef<infer TRow, unknown, unknown, ModelMetadataBase> ? TRow : never;
93
+ /**
94
+ * Extracts insert type from a model definition.
95
+ */
96
+ type InsertOf<TModel extends AnyModelDef> = TModel extends ModelDef<unknown, infer TInsert, unknown, ModelMetadataBase> ? TInsert : never;
97
+ /**
98
+ * Extracts update type from a model definition.
99
+ */
100
+ type UpdateOf<TModel extends AnyModelDef> = TModel extends ModelDef<unknown, unknown, infer TUpdate, ModelMetadataBase> ? TUpdate : never;
101
+ /**
102
+ * Resolves a model definition from a registry path.
103
+ */
104
+ type ModelAt<TRegistry extends RegistryDef<Record<string, DatabaseDef<Record<string, SchemaDef<Record<ModelKey, AnyModelDef>>>>>>, TDatabase extends keyof TRegistry & string, TSchema extends keyof TRegistry[TDatabase]['schemas'] & string, TModel extends keyof TRegistry[TDatabase]['schemas'][TSchema]['models'] & string> = TRegistry[TDatabase]['schemas'][TSchema]['models'][TModel];
105
+ /**
106
+ * Introspection-level column type families.
107
+ */
108
+ type IntrospectionTypeKind = 'scalar' | 'enum' | 'domain' | 'range' | 'multirange' | 'composite';
109
+ /**
110
+ * Introspected column metadata.
111
+ */
112
+ interface IntrospectionColumn {
113
+ name: string;
114
+ dataType: string;
115
+ udtName: string;
116
+ typeKind: IntrospectionTypeKind;
117
+ isNullable: boolean;
118
+ isPrimaryKey: boolean;
119
+ hasDefault: boolean;
120
+ isGenerated: boolean;
121
+ arrayDimensions: number;
122
+ enumValues?: string[];
123
+ }
124
+ /**
125
+ * Introspected relationship metadata.
126
+ */
127
+ interface IntrospectionRelation {
128
+ name: string;
129
+ kind: ModelRelationKind;
130
+ sourceColumns: string[];
131
+ targetSchema: string;
132
+ targetModel: string;
133
+ targetColumns: string[];
134
+ targetDatabase?: string;
135
+ through?: {
136
+ schema: string;
137
+ model: string;
138
+ sourceColumns: string[];
139
+ targetColumns: string[];
140
+ };
141
+ }
142
+ /**
143
+ * Introspected table metadata.
144
+ */
145
+ interface IntrospectionTable {
146
+ schema: string;
147
+ name: string;
148
+ columns: Record<string, IntrospectionColumn>;
149
+ primaryKey: string[];
150
+ relations: Record<string, IntrospectionRelation>;
151
+ }
152
+ /**
153
+ * Introspected schema metadata.
154
+ */
155
+ interface IntrospectionSchema {
156
+ name: string;
157
+ tables: Record<string, IntrospectionTable>;
158
+ }
159
+ /**
160
+ * Normalized output of a schema introspection pass.
161
+ */
162
+ interface IntrospectionSnapshot {
163
+ backend: BackendType;
164
+ database: string;
165
+ generatedAt: string;
166
+ schemas: Record<string, IntrospectionSchema>;
167
+ }
168
+ /**
169
+ * Options accepted by introspection providers.
170
+ */
171
+ interface IntrospectionInspectOptions {
172
+ schemas?: string[];
173
+ }
174
+ /**
175
+ * Provider contract implemented by backend-specific introspection adapters.
176
+ */
177
+ interface SchemaIntrospectionProvider {
178
+ readonly backend: BackendType;
179
+ inspect(options?: IntrospectionInspectOptions): Promise<IntrospectionSnapshot>;
180
+ }
181
+
182
+ /**
183
+ * Supported case transformations for generated symbols and path token variants.
184
+ */
185
+ type NamingStyle = 'preserve' | 'camel' | 'pascal' | 'snake' | 'kebab';
186
+ /**
187
+ * Naming configuration for generated TypeScript identifiers.
188
+ */
189
+ interface GeneratorNamingConfig {
190
+ modelType: NamingStyle;
191
+ modelConst: NamingStyle;
192
+ schemaConst: NamingStyle;
193
+ databaseConst: NamingStyle;
194
+ registryConst: NamingStyle;
195
+ }
196
+ /**
197
+ * Stable feature flags for generator output behavior.
198
+ */
199
+ interface GeneratorFeatureFlags {
200
+ emitRelations: boolean;
201
+ emitRegistry: boolean;
202
+ }
203
+ /**
204
+ * Experimental toggles for optional/forward-compatible generator behavior.
205
+ */
206
+ interface GeneratorExperimentalFlags {
207
+ /**
208
+ * Legacy compatibility toggle from the initial scaffold.
209
+ * Gateway introspection is now implemented; this flag is retained for additive config compatibility.
210
+ */
211
+ postgresGatewayIntrospection: boolean;
212
+ /**
213
+ * Enables contract placeholders for future Scylla provider work.
214
+ */
215
+ scyllaProviderContracts: boolean;
216
+ }
217
+ /**
218
+ * Path templates for each generated artifact category.
219
+ */
220
+ interface GeneratorOutputTargets {
221
+ model: string;
222
+ schema: string;
223
+ database: string;
224
+ registry: string;
225
+ }
226
+ /**
227
+ * Output configuration including dynamic placeholder aliases.
228
+ */
229
+ interface GeneratorOutputConfig {
230
+ targets: GeneratorOutputTargets;
231
+ placeholderMap: Record<string, string>;
232
+ }
233
+ /**
234
+ * Direct PostgreSQL introspection mode (implemented).
235
+ */
236
+ interface PostgresDirectProviderConfig {
237
+ kind: 'postgres';
238
+ mode: 'direct';
239
+ connectionString: string;
240
+ database?: string;
241
+ schemas?: string[];
242
+ }
243
+ /**
244
+ * Athena gateway-backed PostgreSQL introspection mode using `/gateway/query`.
245
+ */
246
+ interface PostgresGatewayProviderConfig {
247
+ kind: 'postgres';
248
+ mode: 'gateway';
249
+ gatewayUrl: string;
250
+ apiKey: string;
251
+ database: string;
252
+ schemas?: string[];
253
+ backend?: BackendType;
254
+ }
255
+ /**
256
+ * Scylla introspection provider contract placeholder (phase-two scaffold).
257
+ */
258
+ interface ScyllaDirectProviderConfig {
259
+ kind: 'scylla';
260
+ mode: 'direct';
261
+ contactPoints: string[];
262
+ keyspace: string;
263
+ datacenter?: string;
264
+ }
265
+ type GeneratorProviderConfig = PostgresDirectProviderConfig | PostgresGatewayProviderConfig | ScyllaDirectProviderConfig;
266
+ /**
267
+ * Root config contract loaded from `athena.config.ts`.
268
+ */
269
+ interface AthenaGeneratorConfig {
270
+ provider: GeneratorProviderConfig;
271
+ output: GeneratorOutputConfig;
272
+ naming?: Partial<GeneratorNamingConfig>;
273
+ features?: Partial<GeneratorFeatureFlags>;
274
+ experimental?: Partial<GeneratorExperimentalFlags>;
275
+ }
276
+ /**
277
+ * Normalized generator config with defaults applied.
278
+ */
279
+ interface NormalizedAthenaGeneratorConfig {
280
+ provider: GeneratorProviderConfig;
281
+ output: GeneratorOutputConfig;
282
+ naming: GeneratorNamingConfig;
283
+ features: GeneratorFeatureFlags;
284
+ experimental: GeneratorExperimentalFlags;
285
+ }
286
+ /**
287
+ * Config loader options for CLI/programmatic usage.
288
+ */
289
+ interface LoadGeneratorConfigOptions {
290
+ cwd?: string;
291
+ configPath?: string;
292
+ }
293
+ /**
294
+ * Fully loaded config result including resolved file path.
295
+ */
296
+ interface LoadedGeneratorConfig {
297
+ configPath: string;
298
+ config: NormalizedAthenaGeneratorConfig;
299
+ }
300
+ type GeneratorArtifactKind = 'model' | 'schema' | 'database' | 'registry';
301
+ /**
302
+ * One generated output file.
303
+ */
304
+ interface GeneratedArtifact {
305
+ kind: GeneratorArtifactKind;
306
+ path: string;
307
+ content: string;
308
+ }
309
+ /**
310
+ * In-memory generator output payload.
311
+ */
312
+ interface GeneratedArtifacts {
313
+ snapshot: IntrospectionSnapshot;
314
+ files: GeneratedArtifact[];
315
+ }
316
+ /**
317
+ * Runtime options for executing the generator pipeline.
318
+ */
319
+ interface RunGeneratorOptions {
320
+ cwd?: string;
321
+ configPath?: string;
322
+ dryRun?: boolean;
323
+ provider?: SchemaIntrospectionProvider;
324
+ }
325
+ /**
326
+ * Generator execution result including files written to disk.
327
+ */
328
+ interface RunGeneratorResult extends GeneratedArtifacts {
329
+ configPath: string;
330
+ writtenFiles: string[];
331
+ }
332
+
333
+ /**
334
+ * End-to-end generator execution: load config, introspect, render, and optionally write files.
335
+ */
336
+ declare function runSchemaGenerator(options?: RunGeneratorOptions): Promise<RunGeneratorResult>;
337
+
338
+ export { type AnyModelDef as A, type NamingStyle as B, type RunGeneratorOptions as C, type DatabaseDef as D, type RunGeneratorResult as E, type GeneratedArtifacts as G, type IntrospectionSnapshot as I, type LoadGeneratorConfigOptions as L, type ModelMetadata as M, type NormalizedAthenaGeneratorConfig as N, type RegistryDef as R, type SchemaDef as S, type TenantKeyMap as T, type UpdateOf as U, type ModelDef as a, type TenantContext as b, type RowOf as c, type ModelAt as d, type SchemaIntrospectionProvider as e, type AthenaGeneratorConfig as f, type LoadedGeneratorConfig as g, type IntrospectionColumn as h, type GeneratorProviderConfig as i, type GeneratorExperimentalFlags as j, type InsertOf as k, type IntrospectionInspectOptions as l, type IntrospectionRelation as m, type IntrospectionSchema as n, type IntrospectionTable as o, type IntrospectionTypeKind as p, type ModelRelationKind as q, runSchemaGenerator as r, type ModelRelationMetadata as s, type TenantContextValue as t, type GeneratedArtifact as u, type GeneratorArtifactKind as v, type GeneratorFeatureFlags as w, type GeneratorNamingConfig as x, type GeneratorOutputConfig as y, type GeneratorOutputTargets as z };
@@ -0,0 +1,338 @@
1
+ import { g as BackendType } from './types-v6UyGg-x.cjs';
2
+
3
+ type ModelKey = string;
4
+ type ColumnKey = string;
5
+ /**
6
+ * Runtime values that can safely be serialized into tenant-scoped headers.
7
+ */
8
+ type TenantContextValue = string | number | boolean | null | undefined;
9
+ /**
10
+ * Compile-time map of tenant context keys to outbound header names.
11
+ */
12
+ type TenantKeyMap = Record<string, string>;
13
+ /**
14
+ * Partial tenant context keyed by `TenantKeyMap`.
15
+ */
16
+ type TenantContext<TMap extends TenantKeyMap> = Partial<Record<keyof TMap, TenantContextValue>>;
17
+ /**
18
+ * Supported relationship cardinalities for model metadata and introspection snapshots.
19
+ */
20
+ type ModelRelationKind = 'one-to-one' | 'one-to-many' | 'many-to-one' | 'many-to-many';
21
+ /**
22
+ * Base metadata shape shared by typed model definitions and introspection snapshots.
23
+ * This type is intentionally row-agnostic so it can be used for generic registries.
24
+ */
25
+ interface ModelMetadataBase {
26
+ database?: string;
27
+ schema?: string;
28
+ model?: string;
29
+ tableName?: string;
30
+ primaryKey: string[];
31
+ nullable?: Partial<Record<string, boolean>>;
32
+ relations?: Record<string, ModelRelationMetadata>;
33
+ }
34
+ /**
35
+ * Strongly-typed model metadata linked to a row shape.
36
+ */
37
+ type ModelMetadata<Row> = Omit<ModelMetadataBase, 'primaryKey' | 'nullable'> & {
38
+ primaryKey: Array<Extract<keyof Row, string>>;
39
+ nullable?: Partial<Record<Extract<keyof Row, string>, boolean>>;
40
+ };
41
+ /**
42
+ * Relation metadata for model contracts and introspection snapshots.
43
+ */
44
+ interface ModelRelationMetadata {
45
+ kind: ModelRelationKind;
46
+ sourceColumns: ColumnKey[];
47
+ targetSchema: string;
48
+ targetModel: ModelKey;
49
+ targetColumns: ColumnKey[];
50
+ targetDatabase?: string;
51
+ through?: {
52
+ schema: string;
53
+ model: string;
54
+ sourceColumns: ColumnKey[];
55
+ targetColumns: ColumnKey[];
56
+ };
57
+ }
58
+ /**
59
+ * Core model definition contract used by typed registries.
60
+ */
61
+ interface ModelDef<Row, Insert = Partial<Row>, Update = Partial<Insert>, Meta extends ModelMetadataBase = ModelMetadata<Row>> {
62
+ readonly meta: Meta;
63
+ readonly __types?: {
64
+ row: Row;
65
+ insert: Insert;
66
+ update: Update;
67
+ };
68
+ }
69
+ /**
70
+ * Row-agnostic model definition used as a generic constraint.
71
+ */
72
+ type AnyModelDef = ModelDef<unknown, unknown, unknown, ModelMetadataBase>;
73
+ /**
74
+ * Schema-level model registry.
75
+ */
76
+ interface SchemaDef<Models extends Record<ModelKey, AnyModelDef>> {
77
+ readonly models: Models;
78
+ }
79
+ /**
80
+ * Database-level schema registry.
81
+ */
82
+ interface DatabaseDef<Schemas extends Record<string, SchemaDef<Record<ModelKey, AnyModelDef>>>> {
83
+ readonly schemas: Schemas;
84
+ }
85
+ /**
86
+ * Top-level registry keyed by logical database names.
87
+ */
88
+ type RegistryDef<Databases extends Record<string, DatabaseDef<Record<string, SchemaDef<Record<ModelKey, AnyModelDef>>>>>> = Databases;
89
+ /**
90
+ * Extracts row type from a model definition.
91
+ */
92
+ type RowOf<TModel extends AnyModelDef> = TModel extends ModelDef<infer TRow, unknown, unknown, ModelMetadataBase> ? TRow : never;
93
+ /**
94
+ * Extracts insert type from a model definition.
95
+ */
96
+ type InsertOf<TModel extends AnyModelDef> = TModel extends ModelDef<unknown, infer TInsert, unknown, ModelMetadataBase> ? TInsert : never;
97
+ /**
98
+ * Extracts update type from a model definition.
99
+ */
100
+ type UpdateOf<TModel extends AnyModelDef> = TModel extends ModelDef<unknown, unknown, infer TUpdate, ModelMetadataBase> ? TUpdate : never;
101
+ /**
102
+ * Resolves a model definition from a registry path.
103
+ */
104
+ type ModelAt<TRegistry extends RegistryDef<Record<string, DatabaseDef<Record<string, SchemaDef<Record<ModelKey, AnyModelDef>>>>>>, TDatabase extends keyof TRegistry & string, TSchema extends keyof TRegistry[TDatabase]['schemas'] & string, TModel extends keyof TRegistry[TDatabase]['schemas'][TSchema]['models'] & string> = TRegistry[TDatabase]['schemas'][TSchema]['models'][TModel];
105
+ /**
106
+ * Introspection-level column type families.
107
+ */
108
+ type IntrospectionTypeKind = 'scalar' | 'enum' | 'domain' | 'range' | 'multirange' | 'composite';
109
+ /**
110
+ * Introspected column metadata.
111
+ */
112
+ interface IntrospectionColumn {
113
+ name: string;
114
+ dataType: string;
115
+ udtName: string;
116
+ typeKind: IntrospectionTypeKind;
117
+ isNullable: boolean;
118
+ isPrimaryKey: boolean;
119
+ hasDefault: boolean;
120
+ isGenerated: boolean;
121
+ arrayDimensions: number;
122
+ enumValues?: string[];
123
+ }
124
+ /**
125
+ * Introspected relationship metadata.
126
+ */
127
+ interface IntrospectionRelation {
128
+ name: string;
129
+ kind: ModelRelationKind;
130
+ sourceColumns: string[];
131
+ targetSchema: string;
132
+ targetModel: string;
133
+ targetColumns: string[];
134
+ targetDatabase?: string;
135
+ through?: {
136
+ schema: string;
137
+ model: string;
138
+ sourceColumns: string[];
139
+ targetColumns: string[];
140
+ };
141
+ }
142
+ /**
143
+ * Introspected table metadata.
144
+ */
145
+ interface IntrospectionTable {
146
+ schema: string;
147
+ name: string;
148
+ columns: Record<string, IntrospectionColumn>;
149
+ primaryKey: string[];
150
+ relations: Record<string, IntrospectionRelation>;
151
+ }
152
+ /**
153
+ * Introspected schema metadata.
154
+ */
155
+ interface IntrospectionSchema {
156
+ name: string;
157
+ tables: Record<string, IntrospectionTable>;
158
+ }
159
+ /**
160
+ * Normalized output of a schema introspection pass.
161
+ */
162
+ interface IntrospectionSnapshot {
163
+ backend: BackendType;
164
+ database: string;
165
+ generatedAt: string;
166
+ schemas: Record<string, IntrospectionSchema>;
167
+ }
168
+ /**
169
+ * Options accepted by introspection providers.
170
+ */
171
+ interface IntrospectionInspectOptions {
172
+ schemas?: string[];
173
+ }
174
+ /**
175
+ * Provider contract implemented by backend-specific introspection adapters.
176
+ */
177
+ interface SchemaIntrospectionProvider {
178
+ readonly backend: BackendType;
179
+ inspect(options?: IntrospectionInspectOptions): Promise<IntrospectionSnapshot>;
180
+ }
181
+
182
+ /**
183
+ * Supported case transformations for generated symbols and path token variants.
184
+ */
185
+ type NamingStyle = 'preserve' | 'camel' | 'pascal' | 'snake' | 'kebab';
186
+ /**
187
+ * Naming configuration for generated TypeScript identifiers.
188
+ */
189
+ interface GeneratorNamingConfig {
190
+ modelType: NamingStyle;
191
+ modelConst: NamingStyle;
192
+ schemaConst: NamingStyle;
193
+ databaseConst: NamingStyle;
194
+ registryConst: NamingStyle;
195
+ }
196
+ /**
197
+ * Stable feature flags for generator output behavior.
198
+ */
199
+ interface GeneratorFeatureFlags {
200
+ emitRelations: boolean;
201
+ emitRegistry: boolean;
202
+ }
203
+ /**
204
+ * Experimental toggles for optional/forward-compatible generator behavior.
205
+ */
206
+ interface GeneratorExperimentalFlags {
207
+ /**
208
+ * Legacy compatibility toggle from the initial scaffold.
209
+ * Gateway introspection is now implemented; this flag is retained for additive config compatibility.
210
+ */
211
+ postgresGatewayIntrospection: boolean;
212
+ /**
213
+ * Enables contract placeholders for future Scylla provider work.
214
+ */
215
+ scyllaProviderContracts: boolean;
216
+ }
217
+ /**
218
+ * Path templates for each generated artifact category.
219
+ */
220
+ interface GeneratorOutputTargets {
221
+ model: string;
222
+ schema: string;
223
+ database: string;
224
+ registry: string;
225
+ }
226
+ /**
227
+ * Output configuration including dynamic placeholder aliases.
228
+ */
229
+ interface GeneratorOutputConfig {
230
+ targets: GeneratorOutputTargets;
231
+ placeholderMap: Record<string, string>;
232
+ }
233
+ /**
234
+ * Direct PostgreSQL introspection mode (implemented).
235
+ */
236
+ interface PostgresDirectProviderConfig {
237
+ kind: 'postgres';
238
+ mode: 'direct';
239
+ connectionString: string;
240
+ database?: string;
241
+ schemas?: string[];
242
+ }
243
+ /**
244
+ * Athena gateway-backed PostgreSQL introspection mode using `/gateway/query`.
245
+ */
246
+ interface PostgresGatewayProviderConfig {
247
+ kind: 'postgres';
248
+ mode: 'gateway';
249
+ gatewayUrl: string;
250
+ apiKey: string;
251
+ database: string;
252
+ schemas?: string[];
253
+ backend?: BackendType;
254
+ }
255
+ /**
256
+ * Scylla introspection provider contract placeholder (phase-two scaffold).
257
+ */
258
+ interface ScyllaDirectProviderConfig {
259
+ kind: 'scylla';
260
+ mode: 'direct';
261
+ contactPoints: string[];
262
+ keyspace: string;
263
+ datacenter?: string;
264
+ }
265
+ type GeneratorProviderConfig = PostgresDirectProviderConfig | PostgresGatewayProviderConfig | ScyllaDirectProviderConfig;
266
+ /**
267
+ * Root config contract loaded from `athena.config.ts`.
268
+ */
269
+ interface AthenaGeneratorConfig {
270
+ provider: GeneratorProviderConfig;
271
+ output: GeneratorOutputConfig;
272
+ naming?: Partial<GeneratorNamingConfig>;
273
+ features?: Partial<GeneratorFeatureFlags>;
274
+ experimental?: Partial<GeneratorExperimentalFlags>;
275
+ }
276
+ /**
277
+ * Normalized generator config with defaults applied.
278
+ */
279
+ interface NormalizedAthenaGeneratorConfig {
280
+ provider: GeneratorProviderConfig;
281
+ output: GeneratorOutputConfig;
282
+ naming: GeneratorNamingConfig;
283
+ features: GeneratorFeatureFlags;
284
+ experimental: GeneratorExperimentalFlags;
285
+ }
286
+ /**
287
+ * Config loader options for CLI/programmatic usage.
288
+ */
289
+ interface LoadGeneratorConfigOptions {
290
+ cwd?: string;
291
+ configPath?: string;
292
+ }
293
+ /**
294
+ * Fully loaded config result including resolved file path.
295
+ */
296
+ interface LoadedGeneratorConfig {
297
+ configPath: string;
298
+ config: NormalizedAthenaGeneratorConfig;
299
+ }
300
+ type GeneratorArtifactKind = 'model' | 'schema' | 'database' | 'registry';
301
+ /**
302
+ * One generated output file.
303
+ */
304
+ interface GeneratedArtifact {
305
+ kind: GeneratorArtifactKind;
306
+ path: string;
307
+ content: string;
308
+ }
309
+ /**
310
+ * In-memory generator output payload.
311
+ */
312
+ interface GeneratedArtifacts {
313
+ snapshot: IntrospectionSnapshot;
314
+ files: GeneratedArtifact[];
315
+ }
316
+ /**
317
+ * Runtime options for executing the generator pipeline.
318
+ */
319
+ interface RunGeneratorOptions {
320
+ cwd?: string;
321
+ configPath?: string;
322
+ dryRun?: boolean;
323
+ provider?: SchemaIntrospectionProvider;
324
+ }
325
+ /**
326
+ * Generator execution result including files written to disk.
327
+ */
328
+ interface RunGeneratorResult extends GeneratedArtifacts {
329
+ configPath: string;
330
+ writtenFiles: string[];
331
+ }
332
+
333
+ /**
334
+ * End-to-end generator execution: load config, introspect, render, and optionally write files.
335
+ */
336
+ declare function runSchemaGenerator(options?: RunGeneratorOptions): Promise<RunGeneratorResult>;
337
+
338
+ export { type AnyModelDef as A, type NamingStyle as B, type RunGeneratorOptions as C, type DatabaseDef as D, type RunGeneratorResult as E, type GeneratedArtifacts as G, type IntrospectionSnapshot as I, type LoadGeneratorConfigOptions as L, type ModelMetadata as M, type NormalizedAthenaGeneratorConfig as N, type RegistryDef as R, type SchemaDef as S, type TenantKeyMap as T, type UpdateOf as U, type ModelDef as a, type TenantContext as b, type RowOf as c, type ModelAt as d, type SchemaIntrospectionProvider as e, type AthenaGeneratorConfig as f, type LoadedGeneratorConfig as g, type IntrospectionColumn as h, type GeneratorProviderConfig as i, type GeneratorExperimentalFlags as j, type InsertOf as k, type IntrospectionInspectOptions as l, type IntrospectionRelation as m, type IntrospectionSchema as n, type IntrospectionTable as o, type IntrospectionTypeKind as p, type ModelRelationKind as q, runSchemaGenerator as r, type ModelRelationMetadata as s, type TenantContextValue as t, type GeneratedArtifact as u, type GeneratorArtifactKind as v, type GeneratorFeatureFlags as w, type GeneratorNamingConfig as x, type GeneratorOutputConfig as y, type GeneratorOutputTargets as z };
package/dist/react.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import { p as AthenaGatewayHookConfig, q as AthenaGatewayHookResult } from './errors-DQerAaXC.cjs';
2
- export { r as AthenaDeletePayload, s as AthenaFetchPayload, e as AthenaGatewayCallOptions, h as AthenaGatewayError, i as AthenaGatewayErrorCode, f as AthenaGatewayErrorDetails, t as AthenaGatewayResponse, u as AthenaInsertPayload, g as AthenaRpcCallOptions, j as AthenaRpcFilter, k as AthenaRpcFilterOperator, l as AthenaRpcOrder, m as AthenaRpcPayload, v as AthenaUpdatePayload, o as isAthenaGatewayError } from './errors-DQerAaXC.cjs';
1
+ import { n as AthenaGatewayHookConfig, o as AthenaGatewayHookResult } from './types-v6UyGg-x.cjs';
2
+ export { s as AthenaDeletePayload, p as AthenaFetchPayload, A as AthenaGatewayCallOptions, m as AthenaGatewayErrorCode, e as AthenaGatewayErrorDetails, t as AthenaGatewayResponse, q as AthenaInsertPayload, f as AthenaRpcCallOptions, i as AthenaRpcFilter, j as AthenaRpcFilterOperator, k as AthenaRpcOrder, l as AthenaRpcPayload, r as AthenaUpdatePayload } from './types-v6UyGg-x.cjs';
3
+ export { A as AthenaGatewayError, i as isAthenaGatewayError } from './errors-BYRK5phv.cjs';
3
4
  import * as react from 'react';
4
5
  import { ReactNode } from 'react';
5
6
 
package/dist/react.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { p as AthenaGatewayHookConfig, q as AthenaGatewayHookResult } from './errors-DQerAaXC.js';
2
- export { r as AthenaDeletePayload, s as AthenaFetchPayload, e as AthenaGatewayCallOptions, h as AthenaGatewayError, i as AthenaGatewayErrorCode, f as AthenaGatewayErrorDetails, t as AthenaGatewayResponse, u as AthenaInsertPayload, g as AthenaRpcCallOptions, j as AthenaRpcFilter, k as AthenaRpcFilterOperator, l as AthenaRpcOrder, m as AthenaRpcPayload, v as AthenaUpdatePayload, o as isAthenaGatewayError } from './errors-DQerAaXC.js';
1
+ import { n as AthenaGatewayHookConfig, o as AthenaGatewayHookResult } from './types-v6UyGg-x.js';
2
+ export { s as AthenaDeletePayload, p as AthenaFetchPayload, A as AthenaGatewayCallOptions, m as AthenaGatewayErrorCode, e as AthenaGatewayErrorDetails, t as AthenaGatewayResponse, q as AthenaInsertPayload, f as AthenaRpcCallOptions, i as AthenaRpcFilter, j as AthenaRpcFilterOperator, k as AthenaRpcOrder, l as AthenaRpcPayload, r as AthenaUpdatePayload } from './types-v6UyGg-x.js';
3
+ export { A as AthenaGatewayError, i as isAthenaGatewayError } from './errors-1b-LSTum.js';
3
4
  import * as react from 'react';
4
5
  import { ReactNode } from 'react';
5
6