-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
chore(docs): Updated API Reference (automated) #14609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...i-reference/specs/admin/code_samples/JavaScript/admin_translations_settings_batch/post.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import Medusa from "@medusajs/js-sdk" | ||
|
|
||
| export const sdk = new Medusa({ | ||
| baseUrl: import.meta.env.VITE_BACKEND_URL || "/", | ||
| debug: import.meta.env.DEV, | ||
| auth: { | ||
| type: "session", | ||
| }, | ||
| }) | ||
|
|
||
| sdk.admin.translation.batchSettings({ | ||
| create: [ | ||
| { | ||
| entity_type: "product", | ||
| fields: ["title", "description"], | ||
| is_active: true | ||
| } | ||
| ], | ||
| update: [ | ||
| { | ||
| id: "trset_123", | ||
| fields: ["title", "description", "subtitle"], | ||
| is_active: true | ||
| } | ||
| ], | ||
| delete: ["trset_456"] | ||
| }) | ||
| .then(({ created, updated, deleted }) => { | ||
| console.log(created, updated, deleted) | ||
| }) | ||
| ``` | ||
2 changes: 2 additions & 0 deletions
2
...ps/api-reference/specs/admin/code_samples/Shell/admin_translations_settings_batch/post.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| curl -X POST '{backend_url}/admin/translations/settings/batch' \ | ||
| -H 'Authorization: Bearer {access_token}' |
21 changes: 21 additions & 0 deletions
21
www/apps/api-reference/specs/admin/components/schemas/AdminBatchTranslationSettings.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| type: object | ||
| description: The translation settings to create, update, or delete in batch. | ||
| x-schemaName: AdminBatchTranslationSettings | ||
| properties: | ||
| create: | ||
| type: array | ||
| description: The translation settings to create. | ||
| items: | ||
| $ref: ./AdminCreateTranslationSettings.yaml | ||
| update: | ||
| type: array | ||
| description: The translation settings to update. | ||
| items: | ||
| $ref: ./AdminUpdateTranslationSettings.yaml | ||
| delete: | ||
| type: array | ||
| description: The translation settings to delete. | ||
| items: | ||
| type: string | ||
| title: delete | ||
| description: The IDs of the translation settings to delete. |
41 changes: 41 additions & 0 deletions
41
...s/api-reference/specs/admin/components/schemas/AdminBatchTranslationSettingsResponse.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| type: object | ||
| description: The result of managing the translation settings in batch. | ||
| x-schemaName: AdminBatchTranslationSettingsResponse | ||
| required: | ||
| - created | ||
| - updated | ||
| - deleted | ||
| properties: | ||
| created: | ||
| type: array | ||
| description: The created translation settings. | ||
| items: | ||
| $ref: ./AdminTranslationSettings.yaml | ||
| updated: | ||
| type: array | ||
| description: The updated translation settings. | ||
| items: | ||
| $ref: ./AdminTranslationSettings.yaml | ||
| deleted: | ||
| type: object | ||
| description: The deletion result. | ||
| required: | ||
| - ids | ||
| - object | ||
| - deleted | ||
| properties: | ||
| ids: | ||
| type: array | ||
| description: The IDs of the deleted translation settings. | ||
| items: | ||
| type: string | ||
| title: ids | ||
| description: The ID of a deleted translation settings. | ||
| object: | ||
| type: string | ||
| title: object | ||
| description: The type of object deleted. | ||
| deleted: | ||
| type: boolean | ||
| title: deleted | ||
| description: Whether the deletion was successful. |
24 changes: 24 additions & 0 deletions
24
www/apps/api-reference/specs/admin/components/schemas/AdminCreateTranslationSettings.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| type: object | ||
| description: The translation settings to create. | ||
| x-schemaName: AdminCreateTranslationSettings | ||
| required: | ||
| - entity_type | ||
| - fields | ||
| properties: | ||
| entity_type: | ||
| type: string | ||
| title: entity_type | ||
| description: The entity type to create the translation settings for. | ||
| example: product | ||
| fields: | ||
| type: array | ||
| description: The fields to support translations for. | ||
| items: | ||
| type: string | ||
| title: fields | ||
| description: A field to support translations for. | ||
| example: title | ||
| is_active: | ||
| type: boolean | ||
| title: is_active | ||
| description: Whether translations are active for the given entity type. |
47 changes: 47 additions & 0 deletions
47
www/apps/api-reference/specs/admin/components/schemas/AdminTranslationSettings.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| type: object | ||
| description: The translation settings details. | ||
| x-schemaName: AdminTranslationSettings | ||
| required: | ||
| - id | ||
| - created_at | ||
| - updated_at | ||
| - deleted_at | ||
| - entity_type | ||
| - fields | ||
| - is_active | ||
| properties: | ||
| id: | ||
| type: string | ||
| title: id | ||
| description: The ID of the translation settings. | ||
| created_at: | ||
| type: string | ||
| format: date-time | ||
| title: created_at | ||
| description: The date the translation settings was created. | ||
| updated_at: | ||
| type: string | ||
| format: date-time | ||
| title: updated_at | ||
| description: The date the translation settings was updated. | ||
| deleted_at: | ||
| type: string | ||
| format: date-time | ||
| title: deleted_at | ||
| description: The date the translation settings was deleted. | ||
| entity_type: | ||
| type: string | ||
| title: entity_type | ||
| description: The entity type the translation settings are for. | ||
| example: product | ||
| fields: | ||
| type: array | ||
| description: The fields supported for translations. | ||
| items: | ||
| type: string | ||
| title: fields | ||
| description: A field supported for translations. | ||
| is_active: | ||
| type: boolean | ||
| title: is_active | ||
| description: Whether translations are active for the given entity type. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
www/apps/api-reference/specs/admin/components/schemas/AdminUpdateTranslationSettings.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| type: object | ||
| description: The translation settings to update. | ||
| x-schemaName: AdminUpdateTranslationSettings | ||
| required: | ||
| - id | ||
| properties: | ||
| id: | ||
| type: string | ||
| title: id | ||
| description: The ID of the translation settings to update. | ||
| entity_type: | ||
| type: string | ||
| title: entity_type | ||
| description: The entity type to update the translation settings for. | ||
| fields: | ||
| type: array | ||
| description: The fields to update translations for. | ||
| items: | ||
| type: string | ||
| title: fields | ||
| description: A field to update translations for. | ||
| is_active: | ||
| type: boolean | ||
| title: is_active | ||
| description: Whether translations are active for the given entity type. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Markdown code fence accidentally included in JavaScript code sample
Low Severity
A markdown code fence (```) was accidentally included at the end of the JavaScript code sample for the
POST /admin/translations/settings/batchendpoint. This invalid JavaScript syntax will be displayed to users viewing the API documentation, making the code sample appear broken and potentially confusing developers trying to use it.Additional Locations (1)
www/apps/api-reference/specs/admin/openapi.full.yaml#L64458-L64459