export type CreateApiSkeV2alpha1Thr3StandardWorkspacesWorkspaceUUIDSotoonaddonsResourceIdArgs = {resourceId: string, workspaceUUID: string}; export type CreateApiSkeV2alpha1Thr3StandardWorkspacesWorkspaceUUIDSotoonaddonsResourceIdOptions = {baseUrl: string, BearerToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update Addon * * POST /ske/v2alpha1/thr3-standard/workspaces/{workspaceUUID}/sotoonaddons/{resourceId} */ export const createApiSkeV2alpha1Thr3StandardWorkspacesWorkspaceUUIDSotoonaddonsResourceId = async (args: CreateApiSkeV2alpha1Thr3StandardWorkspacesWorkspaceUUIDSotoonaddonsResourceIdArgs, options: CreateApiSkeV2alpha1Thr3StandardWorkspacesWorkspaceUUIDSotoonaddonsResourceIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, BearerToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerToken !== undefined) headers.set('authorization', `Bearer ${BearerToken}`) const url = `${baseUrl.replace(/\/+$/, '')}/ske/v2alpha1/thr3-standard/workspaces/${encodeURIComponent(String(args.workspaceUUID))}/sotoonaddons/${encodeURIComponent(String(args.resourceId))}${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 undefined };