1 /**
2 * @oas [get] /admin/translations/entities
3 * operationId: GetTranslationsEntities
4 * summary: List Translatable Entities
5 * description: Retrieve a list of translatable entities. The entities can be filtered by fields such as `id`. The entities can also be sorted or paginated.
6 * x-authenticated: true
7 * parameters:
8 * - name: type
9 * in: query
10 * description: Filter by a translatable entity type.
11 * required: true
12 * schema:
13 * type: string
14 * title: type
15 * description: Filter by a translatable entity type.
16 * example: product
17 * - name: id
18 * in: query
19 * required: false
20 * schema:
21 * oneOf:
22 * - type: string
23 * title: id
24 * description: Filter by an entity's ID.
25 * - type: array
26 * description: Filter by entity IDs.
27 * items:
28 * type: string
29 * title: id
30 * description: An entity's ID.
31 * - name: limit
32 * in: query
33 * description: Limit the number of items returned in the list.
34 * required: false
35 * schema:
36 * type: number
37 * title: limit
38 * description: Limit the number of items returned in the list.
39 * externalDocs:
40 * url: "#pagination"
41 * - name: offset
42 * in: query
43 * description: The number of items to skip when retrieving a list.
44 * required: false
45 * schema:
46 * type: number
47 * title: offset
48 * description: The number of items to skip when retrieving a list.
49 * externalDocs:
50 * url: "#pagination"
51 * - name: order
52 * in: query
53 * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
54 * required: false
55 * schema:
56 * type: string
57 * title: order
58 * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
59 * externalDocs:
60 * url: "#pagination"
61 * - name: with_deleted
62 * in: query
63 * description: The translation's with deleted.
64 * required: false
65 * schema:
66 * type: boolean
67 * title: with_deleted
68 * description: The translation's with deleted.
69 * - name: fields
70 * in: query
71 * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
72 * fields. Without prefix it will replace the entire default fields.
73 * required: false
74 * schema:
75 * type: string
76 * title: fields
77 * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
78 * fields. Without prefix it will replace the entire default fields.
79 * externalDocs:
80 * url: "#select-fields-and-relations"
81 * security:
82 * - api_token: []
83 * - cookie_auth: []
84 * - jwt_token: []
85 * x-codeSamples:
86 * - lang: JavaScript
87 * label: JS SDK
88 * source: |-
89 * import Medusa from "@medusajs/js-sdk"
90 *
91 * export const sdk = new Medusa({
92 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
93 * debug: import.meta.env.DEV,
94 * auth: {
95 * type: "session",
96 * },
97 * })
98 *
99 * sdk.admin.translation.entities({
100 * type: "product"
101 * })
102 * .then(({ data, count, offset, limit }) => {
103 * console.log(data)
104 * })
105 * - lang: Shell
106 * label: cURL
107 * source: |-
108 * curl '{backend_url}/admin/translations/entities' \
109 * -H 'Authorization: Bearer {access_token}'
110 * tags:
111 * - Translations
112 * responses:
113 * "200":
114 * description: OK
115 * content:
116 * application/json:
117 * schema:
118 * $ref: "#/components/schemas/AdminTranslationEntitiesResponse"
119 * "400":
120 * $ref: "#/components/responses/400_error"
121 * "401":
122 * $ref: "#/components/responses/unauthorized"
123 * "404":
124 * $ref: "#/components/responses/not_found_error"
125 * "409":
126 * $ref: "#/components/responses/invalid_state_error"
127 * "422":
128 * $ref: "#/components/responses/invalid_request_error"
129 * "500":
130 * $ref: "#/components/responses/500_error"
131 * x-since: 2.12.4
132 * x-featureFlag: translation
133 *
134 */
135