export type GetApiSeatProfileMapsSameSeatProfileMapsArgs = {seat_profile_id: number}; export type GetApiSeatProfileMapsSameSeatProfileMapsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get same seat profile maps * * GET /seat_profile_maps/same_seat_profile_maps */ export const getApiSeatProfileMapsSameSeatProfileMaps = async (args: GetApiSeatProfileMapsSameSeatProfileMapsArgs, options?: GetApiSeatProfileMapsSameSeatProfileMapsOptions) => { const {baseUrl = "http://api.gostarmartbus.com/api", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.seat_profile_id != null) query.append("seat_profile_id", String(args.seat_profile_id)) const url = `${baseUrl.replace(/\/+$/, '')}/seat_profile_maps/same_seat_profile_maps${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };