Skip to main content
Skip to main content

internal

admin/discounts.internal.internal

Enumerations

Classes

Interfaces

References

Address

Re-exports Address


AddressCreatePayload

Re-exports AddressCreatePayload


AddressPayload

Re-exports AddressPayload


AdminAuthRes

Re-exports AdminAuthRes


AdminBatchJobListRes

Re-exports AdminBatchJobListRes


AdminBatchJobRes

Re-exports AdminBatchJobRes


AdminBearerAuthRes

Re-exports AdminBearerAuthRes


AdminCollectionsListRes

Re-exports AdminCollectionsListRes


AdminCollectionsRes

Re-exports AdminCollectionsRes


AdminCreateCondition

Re-exports AdminCreateCondition


AdminCurrenciesListRes

Re-exports AdminCurrenciesListRes


AdminCurrenciesRes

Re-exports AdminCurrenciesRes


AdminCustomerGroupsListRes

Re-exports AdminCustomerGroupsListRes


AdminCustomerGroupsRes

Re-exports AdminCustomerGroupsRes


AdminCustomersListRes

Re-exports AdminCustomersListRes


AdminCustomersRes

Re-exports AdminCustomersRes


AdminDeleteCustomerGroupsGroupCustomerBatchReq

Re-exports AdminDeleteCustomerGroupsGroupCustomerBatchReq


AdminDeleteDiscountsDiscountConditionsConditionBatchReq

Re-exports AdminDeleteDiscountsDiscountConditionsConditionBatchReq


AdminDeleteProductsFromCollectionReq

Re-exports AdminDeleteProductsFromCollectionReq


AdminDeleteProductsFromCollectionRes

Re-exports AdminDeleteProductsFromCollectionRes


AdminDiscountConditionsRes

Re-exports AdminDiscountConditionsRes


AdminDiscountsListRes

Re-exports AdminDiscountsListRes


AdminDiscountsRes

Re-exports AdminDiscountsRes


AdminGetBatchPaginationParams

Re-exports AdminGetBatchPaginationParams


AdminGetBatchParams

Re-exports AdminGetBatchParams


AdminGetCollectionsPaginationParams

Re-exports AdminGetCollectionsPaginationParams


AdminGetCollectionsParams

Re-exports AdminGetCollectionsParams


AdminGetCurrenciesParams

Re-exports AdminGetCurrenciesParams


AdminGetCustomerGroupsGroupParams

Re-exports AdminGetCustomerGroupsGroupParams


AdminGetCustomerGroupsParams

Re-exports AdminGetCustomerGroupsParams


AdminGetCustomersParams

Re-exports AdminGetCustomersParams


AdminGetDiscountsDiscountConditionsConditionParams

Re-exports AdminGetDiscountsDiscountConditionsConditionParams


AdminGetDiscountsParams

Re-exports AdminGetDiscountsParams


AdminPostAuthReq

Re-exports AdminPostAuthReq


AdminPostBatchesReq

Re-exports AdminPostBatchesReq


AdminPostCollectionsCollectionReq

Re-exports AdminPostCollectionsCollectionReq


AdminPostCollectionsReq

Re-exports AdminPostCollectionsReq


AdminPostCurrenciesCurrencyReq

Re-exports AdminPostCurrenciesCurrencyReq


AdminPostCustomerGroupsGroupCustomersBatchReq

Re-exports AdminPostCustomerGroupsGroupCustomersBatchReq


AdminPostCustomerGroupsGroupReq

Re-exports AdminPostCustomerGroupsGroupReq


AdminPostCustomerGroupsReq

Re-exports AdminPostCustomerGroupsReq


AdminPostCustomersCustomerReq

Re-exports AdminPostCustomersCustomerReq


AdminPostCustomersReq

Re-exports AdminPostCustomersReq


AdminPostDiscountsDiscountConditions

Re-exports AdminPostDiscountsDiscountConditions


AdminPostDiscountsDiscountConditionsCondition

Re-exports AdminPostDiscountsDiscountConditionsCondition


AdminPostDiscountsDiscountConditionsConditionBatchParams

Re-exports AdminPostDiscountsDiscountConditionsConditionBatchParams


AdminPostDiscountsDiscountConditionsConditionBatchReq

Re-exports AdminPostDiscountsDiscountConditionsConditionBatchReq


AdminPostDiscountsDiscountConditionsConditionParams

Re-exports AdminPostDiscountsDiscountConditionsConditionParams


AdminPostDiscountsDiscountConditionsParams

Re-exports AdminPostDiscountsDiscountConditionsParams


AdminPostDiscountsDiscountDynamicCodesReq

Re-exports AdminPostDiscountsDiscountDynamicCodesReq


AdminPostDiscountsDiscountReq

Re-exports AdminPostDiscountsDiscountReq


AdminPostDiscountsDiscountRule

Re-exports AdminPostDiscountsDiscountRule


AdminPostDiscountsReq

Re-exports AdminPostDiscountsReq


AdminPostProductsToCollectionReq

Re-exports AdminPostProductsToCollectionReq


AdminUpdateDiscountRule

Re-exports AdminUpdateDiscountRule


AdminUpsertCondition

Re-exports AdminUpsertCondition


AllocationType

Re-exports AllocationType


BaseEntity

Re-exports BaseEntity


BatchJob

Re-exports BatchJob


BatchJobResultError

Re-exports BatchJobResultError


BatchJobResultStatDescriptor

Re-exports BatchJobResultStatDescriptor


BatchJobStatus

Re-exports BatchJobStatus


Cart

Re-exports Cart


CartType

Re-exports CartType


ClaimFulfillmentStatus

Re-exports ClaimFulfillmentStatus


ClaimImage

Re-exports ClaimImage


ClaimItem

Re-exports ClaimItem


ClaimOrder

Re-exports ClaimOrder


ClaimPaymentStatus

Re-exports ClaimPaymentStatus


ClaimReason

Re-exports ClaimReason


ClaimTag

Re-exports ClaimTag


ClaimType

Re-exports ClaimType


Country

Re-exports Country


Currency

Re-exports Currency


Customer

Re-exports Customer


CustomerGroup

Re-exports CustomerGroup


DateComparisonOperator

Re-exports DateComparisonOperator


Discount

Re-exports Discount


DiscountCondition

Re-exports DiscountCondition


DiscountConditionOperator

Re-exports DiscountConditionOperator


DiscountConditionType

Re-exports DiscountConditionType


DiscountRule

Re-exports DiscountRule


DiscountRuleType

Re-exports DiscountRuleType


DraftOrder

Re-exports DraftOrder


DraftOrderStatus

Re-exports DraftOrderStatus


FindPaginationParams

Re-exports FindPaginationParams


FindParams

Re-exports FindParams


Fulfillment

Re-exports Fulfillment


FulfillmentItem

Re-exports FulfillmentItem


FulfillmentProvider

Re-exports FulfillmentProvider


FulfillmentStatus

Re-exports FulfillmentStatus


GiftCard

Re-exports GiftCard


GiftCardTransaction

Re-exports GiftCardTransaction


Image

Re-exports Image


LineItem

Re-exports LineItem


LineItemAdjustment

Re-exports LineItemAdjustment


LineItemTaxLine

Re-exports LineItemTaxLine


MoneyAmount

Re-exports MoneyAmount


Order

Re-exports Order


OrderEdit

Re-exports OrderEdit


OrderEditItemChangeType

Re-exports OrderEditItemChangeType


OrderEditStatus

Re-exports OrderEditStatus


OrderItemChange

Re-exports OrderItemChange


OrderStatus

Re-exports OrderStatus


PaginatedResponse

Re-exports PaginatedResponse


Payment

Re-exports Payment


PaymentCollection

Re-exports PaymentCollection


PaymentCollectionStatus

Re-exports PaymentCollectionStatus


PaymentProvider

Re-exports PaymentProvider


PaymentSession

Re-exports PaymentSession


PaymentStatus

Re-exports PaymentStatus


PriceList

Re-exports PriceList


PriceListStatus

Re-exports PriceListStatus


PriceListType

Re-exports PriceListType


Product

Re-exports Product


ProductCategory

Re-exports ProductCategory


ProductCollection

Re-exports ProductCollection


ProductOption

Re-exports ProductOption


ProductOptionValue

Re-exports ProductOptionValue


ProductStatus

Re-exports ProductStatus


ProductTag

Re-exports ProductTag


ProductType

Re-exports ProductType


ProductVariant

Re-exports ProductVariant


ProductVariantInventoryItem

Re-exports ProductVariantInventoryItem


Refund

Re-exports Refund


Region

Re-exports Region


RequirementType

Re-exports RequirementType


Return

Re-exports Return


ReturnItem

Re-exports ReturnItem


ReturnReason

Re-exports ReturnReason


ReturnStatus

Re-exports ReturnStatus


SalesChannel

Re-exports SalesChannel


SalesChannelLocation

Re-exports SalesChannelLocation


ShippingMethod

Re-exports ShippingMethod


ShippingMethodTaxLine

Re-exports ShippingMethodTaxLine


ShippingOption

Re-exports ShippingOption


ShippingOptionPriceType

Re-exports ShippingOptionPriceType


ShippingOptionRequirement

Re-exports ShippingOptionRequirement


ShippingProfile

Re-exports ShippingProfile


ShippingProfileType

Re-exports ShippingProfileType


SoftDeletableEntity

Re-exports SoftDeletableEntity


StorePostCustomersCustomerAddressesAddressReq

Re-exports StorePostCustomersCustomerAddressesAddressReq


StorePostCustomersCustomerAddressesReq

Re-exports StorePostCustomersCustomerAddressesReq


StringComparisonOperator

Re-exports StringComparisonOperator


Swap

Re-exports Swap


SwapFulfillmentStatus

Re-exports SwapFulfillmentStatus


SwapPaymentStatus

Re-exports SwapPaymentStatus


TaxProvider

Re-exports TaxProvider


TaxRate

Re-exports TaxRate


Re-exports TrackingLink


User

Re-exports User


UserRoles

Re-exports UserRoles

Type Aliases

AdminAnalyticsConfigDeleteRes

AdminAnalyticsConfigDeleteRes: DeleteResponse


AdminAnalyticsConfigRes

AdminAnalyticsConfigRes: Object

Type declaration

analytics_configAnalyticsConfigRequired

AdminCollectionsDeleteRes

AdminCollectionsDeleteRes: DeleteResponse

Schema

AdminCollectionsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Collection object: type: string description: The type of the object that was deleted. default: product-collection deleted: type: boolean description: Whether the collection was deleted successfully or not. default: true

AdminCustomerGroupsDeleteRes

AdminCustomerGroupsDeleteRes: DeleteResponse

Schema

AdminCustomerGroupsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted customer group. object: type: string description: The type of the object that was deleted. default: customer_group deleted: type: boolean description: Whether the customer group was deleted successfully or not. default: true

AdminDeleteShippingProfileRes

AdminDeleteShippingProfileRes: DeleteResponse

Schema

AdminDeleteShippingProfileRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Shipping Profile. object: type: string description: The type of the object that was deleted. default: shipping_profile deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminDeleteUploadsRes

AdminDeleteUploadsRes: DeleteResponse

Schema

AdminDeleteUploadsRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The file key of the upload deleted object: type: string description: The type of the object that was deleted. default: file deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminDeleteUserRes

AdminDeleteUserRes: DeleteResponse

Schema

AdminDeleteUserRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted user. object: type: string description: The type of the object that was deleted. default: user deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminDiscountConditionsDeleteRes

AdminDiscountConditionsDeleteRes: DeleteResponse & { discount: Discount }

Schema

AdminDiscountConditionsDeleteRes type: object required:

  • id
  • object
  • deleted
  • discount properties: id: type: string description: The ID of the deleted Discount Condition object: type: string description: The type of the object that was deleted. default: discount-condition deleted: type: boolean description: Whether the discount condition was deleted successfully. default: true discount: description: The Discount to which the condition used to belong to. $ref: "#/components/schemas/Discount"

AdminDiscountsDeleteRes

AdminDiscountsDeleteRes: DeleteResponse

Schema

AdminDiscountsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Discount object: type: string description: The type of the object that was deleted. default: discount deleted: type: boolean description: Whether the discount was deleted successfully. default: true

AdminDraftOrdersDeleteRes

AdminDraftOrdersDeleteRes: DeleteResponse

Schema

AdminDraftOrdersDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Draft Order. object: type: string description: The type of the object that was deleted. default: draft-order deleted: type: boolean description: Whether the draft order was deleted successfully. default: true

AdminDraftOrdersListRes

AdminDraftOrdersListRes: PaginatedResponse & { draft_orders: DraftOrder[] }

Schema

AdminDraftOrdersListRes type: object x-expanded-relations: field: draft_orders relations:

- order
- cart
- cart.items
- cart.items.adjustments

required:

  • draft_orders
  • count
  • offset
  • limit properties: draft_orders: type: array description: An array of draft order's details. items: $ref: "#/components/schemas/DraftOrder" count: type: integer description: The total number of items available offset: type: integer description: The number of draft orders skipped when retrieving the draft orders. limit: type: integer description: The number of items per page

AdminDraftOrdersRes

AdminDraftOrdersRes: Object

Schema

AdminDraftOrdersRes type: object x-expanded-relations: field: draft_order relations:

- order
- cart
- cart.items
- cart.items.adjustments
- cart.billing_address
- cart.customer
- cart.discounts
- cart.discounts.rule
- cart.items
- cart.items.adjustments
- cart.payment
- cart.payment_sessions
- cart.region
- cart.region.payment_providers
- cart.shipping_address
- cart.shipping_methods
- cart.shipping_methods.shipping_option

eager:

- cart.region.fulfillment_providers
- cart.region.payment_providers
- cart.shipping_methods.shipping_option

implicit:

- cart.discounts
- cart.discounts.rule
- cart.gift_cards
- cart.items
- cart.items.adjustments
- cart.items.tax_lines
- cart.items.variant
- cart.items.variant.product
- cart.items.variant.product.profiles
- cart.region
- cart.region.tax_rates
- cart.shipping_address
- cart.shipping_methods
- cart.shipping_methods.tax_lines

totals:

- cart.discount_total
- cart.gift_card_tax_total
- cart.gift_card_total
- cart.item_tax_total
- cart.refundable_amount
- cart.refunded_total
- cart.shipping_tax_total
- cart.shipping_total
- cart.subtotal
- cart.tax_total
- cart.total
- cart.items.discount_total
- cart.items.gift_card_total
- cart.items.original_tax_total
- cart.items.original_total
- cart.items.refundable
- cart.items.subtotal
- cart.items.tax_total
- cart.items.total

required:

  • draft_order properties: draft_order: description: Draft order's details. $ref: "#/components/schemas/DraftOrder"

Type declaration

draft_orderDraftOrderRequired

AdminExtendedStoresRes

AdminExtendedStoresRes: Object

Schema

AdminExtendedStoresRes type: object x-expanded-relations: field: store relations:

- currencies
- default_currency

required:

  • store properties: store: description: Store details. $ref: "#/components/schemas/ExtendedStoreDTO"

Type declaration

storeExtendedStoreDTORequired

AdminGetVariantsVariantInventoryRes

AdminGetVariantsVariantInventoryRes: Object

Schema

The product variant's.

Type declaration

variantVariantInventoryRequired

AdminGiftCardsDeleteRes

AdminGiftCardsDeleteRes: DeleteResponse

Schema

AdminGiftCardsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Gift Card object: type: string description: The type of the object that was deleted. default: gift-card deleted: type: boolean description: Whether the gift card was deleted successfully. default: true

AdminGiftCardsListRes

AdminGiftCardsListRes: PaginatedResponse & { gift_cards: GiftCard[] }

Schema

AdminGiftCardsListRes type: object x-expanded-relations: field: gift_cards relations:

- order
- region

eager:

- region.fulfillment_providers
- region.payment_providers

required:

  • gift_cards
  • count
  • offset
  • limit properties: gift_cards: type: array items: $ref: "#/components/schemas/GiftCard" count: type: integer description: The total number of items available offset: type: integer description: The number of gift cards skipped when retrieving the gift cards. limit: type: integer description: The number of items per page

AdminGiftCardsRes

AdminGiftCardsRes: Object

Schema

A gift card's details.

Type declaration

gift_cardGiftCardRequired

AdminInventoryItemsDeleteRes

AdminInventoryItemsDeleteRes: DeleteResponse

Schema

AdminInventoryItemsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Inventory Item. object: type: string description: The type of the object that was deleted. format: inventory_item deleted: type: boolean description: Whether or not the Inventory Item was deleted. default: true

AdminInventoryItemsListRes

AdminInventoryItemsListRes: PaginatedResponse & { inventory_items: InventoryItemDTO[] }

Schema

AdminInventoryItemsListRes type: object required:

  • inventory_items
  • count
  • offset
  • limit properties: inventory_items: type: array description: an array of Inventory Item details items: $ref: "#/components/schemas/InventoryItemDTO" count: type: integer description: The total number of items available offset: type: integer description: The number of inventory items skipped when retrieving the inventory items. limit: type: integer description: The number of items per page

AdminInventoryItemsListWithVariantsAndLocationLevelsRes

AdminInventoryItemsListWithVariantsAndLocationLevelsRes: PaginatedResponse & { inventory_items: DecoratedInventoryItemDTO[] }

Schema

AdminInventoryItemsListWithVariantsAndLocationLevelsRes type: object required:

  • inventory_items
  • count
  • offset
  • limit properties: inventory_items: type: array description: an array of Inventory Item details items: $ref: "#/components/schemas/DecoratedInventoryItemDTO" count: type: integer description: The total number of items available offset: type: integer description: The number of inventory items skipped when retrieving the inventory items. limit: type: integer description: The number of items per page

AdminInventoryItemsLocationLevelsRes

AdminInventoryItemsLocationLevelsRes: Object

Schema

AdminInventoryItemsLocationLevelsRes type: object required:

  • inventory_item properties: inventory_item: type: object required:
      - id
    - location_levels
    properties:
    id:
    description: The id of the location
    location_levels:
    description: List of stock levels at a given location
    type: array
    items:
    $ref: "#/components/schemas/InventoryLevelDTO"

Type declaration

inventory_itemobjectRequired
inventory_item.idanyRequired
inventory_item.location_levelsInventoryLevelDTO[]Required

AdminInventoryItemsRes

