Skip to main content
Skip to main content

medusa

Namespaces

Enumerations

Classes

Interfaces

Type Aliases


Enumeration Members

DEFAULT

DEFAULT: "default"


EXTERNAL

EXTERNAL: "external"


INTERNAL

INTERNAL: "internal"


Variables

AvailableOrderIncludes

Const AvailableOrderIncludes: Object

Type declaration

RETURNABLE_ITEMSstringRequired

Default: "returnable_items"


HTTP_METHODS

Const HTTP_METHODS: readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]

List of all the supported HTTP methods


PriceType

PriceType: Object

Type declaration

DEFAULTDEFAULTRequired

Default: "default"

OVERRIDEOVERRIDERequired

Default: "override"

SALESALERequired

Default: "sale"


allowedAdminProductCategoryRelations

Const allowedAdminProductCategoryRelations: string[]


allowedFields

Const allowedFields: string[]


allowedOrderIncludes

Const allowedOrderIncludes: string[]


allowedStoreCustomersFields

Const allowedStoreCustomersFields: string[]


allowedStoreCustomersRelations

Const allowedStoreCustomersRelations: string[]


allowedStoreGiftCardFields

Const allowedStoreGiftCardFields: string[]


allowedStoreGiftCardRelations

Const allowedStoreGiftCardRelations: string[]


allowedStoreOrdersFields

Const allowedStoreOrdersFields: string[]


allowedStoreOrdersRelations

Const allowedStoreOrdersRelations: string[]


allowedStoreProductCategoryFields

Const allowedStoreProductCategoryFields: string[]


allowedStoreProductTagFields

Const allowedStoreProductTagFields: string[]


allowedStoreProductTypeFields

Const allowedStoreProductTypeFields: string[]


allowedStoreProductsFields

Const allowedStoreProductsFields: string[]


allowedStoreProductsRelations

Const allowedStoreProductsRelations: string[]


allowedStoreVariantRelations

Const allowedStoreVariantRelations: string[]


defaulPaymentCollectionRelations

Const defaulPaymentCollectionRelations: string[]


defaultAdminBatchFields

Const defaultAdminBatchFields: string[]


defaultAdminCollectionsFields

Const defaultAdminCollectionsFields: string[]


defaultAdminCollectionsRelations

Const defaultAdminCollectionsRelations: string[]


defaultAdminCustomerGroupsRelations

Const defaultAdminCustomerGroupsRelations: never[] = []


defaultAdminCustomersRelations

Const defaultAdminCustomersRelations: string[]


defaultAdminDiscountConditionFields

Const defaultAdminDiscountConditionFields: keyof DiscountCondition[]


defaultAdminDiscountConditionRelations

Const defaultAdminDiscountConditionRelations: string[]


defaultAdminDiscountsFields

Const defaultAdminDiscountsFields: keyof Discount[]


defaultAdminDiscountsRelations

Const defaultAdminDiscountsRelations: string[]


defaultAdminDraftOrdersCartFields

Const defaultAdminDraftOrdersCartFields: keyof Cart[]


defaultAdminDraftOrdersCartRelations

Const defaultAdminDraftOrdersCartRelations: string[]


defaultAdminDraftOrdersFields

Const defaultAdminDraftOrdersFields: keyof DraftOrder[]


defaultAdminDraftOrdersRelations

Const defaultAdminDraftOrdersRelations: string[]


defaultAdminGetProductsVariantsFields

Const defaultAdminGetProductsVariantsFields: string[]


defaultAdminGiftCardFields

Const defaultAdminGiftCardFields: keyof GiftCard[]


defaultAdminGiftCardRelations

Const defaultAdminGiftCardRelations: string[]


defaultAdminInventoryItemFields

Const defaultAdminInventoryItemFields: keyof InventoryItemDTO[]


defaultAdminInventoryItemRelations

Const defaultAdminInventoryItemRelations: never[] = []


defaultAdminLocationLevelFields

Const defaultAdminLocationLevelFields: keyof InventoryLevelDTO[]


defaultAdminNotificationsFields

Const defaultAdminNotificationsFields: string[]


defaultAdminNotificationsRelations

Const defaultAdminNotificationsRelations: string[]


defaultAdminPriceListFields

Const defaultAdminPriceListFields: string[]


defaultAdminPriceListRelations

Const defaultAdminPriceListRelations: string[]


defaultAdminPriceListRemoteQueryObject

Const defaultAdminPriceListRemoteQueryObject: Object

Type declaration

fieldsstring[]Required
price_list_rulesobjectRequired
price_list_rules.price_list_rule_valuesobjectRequired
price_list_rules.price_list_rule_values.fieldsstring[]Required
price_list_rules.rule_typeobjectRequired
price_list_rules.rule_type.fieldsstring[]Required
price_set_money_amountsobjectRequired
price_set_money_amounts.money_amountobjectRequired
price_set_money_amounts.money_amount.fieldsstring[]Required
price_set_money_amounts.price_setobjectRequired
price_set_money_amounts.price_set.variant_linkobjectRequired
price_set_money_amounts.price_set.variant_link.variantobjectRequired
price_set_money_amounts.price_set.variant_link.variant.fieldsstring[]Required

Default: defaultAdminProductRemoteQueryObject.variants.fields


defaultAdminProductCategoryRelations

Const defaultAdminProductCategoryRelations: string[]


defaultAdminProductFields

Const defaultAdminProductFields: keyof Product[]


defaultAdminProductRelations

Const defaultAdminProductRelations: string[]


defaultAdminProductRemoteQueryObject

Const defaultAdminProductRemoteQueryObject: Object

This is temporary.

Type declaration

categoriesobjectRequired
categories.fieldsstring[]Required
collectionobjectRequired
collection.fieldsstring[]Required
fieldskeyof Product[]Required

Default: defaultAdminProductFields

imagesobjectRequired
images.fieldsstring[]Required
optionsobjectRequired
options.fieldsstring[]Required
options.valuesobjectRequired
options.values.fieldsstring[]Required
profileobjectRequired
profile.fieldsstring[]Required
tagsobjectRequired
tags.fieldsstring[]Required
typeobjectRequired
type.fieldsstring[]Required
variantsobjectRequired
variants.fieldsstring[]Required
variants.optionsobjectRequired
variants.options.fieldsstring[]Required

defaultAdminProductTagsFields

Const defaultAdminProductTagsFields: string[]


defaultAdminProductTagsRelations

Const defaultAdminProductTagsRelations: never[] = []


defaultAdminProductTypeFields

Const defaultAdminProductTypeFields: string[]


defaultAdminProductTypeRelations

Const defaultAdminProductTypeRelations: never[] = []


defaultAdminRegionFields

Const defaultAdminRegionFields: keyof Region[]


defaultAdminRegionRelations

Const defaultAdminRegionRelations: string[]


defaultAdminReservationRelations

Const defaultAdminReservationRelations: never[] = []


defaultAdminReturnReasonsFields

Const defaultAdminReturnReasonsFields: keyof ReturnReason[]


defaultAdminReturnReasonsRelations

Const defaultAdminReturnReasonsRelations: keyof ReturnReason[]


defaultAdminShippingProfilesFields

Const defaultAdminShippingProfilesFields: keyof ShippingProfile[]


defaultAdminShippingProfilesRelations

Const defaultAdminShippingProfilesRelations: string[]


defaultAdminStockLocationFields

Const defaultAdminStockLocationFields: keyof StockLocationDTO[]


defaultAdminStockLocationRelations

Const defaultAdminStockLocationRelations: never[] = []


defaultAdminSwapFields

Const defaultAdminSwapFields: string[]


defaultAdminSwapRelations

Const defaultAdminSwapRelations: string[]


defaultAdminTaxRatesFields

Const defaultAdminTaxRatesFields: keyof TaxRate[]


defaultAdminTaxRatesRelations

Const defaultAdminTaxRatesRelations: never[] = []


defaultAdminVariantFields

Const defaultAdminVariantFields: keyof ProductVariant[]


defaultAdminVariantRelations

Const defaultAdminVariantRelations: string[]


defaultFields

Const defaultFields: keyof ShippingOption[]


defaultPaymentCollectionFields

Const defaultPaymentCollectionFields: string[]


defaultPaymentCollectionRelations

Const defaultPaymentCollectionRelations: string[]


defaultPaymentFields

Const defaultPaymentFields: string[]


defaultProductCategoryFields

Const defaultProductCategoryFields: string[]


defaultRelations

Const defaultRelations: string[]


defaultRelationsExtended

Const defaultRelationsExtended: string[]


defaultRelationsList

Const defaultRelationsList: string[]


defaultReservationFields

Const defaultReservationFields: string[]


defaultReturnCancelFields

Const defaultReturnCancelFields: keyof Order[]


defaultReturnCancelRelations

Const defaultReturnCancelRelations: string[]


defaultStoreCartFields

Const defaultStoreCartFields: keyof Cart[] = []


defaultStoreCartRelations

Const defaultStoreCartRelations: string[]


defaultStoreCategoryScope

Const defaultStoreCategoryScope: Object

Type declaration

is_activebooleanRequired

Default: true

is_internalbooleanRequired

Default: false


defaultStoreCollectionRelations

Const defaultStoreCollectionRelations: never[] = []


defaultStoreCustomersFields

Const defaultStoreCustomersFields: keyof Customer[]


defaultStoreCustomersRelations

Const defaultStoreCustomersRelations: string[]


defaultStoreGiftCardFields

Const defaultStoreGiftCardFields: keyof GiftCard[]


defaultStoreGiftCardRelations

Const defaultStoreGiftCardRelations: string[]


defaultStoreOrdersFields

Const defaultStoreOrdersFields: keyof Order[]


defaultStoreOrdersRelations

Const defaultStoreOrdersRelations: string[]


defaultStoreProductCategoryFields

Const defaultStoreProductCategoryFields: string[]


defaultStoreProductCategoryRelations

Const defaultStoreProductCategoryRelations: string[]


defaultStoreProductRemoteQueryObject

Const defaultStoreProductRemoteQueryObject: Object

This is temporary.

Type declaration

collectionobjectRequired
collection.fieldsstring[]Required
fieldskeyof Product[]Required

Default: defaultStoreProductsFields

imagesobjectRequired
images.fieldsstring[]Required
optionsobjectRequired
options.fieldsstring[]Required
options.valuesobjectRequired
options.values.fieldsstring[]Required
profileobjectRequired
profile.fieldsstring[]Required
tagsobjectRequired
tags.fieldsstring[]Required
typeobjectRequired
type.fieldsstring[]Required
variantsobjectRequired
variants.fieldsstring[]Required
variants.optionsobjectRequired
variants.options.fieldsstring[]Required

defaultStoreProductTagFields

Const defaultStoreProductTagFields: string[]


defaultStoreProductTagRelations

Const defaultStoreProductTagRelations: never[] = []


defaultStoreProductTypeFields

Const defaultStoreProductTypeFields: string[]


defaultStoreProductTypeRelations

Const defaultStoreProductTypeRelations: never[] = []


defaultStoreProductsFields

Const defaultStoreProductsFields: keyof Product[]


defaultStoreProductsRelations

Const defaultStoreProductsRelations: string[]


defaultStoreReturnReasonFields

Const defaultStoreReturnReasonFields: keyof ReturnReason[]


defaultStoreReturnReasonRelations

Const defaultStoreReturnReasonRelations: keyof ReturnReason[]


defaultStoreSwapFields

Const defaultStoreSwapFields: FindConfig<Swap>["select"]


defaultStoreSwapRelations

Const defaultStoreSwapRelations: string[]


defaultStoreVariantRelations

Const defaultStoreVariantRelations: string[]


filterableAdminOrdersFields

Const filterableAdminOrdersFields: string[]


joinerConfig

Const joinerConfig: ModuleJoinerConfig[]


Functions

DbAwareColumn

Parameters

columnOptionsColumnOptionsRequired

Returns

PropertyDecoratorPropertyDecoratorRequired

IsType

Parameters

typesany[]Required
validationOptionsValidationOptions

Returns

(object: Object, propertyName: string) => void(object: Object, propertyName: string) => void
Parameters
objectObjectRequired
propertyNamestringRequired
Returns
voidvoid

addOrderToSelect

Type Parameters

TEntityobjectRequired

Parameters

orderFindOptionsOrder<TEntity>Required
selectFindOptionsSelect<TEntity>Required

Returns

voidvoid

adjustInventoryForCancelledFulfillment

Parameters

fulfillmentFulfillmentRequired
A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns.
contextobjectRequired
context.productVariantInventoryServiceProductVariantInventoryServiceRequired

Returns

PromisePromise<void>Required

authenticate

Returns

RequestHandlerRequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required

authenticateCustomer

Returns

RequestHandlerRequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required

buildLegacyFieldsListFrom

Revert new object structure of find options to the legacy structure of previous version

Example

input: {
test: {
test1: true,
test2: true,
test3: {
test4: true
},
},
test2: true
}
output: ['test.test1', 'test.test2', 'test.test3.test4', 'test2']

Type Parameters

TEntityobjectRequired

Parameters

inputFindOptionsWhere<TEntity> | FindOptionsSelect<TEntity> | FindOptionsOrder<TEntity> | FindOptionsRelations<TEntity>Required

Default: {}

Returns

keyof TEntity[]keyof TEntity[]Required

Deprecated

in favor of import { objectToStringPath } from "@medusajs/utils"


buildQuery

Used to build TypeORM queries.

Type Parameters

TWhereKeysobjectRequired
TEntityobjectRequired

Parameters

selectorTWhereKeysRequired
The selector
configFindConfig<TEntity>Required
The config

Default: {}

Returns

ExtendedFindConfigExtendedFindConfig<TEntity>Required
The QueryBuilderConfig

calculatePriceTaxAmount

Return the tax amount that

  • is includes in the price if it is tax inclusive
  • will be applied on to the price if it is tax exclusive

Parameters

__namedParametersobjectRequired
__namedParameters.includesTaxboolean
__namedParameters.pricenumberRequired
__namedParameters.taxRatenumberRequired

Returns

numbernumber

canAccessBatchJob

Parameters

reqanyRequired
resanyRequired
nextanyRequired

Returns

PromisePromise<any>Required

categoryMatchesScope

Parameters

categoryProductCategoryRequired
A product category can be used to categorize products into a hierarchy of categories.
queryFindOptionsWhere<ProductCategory>Required

Returns

booleanboolean

cleanResponseData

Filter response data to contain props specified in the allowedProperties. You can read more in the transformQuery middleware utility methods.

Type Parameters

TunknownRequired

Parameters

dataTRequired
record or an array of records in the response
fieldsstring[]Required
record props allowed in the response

Returns

T extends [] ? Partial&#60;T&#62;[] : Partial&#60;T&#62;T extends [] ? Partial<T>[] : Partial<T>

csvCellContentFormatter

Parameters

strstringRequired

Returns

stringstring

csvRevertCellContentFormatter

Parameters

strstringRequired

Returns

stringstring

doesConditionBelongToDiscount

Parameters

reqanyRequired
resanyRequired
nextanyRequired

Returns

PromisePromise<any>Required

errorHandler

Returns

