chore(docs): Generated References (#5743)

Generated the following references:
- `entities`
- `inventory`
- `js-client`
- `pricing`
- `product`
- `services`
- `stock-location`
- `workflows`

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:
authored and GitHub committed 2023-11-27 18:58:52 +00:00
1 parent dc6b815b12
commit cdd42dbdcd
1383 files changed
+18978 -20154

No files matched your search

@@ -22,17 +22,7 @@ Determines whether all the members of an array satisfy the specified test.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`value`: `number`, `index`: `number`, `array`: Uint8Array) => `unknown`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "thisArg",
@@ -22,17 +22,7 @@ Returns the elements of an array that meet the condition specified in a callback
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`value`: `number`, `index`: `number`, `array`: Uint8Array) => `any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "thisArg",
@@ -23,17 +23,7 @@ otherwise.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`value`: `number`, `index`: `number`, `obj`: Uint8Array) => `boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "thisArg",
@@ -23,17 +23,7 @@ otherwise.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`value`: `number`, `index`: `number`, `obj`: Uint8Array) => `boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "thisArg",
@@ -22,17 +22,7 @@ Performs the specified action for each element in an array.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`value`: `number`, `index`: `number`, `array`: Uint8Array) => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "thisArg",
@@ -23,17 +23,7 @@ contains the results.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`value`: `number`, `index`: `number`, `array`: Uint8Array) => `number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "thisArg",
@@ -24,17 +24,7 @@ call to the callback function.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`previousValue`: `number`, `currentValue`: `number`, `currentIndex`: `number`, `array`: Uint8Array) => `number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
}
]} />
@@ -70,17 +60,7 @@ Uint8Array.reduce
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`previousValue`: `number`, `currentValue`: `number`, `currentIndex`: `number`, `array`: Uint8Array) => `number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "initialValue",
@@ -119,6 +99,8 @@ Calls the specified callback function for all the elements in an array. The retu
the callback function is the accumulated result, and is provided as an argument in the next
call to the callback function.
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "U",
@@ -141,17 +123,7 @@ call to the callback function.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`previousValue`: `U`, `currentValue`: `number`, `currentIndex`: `number`, `array`: Uint8Array) => `U`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "initialValue",
@@ -168,7 +140,17 @@ call to the callback function.
`U`
<ParameterTypes parameters={[]} />
<ParameterTypes parameters={[
{
"name": "U",
"type": "`U`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Inherited from
@@ -24,17 +24,7 @@ argument in the next call to the callback function.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`previousValue`: `number`, `currentValue`: `number`, `currentIndex`: `number`, `array`: Uint8Array) => `number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
}
]} />
@@ -70,17 +60,7 @@ Uint8Array.reduceRight
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`previousValue`: `number`, `currentValue`: `number`, `currentIndex`: `number`, `array`: Uint8Array) => `number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "initialValue",
@@ -119,6 +99,8 @@ Calls the specified callback function for all the elements in an array, in desce
The return value of the callback function is the accumulated result, and is provided as an
argument in the next call to the callback function.
#### Type Parameters
<ParameterTypes parameters={[
{
"name": "U",
@@ -141,17 +123,7 @@ argument in the next call to the callback function.
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`previousValue`: `U`, `currentValue`: `number`, `currentIndex`: `number`, `array`: Uint8Array) => `U`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "initialValue",
@@ -168,7 +140,17 @@ argument in the next call to the callback function.
`U`
<ParameterTypes parameters={[]} />
<ParameterTypes parameters={[
{
"name": "U",
"type": "`U`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
#### Inherited from
@@ -22,17 +22,7 @@ Determines whether the specified callback function returns true for any element
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`value`: `number`, `index`: `number`, `array`: Uint8Array) => `unknown`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "thisArg",
@@ -22,17 +22,7 @@ Sorts an array.
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "(`a`: `number`, `b`: `number`) => `number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
}
]} />
@@ -18,7 +18,7 @@ This method is used to create a product.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -473,6 +473,15 @@ async function createProduct (title: string) {
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The id of the product",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`string`",
@@ -18,7 +18,7 @@ This method is used to create a product category.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to create product collections.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to create product options.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to create product tags.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to create a product type.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -0,0 +1,545 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/createVariants
sidebar_label: createVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# createVariants - Product Module Reference
This documentation provides a reference to the createVariants method. This belongs to the Product Module.
This method is used to create variants for a product.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function createProductVariants (items: {
product_id: string,
title: string
}[]) {
const productModule = await initializeProductModule()
const productVariants = await productModule.createVariants(items)
// do something with the product variants or return them
}
```
## Parameters
<ParameterTypes parameters={[
{
"name": "data",
"type": "[CreateProductVariantDTO](../../interfaces/CreateProductVariantDTO.mdx)[]",
"description": "The product variants to create.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "barcode",
"type": "`string`",
"description": "The barcode of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`string`",
"description": "The EAN of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[CreateProductVariantOptionDTO](../../interfaces/CreateProductVariantOptionDTO.mdx)[]",
"description": "The product variant options to create and associate with the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of a product variant option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`string`",
"description": "The origin country of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The id of the product",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`string`",
"description": "The SKU of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "sharedContext",
"type": "[Context](../../interfaces/Context.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": "enableNestedTransactions",
"type": "`boolean`",
"description": "A boolean value indicating whether nested transactions are enabled.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationLevel",
"type": "`string`",
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager",
"type": "`TManager`",
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionId",
"type": "`string`",
"description": "A string indicating the ID of the current transaction.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager",
"type": "`TManager`",
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
## Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[ProductVariantDTO](../../interfaces/ProductVariantDTO.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "The created product variants' details.",
"expandable": false,
"children": [
{
"name": "ProductVariantDTO[]",
"type": "[ProductVariantDTO](../../interfaces/ProductVariantDTO.mdx)[]",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": [
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "barcode",
"type": "`null` \\| `string`",
"description": "The barcode of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`null` \\| `string`",
"description": "The EAN of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionValueDTO](../../interfaces/ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[ProductDTO](../../interfaces/ProductDTO.mdx)",
"description": "The associated product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the associated product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`null` \\| `string`",
"description": "The SKU of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`null` \\| `string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant_rank",
"type": "`null` \\| `number`",
"description": "he ranking of the variant among other variants associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]
}
]} />
@@ -18,7 +18,7 @@ This method is used to delete products. Unlike the [softDelete](IProductModuleSe
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to delete a product category by its ID.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to delete collections by their ID.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to delete a product option.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to delete product tags by their ID.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to delete a product type.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -0,0 +1,113 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/deleteVariants
sidebar_label: deleteVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# deleteVariants - Product Module Reference
This documentation provides a reference to the deleteVariants method. This belongs to the Product Module.
This method is used to delete ProductVariant. This method will completely remove the ProductVariant and they can no longer be accessed or retrieved.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteProducts (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.deleteVariants(ids)
}
```
## Parameters
<ParameterTypes parameters={[
{
"name": "productVariantIds",
"type": "`string`[]",
"description": "The IDs of the ProductVariant to be deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sharedContext",
"type": "[Context](../../interfaces/Context.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": "enableNestedTransactions",
"type": "`boolean`",
"description": "A boolean value indicating whether nested transactions are enabled.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationLevel",
"type": "`string`",
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager",
"type": "`TManager`",
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionId",
"type": "`string`",
"description": "A string indicating the ID of the current transaction.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager",
"type": "`TManager`",
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
## Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "Resolves when the ProductVariant are successfully deleted.",
"expandable": false,
"children": []
}
]} />
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of price sets based on optional
To retrieve a list of products using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProducts (ids: string[]) {
To specify relations that should be retrieved within the products:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProducts (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -69,7 +69,7 @@ async function retrieveProducts (ids: string[], skip: number, take: number) {
id: ids
}, {
relations: ["categories"],
skip,
skip,
take
})
@@ -80,7 +80,7 @@ async function retrieveProducts (ids: string[], skip: number, take: number) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -98,7 +98,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
]
}, {
relations: ["categories"],
skip,
skip,
take
})
@@ -184,7 +184,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
{
"name": "collection_id",
"type": "`string` \\| `string`[] \\| [OperatorMap](../../types/OperatorMap.mdx)&#60;string&#62;",
"description": "Filters a product by the IDs of their associated collections.",
"description": "Filters a product by its associated collections.",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -253,17 +253,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -285,7 +275,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -294,7 +284,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of products along with the tota
To retrieve a list of products using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProducts (ids: string[]) {
To specify relations that should be retrieved within the products:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProducts (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -69,7 +69,7 @@ async function retrieveProducts (ids: string[], skip: number, take: number) {
id: ids
}, {
relations: ["categories"],
skip,
skip,
take
})
@@ -80,7 +80,7 @@ async function retrieveProducts (ids: string[], skip: number, take: number) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -98,7 +98,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
]
}, {
relations: ["categories"],
skip,
skip,
take
})
@@ -184,7 +184,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
{
"name": "collection_id",
"type": "`string` \\| `string`[] \\| [OperatorMap](../../types/OperatorMap.mdx)&#60;string&#62;",
"description": "Filters a product by the IDs of their associated collections.",
"description": "Filters a product by its associated collections.",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -253,17 +253,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -285,7 +275,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -294,7 +284,7 @@ async function retrieveProducts (ids: string[], title: string, skip: number, tak
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product categories along wit
To retrieve a list of product categories using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveCategories (ids: string[]) {
To specify relations that should be retrieved within the product categories:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveCategories (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveCategories (ids: string[], skip: number, take: number) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -215,17 +215,7 @@ async function retrieveCategories (ids: string[], name: string, skip: number, ta
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -247,7 +237,7 @@ async function retrieveCategories (ids: string[], name: string, skip: number, ta
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -256,7 +246,7 @@ async function retrieveCategories (ids: string[], name: string, skip: number, ta
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product collections along wi
To retrieve a list of product collections using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveCollections (ids: string[]) {
To specify relations that should be retrieved within the product collections:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveCollections (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveCollections (ids: string[], skip: number, take: number) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -179,17 +179,7 @@ async function retrieveCollections (ids: string[], title: string, skip: number,
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -211,7 +201,7 @@ async function retrieveCollections (ids: string[], title: string, skip: number,
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -220,7 +210,7 @@ async function retrieveCollections (ids: string[], title: string, skip: number,
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product options along with t
To retrieve a list of product options using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProductOptions (ids: string[]) {
To specify relations that should be retrieved within the product types:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProductOptions (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveProductOptions (ids: string[], skip: number, take: number
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -179,17 +179,7 @@ async function retrieveProductOptions (ids: string[], title: string, skip: numbe
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -211,7 +201,7 @@ async function retrieveProductOptions (ids: string[], title: string, skip: numbe
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -220,7 +210,7 @@ async function retrieveProductOptions (ids: string[], title: string, skip: numbe
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product tags along with the
To retrieve a list of product tags using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProductTag (tagIds: string[]) {
To specify relations that should be retrieved within the product tags:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProductTag (tagIds: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveProductTag (tagIds: string[], skip: number, take: number)
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -170,17 +170,7 @@ async function retrieveProductTag (tagIds: string[], value: string, skip: number
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -202,7 +192,7 @@ async function retrieveProductTag (tagIds: string[], value: string, skip: number
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -211,7 +201,7 @@ async function retrieveProductTag (tagIds: string[], value: string, skip: number
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product types along with the
To retrieve a list of product types using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProductTypes (ids: string[]) {
To specify attributes that should be retrieved within the product types:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProductTypes (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveProductTypes (ids: string[], skip: number, take: number)
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -170,17 +170,7 @@ async function retrieveProductTypes (ids: string[], value: string, skip: number,
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -202,7 +192,7 @@ async function retrieveProductTypes (ids: string[], value: string, skip: number,
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -211,7 +201,7 @@ async function retrieveProductTypes (ids: string[], value: string, skip: number,
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product variants along with
To retrieve a list of product variants using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProductVariants (ids: string[]) {
To specify relations that should be retrieved within the product variants:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProductVariants (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveProductVariants (ids: string[], skip: number, take: numbe
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -198,17 +198,7 @@ async function retrieveProductVariants (ids: string[], sku: string, skip: number
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -230,7 +220,7 @@ async function retrieveProductVariants (ids: string[], sku: string, skip: number
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -239,7 +229,7 @@ async function retrieveProductVariants (ids: string[], sku: string, skip: number
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product categories based on
To retrieve a list of product categories using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveCategories (ids: string[]) {
To specify relations that should be retrieved within the product categories:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveCategories (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveCategories (ids: string[], skip: number, take: number) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -215,17 +215,7 @@ async function retrieveCategories (ids: string[], name: string, skip: number, ta
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -247,7 +237,7 @@ async function retrieveCategories (ids: string[], name: string, skip: number, ta
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -256,7 +246,7 @@ async function retrieveCategories (ids: string[], name: string, skip: number, ta
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product collections based on
To retrieve a list of product collections using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveCollections (ids: string[]) {
To specify relations that should be retrieved within the product collections:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveCollections (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveCollections (ids: string[], skip: number, take: number) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -179,17 +179,7 @@ async function retrieveCollections (ids: string[], title: string, skip: number,
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -211,7 +201,7 @@ async function retrieveCollections (ids: string[], title: string, skip: number,
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -220,7 +210,7 @@ async function retrieveCollections (ids: string[], title: string, skip: number,
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product options based on opt
To retrieve a list of product options using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProductOptions (ids: string[]) {
To specify relations that should be retrieved within the product types:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProductOptions (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveProductOptions (ids: string[], skip: number, take: number
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -179,17 +179,7 @@ async function retrieveProductOptions (ids: string[], title: string, skip: numbe
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -211,7 +201,7 @@ async function retrieveProductOptions (ids: string[], title: string, skip: numbe
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -220,7 +210,7 @@ async function retrieveProductOptions (ids: string[], title: string, skip: numbe
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of tags based on optional filte
To retrieve a list of product tags using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProductTag (tagIds: string[]) {
To specify relations that should be retrieved within the product tags:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProductTag (tagIds: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveProductTag (tagIds: string[], skip: number, take: number)
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -170,17 +170,7 @@ async function retrieveProductTag (tagIds: string[], value: string, skip: number
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -202,7 +192,7 @@ async function retrieveProductTag (tagIds: string[], value: string, skip: number
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -211,7 +201,7 @@ async function retrieveProductTag (tagIds: string[], value: string, skip: number
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product types based on optio
To retrieve a list of product types using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProductTypes (ids: string[]) {
To specify attributes that should be retrieved within the product types:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProductTypes (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveProductTypes (ids: string[], skip: number, take: number)
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -170,17 +170,7 @@ async function retrieveProductTypes (ids: string[], value: string, skip: number,
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -202,7 +192,7 @@ async function retrieveProductTypes (ids: string[], value: string, skip: number,
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -211,7 +201,7 @@ async function retrieveProductTypes (ids: string[], value: string, skip: number,
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a paginated list of product variants based on op
To retrieve a list of product variants using their IDs:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -38,7 +38,7 @@ async function retrieveProductVariants (ids: string[]) {
To specify relations that should be retrieved within the product variants:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -58,7 +58,7 @@ async function retrieveProductVariants (ids: string[]) {
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -80,7 +80,7 @@ async function retrieveProductVariants (ids: string[], skip: number, take: numbe
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 {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -198,17 +198,7 @@ async function retrieveProductVariants (ids: string[], sku: string, skip: number
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -230,7 +220,7 @@ async function retrieveProductVariants (ids: string[], sku: string, skip: number
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -239,7 +229,7 @@ async function retrieveProductVariants (ids: string[], sku: string, skip: number
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -461,7 +451,7 @@ async function retrieveProductVariants (ids: string[], sku: string, skip: number
},
{
"name": "options",
"type": "[ProductOptionValueDTO](../../interfaces/ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](../../interfaces/ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -18,7 +18,7 @@ This method is used to restore products which were deleted using the [softDelete
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -48,7 +48,7 @@ async function restoreProducts (ids: string[]) {
{
"name": "config",
"type": "[RestoreReturn](../../interfaces/RestoreReturn.mdx)&#60;TReturnableLinkableKeys&#62;",
"description": "Configurations determining which relations to restore along with the each of the products. You can pass to its `returnLinkableKeys` property any of the product's relation attribute names, such as `variant_id`.",
"description": "Configurations determining which relations to restore along with each of the products. You can pass to its `returnLinkableKeys` property any of the product's relation attribute names, such as `variant_id`.",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -13,13 +13,30 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
This documentation provides a reference to the restoreVariants method. This belongs to the Product Module.
This method is used to restore product varaints that were soft deleted. Product variants are soft deleted when they're not
provided in a product's details passed to the [update](IProductModuleService.update.mdx) method.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function restoreProductVariants (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.restoreVariants(ids)
}
```
## Parameters
<ParameterTypes parameters={[
{
"name": "variantIds",
"type": "`string`[]",
"description": "",
"description": "The IDs of the variants to restore.",
"optional": false,
"defaultValue": "",
"expandable": false,
@@ -28,7 +45,7 @@ This documentation provides a reference to the restoreVariants method. This belo
{
"name": "config",
"type": "[RestoreReturn](../../interfaces/RestoreReturn.mdx)&#60;TReturnableLinkableKeys&#62;",
"description": "",
"description": "Configurations determining which relations to restore along with each of the product variants. You can pass to its `returnLinkableKeys` property any of the product variant's relation attribute names.",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -47,7 +64,7 @@ This documentation provides a reference to the restoreVariants method. This belo
{
"name": "sharedContext",
"type": "[Context](../../interfaces/Context.mdx)",
"description": "",
"description": "A context used to share resources, such as transaction manager, between the application and the module.",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -109,7 +126,7 @@ This documentation provides a reference to the restoreVariants method. This belo
"type": "Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"description": "An object that includes the IDs of related records that were restored. The object's keys are the ID attribute names of the product variant entity's relations \nand its value is an array of strings, each being the ID of the record associated with the product variant through this relation.\n\nIf there are no related records that were restored, the promise resolved to `void`.",
"expandable": false,
"children": [
{
@@ -20,7 +20,7 @@ This method is used to retrieve a product by its ID
A simple example that retrieves a product by its ID:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -36,7 +36,7 @@ async function retrieveProduct (id: string) {
To specify relations that should be retrieved:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -78,17 +78,7 @@ async function retrieveProduct (id: string) {
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -110,7 +100,7 @@ async function retrieveProduct (id: string) {
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -119,7 +109,7 @@ async function retrieveProduct (id: string) {
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -833,7 +823,7 @@ async function retrieveProduct (id: string) {
},
{
"name": "options",
"type": "[ProductOptionValueDTO](../../interfaces/ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](../../interfaces/ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a product category by its ID.
A simple example that retrieves a product category by its ID:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -36,7 +36,7 @@ async function retrieveCategory (id: string) {
To specify relations that should be retrieved:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -78,17 +78,7 @@ async function retrieveCategory (id: string) {
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -110,7 +100,7 @@ async function retrieveCategory (id: string) {
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -119,7 +109,7 @@ async function retrieveCategory (id: string) {
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a product collection by its ID.
A simple example that retrieves a product collection by its ID:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -36,7 +36,7 @@ async function retrieveCollection (id: string) {
To specify relations that should be retrieved:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -78,17 +78,7 @@ async function retrieveCollection (id: string) {
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -110,7 +100,7 @@ async function retrieveCollection (id: string) {
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -119,7 +109,7 @@ async function retrieveCollection (id: string) {
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a product option by its ID.
A simple example that retrieves a product option by its ID:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -36,7 +36,7 @@ async function retrieveProductOption (id: string) {
To specify relations that should be retrieved:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -78,17 +78,7 @@ async function retrieveProductOption (id: string) {
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -110,7 +100,7 @@ async function retrieveProductOption (id: string) {
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -119,7 +109,7 @@ async function retrieveProductOption (id: string) {
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -550,10 +540,10 @@ async function retrieveProductOption (id: string) {
{
"name": "option",
"type": "[ProductOptionDTO](../../interfaces/ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
},
{
@@ -568,10 +558,10 @@ async function retrieveProductOption (id: string) {
{
"name": "variant",
"type": "[ProductVariantDTO](../../interfaces/ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
}
]
@@ -20,7 +20,7 @@ This method is used to retrieve a tag by its ID.
A simple example that retrieves a product tag by its ID:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -36,7 +36,7 @@ async function retrieveProductTag (tagId: string) {
To specify relations that should be retrieved:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -78,17 +78,7 @@ async function retrieveProductTag (tagId: string) {
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -110,7 +100,7 @@ async function retrieveProductTag (tagId: string) {
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -119,7 +109,7 @@ async function retrieveProductTag (tagId: string) {
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a product type by its ID.
A simple example that retrieves a product type by its ID:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -36,7 +36,7 @@ async function retrieveProductType (id: string) {
To specify attributes that should be retrieved:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -78,17 +78,7 @@ async function retrieveProductType (id: string) {
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -110,7 +100,7 @@ async function retrieveProductType (id: string) {
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -119,7 +109,7 @@ async function retrieveProductType (id: string) {
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,7 +20,7 @@ This method is used to retrieve a product variant by its ID.
A simple example that retrieves a product variant by its ID:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -36,7 +36,7 @@ async function retrieveProductVariant (id: string) {
To specify relations that should be retrieved:
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -78,17 +78,7 @@ async function retrieveProductVariant (id: string) {
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -110,7 +100,7 @@ async function retrieveProductVariant (id: string) {
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -119,7 +109,7 @@ async function retrieveProductVariant (id: string) {
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -333,7 +323,7 @@ async function retrieveProductVariant (id: string) {
},
{
"name": "options",
"type": "[ProductOptionValueDTO](../../interfaces/ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](../../interfaces/ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -369,10 +359,10 @@ async function retrieveProductVariant (id: string) {
{
"name": "option",
"type": "[ProductOptionDTO](../../interfaces/ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
},
{
@@ -387,10 +377,10 @@ async function retrieveProductVariant (id: string) {
{
"name": "variant",
"type": "[ProductVariantDTO](../../interfaces/ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
}
]
@@ -20,7 +20,7 @@ The soft-deleted products can be restored using the [restore](IProductModuleServ
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to update a product.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to update a product category by its ID.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to update existing product collections.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to update existing product options.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to update existing product tags.
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -18,7 +18,7 @@ This method is used to update a product type
## Example
```ts
import {
import {
initialize as initializeProductModule,
} from "@medusajs/product"
@@ -0,0 +1,545 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/updateVariants
sidebar_label: updateVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# updateVariants - Product Module Reference
This documentation provides a reference to the updateVariants method. This belongs to the Product Module.
This method is used to update a product's variants.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
import {
UpdateProductVariantDTO
} from "@medusajs/product/dist/types/services/product-variant"
async function updateProductVariants (items: UpdateProductVariantDTO[]) {
const productModule = await initializeProductModule()
const productVariants = await productModule.updateVariants(items)
// do something with the product variants or return them
}
```
## Parameters
<ParameterTypes parameters={[
{
"name": "data",
"type": "[UpdateProductVariantDTO](../../interfaces/UpdateProductVariantDTO.mdx)[]",
"description": "The product variants to update.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "barcode",
"type": "`string`",
"description": "The barcode of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`string`",
"description": "The EAN of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product variant to update.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[CreateProductVariantOptionDTO](../../interfaces/CreateProductVariantOptionDTO.mdx)[]",
"description": "The product variant options to create and associate with the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of a product variant option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`string`",
"description": "The origin country of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`string`",
"description": "The SKU of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "sharedContext",
"type": "[Context](../../interfaces/Context.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": "enableNestedTransactions",
"type": "`boolean`",
"description": "A boolean value indicating whether nested transactions are enabled.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationLevel",
"type": "`string`",
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager",
"type": "`TManager`",
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionId",
"type": "`string`",
"description": "A string indicating the ID of the current transaction.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager",
"type": "`TManager`",
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
## Returns
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "Promise&#60;[ProductVariantDTO](../../interfaces/ProductVariantDTO.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "The updated product variants's details.",
"expandable": false,
"children": [
{
"name": "ProductVariantDTO[]",
"type": "[ProductVariantDTO](../../interfaces/ProductVariantDTO.mdx)[]",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": [
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "barcode",
"type": "`null` \\| `string`",
"description": "The barcode of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`null` \\| `string`",
"description": "The EAN of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionValueDTO](../../interfaces/ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[ProductDTO](../../interfaces/ProductDTO.mdx)",
"description": "The associated product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the associated product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`null` \\| `string`",
"description": "The SKU of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`null` \\| `string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant_rank",
"type": "`null` \\| `number`",
"description": "he ranking of the variant among other variants associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]
}
]} />
@@ -22,6 +22,16 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
"children": [
{
"name": "T",
"type": "`T`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]
}
]} />
@@ -37,6 +37,15 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
"description": "",
"expandable": false,
"children": [
{
"name": "T",
"type": "`T`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
},
{
"name": "any",
"type": "`any`",
@@ -37,6 +37,15 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
"description": "",
"expandable": false,
"children": [
{
"name": "T",
"type": "`T`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
},
{
"name": "any",
"type": "`any`",
@@ -37,6 +37,15 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
"description": "",
"expandable": false,
"children": [
{
"name": "T",
"type": "`T`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
},
{
"name": "any",
"type": "`any`",
@@ -36,6 +36,25 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
"children": [
{
"name": "T",
"type": "`T`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
},
{
"name": "TReturn",
"type": "`TReturn`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]
}
]} />
@@ -36,6 +36,25 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
"children": [
{
"name": "T",
"type": "`T`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
},
{
"name": "TReturn",
"type": "`TReturn`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]
}
]} />
@@ -36,6 +36,25 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
"children": [
{
"name": "T",
"type": "`T`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
},
{
"name": "TReturn",
"type": "`TReturn`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]
}
]} />
@@ -8,24 +8,24 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Enumeration Members
### DRAFT
#### DRAFT
**DRAFT** = `"draft"`
___
### PROPOSED
#### PROPOSED
**PROPOSED** = `"proposed"`
___
### PUBLISHED
#### PUBLISHED
**PUBLISHED** = `"published"`
___
### REJECTED
#### REJECTED
**REJECTED** = `"rejected"`
@@ -26,13 +26,13 @@ Valid string encodings: 'ascii'\|'utf8'\|'utf16le'\|'ucs2'(alias of 'utf16le')\|
## Constructors
### constructor
#### constructor
`**new BufferConstructor**(str, encoding?)`
Allocates a new buffer containing the given &#123;str&#125;.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -63,7 +63,7 @@ since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
Allocates a new buffer of &#123;size&#125; octets.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -85,7 +85,7 @@ since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
Allocates a new buffer containing the given &#123;array&#125; of octets.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -108,7 +108,7 @@ since v10.0.0 - Use `Buffer.from(array)` instead.
Produces a Buffer backed by the same allocated memory as
the given &#123;ArrayBuffer&#125;/&#123;SharedArrayBuffer&#125;.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -130,7 +130,7 @@ since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
Allocates a new buffer containing the given &#123;array&#125; of octets.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -152,7 +152,7 @@ since v10.0.0 - Use `Buffer.from(array)` instead.
Copies the passed &#123;buffer&#125; data onto a new &#123;Buffer&#125; instance.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -428,6 +428,15 @@ A product to create.
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
@@ -448,6 +457,15 @@ A product to create.
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The id of the product",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`string`",
@@ -118,6 +118,15 @@ A product variant to create.
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
@@ -138,6 +147,15 @@ A product variant to create.
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The id of the product",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`string`",
@@ -11,6 +11,15 @@ A product variant option to create.
## Properties
<ParameterTypes parameters={[
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
@@ -105,7 +105,7 @@ The filters to apply on retrieved products.
{
"name": "collection_id",
"type": "`string` \\| `string`[] \\| [OperatorMap](../types/OperatorMap.mdx)&#60;string&#62;",
"description": "Filters a product by the IDs of their associated collections.",
"description": "Filters a product by its associated collections.",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -6,7 +6,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FindConfig
An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
which provides correct typing of field names in its properties.
## Type parameters
@@ -33,17 +33,7 @@ which provides correct typing of field names in its properties.
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "__type",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
"children": []
},
{
"name": "relations",
@@ -65,7 +55,7 @@ which provides correct typing of field names in its properties.
},
{
"name": "skip",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
@@ -74,7 +64,7 @@ which provides correct typing of field names in its properties.
},
{
"name": "take",
"type": "`number`",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
@@ -20,12 +20,14 @@ This section of the documentation provides a reference to the `IProductModuleSer
- [createOptions](../IProductModuleService/methods/IProductModuleService.createOptions.mdx)
- [createTags](../IProductModuleService/methods/IProductModuleService.createTags.mdx)
- [createTypes](../IProductModuleService/methods/IProductModuleService.createTypes.mdx)
- [createVariants](../IProductModuleService/methods/IProductModuleService.createVariants.mdx)
- [delete](../IProductModuleService/methods/IProductModuleService.delete.mdx)
- [deleteCategory](../IProductModuleService/methods/IProductModuleService.deleteCategory.mdx)
- [deleteCollections](../IProductModuleService/methods/IProductModuleService.deleteCollections.mdx)
- [deleteOptions](../IProductModuleService/methods/IProductModuleService.deleteOptions.mdx)
- [deleteTags](../IProductModuleService/methods/IProductModuleService.deleteTags.mdx)
- [deleteTypes](../IProductModuleService/methods/IProductModuleService.deleteTypes.mdx)
- [deleteVariants](../IProductModuleService/methods/IProductModuleService.deleteVariants.mdx)
- [list](../IProductModuleService/methods/IProductModuleService.list.mdx)
- [listAndCount](../IProductModuleService/methods/IProductModuleService.listAndCount.mdx)
- [listAndCountCategories](../IProductModuleService/methods/IProductModuleService.listAndCountCategories.mdx)
@@ -56,3 +58,4 @@ This section of the documentation provides a reference to the `IProductModuleSer
- [updateOptions](../IProductModuleService/methods/IProductModuleService.updateOptions.mdx)
- [updateTags](../IProductModuleService/methods/IProductModuleService.updateTags.mdx)
- [updateTypes](../IProductModuleService/methods/IProductModuleService.updateTypes.mdx)
- [updateVariants](../IProductModuleService/methods/IProductModuleService.updateVariants.mdx)
@@ -683,7 +683,7 @@ A product collection's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -871,10 +871,10 @@ A product's data.
{
"name": "option",
"type": "[ProductOptionDTO](ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
},
{
@@ -889,10 +889,10 @@ A product's data.
{
"name": "variant",
"type": "[ProductVariantDTO](ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
}
]
@@ -1480,7 +1480,7 @@ A product's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -1516,10 +1516,10 @@ A product's data.
{
"name": "option",
"type": "[ProductOptionDTO](ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
},
{
@@ -1534,10 +1534,10 @@ A product's data.
{
"name": "variant",
"type": "[ProductVariantDTO](ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
}
]
@@ -674,7 +674,7 @@ A product option's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -840,10 +840,10 @@ A product option's data.
{
"name": "option",
"type": "[ProductOptionDTO](ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": [
{
"name": "deleted_at",
@@ -913,10 +913,10 @@ A product option's data.
{
"name": "variant",
"type": "[ProductVariantDTO](ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": [
{
"name": "allow_backorder",
@@ -1046,7 +1046,7 @@ A product option's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -41,10 +41,10 @@ The product option value's data.
{
"name": "option",
"type": "[ProductOptionDTO](ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": [
{
"name": "deleted_at",
@@ -391,10 +391,10 @@ The product option value's data.
{
"name": "option",
"type": "[ProductOptionDTO](ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
},
{
@@ -409,10 +409,10 @@ The product option value's data.
{
"name": "variant",
"type": "[ProductVariantDTO](ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
}
]
@@ -431,10 +431,10 @@ The product option value's data.
{
"name": "variant",
"type": "[ProductVariantDTO](ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": [
{
"name": "allow_backorder",
@@ -564,7 +564,7 @@ The product option value's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -600,10 +600,10 @@ The product option value's data.
{
"name": "option",
"type": "[ProductOptionDTO](ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
},
{
@@ -618,10 +618,10 @@ The product option value's data.
{
"name": "variant",
"type": "[ProductVariantDTO](ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": []
}
]
@@ -665,7 +665,7 @@ A product tag's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -139,7 +139,7 @@ A product variant's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -175,10 +175,10 @@ A product variant's data.
{
"name": "option",
"type": "[ProductOptionDTO](ProductOptionDTO.mdx)",
"description": "The associated product option.",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": [
{
"name": "deleted_at",
@@ -248,10 +248,10 @@ A product variant's data.
{
"name": "variant",
"type": "[ProductVariantDTO](ProductVariantDTO.mdx)",
"description": "The associated product variant.",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": true,
"expandable": false,
"children": [
{
"name": "allow_backorder",
@@ -381,7 +381,7 @@ A product variant's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -1127,7 +1127,7 @@ A product variant's data.
},
{
"name": "options",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)",
"type": "[ProductOptionValueDTO](ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new SharedArrayBufferConstructor**(byteLength)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -127,6 +127,15 @@ The data to update in a product variant. The `id` is used to identify which prod
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
@@ -6,11 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Exclude
**Exclude**`<TypeParameter T, TypeParameter U>`: `T` extends `U` ? `never` : `T`
**Exclude**: `T` extends `U` ? `never` : `T`
Exclude from T those types that are assignable to U
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# ExpandScalar
**ExpandScalar**`<TypeParameter T>`: `null` \| `T` extends `string` ? `string` \| `RegExp` : `T` extends `Date` ? `Date` \| `string` : `T`
**ExpandScalar**: `null` \| `T` extends `string` ? `string` \| `RegExp` : `T` extends `Date` ? `Date` \| `string` : `T`
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterQuery
**FilterQuery**`<TypeParameter T, TypeParameter Prev>`: `Prev` extends `never` ? `never` : &#123; [Key in keyof T]?: T[Key] extends boolean \| number \| string \| bigint \| symbol \| Date ? T[Key] \| OperatorMap&#60;T[Key]&#62; : T[Key] extends infer U ? U extends Object ? V extends object ? FilterQuery&#60;Partial&#60;V&#62;, PrevLimit[Prev]&#62; : never : never : never &#125;
**FilterQuery**: `Prev` extends `never` ? `never` : &#123; [Key in keyof T]?: T[Key] extends boolean \| number \| string \| bigint \| symbol \| Date ? T[Key] \| OperatorMap&#60;T[Key]&#62; : T[Key] extends infer U ? U extends Object ? V extends object ? FilterQuery&#60;Partial&#60;V&#62;, PrevLimit[Prev]&#62; : never : never : never &#125;
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterValue
**FilterValue**`<TypeParameter T>`: [OperatorMap](OperatorMap.mdx)&#60;[FilterValue2](FilterValue2.mdx)&#60;T&#62;&#62; \| [FilterValue2](FilterValue2.mdx)&#60;T&#62; \| [FilterValue2](FilterValue2.mdx)&#60;T&#62;[] \| `null`
**FilterValue**: [OperatorMap](OperatorMap.mdx)&#60;[FilterValue2](FilterValue2.mdx)&#60;T&#62;&#62; \| [FilterValue2](FilterValue2.mdx)&#60;T&#62; \| [FilterValue2](FilterValue2.mdx)&#60;T&#62;[] \| `null`
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterValue2
**FilterValue2**`<TypeParameter T>`: `T` \| [ExpandScalar](ExpandScalar.mdx)&#60;T&#62; \| [Primary](Primary.mdx)&#60;T&#62;
**FilterValue2**: `T` \| [ExpandScalar](ExpandScalar.mdx)&#60;T&#62; \| [Primary](Primary.mdx)&#60;T&#62;
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# IteratorResult
**IteratorResult**`<TypeParameter T, TypeParameter TReturn>`: [IteratorYieldResult](../interfaces/IteratorYieldResult.mdx)&#60;T&#62; \| [IteratorReturnResult](../interfaces/IteratorReturnResult.mdx)&#60;TReturn&#62;
**IteratorResult**: [IteratorYieldResult](../interfaces/IteratorYieldResult.mdx)&#60;T&#62; \| [IteratorReturnResult](../interfaces/IteratorReturnResult.mdx)&#60;TReturn&#62;
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
**JoinerRelationship**: `Object`
### Type declaration
#### Type declaration
<ParameterTypes parameters={[
{
@@ -6,11 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Omit
**Omit**`<TypeParameter T, TypeParameter K>`: [Pick](Pick.mdx)&#60;T, [Exclude](Exclude.mdx)&#60;keyof T, K&#62;&#62;
**Omit**: [Pick](Pick.mdx)&#60;T, [Exclude](Exclude.mdx)&#60;keyof T, K&#62;&#62;
Construct a type with the properties of T except for those in type K.
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# OperatorMap
**OperatorMap**`<TypeParameter T>`: `Object`
**OperatorMap**: `Object`
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -22,7 +22,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
### Type declaration
#### Type declaration
<ParameterTypes parameters={[
{
@@ -6,11 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Partial
**Partial**`<TypeParameter T>`: &#123; [P in keyof T]?: T[P] &#125;
**Partial**: &#123; [P in keyof T]?: T[P] &#125;
Make all properties in T optional
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,11 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Pick
**Pick**`<TypeParameter T, TypeParameter K>`: &#123; [P in K]: T[P] &#125;
**Pick**: &#123; [P in K]: T[P] &#125;
From T, pick a set of properties whose keys are in the union K
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Primary
**Primary**`<TypeParameter T>`: `T` extends ``{ [PrimaryKeyType]?: infer PK }`` ? [ReadonlyPrimary](ReadonlyPrimary.mdx)&#60;PK&#62; : `T` extends ``{ _id?: infer PK }`` ? [ReadonlyPrimary](ReadonlyPrimary.mdx)&#60;PK&#62; \| `string` : `T` extends ``{ uuid?: infer PK }`` ? [ReadonlyPrimary](ReadonlyPrimary.mdx)&#60;PK&#62; : `T` extends ``{ id?: infer PK }`` ? [ReadonlyPrimary](ReadonlyPrimary.mdx)&#60;PK&#62; : `never`
**Primary**: `T` extends ``{ [PrimaryKeyType]?: infer PK }`` ? [ReadonlyPrimary](ReadonlyPrimary.mdx)&#60;PK&#62; : `T` extends ``{ _id?: infer PK }`` ? [ReadonlyPrimary](ReadonlyPrimary.mdx)&#60;PK&#62; \| `string` : `T` extends ``{ uuid?: infer PK }`` ? [ReadonlyPrimary](ReadonlyPrimary.mdx)&#60;PK&#62; : `T` extends ``{ id?: infer PK }`` ? [ReadonlyPrimary](ReadonlyPrimary.mdx)&#60;PK&#62; : `never`
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Query
**Query**`<TypeParameter T>`: `T` extends `object` ? `T` extends [Scalar](Scalar.mdx) ? `never` : [FilterQuery](FilterQuery.mdx)&#60;T&#62; : [FilterValue](FilterValue.mdx)&#60;T&#62;
**Query**: `T` extends `object` ? `T` extends [Scalar](Scalar.mdx) ? `never` : [FilterQuery](FilterQuery.mdx)&#60;T&#62; : [FilterValue](FilterValue.mdx)&#60;T&#62;
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,11 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Readonly
**Readonly**`<TypeParameter T>`: &#123; readonly [P in keyof T]: T[P] &#125;
**Readonly**: &#123; readonly [P in keyof T]: T[P] &#125;
Make all properties in T readonly
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# ReadonlyPrimary
**ReadonlyPrimary**`<TypeParameter T>`: `T` extends `any`[] ? [Readonly](Readonly.mdx)&#60;T&#62; : `T`
**ReadonlyPrimary**: `T` extends `any`[] ? [Readonly](Readonly.mdx)&#60;T&#62; : `T`
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,11 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Record
**Record**`<TypeParameter K, TypeParameter T>`: &#123; [P in K]: T &#125;
**Record**: &#123; [P in K]: T &#125;
Construct a type with a set of properties K of type T
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -6,9 +6,9 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# WithImplicitCoercion
**WithImplicitCoercion**`<TypeParameter T>`: `T` \| ``{ valueOf: Method valueOf }``
**WithImplicitCoercion**: `T` \| ``{ valueOf: Method valueOf }``
### Type parameters
#### Type Parameters
<ParameterTypes parameters={[
{