export type CreateApiAdisyonAdisyonYazdirIdArgs = {Authorization?: string | undefined, id: number}; export type CreateApiAdisyonAdisyonYazdirIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /adisyon/adisyon-yazdir/{id} */ export const createApiAdisyonAdisyonYazdirId = async (args: CreateApiAdisyonAdisyonYazdirIdArgs, options?: CreateApiAdisyonAdisyonYazdirIdOptions) => { 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)) const url = `${baseUrl.replace(/\/+$/, '')}/adisyon/adisyon-yazdir/${encodeURIComponent(String(args.id))}${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() };