From 1f360a3245250fc1d505ac3a3522fbf99dcd2a4e Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 1 Jul 2024 10:34:51 +0300 Subject: [PATCH] docs-util: support models implemented with DML in typedoc custom plugins (#7847) - Support generating reference for models implemented with DML - Support resolving and generating mermaid diagram for relations The Currency Module was used an example so its reference is generated to showcase the work of this PR. --- www/apps/resources/generated/files-map.mjs | 32 +- www/apps/resources/generated/sidebar.mjs | 14 +- www/apps/resources/generated/slug-changes.mjs | 22 +- .../page.mdx | 32 +- .../page.mdx | 45 - .../page.mdx | 47 - .../page.mdx | 47 + .../page.mdx | 45 + .../page.mdx | 14 +- .../page.mdx | 2 +- .../page.mdx | 2 +- .../currency.FilterableCurrencyProps/page.mdx | 2 +- .../interfaces/currency.FindConfig/page.mdx | 2 +- .../currency.ICurrencyModuleService/page.mdx | 6 +- .../currency.JoinerServiceConfig/page.mdx | 2 +- .../types/currency.EventMetadata/page.mdx | 9 + .../currency.JoinerRelationship/page.mdx | 2 +- .../currency.LinkModulesExtraFields/page.mdx | 9 + .../currency/types/currency.Message/page.mdx | 6 +- .../types/currency.MessageBody/page.mdx | 2 +- .../types/currency.MessageFormat/page.mdx | 13 - .../types/currency.RawMessageFormat/page.mdx | 13 + .../classes/currency_models.Currency/page.mdx | 13 - .../currency_models.Currency/page.mdx | 13 + .../file.AbstractFileProviderService/page.mdx | 32 +- .../page.mdx | 4 +- .../page.mdx | 32 +- .../page.mdx | 4 +- .../types/medusa.AdminCurrenciesRes/page.mdx | 2 +- .../medusa_config.ConfigModule/page.mdx | 257 +---- .../page.mdx | 4 +- .../references/modules/currency/page.mdx | 4 +- .../modules/currency_models/page.mdx | 4 +- .../page.mdx | 34 +- www/apps/resources/sidebar.mjs | 2 +- .../typedoc-json-output/currency-models.json | 102 +- .../typedoc-json-output/currency.json | 978 +++++++++--------- .../constants/merger-custom-options/file.ts | 1 - .../merger-custom-options/notification.ts | 1 - .../src/constants/merger-options.ts | 29 +- .../src/constants/references-details.ts | 3 + .../src/utils/get-model-options.ts | 4 + .../typedoc-plugin-custom/src/constants.ts | 1 + .../src/dml-relations-resolver.ts | 111 ++ .../src/dml-types-normalizer.ts | 69 ++ .../typedoc-plugin-custom/src/index.ts | 6 + .../src/mermaid-diagram-dml-generator.ts | 251 +++++ .../src/render-utils.ts | 4 + .../src/resources/helpers/dml-properties.ts | 23 + .../src/resources/helpers/if-dml-entity.ts | 12 + .../src/resources/helpers/toc.ts | 7 +- .../helpers/type-declaration-members.ts | 4 - .../src/resources/partials/member.dml.hbs | 7 + .../src/resources/partials/member.hbs | 8 + .../src/utils/reflection-formatter.ts | 15 +- .../tsconfig.json | 3 +- www/utils/packages/types/lib/index.d.ts | 23 + www/utils/packages/utils/src/dml-utils.ts | 24 + www/utils/packages/utils/src/index.ts | 1 + 59 files changed, 1455 insertions(+), 1005 deletions(-) delete mode 100644 www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.list/page.mdx delete mode 100644 www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount/page.mdx create mode 100644 www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx create mode 100644 www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx rename www/apps/resources/references/currency/ICurrencyModuleService/methods/{currency.ICurrencyModuleService.retrieve => currency.ICurrencyModuleService.retrieveCurrency}/page.mdx (54%) create mode 100644 www/apps/resources/references/currency/types/currency.EventMetadata/page.mdx create mode 100644 www/apps/resources/references/currency/types/currency.LinkModulesExtraFields/page.mdx delete mode 100644 www/apps/resources/references/currency/types/currency.MessageFormat/page.mdx create mode 100644 www/apps/resources/references/currency/types/currency.RawMessageFormat/page.mdx delete mode 100644 www/apps/resources/references/currency_models/classes/currency_models.Currency/page.mdx create mode 100644 www/apps/resources/references/currency_models/variables/currency_models.Currency/page.mdx create mode 100644 www/utils/packages/typedoc-plugin-custom/src/constants.ts create mode 100644 www/utils/packages/typedoc-plugin-custom/src/dml-relations-resolver.ts create mode 100644 www/utils/packages/typedoc-plugin-custom/src/dml-types-normalizer.ts create mode 100644 www/utils/packages/typedoc-plugin-custom/src/mermaid-diagram-dml-generator.ts create mode 100644 www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/dml-properties.ts create mode 100644 www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/if-dml-entity.ts create mode 100644 www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.dml.hbs create mode 100644 www/utils/packages/utils/src/dml-utils.ts diff --git a/www/apps/resources/generated/files-map.mjs b/www/apps/resources/generated/files-map.mjs index c225934e63..5edeb93766 100644 --- a/www/apps/resources/generated/files-map.mjs +++ b/www/apps/resources/generated/files-map.mjs @@ -1888,16 +1888,16 @@ export const filesMap = [ "pathname": "/references/cart_models/classes/cart_models.ShippingMethodTaxLine" }, { - "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.list/page.mdx", - "pathname": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.list" + "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx", + "pathname": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies" }, { - "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount/page.mdx", - "pathname": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount" + "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx", + "pathname": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies" }, { - "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieve/page.mdx", - "pathname": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieve" + "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieveCurrency/page.mdx", + "pathname": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieveCurrency" }, { "filePath": "/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.clearMessages/page.mdx", @@ -1959,10 +1959,18 @@ export const filesMap = [ "filePath": "/www/apps/resources/references/currency/interfaces/currency.MessageAggregatorFormat/page.mdx", "pathname": "/references/currency/interfaces/currency.MessageAggregatorFormat" }, + { + "filePath": "/www/apps/resources/references/currency/types/currency.EventMetadata/page.mdx", + "pathname": "/references/currency/types/currency.EventMetadata" + }, { "filePath": "/www/apps/resources/references/currency/types/currency.JoinerRelationship/page.mdx", "pathname": "/references/currency/types/currency.JoinerRelationship" }, + { + "filePath": "/www/apps/resources/references/currency/types/currency.LinkModulesExtraFields/page.mdx", + "pathname": "/references/currency/types/currency.LinkModulesExtraFields" + }, { "filePath": "/www/apps/resources/references/currency/types/currency.Message/page.mdx", "pathname": "/references/currency/types/currency.Message" @@ -1971,10 +1979,6 @@ export const filesMap = [ "filePath": "/www/apps/resources/references/currency/types/currency.MessageBody/page.mdx", "pathname": "/references/currency/types/currency.MessageBody" }, - { - "filePath": "/www/apps/resources/references/currency/types/currency.MessageFormat/page.mdx", - "pathname": "/references/currency/types/currency.MessageFormat" - }, { "filePath": "/www/apps/resources/references/currency/types/currency.ModuleJoinerConfig/page.mdx", "pathname": "/references/currency/types/currency.ModuleJoinerConfig" @@ -1984,8 +1988,12 @@ export const filesMap = [ "pathname": "/references/currency/types/currency.ModuleJoinerRelationship" }, { - "filePath": "/www/apps/resources/references/currency_models/classes/currency_models.Currency/page.mdx", - "pathname": "/references/currency_models/classes/currency_models.Currency" + "filePath": "/www/apps/resources/references/currency/types/currency.RawMessageFormat/page.mdx", + "pathname": "/references/currency/types/currency.RawMessageFormat" + }, + { + "filePath": "/www/apps/resources/references/currency_models/variables/currency_models.Currency/page.mdx", + "pathname": "/references/currency_models/variables/currency_models.Currency" }, { "filePath": "/www/apps/resources/references/customer/ICustomerModuleService/methods/customer.ICustomerModuleService.addAddresses/page.mdx", diff --git a/www/apps/resources/generated/sidebar.mjs b/www/apps/resources/generated/sidebar.mjs index e142d33c3b..72e6837d8c 100644 --- a/www/apps/resources/generated/sidebar.mjs +++ b/www/apps/resources/generated/sidebar.mjs @@ -936,22 +936,22 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "path": "/references/currency/list", - "title": "list", + "path": "/references/currency/listAndCountCurrencies", + "title": "listAndCountCurrencies", "children": [] }, { "loaded": true, "isPathHref": true, - "path": "/references/currency/listAndCount", - "title": "listAndCount", + "path": "/references/currency/listCurrencies", + "title": "listCurrencies", "children": [] }, { "loaded": true, "isPathHref": true, - "path": "/references/currency/retrieve", - "title": "retrieve", + "path": "/references/currency/retrieveCurrency", + "title": "retrieveCurrency", "children": [] } ] @@ -971,7 +971,7 @@ export const generatedSidebar = [ "isPathHref": true, "title": "Data Models", "hasTitleStyling": true, - "autogenerate_path": "/references/currency_models/classes", + "autogenerate_path": "/references/currency_models/variables", "children": [ { "loaded": true, diff --git a/www/apps/resources/generated/slug-changes.mjs b/www/apps/resources/generated/slug-changes.mjs index 927d0a2ad6..efbc93d760 100644 --- a/www/apps/resources/generated/slug-changes.mjs +++ b/www/apps/resources/generated/slug-changes.mjs @@ -405,19 +405,19 @@ export const slugChanges = [ "filePath": "/www/apps/resources/references/cart_models/classes/cart_models.ShippingMethodTaxLine/page.mdx" }, { - "origSlug": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.list", - "newSlug": "/references/currency/list", - "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.list/page.mdx" + "origSlug": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies", + "newSlug": "/references/currency/listAndCountCurrencies", + "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx" }, { - "origSlug": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount", - "newSlug": "/references/currency/listAndCount", - "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount/page.mdx" + "origSlug": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies", + "newSlug": "/references/currency/listCurrencies", + "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx" }, { - "origSlug": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieve", - "newSlug": "/references/currency/retrieve", - "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieve/page.mdx" + "origSlug": "/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieveCurrency", + "newSlug": "/references/currency/retrieveCurrency", + "filePath": "/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieveCurrency/page.mdx" }, { "origSlug": "/references/currency/interfaces/currency.ICurrencyModuleService", @@ -425,9 +425,9 @@ export const slugChanges = [ "filePath": "/www/apps/resources/references/currency/interfaces/currency.ICurrencyModuleService/page.mdx" }, { - "origSlug": "/references/currency_models/classes/currency_models.Currency", + "origSlug": "/references/currency_models/variables/currency_models.Currency", "newSlug": "/references/currency/models/Currency", - "filePath": "/www/apps/resources/references/currency_models/classes/currency_models.Currency/page.mdx" + "filePath": "/www/apps/resources/references/currency_models/variables/currency_models.Currency/page.mdx" }, { "origSlug": "/references/customer/ICustomerModuleService/methods/customer.ICustomerModuleService.addAddresses", diff --git a/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx b/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx index eec8cc5d54..f778869ea9 100644 --- a/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx +++ b/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx @@ -95,24 +95,26 @@ const { Modules } = require("@medusajs/modules-sdk") // ... -const modules = { +module.exports = defineConfig({ // ... - [Modules.AUTH]: { - resolve: "@medusajs/auth", - options: { - providers: [ - { - resolve: "./dist/modules/my-auth", - options: { - config: { - "my-auth": { - // provider options... + modules: { + [Modules.AUTH]: { + resolve: "@medusajs/auth", + options: { + providers: [ + { + resolve: "./modules/my-auth", + options: { + config: { + "my-auth": { + // provider options... + }, }, }, }, - }, - ], + ], + }, }, - }, -} + } +}) ``` diff --git a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.list/page.mdx b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.list/page.mdx deleted file mode 100644 index 0ec1c1d69c..0000000000 --- a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.list/page.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -displayed_sidebar: currencyReference -slug: /references/currency/list -sidebar_label: list ---- - -import { TypeList } from "docs-ui" - -# list - Currency Module Reference - -This documentation provides a reference to the `list` method. This belongs to the Currency Module. - -This method is used to retrieve a paginated list of currencies based on optional filters and configuration. - -## Example - -To retrieve a list of currencies using their codes: - -```ts -const currencies = await currencyModuleService.list({ - code: ["usd", "eur"], -}) -``` - -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 -const currencies = await currencyModuleService.list( - { - code: ["usd", "eur"], - }, - { - take: 20, - skip: 2, - } -) -``` - -## Parameters - -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="list"/> - -## Returns - - diff --git a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount/page.mdx b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount/page.mdx deleted file mode 100644 index 4919ef6c9c..0000000000 --- a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount/page.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -displayed_sidebar: currencyReference -slug: /references/currency/listAndCount -sidebar_label: listAndCount ---- - -import { TypeList } from "docs-ui" - -# listAndCount - Currency Module Reference - -This documentation provides a reference to the `listAndCount` method. This belongs to the Currency Module. - -This method is used to retrieve a paginated list of currencies along with the total count of available currencies satisfying the provided filters. - -## Example - -To retrieve a list of currencies using their codes: - -```ts -const [currencies, count] = - await currencyModuleService.listAndCount({ - code: ["usd", "eur"], - }) -``` - -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 -const [currencies, count] = - await currencyModuleService.listAndCount( - { - code: ["usd", "eur"], - }, - { - take: 20, - skip: 2, - } - ) -``` - -## Parameters - -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCount"/> - -## Returns - - diff --git a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx new file mode 100644 index 0000000000..5b739478b3 --- /dev/null +++ b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx @@ -0,0 +1,47 @@ +--- +displayed_sidebar: currencyReference +slug: /references/currency/listAndCountCurrencies +sidebar_label: listAndCountCurrencies +--- + +import { TypeList } from "docs-ui" + +# listAndCountCurrencies - Currency Module Reference + +This documentation provides a reference to the `listAndCountCurrencies` method. This belongs to the Currency Module. + +This method is used to retrieve a paginated list of currencies along with the total count of available currencies satisfying the provided filters. + +## Example + +To retrieve a list of currencies using their codes: + +```ts +const [currencies, count] = + await currencyModuleService.listAndCountCurrencies({ + code: ["usd", "eur"], + }) +``` + +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 +const [currencies, count] = + await currencyModuleService.listAndCountCurrencies( + { + code: ["usd", "eur"], + }, + { + take: 20, + skip: 2, + } + ) +``` + +## Parameters + +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCountCurrencies"/> + +## Returns + + diff --git a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx new file mode 100644 index 0000000000..bda6b7ef71 --- /dev/null +++ b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx @@ -0,0 +1,45 @@ +--- +displayed_sidebar: currencyReference +slug: /references/currency/listCurrencies +sidebar_label: listCurrencies +--- + +import { TypeList } from "docs-ui" + +# listCurrencies - Currency Module Reference + +This documentation provides a reference to the `listCurrencies` method. This belongs to the Currency Module. + +This method is used to retrieve a paginated list of currencies based on optional filters and configuration. + +## Example + +To retrieve a list of currencies using their codes: + +```ts +const currencies = await currencyModuleService.listCurrencies({ + code: ["usd", "eur"], +}) +``` + +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 +const currencies = await currencyModuleService.listCurrencies( + { + code: ["usd", "eur"], + }, + { + take: 20, + skip: 2, + } +) +``` + +## Parameters + +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="listCurrencies"/> + +## Returns + + diff --git a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieve/page.mdx b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieveCurrency/page.mdx similarity index 54% rename from www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieve/page.mdx rename to www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieveCurrency/page.mdx index fee1da403e..8610bdba89 100644 --- a/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieve/page.mdx +++ b/www/apps/resources/references/currency/ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieveCurrency/page.mdx @@ -1,27 +1,27 @@ --- displayed_sidebar: currencyReference -slug: /references/currency/retrieve -sidebar_label: retrieve +slug: /references/currency/retrieveCurrency +sidebar_label: retrieveCurrency --- import { TypeList } from "docs-ui" -# retrieve - Currency Module Reference +# retrieveCurrency - Currency Module Reference -This documentation provides a reference to the `retrieve` method. This belongs to the Currency Module. +This documentation provides a reference to the `retrieveCurrency` method. This belongs to the Currency Module. This method retrieves a currency by its code and and optionally based on the provided configurations. ## Example ```ts -const currency = await currencyModuleService.retrieve("usd") +const currency = await currencyModuleService.retrieveCurrency("usd") ``` ## Parameters -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrieve"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/currency.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/currency.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrieveCurrency"/> ## Returns - + diff --git a/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.getMessages/page.mdx b/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.getMessages/page.mdx index d1ef49d2fe..9f4bf09fc4 100644 --- a/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.getMessages/page.mdx +++ b/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.getMessages/page.mdx @@ -12,4 +12,4 @@ import { TypeList } from "docs-ui" ## Returns -`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/currency.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"Message","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="getMessages"/> +`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/currency.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"Message","type":"[MessageBody](../../../types/currency.MessageBody/page.mdx)<TData> & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="getMessages"/> diff --git a/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.saveRawMessageData/page.mdx b/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.saveRawMessageData/page.mdx index f5cfb53b99..84ddead4e8 100644 --- a/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.saveRawMessageData/page.mdx +++ b/www/apps/resources/references/currency/IMessageAggregator/methods/currency.IMessageAggregator.saveRawMessageData/page.mdx @@ -8,7 +8,7 @@ import { TypeList } from "docs-ui" ## Parameters -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="saveRawMessageData"/> +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="saveRawMessageData"/> ## Returns diff --git a/www/apps/resources/references/currency/interfaces/currency.FilterableCurrencyProps/page.mdx b/www/apps/resources/references/currency/interfaces/currency.FilterableCurrencyProps/page.mdx index 00cb8c7e29..6ba61a6e03 100644 --- a/www/apps/resources/references/currency/interfaces/currency.FilterableCurrencyProps/page.mdx +++ b/www/apps/resources/references/currency/interfaces/currency.FilterableCurrencyProps/page.mdx @@ -8,4 +8,4 @@ import { TypeList } from "docs-ui" Filters to apply on a currency. - + diff --git a/www/apps/resources/references/currency/interfaces/currency.FindConfig/page.mdx b/www/apps/resources/references/currency/interfaces/currency.FindConfig/page.mdx index 414d990669..0558ff4f88 100644 --- a/www/apps/resources/references/currency/interfaces/currency.FindConfig/page.mdx +++ b/www/apps/resources/references/currency/interfaces/currency.FindConfig/page.mdx @@ -13,4 +13,4 @@ which provides correct typing of field names in its properties. -`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/> +`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/> diff --git a/www/apps/resources/references/currency/interfaces/currency.ICurrencyModuleService/page.mdx b/www/apps/resources/references/currency/interfaces/currency.ICurrencyModuleService/page.mdx index 33857298f0..fccdfd4aad 100644 --- a/www/apps/resources/references/currency/interfaces/currency.ICurrencyModuleService/page.mdx +++ b/www/apps/resources/references/currency/interfaces/currency.ICurrencyModuleService/page.mdx @@ -13,6 +13,6 @@ The main service interface for the Currency Module. ## Methods -- [retrieve](../../ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieve/page.mdx) -- [list](../../ICurrencyModuleService/methods/currency.ICurrencyModuleService.list/page.mdx) -- [listAndCount](../../ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCount/page.mdx) +- [retrieveCurrency](../../ICurrencyModuleService/methods/currency.ICurrencyModuleService.retrieveCurrency/page.mdx) +- [listCurrencies](../../ICurrencyModuleService/methods/currency.ICurrencyModuleService.listCurrencies/page.mdx) +- [listAndCountCurrencies](../../ICurrencyModuleService/methods/currency.ICurrencyModuleService.listAndCountCurrencies/page.mdx) diff --git a/www/apps/resources/references/currency/interfaces/currency.JoinerServiceConfig/page.mdx b/www/apps/resources/references/currency/interfaces/currency.JoinerServiceConfig/page.mdx index 040372237b..25e64c1b8d 100644 --- a/www/apps/resources/references/currency/interfaces/currency.JoinerServiceConfig/page.mdx +++ b/www/apps/resources/references/currency/interfaces/currency.JoinerServiceConfig/page.mdx @@ -6,4 +6,4 @@ import { TypeList } from "docs-ui" # JoinerServiceConfig -`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../../types/currency.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","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,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/currency.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","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,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfig"/> +`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../../types/currency.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/currency.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"args","type":"`Record`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfig"/> diff --git a/www/apps/resources/references/currency/types/currency.EventMetadata/page.mdx b/www/apps/resources/references/currency/types/currency.EventMetadata/page.mdx new file mode 100644 index 0000000000..a7398c7a79 --- /dev/null +++ b/www/apps/resources/references/currency/types/currency.EventMetadata/page.mdx @@ -0,0 +1,9 @@ +--- +displayed_sidebar: currencyReference +--- + +import { TypeList } from "docs-ui" + +# EventMetadata + + **EventMetadata**: `Record` & `object` diff --git a/www/apps/resources/references/currency/types/currency.JoinerRelationship/page.mdx b/www/apps/resources/references/currency/types/currency.JoinerRelationship/page.mdx index ceb9c4ef96..2c5c9b406f 100644 --- a/www/apps/resources/references/currency/types/currency.JoinerRelationship/page.mdx +++ b/www/apps/resources/references/currency/types/currency.JoinerRelationship/page.mdx @@ -10,4 +10,4 @@ import { TypeList } from "docs-ui" ## Properties -`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerRelationship"/> +`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerRelationship"/> diff --git a/www/apps/resources/references/currency/types/currency.LinkModulesExtraFields/page.mdx b/www/apps/resources/references/currency/types/currency.LinkModulesExtraFields/page.mdx new file mode 100644 index 0000000000..ed976c8eb6 --- /dev/null +++ b/www/apps/resources/references/currency/types/currency.LinkModulesExtraFields/page.mdx @@ -0,0 +1,9 @@ +--- +displayed_sidebar: currencyReference +--- + +import { TypeList } from "docs-ui" + +# LinkModulesExtraFields + + **LinkModulesExtraFields**: `Record` diff --git a/www/apps/resources/references/currency/types/currency.Message/page.mdx b/www/apps/resources/references/currency/types/currency.Message/page.mdx index 685344c503..a7866ad272 100644 --- a/www/apps/resources/references/currency/types/currency.Message/page.mdx +++ b/www/apps/resources/references/currency/types/currency.Message/page.mdx @@ -6,8 +6,4 @@ import { TypeList } from "docs-ui" # Message - **Message**: `Object` - -## Properties - -`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="Message"/> + **Message**: [MessageBody](../currency.MessageBody/page.mdx)<TData> & `object` diff --git a/www/apps/resources/references/currency/types/currency.MessageBody/page.mdx b/www/apps/resources/references/currency/types/currency.MessageBody/page.mdx index e61729f59c..5dd9c9073b 100644 --- a/www/apps/resources/references/currency/types/currency.MessageBody/page.mdx +++ b/www/apps/resources/references/currency/types/currency.MessageBody/page.mdx @@ -10,4 +10,4 @@ import { TypeList } from "docs-ui" ## Properties - + diff --git a/www/apps/resources/references/currency/types/currency.MessageFormat/page.mdx b/www/apps/resources/references/currency/types/currency.MessageFormat/page.mdx deleted file mode 100644 index b23eed941d..0000000000 --- a/www/apps/resources/references/currency/types/currency.MessageFormat/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -displayed_sidebar: currencyReference ---- - -import { TypeList } from "docs-ui" - -# MessageFormat - - **MessageFormat**: `Object` - -## Properties - - diff --git a/www/apps/resources/references/currency/types/currency.RawMessageFormat/page.mdx b/www/apps/resources/references/currency/types/currency.RawMessageFormat/page.mdx new file mode 100644 index 0000000000..9b2684934d --- /dev/null +++ b/www/apps/resources/references/currency/types/currency.RawMessageFormat/page.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: currencyReference +--- + +import { TypeList } from "docs-ui" + +# RawMessageFormat + + **RawMessageFormat**: `Object` + +## Properties + +`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RawMessageFormat"/> diff --git a/www/apps/resources/references/currency_models/classes/currency_models.Currency/page.mdx b/www/apps/resources/references/currency_models/classes/currency_models.Currency/page.mdx deleted file mode 100644 index 5a75a53fef..0000000000 --- a/www/apps/resources/references/currency_models/classes/currency_models.Currency/page.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -displayed_sidebar: currencyModelReference -slug: /references/currency/models/Currency -sidebar_label: Currency ---- - -import { TypeList } from "docs-ui" - -# Currency - Currency Module Data Models Reference - -This documentation provides a reference to the Currency . This belongs to the Currency Module. - - diff --git a/www/apps/resources/references/currency_models/variables/currency_models.Currency/page.mdx b/www/apps/resources/references/currency_models/variables/currency_models.Currency/page.mdx new file mode 100644 index 0000000000..21237da4c5 --- /dev/null +++ b/www/apps/resources/references/currency_models/variables/currency_models.Currency/page.mdx @@ -0,0 +1,13 @@ +--- +displayed_sidebar: currencyModelReference +slug: /references/currency/models/Currency +sidebar_label: Currency +--- + +import { TypeList } from "docs-ui" + +# Currency - Currency Module Data Models Reference + +This documentation provides a reference to the Currency . This belongs to the Currency Module. + + diff --git a/www/apps/resources/references/file/classes/file.AbstractFileProviderService/page.mdx b/www/apps/resources/references/file/classes/file.AbstractFileProviderService/page.mdx index d331492f10..3f44f6c508 100644 --- a/www/apps/resources/references/file/classes/file.AbstractFileProviderService/page.mdx +++ b/www/apps/resources/references/file/classes/file.AbstractFileProviderService/page.mdx @@ -101,24 +101,26 @@ const { Modules } = require("@medusajs/modules-sdk") // ... -const modules = { +module.exports = defineConfig({ // ... - [Modules.FILE]: { - resolve: "@medusajs/file", - options: { - providers: [ - { - resolve: "./dist/modules/my-file", - options: { - config: { - "my-file": { - // provider options... + modules: { + [Modules.FILE]: { + resolve: "@medusajs/file", + options: { + providers: [ + { + resolve: "./modules/my-file", + options: { + config: { + "my-file": { + // provider options... + }, }, }, }, - }, - ], + ], + }, }, - }, -} + } +}) ``` diff --git a/www/apps/resources/references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.create/page.mdx b/www/apps/resources/references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.create/page.mdx index 9db10b630a..339ee3627d 100644 --- a/www/apps/resources/references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.create/page.mdx +++ b/www/apps/resources/references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.create/page.mdx @@ -17,7 +17,7 @@ This method creates fulfillment sets. ### Example ```ts -const fulfillmentSets = await fulfillmentModuleService.createFulfillmentSets( +const fulfillmentSets = await fulfillmentModuleService.create( [ { name: "Shipping", @@ -46,7 +46,7 @@ This method creates a fulfillment set. ### Example ```ts -const fulfillmentSet = await fulfillmentModuleService.createFulfillmentSets({ +const fulfillmentSet = await fulfillmentModuleService.create({ name: "Shipping", type: "default", }) diff --git a/www/apps/resources/references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx b/www/apps/resources/references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx index a8abfab739..12d9130922 100644 --- a/www/apps/resources/references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx +++ b/www/apps/resources/references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx @@ -191,24 +191,26 @@ const { Modules } = require("@medusajs/modules-sdk") // ... -const modules = { +module.exports = defineConfig({ // ... - [Modules.FULFILLMENT]: { - resolve: "@medusajs/fulfillment", - options: { - providers: [ - { - resolve: "./dist/modules/my-fulfillment", - options: { - config: { - "my-fulfillment": { - // provider options... + modules: { + [Modules.FULFILLMENT]: { + resolve: "@medusajs/fulfillment", + options: { + providers: [ + { + resolve: "./modules/my-fulfillment", + options: { + config: { + "my-fulfillment": { + // provider options... + }, }, }, }, - }, - ], + ], + }, }, - }, -} + } +}) ``` diff --git a/www/apps/resources/references/js_client/classes/js_client.AdminCurrenciesResource/page.mdx b/www/apps/resources/references/js_client/classes/js_client.AdminCurrenciesResource/page.mdx index f3e64a402d..c35a4eb249 100644 --- a/www/apps/resources/references/js_client/classes/js_client.AdminCurrenciesResource/page.mdx +++ b/www/apps/resources/references/js_client/classes/js_client.AdminCurrenciesResource/page.mdx @@ -57,7 +57,7 @@ medusa.admin.currencies.list({ #### Returns - + ### update @@ -83,4 +83,4 @@ medusa.admin.currencies.update(code, { #### Returns - + diff --git a/www/apps/resources/references/medusa/types/medusa.AdminCurrenciesRes/page.mdx b/www/apps/resources/references/medusa/types/medusa.AdminCurrenciesRes/page.mdx index 0f4a49dff3..6ce97c00ef 100644 --- a/www/apps/resources/references/medusa/types/medusa.AdminCurrenciesRes/page.mdx +++ b/www/apps/resources/references/medusa/types/medusa.AdminCurrenciesRes/page.mdx @@ -8,4 +8,4 @@ A currency's details. ## Properties - + diff --git a/www/apps/resources/references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx b/www/apps/resources/references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx index 1679b79af5..bf3d66d51f 100644 --- a/www/apps/resources/references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx +++ b/www/apps/resources/references/medusa_config/interfaces/medusa_config.ConfigModule/page.mdx @@ -46,7 +46,7 @@ This property holds essential configurations related to the Medusa backend, such ### database\_database -The name of the database to connect to. If specified in `databaseUrl`, then it’s not required to include it. +The name of the database to connect to. If specified in `database_url`, then it’s not required to include it. Make sure to create the PostgreSQL database before using it. You can check how to create a database in [PostgreSQL's documentation](https://www.postgresql.org/docs/current/sql-createdatabase.html). @@ -56,14 +56,15 @@ Make sure to create the PostgreSQL database before using it. You can check how t ```js title="medusa-config.js" module.exports = { projectConfig: { - databaseName: process.env.DATABASE_DATABASE || "medusa-store", + database_database: process.env.DATABASE_DATABASE || + "medusa-store", // ... }, // ... } ``` -### databaseUrl +### database\_url The connection URL of the database. The format of the connection URL for PostgreSQL is: @@ -94,28 +95,29 @@ Then, use the value in `medusa-config.js`: ```js title="medusa-config.js" module.exports = { projectConfig: { - databaseUrl: process.env.DATABASE_URL, + database_url: process.env.DATABASE_URL, // ... }, // ... } ``` -### databaseSchema +### database\_schema The database schema to connect to. This is not required to provide if you’re using the default schema, which is `public`. ```js title="medusa-config.js" module.exports = { projectConfig: { - databaseSchema: process.env.DATABASE_SCHEMA || "custom", + database_schema: process.env.DATABASE_SCHEMA || + "custom", // ... }, // ... } ``` -### databaseLogging +### database\_logging This configuration specifies what database messages to log. Its value can be one of the following: @@ -130,14 +132,16 @@ If this configuration isn't set, its default value is `false`, meaning no databa ```js title="medusa-config.js" module.exports = { projectConfig: { - databaseLogging: ["query", "error"], + database_logging: [ + "query", "error", + ], // ... }, // ... } ``` -### databaseExtra +### database\_extra An object that includes additional configurations to pass to the database connection. You can pass any configuration. One defined configuration to pass is `ssl` which enables support for TLS/SSL connections. @@ -150,7 +154,7 @@ During development, it’s recommended not to pass this option. ```js title="medusa-config.js" module.exports = { projectConfig: { - databaseExtra: + database_extra: process.env.NODE_ENV !== "development" ? { ssl: { rejectUnauthorized: false } } : {}, @@ -162,33 +166,9 @@ module.exports = { #### Properties - + -### databaseDriverOptions +### database\_driver\_options An object that includes additional configurations to pass to the database connection for v2. You can pass any configuration. One defined configuration to pass is `ssl` which enables support for TLS/SSL connections. @@ -201,7 +181,7 @@ During development, it’s recommended not to pass this option. ```js title="medusa-config.js" module.exports = { projectConfig: { - databaseDriverOptions: + database_driver_options: process.env.NODE_ENV !== "development" ? { connection: { ssl: { rejectUnauthorized: false } } } : {}, @@ -213,43 +193,9 @@ module.exports = { #### Properties - + -### redisUrl +### redis\_url Used to specify the URL to connect to Redis. This is only used for scheduled jobs. If you omit this configuration, scheduled jobs won't work. @@ -272,14 +218,15 @@ For a local Redis installation, the connection URL should be `redis://localhost: ```js title="medusa-config.js" module.exports = { projectConfig: { - redisUrl: process.env.REDIS_URL || "redis://localhost:6379", + redis_url: process.env.REDIS_URL || + "redis://localhost:6379", // ... }, // ... } ``` -### redisPrefix +### redis\_prefix The prefix set on all keys stored in Redis. The default value is `sess:`. @@ -290,14 +237,15 @@ If this configuration option is provided, it is prepended to `sess:`. ```js title="medusa-config.js" module.exports = { projectConfig: { - redisPrefix: process.env.REDIS_PREFIX || "medusa:", + redis_prefix: process.env.REDIS_PREFIX || + "medusa:", // ... }, // ... } ``` -### redisOptions +### redis\_options An object of options to pass ioredis. You can refer to [ioredis’s RedisOptions documentation](https://redis.github.io/ioredis/index.html#RedisOptions) for the list of available options. @@ -307,8 +255,9 @@ for the list of available options. ```js title="medusa-config.js" module.exports = { projectConfig: { - redisOptions: { - connectionName: process.env.REDIS_CONNECTION_NAME || "medusa", + redis_options: { + connectionName: process.env.REDIS_CONNECTION_NAME || + "medusa", }, // ... }, @@ -316,7 +265,7 @@ module.exports = { } ``` -### sessionOptions +### session\_options An object of options to pass to [express-session](https://www.npmjs.com/package/express-session). @@ -325,8 +274,9 @@ An object of options to pass to [express-session](https://www.npmjs.com/package/ ```js title="medusa-config.js" module.exports = { projectConfig: { - sessionOptions: { - name: process.env.SESSION_NAME || "custom", + session_options: { + name: process.env.SESSION_NAME || + "custom", }, // ... }, @@ -336,73 +286,9 @@ module.exports = { #### Properties - + -### http_compression +### http\_compression Configure HTTP compression from the application layer. If you have access to the HTTP server, the recommended approach would be to enable it there. However, some platforms don't offer access to the HTTP layer and in those cases, this is a good alternative. @@ -434,53 +320,9 @@ module.exports = { #### Properties - + -### jobs_batch_size +### jobs\_batch\_size Configure the number of staged jobs that are polled from the database. Default is `1000`. @@ -489,14 +331,14 @@ Configure the number of staged jobs that are polled from the database. Default i ```js title="medusa-config.js" module.exports = { projectConfig: { - jobs_batch_size: 100, + jobs_batch_size: 100 // ... }, // ... } ``` -### worker_mode +### worker\_mode Configure the application's worker mode. Default is `shared`. @@ -511,7 +353,7 @@ Learn more in [this guide](https://docs.medusajs.com/development/medusa-worker). ```js title="medusa-config.js" module.exports = { projectConfig: { - worker_mode: "shared", + worker_mode: "shared" // ... }, // ... @@ -600,8 +442,8 @@ The items in the array can either be: - A string, which is the name of the plugin to add. You can pass a plugin as a string if it doesn’t require any configurations. - An object having the following properties: - - `resolve`: The name of the plugin. - - `options`: An object that includes the plugin’s options. These options vary for each plugin, and you should refer to the plugin’s documentation for available options. + - `resolve`: The name of the plugin. + - `options`: An object that includes the plugin’s options. These options vary for each plugin, and you should refer to the plugin’s documentation for available options. ### Example @@ -612,7 +454,8 @@ module.exports = { { resolve: `medusa-my-plugin`, options: { - apiKey: process.env.MY_API_KEY || `test`, + apiKey: process.env.MY_API_KEY || + `test`, }, }, // ... @@ -621,7 +464,7 @@ module.exports = { } ``` ---- +___ ## modules @@ -635,11 +478,11 @@ The keys of the `modules` configuration object refer to the type of module. Its 1. A boolean value indicating whether the module type is enabled; 2. Or a string value indicating the name of the module to be used for the module type. This can be used if the module does not require any options; 3. Or an object having the following properties, but typically you would mainly use the `resolve` and `options` properties only: - 1. `resolve`: a string indicating the name of the module. - 2. `options`: an object indicating the options to pass to the module. These options vary for each module, and you should refer to the module’s documentation for details on them. - 3. `resources`: a string indicating whether the module shares the dependency container with the Medusa core. Its value can either be `shared` or `isolated`. Refer to the [Modules documentation](https://docs.medusajs.com/development/modules/create#module-scope) for more details. - 4. `alias`: a string indicating a unique alias to register the module under. Other modules can’t use the same alias. - 5. `main`: a boolean value indicating whether this module is the main registered module. This is useful when an alias is used. + 1. `resolve`: a string indicating the name of the module. + 2. `options`: an object indicating the options to pass to the module. These options vary for each module, and you should refer to the module’s documentation for details on them. + 3. `resources`: a string indicating whether the module shares the dependency container with the Medusa core. Its value can either be `shared` or `isolated`. Refer to the [Modules documentation](https://docs.medusajs.com/development/modules/create#module-scope) for more details. + 4. `alias`: a string indicating a unique alias to register the module under. Other modules can’t use the same alias. + 5. `main`: a boolean value indicating whether this module is the main registered module. This is useful when an alias is used. ### Example @@ -662,7 +505,7 @@ module.exports = { } ``` ---- +___ ## featureFlags diff --git a/www/apps/resources/references/medusa_react/Hooks/Admin/medusa_react.Hooks.Admin.Currencies/page.mdx b/www/apps/resources/references/medusa_react/Hooks/Admin/medusa_react.Hooks.Admin.Currencies/page.mdx index e2888140be..e28ccff7aa 100644 --- a/www/apps/resources/references/medusa_react/Hooks/Admin/medusa_react.Hooks.Admin.Currencies/page.mdx +++ b/www/apps/resources/references/medusa_react/Hooks/Admin/medusa_react.Hooks.Admin.Currencies/page.mdx @@ -61,7 +61,7 @@ export default Currency #### Mutation Function Returned Data - + ___ @@ -141,4 +141,4 @@ export default Currencies #### Query Returned Data - + diff --git a/www/apps/resources/references/modules/currency/page.mdx b/www/apps/resources/references/modules/currency/page.mdx index bd91132003..07e711a730 100644 --- a/www/apps/resources/references/modules/currency/page.mdx +++ b/www/apps/resources/references/modules/currency/page.mdx @@ -18,9 +18,11 @@ import { TypeList } from "docs-ui" ## Type Aliases +- [EventMetadata](../../currency/types/currency.EventMetadata/page.mdx) - [MessageBody](../../currency/types/currency.MessageBody/page.mdx) - [Message](../../currency/types/currency.Message/page.mdx) -- [MessageFormat](../../currency/types/currency.MessageFormat/page.mdx) +- [RawMessageFormat](../../currency/types/currency.RawMessageFormat/page.mdx) - [JoinerRelationship](../../currency/types/currency.JoinerRelationship/page.mdx) +- [LinkModulesExtraFields](../../currency/types/currency.LinkModulesExtraFields/page.mdx) - [ModuleJoinerConfig](../../currency/types/currency.ModuleJoinerConfig/page.mdx) - [ModuleJoinerRelationship](../../currency/types/currency.ModuleJoinerRelationship/page.mdx) diff --git a/www/apps/resources/references/modules/currency_models/page.mdx b/www/apps/resources/references/modules/currency_models/page.mdx index 2e587561f9..8953960edb 100644 --- a/www/apps/resources/references/modules/currency_models/page.mdx +++ b/www/apps/resources/references/modules/currency_models/page.mdx @@ -9,6 +9,6 @@ import { TypeList } from "docs-ui" This documentation provides a reference to the data models in the Currency Module -## Classes +## Data Models -- [Currency](../../currency_models/classes/currency_models.Currency/page.mdx) +- [Currency](../../currency_models/variables/currency_models.Currency/page.mdx) diff --git a/www/apps/resources/references/notification/classes/notification.AbstractNotificationProviderService/page.mdx b/www/apps/resources/references/notification/classes/notification.AbstractNotificationProviderService/page.mdx index d7bdbd63a1..0f76f43ae6 100644 --- a/www/apps/resources/references/notification/classes/notification.AbstractNotificationProviderService/page.mdx +++ b/www/apps/resources/references/notification/classes/notification.AbstractNotificationProviderService/page.mdx @@ -79,25 +79,27 @@ const { Modules } = require("@medusajs/modules-sdk") // ... -const modules = { +module.exports = defineConfig({ // ... - [Modules.NOTIFICATION]: { - resolve: "@medusajs/notification", - options: { - providers: [ - { - resolve: "./dist/modules/my-notification", - options: { - config: { - "my-notification": { - channels: ["email"], - // provider options... + modules: { + [Modules.NOTIFICATION]: { + resolve: "@medusajs/notification", + options: { + providers: [ + { + resolve: "./modules/my-notification", + options: { + config: { + "my-notification": { + channels: ["email"], + // provider options... + }, }, }, }, - }, - ], + ], + }, }, - }, -} + } +}) ``` diff --git a/www/apps/resources/sidebar.mjs b/www/apps/resources/sidebar.mjs index 65bb6e6de3..55eaf48da4 100644 --- a/www/apps/resources/sidebar.mjs +++ b/www/apps/resources/sidebar.mjs @@ -276,7 +276,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([ { title: "Data Models", hasTitleStyling: true, - autogenerate_path: "/references/currency_models/classes", + autogenerate_path: "/references/currency_models/variables", }, ], }, diff --git a/www/utils/generated/typedoc-json-output/currency-models.json b/www/utils/generated/typedoc-json-output/currency-models.json index efa4440a6a..3ab4f66de6 100644 --- a/www/utils/generated/typedoc-json-output/currency-models.json +++ b/www/utils/generated/typedoc-json-output/currency-models.json @@ -1,12 +1,12 @@ { - "id": 1856, + "id": 185, "name": "currency-models", "variant": "project", "kind": 1, "flags": {}, "children": [ { - "id": 1857, + "id": 186, "name": "Currency", "variant": "declaration", "kind": 32, @@ -24,14 +24,14 @@ { "type": "reflection", "declaration": { - "id": 1858, + "id": 187, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1859, + "id": 188, "name": "code", "variant": "declaration", "kind": 1024, @@ -48,7 +48,7 @@ "defaultValue": "..." }, { - "id": 1860, + "id": 189, "name": "symbol", "variant": "declaration", "kind": 1024, @@ -65,7 +65,7 @@ "defaultValue": "..." }, { - "id": 1861, + "id": 190, "name": "symbol_native", "variant": "declaration", "kind": 1024, @@ -82,7 +82,7 @@ "defaultValue": "..." }, { - "id": 1862, + "id": 191, "name": "name", "variant": "declaration", "kind": 1024, @@ -99,7 +99,7 @@ "defaultValue": "..." }, { - "id": 1863, + "id": 192, "name": "decimal_digits", "variant": "declaration", "kind": 1024, @@ -116,7 +116,7 @@ "defaultValue": "..." }, { - "id": 1864, + "id": 193, "name": "rounding", "variant": "declaration", "kind": 1024, @@ -137,12 +137,12 @@ { "title": "Properties", "children": [ - 1859, - 1860, - 1861, - 1862, - 1863, - 1864 + 188, + 189, + 190, + 191, + 192, + 193 ] } ] @@ -151,14 +151,14 @@ { "type": "reflection", "declaration": { - "id": 1865, + "id": 194, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1866, + "id": 195, "name": "code", "variant": "declaration", "kind": 1024, @@ -175,7 +175,7 @@ "defaultValue": "..." }, { - "id": 1867, + "id": 196, "name": "symbol", "variant": "declaration", "kind": 1024, @@ -192,7 +192,7 @@ "defaultValue": "..." }, { - "id": 1868, + "id": 197, "name": "symbol_native", "variant": "declaration", "kind": 1024, @@ -209,7 +209,7 @@ "defaultValue": "..." }, { - "id": 1869, + "id": 198, "name": "name", "variant": "declaration", "kind": 1024, @@ -226,7 +226,7 @@ "defaultValue": "..." }, { - "id": 1870, + "id": 199, "name": "decimal_digits", "variant": "declaration", "kind": 1024, @@ -243,7 +243,7 @@ "defaultValue": "..." }, { - "id": 1871, + "id": 200, "name": "rounding", "variant": "declaration", "kind": 1024, @@ -264,12 +264,12 @@ { "title": "Properties", "children": [ - 1866, - 1867, - 1868, - 1869, - 1870, - 1871 + 195, + 196, + 197, + 198, + 199, + 200 ] } ] @@ -278,14 +278,14 @@ { "type": "reflection", "declaration": { - "id": 1872, + "id": 201, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1873, + "id": 202, "name": "raw_rounding", "variant": "declaration", "kind": 1024, @@ -305,7 +305,7 @@ { "title": "Properties", "children": [ - 1873 + 202 ] } ] @@ -332,81 +332,81 @@ { "title": "Variables", "children": [ - 1857 + 186 ] } ], "packageName": "@medusajs/currency", "symbolIdMap": { - "1856": { + "185": { "sourceFileName": "../../../../packages/modules/currency/src/models/index.ts", "qualifiedName": "" }, - "1857": { + "186": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "default" }, - "1858": { + "187": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "__object" }, - "1859": { + "188": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "__object.code" }, - "1860": { + "189": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "__object.symbol" }, - "1861": { + "190": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "__object.symbol_native" }, - "1862": { + "191": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "__object.name" }, - "1863": { + "192": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "__object.decimal_digits" }, - "1864": { + "193": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "__object.rounding" }, - "1865": { + "194": { "sourceFileName": "../../../../packages/core/utils/src/dml/entity-builder.ts", "qualifiedName": "__type" }, - "1866": { + "195": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "code" }, - "1867": { + "196": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "symbol" }, - "1868": { + "197": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "symbol_native" }, - "1869": { + "198": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "name" }, - "1870": { + "199": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "decimal_digits" }, - "1871": { + "200": { "sourceFileName": "../../../../packages/modules/currency/src/models/currency.ts", "qualifiedName": "rounding" }, - "1872": { + "201": { "sourceFileName": "../../../../packages/core/utils/src/dml/entity-builder.ts", "qualifiedName": "__type" }, - "1873": { + "202": { "sourceFileName": "", "qualifiedName": "raw_rounding" } @@ -416,7 +416,7 @@ "1": "../../../../packages/modules/currency/src/models/index.ts" }, "reflections": { - "1": 1856 + "1": 185 } } } \ No newline at end of file diff --git a/www/utils/generated/typedoc-json-output/currency.json b/www/utils/generated/typedoc-json-output/currency.json index 8b8224b3cb..acfc92eda8 100644 --- a/www/utils/generated/typedoc-json-output/currency.json +++ b/www/utils/generated/typedoc-json-output/currency.json @@ -1,12 +1,12 @@ { - "id": 1671, + "id": 0, "name": "currency", "variant": "project", "kind": 1, "flags": {}, "children": [ { - "id": 1715, + "id": 44, "name": "FindConfig", "variant": "declaration", "kind": 256, @@ -29,7 +29,7 @@ }, "children": [ { - "id": 1716, + "id": 45, "name": "select", "variant": "declaration", "kind": 1024, @@ -58,7 +58,7 @@ "operator": "keyof", "target": { "type": "reference", - "target": 1727, + "target": 56, "name": "Entity", "package": "@medusajs/types", "qualifiedName": "FindConfig.Entity", @@ -70,7 +70,7 @@ } }, { - "id": 1717, + "id": 46, "name": "skip", "variant": "declaration", "kind": 1024, @@ -100,7 +100,7 @@ } }, { - "id": 1718, + "id": 47, "name": "take", "variant": "declaration", "kind": 1024, @@ -130,7 +130,7 @@ } }, { - "id": 1719, + "id": 48, "name": "relations", "variant": "declaration", "kind": 1024, @@ -154,7 +154,7 @@ } }, { - "id": 1720, + "id": 49, "name": "order", "variant": "declaration", "kind": 1024, @@ -188,21 +188,21 @@ "type": { "type": "reflection", "declaration": { - "id": 1721, + "id": 50, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "indexSignatures": [ { - "id": 1722, + "id": 51, "name": "__index", "variant": "signature", "kind": 8192, "flags": {}, "parameters": [ { - "id": 1723, + "id": 52, "name": "K", "variant": "param", "kind": 32768, @@ -232,7 +232,7 @@ } }, { - "id": 1724, + "id": 53, "name": "withDeleted", "variant": "declaration", "kind": 1024, @@ -261,7 +261,7 @@ } }, { - "id": 1725, + "id": 54, "name": "filters", "variant": "declaration", "kind": 1024, @@ -297,7 +297,7 @@ } }, { - "id": 1726, + "id": 55, "name": "options", "variant": "declaration", "kind": 1024, @@ -337,20 +337,20 @@ { "title": "Properties", "children": [ - 1716, - 1717, - 1718, - 1719, - 1720, - 1724, - 1725, - 1726 + 45, + 46, + 47, + 48, + 49, + 53, + 54, + 55 ] } ], "typeParameters": [ { - "id": 1727, + "id": 56, "name": "Entity", "variant": "typeParam", "kind": 131072, @@ -359,7 +359,7 @@ ] }, { - "id": 1728, + "id": 57, "name": "CurrencyDTO", "variant": "declaration", "kind": 256, @@ -374,7 +374,7 @@ }, "children": [ { - "id": 1729, + "id": 58, "name": "code", "variant": "declaration", "kind": 1024, @@ -404,7 +404,7 @@ } }, { - "id": 1730, + "id": 59, "name": "symbol", "variant": "declaration", "kind": 1024, @@ -434,7 +434,7 @@ } }, { - "id": 1731, + "id": 60, "name": "symbol_native", "variant": "declaration", "kind": 1024, @@ -464,7 +464,7 @@ } }, { - "id": 1732, + "id": 61, "name": "name", "variant": "declaration", "kind": 1024, @@ -498,16 +498,16 @@ { "title": "Properties", "children": [ - 1729, - 1730, - 1731, - 1732 + 58, + 59, + 60, + 61 ] } ] }, { - "id": 1745, + "id": 74, "name": "FilterableCurrencyProps", "variant": "declaration", "kind": 256, @@ -522,7 +522,7 @@ }, "children": [ { - "id": 1746, + "id": 75, "name": "q", "variant": "declaration", "kind": 1024, @@ -543,7 +543,7 @@ } }, { - "id": 1747, + "id": 76, "name": "code", "variant": "declaration", "kind": 1024, @@ -567,7 +567,7 @@ } }, { - "id": 1748, + "id": 77, "name": "$and", "variant": "declaration", "kind": 1024, @@ -590,17 +590,17 @@ "types": [ { "type": "reference", - "target": 1745, + "target": 74, "name": "FilterableCurrencyProps", "package": "@medusajs/types" }, { "type": "reference", - "target": 1788, + "target": 117, "typeArguments": [ { "type": "reference", - "target": 1745, + "target": 74, "name": "FilterableCurrencyProps", "package": "@medusajs/types" } @@ -613,12 +613,12 @@ }, "inheritedFrom": { "type": "reference", - "target": 1789, + "target": 118, "name": "BaseFilterable.$and" } }, { - "id": 1749, + "id": 78, "name": "$or", "variant": "declaration", "kind": 1024, @@ -641,17 +641,17 @@ "types": [ { "type": "reference", - "target": 1745, + "target": 74, "name": "FilterableCurrencyProps", "package": "@medusajs/types" }, { "type": "reference", - "target": 1788, + "target": 117, "typeArguments": [ { "type": "reference", - "target": 1745, + "target": 74, "name": "FilterableCurrencyProps", "package": "@medusajs/types" } @@ -664,7 +664,7 @@ }, "inheritedFrom": { "type": "reference", - "target": 1790, + "target": 119, "name": "BaseFilterable.$or" } } @@ -673,21 +673,21 @@ { "title": "Properties", "children": [ - 1746, - 1747, - 1748, - 1749 + 75, + 76, + 77, + 78 ] } ], "extendedTypes": [ { "type": "reference", - "target": 1788, + "target": 117, "typeArguments": [ { "type": "reference", - "target": 1745, + "target": 74, "name": "FilterableCurrencyProps", "package": "@medusajs/types" } @@ -698,7 +698,7 @@ ] }, { - "id": 1672, + "id": 1, "name": "ICurrencyModuleService", "variant": "declaration", "kind": 256, @@ -713,14 +713,14 @@ }, "children": [ { - "id": 1673, + "id": 2, "name": "retrieveCurrency", "variant": "declaration", "kind": 2048, "flags": {}, "signatures": [ { - "id": 1674, + "id": 3, "name": "retrieveCurrency", "variant": "signature", "kind": 4096, @@ -755,7 +755,7 @@ }, "parameters": [ { - "id": 1675, + "id": 4, "name": "code", "variant": "param", "kind": 32768, @@ -774,7 +774,7 @@ } }, { - "id": 1676, + "id": 5, "name": "config", "variant": "param", "kind": 32768, @@ -807,11 +807,11 @@ }, "type": { "type": "reference", - "target": 1715, + "target": 44, "typeArguments": [ { "type": "reference", - "target": 1728, + "target": 57, "name": "CurrencyDTO", "package": "@medusajs/types" } @@ -821,7 +821,7 @@ } }, { - "id": 1677, + "id": 6, "name": "sharedContext", "variant": "param", "kind": 32768, @@ -838,7 +838,7 @@ }, "type": { "type": "reference", - "target": 1733, + "target": 62, "name": "Context", "package": "@medusajs/types" } @@ -853,7 +853,7 @@ "typeArguments": [ { "type": "reference", - "target": 1728, + "target": 57, "name": "CurrencyDTO", "package": "@medusajs/types" } @@ -865,14 +865,14 @@ ] }, { - "id": 1678, + "id": 7, "name": "listCurrencies", "variant": "declaration", "kind": 2048, "flags": {}, "signatures": [ { - "id": 1679, + "id": 8, "name": "listCurrencies", "variant": "signature", "kind": 4096, @@ -951,7 +951,7 @@ }, "parameters": [ { - "id": 1680, + "id": 9, "name": "filters", "variant": "param", "kind": 32768, @@ -968,13 +968,13 @@ }, "type": { "type": "reference", - "target": 1745, + "target": 74, "name": "FilterableCurrencyProps", "package": "@medusajs/types" } }, { - "id": 1681, + "id": 10, "name": "config", "variant": "param", "kind": 32768, @@ -1007,11 +1007,11 @@ }, "type": { "type": "reference", - "target": 1715, + "target": 44, "typeArguments": [ { "type": "reference", - "target": 1728, + "target": 57, "name": "CurrencyDTO", "package": "@medusajs/types" } @@ -1021,7 +1021,7 @@ } }, { - "id": 1682, + "id": 11, "name": "sharedContext", "variant": "param", "kind": 32768, @@ -1038,7 +1038,7 @@ }, "type": { "type": "reference", - "target": 1733, + "target": 62, "name": "Context", "package": "@medusajs/types" } @@ -1055,7 +1055,7 @@ "type": "array", "elementType": { "type": "reference", - "target": 1728, + "target": 57, "name": "CurrencyDTO", "package": "@medusajs/types" } @@ -1068,14 +1068,14 @@ ] }, { - "id": 1683, + "id": 12, "name": "listAndCountCurrencies", "variant": "declaration", "kind": 2048, "flags": {}, "signatures": [ { - "id": 1684, + "id": 13, "name": "listAndCountCurrencies", "variant": "signature", "kind": 4096, @@ -1154,7 +1154,7 @@ }, "parameters": [ { - "id": 1685, + "id": 14, "name": "filters", "variant": "param", "kind": 32768, @@ -1171,13 +1171,13 @@ }, "type": { "type": "reference", - "target": 1745, + "target": 74, "name": "FilterableCurrencyProps", "package": "@medusajs/types" } }, { - "id": 1686, + "id": 15, "name": "config", "variant": "param", "kind": 32768, @@ -1210,11 +1210,11 @@ }, "type": { "type": "reference", - "target": 1715, + "target": 44, "typeArguments": [ { "type": "reference", - "target": 1728, + "target": 57, "name": "CurrencyDTO", "package": "@medusajs/types" } @@ -1224,7 +1224,7 @@ } }, { - "id": 1687, + "id": 16, "name": "sharedContext", "variant": "param", "kind": 32768, @@ -1241,7 +1241,7 @@ }, "type": { "type": "reference", - "target": 1733, + "target": 62, "name": "Context", "package": "@medusajs/types" } @@ -1261,7 +1261,7 @@ "type": "array", "elementType": { "type": "reference", - "target": 1728, + "target": 57, "name": "CurrencyDTO", "package": "@medusajs/types" } @@ -1284,23 +1284,23 @@ { "title": "Methods", "children": [ - 1673, - 1678, - 1683 + 2, + 7, + 12 ] } ], "extendedTypes": [ { "type": "reference", - "target": 1701, + "target": 30, "name": "IModuleService", "package": "@medusajs/types" } ] }, { - "id": 1788, + "id": 117, "name": "BaseFilterable", "variant": "declaration", "kind": 256, @@ -1315,7 +1315,7 @@ }, "children": [ { - "id": 1789, + "id": 118, "name": "$and", "variant": "declaration", "kind": 1024, @@ -1337,11 +1337,11 @@ "types": [ { "type": "reference", - "target": 1788, + "target": 117, "typeArguments": [ { "type": "reference", - "target": 1791, + "target": 120, "name": "T", "package": "@medusajs/types", "qualifiedName": "BaseFilterable.T", @@ -1353,7 +1353,7 @@ }, { "type": "reference", - "target": 1791, + "target": 120, "name": "T", "package": "@medusajs/types", "qualifiedName": "BaseFilterable.T", @@ -1364,7 +1364,7 @@ } }, { - "id": 1790, + "id": 119, "name": "$or", "variant": "declaration", "kind": 1024, @@ -1386,11 +1386,11 @@ "types": [ { "type": "reference", - "target": 1788, + "target": 117, "typeArguments": [ { "type": "reference", - "target": 1791, + "target": 120, "name": "T", "package": "@medusajs/types", "qualifiedName": "BaseFilterable.T", @@ -1402,7 +1402,7 @@ }, { "type": "reference", - "target": 1791, + "target": 120, "name": "T", "package": "@medusajs/types", "qualifiedName": "BaseFilterable.T", @@ -1417,14 +1417,14 @@ { "title": "Properties", "children": [ - 1789, - 1790 + 118, + 119 ] } ], "typeParameters": [ { - "id": 1791, + "id": 120, "name": "T", "variant": "typeParam", "kind": 131072, @@ -1434,13 +1434,13 @@ "extendedBy": [ { "type": "reference", - "target": 1745, + "target": 74, "name": "FilterableCurrencyProps" } ] }, { - "id": 1853, + "id": 182, "name": "EventMetadata", "variant": "declaration", "kind": 2097152, @@ -1470,14 +1470,14 @@ { "type": "reflection", "declaration": { - "id": 1854, + "id": 183, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1855, + "id": 184, "name": "eventGroupId", "variant": "declaration", "kind": 1024, @@ -1494,7 +1494,7 @@ { "title": "Properties", "children": [ - 1855 + 184 ] } ] @@ -1504,14 +1504,14 @@ } }, { - "id": 1847, + "id": 176, "name": "MessageBody", "variant": "declaration", "kind": 2097152, "flags": {}, "typeParameters": [ { - "id": 1852, + "id": 181, "name": "TData", "variant": "typeParam", "kind": 131072, @@ -1525,14 +1525,14 @@ "type": { "type": "reflection", "declaration": { - "id": 1848, + "id": 177, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1849, + "id": 178, "name": "eventName", "variant": "declaration", "kind": 1024, @@ -1543,7 +1543,7 @@ } }, { - "id": 1850, + "id": 179, "name": "metadata", "variant": "declaration", "kind": 1024, @@ -1552,20 +1552,20 @@ }, "type": { "type": "reference", - "target": 1853, + "target": 182, "name": "EventMetadata", "package": "@medusajs/types" } }, { - "id": 1851, + "id": 180, "name": "data", "variant": "declaration", "kind": 1024, "flags": {}, "type": { "type": "reference", - "target": 1852, + "target": 181, "name": "TData", "package": "@medusajs/types", "refersToTypeParameter": true @@ -1576,9 +1576,9 @@ { "title": "Properties", "children": [ - 1849, - 1850, - 1851 + 178, + 179, + 180 ] } ] @@ -1586,14 +1586,14 @@ } }, { - "id": 1815, + "id": 144, "name": "Message", "variant": "declaration", "kind": 2097152, "flags": {}, "typeParameters": [ { - "id": 1818, + "id": 147, "name": "TData", "variant": "typeParam", "kind": 131072, @@ -1609,11 +1609,11 @@ "types": [ { "type": "reference", - "target": 1847, + "target": 176, "typeArguments": [ { "type": "reference", - "target": 1818, + "target": 147, "name": "TData", "package": "@medusajs/types", "refersToTypeParameter": true @@ -1625,14 +1625,14 @@ { "type": "reflection", "declaration": { - "id": 1816, + "id": 145, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1817, + "id": 146, "name": "options", "variant": "declaration", "kind": 1024, @@ -1664,7 +1664,7 @@ { "title": "Properties", "children": [ - 1817 + 146 ] } ] @@ -1674,14 +1674,14 @@ } }, { - "id": 1825, + "id": 154, "name": "RawMessageFormat", "variant": "declaration", "kind": 2097152, "flags": {}, "typeParameters": [ { - "id": 1834, + "id": 163, "name": "TData", "variant": "typeParam", "kind": 131072, @@ -1695,14 +1695,14 @@ "type": { "type": "reflection", "declaration": { - "id": 1826, + "id": 155, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1827, + "id": 156, "name": "eventName", "variant": "declaration", "kind": 1024, @@ -1713,21 +1713,21 @@ } }, { - "id": 1828, + "id": 157, "name": "data", "variant": "declaration", "kind": 1024, "flags": {}, "type": { "type": "reference", - "target": 1834, + "target": 163, "name": "TData", "package": "@medusajs/types", "refersToTypeParameter": true } }, { - "id": 1829, + "id": 158, "name": "source", "variant": "declaration", "kind": 1024, @@ -1738,7 +1738,7 @@ } }, { - "id": 1830, + "id": 159, "name": "object", "variant": "declaration", "kind": 1024, @@ -1749,7 +1749,7 @@ } }, { - "id": 1831, + "id": 160, "name": "action", "variant": "declaration", "kind": 1024, @@ -1762,7 +1762,7 @@ } }, { - "id": 1832, + "id": 161, "name": "context", "variant": "declaration", "kind": 1024, @@ -1778,7 +1778,7 @@ "typeArguments": [ { "type": "reference", - "target": 1733, + "target": 62, "name": "Context", "package": "@medusajs/types" }, @@ -1792,7 +1792,7 @@ } }, { - "id": 1833, + "id": 162, "name": "options", "variant": "declaration", "kind": 1024, @@ -1824,13 +1824,13 @@ { "title": "Properties", "children": [ - 1827, - 1828, - 1829, - 1830, - 1831, - 1832, - 1833 + 156, + 157, + 158, + 159, + 160, + 161, + 162 ] } ] @@ -1838,7 +1838,7 @@ } }, { - "id": 1838, + "id": 167, "name": "JoinerRelationship", "variant": "declaration", "kind": 2097152, @@ -1846,14 +1846,14 @@ "type": { "type": "reflection", "declaration": { - "id": 1839, + "id": 168, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1840, + "id": 169, "name": "alias", "variant": "declaration", "kind": 1024, @@ -1864,7 +1864,7 @@ } }, { - "id": 1841, + "id": 170, "name": "foreignKey", "variant": "declaration", "kind": 1024, @@ -1875,7 +1875,7 @@ } }, { - "id": 1842, + "id": 171, "name": "primaryKey", "variant": "declaration", "kind": 1024, @@ -1886,7 +1886,7 @@ } }, { - "id": 1843, + "id": 172, "name": "serviceName", "variant": "declaration", "kind": 1024, @@ -1897,7 +1897,7 @@ } }, { - "id": 1844, + "id": 173, "name": "inverse", "variant": "declaration", "kind": 1024, @@ -1918,7 +1918,7 @@ } }, { - "id": 1845, + "id": 174, "name": "isList", "variant": "declaration", "kind": 1024, @@ -1939,7 +1939,7 @@ } }, { - "id": 1846, + "id": 175, "name": "args", "variant": "declaration", "kind": 1024, @@ -1979,13 +1979,13 @@ { "title": "Properties", "children": [ - 1840, - 1841, - 1842, - 1843, - 1844, - 1845, - 1846 + 169, + 170, + 171, + 172, + 173, + 174, + 175 ] } ] @@ -1993,14 +1993,14 @@ } }, { - "id": 1835, + "id": 164, "name": "JoinerServiceConfigAlias", "variant": "declaration", "kind": 256, "flags": {}, "children": [ { - "id": 1836, + "id": 165, "name": "name", "variant": "declaration", "kind": 1024, @@ -2023,7 +2023,7 @@ } }, { - "id": 1837, + "id": 166, "name": "args", "variant": "declaration", "kind": 1024, @@ -2063,21 +2063,21 @@ { "title": "Properties", "children": [ - 1836, - 1837 + 165, + 166 ] } ] }, { - "id": 1792, + "id": 121, "name": "JoinerServiceConfig", "variant": "declaration", "kind": 256, "flags": {}, "children": [ { - "id": 1793, + "id": 122, "name": "serviceName", "variant": "declaration", "kind": 1024, @@ -2088,7 +2088,7 @@ } }, { - "id": 1794, + "id": 123, "name": "alias", "variant": "declaration", "kind": 1024, @@ -2108,7 +2108,7 @@ "types": [ { "type": "reference", - "target": 1835, + "target": 164, "name": "JoinerServiceConfigAlias", "package": "@medusajs/types" }, @@ -2116,7 +2116,7 @@ "type": "array", "elementType": { "type": "reference", - "target": 1835, + "target": 164, "name": "JoinerServiceConfigAlias", "package": "@medusajs/types" } @@ -2125,7 +2125,7 @@ } }, { - "id": 1795, + "id": 124, "name": "fieldAlias", "variant": "declaration", "kind": 1024, @@ -2161,14 +2161,14 @@ { "type": "reflection", "declaration": { - "id": 1796, + "id": 125, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1797, + "id": 126, "name": "path", "variant": "declaration", "kind": 1024, @@ -2179,7 +2179,7 @@ } }, { - "id": 1798, + "id": 127, "name": "forwardArgumentsOnPath", "variant": "declaration", "kind": 1024, @@ -2197,8 +2197,8 @@ { "title": "Properties", "children": [ - 1797, - 1798 + 126, + 127 ] } ] @@ -2212,7 +2212,7 @@ } }, { - "id": 1799, + "id": 128, "name": "primaryKeys", "variant": "declaration", "kind": 1024, @@ -2226,7 +2226,7 @@ } }, { - "id": 1800, + "id": 129, "name": "relationships", "variant": "declaration", "kind": 1024, @@ -2237,14 +2237,14 @@ "type": "array", "elementType": { "type": "reference", - "target": 1838, + "target": 167, "name": "JoinerRelationship", "package": "@medusajs/types" } } }, { - "id": 1801, + "id": 130, "name": "extends", "variant": "declaration", "kind": 1024, @@ -2256,14 +2256,14 @@ "elementType": { "type": "reflection", "declaration": { - "id": 1802, + "id": 131, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1803, + "id": 132, "name": "serviceName", "variant": "declaration", "kind": 1024, @@ -2274,14 +2274,14 @@ } }, { - "id": 1804, + "id": 133, "name": "relationship", "variant": "declaration", "kind": 1024, "flags": {}, "type": { "type": "reference", - "target": 1838, + "target": 167, "name": "JoinerRelationship", "package": "@medusajs/types" } @@ -2291,8 +2291,8 @@ { "title": "Properties", "children": [ - 1803, - 1804 + 132, + 133 ] } ] @@ -2301,7 +2301,7 @@ } }, { - "id": 1805, + "id": 134, "name": "args", "variant": "declaration", "kind": 1024, @@ -2341,19 +2341,19 @@ { "title": "Properties", "children": [ - 1793, - 1794, - 1795, - 1799, - 1800, - 1801, - 1805 + 122, + 123, + 124, + 128, + 129, + 130, + 134 ] } ] }, { - "id": 1809, + "id": 138, "name": "LinkModulesExtraFields", "variant": "declaration", "kind": 2097152, @@ -2372,14 +2372,14 @@ { "type": "reflection", "declaration": { - "id": 1810, + "id": 139, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1811, + "id": 140, "name": "type", "variant": "declaration", "kind": 1024, @@ -2475,7 +2475,7 @@ } }, { - "id": 1812, + "id": 141, "name": "defaultValue", "variant": "declaration", "kind": 1024, @@ -2488,7 +2488,7 @@ } }, { - "id": 1813, + "id": 142, "name": "nullable", "variant": "declaration", "kind": 1024, @@ -2501,7 +2501,7 @@ } }, { - "id": 1814, + "id": 143, "name": "options", "variant": "declaration", "kind": 1024, @@ -2541,10 +2541,10 @@ { "title": "Properties", "children": [ - 1811, - 1812, - 1813, - 1814 + 140, + 141, + 142, + 143 ] } ] @@ -2556,7 +2556,7 @@ } }, { - "id": 1750, + "id": 79, "name": "ModuleJoinerConfig", "variant": "declaration", "kind": 2097152, @@ -2573,7 +2573,7 @@ "typeArguments": [ { "type": "reference", - "target": 1792, + "target": 121, "name": "JoinerServiceConfig", "package": "@medusajs/types" }, @@ -2605,14 +2605,14 @@ { "type": "reflection", "declaration": { - "id": 1751, + "id": 80, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1752, + "id": 81, "name": "schema", "variant": "declaration", "kind": 1024, @@ -2633,7 +2633,7 @@ } }, { - "id": 1753, + "id": 82, "name": "relationships", "variant": "declaration", "kind": 1024, @@ -2644,14 +2644,14 @@ "type": "array", "elementType": { "type": "reference", - "target": 1806, + "target": 135, "name": "ModuleJoinerRelationship", "package": "@medusajs/types" } } }, { - "id": 1754, + "id": 83, "name": "extends", "variant": "declaration", "kind": 1024, @@ -2663,14 +2663,14 @@ "elementType": { "type": "reflection", "declaration": { - "id": 1755, + "id": 84, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1756, + "id": 85, "name": "serviceName", "variant": "declaration", "kind": 1024, @@ -2681,7 +2681,7 @@ } }, { - "id": 1757, + "id": 86, "name": "fieldAlias", "variant": "declaration", "kind": 1024, @@ -2709,14 +2709,14 @@ { "type": "reflection", "declaration": { - "id": 1758, + "id": 87, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1759, + "id": 88, "name": "path", "variant": "declaration", "kind": 1024, @@ -2727,7 +2727,7 @@ } }, { - "id": 1760, + "id": 89, "name": "forwardArgumentsOnPath", "variant": "declaration", "kind": 1024, @@ -2743,7 +2743,7 @@ } }, { - "id": 1761, + "id": 90, "name": "isList", "variant": "declaration", "kind": 1024, @@ -2760,9 +2760,9 @@ { "title": "Properties", "children": [ - 1759, - 1760, - 1761 + 88, + 89, + 90 ] } ] @@ -2776,14 +2776,14 @@ } }, { - "id": 1762, + "id": 91, "name": "relationship", "variant": "declaration", "kind": 1024, "flags": {}, "type": { "type": "reference", - "target": 1806, + "target": 135, "name": "ModuleJoinerRelationship", "package": "@medusajs/types" } @@ -2793,9 +2793,9 @@ { "title": "Properties", "children": [ - 1756, - 1757, - 1762 + 85, + 86, + 91 ] } ] @@ -2804,7 +2804,7 @@ } }, { - "id": 1763, + "id": 92, "name": "serviceName", "variant": "declaration", "kind": 1024, @@ -2817,7 +2817,7 @@ } }, { - "id": 1764, + "id": 93, "name": "primaryKeys", "variant": "declaration", "kind": 1024, @@ -2833,7 +2833,7 @@ } }, { - "id": 1765, + "id": 94, "name": "isLink", "variant": "declaration", "kind": 1024, @@ -2854,7 +2854,7 @@ } }, { - "id": 1766, + "id": 95, "name": "linkableKeys", "variant": "declaration", "kind": 1024, @@ -2890,7 +2890,7 @@ } }, { - "id": 1767, + "id": 96, "name": "isReadOnlyLink", "variant": "declaration", "kind": 1024, @@ -2911,7 +2911,7 @@ } }, { - "id": 1768, + "id": 97, "name": "extraDataFields", "variant": "declaration", "kind": 1024, @@ -2935,7 +2935,7 @@ } }, { - "id": 1769, + "id": 98, "name": "databaseConfig", "variant": "declaration", "kind": 1024, @@ -2945,14 +2945,14 @@ "type": { "type": "reflection", "declaration": { - "id": 1770, + "id": 99, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1771, + "id": 100, "name": "tableName", "variant": "declaration", "kind": 1024, @@ -2973,7 +2973,7 @@ } }, { - "id": 1772, + "id": 101, "name": "idPrefix", "variant": "declaration", "kind": 1024, @@ -2994,7 +2994,7 @@ } }, { - "id": 1773, + "id": 102, "name": "extraFields", "variant": "declaration", "kind": 1024, @@ -3003,7 +3003,7 @@ }, "type": { "type": "reference", - "target": 1809, + "target": 138, "name": "LinkModulesExtraFields", "package": "@medusajs/types" } @@ -3013,9 +3013,9 @@ { "title": "Properties", "children": [ - 1771, - 1772, - 1773 + 100, + 101, + 102 ] } ] @@ -3027,16 +3027,16 @@ { "title": "Properties", "children": [ - 1752, - 1753, - 1754, - 1763, - 1764, - 1765, - 1766, - 1767, - 1768, - 1769 + 81, + 82, + 83, + 92, + 93, + 94, + 95, + 96, + 97, + 98 ] } ] @@ -3046,7 +3046,7 @@ } }, { - "id": 1806, + "id": 135, "name": "ModuleJoinerRelationship", "variant": "declaration", "kind": 2097152, @@ -3056,21 +3056,21 @@ "types": [ { "type": "reference", - "target": 1838, + "target": 167, "name": "JoinerRelationship", "package": "@medusajs/types" }, { "type": "reflection", "declaration": { - "id": 1807, + "id": 136, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 1808, + "id": 137, "name": "deleteCascade", "variant": "declaration", "kind": 1024, @@ -3095,7 +3095,7 @@ { "title": "Properties", "children": [ - 1808 + 137 ] } ] @@ -3105,7 +3105,7 @@ } }, { - "id": 1701, + "id": 30, "name": "IModuleService", "variant": "declaration", "kind": 256, @@ -3113,20 +3113,20 @@ "extendedBy": [ { "type": "reference", - "target": 1672, + "target": 1, "name": "ICurrencyModuleService" } ] }, { - "id": 1819, + "id": 148, "name": "MessageAggregatorFormat", "variant": "declaration", "kind": 256, "flags": {}, "children": [ { - "id": 1820, + "id": 149, "name": "groupBy", "variant": "declaration", "kind": 1024, @@ -3142,7 +3142,7 @@ } }, { - "id": 1821, + "id": 150, "name": "sortBy", "variant": "declaration", "kind": 1024, @@ -3152,21 +3152,21 @@ "type": { "type": "reflection", "declaration": { - "id": 1822, + "id": 151, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "indexSignatures": [ { - "id": 1823, + "id": 152, "name": "__index", "variant": "signature", "kind": 8192, "flags": {}, "parameters": [ { - "id": 1824, + "id": 153, "name": "key", "variant": "param", "kind": 32768, @@ -3207,35 +3207,35 @@ { "title": "Properties", "children": [ - 1820, - 1821 + 149, + 150 ] } ] }, { - "id": 1774, + "id": 103, "name": "IMessageAggregator", "variant": "declaration", "kind": 256, "flags": {}, "children": [ { - "id": 1775, + "id": 104, "name": "save", "variant": "declaration", "kind": 2048, "flags": {}, "signatures": [ { - "id": 1776, + "id": 105, "name": "save", "variant": "signature", "kind": 4096, "flags": {}, "parameters": [ { - "id": 1777, + "id": 106, "name": "msg", "variant": "param", "kind": 32768, @@ -3245,7 +3245,7 @@ "types": [ { "type": "reference", - "target": 1815, + "target": 144, "name": "Message", "package": "@medusajs/types" }, @@ -3253,7 +3253,7 @@ "type": "array", "elementType": { "type": "reference", - "target": 1815, + "target": 144, "name": "Message", "package": "@medusajs/types" } @@ -3270,21 +3270,21 @@ ] }, { - "id": 1778, + "id": 107, "name": "getMessages", "variant": "declaration", "kind": 2048, "flags": {}, "signatures": [ { - "id": 1779, + "id": 108, "name": "getMessages", "variant": "signature", "kind": 4096, "flags": {}, "parameters": [ { - "id": 1780, + "id": 109, "name": "format", "variant": "param", "kind": 32768, @@ -3293,7 +3293,7 @@ }, "type": { "type": "reference", - "target": 1819, + "target": 148, "name": "MessageAggregatorFormat", "package": "@medusajs/types" } @@ -3314,7 +3314,7 @@ "type": "array", "elementType": { "type": "reference", - "target": 1815, + "target": 144, "name": "Message", "package": "@medusajs/types" } @@ -3327,14 +3327,14 @@ ] }, { - "id": 1781, + "id": 110, "name": "clearMessages", "variant": "declaration", "kind": 2048, "flags": {}, "signatures": [ { - "id": 1782, + "id": 111, "name": "clearMessages", "variant": "signature", "kind": 4096, @@ -3347,21 +3347,21 @@ ] }, { - "id": 1783, + "id": 112, "name": "saveRawMessageData", "variant": "declaration", "kind": 2048, "flags": {}, "signatures": [ { - "id": 1784, + "id": 113, "name": "saveRawMessageData", "variant": "signature", "kind": 4096, "flags": {}, "typeParameters": [ { - "id": 1785, + "id": 114, "name": "T", "variant": "typeParam", "kind": 131072, @@ -3370,7 +3370,7 @@ ], "parameters": [ { - "id": 1786, + "id": 115, "name": "messageData", "variant": "param", "kind": 32768, @@ -3380,11 +3380,11 @@ "types": [ { "type": "reference", - "target": 1825, + "target": 154, "typeArguments": [ { "type": "reference", - "target": 1785, + "target": 114, "name": "T", "package": "@medusajs/types", "refersToTypeParameter": true @@ -3397,11 +3397,11 @@ "type": "array", "elementType": { "type": "reference", - "target": 1825, + "target": 154, "typeArguments": [ { "type": "reference", - "target": 1785, + "target": 114, "name": "T", "package": "@medusajs/types", "refersToTypeParameter": true @@ -3415,7 +3415,7 @@ } }, { - "id": 1787, + "id": 116, "name": "options", "variant": "param", "kind": 32768, @@ -3455,16 +3455,16 @@ { "title": "Methods", "children": [ - 1775, - 1778, - 1781, - 1783 + 104, + 107, + 110, + 112 ] } ] }, { - "id": 1733, + "id": 62, "name": "Context", "variant": "declaration", "kind": 256, @@ -3479,7 +3479,7 @@ }, "children": [ { - "id": 1734, + "id": 63, "name": "__type", "variant": "declaration", "kind": 1024, @@ -3492,7 +3492,7 @@ } }, { - "id": 1735, + "id": 64, "name": "transactionManager", "variant": "declaration", "kind": 1024, @@ -3525,14 +3525,14 @@ }, "type": { "type": "reference", - "target": 1744, + "target": 73, "name": "TManager", "package": "@medusajs/types", "refersToTypeParameter": true } }, { - "id": 1736, + "id": 65, "name": "manager", "variant": "declaration", "kind": 1024, @@ -3565,14 +3565,14 @@ }, "type": { "type": "reference", - "target": 1744, + "target": 73, "name": "TManager", "package": "@medusajs/types", "refersToTypeParameter": true } }, { - "id": 1737, + "id": 66, "name": "isolationLevel", "variant": "declaration", "kind": 1024, @@ -3625,7 +3625,7 @@ } }, { - "id": 1738, + "id": 67, "name": "enableNestedTransactions", "variant": "declaration", "kind": 1024, @@ -3646,7 +3646,7 @@ } }, { - "id": 1739, + "id": 68, "name": "eventGroupId", "variant": "declaration", "kind": 1024, @@ -3667,7 +3667,7 @@ } }, { - "id": 1740, + "id": 69, "name": "transactionId", "variant": "declaration", "kind": 1024, @@ -3688,7 +3688,7 @@ } }, { - "id": 1741, + "id": 70, "name": "messageAggregator", "variant": "declaration", "kind": 1024, @@ -3705,13 +3705,13 @@ }, "type": { "type": "reference", - "target": 1774, + "target": 103, "name": "IMessageAggregator", "package": "@medusajs/types" } }, { - "id": 1742, + "id": 71, "name": "requestId", "variant": "declaration", "kind": 1024, @@ -3732,7 +3732,7 @@ } }, { - "id": 1743, + "id": 72, "name": "idempotencyKey", "variant": "declaration", "kind": 1024, @@ -3757,22 +3757,22 @@ { "title": "Properties", "children": [ - 1734, - 1735, - 1736, - 1737, - 1738, - 1739, - 1740, - 1741, - 1742, - 1743 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ] } ], "typeParameters": [ { - "id": 1744, + "id": 73, "name": "TManager", "variant": "typeParam", "kind": 131072, @@ -3789,660 +3789,660 @@ { "title": "Interfaces", "children": [ - 1715, - 1728, - 1745, - 1672, - 1788, - 1835, - 1792, - 1701, - 1819, - 1774, - 1733 + 44, + 57, + 74, + 1, + 117, + 164, + 121, + 30, + 148, + 103, + 62 ] }, { "title": "Type Aliases", "children": [ - 1853, - 1847, - 1815, - 1825, - 1838, - 1809, - 1750, - 1806 + 182, + 176, + 144, + 154, + 167, + 138, + 79, + 135 ] } ], "packageName": "@medusajs/types", "symbolIdMap": { - "1671": { + "0": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "" }, - "1672": { + "1": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "ICurrencyModuleService" }, - "1673": { + "2": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "ICurrencyModuleService.retrieveCurrency" }, - "1674": { + "3": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "ICurrencyModuleService.retrieveCurrency" }, - "1675": { + "4": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "code" }, - "1676": { + "5": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "config" }, - "1677": { + "6": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "sharedContext" }, - "1678": { + "7": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "ICurrencyModuleService.listCurrencies" }, - "1679": { + "8": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "ICurrencyModuleService.listCurrencies" }, - "1680": { + "9": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "filters" }, - "1681": { + "10": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "config" }, - "1682": { + "11": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "sharedContext" }, - "1683": { + "12": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "ICurrencyModuleService.listAndCountCurrencies" }, - "1684": { + "13": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "ICurrencyModuleService.listAndCountCurrencies" }, - "1685": { + "14": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "filters" }, - "1686": { + "15": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "config" }, - "1687": { + "16": { "sourceFileName": "../../../../packages/core/types/src/currency/service.ts", "qualifiedName": "sharedContext" }, - "1701": { + "30": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "IModuleService" }, - "1715": { + "44": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig" }, - "1716": { + "45": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.select" }, - "1717": { + "46": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.skip" }, - "1718": { + "47": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.take" }, - "1719": { + "48": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.relations" }, - "1720": { + "49": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.order" }, - "1721": { + "50": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "__type" }, - "1722": { + "51": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "__type.__index" }, - "1724": { + "53": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.withDeleted" }, - "1725": { + "54": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.filters" }, - "1726": { + "55": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.options" }, - "1727": { + "56": { "sourceFileName": "../../../../packages/core/types/src/common/common.ts", "qualifiedName": "FindConfig.Entity" }, - "1728": { + "57": { "sourceFileName": "../../../../packages/core/types/src/currency/common/currency.ts", "qualifiedName": "CurrencyDTO" }, - "1729": { + "58": { "sourceFileName": "../../../../packages/core/types/src/currency/common/currency.ts", "qualifiedName": "CurrencyDTO.code" }, - "1730": { + "59": { "sourceFileName": "../../../../packages/core/types/src/currency/common/currency.ts", "qualifiedName": "CurrencyDTO.symbol" }, - "1731": { + "60": { "sourceFileName": "../../../../packages/core/types/src/currency/common/currency.ts", "qualifiedName": "CurrencyDTO.symbol_native" }, - "1732": { + "61": { "sourceFileName": "../../../../packages/core/types/src/currency/common/currency.ts", "qualifiedName": "CurrencyDTO.name" }, - "1733": { + "62": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "Context" }, - "1734": { + "63": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.__type" }, - "1735": { + "64": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.transactionManager" }, - "1736": { + "65": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.manager" }, - "1737": { + "66": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.isolationLevel" }, - "1738": { + "67": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.enableNestedTransactions" }, - "1739": { + "68": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.eventGroupId" }, - "1740": { + "69": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.transactionId" }, - "1741": { + "70": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.messageAggregator" }, - "1742": { + "71": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.requestId" }, - "1743": { + "72": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.idempotencyKey" }, - "1744": { + "73": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "TManager" }, - "1745": { + "74": { "sourceFileName": "../../../../packages/core/types/src/currency/common/currency.ts", "qualifiedName": "FilterableCurrencyProps" }, - "1746": { + "75": { "sourceFileName": "../../../../packages/core/types/src/currency/common/currency.ts", "qualifiedName": "FilterableCurrencyProps.q" }, - "1747": { + "76": { "sourceFileName": "../../../../packages/core/types/src/currency/common/currency.ts", "qualifiedName": "FilterableCurrencyProps.code" }, - "1748": { + "77": { "sourceFileName": "../../../../packages/core/types/src/dal/index.ts", "qualifiedName": "BaseFilterable.$and" }, - "1749": { + "78": { "sourceFileName": "../../../../packages/core/types/src/dal/index.ts", "qualifiedName": "BaseFilterable.$or" }, - "1750": { + "79": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "ModuleJoinerConfig" }, - "1751": { + "80": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type" }, - "1752": { + "81": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.schema" }, - "1753": { + "82": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.relationships" }, - "1754": { + "83": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.extends" }, - "1755": { + "84": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type" }, - "1756": { + "85": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.serviceName" }, - "1757": { + "86": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.fieldAlias" }, - "1758": { + "87": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type" }, - "1759": { + "88": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.path" }, - "1760": { + "89": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.forwardArgumentsOnPath" }, - "1761": { + "90": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.isList" }, - "1762": { + "91": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.relationship" }, - "1763": { + "92": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.serviceName" }, - "1764": { + "93": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.primaryKeys" }, - "1765": { + "94": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.isLink" }, - "1766": { + "95": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.linkableKeys" }, - "1767": { + "96": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.isReadOnlyLink" }, - "1768": { + "97": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.extraDataFields" }, - "1769": { + "98": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.databaseConfig" }, - "1770": { + "99": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type" }, - "1771": { + "100": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.tableName" }, - "1772": { + "101": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.idPrefix" }, - "1773": { + "102": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.extraFields" }, - "1774": { + "103": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator" }, - "1775": { + "104": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator.save" }, - "1776": { + "105": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator.save" }, - "1777": { + "106": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "msg" }, - "1778": { + "107": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator.getMessages" }, - "1779": { + "108": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator.getMessages" }, - "1780": { + "109": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "format" }, - "1781": { + "110": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator.clearMessages" }, - "1782": { + "111": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator.clearMessages" }, - "1783": { + "112": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator.saveRawMessageData" }, - "1784": { + "113": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "IMessageAggregator.saveRawMessageData" }, - "1785": { + "114": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "T" }, - "1786": { + "115": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "messageData" }, - "1787": { + "116": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "options" }, - "1788": { + "117": { "sourceFileName": "../../../../packages/core/types/src/dal/index.ts", "qualifiedName": "BaseFilterable" }, - "1789": { + "118": { "sourceFileName": "../../../../packages/core/types/src/dal/index.ts", "qualifiedName": "BaseFilterable.$and" }, - "1790": { + "119": { "sourceFileName": "../../../../packages/core/types/src/dal/index.ts", "qualifiedName": "BaseFilterable.$or" }, - "1791": { + "120": { "sourceFileName": "../../../../packages/core/types/src/dal/index.ts", "qualifiedName": "BaseFilterable.T" }, - "1792": { + "121": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfig" }, - "1793": { + "122": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfig.serviceName" }, - "1794": { + "123": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfig.alias" }, - "1795": { + "124": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfig.fieldAlias" }, - "1796": { + "125": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type" }, - "1797": { + "126": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.path" }, - "1798": { + "127": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.forwardArgumentsOnPath" }, - "1799": { + "128": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfig.primaryKeys" }, - "1800": { + "129": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfig.relationships" }, - "1801": { + "130": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfig.extends" }, - "1802": { + "131": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type" }, - "1803": { + "132": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.serviceName" }, - "1804": { + "133": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.relationship" }, - "1805": { + "134": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfig.args" }, - "1806": { + "135": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "ModuleJoinerRelationship" }, - "1807": { + "136": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type" }, - "1808": { + "137": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.deleteCascade" }, - "1809": { + "138": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "LinkModulesExtraFields" }, - "1810": { + "139": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type" }, - "1811": { + "140": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.type" }, - "1812": { + "141": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.defaultValue" }, - "1813": { + "142": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.nullable" }, - "1814": { + "143": { "sourceFileName": "../../../../packages/core/types/src/modules-sdk/index.ts", "qualifiedName": "__type.options" }, - "1815": { + "144": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "Message" }, - "1816": { + "145": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type" }, - "1817": { + "146": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.options" }, - "1818": { + "147": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "TData" }, - "1819": { + "148": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "MessageAggregatorFormat" }, - "1820": { + "149": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "MessageAggregatorFormat.groupBy" }, - "1821": { + "150": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "MessageAggregatorFormat.sortBy" }, - "1822": { + "151": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type" }, - "1823": { + "152": { "sourceFileName": "../../../../packages/core/types/src/shared-context.ts", "qualifiedName": "__type.__index" }, - "1825": { + "154": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "RawMessageFormat" }, - "1826": { + "155": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type" }, - "1827": { + "156": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.eventName" }, - "1828": { + "157": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.data" }, - "1829": { + "158": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.source" }, - "1830": { + "159": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.object" }, - "1831": { + "160": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.action" }, - "1832": { + "161": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.context" }, - "1833": { + "162": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.options" }, - "1834": { + "163": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "TData" }, - "1835": { + "164": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfigAlias" }, - "1836": { + "165": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfigAlias.name" }, - "1837": { + "166": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerServiceConfigAlias.args" }, - "1838": { + "167": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "JoinerRelationship" }, - "1839": { + "168": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type" }, - "1840": { + "169": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.alias" }, - "1841": { + "170": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.foreignKey" }, - "1842": { + "171": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.primaryKey" }, - "1843": { + "172": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.serviceName" }, - "1844": { + "173": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.inverse" }, - "1845": { + "174": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.isList" }, - "1846": { + "175": { "sourceFileName": "../../../../packages/core/types/src/joiner/index.ts", "qualifiedName": "__type.args" }, - "1847": { + "176": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "MessageBody" }, - "1848": { + "177": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type" }, - "1849": { + "178": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.eventName" }, - "1850": { + "179": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.metadata" }, - "1851": { + "180": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.data" }, - "1852": { + "181": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "TData" }, - "1853": { + "182": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "EventMetadata" }, - "1854": { + "183": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type" }, - "1855": { + "184": { "sourceFileName": "../../../../packages/core/types/src/event-bus/common.ts", "qualifiedName": "__type.eventGroupId" } @@ -4452,7 +4452,7 @@ "1": "../../../../packages/core/types/src/currency/service.ts" }, "reflections": { - "1": 1671 + "1": 0 } } } \ No newline at end of file diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/file.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/file.ts index e871238d8d..6706f0abc0 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/file.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/file.ts @@ -4,7 +4,6 @@ const fileOptions: FormattingOptionsType = { "^file/.*AbstractFileProviderService": { reflectionGroups: { Properties: false, - Constructors: false, }, reflectionDescription: `In this document, you’ll learn how to create a file provider module and the methods you must implement in its main service.`, frontmatterData: { diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts index 14044ba5ae..01b5fe0dd9 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts @@ -4,7 +4,6 @@ const notificationOptions: FormattingOptionsType = { "^notification/.*AbstractNotificationProviderService": { reflectionGroups: { Properties: false, - Constructors: false, }, reflectionDescription: `In this document, you’ll learn how to create a notification provider module and the methods you must implement in it.`, frontmatterData: { diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-options.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-options.ts index c8914df309..9ee8209101 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-options.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-options.ts @@ -6,6 +6,7 @@ import { modules } from "./references.js" import { customModuleServiceNames, customModuleTitles, + dmlModules, } from "./references-details.js" import { FormattingOptionType } from "types" import { kebabToCamel, kebabToPascal, kebabToSnake, kebabToTitle } from "utils" @@ -28,7 +29,12 @@ const mergerOptions: Partial = { objectLiteralTypeDeclarationStyle: "component", mdxOutput: true, maxLevel: 3, - allReflectionsHaveOwnDocument: [...modules, "dml", "workflows"], + allReflectionsHaveOwnDocument: [ + ...modules, + ...dmlModules.map((module) => `${module}-models`), + "dml", + "workflows", + ], allReflectionsHaveOwnDocumentInNamespace: ["Utilities"], formatting: { "*": { @@ -55,6 +61,8 @@ const mergerOptions: Partial = { ) ? customModuleServiceNames[moduleName] : `I${kebabToPascal(moduleName)}ModuleService` + const isDmlModule = dmlModules.includes(moduleName) + return Object.assign(obj, { // module config [`^${snakeCaseModuleName}`]: { @@ -107,11 +115,15 @@ const mergerOptions: Partial = { typeParameters: false, suffix: `- ${titleModuleName} Module Data Models Reference`, }, - reflectionGroups: { - Constructors: false, - Functions: false, - Methods: false, - }, + reflectionGroups: isDmlModule + ? { + Variables: true, + } + : { + Constructors: false, + Functions: false, + Methods: false, + }, }, [`^modules/${snakeCaseModuleName}_models`]: { reflectionDescription: `This documentation provides a reference to the data models in the ${titleModuleName} Module`, @@ -122,6 +134,11 @@ const mergerOptions: Partial = { reflectionTitle: { fullReplacement: `${titleModuleName} Module Data Models Reference`, }, + reflectionGroupRename: isDmlModule + ? { + Variables: "Data Models", + } + : {}, }, } as FormattingOptionType) }, {} as FormattingOptionType), diff --git a/www/utils/packages/typedoc-generate-references/src/constants/references-details.ts b/www/utils/packages/typedoc-generate-references/src/constants/references-details.ts index bbcf14a654..f593a87c61 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/references-details.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/references-details.ts @@ -23,3 +23,6 @@ export const customModulesOptions: Record> = { ), }, } + +// a list of modules that now support DML +export const dmlModules = ["currency"] diff --git a/www/utils/packages/typedoc-generate-references/src/utils/get-model-options.ts b/www/utils/packages/typedoc-generate-references/src/utils/get-model-options.ts index ba5be1377e..e79eaab775 100644 --- a/www/utils/packages/typedoc-generate-references/src/utils/get-model-options.ts +++ b/www/utils/packages/typedoc-generate-references/src/utils/get-model-options.ts @@ -18,6 +18,10 @@ export default function getModelOptions({ tsConfigName: `${moduleName}.json`, generateModelsDiagram: true, diagramAddToFile: entryPath, + resolveDmlRelations: true, + generateDMLsDiagram: true, + diagramDMLAddToFile: entryPath, + normalizeDmlTypes: true, ...typedocOptions, }) } diff --git a/www/utils/packages/typedoc-plugin-custom/src/constants.ts b/www/utils/packages/typedoc-plugin-custom/src/constants.ts new file mode 100644 index 0000000000..a6d78df99b --- /dev/null +++ b/www/utils/packages/typedoc-plugin-custom/src/constants.ts @@ -0,0 +1 @@ +export const RELATION_NAMES = ["HasOne", "HasMany", "BelongsTo", "ManyToMany"] diff --git a/www/utils/packages/typedoc-plugin-custom/src/dml-relations-resolver.ts b/www/utils/packages/typedoc-plugin-custom/src/dml-relations-resolver.ts new file mode 100644 index 0000000000..35719e05b3 --- /dev/null +++ b/www/utils/packages/typedoc-plugin-custom/src/dml-relations-resolver.ts @@ -0,0 +1,111 @@ +import { + Application, + Context, + Converter, + DeclarationReflection, + ParameterType, + ReferenceType, +} from "typedoc" +import { getDmlProperties, isDmlEntity } from "utils" +import { RELATION_NAMES } from "./constants" + +export class DmlRelationsResolver { + private app: Application + private dmlReflectionsAndProperties: { + reflection: DeclarationReflection + properties: DeclarationReflection[] + }[] + + constructor(app: Application) { + this.app = app + this.dmlReflectionsAndProperties = [] + + this.app.options.addDeclaration({ + name: "resolveDmlRelations", + help: "Whether to enable resolving DML relations.", + type: ParameterType.Boolean, + defaultValue: false, + }) + + this.app.converter.on( + Converter.EVENT_CREATE_DECLARATION, + this.addReflection.bind(this) + ) + + this.app.converter.on( + Converter.EVENT_RESOLVE_BEGIN, + this.resolveRelations.bind(this) + ) + } + + addReflection(_context: Context, reflection: DeclarationReflection) { + if (!this.app.options.getValue("resolveDmlRelations")) { + return + } + if (isDmlEntity(reflection)) { + this.dmlReflectionsAndProperties?.push({ + reflection, + properties: getDmlProperties(reflection.type as ReferenceType), + }) + } + } + + resolveRelations(context: Context) { + if (!this.app.options.getValue("resolveDmlRelations")) { + return + } + this.dmlReflectionsAndProperties.forEach(({ properties }) => { + properties.forEach((property) => { + if ( + property.type?.type !== "reference" || + !RELATION_NAMES.includes(property.type.name) + ) { + return + } + + // try to find the reflection that this relation points to + const relatedReflectionType = property.type.typeArguments?.[0] + if ( + relatedReflectionType?.type !== "reflection" || + !relatedReflectionType.declaration.signatures?.length || + relatedReflectionType.declaration.signatures[0].type?.type !== + "reference" + ) { + return + } + + const relatedReflection = this.findReflectionMatchingProperties( + getDmlProperties(relatedReflectionType.declaration.signatures[0].type) + ) + + if (!relatedReflection) { + return + } + + // replace type argument with reference to related reflection + property.type.typeArguments = [ + ReferenceType.createResolvedReference( + relatedReflection.name, + relatedReflection, + context.project + ), + ] + }) + }) + } + + findReflectionMatchingProperties( + properties: DeclarationReflection[] + ): DeclarationReflection | undefined { + return this.dmlReflectionsAndProperties.find(({ properties: refProps }) => { + return properties.every((property) => { + return refProps.find( + (refProp) => + refProp.name === property.name && + (refProp.type as ReferenceType).name === + (property.type as ReferenceType).name + ) + }) + })?.reflection + } +} diff --git a/www/utils/packages/typedoc-plugin-custom/src/dml-types-normalizer.ts b/www/utils/packages/typedoc-plugin-custom/src/dml-types-normalizer.ts new file mode 100644 index 0000000000..2d0742fda6 --- /dev/null +++ b/www/utils/packages/typedoc-plugin-custom/src/dml-types-normalizer.ts @@ -0,0 +1,69 @@ +import { + Application, + Context, + Converter, + DeclarationReflection, + ParameterType, + ReferenceType, + ReflectionFlag, + ReflectionKind, +} from "typedoc" +import { getDmlProperties, isDmlEntity } from "utils" + +export function load(app: Application) { + app.options.addDeclaration({ + name: "normalizeDmlTypes", + help: "Whether to normalize DML types.", + type: ParameterType.Boolean, + defaultValue: false, + }) + + app.converter.on(Converter.EVENT_RESOLVE_BEGIN, (context: Context) => { + if (!app.options.getValue("normalizeDmlTypes")) { + return + } + + for (const reflection of context.project.getReflectionsByKind( + ReflectionKind.Variable + )) { + if ( + !(reflection instanceof DeclarationReflection) || + !isDmlEntity(reflection) + ) { + break + } + + const properties = getDmlProperties(reflection.type as ReferenceType) + + properties.forEach((property) => { + if (property.type?.type !== "reference") { + return + } + + normalizeNullable(property) + }) + } + }) +} + +function normalizeNullable(property: DeclarationReflection) { + const propertyReference = property.type as ReferenceType + if ( + propertyReference.name !== "NullableModifier" || + !propertyReference.typeArguments || + propertyReference.typeArguments?.length < 2 + ) { + return + } + + const actualType = propertyReference.typeArguments[1] + + if (actualType.type !== "reference") { + return + } + + // change the property's type to reference the actual type + property.type = actualType + // set a flag on the property to consider it optional + property.setFlag(ReflectionFlag.Optional) +} diff --git a/www/utils/packages/typedoc-plugin-custom/src/index.ts b/www/utils/packages/typedoc-plugin-custom/src/index.ts index 702e45b2d3..b625669621 100644 --- a/www/utils/packages/typedoc-plugin-custom/src/index.ts +++ b/www/utils/packages/typedoc-plugin-custom/src/index.ts @@ -8,6 +8,9 @@ import { load as signatureModifierPlugin } from "./signature-modifier" import { MermaidDiagramGenerator } from "./mermaid-diagram-generator" import { load as parentIgnorePlugin } from "./parent-ignore" import { GenerateNamespacePlugin } from "./generate-namespace" +import { DmlRelationsResolver } from "./dml-relations-resolver" +import { load as dmlTypesNormalizer } from "./dml-types-normalizer" +import { MermaidDiagramDMLGenerator } from "./mermaid-diagram-dml-generator" export function load(app: Application) { resolveReferencesPluginLoad(app) @@ -17,7 +20,10 @@ export function load(app: Application) { eslintExamplePlugin(app) signatureModifierPlugin(app) parentIgnorePlugin(app) + dmlTypesNormalizer(app) new GenerateNamespacePlugin(app) new MermaidDiagramGenerator(app) + new DmlRelationsResolver(app) + new MermaidDiagramDMLGenerator(app) } diff --git a/www/utils/packages/typedoc-plugin-custom/src/mermaid-diagram-dml-generator.ts b/www/utils/packages/typedoc-plugin-custom/src/mermaid-diagram-dml-generator.ts new file mode 100644 index 0000000000..7dc2757019 --- /dev/null +++ b/www/utils/packages/typedoc-plugin-custom/src/mermaid-diagram-dml-generator.ts @@ -0,0 +1,251 @@ +import path from "path" +import { + Application, + Comment, + Context, + Converter, + DeclarationReflection, + ParameterType, + ReferenceType, + Reflection, + ReflectionKind, + TypeDocOptionMap, +} from "typedoc" +import { RELATION_NAMES } from "./constants" +import { getDmlProperties, isDmlEntity } from "utils" + +type Relations = Map< + string, + { + target: string + left: MermaidRelationType + right?: MermaidRelationType + name: string + }[] +> + +type PluginOptions = Pick< + TypeDocOptionMap, + "generateModelsDiagram" | "diagramAddToFile" +> + +const ALLOWED_RELATION_NAMES = RELATION_NAMES.filter( + (name) => name !== "BelongsTo" +) + +type MermaidRelationType = + | "one-to-one" + | "one-to-many" + | "many-to-one" + | "many-to-many" + +export class MermaidDiagramDMLGenerator { + private app: Application + private options?: PluginOptions + private mainFileReflection?: Reflection + + constructor(app: Application) { + this.app = app + this.app.options.addDeclaration({ + name: "generateDMLsDiagram", + help: "Whether to generate a Mermaid.js class diagram for data models in the reference.", + type: ParameterType.Boolean, + defaultValue: false, + }) + this.app.options.addDeclaration({ + name: "diagramDMLAddToFile", + help: "The file to add the mermaid diagram to. The diagram is added as a package comment.", + type: ParameterType.String, + }) + app.converter.on( + Converter.EVENT_CREATE_DECLARATION, + this.setMainFile.bind(this) + ) + app.converter.on( + Converter.EVENT_RESOLVE_BEGIN, + this.findRelations.bind(this) + ) + } + + getPluginOptions(): PluginOptions { + if (this.options) { + return this.options + } + + this.options = { + generateModelsDiagram: this.app.options.getValue("generateDMLsDiagram"), + diagramAddToFile: this.app.options.getValue("diagramDMLAddToFile"), + } + + return this.options + } + + setMainFile(context: Context) { + const options = this.getPluginOptions() + if ( + this.mainFileReflection || + !options.generateModelsDiagram || + !options.diagramAddToFile + ) { + return + } + + const mainFilePath = options.diagramAddToFile.startsWith("packages") + ? path.resolve("..", "..", "..", "..", options.diagramAddToFile) + : options.diagramAddToFile + + const mainFileSource = context.program.getSourceFile(mainFilePath) + if (!mainFileSource) { + return + } + const mainFileSymbol = context.checker.getSymbolAtLocation(mainFileSource) + if (!mainFileSymbol) { + return + } + + this.mainFileReflection = + context.project.getReflectionFromSymbol(mainFileSymbol) + } + + findRelations(context: Context) { + const options = this.getPluginOptions() + if ( + !this.mainFileReflection || + !options.generateModelsDiagram || + !options.diagramAddToFile + ) { + return + } + + const relations: Relations = new Map() + + for (const reflection of context.project.getReflectionsByKind( + ReflectionKind.Variable + )) { + if ( + !(reflection instanceof DeclarationReflection) || + !isDmlEntity(reflection) + ) { + return + } + + const reflectionProperties = getDmlProperties( + reflection.type as ReferenceType + ) + + // find relations of that reflection + reflectionProperties.forEach((property) => { + if ( + property.type?.type !== "reference" || + !ALLOWED_RELATION_NAMES.includes(property.type.name) || + property.type.typeArguments?.length !== 1 || + property.type.typeArguments[0].type !== "reference" + ) { + return + } + + const targetReflection = property.type.typeArguments[0].reflection + + if (!targetReflection) { + return + } + + // if entry already exists in relation, don't add anything + const exists = + relations + .get(reflection.name) + ?.some((relation) => relation.target === targetReflection.name) || + relations + .get(targetReflection.name) + ?.some((relation) => relation.target === reflection.name) + + if (exists) { + return + } + + const relationType = this.getMermaidRelation(property.type.name) + + if (!relationType) { + return + } + + if (!relations.has(reflection.name)) { + relations.set(reflection.name, []) + } + + relations.get(reflection.name)?.push({ + target: targetReflection.name, + left: relationType, + right: this.getReverseRelationType(relationType), + name: property.name, + }) + }) + } + + if (!relations.size) { + return + } + + this.mainFileReflection.comment = new Comment([ + { + text: "## Relations Overview\n\n", + kind: "text", + }, + { + text: this.buildMermaidDiagram(relations), + kind: "code", + }, + ]) + } + + getMermaidRelation(relation: string): MermaidRelationType | undefined { + switch (relation) { + case "HasOne": + return "one-to-one" + case "HasMany": + return "one-to-many" + case "ManyToMany": + return "many-to-many" + } + } + + getReverseRelationType( + relationType: MermaidRelationType + ): MermaidRelationType { + return relationType.split("-").reverse().join("-") as MermaidRelationType + } + + buildMermaidDiagram(relations: Relations): string { + const linePrefix = `\t` + const lineSuffix = `\n` + let diagram = `erDiagram${lineSuffix}` + relations.forEach((itemRelations, itemName) => { + itemRelations.forEach((itemRelation) => { + diagram += `${linePrefix}${itemName} ${this.getRelationTypeSymbol( + itemRelation.left, + "left" + )}--${this.getRelationTypeSymbol(itemRelation.right!, "right")} ${ + itemRelation.target + } : ${itemRelation.name}${lineSuffix}` + }) + }) + + return "```mermaid\n" + diagram + "\n```" + } + + getRelationTypeSymbol( + relationType: MermaidRelationType, + direction: "left" | "right" + ): string { + switch (relationType) { + case "one-to-one": + return "||" + case "one-to-many": + return direction === "left" ? "||" : "|{" + case "many-to-many": + return direction === "left" ? "}|" : "|{" + case "many-to-one": + return direction === "left" ? "}|" : "||" + } + } +} diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/render-utils.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/render-utils.ts index ba3ed8cf65..2d311797d7 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/src/render-utils.ts +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/render-utils.ts @@ -64,6 +64,8 @@ import ifShowSeparatorForTitleLevelHelper from "./resources/helpers/if-show-sepa import shouldExpandPropertiesHelper from "./resources/helpers/should-expand-properties" import shouldExpandDeclarationChildrenHelper from "./resources/helpers/should-expand-declaration-children" import startSectionsHelper from "./resources/helpers/start-sections" +import ifDmlEntityHelper from "./resources/helpers/if-dml-entity" +import dmlPropertiesHelper from "./resources/helpers/dml-properties" import { MarkdownTheme } from "./theme" const TEMPLATE_PATH = path.join(__dirname, "resources", "templates") @@ -156,4 +158,6 @@ export function registerHelpers(theme: MarkdownTheme) { shouldExpandPropertiesHelper(theme) shouldExpandDeclarationChildrenHelper(theme) startSectionsHelper(theme) + ifDmlEntityHelper() + dmlPropertiesHelper() } diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/dml-properties.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/dml-properties.ts new file mode 100644 index 0000000000..8ea7a54946 --- /dev/null +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/dml-properties.ts @@ -0,0 +1,23 @@ +import * as Handlebars from "handlebars" +import { DeclarationReflection, ReferenceType } from "typedoc" +import { getDmlProperties, isDmlEntity } from "utils" + +export default function () { + Handlebars.registerHelper( + "dmlProperties", + function (this: DeclarationReflection) { + if (!isDmlEntity(this)) { + return "" + } + + const properties = getDmlProperties(this.type as ReferenceType) + + // TODO resolve the property types to names/native types + return Handlebars.helpers.typeDeclarationMembers.call(properties, { + hash: { + sectionTitle: this.name, + }, + }) + } + ) +} diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/if-dml-entity.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/if-dml-entity.ts new file mode 100644 index 0000000000..85a45ea61c --- /dev/null +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/if-dml-entity.ts @@ -0,0 +1,12 @@ +import * as Handlebars from "handlebars" +import { DeclarationReflection } from "typedoc" +import { isDmlEntity } from "utils" + +export default function () { + Handlebars.registerHelper( + "ifDmlEntity", + function (this: DeclarationReflection, options: Handlebars.HelperOptions) { + return isDmlEntity(this) ? options.fn(this) : options.inverse(this) + } + ) +} diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/toc.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/toc.ts index a33abfea61..ac178bf195 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/toc.ts +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/toc.ts @@ -14,7 +14,8 @@ export default function (theme: MarkdownTheme) { const md: string[] = [] const { hideInPageTOC } = theme - const { hideTocHeaders } = theme.getFormattingOptionsForLocation() + const { hideTocHeaders, reflectionGroupRename = {} } = + theme.getFormattingOptionsForLocation() const isVisible = this.groups?.some((group) => group.allChildrenHaveOwnDocument() @@ -36,7 +37,9 @@ export default function (theme: MarkdownTheme) { } const headingLevel = hideInPageTOC ? `##` : `###` this.groups?.forEach((group) => { - const groupTitle = group.title + const groupTitle = Object.hasOwn(reflectionGroupRename, group.title) + ? reflectionGroupRename[group.title] + : group.title if (group.categories) { group.categories.forEach((category) => { md.push(`${headingLevel} ${category.title} ${groupTitle}\n\n`) diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/type-declaration-members.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/type-declaration-members.ts index 3559d921df..7c4b13ca70 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/type-declaration-members.ts +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/type-declaration-members.ts @@ -27,10 +27,6 @@ export default function (theme: MarkdownTheme) { [] ) as DeclarationReflection[] - // if (typeof options.hash.sectionTitle !== "string") { - // console.log("here2") - // } - let result = "" switch (theme.objectLiteralTypeDeclarationStyle) { case "list": { diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.dml.hbs b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.dml.hbs new file mode 100644 index 0000000000..937cd46e0e --- /dev/null +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.dml.hbs @@ -0,0 +1,7 @@ +{{#if (sectionEnabled "member_declaration_comment")}} + +{{> comment}} + +{{/if}} + +{{{dmlProperties}}} \ No newline at end of file diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.hbs b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.hbs index e49aa45509..7462341f74 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.hbs +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/partials/member.hbs @@ -46,8 +46,16 @@ {{#if (sectionEnabled "member_declaration")}} +{{#ifDmlEntity}} + +{{> member.dml}} + +{{else}} + {{> member.declaration}} +{{/ifDmlEntity}} + {{/if}} {{/ifIsReference}} diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/utils/reflection-formatter.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/utils/reflection-formatter.ts index cefedad02d..729a5de7ef 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/src/utils/reflection-formatter.ts +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/utils/reflection-formatter.ts @@ -2,6 +2,7 @@ import { Comment, DeclarationReflection, ProjectReflection, + ReferenceType, ReflectionKind, ReflectionType, } from "typedoc" @@ -15,6 +16,7 @@ import { stripLineBreaks, } from "utils" import { MarkdownTheme } from "../theme" +import { getDmlProperties, isDmlEntity } from "utils" const ALLOWED_KINDS: ReflectionKind[] = [ ReflectionKind.EnumMember, @@ -153,7 +155,18 @@ export function reflectionComponentFormatter({ const hasChildren = "children" in reflection && reflection.children?.length - if ( + if (reflection.variant === "declaration" && isDmlEntity(reflection)) { + componentItem.children = getDmlProperties( + reflection.type as ReferenceType + ).map((childItem) => + reflectionComponentFormatter({ + reflection: childItem, + level: level + 1, + maxLevel, + project, + }) + ) + } else if ( (reflection.type || hasChildren) && level + 1 <= (maxLevel || MarkdownTheme.MAX_LEVEL) ) { diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/tsconfig.json b/www/utils/packages/typedoc-plugin-markdown-medusa/tsconfig.json index b3b4792cd9..57b5d8916f 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/tsconfig.json +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "./dist", - "rootDir": "./src" + "rootDir": "./src", + "lib": ["es2022"] }, "include": ["src"] } \ No newline at end of file diff --git a/www/utils/packages/types/lib/index.d.ts b/www/utils/packages/types/lib/index.d.ts index 4e7c85d7cb..a866a9b38a 100644 --- a/www/utils/packages/types/lib/index.d.ts +++ b/www/utils/packages/types/lib/index.d.ts @@ -54,6 +54,9 @@ export type FormattingOptionType = { reflectionGroups?: { [k: string]: boolean } + reflectionGroupRename?: { + [k: string]: string + } reflectionCategories?: { [k: string]: boolean } @@ -234,5 +237,25 @@ export declare module "typedoc" { * The file to add the mermaid diagram to. The diagram is added as a package comment. */ diagramAddToFile: string + /** + * Whether to generate a Mermaid.js class diagram for data models in the reference. + * (Used for DML) + */ + generateDMLsDiagram: boolean + /** + * The file to add the mermaid diagram to. The diagram is added as a package comment. + * (Used for DML) + */ + diagramDMLAddToFile: string + /** + * Whether to enable resolving DML relations. + * @defaultValue false + */ + resolveDmlRelations: boolean + /** + * Whether to normalize DML types. + * @defaultValue false + */ + normalizeDmlTypes: boolean } } diff --git a/www/utils/packages/utils/src/dml-utils.ts b/www/utils/packages/utils/src/dml-utils.ts new file mode 100644 index 0000000000..717fbd2886 --- /dev/null +++ b/www/utils/packages/utils/src/dml-utils.ts @@ -0,0 +1,24 @@ +import { DeclarationReflection, ReferenceType, ReflectionType } from "typedoc" + +export function isDmlEntity(reflection: DeclarationReflection) { + if (reflection.type?.type !== "reference") { + return false + } + + return reflection.type.name === "DmlEntity" +} + +export function getDmlProperties( + reflectionType: ReferenceType +): DeclarationReflection[] { + if ( + !reflectionType.typeArguments?.length || + reflectionType.typeArguments[0].type !== "intersection" + ) { + return [] + } + + const schemaType = reflectionType.typeArguments[0].types[0] as ReflectionType + + return schemaType.declaration.children || [] +} diff --git a/www/utils/packages/utils/src/index.ts b/www/utils/packages/utils/src/index.ts index 1ccbdd1413..6c8f61737f 100644 --- a/www/utils/packages/utils/src/index.ts +++ b/www/utils/packages/utils/src/index.ts @@ -1,3 +1,4 @@ +export * from "./dml-utils" export * from "./get-type-children" export * from "./get-project-child" export * from "./get-type-str"