export type CreateApiAdisyonDurumGuncelleArgs = {Authorization?: string | undefined, id?: number | undefined, durum?: string | undefined}; export type CreateApiAdisyonDurumGuncelleOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /adisyon/durum-guncelle */ export const createApiAdisyonDurumGuncelle = async (args: CreateApiAdisyonDurumGuncelleArgs, options?: CreateApiAdisyonDurumGuncelleOptions) => { const {baseUrl = "https://demo.poskobi.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/octet-stream") if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) if (args.id != null) query.append("id", String(args.id)) if (args.durum != null) query.append("durum", String(args.durum)) const url = `${baseUrl.replace(/\/+$/, '')}/adisyon/durum-guncelle${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 res.blob() };