@medusajs/types 1.11.5 → 1.11.6-next-20231109084604

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ export type ProjectConfigOptions = {
39
39
  export type ConfigModule = {
40
40
  projectConfig: ProjectConfigOptions;
41
41
  featureFlags: Record<string, boolean | string>;
42
- modules?: Record<string, false | string | Partial<InternalModuleDeclaration | ExternalModuleDeclaration>>;
42
+ modules?: Record<string, boolean | Partial<InternalModuleDeclaration | ExternalModuleDeclaration>>;
43
43
  plugins: ({
44
44
  resolve: string;
45
45
  options: Record<string, unknown>;
@@ -22,7 +22,7 @@ export type JoinerRelationship = {
22
22
  args?: Record<string, any>;
23
23
  };
24
24
  export interface JoinerServiceConfigAlias {
25
- name: string;
25
+ name: string | string[];
26
26
  /**
27
27
  * Extra arguments to pass to the remoteFetchData callback
28
28
  */
@@ -31,6 +31,14 @@ export interface CreatePriceSetMoneyAmountDTO {
31
31
  price_set?: PriceSetDTO | string;
32
32
  money_amount?: MoneyAmountDTO | string;
33
33
  }
34
+ /**
35
+ * @interface
36
+ *
37
+ * Filters to apply on price set money amounts.
38
+ *
39
+ * @prop id - The IDs to filter the price set money amounts by.
40
+ * @prop price_set_id - The IDs to filter the price set money amount's associated price set.
41
+ */
34
42
  export interface FilterablePriceSetMoneyAmountProps extends BaseFilterable<FilterablePriceSetMoneyAmountProps> {
35
43
  id?: string[];
36
44
  price_set_id?: string[];
@@ -2033,7 +2033,210 @@ export interface IPricingModuleService {
2033
2033
  * ```
2034
2034
  */
2035
2035
  listAndCountPriceSetMoneyAmountRules(filters?: FilterablePriceSetMoneyAmountRulesProps, config?: FindConfig<PriceSetMoneyAmountRulesDTO>, sharedContext?: Context): Promise<[PriceSetMoneyAmountRulesDTO[], number]>;
2036
+ /**
2037
+ * This method is used to retrieve a paginated list of price set money amounts based on optional filters and configuration.
2038
+ *
2039
+ * @param {FilterablePriceSetMoneyAmountProps} filters - The filters to apply on the retrieved price set money amounts.
2040
+ * @param {FindConfig<PriceSetMoneyAmountDTO>} config -
2041
+ * The configurations determining how the price set money amounts are retrieved. Its properties, such as `select` or `relations`, accept the
2042
+ * attributes or relations associated with a price set money amount.
2043
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
2044
+ * @returns {Promise<PriceSetMoneyAmountDTO[]>} The list of price set money amounts.
2045
+ *
2046
+ * @example
2047
+ *
2048
+ * To retrieve a list of price set money amounts using their IDs:
2049
+ *
2050
+ * ```ts
2051
+ * import {
2052
+ * initialize as initializePricingModule,
2053
+ * } from "@medusajs/pricing"
2054
+ *
2055
+ * async function retrievePriceSetMoneyAmounts (id: string) {
2056
+ * const pricingService = await initializePricingModule()
2057
+ *
2058
+ * const priceSetMoneyAmounts = await pricingService.listPriceSetMoneyAmounts({
2059
+ * id: [id]
2060
+ * })
2061
+ *
2062
+ * // do something with the price set money amounts or return them
2063
+ * }
2064
+ * ```
2065
+ *
2066
+ * To specify relations that should be retrieved within the price set money amounts:
2067
+ *
2068
+ * ```ts
2069
+ * import {
2070
+ * initialize as initializePricingModule,
2071
+ * } from "@medusajs/pricing"
2072
+ *
2073
+ * async function retrievePriceSetMoneyAmounts (id: string) {
2074
+ * const pricingService = await initializePricingModule()
2075
+ *
2076
+ * const priceSetMoneyAmounts = await pricingService.listPriceSetMoneyAmounts({
2077
+ * id: [id]
2078
+ * }, {
2079
+ * relations: ["price_rules"]
2080
+ * })
2081
+ *
2082
+ * // do something with the price set money amounts or return them
2083
+ * }
2084
+ * ```
2085
+ *
2086
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
2087
+ *
2088
+ * ```ts
2089
+ * import {
2090
+ * initialize as initializePricingModule,
2091
+ * } from "@medusajs/pricing"
2092
+ *
2093
+ * async function retrievePriceSetMoneyAmounts (id: string, skip: number, take: number) {
2094
+ * const pricingService = await initializePricingModule()
2095
+ *
2096
+ * const priceSetMoneyAmounts = await pricingService.listPriceSetMoneyAmounts({
2097
+ * id: [id]
2098
+ * }, {
2099
+ * relations: ["price_rules"],
2100
+ * skip,
2101
+ * take
2102
+ * })
2103
+ *
2104
+ * // do something with the price set money amounts or return them
2105
+ * }
2106
+ * ```
2107
+ *
2108
+ * You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
2109
+ *
2110
+ * ```ts
2111
+ * import {
2112
+ * initialize as initializePricingModule,
2113
+ * } from "@medusajs/pricing"
2114
+ *
2115
+ * async function retrievePriceSetMoneyAmounts (ids: string[], titles: string[], skip: number, take: number) {
2116
+ * const pricingService = await initializePricingModule()
2117
+ *
2118
+ * const priceSetMoneyAmounts = await pricingService.listPriceSetMoneyAmounts({
2119
+ * $and: [
2120
+ * {
2121
+ * id: ids
2122
+ * },
2123
+ * {
2124
+ * title: titles
2125
+ * }
2126
+ * ]
2127
+ * }, {
2128
+ * relations: ["price_rules"],
2129
+ * skip,
2130
+ * take
2131
+ * })
2132
+ *
2133
+ * // do something with the price set money amounts or return them
2134
+ * }
2135
+ * ```
2136
+ */
2036
2137
  listPriceSetMoneyAmounts(filters?: FilterablePriceSetMoneyAmountProps, config?: FindConfig<PriceSetMoneyAmountDTO>, sharedContext?: Context): Promise<PriceSetMoneyAmountDTO[]>;
2138
+ /**
2139
+ * This method is used to retrieve a paginated list of price set money amounts along with the total count of
2140
+ * available price set money amounts satisfying the provided filters.
2141
+ *
2142
+ * @param {FilterablePriceSetMoneyAmountProps} filters - The filters to apply on the retrieved price set money amounts.
2143
+ * @param {FindConfig<PriceSetMoneyAmountDTO>} config -
2144
+ * The configurations determining how the price set money amounts are retrieved. Its properties, such as `select` or `relations`, accept the
2145
+ * attributes or relations associated with a price set money amount.
2146
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
2147
+ * @returns {Promise<[PriceSetMoneyAmountDTO[], number]>} The list of price set money amounts and their total count.
2148
+ *
2149
+ * @example
2150
+ *
2151
+ * To retrieve a list of price set money amounts using their IDs:
2152
+ *
2153
+ * ```ts
2154
+ * import {
2155
+ * initialize as initializePricingModule,
2156
+ * } from "@medusajs/pricing"
2157
+ *
2158
+ * async function retrievePriceSetMoneyAmounts (id: string) {
2159
+ * const pricingService = await initializePricingModule()
2160
+ *
2161
+ * const [priceSetMoneyAmounts, count] = await pricingService.listAndCountPriceSetMoneyAmounts({
2162
+ * id: [id]
2163
+ * })
2164
+ *
2165
+ * // do something with the price set money amounts or return them
2166
+ * }
2167
+ * ```
2168
+ *
2169
+ * To specify relations that should be retrieved within the price set money amounts:
2170
+ *
2171
+ * ```ts
2172
+ * import {
2173
+ * initialize as initializePricingModule,
2174
+ * } from "@medusajs/pricing"
2175
+ *
2176
+ * async function retrievePriceSetMoneyAmounts (id: string) {
2177
+ * const pricingService = await initializePricingModule()
2178
+ *
2179
+ * const [priceSetMoneyAmounts, count] = await pricingService.listAndCountPriceSetMoneyAmounts({
2180
+ * id: [id]
2181
+ * }, {
2182
+ * relations: ["price_rules"],
2183
+ * })
2184
+ *
2185
+ * // do something with the price set money amounts or return them
2186
+ * }
2187
+ * ```
2188
+ *
2189
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
2190
+ *
2191
+ * ```ts
2192
+ * import {
2193
+ * initialize as initializePricingModule,
2194
+ * } from "@medusajs/pricing"
2195
+ *
2196
+ * async function retrievePriceSetMoneyAmounts (id: string, skip: number, take: number) {
2197
+ * const pricingService = await initializePricingModule()
2198
+ *
2199
+ * const [priceSetMoneyAmounts, count] = await pricingService.listAndCountPriceSetMoneyAmounts({
2200
+ * id: [id]
2201
+ * }, {
2202
+ * relations: ["price_rules"],
2203
+ * skip,
2204
+ * take
2205
+ * })
2206
+ *
2207
+ * // do something with the price set money amounts or return them
2208
+ * }
2209
+ * ```
2210
+ *
2211
+ * You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
2212
+ *
2213
+ * ```ts
2214
+ * import {
2215
+ * initialize as initializePricingModule,
2216
+ * } from "@medusajs/pricing"
2217
+ *
2218
+ * async function retrievePriceSetMoneyAmounts (ids: string[], titles: string[], skip: number, take: number) {
2219
+ * const pricingService = await initializePricingModule()
2220
+ *
2221
+ * const [priceSetMoneyAmounts, count] = await pricingService.listAndCountPriceSetMoneyAmounts({
2222
+ * $and: [
2223
+ * {
2224
+ * id: ids
2225
+ * },
2226
+ * {
2227
+ * title: titles
2228
+ * }
2229
+ * ]
2230
+ * }, {
2231
+ * relations: ["price_rules"],
2232
+ * skip,
2233
+ * take
2234
+ * })
2235
+ *
2236
+ * // do something with the price set money amounts or return them
2237
+ * }
2238
+ * ```
2239
+ */
2037
2240
  listAndCountPriceSetMoneyAmounts(filters?: FilterablePriceSetMoneyAmountProps, config?: FindConfig<PriceSetMoneyAmountDTO>, sharedContext?: Context): Promise<[PriceSetMoneyAmountDTO[], number]>;
2038
2241
  /**
2039
2242
  * This method is used to create new price set money amount rules. A price set money amount rule creates an association between a price set money amount and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/types",
3
- "version": "1.11.5",
3
+ "version": "1.11.6-next-20231109084604",
4
4
  "description": "Medusa Types definition",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",