@medusajs/framework
Version:
63 lines • 3.34 kB
TypeScript
import { Link } from "@medusajs/modules-sdk";
import { ConfigModule, IAnalyticsModuleService, IApiKeyModuleService, IAuthModuleService, ICacheService, ICartModuleService, ICurrencyModuleService, ICustomerModuleService, IEventBusModuleService, IFileModuleService, IFulfillmentModuleService, IInventoryService, ILockingModule, INotificationModuleService, IOrderModuleService, IPaymentModuleService, IPricingModuleService, IProductModuleService, IPromotionModuleService, IRegionModuleService, ISalesChannelModuleService, IStockLocationService, IStoreModuleService, ITaxModuleService, IUserModuleService, IWorkflowEngineService, Logger, ModuleImplementations, RemoteQueryFunction } from "@medusajs/types";
import { ContainerRegistrationKeys, Modules } from "@medusajs/utils";
import { Knex } from "@mikro-orm/knex";
import { AwilixContainer, ResolveOptions } from "awilix";
declare module "@medusajs/types" {
interface ModuleImplementations {
/**
* @deprecated use {@link ContainerRegistrationKeys.LINK} instead.
*/
[ ]: Link;
/**
* @version 2.2.0
*/
[ ]: Link;
[ ]: ConfigModule;
[ ]: Knex<any>;
[ ]: RemoteQueryFunction;
[ ]: Omit<RemoteQueryFunction, symbol>;
[ ]: Logger;
[ ]: IAnalyticsModuleService;
[ ]: IAuthModuleService;
[ ]: ICacheService;
[ ]: ICartModuleService;
[ ]: ICustomerModuleService;
[ ]: IEventBusModuleService;
[ ]: IInventoryService;
[ ]: IPaymentModuleService;
[ ]: IPricingModuleService;
[ ]: IProductModuleService;
[ ]: IPromotionModuleService;
[ ]: ISalesChannelModuleService;
[ ]: ITaxModuleService;
[ ]: IFulfillmentModuleService;
[ ]: IStockLocationService;
[ ]: IUserModuleService;
[ ]: IWorkflowEngineService;
[ ]: IRegionModuleService;
[ ]: IOrderModuleService;
[ ]: IApiKeyModuleService;
[ ]: IStoreModuleService;
[ ]: ICurrencyModuleService;
[ ]: IFileModuleService;
[ ]: INotificationModuleService;
[ ]: ILockingModule;
}
}
export type MedusaContainer<Cradle extends object = ModuleImplementations> = Omit<AwilixContainer, "resolve"> & {
resolve<K extends keyof Cradle>(key: K, resolveOptions?: ResolveOptions): Cradle[K];
resolve<T>(key: string, resolveOptions?: ResolveOptions): T;
/**
* @ignore
*/
registerAdd: <T>(name: string, registration: T) => MedusaContainer;
/**
* @ignore
*/
createScope: () => MedusaContainer;
};
export type ContainerLike = {
resolve<T = unknown>(key: string): T;
};
//# sourceMappingURL=container.d.ts.map