AdminInventoryItemsRes: Object

Schema

AdminInventoryItemsRes type: object required:

  • inventory_item properties: inventory_item: description: Inventory Item details $ref: "#/components/schemas/InventoryItemDTO"

Type declaration

inventory_itemInventoryItemDTORequired

AdminInviteDeleteRes

AdminInviteDeleteRes: DeleteResponse

Schema

AdminInviteDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Invite. object: type: string description: The type of the object that was deleted. default: invite deleted: type: boolean description: Whether or not the invite was deleted. default: true

AdminListInvitesRes

AdminListInvitesRes: Object

Schema

AdminListInvitesRes type: object required:

  • invites properties: invites: type: array description: An array of invites items: $ref: "#/components/schemas/Invite"

Type declaration

invitesInvite[]Required

AdminNotesDeleteRes

AdminNotesDeleteRes: DeleteResponse

Schema

AdminNotesDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Note. object: type: string description: The type of the object that was deleted. default: note deleted: type: boolean description: Whether or not the Note was deleted. default: true

AdminNotesListRes

AdminNotesListRes: PaginatedResponse & { notes: Note[] }

Schema

AdminNotesListRes type: object required:

  • notes
  • count
  • offset
  • limit properties: notes: type: array description: An array of notes items: $ref: "#/components/schemas/Note" count: type: integer description: The total number of items available offset: type: integer description: The number of notes skipped when retrieving the notes. limit: type: integer description: The number of items per page

AdminNotesRes

AdminNotesRes: Object

Schema

AdminNotesRes type: object required:

  • note properties: note: description: Note details. $ref: "#/components/schemas/Note"

Type declaration

noteNoteRequired

AdminNotificationsListRes

AdminNotificationsListRes: PaginatedResponse & { notifications: Notification[] }

Schema

AdminNotificationsListRes type: object x-expanded-relations: field: notifications relations:

- resends

required:

  • notifications properties: notifications: type: array description: an array of notifications items: $ref: "#/components/schemas/Notification" count: type: integer description: The total number of notifications offset: type: integer description: The number of notifications skipped when retrieving the notifications. limit: type: integer description: The number of notifications per page

AdminNotificationsRes

AdminNotificationsRes: Object

Schema

AdminNotificationsRes type: object x-expanded-relations: field: notification relations:

- resends

required:

  • notification properties: notification: description: Notification details $ref: "#/components/schemas/Notification"

Type declaration

notificationNotificationRequired

AdminOrderEditDeleteRes

AdminOrderEditDeleteRes: DeleteResponse

Schema

AdminOrderEditDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Order Edit. object: type: string description: The type of the object that was deleted. default: order_edit deleted: type: boolean description: Whether or not the Order Edit was deleted. default: true

AdminOrderEditItemChangeDeleteRes

AdminOrderEditItemChangeDeleteRes: Object

Schema

AdminOrderEditItemChangeDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Order Edit Item Change. object: type: string description: The type of the object that was deleted. default: item_change deleted: type: boolean description: Whether or not the Order Edit Item Change was deleted. default: true

Type declaration

deletedbooleanRequired
idstringRequired
object"item_change"Required

AdminOrderEditsListRes

AdminOrderEditsListRes: PaginatedResponse & { order_edits: OrderEdit[] }

Schema

An array of order edit details


AdminOrderEditsRes

AdminOrderEditsRes: Object

Schema

Order edit details

Type declaration

order_editOrderEditRequired

AdminOrdersListRes

AdminOrdersListRes: PaginatedResponse & { orders: Order[] }

Schema

An array of order details.


AdminOrdersRes

AdminOrdersRes: Object

Schema

Order details.

Type declaration

orderOrderRequired

AdminPaymentCollectionDeleteRes

AdminPaymentCollectionDeleteRes: Object

Schema

AdminPaymentCollectionDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Payment Collection. object: type: string description: The type of the object that was deleted. default: payment_collection deleted: type: boolean description: Whether or not the Payment Collection was deleted. default: true

Type declaration

deletedbooleanRequired
idstringRequired
object"payment_collection"Required

AdminPaymentCollectionsRes

AdminPaymentCollectionsRes: Object

Schema

AdminPaymentCollectionsRes type: object x-expanded-relations: field: payment_collection relations:

- payment_sessions
- payments
- region

eager:

- region.fulfillment_providers
- region.payment_providers

required:

  • payment_collection properties: payment_collection: description: Payment Collection details. $ref: "#/components/schemas/PaymentCollection"

Type declaration

payment_collectionPaymentCollectionRequired

AdminPaymentProvidersList

AdminPaymentProvidersList: Object

Schema

AdminPaymentProvidersList type: object required:

  • payment_providers properties: payment_providers: type: array description: An array of payment providers details. items: $ref: "#/components/schemas/PaymentProvider"

Type declaration

payment_providersPaymentProvider[]Required

AdminPaymentRes

AdminPaymentRes: Object

Schema

Payment details

Type declaration

paymentPaymentRequired

AdminPostDraftOrdersDraftOrderRegisterPaymentRes

AdminPostDraftOrdersDraftOrderRegisterPaymentRes: Object

Schema

AdminPostDraftOrdersDraftOrderRegisterPaymentRes type: object required:

  • order properties: order: description: Order's details. $ref: "#/components/schemas/Order"

Type declaration

orderOrderRequired

AdminPriceListDeleteBatchRes

AdminPriceListDeleteBatchRes: Object

Schema

AdminPriceListDeleteBatchRes type: object required:

  • ids
  • object
  • deleted properties: ids: type: array items: type: string description: The IDs of the deleted prices. object: type: string description: The type of the object that was deleted. A price is also named money-amount. default: money-amount deleted: type: boolean description: Whether or not the items were deleted. default: true

Type declaration

deletedbooleanRequired
idsstring[]Required
objectstringRequired

AdminPriceListDeleteProductPricesRes

AdminPriceListDeleteProductPricesRes: AdminPriceListDeleteBatchRes

Schema

AdminPriceListDeleteProductPricesRes type: object required:

  • ids
  • object
  • deleted properties: ids: type: array description: The IDs of the deleted prices. items: type: string object: type: string description: The type of the object that was deleted. A price is also named money-amount. default: money-amount deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminPriceListDeleteRes

AdminPriceListDeleteRes: DeleteResponse

Schema

AdminPriceListDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Price List. object: type: string description: The type of the object that was deleted. default: price-list deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminPriceListDeleteVariantPricesRes

AdminPriceListDeleteVariantPricesRes: AdminPriceListDeleteBatchRes

Schema

AdminPriceListDeleteVariantPricesRes type: object required:

  • ids
  • object
  • deleted properties: ids: type: array description: The IDs of the deleted prices. items: type: string object: type: string description: The type of the object that was deleted. A price is also named money-amount. default: money-amount deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminPriceListRes

AdminPriceListRes: Object

Schema

Price List details.

Type declaration

price_listPriceListRequired

AdminPriceListsListRes

AdminPriceListsListRes: PaginatedResponse & { price_lists: PriceList[] }

Schema

An array of price lists details.


AdminPriceListsProductsListRes

AdminPriceListsProductsListRes: PaginatedResponse & { products: Product[] }

Schema

An array of products details.


AdminProductCategoriesCategoryDeleteRes

AdminProductCategoriesCategoryDeleteRes: DeleteResponse

Schema

AdminProductCategoriesCategoryDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted product category object: type: string description: The type of the object that was deleted. default: product-category deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminProductCategoriesCategoryRes

AdminProductCategoriesCategoryRes: Object

Schema

Product category details.

Type declaration

product_categoryProductCategoryRequired

AdminProductCategoriesListRes

AdminProductCategoriesListRes: PaginatedResponse & { product_categories: ProductCategory[] }

Schema

An array of product category details.


AdminProductTagsListRes

AdminProductTagsListRes: PaginatedResponse & { product_tags: ProductTag[] }

Schema

An array of product tag details.


AdminProductTypesListRes

AdminProductTypesListRes: PaginatedResponse & { product_types: ProductType[] }

Schema

AdminProductTypesListRes type: object required:

  • product_types
  • count
  • offset
  • limit properties: product_types: type: array description: An array of product types details. items: $ref: "#/components/schemas/ProductType" count: type: integer description: The total number of items available offset: type: integer description: The number of product types skipped when retrieving the product types. limit: type: integer description: The number of items per page

AdminProductsDeleteOptionRes

AdminProductsDeleteOptionRes: Object

Schema

AdminProductsDeleteOptionRes type: object x-expanded-relations: field: product relations:

- collection
- images
- options
- tags
- type
- variants
- variants.options
- variants.prices

required:

  • option_id
  • object
  • deleted
  • product properties: option_id: type: string description: The ID of the deleted Product Option object: type: string description: The type of the object that was deleted. default: option deleted: type: boolean description: Whether or not the items were deleted. default: true product: description: Product details. $ref: "#/components/schemas/PricedProduct"

Type declaration

deletedbooleanRequired
object"option"Required
option_idstringRequired
productProductRequired

AdminProductsDeleteRes

AdminProductsDeleteRes: Object

Schema

AdminProductsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Product. object: type: string description: The type of the object that was deleted. default: product deleted: type: boolean description: Whether or not the items were deleted. default: true

Type declaration

deletedbooleanRequired
idstringRequired
object"product"Required

AdminProductsDeleteVariantRes

AdminProductsDeleteVariantRes: Object

Schema

AdminProductsDeleteVariantRes type: object x-expanded-relations: field: product relations:

- collection
- images
- options
- tags
- type
- variants
- variants.options
- variants.prices

required:

  • variant_id
  • object
  • deleted
  • product properties: variant_id: type: string description: The ID of the deleted Product Variant. object: type: string description: The type of the object that was deleted. default: product-variant deleted: type: boolean description: Whether or not the items were deleted. default: true product: description: Product details. $ref: "#/components/schemas/PricedProduct"

Type declaration

deletedbooleanRequired
object"product-variant"Required
productProductRequired
variant_idstringRequired

AdminProductsListRes

AdminProductsListRes: PaginatedResponse & { products: (PricedProduct | Product)[] }

Schema

AdminProductsListRes type: object x-expanded-relations: field: products relations:

- collection
- images
- options
- tags
- type
- variants
- variants.options
- variants.prices

totals:

- variants.purchasable

required:

  • products
  • count
  • offset
  • limit properties: products: type: array description: An array of products details. items: $ref: "#/components/schemas/PricedProduct" count: type: integer description: The total number of items available offset: type: integer description: The number of products skipped when retrieving the products. limit: type: integer description: The number of items per page

AdminProductsListTagsRes

AdminProductsListTagsRes: Object

Schema

AdminProductsListTagsRes type: object required:

  • tags properties: tags: description: An array of product tags details. type: array items: type: object required:
        - id
    - usage_count
    - value
    properties:
    id:
    description: The ID of the tag.
    type: string
    usage_count:
    description: The number of products that use this tag.
    type: string
    value:
    description: The value of the tag.
    type: string

Type declaration

tagsPick<ProductTag, "id" | "value"> & { usage_count: number }[]Required

AdminProductsListTypesRes

AdminProductsListTypesRes: Object

Schema

AdminProductsListTypesRes type: object required:

  • types properties: types: type: array description: An array of product types details. items: $ref: "#/components/schemas/ProductType"

Type declaration

typesProductType[]Required

AdminProductsListVariantsRes

AdminProductsListVariantsRes: PaginatedResponse & { variants: ProductVariant[] }

Schema

AdminProductsListVariantsRes type: object required:

  • variants
  • count
  • offset
  • limit properties: variants: type: array description: An array of product variants details. items: $ref: "#/components/schemas/ProductVariant" count: type: integer description: The total number of items available offset: type: integer description: The number of product variants skipped when retrieving the product variants. limit: type: integer description: The number of items per page

AdminProductsRes

AdminProductsRes: Object

Schema

AdminProductsRes type: object x-expanded-relations: field: product relations:

- collection
- images
- options
- tags
- type
- variants
- variants.options
- variants.prices

required:

  • product properties: product: description: Product details. $ref: "#/components/schemas/PricedProduct"

Type declaration

productProductRequired

AdminPublishableApiKeyDeleteRes

AdminPublishableApiKeyDeleteRes: DeleteResponse

Schema

AdminPublishableApiKeyDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted publishable API key. object: type: string description: The type of the object that was deleted. default: publishable_api_key deleted: type: boolean description: Whether the publishable API key was deleted. default: true

AdminPublishableApiKeysListRes

AdminPublishableApiKeysListRes: PaginatedResponse & { publishable_api_keys: PublishableApiKey[] }

Schema

An array of publishable API keys details.


AdminPublishableApiKeysListSalesChannelsRes

AdminPublishableApiKeysListSalesChannelsRes: Object

Schema

An array of sales channels details.

Type declaration

sales_channelsSalesChannel[]Required

AdminPublishableApiKeysRes

AdminPublishableApiKeysRes: Object

Schema

Publishable API key details.

Type declaration

publishable_api_keyPublishableApiKeyRequired

AdminRefundRes

AdminRefundRes: Object

Schema

Refund details

Type declaration

refundRefundRequired

AdminRegionsDeleteRes

AdminRegionsDeleteRes: DeleteResponse

Schema

AdminRegionsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Region. object: type: string description: The type of the object that was deleted. default: region deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminRegionsListRes

AdminRegionsListRes: PaginatedResponse & { regions: Region[] }

Schema

An array of regions details.


AdminReservationsDeleteRes

AdminReservationsDeleteRes: DeleteResponse

Schema

AdminReservationsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Reservation. object: type: string description: The type of the object that was deleted. default: reservation deleted: type: boolean description: Whether or not the Reservation was deleted. default: true

AdminReservationsListRes

AdminReservationsListRes: PaginatedResponse & { reservations: ReservationItemDTO[] }

Schema

AdminReservationsListRes type: object required:

  • reservations
  • count
  • offset
  • limit properties: reservations: type: array description: An array of reservations details. items: $ref: "#/components/schemas/ExtendedReservationItem" count: type: integer description: The total number of items available offset: type: integer description: The number of reservations skipped when retrieving the reservations. limit: type: integer description: The number of items per page

AdminReservationsRes

AdminReservationsRes: Object

Schema

AdminReservationsRes type: object required:

  • reservation properties: reservation: description: Reservation details. $ref: "#/components/schemas/ReservationItemDTO"

Type declaration

reservationReservationItemDTORequired

AdminReturnReasonsDeleteRes

AdminReturnReasonsDeleteRes: DeleteResponse

Schema

AdminReturnReasonsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted return reason object: type: string description: The type of the object that was deleted. default: return_reason deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminReturnReasonsListRes

AdminReturnReasonsListRes: Object

Schema

AdminReturnReasonsListRes type: object x-expanded-relations: field: return_reasons relations:

- parent_return_reason
- return_reason_children

required:

  • return_reasons properties: return_reasons: type: array items: $ref: "#/components/schemas/ReturnReason"

Type declaration

return_reasonsReturnReason[]Required

AdminReturnReasonsRes

AdminReturnReasonsRes: Object

Schema

AdminReturnReasonsRes type: object x-expanded-relations: field: return_reason relations:

- parent_return_reason
- return_reason_children

required:

  • return_reason properties: return_reason: $ref: "#/components/schemas/ReturnReason"

Type declaration

return_reasonReturnReasonRequired

AdminReturnsCancelRes

AdminReturnsCancelRes: Object

Schema

AdminReturnsCancelRes type: object x-expanded-relations: field: order relations:

- billing_address
- claims
- claims.additional_items
- claims.additional_items.variant
- claims.claim_items
- claims.claim_items.images
- claims.claim_items.item
- claims.fulfillments
- claims.fulfillments.tracking_links
- claims.return_order
- claims.return_order.shipping_method
- claims.return_order.shipping_method.tax_lines
- claims.shipping_address
- claims.shipping_methods
- customer
- discounts
- discounts.rule
- fulfillments
- fulfillments.items
- fulfillments.tracking_links
- gift_card_transactions
- gift_cards
- items
- payments
- refunds
- region
- returns
- returns.items
- returns.items.reason
- returns.shipping_method
- returns.shipping_method.tax_lines
- shipping_address
- shipping_methods
- swaps
- swaps.additional_items
- swaps.additional_items.variant
- swaps.fulfillments
- swaps.fulfillments.tracking_links
- swaps.payment
- swaps.return_order
- swaps.return_order.shipping_method
- swaps.return_order.shipping_method.tax_lines
- swaps.shipping_address
- swaps.shipping_methods
- swaps.shipping_methods.tax_lines

required:

  • order properties: order: description: Order details. $ref: "#/components/schemas/Order"

Type declaration

orderOrderRequired

AdminReturnsListRes

AdminReturnsListRes: PaginatedResponse & { returns: Return[] }

Schema

AdminReturnsListRes type: object x-expanded-relation: field: returns relations:

- order
- swap

required:

  • returns
  • count
  • offset
  • limit properties: returns: type: array description: An array of returns details. items: $ref: "#/components/schemas/Return" count: type: integer description: The total number of items available offset: type: integer description: The number of returns skipped when retrieving the returns. limit: type: integer description: The number of items per page

AdminReturnsRes

AdminReturnsRes: Object

Schema

AdminReturnsRes type: object x-expanded-relation: field: return relations:

- swap

required:

  • return properties: return: description: Return details. $ref: "#/components/schemas/Return"

Type declaration

returnReturnRequired

AdminSalesChannelsDeleteLocationRes

AdminSalesChannelsDeleteLocationRes: DeleteResponse

Schema

AdminSalesChannelsDeleteLocationRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the removed stock location from a sales channel object: type: string description: The type of the object that was removed. default: stock-location deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminSalesChannelsDeleteRes

AdminSalesChannelsDeleteRes: DeleteResponse

Schema

AdminSalesChannelsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted sales channel object: type: string description: The type of the object that was deleted. default: sales-channel deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminSalesChannelsListRes

AdminSalesChannelsListRes: PaginatedResponse & { sales_channels: SalesChannel[] }

Schema

An array of sales channels details.


AdminSalesChannelsRes

AdminSalesChannelsRes: Object

Schema

AdminSalesChannelsRes type: object required:

  • sales_channel properties: sales_channel: description: Sales Channel's details. $ref: "#/components/schemas/SalesChannel"

Type declaration

sales_channelSalesChannelRequired

AdminShippingOptionsDeleteRes

AdminShippingOptionsDeleteRes: DeleteResponse

Schema

AdminShippingOptionsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Shipping Option. object: type: string description: The type of the object that was deleted. default: shipping-option deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminShippingOptionsListRes

AdminShippingOptionsListRes: PaginatedResponse & { shipping_options: ShippingOption[] }

Schema

An array of shipping options details.


AdminShippingOptionsRes

AdminShippingOptionsRes: Object

Schema

Shipping option details.

Type declaration

shipping_optionShippingOptionRequired

AdminShippingProfilesListRes

AdminShippingProfilesListRes: Object

Schema

AdminShippingProfilesListRes type: object required:

  • shipping_profiles properties: shipping_profiles: type: array description: An array of shipping profiles details. items: $ref: "#/components/schemas/ShippingProfile"

Type declaration

shipping_profilesShippingProfile[]Required

AdminShippingProfilesRes

AdminShippingProfilesRes: Object

Schema

AdminShippingProfilesRes type: object x-expanded-relations: field: shipping_profile relations:

- products
- shipping_options

required:

  • shipping_profile properties: shipping_profile: description: Shipping profile details. $ref: "#/components/schemas/ShippingProfile"

Type declaration

shipping_profileShippingProfileRequired

AdminStockLocationsDeleteRes

AdminStockLocationsDeleteRes: DeleteResponse

Schema

AdminStockLocationsDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Stock Location. object: type: string description: The type of the object that was deleted. default: stock_location deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminStockLocationsListRes

AdminStockLocationsListRes: PaginatedResponse & { stock_locations: StockLocationExpandedDTO[] }

Schema

AdminStockLocationsListRes type: object required:

  • stock_locations
  • count
  • offset
  • limit properties: stock_locations: type: array items: $ref: "#/components/schemas/StockLocationExpandedDTO" count: type: integer description: The total number of items available offset: type: integer description: The number of stock locations skipped when retrieving the stock locations. limit: type: integer description: The number of items per page

AdminStockLocationsRes

AdminStockLocationsRes: Object

Schema

Stock location details.

Type declaration

stock_locationStockLocationExpandedDTORequired

AdminStoresRes

AdminStoresRes: Object

Schema

AdminStoresRes type: object required:

  • store properties: store: description: Store details. $ref: "#/components/schemas/Store"

Type declaration

storeStoreRequired

AdminSwapsListRes

AdminSwapsListRes: PaginatedResponse & { swaps: Swap[] }

Schema

An array of swaps details.


AdminSwapsRes

AdminSwapsRes: Object

Schema

Swap details.

Type declaration

swapSwapRequired

AdminTaxProvidersList

AdminTaxProvidersList: Object

Schema

AdminTaxProvidersList type: object required:

  • tax_providers properties: tax_providers: type: array description: An array of tax providers details. items: $ref: "#/components/schemas/TaxProvider"

Type declaration

tax_providersTaxProvider[]Required

AdminTaxRatesDeleteRes

AdminTaxRatesDeleteRes: DeleteResponse

Schema

AdminTaxRatesDeleteRes type: object required:

  • id
  • object
  • deleted properties: id: type: string description: The ID of the deleted Shipping Option. object: type: string description: The type of the object that was deleted. default: tax-rate deleted: type: boolean description: Whether or not the items were deleted. default: true

AdminTaxRatesListRes

AdminTaxRatesListRes: PaginatedResponse & { tax_rates: TaxRate[] }

Schema

An array of tax rate details.


AdminTaxRatesRes

AdminTaxRatesRes: Object

Schema

Tax rate details.

Type declaration

tax_rateTaxRateRequired

AdminUploadsDownloadUrlRes

AdminUploadsDownloadUrlRes: Object

Schema

AdminUploadsDownloadUrlRes type: object required:

  • download_url properties: download_url: description: The Download URL of the file type: string

Type declaration

download_urlstringRequired

AdminUploadsRes

AdminUploadsRes: Object

Schema

Uploaded files details.

Type declaration

uploadsFileServiceUploadResult[]Required

AdminUserRes

AdminUserRes: Object

Schema

User details.

Type declaration

userOmit<User, "password_hash">Required

AdminUsersListRes

AdminUsersListRes: Object

Schema

An array of users details.

Type declaration

usersOmit<User, "password_hash">[]Required

AdminVariantsListRes

AdminVariantsListRes: PaginatedResponse & { variants: PricedVariant[] }

Schema

An array of product variant details.


AdminVariantsRes

AdminVariantsRes: Object

Schema

Product variant's details.

Type declaration

variantPricedVariantRequired

BatchJobCreateProps

BatchJobCreateProps: Pick<BatchJob, "context" | "type" | "created_by" | "dry_run">


BatchJobUpdateProps

BatchJobUpdateProps: Partial<Pick<BatchJob, "context" | "result">>


CartCompletionResponse

CartCompletionResponse: Object

Type declaration

response_bodyRecord<string, unknown>Required
The response body for the completion request
response_codenumberRequired
The response code for the completion request

ClassConstructor

ClassConstructor<T>: (...args: unknown[]) => T

Type parameters

TobjectRequired

Type declaration

new ClassConstructor(...args): T

Parameters
argsunknown[]Required
Returns

T


ConfigModule

ConfigModule: ConfigModule


Constructor

Constructor<T>: Object

Type parameters

TobjectRequired

CreateBatchJobInput

CreateBatchJobInput: Object

Type declaration

contextBatchJob["context"]Required
dry_runbooleanRequired
typestringRequired

CreatePriceListInput

CreatePriceListInput: Object

Type declaration

customer_groups{ id: string }[]
descriptionstringRequired
ends_atDate
includes_taxboolean
namestringRequired
starts_atDate
typePriceListTypeRequired

Data

Data: Record<string, unknown>


DecoratedInventoryItemDTO

DecoratedInventoryItemDTO: InventoryItemDTO & { location_levels?: InventoryLevelDTO[] ; reserved_quantity: number ; stocked_quantity: number ; variants?: ProductVariant[] }

Schema

DecoratedInventoryItemDTO type: object allOf:

  • $ref: "#/components/schemas/InventoryItemDTO"
  • type: object required:
    • stocked_quantity
    • reserved_quantity properties: location_levels: type: array description: An array of location level details items: $ref: "#/components/schemas/InventoryLevelDTO" variants: type: array description: An array of product variant details items: $ref: "#/components/schemas/ProductVariant" stocked_quantity: type: number description: The total quantity of the item in stock across levels reserved_quantity: type: number description: The total quantity of the item available across levels

DeleteResponse

DeleteResponse: Object

Type declaration

deletedbooleanRequired
idstringRequired
objectstringRequired

ExtendedFindConfig

ExtendedFindConfig<TEntity>: Omit<FindOneOptions<TEntity>, "where" | "relations" | "select"> | Omit<FindManyOptions<TEntity>, "where" | "relations" | "select"> & { order?: FindOptionsOrder<TEntity> ; relations?: FindOptionsRelations<TEntity> ; select?: FindOptionsSelect<TEntity> ; skip?: number ; take?: number ; where: FindOptionsWhere<TEntity> | FindOptionsWhere<TEntity>[] }

Type parameters

TEntityobjectRequired

ExtendedRequest

ExtendedRequest<TEntity>: Request & { resource: TEntity }

Type parameters

TEntityobjectRequired

ExtendedReservationItem

ExtendedReservationItem: ReservationItemDTO & { inventory_item?: InventoryItemDTO ; line_item?: LineItem }

Schema

ExtendedReservationItem type: object allOf:

  • $ref: "#/components/schemas/ReservationItemDTO"
  • type: object properties: line_item: description: The line item associated with the reservation. $ref: "#/components/schemas/LineItem" inventory_item: description: The inventory item associated with the reservation. $ref: "#/components/schemas/InventoryItemDTO"

ItemTaxCalculationLine

ItemTaxCalculationLine: Object

A line item and the tax rates that have been configured to apply to the product contained in the line item.

Type declaration

itemLineItemRequired
ratesTaxServiceRate[]Required

LevelWithAvailability

LevelWithAvailability: InventoryLevelDTO & { available_quantity: number }


Logger

Logger: Object

Type declaration

activity(message: string, config?: any) => voidRequired
debug(message: any) => voidRequired
error(messageOrError: any, error?: any) => voidRequired
failure(activityId: any, message: any) => voidRequired
info(message: any) => voidRequired
log(...args: any[]) => voidRequired
panic(data: any) => voidRequired
progress(activityId: any, message: any) => voidRequired
setLogLevel(level: string) => voidRequired
shouldLog(level: string) => voidRequired
success(activityId: any, message: any) => voidRequired
unsetLogLevel() => voidRequired
warn(message: any) => voidRequired

MedusaContainer

MedusaContainer: MedusaContainer


MedusaNextFunction

MedusaNextFunction: NextFunction


MedusaRequestHandler

MedusaRequestHandler: (req: MedusaRequest, res: MedusaResponse, next: MedusaNextFunction) => Promise<void> | void

Type declaration

(req, res, next): Promise<void> | void

Parameters
reqMedusaRequestRequired
resMedusaResponseRequired
nextMedusaNextFunctionRequired
Returns

Promise<void> | void

Promise<void\> \| voidPromise<void> | void

MedusaResponse

MedusaResponse: Response


