arkormx 1.1.0 → 1.2.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/dist/index.d.cts CHANGED
@@ -24,10 +24,12 @@ type FactoryDefinition<TAttributes extends FactoryAttributes> = (sequence: numbe
24
24
  type FactoryState<TAttributes extends FactoryAttributes> = (attributes: TAttributes, sequence: number) => TAttributes;
25
25
  //#endregion
26
26
  //#region src/types/migrations.d.ts
27
- type SchemaColumnType = 'id' | 'uuid' | 'string' | 'text' | 'integer' | 'bigInteger' | 'float' | 'boolean' | 'json' | 'date' | 'timestamp';
27
+ type SchemaColumnType = 'id' | 'uuid' | 'enum' | 'string' | 'text' | 'integer' | 'bigInteger' | 'float' | 'boolean' | 'json' | 'date' | 'timestamp';
28
28
  interface SchemaColumn {
29
29
  name: string;
30
30
  type: SchemaColumnType;
31
+ enumName?: string;
32
+ enumValues?: string[];
31
33
  map?: string;
32
34
  nullable?: boolean;
33
35
  unique?: boolean;
@@ -2670,6 +2672,58 @@ declare class ForeignKeyBuilder {
2670
2672
  }
2671
2673
  //#endregion
2672
2674
  //#region src/database/TableBuilder.d.ts
2675
+ /**
2676
+ * The EnumBuilder class provides a fluent interface for configuring enum columns
2677
+ * after they are defined on a table.
2678
+ *
2679
+ * @author Legacy (3m1n3nc3)
2680
+ * @since 0.2.3
2681
+ */
2682
+ declare class EnumBuilder {
2683
+ private readonly tableBuilder;
2684
+ private readonly columnName;
2685
+ constructor(tableBuilder: TableBuilder, columnName: string);
2686
+ /**
2687
+ * Defines the Prisma enum name for this column.
2688
+ *
2689
+ * @param name
2690
+ * @returns
2691
+ */
2692
+ enumName(name: string): this;
2693
+ /**
2694
+ * Marks the enum column as nullable.
2695
+ *
2696
+ * @returns
2697
+ */
2698
+ nullable(): this;
2699
+ /**
2700
+ * Marks the enum column as unique.
2701
+ *
2702
+ * @returns
2703
+ */
2704
+ unique(): this;
2705
+ /**
2706
+ * Sets a default value for the enum column.
2707
+ *
2708
+ * @param value
2709
+ * @returns
2710
+ */
2711
+ default(value: unknown): this;
2712
+ /**
2713
+ * Positions the enum column after another column when supported.
2714
+ *
2715
+ * @param referenceColumn
2716
+ * @returns
2717
+ */
2718
+ after(referenceColumn: string): this;
2719
+ /**
2720
+ * Maps the enum column to a custom database column name.
2721
+ *
2722
+ * @param name
2723
+ * @returns
2724
+ */
2725
+ map(name: string): this;
2726
+ }
2673
2727
  /**
2674
2728
  * The TableBuilder class provides a fluent interface for defining
2675
2729
  * the structure of a database table in a migration, including columns to add or drop.
@@ -2714,6 +2768,17 @@ declare class TableBuilder {
2714
2768
  * @returns The current TableBuilder instance for chaining.
2715
2769
  */
2716
2770
  uuid(name: string, options?: Partial<SchemaColumn>): this;
2771
+ /**
2772
+ * Defines an enum column in the table.
2773
+ *
2774
+ * @param name The name of the enum column.
2775
+ * @param values Either an array of string values for the enum or the name of an existing enum to reuse.
2776
+ * @param options Additional options for the enum column.
2777
+ * @returns
2778
+ */
2779
+ enum(name: string, valuesOrEnumName: string[] | string, options?: Partial<SchemaColumn> & {
2780
+ enumName?: string;
2781
+ }): EnumBuilder;
2717
2782
  /**
2718
2783
  * Defines a string column in the table.
2719
2784
  *
@@ -2835,6 +2900,14 @@ declare class TableBuilder {
2835
2900
  * @returns The current TableBuilder instance for chaining.
2836
2901
  */
2837
2902
  nullable(columnName?: string): this;
2903
+ /**
2904
+ * Sets the Prisma enum name for an enum column.
2905
+ *
2906
+ * @param name The enum name to assign.
2907
+ * @param columnName Optional explicit target column name. When omitted, applies to the latest defined column.
2908
+ * @returns The current TableBuilder instance for chaining.
2909
+ */
2910
+ enumName(name: string, columnName?: string): this;
2838
2911
  /**
2839
2912
  * Sets a default value for a column.
2840
2913
  *
@@ -3124,6 +3197,8 @@ declare const getLatestAppliedMigrations: (state: AppliedMigrationsState, steps:
3124
3197
  //#endregion
3125
3198
  //#region src/helpers/migrations.d.ts
3126
3199
  declare const PRISMA_MODEL_REGEX: RegExp;
3200
+ declare const PRISMA_ENUM_REGEX: RegExp;
3201
+ declare const PRISMA_ENUM_MEMBER_REGEX: RegExp;
3127
3202
  /**
3128
3203
  * Convert a table name to a PascalCase model name, with basic singularization.
3129
3204
  *
@@ -3145,6 +3220,7 @@ declare const escapeRegex: (value: string) => string;
3145
3220
  * @returns
3146
3221
  */
3147
3222
  declare const resolvePrismaType: (column: SchemaColumn) => string;
3223
+ declare const resolveEnumName: (column: SchemaColumn) => string;
3148
3224
  /**
3149
3225
  * Format a default value for inclusion in a Prisma schema field definition, based on its type.
3150
3226
  *
@@ -3152,6 +3228,13 @@ declare const resolvePrismaType: (column: SchemaColumn) => string;
3152
3228
  * @returns
3153
3229
  */
3154
3230
  declare const formatDefaultValue: (value: unknown) => string | undefined;
3231
+ /**
3232
+ * Format a default value for an enum column as a Prisma @default attribute, validating that it is a non-empty string.
3233
+ *
3234
+ * @param value
3235
+ * @returns
3236
+ */
3237
+ declare const formatEnumDefaultValue: (value: unknown) => string | undefined;
3155
3238
  /**
3156
3239
  * Build a single line of a Prisma model field definition based on a SchemaColumn, including type and modifiers.
3157
3240
  *
@@ -3159,6 +3242,29 @@ declare const formatDefaultValue: (value: unknown) => string | undefined;
3159
3242
  * @returns
3160
3243
  */
3161
3244
  declare const buildFieldLine: (column: SchemaColumn) => string;
3245
+ /**
3246
+ * Build a Prisma enum block string based on an enum name and its values, validating that
3247
+ * at least one value is provided.
3248
+ *
3249
+ * @param enumName The name of the enum to create.
3250
+ * @param values The array of values for the enum.
3251
+ * @returns The Prisma enum block string.
3252
+ */
3253
+ declare const buildEnumBlock: (enumName: string, values: string[]) => string;
3254
+ /**
3255
+ * Find the Prisma enum block in a schema string that corresponds to a given enum
3256
+ * name, returning its details if found.
3257
+ *
3258
+ * @param schema The Prisma schema string to search for the enum block.
3259
+ * @param enumName The name of the enum to find in the schema.
3260
+ * @returns
3261
+ */
3262
+ declare const findEnumBlock: (schema: string, enumName: string) => {
3263
+ enumName: string;
3264
+ block: string;
3265
+ start: number;
3266
+ end: number;
3267
+ } | null;
3162
3268
  /**
3163
3269
  * Build a Prisma model-level @@index definition line.
3164
3270
  *
@@ -3175,17 +3281,18 @@ declare const buildIndexLine: (index: SchemaIndex) => string;
3175
3281
  */
3176
3282
  declare const deriveRelationFieldName: (columnName: string) => string;
3177
3283
  /**
3178
- * Derive a relation name for the inverse side of a relation based on the
3284
+ * Derive a relation name for both sides of a relation based on the
3179
3285
  * source and target model names, using an explicit alias if provided or a
3180
- * convention of combining the target model name with the last segment of
3181
- * the source model name.
3286
+ * convention of combining the full source model name with the target model name.
3182
3287
  *
3183
3288
  * @param sourceModelName The name of the source model in the relation.
3184
3289
  * @param targetModelName The name of the target model in the relation.
3185
- * @param explicitAlias An optional explicit alias for the inverse relation.
3186
- * @returns The derived or explicit inverse relation alias.
3290
+ * @param explicitAlias An optional explicit alias for the relation.
3291
+ * @returns The derived or explicit relation alias.
3187
3292
  */
3293
+ declare const deriveRelationAlias: (sourceModelName: string, targetModelName: string, explicitAlias?: string) => string;
3188
3294
  declare const deriveInverseRelationAlias: (sourceModelName: string, targetModelName: string, explicitAlias?: string) => string;
3295
+ declare const deriveSingularFieldName: (modelName: string) => string;
3189
3296
  declare const deriveCollectionFieldName: (modelName: string) => string;
3190
3297
  /**
3191
3298
  * Format a SchemaForeignKeyAction value as a Prisma onDelete action string.
@@ -3201,7 +3308,7 @@ declare const formatRelationAction: (action: SchemaForeignKeyAction) => string;
3201
3308
  * @param foreignKey The foreign key definition to convert to a relation line.
3202
3309
  * @returns The corresponding Prisma schema line for the relation field.
3203
3310
  */
3204
- declare const buildRelationLine: (foreignKey: SchemaForeignKey) => string;
3311
+ declare const buildRelationLine: (sourceModelName: string, foreignKey: SchemaForeignKey, columns?: SchemaColumn[]) => string;
3205
3312
  /**
3206
3313
  * Build a Prisma relation field line for the inverse side of a relation, based
3207
3314
  * on the source and target model names and the foreign key definition, using
@@ -3212,7 +3319,7 @@ declare const buildRelationLine: (foreignKey: SchemaForeignKey) => string;
3212
3319
  * @param foreignKey The foreign key definition for the relation.
3213
3320
  * @returns The Prisma schema line for the inverse relation field.
3214
3321
  */
3215
- declare const buildInverseRelationLine: (sourceModelName: string, targetModelName: string, foreignKey: SchemaForeignKey) => string;
3322
+ declare const buildInverseRelationLine: (sourceModelName: string, targetModelName: string, foreignKey: SchemaForeignKey, columns?: SchemaColumn[]) => string;
3216
3323
  /**
3217
3324
  * Build a Prisma model block string based on a SchemaTableCreateOperation, including
3218
3325
  * all fields and any necessary mapping.
@@ -3492,4 +3599,4 @@ declare class URLDriver {
3492
3599
  url(page: number): string;
3493
3600
  }
3494
3601
  //#endregion
3495
- export { ArkormCollection, ArkormErrorContext, ArkormException, Attribute, AttributeOptions, CliApp, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, MissingDelegateException, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_MODEL_REGEX, Paginator, PrismaDelegateMap, QueryBuilder, QueryConstraintException, RelationResolutionException, SEEDER_BRAND, SchemaBuilder, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, TableBuilder, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findModelBlock, formatDefaultValue, formatRelationAction, generateMigrationFile, getActiveTransactionClient, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isTransactionCapableClient, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
3602
+ export { ArkormCollection, ArkormErrorContext, ArkormException, Attribute, AttributeOptions, CliApp, EnumBuilder, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, MissingDelegateException, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, Paginator, PrismaDelegateMap, QueryBuilder, QueryConstraintException, RelationResolutionException, SEEDER_BRAND, SchemaBuilder, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, TableBuilder, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findEnumBlock, findModelBlock, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, generateMigrationFile, getActiveTransactionClient, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isTransactionCapableClient, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveEnumName, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
package/dist/index.d.mts CHANGED
@@ -24,10 +24,12 @@ type FactoryDefinition<TAttributes extends FactoryAttributes> = (sequence: numbe
24
24
  type FactoryState<TAttributes extends FactoryAttributes> = (attributes: TAttributes, sequence: number) => TAttributes;
25
25
  //#endregion
26
26
  //#region src/types/migrations.d.ts
27
- type SchemaColumnType = 'id' | 'uuid' | 'string' | 'text' | 'integer' | 'bigInteger' | 'float' | 'boolean' | 'json' | 'date' | 'timestamp';
27
+ type SchemaColumnType = 'id' | 'uuid' | 'enum' | 'string' | 'text' | 'integer' | 'bigInteger' | 'float' | 'boolean' | 'json' | 'date' | 'timestamp';
28
28
  interface SchemaColumn {
29
29
  name: string;
30
30
  type: SchemaColumnType;
31
+ enumName?: string;
32
+ enumValues?: string[];
31
33
  map?: string;
32
34
  nullable?: boolean;
33
35
  unique?: boolean;
@@ -2670,6 +2672,58 @@ declare class ForeignKeyBuilder {
2670
2672
  }
2671
2673
  //#endregion
2672
2674
  //#region src/database/TableBuilder.d.ts
2675
+ /**
2676
+ * The EnumBuilder class provides a fluent interface for configuring enum columns
2677
+ * after they are defined on a table.
2678
+ *
2679
+ * @author Legacy (3m1n3nc3)
2680
+ * @since 0.2.3
2681
+ */
2682
+ declare class EnumBuilder {
2683
+ private readonly tableBuilder;
2684
+ private readonly columnName;
2685
+ constructor(tableBuilder: TableBuilder, columnName: string);
2686
+ /**
2687
+ * Defines the Prisma enum name for this column.
2688
+ *
2689
+ * @param name
2690
+ * @returns
2691
+ */
2692
+ enumName(name: string): this;
2693
+ /**
2694
+ * Marks the enum column as nullable.
2695
+ *
2696
+ * @returns
2697
+ */
2698
+ nullable(): this;
2699
+ /**
2700
+ * Marks the enum column as unique.
2701
+ *
2702
+ * @returns
2703
+ */
2704
+ unique(): this;
2705
+ /**
2706
+ * Sets a default value for the enum column.
2707
+ *
2708
+ * @param value
2709
+ * @returns
2710
+ */
2711
+ default(value: unknown): this;
2712
+ /**
2713
+ * Positions the enum column after another column when supported.
2714
+ *
2715
+ * @param referenceColumn
2716
+ * @returns
2717
+ */
2718
+ after(referenceColumn: string): this;
2719
+ /**
2720
+ * Maps the enum column to a custom database column name.
2721
+ *
2722
+ * @param name
2723
+ * @returns
2724
+ */
2725
+ map(name: string): this;
2726
+ }
2673
2727
  /**
2674
2728
  * The TableBuilder class provides a fluent interface for defining
2675
2729
  * the structure of a database table in a migration, including columns to add or drop.
@@ -2714,6 +2768,17 @@ declare class TableBuilder {
2714
2768
  * @returns The current TableBuilder instance for chaining.
2715
2769
  */
2716
2770
  uuid(name: string, options?: Partial<SchemaColumn>): this;
2771
+ /**
2772
+ * Defines an enum column in the table.
2773
+ *
2774
+ * @param name The name of the enum column.
2775
+ * @param values Either an array of string values for the enum or the name of an existing enum to reuse.
2776
+ * @param options Additional options for the enum column.
2777
+ * @returns
2778
+ */
2779
+ enum(name: string, valuesOrEnumName: string[] | string, options?: Partial<SchemaColumn> & {
2780
+ enumName?: string;
2781
+ }): EnumBuilder;
2717
2782
  /**
2718
2783
  * Defines a string column in the table.
2719
2784
  *
@@ -2835,6 +2900,14 @@ declare class TableBuilder {
2835
2900
  * @returns The current TableBuilder instance for chaining.
2836
2901
  */
2837
2902
  nullable(columnName?: string): this;
2903
+ /**
2904
+ * Sets the Prisma enum name for an enum column.
2905
+ *
2906
+ * @param name The enum name to assign.
2907
+ * @param columnName Optional explicit target column name. When omitted, applies to the latest defined column.
2908
+ * @returns The current TableBuilder instance for chaining.
2909
+ */
2910
+ enumName(name: string, columnName?: string): this;
2838
2911
  /**
2839
2912
  * Sets a default value for a column.
2840
2913
  *
@@ -3124,6 +3197,8 @@ declare const getLatestAppliedMigrations: (state: AppliedMigrationsState, steps:
3124
3197
  //#endregion
3125
3198
  //#region src/helpers/migrations.d.ts
3126
3199
  declare const PRISMA_MODEL_REGEX: RegExp;
3200
+ declare const PRISMA_ENUM_REGEX: RegExp;
3201
+ declare const PRISMA_ENUM_MEMBER_REGEX: RegExp;
3127
3202
  /**
3128
3203
  * Convert a table name to a PascalCase model name, with basic singularization.
3129
3204
  *
@@ -3145,6 +3220,7 @@ declare const escapeRegex: (value: string) => string;
3145
3220
  * @returns
3146
3221
  */
3147
3222
  declare const resolvePrismaType: (column: SchemaColumn) => string;
3223
+ declare const resolveEnumName: (column: SchemaColumn) => string;
3148
3224
  /**
3149
3225
  * Format a default value for inclusion in a Prisma schema field definition, based on its type.
3150
3226
  *
@@ -3152,6 +3228,13 @@ declare const resolvePrismaType: (column: SchemaColumn) => string;
3152
3228
  * @returns
3153
3229
  */
3154
3230
  declare const formatDefaultValue: (value: unknown) => string | undefined;
3231
+ /**
3232
+ * Format a default value for an enum column as a Prisma @default attribute, validating that it is a non-empty string.
3233
+ *
3234
+ * @param value
3235
+ * @returns
3236
+ */
3237
+ declare const formatEnumDefaultValue: (value: unknown) => string | undefined;
3155
3238
  /**
3156
3239
  * Build a single line of a Prisma model field definition based on a SchemaColumn, including type and modifiers.
3157
3240
  *
@@ -3159,6 +3242,29 @@ declare const formatDefaultValue: (value: unknown) => string | undefined;
3159
3242
  * @returns
3160
3243
  */
3161
3244
  declare const buildFieldLine: (column: SchemaColumn) => string;
3245
+ /**
3246
+ * Build a Prisma enum block string based on an enum name and its values, validating that
3247
+ * at least one value is provided.
3248
+ *
3249
+ * @param enumName The name of the enum to create.
3250
+ * @param values The array of values for the enum.
3251
+ * @returns The Prisma enum block string.
3252
+ */
3253
+ declare const buildEnumBlock: (enumName: string, values: string[]) => string;
3254
+ /**
3255
+ * Find the Prisma enum block in a schema string that corresponds to a given enum
3256
+ * name, returning its details if found.
3257
+ *
3258
+ * @param schema The Prisma schema string to search for the enum block.
3259
+ * @param enumName The name of the enum to find in the schema.
3260
+ * @returns
3261
+ */
3262
+ declare const findEnumBlock: (schema: string, enumName: string) => {
3263
+ enumName: string;
3264
+ block: string;
3265
+ start: number;
3266
+ end: number;
3267
+ } | null;
3162
3268
  /**
3163
3269
  * Build a Prisma model-level @@index definition line.
3164
3270
  *
@@ -3175,17 +3281,18 @@ declare const buildIndexLine: (index: SchemaIndex) => string;
3175
3281
  */
3176
3282
  declare const deriveRelationFieldName: (columnName: string) => string;
3177
3283
  /**
3178
- * Derive a relation name for the inverse side of a relation based on the
3284
+ * Derive a relation name for both sides of a relation based on the
3179
3285
  * source and target model names, using an explicit alias if provided or a
3180
- * convention of combining the target model name with the last segment of
3181
- * the source model name.
3286
+ * convention of combining the full source model name with the target model name.
3182
3287
  *
3183
3288
  * @param sourceModelName The name of the source model in the relation.
3184
3289
  * @param targetModelName The name of the target model in the relation.
3185
- * @param explicitAlias An optional explicit alias for the inverse relation.
3186
- * @returns The derived or explicit inverse relation alias.
3290
+ * @param explicitAlias An optional explicit alias for the relation.
3291
+ * @returns The derived or explicit relation alias.
3187
3292
  */
3293
+ declare const deriveRelationAlias: (sourceModelName: string, targetModelName: string, explicitAlias?: string) => string;
3188
3294
  declare const deriveInverseRelationAlias: (sourceModelName: string, targetModelName: string, explicitAlias?: string) => string;
3295
+ declare const deriveSingularFieldName: (modelName: string) => string;
3189
3296
  declare const deriveCollectionFieldName: (modelName: string) => string;
3190
3297
  /**
3191
3298
  * Format a SchemaForeignKeyAction value as a Prisma onDelete action string.
@@ -3201,7 +3308,7 @@ declare const formatRelationAction: (action: SchemaForeignKeyAction) => string;
3201
3308
  * @param foreignKey The foreign key definition to convert to a relation line.
3202
3309
  * @returns The corresponding Prisma schema line for the relation field.
3203
3310
  */
3204
- declare const buildRelationLine: (foreignKey: SchemaForeignKey) => string;
3311
+ declare const buildRelationLine: (sourceModelName: string, foreignKey: SchemaForeignKey, columns?: SchemaColumn[]) => string;
3205
3312
  /**
3206
3313
  * Build a Prisma relation field line for the inverse side of a relation, based
3207
3314
  * on the source and target model names and the foreign key definition, using
@@ -3212,7 +3319,7 @@ declare const buildRelationLine: (foreignKey: SchemaForeignKey) => string;
3212
3319
  * @param foreignKey The foreign key definition for the relation.
3213
3320
  * @returns The Prisma schema line for the inverse relation field.
3214
3321
  */
3215
- declare const buildInverseRelationLine: (sourceModelName: string, targetModelName: string, foreignKey: SchemaForeignKey) => string;
3322
+ declare const buildInverseRelationLine: (sourceModelName: string, targetModelName: string, foreignKey: SchemaForeignKey, columns?: SchemaColumn[]) => string;
3216
3323
  /**
3217
3324
  * Build a Prisma model block string based on a SchemaTableCreateOperation, including
3218
3325
  * all fields and any necessary mapping.
@@ -3492,4 +3599,4 @@ declare class URLDriver {
3492
3599
  url(page: number): string;
3493
3600
  }
3494
3601
  //#endregion
3495
- export { ArkormCollection, ArkormErrorContext, ArkormException, Attribute, AttributeOptions, CliApp, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, MissingDelegateException, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_MODEL_REGEX, Paginator, PrismaDelegateMap, QueryBuilder, QueryConstraintException, RelationResolutionException, SEEDER_BRAND, SchemaBuilder, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, TableBuilder, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findModelBlock, formatDefaultValue, formatRelationAction, generateMigrationFile, getActiveTransactionClient, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isTransactionCapableClient, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
3602
+ export { ArkormCollection, ArkormErrorContext, ArkormException, Attribute, AttributeOptions, CliApp, EnumBuilder, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, MissingDelegateException, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, Paginator, PrismaDelegateMap, QueryBuilder, QueryConstraintException, RelationResolutionException, SEEDER_BRAND, SchemaBuilder, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, TableBuilder, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findEnumBlock, findModelBlock, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, generateMigrationFile, getActiveTransactionClient, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isTransactionCapableClient, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveEnumName, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };