chore(docs): Generated References (#9153)

Generated the following references:
- `api_key`
- `auth`
- `auth_provider`
- `cart`
- `core_flows`
- `currency`
- `customer`
- `customer_models`
- `dml`
- `file`
- `fulfillment`
- `fulfillment_provider`
- `inventory_next`
- `modules`
- `modules_sdk`
- `notification`
- `order`
- `order_models`
- `payment`
- `payment_provider`
- `pricing`
- `product`
- `product_models`
- `promotion`
- `region`
- `sales_channel`
- `stock_location_next`
- `store`
- `tax`
- `tax_provider`
- `types`
- `user`
- `utils`
- `workflows`
This commit is contained in:
github-actions[bot] authored and GitHub committed 2024-09-17 07:17:55 +00:00
1 parent 653a4bff71
commit 175ca30f4f
1147 files changed
+520826 -473805

No files matched your search

@@ -28,4 +28,4 @@ const Store = model.define("store", {
## Parameters
<TypeList types={[{"name":"options","type":"[EntityCascades](../../../../types/DmlTypes/types/types.DmlTypes.EntityCascades/page.mdx)&#60;[ExtractEntityRelations](../../../../types/DmlTypes/types/types.DmlTypes.ExtractEntityRelations/page.mdx)&#60;Schema, \"hasOne\" \\| \"hasMany\"&#62;&#62;","description":"The cascades configurations. They object's keys are the names of\nthe actions, such as `deleted`, and the value is an array of relations that the \naction should be cascaded to.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"delete","type":"Relationships","description":"The related models to delete when a record of this data model\nis deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cascades"/>
<TypeList types={[{"name":"options","type":"[EntityCascades](../../../../types/DmlTypes/types/types.DmlTypes.EntityCascades/page.mdx)&#60;[ExtractEntityRelations](../../../../types/DmlTypes/types/types.DmlTypes.ExtractEntityRelations/page.mdx)&#60;Schema, \"hasOne\" \\| \"hasMany\"&#62;&#62;","description":"The cascades configurations. They object's keys are the names of\nthe actions, such as `deleted`, and the value is an array of relations that the\naction should be cascaded to.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"delete","type":"Relationships","description":"The related models to delete when a record of this data model\nis deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cascades"/>
@@ -24,8 +24,8 @@ export default MyCustom
## Type Parameters
<TypeList types={[{"name":"Values","type":"`unknown`","description":"The type of possible values. By default, it's `string`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="enum"/>
<TypeList types={[{"name":"Values","type":"`unknown`[] \\| `EnumLike`","description":"The type of possible values. By default, it's `string`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="enum"/>
## Parameters
<TypeList types={[{"name":"values","type":"Values[]","description":"An array of possible values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="enum"/>
<TypeList types={[{"name":"values","type":"Values","description":"An array of possible values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="enum"/>
@@ -9,21 +9,22 @@ import { TypeList } from "docs-ui"
This method defines an automatically generated string ID property.
By default, this property is considered to be the data model’s primary key.
You must use the "primaryKey" modifier to mark the property as the
primary key.
## Example
```ts
import { model } from "@medusajs/utils"
const MyCustom = model.define("my_custom", {
id: model.id(),
const User = model.define("User", {
id: model.id().primaryKey(),
// ...
})
export default MyCustom
export default User
```
## Parameters
<TypeList types={[{"name":"options","type":"`object`","description":"The ID's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"primaryKey","type":"`boolean`","description":"Whether the ID is the data model's primary key.","optional":true,"defaultValue":"true","expandable":false,"children":[]},{"name":"prefix","type":"`string`","description":"By default, Medusa shortens the data model's name and uses it as the \nprefix of all IDs. For example, `cm_123`.\n\nUse this option to specify the prefix to use instead.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="id"/>
<TypeList types={[{"name":"options","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"prefix","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="id"/>
@@ -28,4 +28,4 @@ const Product = model.define("product", {
## Parameters
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[RelationshipOptions](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="belongsTo"/>
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[RelationshipOptions](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="belongsTo"/>
@@ -30,4 +30,4 @@ const Store = model.define("store", {
## Parameters
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[RelationshipOptions](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasMany"/>
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[RelationshipOptions](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasMany"/>
@@ -13,7 +13,7 @@ data model.
For example: A user "hasOne" email.
Use the [belongsTo](../dml.Relationship_Methods.belongsTo/page.mdx) method to define the inverse of this relationship in
Use the [belongsTo](../dml.Relationship_Methods.belongsTo/page.mdx) method to define the inverse of this relationship in
the other data model.
## Example
@@ -33,4 +33,4 @@ const User = model.define("user", {
## Parameters
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[RelationshipOptions](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasOne"/>
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[RelationshipOptions](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasOne"/>
@@ -35,4 +35,4 @@ const Product = model.define("product", {
## Parameters
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ManyToManyOptions](../../../entity_builder/types/dml.entity_builder.ManyToManyOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"pivotTable","type":"`string`","description":"The name of the pivot table\ncreated in the database for this relationship.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"pivotEntity","type":"() => [DmlEntity](../../../entity/classes/dml.entity.DmlEntity/page.mdx)&#60;any&#62;","description":"A function that returns the data model \nrepresenting the pivot table created in the\ndatabase for this relationship.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="manyToMany"/>
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ManyToManyOptions](../../../entity_builder/types/dml.entity_builder.ManyToManyOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"pivotTable","type":"`string`","description":"The name of the pivot table\ncreated in the database for this relationship.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"pivotEntity","type":"() => [DmlEntity](../../../entity/classes/dml.entity.DmlEntity/page.mdx)&#60;any, any&#62;","description":"A function that returns the data model\nrepresenting the pivot table created in the\ndatabase for this relationship.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="manyToMany"/>
@@ -7,7 +7,7 @@ name, its schema and relationships.
## Type parameters
<TypeList types={[{"name":"Schema","type":"[DMLSchema](../../../../types/DmlTypes/types/types.DmlTypes.DMLSchema/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[RelationshipTypes](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipTypes/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DmlEntity"/>
<TypeList types={[{"name":"Schema","type":"[DMLSchema](../../../../types/DmlTypes/types/types.DmlTypes.DMLSchema/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[RelationshipTypes](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipTypes/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"TConfig","type":"[IDmlEntityConfig](../../../../types/DmlTypes/types/types.DmlTypes.IDmlEntityConfig/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DmlEntity"/>
## Constructors
@@ -30,12 +30,12 @@ name, its schema and relationships.
### Type Parameters
<TypeList types={[{"name":"Schema","type":"[DMLSchema](../../../../types/DmlTypes/types/types.DmlTypes.DMLSchema/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[RelationshipTypes](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipTypes/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="new DmlEntity"/>
<TypeList types={[{"name":"Schema","type":"[DMLSchema](../../../../types/DmlTypes/types/types.DmlTypes.DMLSchema/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[RelationshipTypes](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipTypes/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"TConfig","type":"[IDmlEntityConfig](../../../../types/DmlTypes/types/types.DmlTypes.IDmlEntityConfig/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="new DmlEntity"/>
### Parameters
<TypeList types={[{"name":"nameOrConfig","type":"`Config`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"Schema","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="new DmlEntity"/>
<TypeList types={[{"name":"nameOrConfig","type":"TConfig","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"Schema","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="new DmlEntity"/>
___
<TypeList types={[{"name":"[IsDmlEntity]","type":"`true`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"Schema","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DmlEntity"/>
<TypeList types={[{"name":"[IsDmlEntity]","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"name","type":"[InferDmlEntityNameFromConfig](../../../../types/DmlTypes/types/types.DmlTypes.InferDmlEntityNameFromConfig/page.mdx)&#60;TConfig&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"Schema","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DmlEntity"/>
@@ -23,8 +23,8 @@ export default MyCustom
## Type Parameters
<TypeList types={[{"name":"Schema","type":"[DMLSchema](../../../../../types/DmlTypes/types/types.DmlTypes.DMLSchema/page.mdx)","description":"The type of the accepted schema in the second parameter of the method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[RelationshipTypes](../../../../../types/DmlTypes/types/types.DmlTypes.RelationshipTypes/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="define"/>
<TypeList types={[{"name":"Schema","type":"[DMLSchema](../../../../../types/DmlTypes/types/types.DmlTypes.DMLSchema/page.mdx)","description":"The type of the accepted schema in the second parameter of the method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$dataType","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[RelationshipTypes](../../../../../types/DmlTypes/types/types.DmlTypes.RelationshipTypes/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"TConfig","type":"[IDmlEntityConfig](../../../../../types/DmlTypes/types/types.DmlTypes.IDmlEntityConfig/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="define"/>
## Parameters
<TypeList types={[{"name":"nameOrConfig","type":"[DefineOptions](../../../types/dml.entity_builder.DefineOptions/page.mdx)","description":"Either the data model's name, or configurations to name the data model.\nThe data model's name must be unique.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tableName","type":"`string`","description":"The name of the data model's table in the database.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The data model's name.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"schema","type":"Schema","description":"The schema of the data model's properties.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="define"/>
<TypeList types={[{"name":"nameOrConfig","type":"TConfig","description":"Either the data model's name, or configurations to name the data model.\nThe data model's name must be unique.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"Schema","description":"The schema of the data model's properties.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="define"/>
@@ -9,7 +9,7 @@ import { TypeList } from "docs-ui"
`Optional` **mappedBy**: `string`
The name of the relationship as defined in the other
data model. This is only required by the `belongsTo`
data model. This is only required by the `belongsTo` and `manyToMany`
relationship method.
___
@@ -25,9 +25,9 @@ ___
## pivotEntity
`Optional` **pivotEntity**: () => [DmlEntity](../../../entity/classes/dml.entity.DmlEntity/page.mdx)&#60;any&#62;
`Optional` **pivotEntity**: () => [DmlEntity](../../../entity/classes/dml.entity.DmlEntity/page.mdx)&#60;any, any&#62;
A function that returns the data model
A function that returns the data model
representing the pivot table created in the
database for this relationship.