MiddlewareFunction

MiddlewareFunction: MedusaRequestHandler | (...args: any[]) => any


MiddlewareRoute

MiddlewareRoute: Object

Type declaration

matcherstring | RegExpRequired
middlewaresMiddlewareFunction[]Required

MiddlewaresConfig

MiddlewaresConfig: Object

Type declaration


PartialPick

PartialPick<T, K>: { [P in K]?: T[P] }

Type parameters

TobjectRequired
Kkeyof TRequired

PaymentContext

PaymentContext: Object

Type declaration

amountnumberRequired
cartobjectRequired
cart.billing_addressAddress | null
cart.contextRecord<string, unknown>Required
cart.emailstringRequired
cart.idstringRequired
cart.shipping_addressAddress | nullRequired
cart.shipping_methodsShippingMethod[]Required
currency_codestringRequired
customerCustomer
paymentSessionDataRecord<string, unknown>Required
resource_idstringRequired

PaymentData

PaymentData: Data


PaymentProcessorContext

PaymentProcessorContext: Object

Type declaration

amountnumberRequired
billing_addressAddress | null
contextRecord<string, unknown>Required
currency_codestringRequired
customerCustomer
emailstringRequired
paymentSessionDataRecord<string, unknown>Required
resource_idstringRequired

PaymentProcessorSessionResponse

PaymentProcessorSessionResponse: Object

Type declaration

session_dataRecord<string, unknown>Required
update_requestsobject
update_requests.customer_metadataRecord<string, unknown>

PaymentSessionData

PaymentSessionData: Data


PaymentSessionResponse

PaymentSessionResponse: Object

Type declaration

session_dataRecord<string, unknown>Required
update_requestsobjectRequired
update_requests.customer_metadataRecord<string, unknown>Required

PriceListLoadConfig

PriceListLoadConfig: Object

Type declaration

cart_idstring
currency_codestring
customer_idstring
include_discount_pricesboolean
region_idstring

PriceListPriceCreateInput

PriceListPriceCreateInput: Object

Type declaration

amountnumberRequired
currency_codestring
max_quantitynumber
min_quantitynumber
region_idstring
variant_idstringRequired

PriceListPriceUpdateInput

PriceListPriceUpdateInput: Object

Type declaration

amountnumber
currency_codestring
idstring
max_quantitynumber
min_quantitynumber
region_idstring
variant_idstring

PriceSelectionContext

PriceSelectionContext: Object

Type declaration

cart_idstring
currency_codestring
customer_idstring
ignore_cacheboolean
include_discount_pricesboolean
quantitynumber
region_idstring
tax_ratesTaxServiceRate[]

PriceSelectionResult

PriceSelectionResult: Object

Type declaration

calculatedPricenumber | nullRequired
calculatedPriceIncludesTaxboolean | null
calculatedPriceTypePriceType
originalPricenumber | nullRequired
originalPriceIncludesTaxboolean | null
pricesMoneyAmount[]Required

PriceType

PriceType: DefaultPriceType | PriceListType


QueryConfig

QueryConfig<TEntity>: Object

Type parameters

TEntityBaseEntityRequired

Type declaration

allowedFieldsstring[]
allowedRelationsstring[]
defaultFields(keyof TEntity | string)[]
defaultLimitnumber
defaultRelationsstring[]
isListboolean

QuerySelector

QuerySelector<TEntity>: Selector<TEntity> & { q?: string }

Type parameters

TEntityobjectRequired

RequestQueryFields

RequestQueryFields: Object

Type declaration

expandstring
fieldsstring
limitnumber
offsetnumber
orderstring

ResponseInventoryItem

ResponseInventoryItem: Partial<InventoryItemDTO> & { location_levels?: LevelWithAvailability[] }

Schema

ResponseInventoryItem allOf:

  • $ref: "#/components/schemas/InventoryItemDTO"
  • type: object properties: location_levels: type: array description: The inventory's location levels. items: allOf:
        - $ref: "#/components/schemas/InventoryItemDTO"
    - type: object
    required:
    - available_quantity
    properties:
    available_quantity:
    description: The available quantity in the inventory location.
    type: number

Selector

Selector<TEntity>: { [key in keyof TEntity]?: TEntity[key] | TEntity[key][] | DateComparisonOperator | StringComparisonOperator | NumericalComparisonOperator | FindOperator<TEntity[key][] | string | string[]\> }

Type parameters

TEntityobjectRequired

ShippingTaxCalculationLine

ShippingTaxCalculationLine: Object

A shipping method and the tax rates that have been configured to apply to the shipping method.

Type declaration

ratesTaxServiceRate[]Required
shipping_methodShippingMethodRequired

StoreAuthRes

StoreAuthRes: Object

Schema

Customer's details.

Type declaration

customerCustomerRequired

StoreBearerAuthRes

StoreBearerAuthRes: Object

Schema

StoreBearerAuthRes type: object properties: access_token: description: Access token that can be used to send authenticated requests. type: string

Type declaration

access_tokenstringRequired

StoreCartShippingOptionsListRes

StoreCartShippingOptionsListRes: Object

Schema

An array of shipping options details.

Type declaration

shipping_optionsPricedShippingOption[]Required

StoreCartsRes

StoreCartsRes: Object

Schema

Cart details.

Type declaration

cartOmit<Cart, "refundable_amount" | "refunded_total">Required

StoreCollectionsListRes

StoreCollectionsListRes: PaginatedResponse & { collections: ProductCollection[] }

Schema

An array of product collections details


StoreCollectionsRes

StoreCollectionsRes: Object

Schema

Product collection details.

Type declaration

collectionProductCollectionRequired

StoreCompleteCartRes

StoreCompleteCartRes: { data: Cart ; type: "cart" } | { data: Order ; type: "order" } | { data: Swap ; type: "swap" }

Schema

StoreCompleteCartRes type: object required:

  • type
  • data properties: type: type: string description: "The type of the data property. If the cart completion fails, type will be cart and the data object will be the cart's details. If the cart completion is successful and the cart is used for checkout, type will be order and the data object will be the order's details. If the cart completion is successful and the cart is used for swap creation, type will be swap and the data object will be the swap's details." enum: [order, cart, swap] data: type: object description: The data of the result object. Its type depends on the type field. oneOf:
      - type: object
    allOf:
    - description: Cart was successfully authorized and order was placed successfully.
    - $ref: "#/components/schemas/Order"
    - type: object
    allOf:
    - description: Cart was successfully authorized but requires further actions.
    - $ref: "#/components/schemas/Cart"
    - type: object
    allOf:
    - description: Cart was used for a swap and it has been completed successfully.
    - $ref: "#/components/schemas/Swap"

StoreCustomersListOrdersRes

StoreCustomersListOrdersRes: PaginatedResponse & { orders: Order[] }

Schema

An array of orders details.


StoreCustomersListPaymentMethodsRes

StoreCustomersListPaymentMethodsRes: Object

Schema

An array of saved payment method details.

Type declaration

payment_methods{ data: object ; provider_id: string }[]Required

StoreCustomersRes

StoreCustomersRes: Object

Schema

Customer details.

Type declaration

customerOmit<Customer, "password_hash">Required

StoreCustomersResetPasswordRes

StoreCustomersResetPasswordRes: Object

Schema

Customer details.

Type declaration

customerOmit<Customer, "password_hash">Required

StoreGetAuthEmailRes

StoreGetAuthEmailRes: Object

Schema

StoreGetAuthEmailRes type: object required:

  • exists properties: exists: description: Whether email exists or not. type: boolean

Type declaration

existsbooleanRequired

StoreGetProductCategoriesCategoryRes

StoreGetProductCategoriesCategoryRes: Object

Schema

Product category details.

Type declaration

product_categoryProductCategoryRequired

StoreGetProductCategoriesRes

StoreGetProductCategoriesRes: PaginatedResponse & { product_categories: ProductCategory[] }

Schema

An array of product categories details.


StoreGiftCardsRes

StoreGiftCardsRes: Object

Schema

Gift card details.

Type declaration

gift_cardGiftCardRequired

StoreOrderEditsRes

StoreOrderEditsRes: Object

Schema

Order edit details.

Type declaration

order_editOmit<OrderEdit, "internal_note" | "created_by" | "confirmed_by" | "canceled_by">Required

StoreOrdersRes

StoreOrdersRes: Object

Schema

Order details.

Type declaration

orderOrderRequired

StorePaymentCollectionsRes

StorePaymentCollectionsRes: Object

Schema

Payment collection's details.

Type declaration

payment_collectionPaymentCollectionRequired

StorePaymentCollectionsSessionRes

StorePaymentCollectionsSessionRes: Object

Schema

Payment session's details.

Type declaration

payment_sessionPaymentSessionRequired

StorePostSearchRes

StorePostSearchRes: { hits: unknown[] } & Record<string, unknown>

Schema

Array of search results. The format of the items depends on the search engine installed on the Medusa backend.


StoreProductTagsListRes

StoreProductTagsListRes: PaginatedResponse & { product_tags: ProductTag[] }

Schema

An array of product tags details.


StoreProductTypesListRes

StoreProductTypesListRes: PaginatedResponse & { product_types: ProductType[] }

Schema

An array of product types details.


StoreProductsListRes

StoreProductsListRes: PaginatedResponse & { products: PricedProduct[] }

Schema

An array of products details.


StoreProductsRes

StoreProductsRes: Object

Schema

Product details.

Type declaration

productPricedProductRequired

StoreRegionsListRes

StoreRegionsListRes: PaginatedResponse & { regions: Region[] }

Schema

An array of regions details.


StoreRegionsRes

StoreRegionsRes: Object

Schema

Region details.

Type declaration

regionRegionRequired

StoreReturnReasonsListRes

StoreReturnReasonsListRes: Object

Schema

An array of return reasons details.

Type declaration

return_reasonsReturnReason[]Required

StoreReturnReasonsRes

StoreReturnReasonsRes: Object

Schema

Return reason details.

Type declaration

return_reasonReturnReasonRequired

StoreReturnsRes

StoreReturnsRes: Object

Schema

Return details.

Type declaration

returnReturnRequired

StoreShippingOptionsListRes

StoreShippingOptionsListRes: Object

Schema

An array of shipping options details.

Type declaration

shipping_optionsPricedShippingOption[]Required

StoreSwapsRes

StoreSwapsRes: Object

Schema

Swap details.

Type declaration

swapSwapRequired

StoreVariantsListRes

StoreVariantsListRes: Object

Schema

An array of product variant descriptions.

Type declaration

variantsPricedVariant[]Required

StoreVariantsRes

StoreVariantsRes: Object

Schema

Product variant description.

Type declaration

variantPricedVariantRequired

TaxCalculationContext

TaxCalculationContext: Object

Information relevant to a tax calculation, such as the shipping address where the items are going.

Type declaration

allocation_mapLineAllocationsMapRequired
customerCustomerRequired
is_returnbooleanRequired
regionRegionRequired
shipping_addressAddress | nullRequired
shipping_methodsShippingMethod[]Required

TotalField

TotalField: "shipping_total" | "discount_total" | "tax_total" | "refunded_total" | "total" | "subtotal" | "refundable_amount" | "gift_card_total" | "gift_card_tax_total"


TreeQuerySelector

TreeQuerySelector<TEntity>: QuerySelector<TEntity> & { include_descendants_tree?: boolean }

Type parameters

TEntityobjectRequired

UpdatePriceListInput

UpdatePriceListInput: Partial<Pick<PriceList, "name" | "description" | "starts_at" | "ends_at" | "status" | "type" | "includes_tax">> & { customer_groups?: { id: string }[] ; prices?: AdminPriceListPricesUpdateReq[] }


VariantInventory

VariantInventory: Object

Schema

VariantInventory type: object required:

  • id
  • inventory
  • sales_channel_availability properties: id: description: the ID of the variant type: string inventory: description: The inventory details. $ref: "#/components/schemas/ResponseInventoryItem" sales_channel_availability: type: array description: An array of details about the variant's inventory availability in sales channels. items: type: object required:
        - channel_name
    - channel_id
    - available_quantity
    properties:
    channel_name:
    description: Sales channel's name
    type: string
    channel_id:
    description: Sales channel's ID
    type: string
    available_quantity:
    description: Available quantity in the sales channel
    type: number

Type declaration

idstringRequired
inventoryResponseInventoryItem[]Required
sales_channel_availability{ available_quantity: number ; channel_id: string ; channel_name: string }[]Required

WithRequiredProperty

WithRequiredProperty<T, K>: T & { [Property in K]-?: T[Property] }

Utility type used to remove some optional attributes (coming from K) from a type T

Type parameters

TobjectRequired
Kkeyof TRequired

Writable

Writable<T>: { -readonly [key in keyof T]: T[key] | FindOperator<T[key]\> | FindOperator<T[key][]\> | FindOperator<string[]\> }

Type parameters

TobjectRequired

payload

payload: Object

Type declaration

emailstringRequired
passwordstringRequired
user_idstringRequired

Variables

AvailableOrderIncludes

Const AvailableOrderIncludes: Object

Type declaration

RETURNABLE_ITEMSstringRequired

PriceType

PriceType: Object

Type declaration

DEFAULTDEFAULTRequired
OVERRIDEOVERRIDERequired
SALESALERequired

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[]


defaultAdminProductCategoryRelations

Const defaultAdminProductCategoryRelations: string[]


defaultAdminProductFields

Const defaultAdminProductFields: keyof Product[]


defaultAdminProductRelations

Const defaultAdminProductRelations: string[]


defaultAdminProductRemoteQueryObject

Const defaultAdminProductRemoteQueryObject: Object

This is temporary.

Type declaration

collectionobjectRequired
collection.fieldsstring[]Required
fieldskeyof Product[]Required
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
is_internalbooleanRequired

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
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: internal[]

Functions

DbAwareColumn

DbAwareColumn(columnOptions): PropertyDecorator

Parameters

columnOptionsColumnOptionsRequired

Returns

PropertyDecorator

PropertyDecorator(target: Object, propertyKey: string | symbol) => voidRequired

IsType

IsType(types, validationOptions?): (object: Object, propertyName: string) => void

Parameters

typesany[]Required
validationOptionsValidationOptions

Returns

fn

