@rokmohar/medusa-plugin-meilisearch
Version:
Meilisearch plugin for Medusa 2
38 lines • 2.36 kB
TypeScript
/**
* Adapter around native Medusa internals so the custom Meilisearch endpoints can
* behave exactly like the native /store/products and /store/product-categories routes.
*
* Several of these symbols live on subpaths (`@medusajs/framework/http`,
* `@medusajs/medusa/api/...`) that the plugin's classic `moduleResolution: "node"`
* tsconfig cannot resolve as `import` specifiers, and a few of them are non-public
* Medusa internals that may move across majors. They are therefore loaded via
* `require()` and re-exported with hand-written types. This file is the single
* coupling point — if a Medusa upgrade breaks these, fix them here only.
*
* Verified against @medusajs/medusa ^2.15.x.
*/
import type { MedusaRequest, MedusaResponse, MedusaNextFunction } from '@medusajs/framework';
export { ContainerRegistrationKeys, QueryContext, ProductStatus, MedusaError, isPresent, FeatureFlag, } from '@medusajs/utils';
type MiddlewareFn = (req: MedusaRequest, res: MedusaResponse, next: MedusaNextFunction) => void | Promise<void>;
export declare const authenticate: (actor: string, methods: string[], options?: {
allowUnauthenticated?: boolean;
}) => MiddlewareFn;
export declare const applyDefaultFilters: (defaults: Record<string, unknown>) => MiddlewareFn;
export declare const clearFiltersByKey: (keys: string[]) => MiddlewareFn;
export declare const maybeApplyLinkFilter: (config: {
entryPoint: string;
resourceId: string;
filterableField: string;
}) => MiddlewareFn;
export declare const filterByValidSalesChannels: () => MiddlewareFn;
export declare const normalizeDataForContext: () => MiddlewareFn;
export declare const setPricingContext: () => MiddlewareFn;
export declare const setTaxContext: () => MiddlewareFn;
export declare const wrapVariantsWithInventoryQuantityForSalesChannel: (req: MedusaRequest, variants: unknown[]) => Promise<void>;
export declare const wrapVariantsWithTotalInventoryQuantity: (req: MedusaRequest, variants: unknown[]) => Promise<void>;
export declare const listProductQueryConfig: any;
export declare const StoreGetProductsParams: any;
export declare const wrapProductsWithTaxPrices: (req: MedusaRequest, products: unknown[]) => Promise<void>;
export declare const listProductCategoryConfig: any;
export declare const StoreProductCategoriesParams: any;
//# sourceMappingURL=medusa.d.ts.map