chore(docs): Generated References (#5516)

Generated the following references:
- `js-client`
- `pricing`
- `services`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-11-02 09:16:47 +00:00
committed by GitHub
co-authored by Oli Juhl Shahed Nasser
parent 80fe362f33
commit aa2bb7a31b
271 changed files with 38146 additions and 9809 deletions
@@ -35,6 +35,14 @@ export interface CreatePriceSetMoneyAmountDTO {
money_amount?: MoneyAmountDTO | string
}
/**
* @interface
*
* Filters to apply on price set money amounts.
*
* @prop id - The IDs to filter the price set money amounts by.
* @prop price_set_id - The IDs to filter the price set money amount's associated price set.
*/
export interface FilterablePriceSetMoneyAmountProps
extends BaseFilterable<FilterablePriceSetMoneyAmountProps> {
id?: string[]
+203 -1
View File
@@ -2200,13 +2200,215 @@ export interface IPricingModuleService {
sharedContext?: Context
): Promise<[PriceSetMoneyAmountRulesDTO[], number]>
/**
* This method is used to retrieve a paginated list of price set money amounts based on optional filters and configuration.
*
* @param {FilterablePriceSetMoneyAmountProps} filters - The filters to apply on the retrieved price set money amounts.
* @param {FindConfig<PriceSetMoneyAmountDTO>} config -
* The configurations determining how the price set money amounts are retrieved. Its properties, such as `select` or `relations`, accept the
* attributes or relations associated with a price set money amount.
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
* @returns {Promise<PriceSetMoneyAmountDTO[]>} The list of price set money amounts.
*
* @example
*
* To retrieve a list of price set money amounts using their IDs:
*
* ```ts
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
*
* async function retrievePriceSetMoneyAmounts (id: string) {
* const pricingService = await initializePricingModule()
*
* const priceSetMoneyAmounts = await pricingService.listPriceSetMoneyAmounts({
* id: [id]
* })
*
* // do something with the price set money amounts or return them
* }
* ```
*
* To specify relations that should be retrieved within the price set money amounts:
*
* ```ts
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
*
* async function retrievePriceSetMoneyAmounts (id: string) {
* const pricingService = await initializePricingModule()
*
* const priceSetMoneyAmounts = await pricingService.listPriceSetMoneyAmounts({
* id: [id]
* }, {
* relations: ["price_rules"]
* })
*
* // do something with the price set money amounts or return them
* }
* ```
*
* 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
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
*
* async function retrievePriceSetMoneyAmounts (id: string, skip: number, take: number) {
* const pricingService = await initializePricingModule()
*
* const priceSetMoneyAmounts = await pricingService.listPriceSetMoneyAmounts({
* id: [id]
* }, {
* relations: ["price_rules"],
* skip,
* take
* })
*
* // do something with the price set money amounts or return them
* }
* ```
*
* You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
*
* ```ts
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
*
* async function retrievePriceSetMoneyAmounts (ids: string[], titles: string[], skip: number, take: number) {
* const pricingService = await initializePricingModule()
*
* const priceSetMoneyAmounts = await pricingService.listPriceSetMoneyAmounts({
* $and: [
* {
* id: ids
* },
* {
* title: titles
* }
* ]
* }, {
* relations: ["price_rules"],
* skip,
* take
* })
*
* // do something with the price set money amounts or return them
* }
* ```
*/
listPriceSetMoneyAmounts(
filters?: FilterablePriceSetMoneyAmountProps,
config?: FindConfig<PriceSetMoneyAmountDTO>,
sharedContext?: Context
): Promise<PriceSetMoneyAmountDTO[]>
/**
* This method is used to retrieve a paginated list of price set money amounts along with the total count of
* available price set money amounts satisfying the provided filters.
*
* @param {FilterablePriceSetMoneyAmountProps} filters - The filters to apply on the retrieved price set money amounts.
* @param {FindConfig<PriceSetMoneyAmountDTO>} config -
* The configurations determining how the price set money amounts are retrieved. Its properties, such as `select` or `relations`, accept the
* attributes or relations associated with a price set money amount.
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
* @returns {Promise<[PriceSetMoneyAmountDTO[], number]>} The list of price set money amounts and their total count.
*
* @example
*
* To retrieve a list of price set money amounts using their IDs:
*
* ```ts
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
*
* async function retrievePriceSetMoneyAmounts (id: string) {
* const pricingService = await initializePricingModule()
*
* const [priceSetMoneyAmounts, count] = await pricingService.listAndCountPriceSetMoneyAmounts({
* id: [id]
* })
*
* // do something with the price set money amounts or return them
* }
* ```
*
* To specify relations that should be retrieved within the price set money amounts:
*
* ```ts
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
*
* async function retrievePriceSetMoneyAmounts (id: string) {
* const pricingService = await initializePricingModule()
*
* const [priceSetMoneyAmounts, count] = await pricingService.listAndCountPriceSetMoneyAmounts({
* id: [id]
* }, {
* relations: ["price_rules"],
* })
*
* // do something with the price set money amounts or return them
* }
* ```
*
* 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
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
*
* async function retrievePriceSetMoneyAmounts (id: string, skip: number, take: number) {
* const pricingService = await initializePricingModule()
*
* const [priceSetMoneyAmounts, count] = await pricingService.listAndCountPriceSetMoneyAmounts({
* id: [id]
* }, {
* relations: ["price_rules"],
* skip,
* take
* })
*
* // do something with the price set money amounts or return them
* }
* ```
*
* You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
*
* ```ts
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
*
* async function retrievePriceSetMoneyAmounts (ids: string[], titles: string[], skip: number, take: number) {
* const pricingService = await initializePricingModule()
*
* const [priceSetMoneyAmounts, count] = await pricingService.listAndCountPriceSetMoneyAmounts({
* $and: [
* {
* id: ids
* },
* {
* title: titles
* }
* ]
* }, {
* relations: ["price_rules"],
* skip,
* take
* })
*
* // do something with the price set money amounts or return them
* }
* ```
*/
listAndCountPriceSetMoneyAmounts(
filters?: FilterablePriceSetMoneyAmountProps,
config?: FindConfig<PriceSetMoneyAmountDTO>,