export type DeleteApiSkillsSkillIdArgs = {skill_id: string}; export type DeleteApiSkillsSkillIdOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Supprimer une Skill * * DELETE /skills/{skill_id} */ export const deleteApiSkillsSkillId = async (args: DeleteApiSkillsSkillIdArgs, options?: DeleteApiSkillsSkillIdOptions) => { const {baseUrl = "https://apis.smartly.ai", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/skills/${encodeURIComponent(String(args.skill_id))}${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 };