Skip to content

Commit 4e82fdf

Browse files
committed
Update to version 4.3.0 on 2026-10-31
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes. - New: Word templates (`template_type` `docx`). create_template makes one from a Word document (.docx, up to 50 MB) that you upload and pass as a `cache_id`, or pass as a `document_url` or `document_base64`; upload_template takes the file itself. update_template_document and upload_template_document replace its document the same ways. Each tag in the document, such as `{{ customer.name }}`, becomes a field. Each of them takes an OpenDocument text file (.odt) too, which DocSpring converts to a Word document. - New: a Word template's `output_format`, what its submissions make unless they set `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file) or `pdf`. create_template and upload_template require it, and update_template changes it. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. - New: the `docx` and `odt` output formats, a Word template's filled-in Word document (`files.docx`) and OpenDocument file (`files.odt`, converted from the Word document). Add them to `output_formats` in create_submission or create_submission_batch to get more than one file, such as the Word document and the PDF. - generate_submission_files takes `pdf`, the PDF of a Word template's submission that didn't make one (converted from its Word document), `docx`, the Word document of one that made only its PDF (made again from its data and the template version it used), and `odt`, its OpenDocument file. None of them uses credits again. Until the new file is ready, its `state` in `files` is `pending`, and when it couldn't be made, its `error_message` says why. - A Word template's `document` is its Word document: `document.permanent_url` downloads it. Its `state` is `processed` once it's uploaded or downloaded (`downloading` or `download_failed` while a `document_url` downloads, `converting` or `conversion_failed` while an OpenDocument file is converted), and get_template_diff's `document_changed` says whether it was edited. - get_template_page_images returns a 409 for a Word template, whose pages are only laid out when a document is made. - create_template_preview previews Word templates too: images of the pages of the PDF that the template's Word document makes with your data. A DocSpring server that can't convert Word documents to PDF returns a 409.
1 parent bc318e7 commit 4e82fdf

359 files changed

Lines changed: 1080 additions & 824 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ keeps it.
9090

9191
- List methods return `data` and `next_cursor`: pass `next_cursor` as `cursor` to get the next page.
9292
- Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v2 without a new
93-
version. The model object keeps a response field added to the API after this release as a property. The objects defined inside a model, such as a template's `document`, leave it out. Enum values in responses are strings, so a
94-
value added after this release comes back as it is: handle values you don't recognize.
93+
version. The model object keeps a response field added to the API after this release as a property. The objects defined inside a model, such as a template's `document`, leave it out. An enum value added after this release comes
94+
back as the API sent it: handle values you don't recognize.

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
### 4.3.0 [October 31, 2026]
2+
3+
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes.
4+
- New: Word templates (`template_type` `docx`). create_template makes one from a Word document (.docx, up to 50 MB)
5+
that you upload and pass as a `cache_id`, or pass as a `document_url` or `document_base64`; upload_template takes the
6+
file itself. update_template_document and upload_template_document replace its document the same ways. Each tag in
7+
the document, such as `{{ customer.name }}`, becomes a field. Each of them takes an OpenDocument text file (.odt)
8+
too, which DocSpring converts to a Word document.
9+
- New: a Word template's `output_format`, what its submissions make unless they set `output_formats`: `docx` (a Word
10+
document), `odt` (an OpenDocument file) or `pdf`. create_template and upload_template require it, and
11+
update_template changes it. A Word template that encrypts its PDFs makes PDFs, because Word documents and
12+
OpenDocument files can't be password-protected.
13+
- New: the `docx` and `odt` output formats, a Word template's filled-in Word document (`files.docx`) and OpenDocument
14+
file (`files.odt`, converted from the Word document). Add them to `output_formats` in create_submission or
15+
create_submission_batch to get more than one file, such as the Word document and the PDF.
16+
- generate_submission_files takes `pdf`, the PDF of a Word template's submission that didn't make one (converted from
17+
its Word document), `docx`, the Word document of one that made only its PDF (made again from its data and the
18+
template version it used), and `odt`, its OpenDocument file. None of them uses credits again. Until the new file is
19+
ready, its `state` in `files` is `pending`, and when it couldn't be made, its `error_message` says why.
20+
- A Word template's `document` is its Word document: `document.permanent_url` downloads it. Its `state` is `processed`
21+
once it's uploaded or downloaded (`downloading` or `download_failed` while a `document_url` downloads, `converting`
22+
or `conversion_failed` while an OpenDocument file is converted), and get_template_diff's `document_changed` says
23+
whether it was edited.
24+
- get_template_page_images returns a 409 for a Word template, whose pages are only laid out when a document is made.
25+
- create_template_preview previews Word templates too: images of the pages of the PDF that the template's Word
26+
document makes with your data. A DocSpring server that can't convert Word documents to PDF returns a 409.
27+
128
### 4.2.0 [October 29, 2026]
229

