chore(types): add note in TSDocs of list and retrieve methods (#12364)

This commit is contained in:
Shahed Nasser
2025-05-06 09:52:06 +03:00
committed by GitHub
parent 94b7ee99b7
commit ffd323a2a9
15 changed files with 1080 additions and 18 deletions
+50
View File
@@ -49,11 +49,61 @@ export interface IAuthModuleService extends IModuleService {
providerData: AuthenticationInput providerData: AuthenticationInput
): Promise<AuthenticationResponse> ): Promise<AuthenticationResponse>
/**
* This method is used to register a user using a provider. The `register` method of the
* underlying provider is called, passing it the `providerData` parameter as a parameter. The method
* returns the data returned by the provider.
*
* Refer to [this guide](https://docs.medusajs.com/resources/commerce-modules/auth/authentication-route) to learn more about the authentication flows.
*
* @param {string} provider - The ID of the provider to register the user with.
* @param {AuthenticationInput} providerData - The data to pass to the provider to register the user.
* @returns {Promise<AuthenticationResponse>} The details of the registration result.
*
* @example
* The following example is in the context of an API route, where
* `req` is an instance of the `MedusaRequest` object:
*
* ```ts
* const { success, authIdentity, location, error } =
* await authModuleService.register("emailpass", {
* url: req.url,
* headers: req.headers,
* query: req.query,
* body: req.body,
* protocol: req.protocol,
* } as AuthenticationInput)
* ```
*/
register( register(
provider: string, provider: string,
providerData: AuthenticationInput providerData: AuthenticationInput
): Promise<AuthenticationResponse> ): Promise<AuthenticationResponse>
/**
* This method updates an auth identity's details using the provider that created it. It uses the `update` method of the
* underlying provider, passing it the `providerData` parameter as a parameter. The method
* returns the data returned by the provider.
*
* @param {string} provider - The ID of the provider to update the auth identity with.
* @param {Record<string, unknown>} providerData - The data to pass to the provider to update the auth identity.
* @returns {Promise<AuthenticationResponse>} The details of the update result.
*
* @example
* The following example is in the context of an API route, where
* `req` is an instance of the `MedusaRequest` object:
*
* ```ts
* const { success, authIdentity, location, error } =
* await authModuleService.updateProvider("emailpass", {
* email: "user@example.com",
* password: "password",
* // The ID of a user, customer, or custom actor type that is being updated.
* // For example, `user_123`.
* entity_id: req.auth_context.actor_id,
* })
* ```
*/
updateProvider( updateProvider(
provider: string, provider: string,
providerData: Record<string, unknown> providerData: Record<string, unknown>
+70
View File
@@ -66,6 +66,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const cart = await cartModuleService.retrieveCart("cart_123", { * const cart = await cartModuleService.retrieveCart("cart_123", {
* relations: ["shipping_address"], * relations: ["shipping_address"],
@@ -98,6 +105,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the carts: * To specify relations that should be retrieved within the carts:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const carts = await cartModuleService.listCarts( * const carts = await cartModuleService.listCarts(
* { * {
@@ -150,6 +164,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the carts: * To specify relations that should be retrieved within the carts:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [carts, count] = await cartModuleService.listAndCountCarts( * const [carts, count] = await cartModuleService.listAndCountCarts(
* { * {
@@ -477,6 +498,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const lineItem = await cartModuleService.retrieveLineItem( * const lineItem = await cartModuleService.retrieveLineItem(
* "cali_123", * "cali_123",
@@ -512,6 +540,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the line items: * To specify relations that should be retrieved within the line items:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const lineItems = await cartModuleService.listLineItems( * const lineItems = await cartModuleService.listLineItems(
* { * {
@@ -737,6 +772,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping methods: * To specify relations that should be retrieved within the shipping methods:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingMethods = * const shippingMethods =
* await cartModuleService.listShippingMethods( * await cartModuleService.listShippingMethods(
@@ -904,6 +946,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the line item adjustments: * To specify relations that should be retrieved within the line item adjustments:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const lineItemAdjustments = * const lineItemAdjustments =
* await cartModuleService.listLineItemAdjustments( * await cartModuleService.listLineItemAdjustments(
@@ -1068,6 +1117,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping method adjustments: * To specify relations that should be retrieved within the shipping method adjustments:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingMethodAdjustments = * const shippingMethodAdjustments =
* await cartModuleService.listShippingMethodAdjustments( * await cartModuleService.listShippingMethodAdjustments(
@@ -1238,6 +1294,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the line item tax lines: * To specify relations that should be retrieved within the line item tax lines:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const lineItemTaxLines = * const lineItemTaxLines =
* await cartModuleService.listLineItemTaxLines( * await cartModuleService.listLineItemTaxLines(
@@ -1384,6 +1447,13 @@ export interface ICartModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping method tax lines: * To specify relations that should be retrieved within the shipping method tax lines:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingMethodTaxLines = * const shippingMethodTaxLines =
* await cartModuleService.listShippingMethodTaxLines( * await cartModuleService.listShippingMethodTaxLines(
+3
View File
@@ -80,6 +80,9 @@ export interface FindConfig<Entity> {
/** /**
* An array of strings, each being relation names of the entity to retrieve in the result. * An array of strings, each being relation names of the entity to retrieve in the result.
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*/ */
relations?: string[] relations?: string[]
@@ -45,6 +45,13 @@ export interface ICustomerModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const customer = await customerModuleService.retrieveCustomer( * const customer = await customerModuleService.retrieveCustomer(
* "cus_123", * "cus_123",
@@ -666,6 +673,13 @@ export interface ICustomerModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the addresses: * To specify relations that should be retrieved within the addresses:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const addresses = await customerModuleService.listCustomerAddresses( * const addresses = await customerModuleService.listCustomerAddresses(
* { * {
@@ -719,6 +733,13 @@ export interface ICustomerModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the addresses: * To specify relations that should be retrieved within the addresses:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [addresses, count] = * const [addresses, count] =
* await customerModuleService.listAndCountCustomerAddresses( * await customerModuleService.listAndCountCustomerAddresses(
@@ -774,6 +795,13 @@ export interface ICustomerModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the customer-group relations: * To specify relations that should be retrieved within the customer-group relations:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const customerGroupCustomerRels = * const customerGroupCustomerRels =
* await customerModuleService.listCustomerGroupCustomers( * await customerModuleService.listCustomerGroupCustomers(
@@ -828,6 +856,13 @@ export interface ICustomerModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the customers: * To specify relations that should be retrieved within the customers:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const customers = await customerModuleService.listCustomers( * const customers = await customerModuleService.listCustomers(
* { * {
@@ -880,6 +915,13 @@ export interface ICustomerModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the customers: * To specify relations that should be retrieved within the customers:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [customers, count] = await customerModuleService.listAndCountCustomers( * const [customers, count] = await customerModuleService.listAndCountCustomers(
* { * {
@@ -933,6 +975,13 @@ export interface ICustomerModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the customer groups: * To specify relations that should be retrieved within the customer groups:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const customerGroups = * const customerGroups =
* await customerModuleService.listCustomerGroups( * await customerModuleService.listCustomerGroups(
@@ -988,6 +1037,13 @@ export interface ICustomerModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the customer groups: * To specify relations that should be retrieved within the customer groups:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [customerGroups, count] = * const [customerGroups, count] =
* await customerModuleService.listCustomerGroups( * await customerModuleService.listCustomerGroups(
@@ -73,6 +73,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const fulfillmentSet = await fulfillmentModuleService.retrieveFulfillmentSet( * const fulfillmentSet = await fulfillmentModuleService.retrieveFulfillmentSet(
* "fuset_123", * "fuset_123",
@@ -108,6 +115,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the fulfillment set: * To specify relations that should be retrieved within the fulfillment set:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const fulfillmentSets = await fulfillmentModuleService.listFulfillmentSets( * const fulfillmentSets = await fulfillmentModuleService.listFulfillmentSets(
* { * {
@@ -161,6 +175,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the fulfillment set: * To specify relations that should be retrieved within the fulfillment set:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [fulfillmentSets, count] = * const [fulfillmentSets, count] =
* await fulfillmentModuleService.listAndCountFulfillmentSets( * await fulfillmentModuleService.listAndCountFulfillmentSets(
@@ -374,6 +395,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const serviceZone = * const serviceZone =
* await fulfillmentModuleService.retrieveServiceZone( * await fulfillmentModuleService.retrieveServiceZone(
@@ -411,6 +439,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the service zone: * To specify relations that should be retrieved within the service zone:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const serviceZones = * const serviceZones =
* await fulfillmentModuleService.listServiceZones( * await fulfillmentModuleService.listServiceZones(
@@ -466,6 +501,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the service zone: * To specify relations that should be retrieved within the service zone:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [serviceZones, count] = * const [serviceZones, count] =
* await fulfillmentModuleService.listAndCountServiceZones( * await fulfillmentModuleService.listAndCountServiceZones(
@@ -725,6 +767,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const geoZone = * const geoZone =
* await fulfillmentModuleService.retrieveGeoZone("fgz_123", { * await fulfillmentModuleService.retrieveGeoZone("fgz_123", {
@@ -758,6 +807,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the geo zone: * To specify relations that should be retrieved within the geo zone:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const geoZones = await fulfillmentModuleService.listGeoZones( * const geoZones = await fulfillmentModuleService.listGeoZones(
* { * {
@@ -811,6 +867,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the geo zone: * To specify relations that should be retrieved within the geo zone:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [geoZones, count] = * const [geoZones, count] =
* await fulfillmentModuleService.listAndCountGeoZones( * await fulfillmentModuleService.listAndCountGeoZones(
@@ -1032,6 +1095,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingOption = * const shippingOption =
* await fulfillmentModuleService.retrieveShippingOption( * await fulfillmentModuleService.retrieveShippingOption(
@@ -1069,6 +1139,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping option: * To specify relations that should be retrieved within the shipping option:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingOptions = * const shippingOptions =
* await fulfillmentModuleService.listShippingOptions( * await fulfillmentModuleService.listShippingOptions(
@@ -1130,6 +1207,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping option: * To specify relations that should be retrieved within the shipping option:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingOptions = * const shippingOptions =
* await fulfillmentModuleService.listShippingOptionsForContext( * await fulfillmentModuleService.listShippingOptionsForContext(
@@ -1192,6 +1276,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping option: * To specify relations that should be retrieved within the shipping option:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [shippingOptions, count] = * const [shippingOptions, count] =
* await fulfillmentModuleService.listAndCountShippingOptions( * await fulfillmentModuleService.listAndCountShippingOptions(
@@ -1485,6 +1576,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingProfile = * const shippingProfile =
* await fulfillmentModuleService.retrieveShippingProfile( * await fulfillmentModuleService.retrieveShippingProfile(
@@ -1522,6 +1620,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping profile: * To specify relations that should be retrieved within the shipping profile:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingProfiles = * const shippingProfiles =
* await fulfillmentModuleService.listShippingProfiles( * await fulfillmentModuleService.listShippingProfiles(
@@ -1579,6 +1684,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping profile: * To specify relations that should be retrieved within the shipping profile:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [shippingProfiles, count] = * const [shippingProfiles, count] =
* await fulfillmentModuleService.listAndCountShippingProfiles( * await fulfillmentModuleService.listAndCountShippingProfiles(
@@ -1843,6 +1955,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingOptionRule = * const shippingOptionRule =
* await fulfillmentModuleService.retrieveShippingOptionRule( * await fulfillmentModuleService.retrieveShippingOptionRule(
@@ -1880,6 +1999,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping option rule: * To specify relations that should be retrieved within the shipping option rule:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingOptionRules = * const shippingOptionRules =
* await fulfillmentModuleService.listShippingOptionRules( * await fulfillmentModuleService.listShippingOptionRules(
@@ -1937,6 +2063,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping option rule: * To specify relations that should be retrieved within the shipping option rule:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [shippingOptionRules, count] = * const [shippingOptionRules, count] =
* await fulfillmentModuleService.listAndCountShippingOptionRules( * await fulfillmentModuleService.listAndCountShippingOptionRules(
@@ -2119,6 +2252,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingOptionType = * const shippingOptionType =
* await fulfillmentModuleService.retrieveShippingOptionType( * await fulfillmentModuleService.retrieveShippingOptionType(
@@ -2156,6 +2296,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping option type: * To specify relations that should be retrieved within the shipping option type:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingOptionTypes = * const shippingOptionTypes =
* await fulfillmentModuleService.listShippingOptionTypes( * await fulfillmentModuleService.listShippingOptionTypes(
@@ -2213,6 +2360,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping option type: * To specify relations that should be retrieved within the shipping option type:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [shippingOptionTypes, count] = * const [shippingOptionTypes, count] =
* await fulfillmentModuleService.listAndCountShippingOptionTypes( * await fulfillmentModuleService.listAndCountShippingOptionTypes(
@@ -2300,6 +2454,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const fulfillment = * const fulfillment =
* await fulfillmentModuleService.retrieveFulfillment( * await fulfillmentModuleService.retrieveFulfillment(
@@ -2337,6 +2498,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the fulfillment: * To specify relations that should be retrieved within the fulfillment:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const fulfillments = * const fulfillments =
* await fulfillmentModuleService.listFulfillments( * await fulfillmentModuleService.listFulfillments(
@@ -2399,6 +2567,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the fulfillment: * To specify relations that should be retrieved within the fulfillment:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [fulfillments, count] = * const [fulfillments, count] =
* await fulfillmentModuleService.listAndCountFulfillments( * await fulfillmentModuleService.listAndCountFulfillments(
@@ -45,6 +45,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved within the inventory items: * To specify relations that should be retrieved within the inventory items:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const inventoryItems = await inventoryModuleService.listInventoryItems( * const inventoryItems = await inventoryModuleService.listInventoryItems(
* { * {
@@ -98,6 +105,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved within the inventory items: * To specify relations that should be retrieved within the inventory items:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [inventoryItems, count] = * const [inventoryItems, count] =
* await inventoryModuleService.listAndCountInventoryItems( * await inventoryModuleService.listAndCountInventoryItems(
@@ -153,6 +167,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved within the reservation items: * To specify relations that should be retrieved within the reservation items:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const reservationItems = * const reservationItems =
* await inventoryModuleService.listReservationItems( * await inventoryModuleService.listReservationItems(
@@ -208,6 +229,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved within the reservation items: * To specify relations that should be retrieved within the reservation items:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [reservationItems, count] = * const [reservationItems, count] =
* await inventoryModuleService.listAndCountReservationItems( * await inventoryModuleService.listAndCountReservationItems(
@@ -263,6 +291,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved within the inventory levels: * To specify relations that should be retrieved within the inventory levels:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const inventoryLevels = * const inventoryLevels =
* await inventoryModuleService.listInventoryLevels( * await inventoryModuleService.listInventoryLevels(
@@ -325,6 +360,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved within the inventory levels: * To specify relations that should be retrieved within the inventory levels:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [inventoryLevels, count] = * const [inventoryLevels, count] =
* await inventoryModuleService.listAndCountInventoryLevels( * await inventoryModuleService.listAndCountInventoryLevels(
@@ -371,6 +413,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const inventoryItem = await inventoryModuleService.retrieveInventoryItem( * const inventoryItem = await inventoryModuleService.retrieveInventoryItem(
* "iitem_123", * "iitem_123",
@@ -428,6 +477,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const inventoryLevel = * const inventoryLevel =
* await inventoryModuleService.retrieveInventoryLevel( * await inventoryModuleService.retrieveInventoryLevel(
@@ -465,6 +521,13 @@ export interface IInventoryService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const reservationItem = * const reservationItem =
* await inventoryModuleService.retrieveReservationItem( * await inventoryModuleService.retrieveReservationItem(
@@ -70,6 +70,13 @@ export interface INotificationModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const notification = await notificationModuleService.retrieveNotification( * const notification = await notificationModuleService.retrieveNotification(
* "noti_123", * "noti_123",
@@ -106,6 +113,13 @@ export interface INotificationModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the notifications: * To specify relations that should be retrieved within the notifications:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const notifications = await notificationModuleService.listNotifications( * const notifications = await notificationModuleService.listNotifications(
* { * {
@@ -160,6 +174,13 @@ export interface INotificationModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the notifications: * To specify relations that should be retrieved within the notifications:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [notifications, count] = * const [notifications, count] =
* await notificationModuleService.listAndCountNotifications( * await notificationModuleService.listAndCountNotifications(
+182
View File
@@ -120,6 +120,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const order = await orderModuleService.retrieveOrder( * const order = await orderModuleService.retrieveOrder(
* "123", * "123",
@@ -156,6 +163,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the order: * To specify relations that should be retrieved within the order:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const orders = await orderModuleService.listOrders({ * const orders = await orderModuleService.listOrders({
* id: ["123", "321"] * id: ["123", "321"]
@@ -203,6 +217,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the order: * To specify relations that should be retrieved within the order:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [orders, count] = await orderModuleService.listAndCountOrders({ * const [orders, count] = await orderModuleService.listAndCountOrders({
* id: ["123", "321"] * id: ["123", "321"]
@@ -250,6 +271,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const orderReturn = await orderModuleService.retrieveReturn( * const orderReturn = await orderModuleService.retrieveReturn(
* "123", * "123",
@@ -285,6 +313,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the return: * To specify relations that should be retrieved within the return:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const returns = await orderModuleService.listReturns({ * const returns = await orderModuleService.listReturns({
* id: ["123", "321"] * id: ["123", "321"]
@@ -331,6 +366,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the return: * To specify relations that should be retrieved within the return:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [returns, count] = await orderModuleService.listAndCountReturns({ * const [returns, count] = await orderModuleService.listAndCountReturns({
* id: ["123", "321"] * id: ["123", "321"]
@@ -377,6 +419,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const claim = await orderModuleService.retrieveOrderClaim( * const claim = await orderModuleService.retrieveOrderClaim(
* "123", * "123",
@@ -412,6 +461,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the claim: * To specify relations that should be retrieved within the claim:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const claims = await orderModuleService.listOrderClaims({ * const claims = await orderModuleService.listOrderClaims({
* id: ["123", "321"] * id: ["123", "321"]
@@ -458,6 +514,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the claim: * To specify relations that should be retrieved within the claim:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [claims, count] = await orderModuleService.listAndCountOrderClaims({ * const [claims, count] = await orderModuleService.listAndCountOrderClaims({
* id: ["123", "321"] * id: ["123", "321"]
@@ -504,6 +567,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const exchange = await orderModuleService.retrieveOrderExchange( * const exchange = await orderModuleService.retrieveOrderExchange(
* "123", * "123",
@@ -539,6 +609,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the exchange: * To specify relations that should be retrieved within the exchange:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const exchanges = await orderModuleService.listOrderExchanges({ * const exchanges = await orderModuleService.listOrderExchanges({
* id: ["123", "321"] * id: ["123", "321"]
@@ -585,6 +662,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the exchange: * To specify relations that should be retrieved within the exchange:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [exchanges, count] = await orderModuleService.listOrderExchanges({ * const [exchanges, count] = await orderModuleService.listOrderExchanges({
* id: ["123", "321"] * id: ["123", "321"]
@@ -984,6 +1068,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const lineItem = await orderModuleService.retrieveOrderLineItem( * const lineItem = await orderModuleService.retrieveOrderLineItem(
* "123", * "123",
@@ -1020,6 +1111,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the line item: * To specify relations that should be retrieved within the line item:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const lineItems = await orderModuleService.listOrderLineItems({ * const lineItems = await orderModuleService.listOrderLineItems({
* id: ["123", "321"] * id: ["123", "321"]
@@ -1318,6 +1416,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping method: * To specify relations that should be retrieved within the shipping method:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingMethods = await orderModuleService.listOrderShippingMethods({ * const shippingMethods = await orderModuleService.listOrderShippingMethods({
* id: ["123", "321"] * id: ["123", "321"]
@@ -1512,6 +1617,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the line item adjustment: * To specify relations that should be retrieved within the line item adjustment:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const lineItemAdjustment = await orderModuleService.listOrderLineItemAdjustments({ * const lineItemAdjustment = await orderModuleService.listOrderLineItemAdjustments({
* id: ["123", "321"] * id: ["123", "321"]
@@ -1723,6 +1835,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping method adjustment: * To specify relations that should be retrieved within the shipping method adjustment:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingMethodAdjustments = await orderModuleService * const shippingMethodAdjustments = await orderModuleService
* .listOrderShippingMethodAdjustments({ * .listOrderShippingMethodAdjustments({
@@ -1956,6 +2075,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the line item tax line: * To specify relations that should be retrieved within the line item tax line:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const lineItemTaxLines = await orderModuleService * const lineItemTaxLines = await orderModuleService
* .listOrderLineItemTaxLines({ * .listOrderLineItemTaxLines({
@@ -2172,6 +2298,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping method tax line: * To specify relations that should be retrieved within the shipping method tax line:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const shippingMethodTaxLines = await orderModuleService * const shippingMethodTaxLines = await orderModuleService
* .listOrderShippingMethodTaxLines({ * .listOrderShippingMethodTaxLines({
@@ -2402,6 +2535,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the exchange: * To specify relations that should be retrieved within the exchange:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const orderChanges = await orderModuleService.listOrderChanges({ * const orderChanges = await orderModuleService.listOrderChanges({
* id: ["123", "321"] * id: ["123", "321"]
@@ -2448,6 +2588,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const orderChange = await orderModuleService.retrieveOrderChange( * const orderChange = await orderModuleService.retrieveOrderChange(
* "123", * "123",
@@ -2958,6 +3105,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the shipping method tax line: * To specify relations that should be retrieved within the shipping method tax line:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const orderChangeActions = await orderModuleService.listOrderChangeActions({ * const orderChangeActions = await orderModuleService.listOrderChangeActions({
* id: ["123", "321"] * id: ["123", "321"]
@@ -3005,6 +3159,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const orderChangeAction = await orderModuleService.retrieveOrderChangeAction( * const orderChangeAction = await orderModuleService.retrieveOrderChangeAction(
* "123", * "123",
@@ -3588,6 +3749,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the transaction: * To specify relations that should be retrieved within the transaction:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const transactions = await orderModuleService.listOrderTransactions({ * const transactions = await orderModuleService.listOrderTransactions({
* id: ["123", "321"] * id: ["123", "321"]
@@ -3740,6 +3908,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const returnReason = await orderModuleService.retrieveReturnReason( * const returnReason = await orderModuleService.retrieveReturnReason(
* "123", * "123",
@@ -3775,6 +3950,13 @@ export interface IOrderModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the return reason: * To specify relations that should be retrieved within the return reason:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const returnReasons = await orderModuleService.listReturnReasons({ * const returnReasons = await orderModuleService.listReturnReasons({
* id: ["123", "321"] * id: ["123", "321"]
+64 -1
View File
@@ -110,6 +110,13 @@ export interface IPaymentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const paymentCollection = * const paymentCollection =
* await paymentModuleService.retrievePaymentCollection( * await paymentModuleService.retrievePaymentCollection(
@@ -149,6 +156,13 @@ export interface IPaymentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the payment collection: * To specify relations that should be retrieved within the payment collection:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const paymentCollections = * const paymentCollections =
* await paymentModuleService.listPaymentCollections( * await paymentModuleService.listPaymentCollections(
@@ -206,6 +220,13 @@ export interface IPaymentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the payment collection: * To specify relations that should be retrieved within the payment collection:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const paymentCollections = * const paymentCollections =
* await paymentModuleService.listAndCountPaymentCollections( * await paymentModuleService.listAndCountPaymentCollections(
@@ -560,6 +581,13 @@ export interface IPaymentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the payment session: * To specify relations that should be retrieved within the payment session:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const paymentSessions = * const paymentSessions =
* await paymentModuleService.listPaymentSessions( * await paymentModuleService.listPaymentSessions(
@@ -616,6 +644,13 @@ export interface IPaymentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the payment: * To specify relations that should be retrieved within the payment:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const payments = await paymentModuleService.listPayments( * const payments = await paymentModuleService.listPayments(
* { * {
@@ -776,6 +811,13 @@ export interface IPaymentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the payment providers: * To specify relations that should be retrieved within the payment providers:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [paymentProviders, count] = * const [paymentProviders, count] =
* await paymentModuleService.listAndCountPaymentProviders( * await paymentModuleService.listAndCountPaymentProviders(
@@ -1060,6 +1102,13 @@ export interface IPaymentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the capture: * To specify relations that should be retrieved within the capture:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const captures = await paymentModuleService.listCaptures( * const captures = await paymentModuleService.listCaptures(
* { * {
@@ -1127,6 +1176,13 @@ export interface IPaymentModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the refund: * To specify relations that should be retrieved within the refund:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const refunds = await paymentModuleService.listRefunds( * const refunds = await paymentModuleService.listRefunds(
* { * {
@@ -1332,7 +1388,14 @@ export interface IPaymentModuleService extends IModuleService {
* }) * })
* ``` * ```
* *
* To specify relations that should be retrieved within the refund : * To specify relations that should be retrieved within the refund reasons:
*
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
* *
* ```ts * ```ts
* const refundReasons = * const refundReasons =
+98 -2
View File
@@ -125,6 +125,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const priceSet = await pricingModuleService.retrievePriceSet( * const priceSet = await pricingModuleService.retrievePriceSet(
* "pset_123", * "pset_123",
@@ -162,6 +169,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the price sets: * To specify relations that should be retrieved within the price sets:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const priceSets = await pricingModuleService.listPriceSets( * const priceSets = await pricingModuleService.listPriceSets(
* { * {
@@ -217,6 +231,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the price sets: * To specify relations that should be retrieved within the price sets:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [priceSets, count] = * const [priceSets, count] =
* await pricingModuleService.listAndCountPriceSets( * await pricingModuleService.listAndCountPriceSets(
@@ -606,6 +627,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the prices: * To specify relations that should be retrieved within the prices:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const prices = await pricingModuleService.listPrices( * const prices = await pricingModuleService.listPrices(
* { * {
@@ -713,6 +741,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the prices: * To specify relations that should be retrieved within the prices:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [prices, count] = await pricingModuleService.listPrices( * const [prices, count] = await pricingModuleService.listPrices(
* { * {
@@ -765,6 +800,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const priceRule = * const priceRule =
* await pricingModuleService.retrievePriceRule("prule_123", { * await pricingModuleService.retrievePriceRule("prule_123", {
@@ -800,6 +842,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the price rules: * To specify relations that should be retrieved within the price rules:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const priceRules = await pricingModuleService.listPriceRules( * const priceRules = await pricingModuleService.listPriceRules(
* { * {
@@ -855,6 +904,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the price rules: * To specify relations that should be retrieved within the price rules:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [priceRules, count] = * const [priceRules, count] =
* await pricingModuleService.listAndCountPriceListRules( * await pricingModuleService.listAndCountPriceListRules(
@@ -970,6 +1026,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const priceList = * const priceList =
* await pricingModuleService.retrievePriceList("plist_123", { * await pricingModuleService.retrievePriceList("plist_123", {
@@ -1005,6 +1068,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the price lists: * To specify relations that should be retrieved within the price lists:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const priceLists = await pricingModuleService.listPriceLists( * const priceLists = await pricingModuleService.listPriceLists(
* { * {
@@ -1060,6 +1130,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the price lists: * To specify relations that should be retrieved within the price lists:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [priceLists, count] = * const [priceLists, count] =
* await pricingModuleService.listAndCountPriceLists( * await pricingModuleService.listAndCountPriceLists(
@@ -1235,6 +1312,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const priceListRule = * const priceListRule =
* await pricingModuleService.retrievePriceListRule( * await pricingModuleService.retrievePriceListRule(
@@ -1274,6 +1358,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the price list rules: * To specify relations that should be retrieved within the price list rules:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const priceListRules = * const priceListRules =
* await pricingModuleService.listPriceListRules( * await pricingModuleService.listPriceListRules(
@@ -1331,6 +1422,13 @@ export interface IPricingModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the price list rules: * To specify relations that should be retrieved within the price list rules:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [priceListRules, count] = * const [priceListRules, count] =
* await pricingModuleService.listAndCountPriceListRules( * await pricingModuleService.listAndCountPriceListRules(
@@ -1540,8 +1638,6 @@ export interface IPricingModuleService extends IModuleService {
* }) * })
* ``` * ```
* *
* To specify relations that should be retrieved within the price preferences:
*
* By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter: * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
* *
* ```ts * ```ts
+145 -2
View File
@@ -69,6 +69,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const product = await productModuleService.retrieveProduct( * const product = await productModuleService.retrieveProduct(
* "prod_123", * "prod_123",
@@ -105,6 +112,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the products: * To specify relations that should be retrieved within the products:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const products = await productModuleService.listProducts( * const products = await productModuleService.listProducts(
* { * {
@@ -159,6 +173,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the products: * To specify relations that should be retrieved within the products:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [products, count] = * const [products, count] =
* await productModuleService.listAndCountProducts( * await productModuleService.listAndCountProducts(
@@ -399,6 +420,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const tag = await productModuleService.retrieveProductTag( * const tag = await productModuleService.retrieveProductTag(
* "ptag_123", * "ptag_123",
@@ -435,6 +463,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product tags: * To specify relations that should be retrieved within the product tags:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const tags = await productModuleService.listProductTags( * const tags = await productModuleService.listProductTags(
* { * {
@@ -489,6 +524,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product tags: * To specify relations that should be retrieved within the product tags:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [tags, count] = * const [tags, count] =
* await productModuleService.listAndCountProductTags( * await productModuleService.listAndCountProductTags(
@@ -1039,6 +1081,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const option = await productModuleService.retrieveProductOption( * const option = await productModuleService.retrieveProductOption(
* "opt_123", * "opt_123",
@@ -1075,6 +1124,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product options: * To specify relations that should be retrieved within the product options:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const options = await productModuleService.listProductOptions( * const options = await productModuleService.listProductOptions(
* { * {
@@ -1128,7 +1184,14 @@ export interface IProductModuleService extends IModuleService {
* }) * })
* ``` * ```
* *
* To specify relations that should be retrieved within the product types: * To specify relations that should be retrieved within the product options:
*
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
* *
* ```ts * ```ts
* const [options, count] = * const [options, count] =
@@ -1391,6 +1454,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product option values: * To specify relations that should be retrieved within the product option values:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const options = await productModuleService.listProductOptionValues( * const options = await productModuleService.listProductOptionValues(
* { * {
@@ -1440,13 +1510,23 @@ export interface IProductModuleService extends IModuleService {
* }) * })
* ``` * ```
* *
* To specify relations that should be retrieved within the product types: * To specify relations that should be retrieved within the product option values:
*
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
* *
* ```ts * ```ts
* const [options, count] = * const [options, count] =
* await productModuleService.listAndCountProductOptionValues( * await productModuleService.listAndCountProductOptionValues(
* { * {
* id: ["optval_123", "optval_321"], * id: ["optval_123", "optval_321"],
* },
* {
* relations: ["option"],
* } * }
* ) * )
* ``` * ```
@@ -1654,6 +1734,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const variant = await productModuleService.retrieveProductVariant( * const variant = await productModuleService.retrieveProductVariant(
* "variant_123", * "variant_123",
@@ -1690,6 +1777,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product variants: * To specify relations that should be retrieved within the product variants:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const variants = await productModuleService.listProductVariants( * const variants = await productModuleService.listProductVariants(
* { * {
@@ -1744,6 +1838,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product variants: * To specify relations that should be retrieved within the product variants:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [variants, count] = * const [variants, count] =
* await productModuleService.listAndCountProductVariants( * await productModuleService.listAndCountProductVariants(
@@ -2011,6 +2112,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const collection = * const collection =
* await productModuleService.retrieveProductCollection("pcol_123", { * await productModuleService.retrieveProductCollection("pcol_123", {
@@ -2046,6 +2154,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product collections: * To specify relations that should be retrieved within the product collections:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const collections = * const collections =
* await productModuleService.listProductCollections( * await productModuleService.listProductCollections(
@@ -2102,6 +2217,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product collections: * To specify relations that should be retrieved within the product collections:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [collections, count] = * const [collections, count] =
* await productModuleService.listAndCountProductCollections( * await productModuleService.listAndCountProductCollections(
@@ -2358,6 +2480,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const category = await productModuleService.retrieveProductCategory( * const category = await productModuleService.retrieveProductCategory(
* "pcat_123", * "pcat_123",
@@ -2394,6 +2523,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product categories: * To specify relations that should be retrieved within the product categories:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const categories = await productModuleService.listProductCategories( * const categories = await productModuleService.listProductCategories(
* { * {
@@ -2448,6 +2584,13 @@ export interface IProductModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the product categories: * To specify relations that should be retrieved within the product categories:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [categories, count] = * const [categories, count] =
* await productModuleService.listAndCountProductCategories( * await productModuleService.listAndCountProductCategories(
@@ -277,6 +277,13 @@ export interface IPromotionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the promotions: * To specify relations that should be retrieved within the promotions:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const promotions = await promotionModuleService.listPromotions( * const promotions = await promotionModuleService.listPromotions(
* { * {
@@ -330,6 +337,13 @@ export interface IPromotionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the promotions: * To specify relations that should be retrieved within the promotions:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [promotions, count] = * const [promotions, count] =
* await promotionModuleService.listAndCountPromotions( * await promotionModuleService.listAndCountPromotions(
@@ -383,6 +397,13 @@ export interface IPromotionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const promotion = await promotionModuleService.retrievePromotion( * const promotion = await promotionModuleService.retrievePromotion(
* "promo_123", * "promo_123",
@@ -724,6 +745,13 @@ export interface IPromotionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the promotion rules: * To specify relations that should be retrieved within the promotion rules:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const promotionRules = * const promotionRules =
* await promotionModuleService.listPromotionRules( * await promotionModuleService.listPromotionRules(
@@ -799,6 +827,13 @@ export interface IPromotionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the campaigns: * To specify relations that should be retrieved within the campaigns:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const campaigns = await promotionModuleService.listCampaigns( * const campaigns = await promotionModuleService.listCampaigns(
* { * {
@@ -852,6 +887,13 @@ export interface IPromotionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the campaigns: * To specify relations that should be retrieved within the campaigns:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [campaigns, count] = * const [campaigns, count] =
* await promotionModuleService.listAndCountCampaigns( * await promotionModuleService.listAndCountCampaigns(
@@ -905,6 +947,13 @@ export interface IPromotionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const campaign = * const campaign =
* await promotionModuleService.retrieveCampaign( * await promotionModuleService.retrieveCampaign(
+42
View File
@@ -186,6 +186,13 @@ export interface IRegionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const region = await regionModuleService.retrieveRegion("reg_123", { * const region = await regionModuleService.retrieveRegion("reg_123", {
* relations: ["countries"], * relations: ["countries"],
@@ -218,6 +225,13 @@ export interface IRegionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the regions: * To specify relations that should be retrieved within the regions:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const regions = await regionModuleService.listRegions( * const regions = await regionModuleService.listRegions(
* { * {
@@ -271,6 +285,13 @@ export interface IRegionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the regions: * To specify relations that should be retrieved within the regions:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [regions, count] = * const [regions, count] =
* await regionModuleService.listAndCountRegions( * await regionModuleService.listAndCountRegions(
@@ -324,6 +345,13 @@ export interface IRegionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const country = await regionModuleService.retrieveCountry( * const country = await regionModuleService.retrieveCountry(
* "us", * "us",
@@ -359,6 +387,13 @@ export interface IRegionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the countries: * To specify relations that should be retrieved within the countries:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const countries = await regionModuleService.listCountries( * const countries = await regionModuleService.listCountries(
* { * {
@@ -412,6 +447,13 @@ export interface IRegionModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the countries: * To specify relations that should be retrieved within the countries:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [countries, count] = * const [countries, count] =
* await regionModuleService.listAndCountCountries( * await regionModuleService.listAndCountCountries(
@@ -37,6 +37,13 @@ export interface IStockLocationService extends IModuleService {
* *
* To specify relations that should be retrieved within the stock locations: * To specify relations that should be retrieved within the stock locations:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const stockLocations = await stockLocationModuleService.listStockLocations( * const stockLocations = await stockLocationModuleService.listStockLocations(
* { * {
@@ -90,6 +97,13 @@ export interface IStockLocationService extends IModuleService {
* *
* To specify relations that should be retrieved within the stock locations: * To specify relations that should be retrieved within the stock locations:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [stockLocations, count] = * const [stockLocations, count] =
* await stockLocationModuleService.listandCountStockLocations( * await stockLocationModuleService.listandCountStockLocations(
+35
View File
@@ -46,6 +46,13 @@ export interface ITaxModuleService extends IModuleService {
* *
* To specify relations that should be retrieved: * To specify relations that should be retrieved:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const taxRate = await taxModuleService.retrieveTaxRate("txr_123", { * const taxRate = await taxModuleService.retrieveTaxRate("txr_123", {
* relations: ["tax_region"], * relations: ["tax_region"],
@@ -78,6 +85,13 @@ export interface ITaxModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the tax rate: * To specify relations that should be retrieved within the tax rate:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const taxRates = await taxModuleService.listTaxRates( * const taxRates = await taxModuleService.listTaxRates(
* { * {
@@ -132,6 +146,13 @@ export interface ITaxModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the tax rate: * To specify relations that should be retrieved within the tax rate:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const [taxRates, count] = await taxModuleService.listAndCountTaxRates( * const [taxRates, count] = await taxModuleService.listAndCountTaxRates(
* { * {
@@ -499,6 +520,13 @@ export interface ITaxModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the tax region: * To specify relations that should be retrieved within the tax region:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const taxRegions = await taxModuleService.listTaxRegions( * const taxRegions = await taxModuleService.listTaxRegions(
* { * {
@@ -632,6 +660,13 @@ export interface ITaxModuleService extends IModuleService {
* *
* To specify relations that should be retrieved within the tax rate rule: * To specify relations that should be retrieved within the tax rate rule:
* *
* :::note
*
* You can only retrieve data models defined in the same module. To retrieve linked data models
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
*
* :::
*
* ```ts * ```ts
* const taxRateRules = await taxModuleService.listTaxRateRules( * const taxRateRules = await taxModuleService.listTaxRateRules(
* { * {