export type DeleteApiV1CheckinsIdArgs = {id: number}; export type DeleteApiV1CheckinsIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * チェックインの削除 * * DELETE /v1/checkins/{id} */ export const deleteApiV1CheckinsId = async (args: DeleteApiV1CheckinsIdArgs, options?: DeleteApiV1CheckinsIdOptions) => { const {baseUrl = "https://shikorism.net/api", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/checkins/${encodeURIComponent(String(args.id))}${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 };