1 /**
2 * @oas [delete] /admin/invites/{id}
3 * operationId: DeleteInvitesId
4 * summary: Delete Invite
5 * description: Delete an invite.
6 * x-authenticated: true
7 * parameters:
8 * - name: id
9 * in: path
10 * description: The invite's ID.
11 * required: true
12 * schema:
13 * type: string
14 * x-codeSamples:
15 * - lang: JavaScript
16 * label: JS SDK
17 * source: |-
18 * import Medusa from "@medusajs/js-sdk"
19 *
20 * export const sdk = new Medusa({
21 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
22 * debug: import.meta.env.DEV,
23 * auth: {
24 * type: "session",
25 * },
26 * })
27 *
28 * sdk.admin.invite.delete("invite_123")
29 * .then(({ deleted }) => {
30 * console.log(deleted)
31 * })
32 * - lang: Shell
33 * label: cURL
34 * source: curl -X DELETE '{backend_url}/admin/invites/{id}'
35 * tags:
36 * - Invites
37 * responses:
38 * "200":
39 * description: OK
40 * content:
41 * application/json:
42 * schema:
43 * type: object
44 * description: The deletion's details.
45 * required:
46 * - id
47 * - object
48 * - deleted
49 * properties:
50 * id:
51 * type: string
52 * title: id
53 * description: The invite's ID.
54 * object:
55 * type: string
56 * title: object
57 * description: The name of the deleted object.
58 * default: invite
59 * deleted:
60 * type: boolean
61 * title: deleted
62 * description: Whether the invite was deleted.
63 * "400":
64 * $ref: "#/components/responses/400_error"
65 * "401":
66 * $ref: "#/components/responses/unauthorized"
67 * "404":
68 * $ref: "#/components/responses/not_found_error"
69 * "409":
70 * $ref: "#/components/responses/invalid_state_error"
71 * "422":
72 * $ref: "#/components/responses/invalid_request_error"
73 * "500":
74 * $ref: "#/components/responses/500_error"
75 * x-workflow: deleteInvitesWorkflow
76 * security:
77 * - api_token: []
78 * - cookie_auth: []
79 * - jwt_token: []
80 * x-events:
81 * - name: invite.deleted
82 * payload: |-
83 * ```ts
84 * {
85 * id, // The ID of the invite
86 * }
87 * ```
88 * description: Emitted when invites are deleted.
89 * deprecated: false
90 *
91 */
92