Skip to content

Releases

v1.29.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 11:36

TL;DR: new APIs in this release: the Admin API, spoken terms, style profiles and text correction.
Translation memories, style rules and multilingual glossaries gained many options and fixes.
Read Changed and Deprecated before upgrading; no public API is removed in this release.

Added

  • DocumentTranslationError copies httpStatusCode and shouldRetry from its
    cause when the cause is a DeepLError.
  • Added waitUntilTranslationMemoryJobDone(), which replaces
    isTranslationMemoryJobComplete(). It accepts the job as an ID or a
    TranslationMemoryJob, and WaitOptions or the timeout in milliseconds, and
    rejects with the job's error message if the job fails or expires.
    getTranslationMemoryJob() also accepts a TranslationMemoryJob.
  • Added result, status, done() and ok() to TranslationMemoryJob:
    the single entry of results, its status, whether the job completed, and
    whether it has not failed or expired. done() and ok() are optional members
    of the type, so objects built without them still compile; done() is also true
    for the deprecated 'downloaded' status.
  • Added the CreateTranslationMemoryImportOptions and
    ImportTranslationMemoryOptions types, with extraBodyParameters merged last
    into the import request body.
  • importTranslationMemoryFromFilepath() accepts a Buffer or ReadStream, with
    the new fileName option (or displayName) as the file name.
  • isTranslationMemoryJobComplete() also accepts WaitOptions.
  • The style rule methods getStyleRule(), updateStyleRuleName(),
    updateStyleRuleConfiguredRules(), deleteStyleRule() and the four custom
    instruction methods accept the style rule as an ID or a StyleRuleInfo
    object. getStyleRuleCustomInstruction(), updateStyleRuleCustomInstruction()
    and deleteStyleRuleCustomInstruction() accept the custom instruction as an
    ID or a CustomInstruction object.
  • Added an optional last options argument with extraBodyParameters to
    createStyleRule(), updateStyleRuleName(), updateStyleRuleConfiguredRules(),
    createStyleRuleCustomInstruction() and updateStyleRuleCustomInstruction()
    (types CreateStyleRuleOptions, UpdateStyleRuleNameOptions,
    UpdateStyleRuleConfiguredRulesOptions, CreateStyleRuleCustomInstructionOptions
    and UpdateStyleRuleCustomInstructionOptions).
  • Added translateDocumentUpload(), translateDocumentGetStatus() and
    translateDocumentDownload(), which replace uploadDocument(),
    getDocumentStatus() and downloadDocument() and behave the same.
  • Added documentId to DocumentStatus, parsed from document_id; undefined
    when the response does not contain it.
  • Added the timeoutMs option to DocumentTranslateOptions: the maximum time
    translateDocument() waits for the translation between upload and download.
    When it expires, translateDocument() rejects with a DocumentTranslationError.
  • Added the WaitOptions type with timeoutMs.
  • Added tagHandlingVersion to TextResult: the tag handling version used, parsed
    from the response; undefined when the API does not return it.
  • SentenceSplittingMode accepts '1' and '0', the API values, which are sent
    unchanged.
  • Added the extraBodyParameters option to BaseRequestOptions, and so to
    TranslateTextOptions, DocumentTranslateOptions, RephraseTextOptions and
    CorrectTextOptions.
    It replaces extraRequestParameters and behaves the same. Passing both
    throws ArgumentError.
  • Added NotFoundError, thrown when the API answers HTTP 404 on any endpoint.
    GlossaryNotFoundError now extends it.
  • Added httpStatusCode to DeepLError: the HTTP status code of the failed
    response, or undefined if there was no HTTP response.
  • Added shouldRetry to DeepLError (previously only on ConnectionError):
    true for HTTP 429, 5xx and transient network failures. For
    DeepLAdminClient.createDeveloperKey() it is true only when the request was
    not processed (HTTP 429, DNS failures and refused connections).
  • isFreeAccountAuthKey() is exported from the package root.
  • Added the styleProfile option to TranslateTextOptions and
    DocumentTranslateOptions to translate text and documents with a style
    profile, given as its ID or a StyleProfile object. It is sent as
    style_profile_id.
  • Added style profiles (/v3/style_profiles) to DeepLClient:
    listStyleProfiles(), createStyleProfile(), getStyleProfile(),
    updateStyleProfile() and deleteStyleProfile(). Added the StyleProfile,
    CreateStyleProfileOptions and UpdateStyleProfileOptions types. The
    options accept extraBodyParameters, and the linked glossaries, style rule
    lists and translation memories as IDs or objects; the options of
    updateStyleProfile() are optional.
  • Added spoken terms collections (/v3/spoken-terms) to DeepLClient:
    createSpokenTerms(), listSpokenTerms(), getSpokenTerms(),
    updateSpokenTerms(), getSpokenTermsEntries(), replaceSpokenTermsList(),
    deleteSpokenTerms() and deleteSpokenTermsList(). Added the SpokenTerms,
    SpokenTermsList and SpokenTermsEntries types, and the
    CreateSpokenTermsOptions, UpdateSpokenTermsOptions and
    ReplaceSpokenTermsListOptions types, which accept extraBodyParameters.
    The options of updateSpokenTerms() are optional; without them an empty body
    is sent. Terms are trimmed, then checked and sent trimmed.
  • Added the API Pro fields of GET /v2/usage to Usage: apiKeyCharacter,
    speechToTextMinutes and speechToSpeechMinutes (UsageDetail), products
    (array of the new UsageProduct type), and startTime and endTime
    (Date). They are undefined when the response does not contain them, as
    are the UsageProduct fields missing from a products entry.
    anyLimitReached() still checks only the character, document and team
    document usage.
  • Added the DeepLAdminClient class for the Admin API. It must be created with
    an admin API key and supports managing developer keys
    (createDeveloperKey(), listDeveloperKeys(), deactivateDeveloperKey(),
    renameDeveloperKey(), setDeveloperKeyUsageLimits()) and retrieving usage
    analytics (getUsageAnalytics(startDate, endDate, groupBy?),
    getCustomTagUsageAnalytics(startDate, endDate, aggregateBy?, page?)). Added
    the HttpClientOptions, DeepLAdminClientOptions, DeveloperKey,
    DeveloperKeyUsageLimits, DeveloperKeyUsageLimitsUpdate, AdminUsageReport,
    AdminUsageBreakdown, KeyUsage, AdminUsageGroupBy, CustomTagUsageReport,
    CustomTagUsage, CustomTagUsageBreakdown and CustomTagUsageAggregateBy
    types; AdminUsageGroupBy and CustomTagUsageAggregateBy also accept any
    other string, which is sent unchanged. The developer key methods take a
    trailing options argument (CreateDeveloperKeyOptions with label,
    DeactivateDeveloperKeyOptions, RenameDeveloperKeyOptions,
    SetDeveloperKeyUsageLimitsOptions) that accepts extraBodyParameters.
    AdminUsageBreakdown includes speechToSpeechMinutes.
    DeveloperKey.label, DeveloperKey.usageLimits, KeyUsage.apiKeyLabel,
    AdminUsageBreakdown.speechToSpeechMinutes,
    CustomTagUsageBreakdown.speechToSpeechMinutes, AdminUsageReport.totalUsage
    and startDate and endDate of both reports are optional and undefined
    when the response does not contain them, never 0, an all-zero breakdown or
    an invalid Date. Report dates are Dates at UTC midnight.
  • Added getLanguageResources() to DeepLClient, which retrieves the resources
    supported by the DeepL API and, for each feature, whether the source and/or
    target language must support it. Added the LanguageResource and
    ResourceFeature types.
    ResourceFeature.needsSourceSupport and needsTargetSupport are boolean
    and [secure] when the API omits them.
  • Added getLanguagesForResource() to DeepLClient, which retrieves the languages supported
    by a DeepL API resource (GET /v3/languages), whether each is usable as source
    and/or target language, and the features it supports. The optional include
    option adds beta languages and features, or features relying on third-party
    providers. Added the LanguageSupport, LanguageFeature,
    LanguageResourceName, LanguageInclude and GetLanguagesForResourceOptions types.
    LanguageResourceName and LanguageInclude accept any string in addition to
    their listed values, which is sent unchanged.
  • Added correctText() to DeepLClient, which corrects grammar, spelling and punctuation
    of a string or an array of strings via POST /v2/write/correct. Takes an optional
    target language and an optional CorrectTextOptions object (BaseRequestOptions, so
    extraBodyParameters), and returns WriteResult objects, like rephraseText().
  • Added the outputFormat option to DocumentTranslateOptions, which requests the file
    format of the translated document, for example 'docx'. By default the translated
    document has the same format as the input document.
  • Added the enableWatermark option to DocumentTranslateOptions, which adds a
    "Translated by DeepL" watermark to the translated document. Only supported for
    docx and pdf output.
  • Added translateDocumentWaitUntilDone(), which polls a document translation
    until it is done and resolves with the final DocumentStatus, or rejects with
    a DeepLError if the translation fails. Its optional second argument
    (WaitOptions) takes timeoutMs, after which it rejects with a DeepLError.
  • Added the RephraseTextOptions type with writingStyle and tone. It
    extends BaseRequestOptions, so it also accepts extraBodyParameters,
    which are added to the request body and override parameters of the same
    name. rephraseText() accepts it as its third argument.
  • createStyleRule() accepts the name, language, configured rules and custom
    instructions as separate arguments:
    `createStyleRule(name, language, configu...
Read more

v1.28.1

Choose a tag to compare

@github-actions github-actions released this 09 Oct 08:16

Security

  • Bumped axios to ^1.20.0 and adm-zip to ^0.6.1 to resolve
    high-severity npm audit advisories in production dependencies.

v1.28.0

Choose a tag to compare

@BriannaDelgado BriannaDelgado released this 12 Aug 02:37
v1.28.0
d092087

Added

  • Added support for using multiple glossaries in text and document translation
    via the glossaryIds option (up to 5 glossary IDs) in TranslateTextOptions
    and DocumentTranslateOptions.
  • Added support for style rules in document translation via the styleRule
    option in DocumentTranslateOptions.
  • Added support for translation memories in document translation via the
    translationMemory and translationMemoryThreshold options in
    DocumentTranslateOptions.
  • Added support for the translation memory management APIs:
    getTranslationMemory(), listTranslationMemorySegments(),
    deleteTranslationMemory(), createTranslationMemoryImport(),
    uploadTranslationMemoryFile(), createTranslationMemoryExport(),
    getTranslationMemoryJob(), isTranslationMemoryJobComplete(), and
    downloadTranslationMemoryExport(), along with the
    importTranslationMemoryFromFilepath() and
    exportTranslationMemoryToFilepath() convenience functions that create the
    job, transfer the TMX file, and wait for the job to finish. Because the API
    detects the file upload asynchronously, an import job keeps reporting
    awaiting_input for a while after the upload; the wait loop polls through
    that status and accepts an optional timeoutMs to bound the wait.
  • Added the TranslationMemorySegments, TranslationMemorySegment,
    TranslationMemoryTargetSegment, TranslationMemorySegmentsOptions,
    TranslationMemoryImport, TranslationMemoryExport, TranslationMemoryJob,
    TranslationMemoryJobResult, and TranslationMemoryJobStatus types.
  • Added optional creationTime and updatedTime fields to
    TranslationMemoryInfo.

Changed

  • Requests to the pre-signed storage URLs used for translation memory import and export now
    go through a separate HTTP client that is constructed without the DeepL Authorization
    header, instead of stripping it per request. Headers supplied via TranslatorOptions.headers
    are no longer sent to those URLs either — only the User-Agent and the per-request
    Content-Type. Proxy settings are unaffected.

Fixed

  • The debug log helper no longer crashes when axios error fields return a non-primitive from toString or Symbol.toPrimitive.

Security

  • Bumped axios to ^1.19.0, form-data to ^3.0.5, and adm-zip to
    ^0.6.0 to resolve high-severity npm audit advisories in production
    dependencies.

v1.26.0

Choose a tag to compare

@BriannaDelgado BriannaDelgado released this 09 Apr 20:22
v1.26.0

Added

  • Added support for translation memories in text translation via
    translationMemory and translationMemoryThreshold options in
    translateText().
  • Added listTranslationMemories() method to the DeepLClient class for
    listing available translation memories.

Changed

Fixed

  • Fix write tests that broke from language expansion

v1.25.0

Choose a tag to compare

@BriannaDelgado BriannaDelgado released this 26 Mar 20:25
v1.25.0
a4e95be

Added

  • Added new language constants from January 2026 API release of 81 new languages.
  • Added jsonBody option to SendRequestOptions, enabling JSON-encoded API calls.
  • Added support for style rules CRUD endpoints in the DeepLClient class: createStyleRule(), getStyleRule(), updateStyleRuleName(), updateStyleRuleConfiguredRules(), and deleteStyleRule().
  • Added support for style rule custom instruction CRUD endpoints in theDeepLClient class: createStyleRuleCustomInstruction(), getStyleRuleCustomInstruction(), updateStyleRuleCustomInstruction(), and deleteStyleRuleCustomInstruction().
    Please refer to the README for usage instructions.

v1.24.0

Choose a tag to compare

@BriannaDelgado BriannaDelgado released this 21 Jan 17:02
d8750ad

Added

  • Added tagHandlingVersion parameter to translateText() to specify which version of the tag handling algorithm to use. Options are v1 and v2.

v1.23.0

Choose a tag to compare

@BriannaDelgado BriannaDelgado released this 08 Dec 21:17
v1.23.0
7819c05

Added

  • Added customInstructions parameter to translateText() to customize translation behavior with up to 10 instructions (max 300 characters each). Only supported for target languages: de, en, es, fr, it, ja, ko, zh and their variants. Note: using the customInstructions parameter will use quality_optimized model type as the default. Requests combining customInstructions and the latency_optimized model type will be rejected.

v1.22.0

Choose a tag to compare

@BriannaDelgado BriannaDelgado released this 12 Nov 21:18
v1.22.0
7819c05

Added

  • Added support for the GET /v3/style_rules endpoint in the client library, the implementation can be found in the DeepLClient class. Please refer to the README for usage instructions
  • Added styleId option to translateText() which allows text and document translation with style rules.

v1.21.0

Choose a tag to compare

@daniel-jones-dev daniel-jones-dev released this 03 Nov 15:06
863f2ee

Added

  • Added extraRequestParameters option to text and document translation methods to pass arbitrary parameters in the request body. This can be used to access beta features or override built-in parameters (such as target_lang, source_lang, etc.).

v1.20.0

Choose a tag to compare

@leoncheng57 leoncheng57 released this 08 Oct 15:05
3813215

Added

  • Official support for Node.js versions 20, 22 and 24

Fixed

  • Fixed document minification/deminification to preserve translated content. Previously, when document minification was enabled, the deminify process would use the original minified file instead of the translated version, causing translations to be lost.
  • Fixed handling of documents without media files during translation. The library now correctly processes documents that don't contain embedded media.