export type UpdateApiV2CollaborationGroupsGroupsCollaborationGroupIdUnarchiveArgs = {collaborationGroupId: number}; export type UpdateApiV2CollaborationGroupsGroupsCollaborationGroupIdUnarchiveOptions = {baseUrl?: string | undefined, OAuth2ClientCredentials?: string | undefined, fetch?: typeof fetch | undefined}; /** * Unarchive collaboration group * * PUT /v2/collaboration-groups/groups/{collaborationGroupId}/unarchive */ export const updateApiV2CollaborationGroupsGroupsCollaborationGroupIdUnarchive = async (args: UpdateApiV2CollaborationGroupsGroupsCollaborationGroupIdUnarchiveArgs, options?: UpdateApiV2CollaborationGroupsGroupsCollaborationGroupIdUnarchiveOptions) => { const {baseUrl = "https://api.quinyx.com", fetch: fetchFn = fetch, OAuth2ClientCredentials} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (OAuth2ClientCredentials !== undefined) headers.set('authorization', `Bearer ${OAuth2ClientCredentials}`) const url = `${baseUrl.replace(/\/+$/, '')}/v2/collaboration-groups/groups/${encodeURIComponent(String(args.collaborationGroupId))}/unarchive${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 };