(`object`: [`Object`](/references/js-client/admin_discounts/modules/admin_discounts.internal#object), `propertyName`: `string`) => `void`(object: Object, propertyName: string) => void

(object, propertyName): void

Parameters
objectObjectRequired
propertyNamestringRequired
Returns

void

voidvoid

addOrderToSelect

addOrderToSelect<TEntity>(order, select): void

TEntityobjectRequired

Parameters

orderFindOptionsOrder<TEntity>Required
selectFindOptionsSelect<TEntity>Required

Returns

void

voidvoid

adjustInventoryForCancelledFulfillment

adjustInventoryForCancelledFulfillment(fulfillment, context): Promise<void>

Parameters

fulfillmentFulfillmentRequired
contextobjectRequired
context.productVariantInventoryServiceProductVariantInventoryServiceRequired

Returns

Promise<void>

PromisePromise<void>Required

authenticate

authenticate(): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Returns

RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

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

authenticateCustomer

authenticateCustomer(): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Returns

RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

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

buildLegacyFieldsListFrom

buildLegacyFieldsListFrom<TEntity>(input?): keyof TEntity[]

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

TEntityobjectRequired

Example

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

Parameters

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

Returns

keyof TEntity[]

keyof `TEntity`[]keyof TEntity[]Required

Deprecated

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


buildQuery

buildQuery<TWhereKeys, TEntity>(selector, config?): ExtendedFindConfig<TEntity>

Used to build TypeORM queries.

TWhereKeysobjectRequired
TEntityobjectRequired

Parameters

selectorTWhereKeysRequired
The selector
configFindConfig<TEntity>
The config

Returns

ExtendedFindConfig<TEntity>

ExtendedFindConfigExtendedFindConfig<TEntity>Required
The QueryBuilderConfig

calculatePriceTaxAmount

calculatePriceTaxAmount(«destructured»): number

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

number

numbernumber

canAccessBatchJob

canAccessBatchJob(req, res, next): Promise<any>

Parameters

reqanyRequired
resanyRequired
nextanyRequired

Returns

Promise<any>

PromisePromise<any>Required

categoryMatchesScope

categoryMatchesScope(category, query): boolean

Parameters

categoryProductCategoryRequired
queryFindOptionsWhere<ProductCategory>Required

Returns

boolean

booleanboolean

cleanResponseData

cleanResponseData<T>(data, fields): T extends [] ? Partial<T>[] : Partial<T>

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

TunknownRequired

Parameters

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

Returns

T extends [] ? Partial<T>[] : Partial<T>

`T` extends [] ? [`Partial`](/references/js-client/admin_discounts/modules/admin_discounts.internal#partial)<`T`\>[] : [`Partial`](/references/js-client/admin_discounts/modules/admin_discounts.internal#partial)<`T`\>T extends [] ? Partial<T>[] : Partial<T>

csvCellContentFormatter

csvCellContentFormatter(str): string

Parameters

strstringRequired

Returns

string

stringstring

csvRevertCellContentFormatter

csvRevertCellContentFormatter(str): string

Parameters

strstringRequired

Returns

string

stringstring

doesConditionBelongToDiscount

doesConditionBelongToDiscount(req, res, next): Promise<any>

Parameters

reqanyRequired
resanyRequired
nextanyRequired

Returns

Promise<any>

PromisePromise<any>Required

errorHandler

errorHandler(): (err: MedusaError, req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void

Returns

fn

(`err`: [`MedusaError`](/references/js-client/internal/classes/admin_discounts.internal.MedusaError), `req`: `Request`<`ParamsDictionary`, `any`, `any`, `ParsedQs`, Record<`string`, `any`\>\>, `res`: `Response`<`any`, Record<`string`, `any`\>\>, `next`: `NextFunction`) => `void`(err: MedusaError, req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void

(err, req, res, next): void

Parameters
errMedusaErrorRequired
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required
resResponse<any, Record<string, any>>Required
nextNextFunctionRequired
Returns

void

voidvoid

extendedFindParamsMixin

extendedFindParamsMixin(«destructured»?): ClassConstructor<FindParams & FindPaginationParams>

Parameters

__namedParametersobject
__namedParameters.limitnumber
__namedParameters.offsetnumber

Returns

ClassConstructor<FindParams & FindPaginationParams>


fetchCategoryDescendantsIds

fetchCategoryDescendantsIds(productCategory, query): string[]

Parameters

productCategoryProductCategoryRequired
queryFindOptionsWhere<ProductCategory>Required

Returns

string[]

string[]string[]Required

formatException

formatException(err): MedusaError

Parameters

erranyRequired

Returns

MedusaError

MedusaErrorMedusaErrorRequired

generateEntityId

generateEntityId(idProperty, prefix?): string

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

string

stringstring

getRequestedBatchJob

getRequestedBatchJob(req, res, next): Promise<any>

Parameters

reqanyRequired
resanyRequired
nextanyRequired

Returns

Promise<any>

PromisePromise<any>Required

hasChanges

hasChanges<T1, T2>(obj1, obj2): boolean

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

T1ObjectRequired
T2ObjectRequired

Parameters

obj1T1Required
obj2T2Required

Returns

boolean

booleanboolean

isBatchJobStrategy

isBatchJobStrategy(object): object is IBatchJobStrategy

Parameters

objectunknownRequired

Returns

object is IBatchJobStrategy

objectobject is IBatchJobStrategy

isCartCompletionStrategy

isCartCompletionStrategy(obj): boolean

Parameters

objunknownRequired

Returns

boolean

booleanboolean

isDate

isDate(value): value is Date

Parameters

valueanyRequired

Returns

value is Date

valuevalue is Date

isFileService

isFileService(object): boolean

Parameters

objectunknownRequired

Returns

boolean

booleanboolean

isNotificationService

isNotificationService(obj): boolean

Parameters

objunknownRequired

Returns

boolean

booleanboolean

isObject

isObject(obj): obj is object

Parameters

objanyRequired

Returns

obj is object

objobj is object

isPaymentProcessor

isPaymentProcessor(obj): boolean

Return if the input object is AbstractPaymentProcessor

Parameters

objunknownRequired

Returns

boolean

booleanboolean

isPaymentProcessorError

isPaymentProcessorError(obj): obj is PaymentProcessorError

Utility function to determine if an object is a processor error

Parameters

objanyRequired

Returns

obj is PaymentProcessorError

objobj is PaymentProcessorError

isPaymentService

isPaymentService(obj): boolean

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

Parameters

objunknownRequired

Returns

boolean

booleanboolean

isPriceSelectionStrategy

isPriceSelectionStrategy(object): object is IPriceSelectionStrategy

Parameters

objectanyRequired

Returns

object is IPriceSelectionStrategy

objectobject is IPriceSelectionStrategy

isString

isString(val): val is string

Parameters

valanyRequired

Returns

val is string

valval is string

isTaxCalculationStrategy

isTaxCalculationStrategy(object): object is ITaxCalculationStrategy

Parameters

objectanyRequired

Returns

object is ITaxCalculationStrategy

objectobject is ITaxCalculationStrategy

normalizeQuery

normalizeQuery(): (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void

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

fn

(`req`: `Request`<`ParamsDictionary`, `any`, `any`, `ParsedQs`, Record<`string`, `any`\>\>, `res`: `Response`<`any`, Record<`string`, `any`\>\>, `next`: `NextFunction`) => `void`(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void

(req, res, next): void

Parameters
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required
resResponse<any, Record<string, any>>Required
nextNextFunctionRequired
Returns

void

voidvoid

nullableValue

nullableValue(value): FindOperator<any>

Parameters

valueanyRequired

Returns

FindOperator<any>

FindOperatorFindOperator<any>Required

omitDeep

omitDeep<T>(input, excludes): T

TobjectRequired

Parameters

inputobjectRequired
excludes(string | number)[]Required

Returns

T


registerOverriddenValidators

registerOverriddenValidators(extendedValidator): void

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

void

voidvoid

remoteQueryFetchData

remoteQueryFetchData(container): (expand: any, keyField: any, ids: any, relationship: any) => Promise<any>

Parameters

containerMedusaContainerRequired

Returns

fn

(`expand`: `any`, `keyField`: `any`, `ids`: `any`, `relationship`: `any`) => `Promise`<`any`\>(expand: any, keyField: any, ids: any, relationship: any) => Promise<any>

(expand, keyField, ids, relationship): Promise<any>

Parameters
expandanyRequired
keyFieldanyRequired
idsanyRequired
relationshipanyRequired
Returns

Promise<any>

PromisePromise<any>Required

removeUndefinedProperties

removeUndefinedProperties<T>(inputObj): T

TobjectRequired

Parameters

inputObjTRequired

Returns

T


requireCustomerAuthentication

requireCustomerAuthentication(): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Returns

RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

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

reserveQuantityForDraftOrder

reserveQuantityForDraftOrder(order, context): Promise<void>

Parameters

orderOrderRequired
contextobjectRequired
context.locationIdstring
context.productVariantInventoryServiceProductVariantInventoryServiceRequired

Returns

Promise<void>

PromisePromise<void>Required

resolveDbGenerationStrategy

resolveDbGenerationStrategy(pgSqlType): "increment" | "uuid" | "rowid"

Parameters

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

Returns

"increment" | "uuid" | "rowid"

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

resolveDbType

resolveDbType(pgSqlType): ColumnType

Parameters

pgSqlTypeColumnTypeRequired

Returns

ColumnType


setMetadata

setMetadata(obj, metadata): Record<string, unknown>

Dedicated method to set metadata.

Parameters

objundefined | null | { metadata: null | Record<string, unknown> }Required
the entity to apply metadata to.
metadataRecord<string, unknown>Required
the metadata to set

Returns

Record<string, unknown>

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

transformBody

transformBody<T>(plainToClass, config?): (req: Request, res: Response, next: NextFunction) => Promise<void>

TobjectRequired

Parameters

plainToClassClassConstructor<T>Required
configValidatorOptions

Returns

fn

(`req`: `Request`, `res`: `Response`, `next`: `NextFunction`) => `Promise`<`void`\>(req: Request, res: Response, next: NextFunction) => Promise<void>

(req, res, next): Promise<void>

Parameters
reqRequestRequired
resResponseRequired
nextNextFunctionRequired
Returns

Promise<void>

PromisePromise<void>Required

transformIncludesOptions

transformIncludesOptions(allowedIncludes?, expectedIncludes?): (req: Request, res: Response, next: NextFunction) => void

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

Parameters

allowedIncludesstring[]
The list of fields that can be passed and assign to req.includes
expectedIncludesstring[]
The list of fields that the consumer can pass to the end point using this middleware. It is a subset of allowedIncludes

Returns

fn

(`req`: `Request`, `res`: `Response`, `next`: `NextFunction`) => `void`(req: Request, res: Response, next: NextFunction) => void

(req, res, next): void

Parameters
reqRequestRequired
resResponseRequired
nextNextFunctionRequired
Returns

void

voidvoid

transformQuery

transformQuery<T, TEntity>(plainToClass, queryConfig?, config?): (req: Request, res: Response, next: NextFunction) => Promise<void>

Middleware that transform the query input for the admin end points

TEntityBaseEntityRequired

Parameters

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

Returns

fn

(`req`: `Request`, `res`: `Response`, `next`: `NextFunction`) => `Promise`<`void`\>(req: Request, res: Response, next: NextFunction) => Promise<void>

(req, res, next): Promise<void>

Parameters
reqRequestRequired
resResponseRequired
nextNextFunctionRequired
Returns

Promise<void>

PromisePromise<void>Required

transformStoreQuery

transformStoreQuery<T, TEntity>(plainToClass, queryConfig?, config?): (req: Request, res: Response, next: NextFunction) => Promise<void>

Middleware that transform the query input for the store endpoints

TEntityBaseEntityRequired

Parameters

plainToClassClassConstructor<T>Required
queryConfigQueryConfig<TEntity>
configValidatorOptions

Returns

fn

(`req`: `Request`, `res`: `Response`, `next`: `NextFunction`) => `Promise`<`void`\>(req: Request, res: Response, next: NextFunction) => Promise<void>

(req, res, next): Promise<void>

Parameters
reqRequestRequired
resResponseRequired
nextNextFunctionRequired
Returns

Promise<void>

PromisePromise<void>Required

unauthenticatedInviteRoutes

unauthenticatedInviteRoutes(app): void

Parameters

appanyRequired

Returns

void

voidvoid

unauthenticatedUserRoutes

unauthenticatedUserRoutes(app): void

Parameters

appanyRequired

Returns

void

voidvoid

updateInventoryAndReservations

updateInventoryAndReservations(fulfillments, context): Promise<void>

Parameters

fulfillmentsFulfillment[]Required
contextobjectRequired
context.inventoryServiceProductVariantInventoryServiceRequired
context.locationIdstringRequired

Returns

Promise<void>

PromisePromise<void>Required

validateId

validateId(rawId, config?): string

Parameters

rawIdstringRequired
configobject
config.lengthnumber
config.prefixstring

Returns

string

stringstring

validator

validator<T, V>(typedClass, plain, config?): Promise<T>

TobjectRequired
VobjectRequired

Parameters

typedClassClassConstructor<T>Required
plainVRequired
configValidatorOptions

Returns

Promise<T>

PromisePromise<T>Required

wrapHandler

wrapHandler(fn): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Parameters

fnhandlerRequired

Returns

RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

RequestHandlerRequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>Required
Was this section helpful?