(err: MedusaError, req: Request&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;, res: Response&#60;any, Record&#60;string, any&#62;&#62;, next: NextFunction) => void(err: MedusaError, req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void
Parameters
errMedusaErrorRequired
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required
resResponse<any, Record<string, any>>Required
nextNextFunctionRequired
Returns
voidvoid

extendedFindParamsMixin

Parameters

__namedParametersobjectRequired

Default: {}

__namedParameters.limitnumber
__namedParameters.offsetnumber

Returns


fetchCategoryDescendantsIds

Parameters

productCategoryProductCategoryRequired
A product category can be used to categorize products into a hierarchy of categories.
queryFindOptionsWhere<ProductCategory>Required

Returns

string[]string[]Required

formatException

Parameters

erranyRequired

Returns

constructor(type: string, message: string, code?: string, ...params: any) => MedusaErrorRequired
codestring
dateDateRequired
messagestringRequired
typestringRequired
CodesobjectRequired
TypesobjectRequired

generateEntityId

Generate a composed id based on the input parameters and return either the is if it exists or the generated one.

Parameters

idPropertystringRequired
prefixstring

Returns

stringstring

getProductWithIsolatedProductModule

Parameters

reqanyRequired
idanyRequired
retrieveConfiganyRequired

Returns

PromisePromise<any>Required

getRequestedBatchJob

Parameters

reqanyRequired
resanyRequired
nextanyRequired

Returns

PromisePromise<any>Required

hasChanges

Compare two objects and return true if there is changes detected from obj2 compared to obj1

Type Parameters

T1ObjectRequired
T2ObjectRequired

Parameters

obj1T1Required
obj2T2Required

Returns

booleanboolean

isBatchJobStrategy

Parameters

objectunknownRequired

Returns

objectobject is IBatchJobStrategy

isCartCompletionStrategy

Parameters

objunknownRequired

Returns

booleanboolean

isDate

Parameters

valueanyRequired

Returns

valuevalue is Date

isFileService

Parameters

objectunknownRequired

Returns

booleanboolean

isNotificationService

Parameters

objunknownRequired

Returns

booleanboolean

isObject

Parameters

objanyRequired

Returns

objobj is object

isPaymentProcessor

Return if the input object is AbstractPaymentProcessor

Parameters

objunknownRequired

Returns

booleanboolean

isPaymentProcessorError

Utility function to determine if an object is a processor error

Parameters

objanyRequired

Returns

objobj is PaymentProcessorError

isPaymentService

Return if the input object is one of AbstractPaymentService or PaymentService or AbstractPaymentPluginService

Parameters

objunknownRequired

Returns

booleanboolean

isPriceSelectionStrategy

Parameters

objectanyRequired

Returns

objectobject is IPriceSelectionStrategy

isString

Parameters

valanyRequired

Returns

valval is string

isTaxCalculationStrategy

Parameters

objectanyRequired

Returns

objectobject is ITaxCalculationStrategy

listAndCountProductWithIsolatedProductModule

Parameters

reqanyRequired
filterableFieldsanyRequired
listConfiganyRequired

Returns

PromisePromise<any[]>Required

normalizeQuery

Normalize an input query, especially from array like query params to an array type e.g: /admin/orders/?fields[]=id,status,cart_id becomes { fields: ["id", "status", "cart_id"] }

Returns

(req: Request&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;, res: Response&#60;any, Record&#60;string, any&#62;&#62;, next: NextFunction) => void(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void
Parameters
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required
resResponse<any, Record<string, any>>Required
nextNextFunctionRequired
Returns
voidvoid

nullableValue

Parameters

valueanyRequired

Returns

FindOperatorFindOperator<any>Required

omitDeep

Type Parameters

TobjectRequired

Parameters

inputobjectRequired
excludes(string | number)[]Required

Returns

TTRequired

registerOverriddenValidators

When overriding a validator, you can register it to be used instead of the original one. For example, the place where you are overriding the core validator, you can call this function

Example

// /src/api/routes/admin/products/create-product.ts
import { registerOverriddenValidators } from "@medusajs/medusa"
import { AdminPostProductsReq as MedusaAdminPostProductsReq } from "@medusajs/medusa/dist/api/routes/admin/products/create-product"
import { IsString } from "class-validator"

class AdminPostProductsReq extends MedusaAdminPostProductsReq {
@IsString()
test: string
}

registerOverriddenValidators(AdminPostProductsReq)

Parameters

extendedValidatorConstructor<any>Required

Returns

voidvoid

remoteQueryFetchData

Parameters

containerMedusaContainerRequired

Returns

(expand: any, keyField: any, ids: any, relationship: any) => Promise&#60;any&#62;(expand: any, keyField: any, ids: any, relationship: any) => Promise<any>
Parameters
expandanyRequired
keyFieldanyRequired
idsanyRequired
relationshipanyRequired
Returns
PromisePromise<any>Required

removeUndefinedProperties

Type Parameters

TobjectRequired

Parameters

inputObjTRequired

Returns

TTRequired

requireCustomerAuthentication

Returns

RequestHandlerRequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required

reserveQuantityForDraftOrder

Parameters

orderOrderRequired
An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user.
contextobjectRequired
context.locationIdstring
context.productVariantInventoryServiceProductVariantInventoryServiceRequired

Returns

PromisePromise<void>Required

resolveDbGenerationStrategy

Parameters

pgSqlType"uuid" | "rowid" | "increment"Required

Returns

"increment" \| "uuid" \| "rowid""increment" | "uuid" | "rowid"

resolveDbType

Parameters

pgSqlTypeColumnTypeRequired

Returns

ColumnTypeColumnTypeRequired

setMetadata

Dedicated method to set metadata.

Parameters

objundefined | null | objectRequired
the entity to apply metadata to.
metadataRecord<string, unknown>Required
the metadata to set

Returns

RecordRecord<string, unknown>Required
resolves to the updated result.

transformBody

Type Parameters

TobjectRequired

Parameters

plainToClassClassConstructor<T>Required
configValidatorOptionsRequired

Returns

(req: Request, res: Response, next: NextFunction) => Promise&#60;void&#62;(req: Request, res: Response, next: NextFunction) => Promise<void>
Parameters
reqRequestRequired
resResponseRequired
nextNextFunctionRequired
Returns
PromisePromise<void>Required

transformIncludesOptions

Retrieve the includes options from the fields query param. If the include option is present then assigned it to includes on req

Parameters

allowedIncludesstring[]Required
The list of fields that can be passed and assign to req.includes

Default: []

expectedIncludesstring[]Required
The list of fields that the consumer can pass to the end point using this middleware. It is a subset of allowedIncludes

Default: []

Returns

(req: Request&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;, res: Response&#60;any, Record&#60;string, any&#62;&#62;, next: NextFunction) => void(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void
Parameters
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required
resResponse<any, Record<string, any>>Required
nextNextFunctionRequired
Returns
voidvoid

transformQuery

Middleware that transform the query input for the admin end points

Type Parameters

TEntityBaseEntityRequired

Parameters

plainToClassClassConstructor<T>Required
queryConfigOmit<QueryConfig<TEntity>, "allowedFields" | "allowedRelations">
configValidatorOptionsRequired

Default: {}

Returns

(req: Request, res: Response, next: NextFunction) => Promise&#60;void&#62;(req: Request, res: Response, next: NextFunction) => Promise<void>
Parameters
reqRequestRequired
resResponseRequired
nextNextFunctionRequired
Returns
PromisePromise<void>Required

transformStoreQuery

Middleware that transform the query input for the store endpoints

Type Parameters

TEntityBaseEntityRequired

Parameters

plainToClassClassConstructor<T>Required
queryConfigQueryConfig<TEntity>
configValidatorOptionsRequired

Default: {}

Returns

(req: Request, res: Response, next: NextFunction) => Promise&#60;void&#62;(req: Request, res: Response, next: NextFunction) => Promise<void>
Parameters
reqRequestRequired
resResponseRequired
nextNextFunctionRequired
Returns
PromisePromise<void>Required

unauthenticatedInviteRoutes

Parameters

appanyRequired

Returns

voidvoid

unauthenticatedUserRoutes

Parameters

appanyRequired

Returns

voidvoid

updateInventoryAndReservations

Parameters

fulfillmentsFulfillment[]Required
contextobjectRequired
context.inventoryServiceProductVariantInventoryServiceRequired
context.locationIdstringRequired

Returns

PromisePromise<void>Required

validateId

Parameters

rawIdstringRequired
configobjectRequired

Default: {}

config.lengthnumber
config.prefixstring

Returns

stringstring

validator

Type Parameters

TobjectRequired
VobjectRequired

Parameters

typedClassClassConstructor<T>Required
plainVRequired
configValidatorOptionsRequired

Default: {}

Returns

PromisePromise<T>Required

wrapHandler

Parameters

fnhandlerRequired

Returns

RequestHandlerRequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required

Deprecated

use import { wrapHandler } from "@medusajs/utils"

Was this section helpful?