export type DeleteApiV1OrgOrgIdGoalGoalIdTargetGoalTargetIdArgs = {orgId: string, goalId: string, goalTargetId: string}; export type DeleteApiV1OrgOrgIdGoalGoalIdTargetGoalTargetIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a goal target * * DELETE /v1/org/{orgId}/goal/{goalId}/target/{goalTargetId} */ export const deleteApiV1OrgOrgIdGoalGoalIdTargetGoalTargetId = async (args: DeleteApiV1OrgOrgIdGoalGoalIdTargetGoalTargetIdArgs, options?: DeleteApiV1OrgOrgIdGoalGoalIdTargetGoalTargetIdOptions) => { const {baseUrl = "https://localhost", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/org/${encodeURIComponent(String(args.orgId))}/goal/${encodeURIComponent(String(args.goalId))}/target/${encodeURIComponent(String(args.goalTargetId))}${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 };