export type DeleteApiV1CardHierarchiesCardHierarchyIdGroupsGroupIdCardsCardIdArgs = {cardHierarchyId: unknown, groupId: unknown, cardId: unknown, auditUser: string}; export type DeleteApiV1CardHierarchiesCardHierarchyIdGroupsGroupIdCardsCardIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete Card from Group * * DELETE /v1/card-hierarchies/{cardHierarchyId}/groups/{groupId}/cards/{cardId} */ export const deleteApiV1CardHierarchiesCardHierarchyIdGroupsGroupIdCardsCardId = async (args: DeleteApiV1CardHierarchiesCardHierarchyIdGroupsGroupIdCardsCardIdArgs, options: DeleteApiV1CardHierarchiesCardHierarchyIdGroupsGroupIdCardsCardIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.auditUser != null) query.append("auditUser", String(args.auditUser)) const url = `${baseUrl.replace(/\/+$/, '')}/v1/card-hierarchies/${encodeURIComponent(String(args.cardHierarchyId))}/groups/${encodeURIComponent(String(args.groupId))}/cards/${encodeURIComponent(String(args.cardId))}${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 };