330
- **BREAKING CHANGE**: list_templates returns a shorter `TemplateSummary`: a template's name, description, type, folder

‎README.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# DocSpring JavaScript SDK
22

33
The official JavaScript client for the [DocSpring API](https://docspring.com/docs/api/). DocSpring fills PDF
4-
templates with your data, generates PDFs from HTML templates, combines PDFs and collects e-signatures.
4+
forms with your data, generates PDFs and Word documents from HTML and Word templates, combines PDFs and collects
5+
e-signatures.
56

67
[Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
78
[npm](https://www.npmjs.com/package/docspring) · [Changelog](https://github.com/DocSpring/docspring-javascript/blob/main/CHANGELOG.md)
89

910
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
1011
pull requests are welcome.
1112

12-
Version 4.2.0.
13+
Version 4.3.0.
1314

1415
## Install and configure
1516

@@ -141,11 +142,11 @@ JavaScript code for every method.
141142
| [`testAuthentication`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#testauthentication) | Test authentication |
142143
| [`updateSignatureRequest`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#updatesignaturerequest) | Update a signature request |
143144
| [`updateTemplate`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#updatetemplate) | Update a template |
144-
| [`updateTemplateDocument`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#updatetemplatedocument) | Replace a template's PDF |
145+
| [`updateTemplateDocument`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#updatetemplatedocument) | Replace a template's document |
145146
| [`updateTemplateFields`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#updatetemplatefields) | Update a template's fields |
146147
| [`updateWebhook`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#updatewebhook) | Update a webhook |
147-
| [`uploadTemplate`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#uploadtemplate) | Create a PDF template from an uploaded PDF |
148-
| [`uploadTemplateDocument`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#uploadtemplatedocument) | Replace a template's PDF with an uploaded PDF |
148+
| [`uploadTemplate`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#uploadtemplate) | Create a template from an uploaded PDF or Word document |
149+
| [`uploadTemplateDocument`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#uploadtemplatedocument) | Replace a template's document with an uploaded file |
149150
| [`validateSubmission`](https://github.com/DocSpring/docspring-javascript/blob/main/docs/Client.md#validatesubmission) | Check a submission without creating it |
150151

151152
## Errors
@@ -163,7 +164,7 @@ existing code, such as removing or renaming a field, go in a new API version
163164
responses that are newer than it is:
164165

165166
- The model object keeps a response field added to the API after this release as a property. The objects defined inside a model, such as a template's `document`, leave it out.
166-
- Enum values in responses are strings, so a value added to the API after this release comes back as it is: handle values you don't recognize.
167+
- An enum value added to the API after this release comes back as the API sent it: handle values you don't recognize.
167168

168169
Upgrade the SDK to read new fields and enum values. The [changelog](https://github.com/DocSpring/docspring-javascript/blob/main/CHANGELOG.md) lists
169170
what each release adds.

0 commit comments

Comments
 (0)