Repository navigation
Commit e359657
committed
Update to version 4.2.0 on 2026-10-29
- **BREAKING CHANGE**: list_templates returns a shorter `TemplateSummary`: a template's name, description, type, folder
(`parent_folder_id`, `path`), latest published version, whether it's `ready`, and its PDF's file name, state, error
and page count (`document`, a `TemplateDocumentSummary`). get_template returns its settings and the rest.
- **BREAKING CHANGE**: list_submissions and list_template_submissions return `SubmissionSummary` instead of
`Submission`: without signature requests and uploads, with `data` only when you pass `include_data` (as before), and
with `files` only when you pass the new `include_files` (without the links to page images). get_submission returns the
whole submission.
- New: the template webhook events (version 4) send the whole template, as get_template returns it, without its
`embed_edit_token`. They sent the settings without the rest.
- New: list_submissions and list_template_submissions take a `state` filter: one state, such as `invalid_data` or
`error`.
- New: get_template_model_code takes `just_types`, for the types alone, without the code that converts and checks JSON
(TypeScript, Ruby, Python, Java, C#, Elixir and Go: JavaScript and PHP code is the same either way).
- New: create_submission, create_submission_batch and create_combined_pdf take an `Idempotency-Key` header. A request
repeated with the same key within 24 hours returns the first response and creates nothing. The same key with a
different request is a 422, and a repeat while the first request is still running is a 409.
- New: create_template_preview and get_template_preview fill an HTML or PDF template's draft (or a published version)
with your data and return PNG images of its pages, not a PDF, so you can check how it prints before you publish it or
send live data. A preview creates no submission and uses no credits. Get the preview until its `state` is
`processed`. Previews are watermarked like test PDFs.
- New: HTML templates' `html_escape_data` setting HTML-escapes the values they print (`{{ value }}`). It's on for new
templates and off for existing ones; `{{ value | raw }}` prints a value as it is.
- New: `docspring.verify_webhook_signature(payload, signature_header, secret)` (the payload as `str` or `bytes`) checks
a webhook request's `X-DocSpring-Signature` header. Pass it the request body exactly as it was received. It returns
true or false, accepts any `v1` that matches and rejects a timestamp more than 5 minutes old (`tolerance=` for another
tolerance).
- publish_template_version answers 409 when the draft hasn't changed since the latest published version, instead of
publishing a copy of it (code `conflict`). A template's first publish always works.
- Every operation documents the 429 rate limit response (with `Retry-After`), and the creates that the sync hosts wait
for document their 504 (the record was saved: get it by the ID in the error).
- Every optional field takes `null` in a submission's `data`, whatever its type, so model code that writes missing
values as null works. A null checkbox or group of fields (an object or a list) gets its defaults, as a missing key
does, and a null text, number, date, image or signature field prints blank, as before. Null in a required field is
still an error.
- Template and webhook names can be up to 512 characters, up from 255.1 parent e9e096a commit e359657
68 files changed
Lines changed: 2645 additions & 405 deletions
File tree
- .openapi-generator
- docspring
- api
- models
- docs
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| |||
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
| 198 | + | |
193 | 199 | | |
194 | 200 | | |
195 | 201 | | |
| |||
271 | 277 | | |
272 | 278 | | |
273 | 279 | | |
| 280 | + | |
274 | 281 | | |
275 | 282 | | |
276 | 283 | | |
| |||
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
| 291 | + | |
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
| |||
301 | 309 | | |
302 | 310 | | |
303 | 311 | | |
| 312 | + | |
| 313 | + | |
304 | 314 | | |
305 | 315 | | |
306 | 316 | | |
| |||
356 | 366 | | |
357 | 367 | | |
358 | 368 | | |
| 369 | + | |
359 | 370 | | |
360 | 371 | | |
361 | 372 | | |
| |||
437 | 448 | | |
438 | 449 | | |
439 | 450 | | |
| 451 | + | |
440 | 452 | | |
441 | 453 | | |
442 | 454 | | |
| |||
447 | 459 | | |
448 | 460 | | |
449 | 461 | | |
| 462 | + | |
450 | 463 | | |
451 | 464 | | |
452 | 465 | | |
| |||
467 | 480 | | |
468 | 481 | | |
469 | 482 | | |
| 483 | + | |
| 484 | + | |
470 | 485 | | |
471 | 486 | | |
472 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
1 | 39 | | |
2 | 40 | | |
3 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| 174 | + | |
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
| |||
0 commit comments