export type CreateApiMusteriTelefonDogrulaArgs = {Authorization?: string | undefined, musteriid?: number | undefined, kod?: string | undefined, telefon?: string | undefined}; export type CreateApiMusteriTelefonDogrulaOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /musteri/telefon-dogrula */ export const createApiMusteriTelefonDogrula = async (args: CreateApiMusteriTelefonDogrulaArgs, options?: CreateApiMusteriTelefonDogrulaOptions) => { 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.musteriid != null) query.append("musteriid", String(args.musteriid)) if (args.kod != null) query.append("kod", String(args.kod)) if (args.telefon != null) query.append("telefon", String(args.telefon)) const url = `${baseUrl.replace(/\/+$/, '')}/musteri/telefon-dogrula${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() };