chore(docs): Generated References (#5666)

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

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-11-21 12:36:09 +00:00
committed by GitHub
parent 4774b8ff3a
commit 2b9e8bda5e
178 changed files with 10576 additions and 718 deletions
@@ -1,121 +0,0 @@
---
displayed_sidebar: jsClientSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ICacheService
## Methods
### get
#### Parameters
<ParameterTypes parameters={[
{
"name": "key",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;null \\| T&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### invalidate
#### Parameters
<ParameterTypes parameters={[
{
"name": "key",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### set
#### Parameters
<ParameterTypes parameters={[
{
"name": "key",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`unknown`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ttl",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,189 +0,0 @@
---
displayed_sidebar: jsClientSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# IEventBusModuleService
## Methods
### emit
`**emit**<TypeParameter T>(eventName, data, options?): Promise&#60;void&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "eventName",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`T`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`**emit**<TypeParameter T>(data): Promise&#60;void&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "data",
"type": "[EmitData](../types/internal.EmitData.mdx)&#60;T&#62;[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### subscribe
#### Parameters
<ParameterTypes parameters={[
{
"name": "eventName",
"type": "`string` \\| `symbol`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subscriber",
"type": "[Subscriber](../types/internal.Subscriber.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SubscriberContext](../types/internal.SubscriberContext.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "IEventBusModuleService",
"type": "[IEventBusModuleService](internal.IEventBusModuleService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### unsubscribe
#### Parameters
<ParameterTypes parameters={[
{
"name": "eventName",
"type": "`string` \\| `symbol`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subscriber",
"type": "[Subscriber](../types/internal.Subscriber.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SubscriberContext](../types/internal.SubscriberContext.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "IEventBusModuleService",
"type": "[IEventBusModuleService](internal.IEventBusModuleService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,189 +0,0 @@
---
displayed_sidebar: jsClientSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# IEventBusService
## Methods
### emit
#### Parameters
<ParameterTypes parameters={[
{
"name": "event",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "data",
"type": "`T`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`unknown`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;unknown&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### subscribe
#### Parameters
<ParameterTypes parameters={[
{
"name": "eventName",
"type": "`string` \\| `symbol`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subscriber",
"type": "[Subscriber](../types/internal.Subscriber.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SubscriberContext](../types/internal.SubscriberContext.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "IEventBusService",
"type": "[IEventBusService](internal.IEventBusService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### unsubscribe
#### Parameters
<ParameterTypes parameters={[
{
"name": "eventName",
"type": "`string` \\| `symbol`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subscriber",
"type": "[Subscriber](../types/internal.Subscriber.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SubscriberContext](../types/internal.SubscriberContext.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "IEventBusService",
"type": "[IEventBusService](internal.IEventBusService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### withTransaction
#### Parameters
<ParameterTypes parameters={[
{
"name": "transactionManager",
"type": "EntityManager",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "IEventBusService",
"type": "[IEventBusService](internal.IEventBusService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
@@ -1,511 +0,0 @@
---
displayed_sidebar: jsClientSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# IStockLocationService
## Methods
### create
This method is used to create a stock location.
#### Example
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function createStockLocation (name: string) {
const stockLocationModule = await initializeStockLocationModule({})
const stockLocation = await stockLocationModule.create({
name
})
// do something with the stock location or return it
}
```
#### Parameters
<ParameterTypes parameters={[
{
"name": "input",
"type": "[CreateStockLocationInput](../../StockLocationTypes/types/internal.internal-1.StockLocationTypes.CreateStockLocationInput.mdx)",
"description": "The details of the stock location to create.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SharedContext](../../internal-1/interfaces/internal.internal-1.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": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[StockLocationDTO](../types/internal.StockLocationDTO.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "The created stock location's details.",
"expandable": false,
"children": []
}
]} />
___
### delete
This method is used to delete a stock location.
#### Example
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function deleteStockLocation (id:string) {
const stockLocationModule = await initializeStockLocationModule({})
await stockLocationModule.delete(id)
}
```
#### Parameters
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the stock location.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SharedContext](../../internal-1/interfaces/internal.internal-1.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": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "Resolves when the stock location is successfully deleted.",
"expandable": false,
"children": []
}
]} />
___
### list
This method is used to retrieve a paginated list of stock locations based on optional filters and configuration.
#### Example
To retrieve a list of stock locations using their IDs:
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function listStockLocations (ids: string[]) {
const stockLocationModule = await initializeStockLocationModule({})
const stockLocations = await stockLocationModule.list({
id: ids
})
// do something with the stock locations or return them
}
```
To specify relations that should be retrieved within the stock locations:
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function listStockLocations (ids: string[]) {
const stockLocationModule = await initializeStockLocationModule({})
const stockLocations = await stockLocationModule.list({
id: ids
}, {
relations: ["address"]
})
// do something with the stock locations or return them
}
```
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 {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function listStockLocations (ids: string[], skip: number, take: number) {
const stockLocationModule = await initializeStockLocationModule({})
const stockLocations = await stockLocationModule.list({
id: ids
}, {
relations: ["address"],
skip,
take
})
// do something with the stock locations or return them
}
```
#### Parameters
<ParameterTypes parameters={[
{
"name": "selector",
"type": "[FilterableStockLocationProps](../../StockLocationTypes/interfaces/internal.internal-1.StockLocationTypes.FilterableStockLocationProps.mdx)",
"description": "The filters to apply on the retrieved stock locations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "config",
"type": "[FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)&#60;[StockLocationDTO](../types/internal.StockLocationDTO.mdx)&#62;",
"description": "The configurations determining how the stock locations are retrieved. Its properties, such as `select` or `relations`, accept the attributes or relations associated with a stock location.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SharedContext](../../internal-1/interfaces/internal.internal-1.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": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[StockLocationDTO](../types/internal.StockLocationDTO.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "The list of stock locations.",
"expandable": false,
"children": []
}
]} />
___
### listAndCount
This method is used to retrieve a paginated list of stock locations along with the total count of available stock locations satisfying the provided filters.
#### Example
To retrieve a list of stock locations using their IDs:
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function listStockLocations (ids: string[]) {
const stockLocationModule = await initializeStockLocationModule({})
const [stockLocations, count] = await stockLocationModule.listAndCount({
id: ids
})
// do something with the stock locations or return them
}
```
To specify relations that should be retrieved within the stock locations:
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function listStockLocations (ids: string[]) {
const stockLocationModule = await initializeStockLocationModule({})
const [stockLocations, count] = await stockLocationModule.listAndCount({
id: ids
}, {
relations: ["address"]
})
// do something with the stock locations or return them
}
```
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 {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function listStockLocations (ids: string[], skip: number, take: number) {
const stockLocationModule = await initializeStockLocationModule({})
const [stockLocations, count] = await stockLocationModule.listAndCount({
id: ids
}, {
relations: ["address"],
skip,
take
})
// do something with the stock locations or return them
}
```
#### Parameters
<ParameterTypes parameters={[
{
"name": "selector",
"type": "[FilterableStockLocationProps](../../StockLocationTypes/interfaces/internal.internal-1.StockLocationTypes.FilterableStockLocationProps.mdx)",
"description": "The filters to apply on the retrieved stock locations.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "config",
"type": "[FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)&#60;[StockLocationDTO](../types/internal.StockLocationDTO.mdx)&#62;",
"description": "The configurations determining how the stock locations are retrieved. Its properties, such as `select` or `relations`, accept the attributes or relations associated with a stock location.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SharedContext](../../internal-1/interfaces/internal.internal-1.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": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[[StockLocationDTO](../types/internal.StockLocationDTO.mdx)[], number]&#62;",
"optional": false,
"defaultValue": "",
"description": "The list of stock locations along with the total count.",
"expandable": false,
"children": []
}
]} />
___
### retrieve
This method is used to retrieve a stock location by its ID
#### Example
A simple example that retrieves a inventory item by its ID:
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function retrieveStockLocation (id: string) {
const stockLocationModule = await initializeStockLocationModule({})
const stockLocation = await stockLocationModule.retrieve(id)
// do something with the stock location or return it
}
```
To specify relations that should be retrieved:
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function retrieveStockLocation (id: string) {
const stockLocationModule = await initializeStockLocationModule({})
const stockLocation = await stockLocationModule.retrieve(id, {
relations: ["address"]
})
// do something with the stock location or return it
}
```
#### Parameters
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the stock location",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "config",
"type": "[FindConfig](../../CommonTypes/interfaces/internal.internal-1.CommonTypes.FindConfig.mdx)&#60;[StockLocationDTO](../types/internal.StockLocationDTO.mdx)&#62;",
"description": "The configurations determining how the stock location is retrieved. Its properties, such as `select` or `relations`, accept the attributes or relations associated with a stock location.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SharedContext](../../internal-1/interfaces/internal.internal-1.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": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[StockLocationDTO](../types/internal.StockLocationDTO.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "The stock location's details.",
"expandable": false,
"children": []
}
]} />
___
### update
This method is used to update a stock location.
#### Example
```ts
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function updateStockLocation (id:string, name: string) {
const stockLocationModule = await initializeStockLocationModule({})
const stockLocation = await stockLocationModule.update(id, {
name
})
// do something with the stock location or return it
}
```
#### Parameters
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the stock location.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "input",
"type": "[UpdateStockLocationInput](../../StockLocationTypes/types/internal.internal-1.StockLocationTypes.UpdateStockLocationInput.mdx)",
"description": "The attributes to update in the stock location.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[SharedContext](../../internal-1/interfaces/internal.internal-1.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": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[StockLocationDTO](../types/internal.StockLocationDTO.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "The stock location's details.",
"expandable": false,
"children": []
}
]} />
@@ -1,129 +0,0 @@
---
displayed_sidebar: jsClientSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Logger
## Properties
<ParameterTypes parameters={[
{
"name": "activity",
"type": "(`message`: `string`, `config?`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "debug",
"type": "(`message`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "error",
"type": "(`messageOrError`: `any`, `error?`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "failure",
"type": "(`activityId`: `any`, `message`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "info",
"type": "(`message`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "log",
"type": "(...`args`: `any`[]) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "panic",
"type": "(`data`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "progress",
"type": "(`activityId`: `any`, `message`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "setLogLevel",
"type": "(`level`: `string`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shouldLog",
"type": "(`level`: `string`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "success",
"type": "(`activityId`: `any`, `message`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "unsetLogLevel",
"type": "() => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "warn",
"type": "(`message`: `any`) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
@@ -0,0 +1,23 @@
---
displayed_sidebar: jsClientSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# SubscriberContext
Construct a type with a set of properties K of type T
## Properties
<ParameterTypes parameters={[
{
"name": "subscriberId",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />