export type BetConstructSSOAuthAPIViewModelsUpdateViewModelRegisteredClientUrlUpdateViewModel = {id?: number | undefined, countryCode: string, url: string, registeredApplicationId?: number | undefined}; export type UpdateApiV1RegisteredApplicationsCountriesIdArgs = {id: number, body: BetConstructSSOAuthAPIViewModelsUpdateViewModelRegisteredClientUrlUpdateViewModel}; export type UpdateApiV1RegisteredApplicationsCountriesIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PUT /V1/RegisteredApplications/countries/{id} */ export const updateApiV1RegisteredApplicationsCountriesId = async (args: UpdateApiV1RegisteredApplicationsCountriesIdArgs, options: UpdateApiV1RegisteredApplicationsCountriesIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/V1/RegisteredApplications/countries/${encodeURIComponent(String(args.id))}${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 };