docs: enhance how references are generated (#5805)

* adjusted configurations

* enhancements to tool and configurations

* change reference in docs

* fixed issue in workflows reference

* added project name

* more optimizations

* fix context error

* added a types reference

* resolved missing types

* fix reference reflection types not having children

* add an expand url parameter

* added new option to the README

* added details about new option
This commit is contained in:
Shahed Nasser
2023-12-05 15:29:41 +02:00
committed by GitHub
parent a418e6cebc
commit 892d737c1f
4358 changed files with 947876 additions and 534760 deletions
@@ -1,41 +0,0 @@
---
displayed_sidebar: inventoryReference
slug: /references/inventory
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# IInventoryService Reference
This section of the documentation provides a reference to the `IInventoryService` interfaces methods. This is the interface developers use to use the functionalities provided by the Inventory Module.
## Methods
- [adjustInventory](../IInventoryService/methods/IInventoryService.adjustInventory.mdx)
- [confirmInventory](../IInventoryService/methods/IInventoryService.confirmInventory.mdx)
- [createInventoryItem](../IInventoryService/methods/IInventoryService.createInventoryItem.mdx)
- [createInventoryItems](../IInventoryService/methods/IInventoryService.createInventoryItems.mdx)
- [createInventoryLevel](../IInventoryService/methods/IInventoryService.createInventoryLevel.mdx)
- [createInventoryLevels](../IInventoryService/methods/IInventoryService.createInventoryLevels.mdx)
- [createReservationItem](../IInventoryService/methods/IInventoryService.createReservationItem.mdx)
- [createReservationItems](../IInventoryService/methods/IInventoryService.createReservationItems.mdx)
- [deleteInventoryItem](../IInventoryService/methods/IInventoryService.deleteInventoryItem.mdx)
- [deleteInventoryItemLevelByLocationId](../IInventoryService/methods/IInventoryService.deleteInventoryItemLevelByLocationId.mdx)
- [deleteInventoryLevel](../IInventoryService/methods/IInventoryService.deleteInventoryLevel.mdx)
- [deleteReservationItem](../IInventoryService/methods/IInventoryService.deleteReservationItem.mdx)
- [deleteReservationItemByLocationId](../IInventoryService/methods/IInventoryService.deleteReservationItemByLocationId.mdx)
- [deleteReservationItemsByLineItem](../IInventoryService/methods/IInventoryService.deleteReservationItemsByLineItem.mdx)
- [listInventoryItems](../IInventoryService/methods/IInventoryService.listInventoryItems.mdx)
- [listInventoryLevels](../IInventoryService/methods/IInventoryService.listInventoryLevels.mdx)
- [listReservationItems](../IInventoryService/methods/IInventoryService.listReservationItems.mdx)
- [restoreInventoryItem](../IInventoryService/methods/IInventoryService.restoreInventoryItem.mdx)
- [retrieveAvailableQuantity](../IInventoryService/methods/IInventoryService.retrieveAvailableQuantity.mdx)
- [retrieveInventoryItem](../IInventoryService/methods/IInventoryService.retrieveInventoryItem.mdx)
- [retrieveInventoryLevel](../IInventoryService/methods/IInventoryService.retrieveInventoryLevel.mdx)
- [retrieveReservationItem](../IInventoryService/methods/IInventoryService.retrieveReservationItem.mdx)
- [retrieveReservedQuantity](../IInventoryService/methods/IInventoryService.retrieveReservedQuantity.mdx)
- [retrieveStockedQuantity](../IInventoryService/methods/IInventoryService.retrieveStockedQuantity.mdx)
- [updateInventoryItem](../IInventoryService/methods/IInventoryService.updateInventoryItem.mdx)
- [updateInventoryLevel](../IInventoryService/methods/IInventoryService.updateInventoryLevel.mdx)
- [updateInventoryLevels](../IInventoryService/methods/IInventoryService.updateInventoryLevels.mdx)
- [updateReservationItem](../IInventoryService/methods/IInventoryService.updateReservationItem.mdx)
@@ -8,8 +8,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The attributes to update in an inventory level. The inventory level is identified by the IDs of its associated inventory item and location.
## Properties
<ParameterTypes parameters={[
{
"name": "incoming_quantity",
@@ -8,8 +8,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The details of the inventory item to be created.
## Properties
<ParameterTypes parameters={[
{
"name": "description",
@@ -8,8 +8,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The details of the inventory level to be created.
## Properties
<ParameterTypes parameters={[
{
"name": "incoming_quantity",
@@ -8,8 +8,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The details of the reservation item to be created.
## Properties
<ParameterTypes parameters={[
{
"name": "created_by",
@@ -8,12 +8,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved inventory items.
## Properties
<ParameterTypes parameters={[
{
"name": "hs_code",
"type": "`string` \\| `string`[] \\| [StringComparisonOperator](StringComparisonOperator.mdx)",
"type": "`string` \\| `string`[] \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)",
"description": "The HS Codes to filter inventory items by.",
"optional": true,
"defaultValue": "",
@@ -67,7 +65,7 @@ The filters to apply on retrieved inventory items.
},
{
"name": "sku",
"type": "`string` \\| `string`[] \\| [StringComparisonOperator](StringComparisonOperator.mdx)",
"type": "`string` \\| `string`[] \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)",
"description": "The SKUs to filter inventory items by.",
"optional": true,
"defaultValue": "",
@@ -8,12 +8,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved inventory levels.
## Properties
<ParameterTypes parameters={[
{
"name": "incoming_quantity",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"type": "`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)",
"description": "Filters to apply on inventory levels' `incoming_quantity` attribute.",
"optional": true,
"defaultValue": "",
@@ -40,7 +38,7 @@ The filters to apply on retrieved inventory levels.
},
{
"name": "reserved_quantity",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"type": "`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)",
"description": "Filters to apply on inventory levels' `reserved_quantity` attribute.",
"optional": true,
"defaultValue": "",
@@ -49,7 +47,7 @@ The filters to apply on retrieved inventory levels.
},
{
"name": "stocked_quantity",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"type": "`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)",
"description": "Filters to apply on inventory levels' `stocked_quantity` attribute.",
"optional": true,
"defaultValue": "",
@@ -8,8 +8,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved reservation items.
## Properties
<ParameterTypes parameters={[
{
"name": "created_by",
@@ -22,7 +20,7 @@ The filters to apply on retrieved reservation items.
},
{
"name": "description",
"type": "`string` \\| [StringComparisonOperator](StringComparisonOperator.mdx)",
"type": "`string` \\| [StringComparisonOperator](inventory.StringComparisonOperator.mdx)",
"description": "Description filters to apply on the reservation items' `description` attribute.",
"optional": true,
"defaultValue": "",
@@ -67,7 +65,7 @@ The filters to apply on retrieved reservation items.
},
{
"name": "quantity",
"type": "`number` \\| [NumericalComparisonOperator](NumericalComparisonOperator.mdx)",
"type": "`number` \\| [NumericalComparisonOperator](inventory.NumericalComparisonOperator.mdx)",
"description": "Filters to apply on the reservation items' `quantity` attribute.",
"optional": true,
"defaultValue": "",
@@ -23,13 +23,11 @@ which provides correct typing of field names in its properties.
}
]} />
## Properties
<ParameterTypes parameters={[
{
"name": "order",
"type": "`object`",
"description": "An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC` to sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.",
"description": "An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -74,7 +72,7 @@ which provides correct typing of field names in its properties.
{
"name": "withDeleted",
"type": "`boolean`",
"description": "A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the `SoftDeletableEntity` class.",
"description": "A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -0,0 +1,41 @@
---
displayed_sidebar: inventoryReference
slug: /references/inventory
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# IInventoryService Reference
This section of the documentation provides a reference to the `IInventoryService` interfaces methods. This is the interface developers use to use the functionalities provided by the Inventory Module.
## Methods
- [adjustInventory](../../IInventoryService/methods/inventory.IInventoryService.adjustInventory.mdx)
- [confirmInventory](../../IInventoryService/methods/inventory.IInventoryService.confirmInventory.mdx)
- [createInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.createInventoryItem.mdx)
- [createInventoryItems](../../IInventoryService/methods/inventory.IInventoryService.createInventoryItems.mdx)
- [createInventoryLevel](../../IInventoryService/methods/inventory.IInventoryService.createInventoryLevel.mdx)
- [createInventoryLevels](../../IInventoryService/methods/inventory.IInventoryService.createInventoryLevels.mdx)
- [createReservationItem](../../IInventoryService/methods/inventory.IInventoryService.createReservationItem.mdx)
- [createReservationItems](../../IInventoryService/methods/inventory.IInventoryService.createReservationItems.mdx)
- [deleteInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.deleteInventoryItem.mdx)
- [deleteInventoryItemLevelByLocationId](../../IInventoryService/methods/inventory.IInventoryService.deleteInventoryItemLevelByLocationId.mdx)
- [deleteInventoryLevel](../../IInventoryService/methods/inventory.IInventoryService.deleteInventoryLevel.mdx)
- [deleteReservationItem](../../IInventoryService/methods/inventory.IInventoryService.deleteReservationItem.mdx)
- [deleteReservationItemByLocationId](../../IInventoryService/methods/inventory.IInventoryService.deleteReservationItemByLocationId.mdx)
- [deleteReservationItemsByLineItem](../../IInventoryService/methods/inventory.IInventoryService.deleteReservationItemsByLineItem.mdx)
- [listInventoryItems](../../IInventoryService/methods/inventory.IInventoryService.listInventoryItems.mdx)
- [listInventoryLevels](../../IInventoryService/methods/inventory.IInventoryService.listInventoryLevels.mdx)
- [listReservationItems](../../IInventoryService/methods/inventory.IInventoryService.listReservationItems.mdx)
- [restoreInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.restoreInventoryItem.mdx)
- [retrieveAvailableQuantity](../../IInventoryService/methods/inventory.IInventoryService.retrieveAvailableQuantity.mdx)
- [retrieveInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.retrieveInventoryItem.mdx)
- [retrieveInventoryLevel](../../IInventoryService/methods/inventory.IInventoryService.retrieveInventoryLevel.mdx)
- [retrieveReservationItem](../../IInventoryService/methods/inventory.IInventoryService.retrieveReservationItem.mdx)
- [retrieveReservedQuantity](../../IInventoryService/methods/inventory.IInventoryService.retrieveReservedQuantity.mdx)
- [retrieveStockedQuantity](../../IInventoryService/methods/inventory.IInventoryService.retrieveStockedQuantity.mdx)
- [updateInventoryItem](../../IInventoryService/methods/inventory.IInventoryService.updateInventoryItem.mdx)
- [updateInventoryLevel](../../IInventoryService/methods/inventory.IInventoryService.updateInventoryLevel.mdx)
- [updateInventoryLevels](../../IInventoryService/methods/inventory.IInventoryService.updateInventoryLevels.mdx)
- [updateReservationItem](../../IInventoryService/methods/inventory.IInventoryService.updateReservationItem.mdx)
@@ -6,12 +6,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# JoinerServiceConfig
## Properties
<ParameterTypes parameters={[
{
"name": "alias",
"type": "[JoinerServiceConfigAlias](JoinerServiceConfigAlias.mdx) \\| [JoinerServiceConfigAlias](JoinerServiceConfigAlias.mdx)[]",
"type": "[JoinerServiceConfigAlias](inventory.JoinerServiceConfigAlias.mdx) \\| [JoinerServiceConfigAlias](inventory.JoinerServiceConfigAlias.mdx)[]",
"description": "Property name to use as entrypoint to the service",
"optional": true,
"defaultValue": "",
@@ -29,7 +27,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
},
{
"name": "extends",
"type": "``{ relationship: [JoinerRelationship](../types/JoinerRelationship.mdx) ; serviceName: string }``[]",
"type": "`object`[]",
"description": "",
"optional": true,
"defaultValue": "",
@@ -37,7 +35,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
"children": [
{
"name": "relationship",
"type": "[JoinerRelationship](../types/JoinerRelationship.mdx)",
"type": "[JoinerRelationship](../types/inventory.JoinerRelationship.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -82,7 +80,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
{
"name": "isInternalService",
"type": "`boolean`",
"description": "If true, the relationship is an internal service from the medusa core TODO: Remove when there are no more \"internal\" services",
"description": "If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -130,7 +128,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
},
{
"name": "fieldAlias",
"type": "`Record<string, string \\| &#123; forwardArgumentsOnPath: string[] ; path: string &#125;>`",
"type": "`Record<string, string \\| object>`",
"description": "alias for deeper nested relationships (e.g. &#123; 'price': 'prices.calculated\\_price\\_set.amount' &#125;)",
"optional": true,
"defaultValue": "",
@@ -148,7 +146,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
},
{
"name": "relationships",
"type": "[JoinerRelationship](../types/JoinerRelationship.mdx)[]",
"type": "[JoinerRelationship](../types/inventory.JoinerRelationship.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
@@ -193,7 +191,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
{
"name": "isInternalService",
"type": "`boolean`",
"description": "If true, the relationship is an internal service from the medusa core TODO: Remove when there are no more \"internal\" services",
"description": "If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services",
"optional": true,
"defaultValue": "",
"expandable": false,
@@ -6,8 +6,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# JoinerServiceConfigAlias
## Properties
<ParameterTypes parameters={[
{
"name": "args",
@@ -6,8 +6,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# NumericalComparisonOperator
## Properties
<ParameterTypes parameters={[
{
"name": "gt",
@@ -8,12 +8,10 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A shared context object that is used to share resources between the application and the module.
## Properties
<ParameterTypes parameters={[
{
"name": "manager",
"type": "EntityManager",
"type": "`EntityManager`",
"description": "An instance of an entity manager.",
"optional": true,
"defaultValue": "",
@@ -22,7 +20,7 @@ A shared context object that is used to share resources between the application
},
{
"name": "transactionManager",
"type": "EntityManager",
"type": "`EntityManager`",
"description": "An instance of a transaction manager.",
"optional": true,
"defaultValue": "",
@@ -6,8 +6,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# StringComparisonOperator
## Properties
<ParameterTypes parameters={[
{
"name": "contains",
@@ -8,8 +8,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The attributes to update in an inventory level.
## Properties
<ParameterTypes parameters={[
{
"name": "incoming_quantity",
@@ -8,8 +8,6 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The attributes to update in a reservation item.
## Properties
<ParameterTypes parameters={[
{
"name": "description",