export type DeleteApiAiSettingsCustomPlaceholdersAiCustomPlaceholderIdArgs = {aiCustomPlaceholderId: number}; export type DeleteApiAiSettingsCustomPlaceholdersAiCustomPlaceholderIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete AI Custom Placeholder * * DELETE /ai/settings/custom-placeholders/{aiCustomPlaceholderId} */ export const deleteApiAiSettingsCustomPlaceholdersAiCustomPlaceholderId = async (args: DeleteApiAiSettingsCustomPlaceholdersAiCustomPlaceholderIdArgs, options?: DeleteApiAiSettingsCustomPlaceholdersAiCustomPlaceholderIdOptions) => { const {baseUrl = "https://api.crowdin.com/api/v2", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/ai/settings/custom-placeholders/${encodeURIComponent(String(args.aiCustomPlaceholderId))}${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 };