breaking: rework how links database migrations are managed (#8162)
This commit is contained in:
committed by
GitHub
parent
f435c6c7f6
commit
f74fdcb644
@@ -34,7 +34,7 @@ type ExtraOptions = {
|
||||
[key: string]: string
|
||||
}
|
||||
database?: {
|
||||
table: string
|
||||
table?: string
|
||||
idPrefix?: string
|
||||
extraColumns?: LinkModulesExtraFields
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export type ModelsConfigTemplate = { [key: string]: ModelDTOConfig }
|
||||
|
||||
export type ModelConfigurationsToConfigTemplate<T extends ModelEntries> = {
|
||||
[Key in keyof T]: {
|
||||
dto: T[Key] extends IDmlEntity<any, any>
|
||||
dto: T[Key] extends DmlEntity<any, any>
|
||||
? InferEntityType<T[Key]>
|
||||
: T[Key] extends Constructor<any>
|
||||
? InstanceType<T[Key]>
|
||||
@@ -261,7 +261,8 @@ type InferModelFromConfig<T> = {
|
||||
: never
|
||||
}
|
||||
|
||||
export type MedusaServiceReturnType<ModelsConfig extends Record<any, any>> = {
|
||||
new (...args: any[]): AbstractModuleService<ModelsConfig>
|
||||
$modelObjects: InferModelFromConfig<ModelsConfig>
|
||||
}
|
||||
export type MedusaServiceReturnType<ModelsConfig extends Record<string, any>> =
|
||||
{
|
||||
new (...args: any[]): AbstractModuleService<ModelsConfig>
|
||||
$modelObjects: InferModelFromConfig<ModelsConfig>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user