export type CreateApiAdminUsersUserIdBackfillRidesArgs = {userId: number}; export type CreateApiAdminUsersUserIdBackfillRidesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * POST /admin/users/{userId}/backfill-rides */ export const createApiAdminUsersUserIdBackfillRides = async (args: CreateApiAdminUsersUserIdBackfillRidesArgs, options: CreateApiAdminUsersUserIdBackfillRidesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/admin/users/${encodeURIComponent(String(args.userId))}/backfill-rides${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };