1 /**
2 * @oas [get] /admin/users/me
3 * operationId: GetUsersMe
4 * summary: Get Logged-In User
5 * description: Retrieve the logged-in user's details.
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 * x-codeSamples:
21 * - lang: JavaScript
22 * label: JS SDK
23 * source: |-
24 * import Medusa from "@medusajs/js-sdk"
25 *
26 * export const sdk = new Medusa({
27 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
28 * debug: import.meta.env.DEV,
29 * auth: {
30 * type: "session",
31 * },
32 * })
33 *
34 * sdk.admin.user.me()
35 * .then(({ user }) => {
36 * console.log(user)
37 * })
38 * - lang: Shell
39 * label: cURL
40 * source: curl '{backend_url}/admin/users/me'
41 * tags:
42 * - Users
43 * responses:
44 * "200":
45 * description: OK
46 * content:
47 * application/json:
48 * schema:
49 * $ref: "#/components/schemas/AdminUserResponse"
50 * "400":
51 * $ref: "#/components/responses/400_error"
52 * "401":
53 * $ref: "#/components/responses/unauthorized"
54 * "404":
55 * $ref: "#/components/responses/not_found_error"
56 * "409":
57 * $ref: "#/components/responses/invalid_state_error"
58 * "422":
59 * $ref: "#/components/responses/invalid_request_error"
60 * "500":
61 * $ref: "#/components/responses/500_error"
62 * security:
63 * - cookie_auth: []
64 * - jwt_token: []
65 *
66 */
67