docs: translation module (#14271)

* docs: translation module

* fix link in JS SDK

* add translations user guides [WIP]

* updates

* fix broken link

* remove mentions of default locale

* change header

* updates

* updated user guides

* handle todos

* fix build error

* fix lint errors
This commit is contained in:
Shahed Nasser
2025-12-17 13:07:43 +02:00
committed by GitHub
parent 1743ed7f04
commit c1a5390fc6
133 changed files with 21304 additions and 1661 deletions
@@ -14,6 +14,7 @@ This documentation provides a reference to the data models in the Store Module
```mermaid
erDiagram
Store ||--|| StoreCurrency : supported_currencies
Store ||--|| StoreLocale : supported_locales
```
@@ -21,3 +22,4 @@ erDiagram
- [Store](../../store_models/variables/store_models.Store/page.mdx)
- [StoreCurrency](../../store_models/variables/store_models.StoreCurrency/page.mdx)
- [StoreLocale](../../store_models/variables/store_models.StoreLocale/page.mdx)
@@ -0,0 +1,49 @@
import { TypeList } from "docs-ui"
# translation
## Interfaces
- [BaseFilterable](../../translation/interfaces/translation.BaseFilterable/page.mdx)
- [Context](../../translation/interfaces/translation.Context/page.mdx)
- [CreateLocaleDTO](../../translation/interfaces/translation.CreateLocaleDTO/page.mdx)
- [CreateTranslationDTO](../../translation/interfaces/translation.CreateTranslationDTO/page.mdx)
- [FilterableLocaleProps](../../translation/interfaces/translation.FilterableLocaleProps/page.mdx)
- [FilterableTranslationProps](../../translation/interfaces/translation.FilterableTranslationProps/page.mdx)
- [FindConfig](../../translation/interfaces/translation.FindConfig/page.mdx)
- [IMessageAggregator](../../translation/interfaces/translation.IMessageAggregator/page.mdx)
- [IModuleService](../../translation/interfaces/translation.IModuleService/page.mdx)
- [ITranslationModuleService](../../translation/interfaces/translation.ITranslationModuleService/page.mdx)
- [JoinerServiceConfig](../../translation/interfaces/translation.JoinerServiceConfig/page.mdx)
- [JoinerServiceConfigAlias](../../translation/interfaces/translation.JoinerServiceConfigAlias/page.mdx)
- [LocaleDTO](../../translation/interfaces/translation.LocaleDTO/page.mdx)
- [MessageAggregatorFormat](../../translation/interfaces/translation.MessageAggregatorFormat/page.mdx)
- [RestoreReturn](../../translation/interfaces/translation.RestoreReturn/page.mdx)
- [SoftDeleteReturn](../../translation/interfaces/translation.SoftDeleteReturn/page.mdx)
- [TranslationDTO](../../translation/interfaces/translation.TranslationDTO/page.mdx)
- [UpdateLocaleDTO](../../translation/interfaces/translation.UpdateLocaleDTO/page.mdx)
- [UpdateTranslationDTO](../../translation/interfaces/translation.UpdateTranslationDTO/page.mdx)
## Type Aliases
- [Constructor](../../translation/types/translation.Constructor/page.mdx)
- [Event](../../translation/types/translation.Event/page.mdx)
- [EventMetadata](../../translation/types/translation.EventMetadata/page.mdx)
- [ExpandScalar](../../translation/types/translation.ExpandScalar/page.mdx)
- [FilterQuery](../../translation/types/translation.FilterQuery/page.mdx)
- [FilterQueryProperties](../../translation/types/translation.FilterQueryProperties/page.mdx)
- [FilterValue](../../translation/types/translation.FilterValue/page.mdx)
- [FilterValue2](../../translation/types/translation.FilterValue2/page.mdx)
- [FindConfigOrder](../../translation/types/translation.FindConfigOrder/page.mdx)
- [JoinerRelationship](../../translation/types/translation.JoinerRelationship/page.mdx)
- [LinkModulesExtraFields](../../translation/types/translation.LinkModulesExtraFields/page.mdx)
- [Message](../../translation/types/translation.Message/page.mdx)
- [ModuleJoinerConfig](../../translation/types/translation.ModuleJoinerConfig/page.mdx)
- [ModuleJoinerRelationship](../../translation/types/translation.ModuleJoinerRelationship/page.mdx)
- [OperatorMap](../../translation/types/translation.OperatorMap/page.mdx)
- [PrevLimit](../../translation/types/translation.PrevLimit/page.mdx)
- [Primary](../../translation/types/translation.Primary/page.mdx)
- [Query](../../translation/types/translation.Query/page.mdx)
- [RawMessageFormat](../../translation/types/translation.RawMessageFormat/page.mdx)
- [ReadonlyPrimary](../../translation/types/translation.ReadonlyPrimary/page.mdx)
- [Scalar](../../translation/types/translation.Scalar/page.mdx)
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationModelReference
slug: /references/translation/models
---
import { TypeList } from "docs-ui"
# Translation Module Data Models Reference
This documentation provides a reference to the data models in the Translation Module
## Data Models
- [Locale](../../translation_models/variables/translation_models.Locale/page.mdx)
- [Translation](../../translation_models/variables/translation_models.Translation/page.mdx)
File diff suppressed because one or more lines are too long
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the StoreCurrency data model. It belongs to the Store Module.
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/da5d0e3a1430979ab9cda7f239ea7066ded1f7ab/packages/modules/store/src/models/currency.ts#L4" />
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/store/src/models/currency.ts#L4" />
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](./page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="StoreCurrency"/>
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](./page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"supported_locales","type":"HasMany&#60;[StoreLocale](../store_models.StoreLocale/page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="StoreCurrency"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: storeModelReference
slug: /references/store/models/StoreLocale
sidebar_label: StoreLocale
---
import { TypeList } from "docs-ui"
# StoreLocale - Store Module Data Models Reference
This documentation provides a reference to the StoreLocale data model. It belongs to the Store Module.
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/store/src/models/locale.ts#L4" />
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](../store_models.StoreCurrency/page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"supported_locales","type":"HasMany&#60;[StoreLocale](./page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="StoreLocale"/>
@@ -0,0 +1,7 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# clearMessages
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# getMessages
## Parameters
<TypeList types={[{"name":"format","type":"[MessageAggregatorFormat](../../../interfaces/translation.MessageAggregatorFormat/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"groupBy","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sortBy","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal","type":"`boolean`","description":"will prevent the info log to be displayed about those events","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
## Returns
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/translation.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/translation.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. &#123; id: \"123\" &#125; or &#123; ids: [\"123\", \"456\"] &#125;)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/translation.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# save
## Parameters
<TypeList types={[{"name":"msg","type":"[Message](../../../types/translation.Message/page.mdx) \\| [Message](../../../types/translation.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. &#123; id: \"123\" &#125; or &#123; ids: [\"123\", \"456\"] &#125;)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/translation.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="save"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# saveRawMessageData
## Parameters
<TypeList types={[{"name":"messageData","type":"[RawMessageFormat](../../../types/translation.RawMessageFormat/page.mdx)&#60;T&#62; \\| [RawMessageFormat](../../../types/translation.RawMessageFormat/page.mdx)&#60;T&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"eventName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"source","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick&#60;[Context](../../../interfaces/translation.Context/page.mdx), \"eventGroupId\"&#62;","description":"","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":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/>
@@ -0,0 +1,41 @@
---
displayed_sidebar: translationReference
slug: /references/translation/createLocales
sidebar_label: createLocales
---
import { TypeList } from "docs-ui"
# createLocales - Translation Module Reference
This documentation provides a reference to the `createLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createLocales(data, sharedContext?): Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)&#62;
This method creates a locale.
### Parameters
<TypeList types={[{"name":"data","type":"[CreateLocaleDTO](../../../interfaces/translation.CreateLocaleDTO/page.mdx)","description":"The locale to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the locale to create.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocales"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created locale.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocales"/>
## createLocales(data, sharedContext?): Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]&#62;
This method creates locales.
### Parameters
<TypeList types={[{"name":"data","type":"[CreateLocaleDTO](../../../interfaces/translation.CreateLocaleDTO/page.mdx)[]","description":"The locales to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the locale to create.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocales"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created locales.","expandable":false,"children":[{"name":"LocaleDTO[]","type":"[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocales"/>
@@ -0,0 +1,41 @@
---
displayed_sidebar: translationReference
slug: /references/translation/createTranslations
sidebar_label: createTranslations
---
import { TypeList } from "docs-ui"
# createTranslations - Translation Module Reference
This documentation provides a reference to the `createTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createTranslations(data, sharedContext?): Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)&#62;
This method creates a translation.
### Parameters
<TypeList types={[{"name":"data","type":"[CreateTranslationDTO](../../../interfaces/translation.CreateTranslationDTO/page.mdx)","description":"The translation to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTranslations"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created translation.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTranslations"/>
## createTranslations(data, sharedContext?): Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]&#62;
This method creates translations.
### Parameters
<TypeList types={[{"name":"data","type":"[CreateTranslationDTO](../../../interfaces/translation.CreateTranslationDTO/page.mdx)[]","description":"The translations to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTranslations"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created translations.","expandable":false,"children":[{"name":"TranslationDTO[]","type":"[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTranslations"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/deleteLocales
sidebar_label: deleteLocales
---
import { TypeList } from "docs-ui"
# deleteLocales - Translation Module Reference
This documentation provides a reference to the `deleteLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method deletes locales by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the locales to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLocales"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the locales are deleted.","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLocales"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/deleteTranslations
sidebar_label: deleteTranslations
---
import { TypeList } from "docs-ui"
# deleteTranslations - Translation Module Reference
This documentation provides a reference to the `deleteTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method deletes translations by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the translations to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteTranslations"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the translations are deleted.","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteTranslations"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/restoreLocales
sidebar_label: restoreLocales
---
import { TypeList } from "docs-ui"
# restoreLocales - Translation Module Reference
This documentation provides a reference to the `restoreLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method restores soft deleted locales by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the locales to restore.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/translation.RestoreReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to restore.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreLocales"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object with IDs of related records that were restored.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreLocales"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/restoreTranslations
sidebar_label: restoreTranslations
---
import { TypeList } from "docs-ui"
# restoreTranslations - Translation Module Reference
This documentation provides a reference to the `restoreTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method restores soft deleted translations by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the translations to restore.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/translation.RestoreReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to restore.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreTranslations"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object with IDs of related records that were restored.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreTranslations"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/softDeleteLocales
sidebar_label: softDeleteLocales
---
import { TypeList } from "docs-ui"
# softDeleteLocales - Translation Module Reference
This documentation provides a reference to the `softDeleteLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method soft deletes locales by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the locales to soft delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/translation.SoftDeleteReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"An object for related entities that should be soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteLocales"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object with IDs of related records that were also soft deleted.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteLocales"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/softDeleteTranslations
sidebar_label: softDeleteTranslations
---
import { TypeList } from "docs-ui"
# softDeleteTranslations - Translation Module Reference
This documentation provides a reference to the `softDeleteTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method soft deletes translations by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the translations to soft delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/translation.SoftDeleteReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"An object for related entities that should be soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteTranslations"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object with IDs of related records that were also soft deleted.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteTranslations"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# BaseFilterable
An object used to allow specifying flexible queries with and/or conditions.
## Type parameters
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="BaseFilterable"/>
<TypeList types={[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="BaseFilterable"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Context
A context used to share resources, such as transaction manager, between the application and the module.
## Type parameters
<TypeList types={[{"name":"TManager","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Context"/>
<TypeList types={[{"name":"__type","type":"`\"MedusaContext\"`","description":"","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":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../translation.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":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Context"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# CreateLocaleDTO
The locale to be created.
<TypeList types={[{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the locale to create.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateLocaleDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# CreateTranslationDTO
The translation to be created.
<TypeList types={[{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateTranslationDTO"/>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,16 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FindConfig
An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
which provides correct typing of field names in its properties.
## Type parameters
<TypeList types={[{"name":"Entity","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FindConfig"/>
<TypeList types={[{"name":"select","type":"(`string` & `object` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.\n\nYou can only retrieve data models defined in the same module. To retrieve linked data models\nfrom other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../types/translation.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FindConfig"/>
@@ -0,0 +1,14 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# IMessageAggregator
## Methods
- [clearMessages](../../IMessageAggregator/methods/translation.IMessageAggregator.clearMessages/page.mdx)
- [getMessages](../../IMessageAggregator/methods/translation.IMessageAggregator.getMessages/page.mdx)
- [save](../../IMessageAggregator/methods/translation.IMessageAggregator.save/page.mdx)
- [saveRawMessageData](../../IMessageAggregator/methods/translation.IMessageAggregator.saveRawMessageData/page.mdx)
@@ -0,0 +1,19 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# IModuleService
## Methods
- [\_\_joinerConfig](../../IModuleService/methods/translation.IModuleService.__joinerConfig/page.mdx)
## Properties
- [\_\_hooks](page.mdx#__hooks)
___
<TypeList types={[{"name":"__hooks","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"onApplicationStart","type":"() => Promise&#60;void&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"onApplicationShutdown","type":"() => Promise&#60;void&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"onApplicationPrepareShutdown","type":"() => Promise&#60;void&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="IModuleService"/>
@@ -0,0 +1,38 @@
---
displayed_sidebar: translationReference
slug: /references/translation
---
import { TypeList } from "docs-ui"
# ITranslationModuleService Reference
This section of the documentation provides a reference to the `ITranslationModuleService` interfaces methods. This is the interface developers use to use the functionalities provided by the Translation Module.
<Note>
You should only use the methods in this reference when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
The main service interface for the Translation Module.
Method signatures match what MedusaService generates.
## Methods
- [createLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.createLocales/page.mdx)
- [createTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.createTranslations/page.mdx)
- [deleteLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.deleteLocales/page.mdx)
- [deleteTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.deleteTranslations/page.mdx)
- [listAndCountLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountLocales/page.mdx)
- [listAndCountTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountTranslations/page.mdx)
- [listLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.listLocales/page.mdx)
- [listTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.listTranslations/page.mdx)
- [restoreLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.restoreLocales/page.mdx)
- [restoreTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.restoreTranslations/page.mdx)
- [retrieveLocale](../../ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveLocale/page.mdx)
- [retrieveTranslation](../../ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveTranslation/page.mdx)
- [softDeleteLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteLocales/page.mdx)
- [softDeleteTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteTranslations/page.mdx)
- [updateLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.updateLocales/page.mdx)
- [updateTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.updateTranslations/page.mdx)
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# JoinerServiceConfigAlias
<TypeList types={[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filterable","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfigAlias"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# LocaleDTO
The locale details.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="LocaleDTO"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# MessageAggregatorFormat
<TypeList types={[{"name":"groupBy","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sortBy","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal","type":"`boolean`","description":"will prevent the info log to be displayed about those events","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="MessageAggregatorFormat"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# RestoreReturn
An object that is used to specify an entity's related entities that should be restored when the main entity is restored.
## Type parameters
<TypeList types={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RestoreReturn"/>
<TypeList types={[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RestoreReturn"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# SoftDeleteReturn
An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
## Type parameters
<TypeList types={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="SoftDeleteReturn"/>
<TypeList types={[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="SoftDeleteReturn"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# TranslationDTO
The translation details.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TranslationDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# UpdateLocaleDTO
The attributes to update in the locale.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the locale to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateLocaleDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# UpdateTranslationDTO
The attributes to update in the translation.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the translation to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateTranslationDTO"/>
@@ -0,0 +1,13 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Constructor
**Constructor**: (...`args`: `any`[]) => T \| () => T
## Parameters
<TypeList types={[{"name":"args","type":"`any`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Event
**Event**: `Object`
<TypeList types={[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. &#123; id: \"123\" &#125; or &#123; ids: [\"123\", \"456\"] &#125;)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../translation.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# EventMetadata
**EventMetadata**: `Record<string, unknown>` & `object`
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# ExpandScalar
**ExpandScalar**: `null` \| T extends `string` ? `string` \| `RegExp` : T extends `Date` ? `Date` \| `string` : T
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterQuery
**FilterQuery**: Prev extends `never` ? `never` : T extends [Constructor](../translation.Constructor/page.mdx)&#60;infer Prototype&#62; ? [FilterQueryProperties](../translation.FilterQueryProperties/page.mdx)&#60;Prototype, Prev&#62; : [FilterQueryProperties](../translation.FilterQueryProperties/page.mdx)&#60;T, Prev&#62;
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterQueryProperties
**FilterQueryProperties**: &#123; [Key in keyof T]?: T[Key] extends boolean \| number \| string \| bigint \| symbol \| Date ? T[Key] \| OperatorMap&#60;T[Key]&#62; : T[Key] extends infer U ? U extends (x: number) =&#62; V ? V extends object ? FilterQuery&#60;Partial&#60;V&#62;, PrevLimit[Prev]&#62; : never : never : never &#125;
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterValue
**FilterValue**: [OperatorMap](../translation.OperatorMap/page.mdx)&#60;[FilterValue2](../translation.FilterValue2/page.mdx)&#60;T&#62;&#62; \| [FilterValue2](../translation.FilterValue2/page.mdx)&#60;T&#62; \| [FilterValue2](../translation.FilterValue2/page.mdx)&#60;T&#62;[] \| `null`
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterValue2
**FilterValue2**: T \| [ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62; \| [Primary](../translation.Primary/page.mdx)&#60;T&#62;
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FindConfigOrder
**FindConfigOrder**: `object`
Temporary type fixing to allow any level of orders until we get to properly clean all the types
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# JoinerRelationship
**JoinerRelationship**: `Object`
<TypeList types={[{"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":"entity","type":"`string`","description":"","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<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerRelationship"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# LinkModulesExtraFields
**LinkModulesExtraFields**: `Record<string, object>`
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Message
**Message**: [Event](../translation.Event/page.mdx)&#60;TData&#62; & `object`
The details of an event to emit.
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# ModuleJoinerConfig
**ModuleJoinerConfig**: Omit&#60;[JoinerServiceConfig](../../interfaces/translation.JoinerServiceConfig/page.mdx), "serviceName" \| "primaryKeys" \| "relationships" \| "extends"&#62; & `object`
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# ModuleJoinerRelationship
**ModuleJoinerRelationship**: [JoinerRelationship](../translation.JoinerRelationship/page.mdx) & `object`
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# OperatorMap
**OperatorMap**: `Object`
<TypeList types={[{"name":"$and","type":"[Query](../translation.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../translation.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../translation.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="OperatorMap"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# PrevLimit
**PrevLimit**: [`never`, `0`, `1`, `2`]
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Primary
**Primary**: T extends `object` ? [ReadonlyPrimary](../translation.ReadonlyPrimary/page.mdx)&#60;PK&#62; : T extends `object` ? [ReadonlyPrimary](../translation.ReadonlyPrimary/page.mdx)&#60;PK&#62; \| `string` : T extends `object` ? [ReadonlyPrimary](../translation.ReadonlyPrimary/page.mdx)&#60;PK&#62; : T extends `object` ? [ReadonlyPrimary](../translation.ReadonlyPrimary/page.mdx)&#60;PK&#62; : `never`
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Query
**Query**: T extends `object` ? T extends [Scalar](../translation.Scalar/page.mdx) ? `never` : [FilterQuery](../translation.FilterQuery/page.mdx)&#60;T&#62; : [FilterValue](../translation.FilterValue/page.mdx)&#60;T&#62;
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# RawMessageFormat
**RawMessageFormat**: `Object`
<TypeList types={[{"name":"eventName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"source","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick&#60;[Context](../../interfaces/translation.Context/page.mdx), \"eventGroupId\"&#62;","description":"","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":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RawMessageFormat"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# ReadonlyPrimary
**ReadonlyPrimary**: T extends `any`[] ? Readonly&#60;T&#62; : T
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Scalar
**Scalar**: `boolean` \| `number` \| `string` \| `bigint` \| `symbol` \| `Date` \| `RegExp` \| `Buffer` \| `object`
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationModelReference
slug: /references/translation/models/Locale
sidebar_label: Locale
---
import { TypeList } from "docs-ui"
# Locale - Translation Module Data Models Reference
This documentation provides a reference to the Locale data model. It belongs to the Translation Module.
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/locale.ts#L3" />
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Locale"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationModelReference
slug: /references/translation/models/Translation
sidebar_label: Translation
---
import { TypeList } from "docs-ui"
# Translation - Translation Module Data Models Reference
This documentation provides a reference to the Translation data model. It belongs to the Translation Module.
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/translation.ts#L3" />
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`JSONProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Translation"/>