ModulesSdkTypes
internal.internal.ModulesSdkTypes
Enumerations
Interfaces
References
Constructor
Re-exports Constructor
MedusaContainer
Re-exports MedusaContainer
RemoteQueryFunction
Re-exports RemoteQueryFunction
Type Aliases
ExternalModuleDeclaration
ExternalModuleDeclaration: Object
Type declaration
alias
stringdefinition
ModuleDefinitionmain
booleanoptions
Record<string, unknown>server
objectserver.keepAlive
booleanRequiredserver.type
"http"Requiredserver.url
stringRequiredInternalModuleDeclaration
InternalModuleDeclaration: Object
Type declaration
alias
stringdefinition
ModuleDefinitiondependencies
string[]main
booleanoptions
Record<string, unknown>resolve
stringLinkModuleDefinition
LinkModuleDefinition: Object
Type declaration
dependencies
string[]key
stringRequiredlabel
stringRequiredregistrationName
stringRequiredLoadedModule
LoadedModule: unknown
& { __definition
: ModuleDefinition
; __joinerConfig
: ModuleJoinerConfig
}
LoaderOptions
LoaderOptions<TOptions
>: Object
Type parameters
TOptions
objectRequiredType declaration
LogLevel
LogLevel: "query"
| "schema"
| "error"
| "warn"
| "info"
| "log"
| "migration"
LoggerOptions
LoggerOptions: boolean
| "all"
| LogLevel
[]
ModuleConfig
ModuleConfig: ModuleDeclaration
& { definition
: ModuleDefinition
; module
: string
; path
: string
}
ModuleDefinition
ModuleDefinition: Object
Type declaration
canOverride
booleandefaultPackage
string | falseRequireddependencies
string[]isLegacy
booleanisQueryable
booleanisRequired
booleankey
stringRequiredlabel
stringRequiredregistrationName
stringRequiredModuleExports
ModuleExports: Object
Type declaration
loaders
ModuleLoaderFunction[]migrations
any[]models
Constructor<any>[]revertMigration
(options: LoaderOptions<Record<string, unknown>>, moduleDeclaration?: InternalModuleDeclaration) => Promise<void>runMigrations
(options: LoaderOptions<Record<string, unknown>>, moduleDeclaration?: InternalModuleDeclaration) => Promise<void>ModuleJoinerConfig
ModuleJoinerConfig: Omit
<JoinerServiceConfig
, "serviceName"
| "primaryKeys"
| "relationships"
| "extends"
> & { databaseConfig?
: { extraFields?
: Record<string
, { defaultValue?
: string
; nullable?
: boolean
; options?
: Record<string
, unknown
> ; type
: "date"
| "time"
| "datetime"
| "bigint"
| "blob"
| "uint8array"
| "array"
| "enumArray"
| "enum"
| "json"
| "integer"
| "smallint"
| "tinyint"
| "mediumint"
| "float"
| "double"
| "boolean"
| "decimal"
| "string"
| "uuid"
| "text"
}> ; idPrefix?
: string
; tableName?
: string
} ; extends?
: { fieldAlias?
: Record<string
, string
| { forwardArgumentsOnPath
: string
[] ; path
: string
}> ; relationship
: ModuleJoinerRelationship
; serviceName
: string
}[] ; isLink?
: boolean
; isReadOnlyLink?
: boolean
; linkableKeys?
: Record<string
, string
> ; primaryKeys?
: string
[] ; relationships?
: ModuleJoinerRelationship
[] ; schema?
: string
; serviceName?
: string
}
ModuleJoinerRelationship
ModuleJoinerRelationship: JoinerRelationship
& { deleteCascade?
: boolean
; isInternalService?
: boolean
}
ModuleLoaderFunction
ModuleLoaderFunction: (options
: LoaderOptions
, moduleDeclaration?
: InternalModuleDeclaration
) => Promise
<void
>
Type declaration
(options
, moduleDeclaration?
): Promise
<void
>
Parameters
moduleDeclaration
InternalModuleDeclarationReturns
Promise
<void
>
Promise
Promise<void>RequiredModuleResolution
ModuleResolution: Object
Type declaration
dependencies
string[]moduleDeclaration
InternalModuleDeclaration | ExternalModuleDeclarationmoduleExports
ModuleExportsoptions
Record<string, unknown>resolutionPath
string | falseRequiredModuleServiceInitializeCustomDataLayerOptions
ModuleServiceInitializeCustomDataLayerOptions: Object
Type declaration
manager
anyrepositories
objectModulesResponse
ModulesResponse: { module
: string
; resolution
: string
| false
}[]