1 /**
2 * @oas [get] /admin/layouts/configurations
3 * operationId: GetLayoutsConfigurations
4 * summary: List Layout Configurations
5 * description: Retrieve a list of layout configurations made by admin users. The layouts can be filtered by fields such as `id`. The layouts can also be sorted or paginated.
6 * x-authenticated: true
7 * parameters:
8 * - name: id
9 * in: query
10 * required: false
11 * schema:
12 * oneOf:
13 * - type: string
14 * title: id
15 * description: Filter by layout configuration ID.
16 * - type: array
17 * description: Filter by layout configuration IDs.
18 * items:
19 * type: string
20 * title: id
21 * description: The layout configuration's ID.
22 * - name: zone
23 * in: query
24 * required: false
25 * schema:
26 * oneOf:
27 * - type: string
28 * title: zone
29 * description: Filter by layout configuration zone.
30 * - type: array
31 * description: Filter by layout configuration zones.
32 * items:
33 * type: string
34 * title: zone
35 * description: The layout configuration's zone.
36 * - name: user_id
37 * in: query
38 * required: false
39 * schema:
40 * oneOf:
41 * - type: string
42 * title: user_id
43 * description: Filter by the ID of the user who created the layout configuration.
44 * - type: array
45 * description: Filter by the IDs of users who created the layout configurations.
46 * items:
47 * type: string
48 * title: user_id
49 * description: The ID of the user who created the layout configuration.
50 * - name: is_system_default
51 * in: query
52 * description: Filter by whether the layout configuration is a system default.
53 * required: false
54 * schema:
55 * type: boolean
56 * title: is_system_default
57 * description: Whether the layout configuration is a system default.
58 * - name: limit
59 * in: query
60 * description: Limit the number of items returned in the list.
61 * required: false
62 * schema:
63 * type: number
64 * title: limit
65 * description: Limit the number of items returned in the list.
66 * externalDocs:
67 * url: "#pagination"
68 * - name: offset
69 * in: query
70 * description: The number of items to skip when retrieving a list.
71 * required: false
72 * schema:
73 * type: number
74 * title: offset
75 * description: The number of items to skip when retrieving a list.
76 * externalDocs:
77 * url: "#pagination"
78 * - name: order
79 * in: query
80 * 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 `-`.
81 * required: false
82 * schema:
83 * type: string
84 * title: order
85 * 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 `-`.
86 * externalDocs:
87 * url: "#pagination"
88 * - name: with_deleted
89 * in: query
90 * description: The layout's with deleted.
91 * required: false
92 * schema:
93 * type: boolean
94 * title: with_deleted
95 * description: The layout's with deleted.
96 * - name: fields
97 * in: query
98 * 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
99 * fields. Without prefix it will replace the entire default fields.
100 * required: false
101 * schema:
102 * type: string
103 * title: fields
104 * 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
105 * fields. Without prefix it will replace the entire default fields.
106 * externalDocs:
107 * url: "#select-fields-and-relations"
108 * - name: $and
109 * in: query
110 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
111 * required: false
112 * schema:
113 * type: array
114 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
115 * items:
116 * type: object
117 * title: $and
118 * - name: $or
119 * in: query
120 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
121 * required: false
122 * schema:
123 * type: array
124 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
125 * items:
126 * type: object
127 * title: $or
128 * security:
129 * - api_token: []
130 * - cookie_auth: []
131 * - jwt_token: []
132 * x-codeSamples:
133 * - lang: JavaScript
134 * label: JS SDK
135 * source: |-
136 * import Medusa from "@medusajs/js-sdk"
137 *
138 * export const sdk = new Medusa({
139 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
140 * debug: import.meta.env.DEV,
141 * auth: {
142 * type: "session",
143 * },
144 * })
145 *
146 * const { layout_configurations } = await sdk.admin.layouts.listConfigurations()
147 * - lang: Shell
148 * label: cURL
149 * source: |-
150 * curl '{backend_url}/admin/layouts/configurations' \
151 * -H 'Authorization: Bearer {access_token}'
152 * tags:
153 * - Layouts
154 * responses:
155 * "200":
156 * description: OK
157 * content:
158 * application/json:
159 * schema:
160 * allOf:
161 * - type: object
162 * description: The pagination details of the layout configurations list.
163 * required:
164 * - limit
165 * - offset
166 * - count
167 * properties:
168 * limit:
169 * type: number
170 * title: limit
171 * description: The maximum number of items returned in the list.
172 * offset:
173 * type: number
174 * title: offset
175 * description: The number of items skipped before retrieving the list.
176 * count:
177 * type: number
178 * title: count
179 * description: The total number of items in the list.
180 * estimate_count:
181 * type: number
182 * title: estimate_count
183 * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
184 * x-featureFlag: index_engine
185 * - type: object
186 * description: The layout configurations list.
187 * required:
188 * - layout_configurations
189 * properties:
190 * layout_configurations:
191 * type: array
192 * description: The list of layout configurations.
193 * items:
194 * $ref: "#/components/schemas/AdminLayoutConfiguration"
195 * "400":
196 * $ref: "#/components/responses/400_error"
197 * "401":
198 * $ref: "#/components/responses/unauthorized"
199 * "404":
200 * $ref: "#/components/responses/not_found_error"
201 * "409":
202 * $ref: "#/components/responses/invalid_state_error"
203 * "422":
204 * $ref: "#/components/responses/invalid_request_error"
205 * "500":
206 * $ref: "#/components/responses/500_error"
207 * x-since: 2.17.2
208 *
209 */
210