chore(docs): Generated References (#6351)
Generated the following references: - `file` - `fulfillment` - `inventory` - `js_client` - `medusa` - `medusa_config` - `medusa_react` - `modules` - `notification` - `payment` - `price_selection` - `pricing` - `product` - `services` - `stock_location` - `tax` - `tax_calculation` - `types` - `workflows` Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
co-authored by
Shahed Nasser
parent
e56c440911
commit
1d0a978ffe
+2
-2
@@ -7,7 +7,7 @@ This method is used to create a stock location.
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -17,7 +17,7 @@ async function createStockLocation (name: string) {
|
||||
const stockLocation = await stockLocationModule.create({
|
||||
name
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock location or return it
|
||||
}
|
||||
```
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ This method is used to delete a stock location.
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
|
||||
+7
-7
@@ -9,7 +9,7 @@ This method is used to retrieve a paginated list of stock locations based on opt
|
||||
To retrieve a list of stock locations using their IDs:
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -19,7 +19,7 @@ async function listStockLocations (ids: string[]) {
|
||||
const stockLocations = await stockLocationModule.list({
|
||||
id: ids
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock locations or return them
|
||||
}
|
||||
```
|
||||
@@ -27,7 +27,7 @@ async function listStockLocations (ids: string[]) {
|
||||
To specify relations that should be retrieved within the stock locations:
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -39,7 +39,7 @@ async function listStockLocations (ids: string[]) {
|
||||
}, {
|
||||
relations: ["address"]
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock locations or return them
|
||||
}
|
||||
```
|
||||
@@ -47,7 +47,7 @@ async function listStockLocations (ids: string[]) {
|
||||
By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -61,14 +61,14 @@ async function listStockLocations (ids: string[], skip: number, take: number) {
|
||||
skip,
|
||||
take
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock locations or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableStockLocationProps](../../interfaces/stock_location.FilterableStockLocationProps.mdx)","description":"The filters to apply on the retrieved stock locations.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [StringComparisonOperator](../../interfaces/stock_location.StringComparisonOperator.mdx)","description":"The names to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/stock_location.FindConfig.mdx)<[StockLocationDTO](../../types/stock_location.StockLocationDTO.mdx)>","description":"The configurations determining how the stock locations are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/stock_location.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="list"/>
|
||||
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableStockLocationProps](../../interfaces/stock_location.FilterableStockLocationProps.mdx)","description":"The filters to apply on the retrieved stock locations.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"q","type":"`string`","description":"Search parameter for stock location names","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [StringComparisonOperator](../../interfaces/stock_location.StringComparisonOperator.mdx)","description":"The names to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/stock_location.FindConfig.mdx)<[StockLocationDTO](../../types/stock_location.StockLocationDTO.mdx)>","description":"The configurations determining how the stock locations are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/stock_location.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="list"/>
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
+7
-7
@@ -9,7 +9,7 @@ This method is used to retrieve a paginated list of stock locations along with t
|
||||
To retrieve a list of stock locations using their IDs:
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -19,7 +19,7 @@ async function listStockLocations (ids: string[]) {
|
||||
const [stockLocations, count] = await stockLocationModule.listAndCount({
|
||||
id: ids
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock locations or return them
|
||||
}
|
||||
```
|
||||
@@ -27,7 +27,7 @@ async function listStockLocations (ids: string[]) {
|
||||
To specify relations that should be retrieved within the stock locations:
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -39,7 +39,7 @@ async function listStockLocations (ids: string[]) {
|
||||
}, {
|
||||
relations: ["address"]
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock locations or return them
|
||||
}
|
||||
```
|
||||
@@ -47,7 +47,7 @@ async function listStockLocations (ids: string[]) {
|
||||
By default, only the first `10` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -61,14 +61,14 @@ async function listStockLocations (ids: string[], skip: number, take: number) {
|
||||
skip,
|
||||
take
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock locations or return them
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableStockLocationProps](../../interfaces/stock_location.FilterableStockLocationProps.mdx)","description":"The filters to apply on the retrieved stock locations.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [StringComparisonOperator](../../interfaces/stock_location.StringComparisonOperator.mdx)","description":"The names to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/stock_location.FindConfig.mdx)<[StockLocationDTO](../../types/stock_location.StockLocationDTO.mdx)>","description":"The configurations determining how the stock locations are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/stock_location.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCount"/>
|
||||
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableStockLocationProps](../../interfaces/stock_location.FilterableStockLocationProps.mdx)","description":"The filters to apply on the retrieved stock locations.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"q","type":"`string`","description":"Search parameter for stock location names","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [StringComparisonOperator](../../interfaces/stock_location.StringComparisonOperator.mdx)","description":"The names to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/stock_location.FindConfig.mdx)<[StockLocationDTO](../../types/stock_location.StockLocationDTO.mdx)>","description":"The configurations determining how the stock locations are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[SharedContext](../../interfaces/stock_location.SharedContext.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCount"/>
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@ This method is used to retrieve a stock location by its ID
|
||||
A simple example that retrieves a inventory item by its ID:
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -17,7 +17,7 @@ async function retrieveStockLocation (id: string) {
|
||||
const stockLocationModule = await initializeStockLocationModule({})
|
||||
|
||||
const stockLocation = await stockLocationModule.retrieve(id)
|
||||
|
||||
|
||||
// do something with the stock location or return it
|
||||
}
|
||||
```
|
||||
@@ -25,7 +25,7 @@ async function retrieveStockLocation (id: string) {
|
||||
To specify relations that should be retrieved:
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -35,7 +35,7 @@ async function retrieveStockLocation (id: string) {
|
||||
const stockLocation = await stockLocationModule.retrieve(id, {
|
||||
relations: ["address"]
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock location or return it
|
||||
}
|
||||
```
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ This method is used to update a stock location.
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
import {
|
||||
initialize as initializeStockLocationModule,
|
||||
} from "@medusajs/stock-location"
|
||||
|
||||
@@ -17,7 +17,7 @@ async function updateStockLocation (id:string, name: string) {
|
||||
const stockLocation = await stockLocationModule.update(id, {
|
||||
name
|
||||
})
|
||||
|
||||
|
||||
// do something with the stock location or return it
|
||||
}
|
||||
```
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ The filters to apply on the retrieved stock locations.
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [StringComparisonOperator](stock_location.StringComparisonOperator.mdx)","description":"The names to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableStockLocationProps"/>
|
||||
<ParameterTypes parameters={[{"name":"q","type":"`string`","description":"Search parameter for stock location names","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [StringComparisonOperator](stock_location.StringComparisonOperator.mdx)","description":"The names to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableStockLocationProps"/>
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# IModuleService
|
||||
+4
@@ -2,6 +2,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# SharedContext
|
||||
|
||||
## Deprecated
|
||||
|
||||
use `Context` instead
|
||||
|
||||
A context used to share resources, such as transaction manager, between the application and the module.
|
||||
|
||||
## Properties
|
||||
|
||||
Reference in New Issue
Block a user