export type DeleteApiV1AppsAppIdUsersIdentifierArgs = {appId: number, identifier: string}; export type DeleteApiV1AppsAppIdUsersIdentifierOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * DELETE /v1/apps/{appId}/users/{identifier} */ export const deleteApiV1AppsAppIdUsersIdentifier = async (args: DeleteApiV1AppsAppIdUsersIdentifierArgs, options: DeleteApiV1AppsAppIdUsersIdentifierOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/apps/${encodeURIComponent(String(args.appId))}/users/${encodeURIComponent(String(args.identifier))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };