export type DeleteApiV1FoldersIdSharesUsersUserIdArgs = {id: number, userId: number}; export type DeleteApiV1FoldersIdSharesUsersUserIdOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Folder User Collaborator * * DELETE /v1/folders/{id}/shares/users/{userId} * * Also accepts auth: OAuth2 */ export const deleteApiV1FoldersIdSharesUsersUserId = async (args: DeleteApiV1FoldersIdSharesUsersUserIdArgs, options?: DeleteApiV1FoldersIdSharesUsersUserIdOptions) => { const {baseUrl = "https://api.lucid.co", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKey !== undefined) headers.set('authorization', `Bearer ${ApiKey}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/folders/${encodeURIComponent(String(args.id))}/shares/users/${encodeURIComponent(String(args.userId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };