export type Archivo = {height?: number | undefined, timestamp?: string | undefined, uri?: (string | null) | undefined, fileName?: (string | null) | undefined, data?: (string | null) | undefined}; export type PaisRequest = {paisID?: (number | null) | undefined, nombre?: (string | null) | undefined, short?: (string | null) | undefined, phoneCode?: (string | null) | undefined, isActive?: boolean | undefined, regionID?: (number | null) | undefined, idioma?: (string | null) | undefined, timeZone?: (string | null) | undefined, dolarsXPuntos?: (number | null) | undefined, puntajeMinimo?: (number | null) | undefined, minimunEvaluationPoints?: number | undefined, modoPremiosPais?: (string | null) | undefined, txtNoPremiosPais?: (string | null) | undefined, txtContrato?: (string | null) | undefined, isPuntosXRegistro?: boolean | undefined, puntosPorRegistro?: number | undefined, iconPais?: Archivo | undefined}; export type UpdateApiV1ApiPaisesPaisIDArgs = {PaisID: number, body: PaisRequest}; export type UpdateApiV1ApiPaisesPaisIDOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * PUT /v1/api/Paises/{PaisID} */ export const updateApiV1ApiPaisesPaisID = async (args: UpdateApiV1ApiPaisesPaisIDArgs, options: UpdateApiV1ApiPaisesPaisIDOptions) => { const {baseUrl, fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/v1/api/Paises/${encodeURIComponent(String(args.PaisID))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };