export type DeleteApiV1WorkspaceTranslationContentLocaleFileArgs = {workspace: string, locale_file: string}; export type DeleteApiV1WorkspaceTranslationContentLocaleFileOptions = {baseUrl?: string | undefined, ServiceTokenAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Translation * * DELETE /v1/{workspace}/translation/content/{locale_file}/ */ export const deleteApiV1WorkspaceTranslationContentLocaleFile = async (args: DeleteApiV1WorkspaceTranslationContentLocaleFileArgs, options?: DeleteApiV1WorkspaceTranslationContentLocaleFileOptions) => { const {baseUrl = "https://management-api.suprsend.com", fetch: fetchFn = fetch, ServiceTokenAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ServiceTokenAuth !== undefined) headers.set("Authorization", ServiceTokenAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/${encodeURIComponent(String(args.workspace))}/translation/content/${encodeURIComponent(String(args.locale_file))}/${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 };