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

View File

@@ -49,11 +49,61 @@ export interface IAuthModuleService extends IModuleService {
providerData: AuthenticationInput
): 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(
provider: string,
providerData: AuthenticationInput
): 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(
provider: string,
providerData: Record<string, unknown>

View File

@@ -65,6 +65,13 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const cart = await cartModuleService.retrieveCart("cart_123", {
@@ -97,6 +104,13 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const carts = await cartModuleService.listCarts(
@@ -149,6 +163,13 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const [carts, count] = await cartModuleService.listAndCountCarts(
@@ -476,6 +497,13 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const lineItem = await cartModuleService.retrieveLineItem(
@@ -511,6 +539,13 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const lineItems = await cartModuleService.listLineItems(
@@ -736,7 +771,14 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const shippingMethods =
* await cartModuleService.listShippingMethods(
@@ -903,7 +945,14 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const lineItemAdjustments =
* await cartModuleService.listLineItemAdjustments(
@@ -1067,6 +1116,13 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const shippingMethodAdjustments =
@@ -1237,6 +1293,13 @@ export interface ICartModuleService extends IModuleService {
* ```
*
* 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
* const lineItemTaxLines =
@@ -1384,6 +1447,13 @@ export interface ICartModuleService extends IModuleService {
*
* 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
* const shippingMethodTaxLines =
* await cartModuleService.listShippingMethodTaxLines(

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

View File

@@ -44,6 +44,13 @@ export interface ICustomerModuleService extends IModuleService {
* ```
*
* 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
* const customer = await customerModuleService.retrieveCustomer(
@@ -665,6 +672,13 @@ export interface ICustomerModuleService extends IModuleService {
* ```
*
* 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
* const addresses = await customerModuleService.listCustomerAddresses(
@@ -718,7 +732,14 @@ export interface ICustomerModuleService extends IModuleService {
* ```
*
* 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
* const [addresses, count] =
* await customerModuleService.listAndCountCustomerAddresses(
@@ -773,6 +794,13 @@ export interface ICustomerModuleService extends IModuleService {
* ```
*
* 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
* const customerGroupCustomerRels =
@@ -827,6 +855,13 @@ export interface ICustomerModuleService extends IModuleService {
* ```
*
* 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
* const customers = await customerModuleService.listCustomers(
@@ -879,6 +914,13 @@ export interface ICustomerModuleService extends IModuleService {
* ```
*
* 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
* const [customers, count] = await customerModuleService.listAndCountCustomers(
@@ -932,7 +974,14 @@ export interface ICustomerModuleService extends IModuleService {
* ```
*
* 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
* const customerGroups =
* await customerModuleService.listCustomerGroups(
@@ -987,7 +1036,14 @@ export interface ICustomerModuleService extends IModuleService {
* ```
*
* 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
* const [customerGroups, count] =
* await customerModuleService.listCustomerGroups(

View File

@@ -72,6 +72,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const fulfillmentSet = await fulfillmentModuleService.retrieveFulfillmentSet(
@@ -107,6 +114,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const fulfillmentSets = await fulfillmentModuleService.listFulfillmentSets(
@@ -160,7 +174,14 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const [fulfillmentSets, count] =
* await fulfillmentModuleService.listAndCountFulfillmentSets(
@@ -373,7 +394,14 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const serviceZone =
* await fulfillmentModuleService.retrieveServiceZone(
@@ -410,6 +438,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const serviceZones =
@@ -465,6 +500,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const [serviceZones, count] =
@@ -724,6 +766,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const geoZone =
@@ -758,6 +807,13 @@ export interface IFulfillmentModuleService extends IModuleService {
*
* 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
* 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:
*
* :::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
* const [geoZones, count] =
* await fulfillmentModuleService.listAndCountGeoZones(
@@ -1031,7 +1094,14 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const shippingOption =
* await fulfillmentModuleService.retrieveShippingOption(
@@ -1068,7 +1138,14 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const shippingOptions =
* await fulfillmentModuleService.listShippingOptions(
@@ -1129,6 +1206,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const shippingOptions =
@@ -1191,6 +1275,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const [shippingOptions, count] =
@@ -1484,6 +1575,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const shippingProfile =
@@ -1521,7 +1619,14 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const shippingProfiles =
* await fulfillmentModuleService.listShippingProfiles(
@@ -1578,6 +1683,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const [shippingProfiles, count] =
@@ -1842,6 +1954,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const shippingOptionRule =
@@ -1880,6 +1999,13 @@ export interface IFulfillmentModuleService extends IModuleService {
*
* 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
* const shippingOptionRules =
* await fulfillmentModuleService.listShippingOptionRules(
@@ -1936,6 +2062,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const [shippingOptionRules, count] =
@@ -2118,6 +2251,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const shippingOptionType =
@@ -2155,6 +2295,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const shippingOptionTypes =
@@ -2212,6 +2359,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const [shippingOptionTypes, count] =
@@ -2299,6 +2453,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const fulfillment =
@@ -2336,6 +2497,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const fulfillments =
@@ -2398,6 +2566,13 @@ export interface IFulfillmentModuleService extends IModuleService {
* ```
*
* 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
* const [fulfillments, count] =

View File

@@ -44,6 +44,13 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const inventoryItems = await inventoryModuleService.listInventoryItems(
@@ -97,6 +104,13 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const [inventoryItems, count] =
@@ -152,6 +166,13 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const reservationItems =
@@ -207,6 +228,13 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const [reservationItems, count] =
@@ -262,6 +290,13 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const inventoryLevels =
@@ -324,6 +359,13 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const [inventoryLevels, count] =
@@ -370,6 +412,13 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const inventoryItem = await inventoryModuleService.retrieveInventoryItem(
@@ -427,7 +476,14 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const inventoryLevel =
* await inventoryModuleService.retrieveInventoryLevel(
@@ -464,6 +520,13 @@ export interface IInventoryService extends IModuleService {
* ```
*
* 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
* const reservationItem =

View File

@@ -69,6 +69,13 @@ export interface INotificationModuleService extends IModuleService {
* ```
*
* 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
* const notification = await notificationModuleService.retrieveNotification(
@@ -105,6 +112,13 @@ export interface INotificationModuleService extends IModuleService {
* ```
*
* 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
* const notifications = await notificationModuleService.listNotifications(
@@ -159,6 +173,13 @@ export interface INotificationModuleService extends IModuleService {
* ```
*
* 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
* const [notifications, count] =

View File

@@ -119,6 +119,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const order = await orderModuleService.retrieveOrder(
@@ -155,6 +162,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const orders = await orderModuleService.listOrders({
@@ -202,6 +216,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const [orders, count] = await orderModuleService.listAndCountOrders({
@@ -249,6 +270,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const orderReturn = await orderModuleService.retrieveReturn(
@@ -284,6 +312,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const returns = await orderModuleService.listReturns({
@@ -330,6 +365,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const [returns, count] = await orderModuleService.listAndCountReturns({
@@ -376,6 +418,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const claim = await orderModuleService.retrieveOrderClaim(
@@ -411,6 +460,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const claims = await orderModuleService.listOrderClaims({
@@ -457,6 +513,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const [claims, count] = await orderModuleService.listAndCountOrderClaims({
@@ -503,6 +566,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const exchange = await orderModuleService.retrieveOrderExchange(
@@ -538,6 +608,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const exchanges = await orderModuleService.listOrderExchanges({
@@ -584,6 +661,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const [exchanges, count] = await orderModuleService.listOrderExchanges({
@@ -983,6 +1067,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const lineItem = await orderModuleService.retrieveOrderLineItem(
@@ -1019,6 +1110,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const lineItems = await orderModuleService.listOrderLineItems({
@@ -1317,6 +1415,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const shippingMethods = await orderModuleService.listOrderShippingMethods({
@@ -1511,6 +1616,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const lineItemAdjustment = await orderModuleService.listOrderLineItemAdjustments({
@@ -1722,6 +1834,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const shippingMethodAdjustments = await orderModuleService
@@ -1955,6 +2074,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const lineItemTaxLines = await orderModuleService
@@ -2171,6 +2297,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const shippingMethodTaxLines = await orderModuleService
@@ -2401,6 +2534,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const orderChanges = await orderModuleService.listOrderChanges({
@@ -2447,6 +2587,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const orderChange = await orderModuleService.retrieveOrderChange(
@@ -2957,6 +3104,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const orderChangeActions = await orderModuleService.listOrderChangeActions({
@@ -3004,6 +3158,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const orderChangeAction = await orderModuleService.retrieveOrderChangeAction(
@@ -3587,6 +3748,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const transactions = await orderModuleService.listOrderTransactions({
@@ -3739,6 +3907,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const returnReason = await orderModuleService.retrieveReturnReason(
@@ -3774,6 +3949,13 @@ export interface IOrderModuleService extends IModuleService {
* ```
*
* 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
* const returnReasons = await orderModuleService.listReturnReasons({

View File

@@ -109,6 +109,13 @@ export interface IPaymentModuleService extends IModuleService {
* ```
*
* 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
* const paymentCollection =
@@ -148,6 +155,13 @@ export interface IPaymentModuleService extends IModuleService {
* ```
*
* 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
* const paymentCollections =
@@ -205,6 +219,13 @@ export interface IPaymentModuleService extends IModuleService {
* ```
*
* 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
* const paymentCollections =
@@ -559,6 +580,13 @@ export interface IPaymentModuleService extends IModuleService {
* ```
*
* 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
* const paymentSessions =
@@ -615,6 +643,13 @@ export interface IPaymentModuleService extends IModuleService {
* ```
*
* 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
* const payments = await paymentModuleService.listPayments(
@@ -775,6 +810,13 @@ export interface IPaymentModuleService extends IModuleService {
* ```
*
* 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
* const [paymentProviders, count] =
@@ -1059,6 +1101,13 @@ export interface IPaymentModuleService extends IModuleService {
* ```
*
* 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
* const captures = await paymentModuleService.listCaptures(
@@ -1126,6 +1175,13 @@ export interface IPaymentModuleService extends IModuleService {
* ```
*
* 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
* 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
* const refundReasons =

View File

@@ -124,6 +124,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const priceSet = await pricingModuleService.retrievePriceSet(
@@ -161,6 +168,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const priceSets = await pricingModuleService.listPriceSets(
@@ -216,6 +230,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const [priceSets, count] =
@@ -605,6 +626,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const prices = await pricingModuleService.listPrices(
@@ -712,6 +740,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const [prices, count] = await pricingModuleService.listPrices(
@@ -764,6 +799,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const priceRule =
@@ -799,6 +841,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const priceRules = await pricingModuleService.listPriceRules(
@@ -854,6 +903,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const [priceRules, count] =
@@ -969,6 +1025,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const priceList =
@@ -1004,6 +1067,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const priceLists = await pricingModuleService.listPriceLists(
@@ -1059,6 +1129,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const [priceLists, count] =
@@ -1234,6 +1311,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const priceListRule =
@@ -1273,6 +1357,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const priceListRules =
@@ -1330,6 +1421,13 @@ export interface IPricingModuleService extends IModuleService {
* ```
*
* 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
* const [priceListRules, count] =
@@ -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:
*
* ```ts

View File

@@ -68,6 +68,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const product = await productModuleService.retrieveProduct(
@@ -104,6 +111,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const products = await productModuleService.listProducts(
@@ -158,6 +172,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const [products, count] =
@@ -398,6 +419,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const tag = await productModuleService.retrieveProductTag(
@@ -434,6 +462,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const tags = await productModuleService.listProductTags(
@@ -488,6 +523,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const [tags, count] =
@@ -1038,6 +1080,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const option = await productModuleService.retrieveProductOption(
@@ -1074,6 +1123,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const options = await productModuleService.listProductOptions(
@@ -1128,8 +1184,15 @@ 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
* const [options, count] =
* await productModuleService.listAndCountProductOptions(
@@ -1390,6 +1453,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* 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
* const [options, count] =
* await productModuleService.listAndCountProductOptionValues(
* {
* id: ["optval_123", "optval_321"],
* },
* {
* relations: ["option"],
* }
* )
* ```
@@ -1653,6 +1733,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const variant = await productModuleService.retrieveProductVariant(
@@ -1689,6 +1776,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const variants = await productModuleService.listProductVariants(
@@ -1743,6 +1837,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const [variants, count] =
@@ -2010,6 +2111,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const collection =
@@ -2045,6 +2153,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const collections =
@@ -2101,6 +2216,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const [collections, count] =
@@ -2357,6 +2479,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const category = await productModuleService.retrieveProductCategory(
@@ -2393,6 +2522,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const categories = await productModuleService.listProductCategories(
@@ -2447,6 +2583,13 @@ export interface IProductModuleService extends IModuleService {
* ```
*
* 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
* const [categories, count] =

View File

@@ -276,6 +276,13 @@ export interface IPromotionModuleService extends IModuleService {
* ```
*
* 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
* const promotions = await promotionModuleService.listPromotions(
@@ -329,6 +336,13 @@ export interface IPromotionModuleService extends IModuleService {
* ```
*
* 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
* const [promotions, count] =
@@ -382,6 +396,13 @@ export interface IPromotionModuleService extends IModuleService {
* ```
*
* 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
* const promotion = await promotionModuleService.retrievePromotion(
@@ -723,6 +744,13 @@ export interface IPromotionModuleService extends IModuleService {
* ```
*
* 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
* const promotionRules =
@@ -798,6 +826,13 @@ export interface IPromotionModuleService extends IModuleService {
* ```
*
* 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
* const campaigns = await promotionModuleService.listCampaigns(
@@ -851,6 +886,13 @@ export interface IPromotionModuleService extends IModuleService {
* ```
*
* 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
* const [campaigns, count] =
@@ -904,6 +946,13 @@ export interface IPromotionModuleService extends IModuleService {
* ```
*
* 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
* const campaign =

View File

@@ -185,6 +185,13 @@ export interface IRegionModuleService extends IModuleService {
* ```
*
* 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
* const region = await regionModuleService.retrieveRegion("reg_123", {
@@ -217,6 +224,13 @@ export interface IRegionModuleService extends IModuleService {
* ```
*
* 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
* const regions = await regionModuleService.listRegions(
@@ -270,6 +284,13 @@ export interface IRegionModuleService extends IModuleService {
* ```
*
* 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
* const [regions, count] =
@@ -323,6 +344,13 @@ export interface IRegionModuleService extends IModuleService {
* ```
*
* 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
* const country = await regionModuleService.retrieveCountry(
@@ -358,6 +386,13 @@ export interface IRegionModuleService extends IModuleService {
* ```
*
* 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
* const countries = await regionModuleService.listCountries(
@@ -411,6 +446,13 @@ export interface IRegionModuleService extends IModuleService {
* ```
*
* 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
* const [countries, count] =

View File

@@ -36,6 +36,13 @@ export interface IStockLocationService extends IModuleService {
* ```
*
* 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
* const stockLocations = await stockLocationModuleService.listStockLocations(
@@ -89,6 +96,13 @@ export interface IStockLocationService extends IModuleService {
* ```
*
* 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
* const [stockLocations, count] =

View File

@@ -45,6 +45,13 @@ export interface ITaxModuleService extends IModuleService {
* ```
*
* 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
* const taxRate = await taxModuleService.retrieveTaxRate("txr_123", {
@@ -77,6 +84,13 @@ export interface ITaxModuleService extends IModuleService {
* ```
*
* 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
* const taxRates = await taxModuleService.listTaxRates(
@@ -131,6 +145,13 @@ export interface ITaxModuleService extends IModuleService {
* ```
*
* 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
* const [taxRates, count] = await taxModuleService.listAndCountTaxRates(
@@ -498,6 +519,13 @@ export interface ITaxModuleService extends IModuleService {
* ```
*
* 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
* const taxRegions = await taxModuleService.listTaxRegions(
@@ -631,6 +659,13 @@ export interface ITaxModuleService extends IModuleService {
* ```
*
* 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
* const taxRateRules = await taxModuleService.listTaxRateRules(