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>
+72 -2
View File
@@ -65,6 +65,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", {
@@ -97,6 +104,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(
@@ -149,6 +163,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(
@@ -476,6 +497,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(
@@ -511,6 +539,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(
@@ -736,7 +771,14 @@ 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(
@@ -903,7 +945,14 @@ 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(
@@ -1067,6 +1116,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 =
@@ -1237,6 +1293,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 =
@@ -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[]
+59 -3
View File
@@ -44,6 +44,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(
@@ -665,6 +672,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(
@@ -718,7 +732,14 @@ 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(
@@ -773,6 +794,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 =
@@ -827,6 +855,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(
@@ -879,6 +914,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(
@@ -932,7 +974,14 @@ 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(
@@ -987,7 +1036,14 @@ 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(
+180 -5
View File
@@ -72,6 +72,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(
@@ -107,6 +114,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(
@@ -160,7 +174,14 @@ 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(
@@ -373,7 +394,14 @@ 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(
@@ -410,6 +438,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 =
@@ -465,6 +500,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] =
@@ -724,6 +766,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 =
@@ -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(
@@ -1031,7 +1094,14 @@ 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(
@@ -1068,7 +1138,14 @@ 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(
@@ -1129,6 +1206,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 =
@@ -1191,6 +1275,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] =
@@ -1484,6 +1575,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 =
@@ -1521,7 +1619,14 @@ 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(
@@ -1578,6 +1683,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] =
@@ -1842,6 +1954,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 =
@@ -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(
@@ -1936,6 +2062,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] =
@@ -2118,6 +2251,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 =
@@ -2155,6 +2295,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 =
@@ -2212,6 +2359,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] =
@@ -2299,6 +2453,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 =
@@ -2336,6 +2497,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 =
@@ -2398,6 +2566,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] =
+64 -1
View File
@@ -44,6 +44,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(
@@ -97,6 +104,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] =
@@ -152,6 +166,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 =
@@ -207,6 +228,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] =
@@ -262,6 +290,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 =
@@ -324,6 +359,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] =
@@ -370,6 +412,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(
@@ -427,7 +476,14 @@ 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(
@@ -464,6 +520,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 =
@@ -69,6 +69,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(
@@ -105,6 +112,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(
@@ -159,6 +173,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] =
+182
View File
@@ -119,6 +119,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(
@@ -155,6 +162,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({
@@ -202,6 +216,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({
@@ -249,6 +270,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(
@@ -284,6 +312,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({
@@ -330,6 +365,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({
@@ -376,6 +418,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(
@@ -411,6 +460,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({
@@ -457,6 +513,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({
@@ -503,6 +566,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(
@@ -538,6 +608,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({
@@ -584,6 +661,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({
@@ -983,6 +1067,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(
@@ -1019,6 +1110,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({
@@ -1317,6 +1415,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({
@@ -1511,6 +1616,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({
@@ -1722,6 +1834,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
@@ -1955,6 +2074,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
@@ -2171,6 +2297,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
@@ -2401,6 +2534,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({
@@ -2447,6 +2587,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(
@@ -2957,6 +3104,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({
@@ -3004,6 +3158,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(
@@ -3587,6 +3748,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({
@@ -3739,6 +3907,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(
@@ -3774,6 +3949,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({
+64 -1
View File
@@ -109,6 +109,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 =
@@ -148,6 +155,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 =
@@ -205,6 +219,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 =
@@ -559,6 +580,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 =
@@ -615,6 +643,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(
@@ -775,6 +810,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] =
@@ -1059,6 +1101,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(
@@ -1126,6 +1175,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
@@ -124,6 +124,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(
@@ -161,6 +168,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(
@@ -216,6 +230,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] =
@@ -605,6 +626,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(
@@ -712,6 +740,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(
@@ -764,6 +799,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 =
@@ -799,6 +841,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(
@@ -854,6 +903,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] =
@@ -969,6 +1025,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 =
@@ -1004,6 +1067,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(
@@ -1059,6 +1129,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] =
@@ -1234,6 +1311,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 =
@@ -1273,6 +1357,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 =
@@ -1330,6 +1421,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] =
@@ -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
+147 -4
View File
@@ -68,6 +68,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(
@@ -104,6 +111,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(
@@ -158,6 +172,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] =
@@ -398,6 +419,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(
@@ -434,6 +462,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(
@@ -488,6 +523,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] =
@@ -1038,6 +1080,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(
@@ -1074,6 +1123,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,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 * ```ts
* const [options, count] = * const [options, count] =
* await productModuleService.listAndCountProductOptions( * await productModuleService.listAndCountProductOptions(
@@ -1390,6 +1453,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"],
* } * }
* ) * )
* ``` * ```
@@ -1653,6 +1733,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(
@@ -1689,6 +1776,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(
@@ -1743,6 +1837,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] =
@@ -2010,6 +2111,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 =
@@ -2045,6 +2153,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 =
@@ -2101,6 +2216,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] =
@@ -2357,6 +2479,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(
@@ -2393,6 +2522,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(
@@ -2447,6 +2583,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] =
@@ -276,6 +276,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(
@@ -329,6 +336,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] =
@@ -382,6 +396,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(
@@ -723,6 +744,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 =
@@ -798,6 +826,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(
@@ -851,6 +886,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] =
@@ -904,6 +946,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 =
+42
View File
@@ -185,6 +185,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", {
@@ -217,6 +224,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(
@@ -270,6 +284,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] =
@@ -323,6 +344,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(
@@ -358,6 +386,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(
@@ -411,6 +446,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] =
@@ -36,6 +36,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(
@@ -89,6 +96,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] =
+35
View File
@@ -45,6 +45,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", {
@@ -77,6 +84,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(
@@ -131,6 +145,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(
@@ -498,6 +519,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(
@@ -631,6 +659,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(