export type DeleteApiProjectsProjectIdFileFormatSettingsFileFormatSettingsIdCustomSegmentationsArgs = {projectId: number, fileFormatSettingsId: number}; export type DeleteApiProjectsProjectIdFileFormatSettingsFileFormatSettingsIdCustomSegmentationsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reset Project File Format Settings Custom Segmentation * * DELETE /projects/{projectId}/file-format-settings/{fileFormatSettingsId}/custom-segmentations */ export const deleteApiProjectsProjectIdFileFormatSettingsFileFormatSettingsIdCustomSegmentations = async (args: DeleteApiProjectsProjectIdFileFormatSettingsFileFormatSettingsIdCustomSegmentationsArgs, options?: DeleteApiProjectsProjectIdFileFormatSettingsFileFormatSettingsIdCustomSegmentationsOptions) => { const {baseUrl = "https://api.crowdin.com/api/v2", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/projects/${encodeURIComponent(String(args.projectId))}/file-format-settings/${encodeURIComponent(String(args.fileFormatSettingsId))}/custom-segmentations${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 };