feat(types,modules-sdk): basic module setup for promotions (#5920)
RESOLVES CORE-1580
This commit is contained in:
@@ -9,6 +9,7 @@ export * as LoggerTypes from "./logger"
|
||||
export * as ModulesSdkTypes from "./modules-sdk"
|
||||
export * as PricingTypes from "./pricing"
|
||||
export * as ProductTypes from "./product"
|
||||
export * as PromotionTypes from "./promotion"
|
||||
export * as RegionTypes from "./region"
|
||||
export * as SalesChannelTypes from "./sales-channel"
|
||||
export * as SearchTypes from "./search"
|
||||
|
||||
@@ -16,6 +16,7 @@ export * from "./modules-sdk"
|
||||
export * from "./pricing"
|
||||
export * from "./product"
|
||||
export * from "./product-category"
|
||||
export * from "./promotion"
|
||||
export * from "./region"
|
||||
export * from "./sales-channel"
|
||||
export * from "./search"
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import { JoinerRelationship, JoinerServiceConfig, RemoteJoinerQuery } from "../joiner"
|
||||
import {
|
||||
JoinerRelationship,
|
||||
JoinerServiceConfig,
|
||||
RemoteJoinerQuery,
|
||||
} from "../joiner"
|
||||
|
||||
import { Logger } from "../logger"
|
||||
import { MedusaContainer } from "../common"
|
||||
import { RepositoryService } from "../dal"
|
||||
import { Logger } from "../logger"
|
||||
|
||||
export type Constructor<T> = new (...args: any[]) => T
|
||||
export * from "../common/medusa-container"
|
||||
@@ -261,7 +265,22 @@ export type ModuleServiceInitializeCustomDataLayerOptions = {
|
||||
}
|
||||
}
|
||||
|
||||
export type ModuleBootstrapDeclaration =
|
||||
| InternalModuleDeclaration
|
||||
| ExternalModuleDeclaration
|
||||
// TODO: These should be added back when the chain of types are fixed
|
||||
// | ModuleServiceInitializeOptions
|
||||
// | ModuleServiceInitializeCustomDataLayerOptions
|
||||
|
||||
export type RemoteQueryFunction = (
|
||||
query: string | RemoteJoinerQuery | object,
|
||||
variables?: Record<string, unknown>
|
||||
) => Promise<any> | null
|
||||
) => Promise<any> | null
|
||||
|
||||
export interface IModuleService {
|
||||
__joinerConfig?(): ModuleJoinerConfig
|
||||
|
||||
__hooks?: {
|
||||
onApplicationStart?: () => Promise<void>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./service"
|
||||
@@ -0,0 +1,3 @@
|
||||
import { IModuleService } from "../modules-sdk"
|
||||
|
||||
export interface IPromotionModuleService extends IModuleService {}
|
||||
Reference in New Issue
Block a user