export type PatchApiResourceTenantLocatorUiConfigsNameArgs = {tenantLocator: string, 'Content-Type': string, name: string, body: BodyInit}; export type PatchApiResourceTenantLocatorUiConfigsNameOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PATCH /resource/{tenantLocator}/uiConfigs/{name} */ export const patchApiResourceTenantLocatorUiConfigsName = async (args: PatchApiResourceTenantLocatorUiConfigsNameArgs, options: PatchApiResourceTenantLocatorUiConfigsNameOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args['Content-Type'] != null) headers.set("Content-Type", String(args['Content-Type'])) const url = `${baseUrl.replace(/\/+$/, '')}/resource/${encodeURIComponent(String(args.tenantLocator))}/uiConfigs/${encodeURIComponent(String(args.name))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers, body: args.body}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };