export type UpdateApiV1AppsAppIdSecureAuthArgs = {appId: number}; export type UpdateApiV1AppsAppIdSecureAuthOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PUT /v1/apps/{appId}/secure-auth */ export const updateApiV1AppsAppIdSecureAuth = async (args: UpdateApiV1AppsAppIdSecureAuthArgs, options: UpdateApiV1AppsAppIdSecureAuthOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/apps/${encodeURIComponent(String(args.appId))}/secure-auth${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };