1 /**
2 * @oas [get] /admin/invites
3 * operationId: GetInvites
4 * summary: List Invites
5 * description: Retrieve a list of invites. The invites can be filtered by fields such as `id`. The invites can also be sorted or paginated.
6 * x-authenticated: true
7 * parameters:
8 * - name: fields
9 * in: query
10 * 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
11 * fields. without prefix it will replace the entire default fields.
12 * required: false
13 * schema:
14 * type: string
15 * title: fields
16 * 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
17 * fields. without prefix it will replace the entire default fields.
18 * externalDocs:
19 * url: "#select-fields-and-relations"
20 * - name: offset
21 * in: query
22 * description: The number of items to skip when retrieving a list.
23 * required: false
24 * schema:
25 * type: number
26 * title: offset
27 * description: The number of items to skip when retrieving a list.
28 * externalDocs:
29 * url: "#pagination"
30 * - name: limit
31 * in: query
32 * description: Limit the number of items returned in the list.
33 * required: false
34 * schema:
35 * type: number
36 * title: limit
37 * description: Limit the number of items returned in the list.
38 * externalDocs:
39 * url: "#pagination"
40 * - name: order
41 * in: query
42 * 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 `-`.
43 * required: false
44 * schema:
45 * type: string
46 * title: order
47 * 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 `-`.
48 * - name: q
49 * in: query
50 * description: Search term to apply on an invite's searchable properties.
51 * required: false
52 * schema:
53 * type: string
54 * title: q
55 * description: Search term to apply on an invite's searchable properties.
56 * - name: id
57 * in: query
58 * required: false
59 * schema:
60 * oneOf:
61 * - type: string
62 * title: id
63 * description: Filter by an invite's ID.
64 * - type: array
65 * description: Filter by invite IDs.
66 * items:
67 * type: string
68 * title: id
69 * description: An invite's ID.
70 * - name: email
71 * in: query
72 * required: false
73 * schema:
74 * oneOf:
75 * - type: string
76 * title: email
77 * description: Filter by an invite's email.
78 * format: email
79 * - type: array
80 * description: Filter by invite emails.
81 * items:
82 * type: string
83 * title: email
84 * description: An email.
85 * format: email
86 * - name: created_at
87 * in: query
88 * description: Filter by the invite's creation date.
89 * required: false
90 * schema:
91 * type: object
92 * description: Filter by the invite's creation date.
93 * properties:
94 * $and:
95 * type: array
96 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
97 * items:
98 * type: object
99 * title: $and
100 * $or:
101 * type: array
102 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
103 * items:
104 * type: object
105 * title: $or
106 * $eq:
107 * oneOf:
108 * - type: string
109 * title: $eq
110 * description: Filter by an exact match.
111 * - type: array
112 * description: Filter by an exact match.
113 * items:
114 * type: string
115 * title: $eq
116 * description: Filter by an exact match.
117 * $ne:
118 * type: string
119 * title: $ne
120 * description: Filter by values not equal to this parameter.
121 * $in:
122 * type: array
123 * description: Filter by values in this array.
124 * items:
125 * type: string
126 * title: $in
127 * description: Filter by values in this array.
128 * $nin:
129 * type: array
130 * description: Filter by values not in this array.
131 * items:
132 * type: string
133 * title: $nin
134 * description: Filter by values not in this array.
135 * $not:
136 * oneOf:
137 * - type: string
138 * title: $not
139 * description: Filter by values not matching the conditions in this parameter.
140 * - type: object
141 * description: Filter by values not matching the conditions in this parameter.
142 * - type: array
143 * description: Filter by values not matching the conditions in this parameter.
144 * items:
145 * type: string
146 * title: $not
147 * description: Filter by values not matching the conditions in this parameter.
148 * $gt:
149 * type: string
150 * title: $gt
151 * description: Filter by values greater than this parameter. Useful for numbers and dates only.
152 * $gte:
153 * type: string
154 * title: $gte
155 * description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
156 * $lt:
157 * type: string
158 * title: $lt
159 * description: Filter by values less than this parameter. Useful for numbers and dates only.
160 * $lte:
161 * type: string
162 * title: $lte
163 * description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
164 * $like:
165 * type: string
166 * title: $like
167 * description: Apply a `like` filter. Useful for strings only.
168 * $re:
169 * type: string
170 * title: $re
171 * description: Apply a regex filter. Useful for strings only.
172 * $ilike:
173 * type: string
174 * title: $ilike
175 * description: Apply a case-insensitive `like` filter. Useful for strings only.
176 * $fulltext:
177 * type: string
178 * title: $fulltext
179 * description: Filter to apply on full-text properties.
180 * $overlap:
181 * type: array
182 * description: Filter arrays that have overlapping values with this parameter.
183 * items:
184 * type: string
185 * title: $overlap
186 * description: Filter arrays that have overlapping values with this parameter.
187 * $contains:
188 * type: array
189 * description: Filter arrays that contain some of the values of this parameter.
190 * items:
191 * type: string
192 * title: $contains
193 * description: Filter arrays that contain some of the values of this parameter.
194 * $contained:
195 * type: array
196 * description: Filter arrays that contain all values of this parameter.
197 * items:
198 * type: string
199 * title: $contained
200 * description: Filter arrays that contain all values of this parameter.
201 * $exists:
202 * type: boolean
203 * title: $exists
204 * description: Filter by whether a value for this parameter exists (not `null`).
205 * title: created_at
206 * - name: updated_at
207 * in: query
208 * description: Filter by the invite's update date.
209 * required: false
210 * schema:
211 * type: object
212 * description: Filter by the invite's update date.
213 * properties:
214 * $and:
215 * type: array
216 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
217 * items:
218 * type: object
219 * title: $and
220 * $or:
221 * type: array
222 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
223 * items:
224 * type: object
225 * title: $or
226 * $eq:
227 * oneOf:
228 * - type: string
229 * title: $eq
230 * description: Filter by an exact match.
231 * - type: array
232 * description: Filter by an exact match.
233 * items:
234 * type: string
235 * title: $eq
236 * description: Filter by an exact match.
237 * $ne:
238 * type: string
239 * title: $ne
240 * description: Filter by values not equal to this parameter.
241 * $in:
242 * type: array
243 * description: Filter by values in this array.
244 * items:
245 * type: string
246 * title: $in
247 * description: Filter by values in this array.
248 * $nin:
249 * type: array
250 * description: Filter by values not in this array.
251 * items:
252 * type: string
253 * title: $nin
254 * description: Filter by values not in this array.
255 * $not:
256 * oneOf:
257 * - type: string
258 * title: $not
259 * description: Filter by values not matching the conditions in this parameter.
260 * - type: object
261 * description: Filter by values not matching the conditions in this parameter.
262 * - type: array
263 * description: Filter by values not matching the conditions in this parameter.
264 * items:
265 * type: string
266 * title: $not
267 * description: Filter by values not matching the conditions in this parameter.
268 * $gt:
269 * type: string
270 * title: $gt
271 * description: Filter by values greater than this parameter. Useful for numbers and dates only.
272 * $gte:
273 * type: string
274 * title: $gte
275 * description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
276 * $lt:
277 * type: string
278 * title: $lt
279 * description: Filter by values less than this parameter. Useful for numbers and dates only.
280 * $lte:
281 * type: string
282 * title: $lte
283 * description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
284 * $like:
285 * type: string
286 * title: $like
287 * description: Apply a `like` filter. Useful for strings only.
288 * $re:
289 * type: string
290 * title: $re
291 * description: Apply a regex filter. Useful for strings only.
292 * $ilike:
293 * type: string
294 * title: $ilike
295 * description: Apply a case-insensitive `like` filter. Useful for strings only.
296 * $fulltext:
297 * type: string
298 * title: $fulltext
299 * description: Filter to apply on full-text properties.
300 * $overlap:
301 * type: array
302 * description: Filter arrays that have overlapping values with this parameter.
303 * items:
304 * type: string
305 * title: $overlap
306 * description: Filter arrays that have overlapping values with this parameter.
307 * $contains:
308 * type: array
309 * description: Filter arrays that contain some of the values of this parameter.
310 * items:
311 * type: string
312 * title: $contains
313 * description: Filter arrays that contain some of the values of this parameter.
314 * $contained:
315 * type: array
316 * description: Filter arrays that contain all values of this parameter.
317 * items:
318 * type: string
319 * title: $contained
320 * description: Filter arrays that contain all values of this parameter.
321 * $exists:
322 * type: boolean
323 * title: $exists
324 * description: Filter by whether a value for this parameter exists (not `null`).
325 * title: updated_at
326 * - name: deleted_at
327 * in: query
328 * description: Filter by the invite's deletion date.
329 * required: false
330 * schema:
331 * type: object
332 * description: Filter by the invite's deletion date.
333 * properties:
334 * $and:
335 * type: array
336 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
337 * items:
338 * type: object
339 * title: $and
340 * $or:
341 * type: array
342 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
343 * items:
344 * type: object
345 * title: $or
346 * $eq:
347 * oneOf:
348 * - type: string
349 * title: $eq
350 * description: Filter by an exact match.
351 * - type: array
352 * description: Filter by an exact match.
353 * items:
354 * type: string
355 * title: $eq
356 * description: Filter by an exact match.
357 * $ne:
358 * type: string
359 * title: $ne
360 * description: Filter by values not equal to this parameter.
361 * $in:
362 * type: array
363 * description: Filter by values in this array.
364 * items:
365 * type: string
366 * title: $in
367 * description: Filter by values in this array.
368 * $nin:
369 * type: array
370 * description: Filter by values not in this array.
371 * items:
372 * type: string
373 * title: $nin
374 * description: Filter by values not in this array.
375 * $not:
376 * oneOf:
377 * - type: string
378 * title: $not
379 * description: Filter by values not matching the conditions in this parameter.
380 * - type: object
381 * description: Filter by values not matching the conditions in this parameter.
382 * - type: array
383 * description: Filter by values not matching the conditions in this parameter.
384 * items:
385 * type: string
386 * title: $not
387 * description: Filter by values not matching the conditions in this parameter.
388 * $gt:
389 * type: string
390 * title: $gt
391 * description: Filter by values greater than this parameter. Useful for numbers and dates only.
392 * $gte:
393 * type: string
394 * title: $gte
395 * description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
396 * $lt:
397 * type: string
398 * title: $lt
399 * description: Filter by values less than this parameter. Useful for numbers and dates only.
400 * $lte:
401 * type: string
402 * title: $lte
403 * description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
404 * $like:
405 * type: string
406 * title: $like
407 * description: Apply a `like` filter. Useful for strings only.
408 * $re:
409 * type: string
410 * title: $re
411 * description: Apply a regex filter. Useful for strings only.
412 * $ilike:
413 * type: string
414 * title: $ilike
415 * description: Apply a case-insensitive `like` filter. Useful for strings only.
416 * $fulltext:
417 * type: string
418 * title: $fulltext
419 * description: Filter to apply on full-text properties.
420 * $overlap:
421 * type: array
422 * description: Filter arrays that have overlapping values with this parameter.
423 * items:
424 * type: string
425 * title: $overlap
426 * description: Filter arrays that have overlapping values with this parameter.
427 * $contains:
428 * type: array
429 * description: Filter arrays that contain some of the values of this parameter.
430 * items:
431 * type: string
432 * title: $contains
433 * description: Filter arrays that contain some of the values of this parameter.
434 * $contained:
435 * type: array
436 * description: Filter arrays that contain all values of this parameter.
437 * items:
438 * type: string
439 * title: $contained
440 * description: Filter arrays that contain all values of this parameter.
441 * $exists:
442 * type: boolean
443 * title: $exists
444 * description: Filter by whether a value for this parameter exists (not `null`).
445 * title: deleted_at
446 * - name: $and
447 * in: query
448 * required: false
449 * schema:
450 * type: array
451 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
452 * items:
453 * type: object
454 * title: $and
455 * - name: $or
456 * in: query
457 * required: false
458 * schema:
459 * type: array
460 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
461 * items:
462 * type: object
463 * title: $or
464 * - name: with_deleted
465 * in: query
466 * description: Whether to include deleted records in the result.
467 * required: false
468 * schema:
469 * type: boolean
470 * title: with_deleted
471 * description: Whether to include deleted records in the result.
472 * x-codeSamples:
473 * - lang: JavaScript
474 * label: JS SDK
475 * source: |-
476 * import Medusa from "@medusajs/js-sdk"
477 *
478 * export const sdk = new Medusa({
479 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
480 * debug: import.meta.env.DEV,
481 * auth: {
482 * type: "session",
483 * },
484 * })
485 *
486 * sdk.admin.invite.list()
487 * .then(({ invites, count, limit, offset }) => {
488 * console.log(invites)
489 * })
490 * - lang: Shell
491 * label: cURL
492 * source: curl '{backend_url}/admin/invites'
493 * tags:
494 * - Invites
495 * responses:
496 * "200":
497 * description: OK
498 * content:
499 * application/json:
500 * schema:
501 * allOf:
502 * - type: object
503 * description: The paginated list of invites.
504 * required:
505 * - limit
506 * - offset
507 * - count
508 * properties:
509 * limit:
510 * type: number
511 * title: limit
512 * description: The maximum number of items retrieved.
513 * offset:
514 * type: number
515 * title: offset
516 * description: The number of items skipped before the returned items.
517 * count:
518 * type: number
519 * title: count
520 * description: The total number of items.
521 * - type: object
522 * description: The paginated list of invites.
523 * required:
524 * - invites
525 * properties:
526 * invites:
527 * type: array
528 * description: The list of invites.
529 * items:
530 * $ref: "#/components/schemas/AdminInvite"
531 * "400":
532 * $ref: "#/components/responses/400_error"
533 * "401":
534 * $ref: "#/components/responses/unauthorized"
535 * "404":
536 * $ref: "#/components/responses/not_found_error"
537 * "409":
538 * $ref: "#/components/responses/invalid_state_error"
539 * "422":
540 * $ref: "#/components/responses/invalid_request_error"
541 * "500":
542 * $ref: "#/components/responses/500_error"
543 * security:
544 * - api_token: []
545 * - cookie_auth: []
546 * - jwt_token: []
547 *
548 */
549