docspring 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +15 -0
  3. data/.travis.yml +1 -1
  4. data/AGENTS.md +3 -2
  5. data/CHANGELOG.md +40 -0
  6. data/Gemfile.lock +9 -9
  7. data/README.md +5 -1
  8. data/docs/Client.md +176 -10
  9. data/docs/CombinedPdf.md +1 -1
  10. data/docs/CreateCombinedPdfRequest.md +1 -1
  11. data/docs/CreateSubmissionRequest.md +2 -2
  12. data/docs/CreateTemplatePreviewRequest.md +18 -0
  13. data/docs/CreateTemplateRequest.md +3 -1
  14. data/docs/ErrorDetail.md +1 -1
  15. data/docs/ErrorInfo.md +4 -4
  16. data/docs/Submission.md +15 -15
  17. data/docs/SubmissionInput.md +2 -2
  18. data/docs/SubmissionList.md +1 -1
  19. data/docs/SubmissionSummary.md +54 -0
  20. data/docs/Template.md +12 -10
  21. data/docs/TemplateActor.md +1 -1
  22. data/docs/TemplateDocument.md +5 -5
  23. data/docs/TemplateDocumentSummary.md +24 -0
  24. data/docs/TemplatePreview.md +32 -0
  25. data/docs/TemplatePreviewState.md +15 -0
  26. data/docs/TemplateSummary.md +2 -48
  27. data/docs/UpdateTemplateRequest.md +4 -2
  28. data/docs/ValidateSubmissionRequest.md +2 -2
  29. data/lib/docspring/api/client.rb +178 -8
  30. data/lib/docspring/api_client.rb +4 -2
  31. data/lib/docspring/date_time_values.rb +33 -0
  32. data/lib/docspring/models/combined_pdf.rb +1 -1
  33. data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
  34. data/lib/docspring/models/create_submission_request.rb +2 -2
  35. data/lib/docspring/models/create_template_preview_request.rb +187 -0
  36. data/lib/docspring/models/create_template_request.rb +12 -2
  37. data/lib/docspring/models/error_code.rb +3 -1
  38. data/lib/docspring/models/error_detail.rb +1 -1
  39. data/lib/docspring/models/error_info.rb +4 -4
  40. data/lib/docspring/models/submission.rb +140 -140
  41. data/lib/docspring/models/submission_input.rb +2 -2
  42. data/lib/docspring/models/submission_list.rb +1 -1
  43. data/lib/docspring/models/submission_summary.rb +601 -0
  44. data/lib/docspring/models/template.rb +96 -83
  45. data/lib/docspring/models/template_actor.rb +1 -1
  46. data/lib/docspring/models/template_document.rb +42 -42
  47. data/lib/docspring/models/template_document_summary.rb +260 -0
  48. data/lib/docspring/models/template_preview.rb +356 -0
  49. data/lib/docspring/models/template_preview_state.rb +42 -0
  50. data/lib/docspring/models/template_summary.rb +5 -572
  51. data/lib/docspring/models/update_template_request.rb +16 -6
  52. data/lib/docspring/models/validate_submission_request.rb +2 -2
  53. data/lib/docspring/request_schemas.json +105 -8
  54. data/lib/docspring/version.rb +1 -1
  55. data/lib/docspring/webhook_signature.rb +45 -0
  56. data/lib/docspring.rb +6 -0
  57. data/spec/api/client_spec.rb +39 -4
  58. data/spec/models/create_template_preview_request_spec.rb +36 -0
  59. data/spec/models/create_template_request_spec.rb +6 -0
  60. data/spec/models/submission_spec.rb +12 -12
  61. data/spec/models/submission_summary_spec.rb +144 -0
  62. data/spec/models/template_document_spec.rb +5 -5
  63. data/spec/models/template_document_summary_spec.rb +54 -0
  64. data/spec/models/template_preview_spec.rb +78 -0
  65. data/spec/models/template_preview_state_spec.rb +30 -0
  66. data/spec/models/template_spec.rb +28 -22
  67. data/spec/models/template_summary_spec.rb +0 -138
  68. data/spec/models/update_template_request_spec.rb +6 -0
  69. metadata +23 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d124a4eb39c1edc1b535fe60c6027af58866731018f574e3b58e9c9e658081bb
4
- data.tar.gz: 4a365cf441b2b34c9a841059ea647b0c8ce0e2680183ddc229a7f6482e4af8e1
3
+ metadata.gz: f14e5a7b2bfc1d3afccaa2fe06b9a452849c1e68159d2bb3b5cd28317251105d
4
+ data.tar.gz: b34c23551a9e275212671e5bac87568bec392ee68f379589cb9de514b6871152
5
5
  SHA512:
6
- metadata.gz: e565b0c650ff70a2e1791e82c6be2b9afe21c0edce375b77c17cc92f98954b71e5ff6fa473d8df181a17687e9e2cfc8b4ddffa34dbc7e103f16366eb74936e88
7
- data.tar.gz: cd338cfa5caed832ebcfe25aedab0582c2e004050bab456d3b2d5b7f1e43001644d44a4a6d16be5d942f600f4a2a203fd41e83331b6ec2e7ea82f8badfe42aa2
6
+ metadata.gz: c9c41809479101fc003e24371dc49de667b566329208c656f653977cc7548a174f482c90978d3bcc62800771c173dc374406cbcfc973365f72ecdf6f5d6f2457
7
+ data.tar.gz: 51775f90a82bb42c0a6ce063b3a834c665f8adfa2e8acfd14dca4925adf65cd835e0fb8a79b108cb567daeccf6f477fe02be3b20848fbf42ea5854ad63e7a7e9
@@ -29,6 +29,7 @@ docs/CreateSignatureRequestEventRequest.md
29
29
  docs/CreateSignatureRequestTokenRequest.md
30
30
  docs/CreateSubmissionBatchRequest.md
31
31
  docs/CreateSubmissionRequest.md
32
+ docs/CreateTemplatePreviewRequest.md
32
33
  docs/CreateTemplateRequest.md
33
34
  docs/CreateWebhookRequest.md
34
35
  docs/CustomFile.md
@@ -110,6 +111,7 @@ docs/SubmissionList.md
110
111
  docs/SubmissionSource.md
111
112
  docs/SubmissionSourcePdf.md
112
113
  docs/SubmissionState.md
114
+ docs/SubmissionSummary.md
113
115
  docs/SubmissionValidation.md
114
116
  docs/Template.md
115
117
  docs/TemplateActor.md
@@ -120,6 +122,7 @@ docs/TemplateDiff.md
120
122
  docs/TemplateDiffSummary.md
121
123
  docs/TemplateDocument.md
122
124
  docs/TemplateDocumentState.md
125
+ docs/TemplateDocumentSummary.md
123
126
  docs/TemplateFieldChange.md
124
127
  docs/TemplateFieldChanges.md
125
128
  docs/TemplateFieldDependency.md
@@ -140,6 +143,8 @@ docs/TemplatePageFieldsStatus.md
140
143
  docs/TemplatePageImageStatus.md
141
144
  docs/TemplatePageImages.md
142
145
  docs/TemplatePageProcessingStatus.md
146
+ docs/TemplatePreview.md
147
+ docs/TemplatePreviewState.md
143
148
  docs/TemplateSourcePdf.md
144
149
  docs/TemplateSummary.md
145
150
  docs/TemplateSummaryList.md
@@ -193,6 +198,7 @@ lib/docspring/models/create_signature_request_event_request.rb
193
198
  lib/docspring/models/create_signature_request_token_request.rb
194
199
  lib/docspring/models/create_submission_batch_request.rb
195
200
  lib/docspring/models/create_submission_request.rb
201
+ lib/docspring/models/create_template_preview_request.rb
196
202
  lib/docspring/models/create_template_request.rb
197
203
  lib/docspring/models/create_webhook_request.rb
198
204
  lib/docspring/models/custom_file.rb
@@ -274,6 +280,7 @@ lib/docspring/models/submission_list.rb
274
280
  lib/docspring/models/submission_source.rb
275
281
  lib/docspring/models/submission_source_pdf.rb
276
282
  lib/docspring/models/submission_state.rb
283
+ lib/docspring/models/submission_summary.rb
277
284
  lib/docspring/models/submission_validation.rb
278
285
  lib/docspring/models/template.rb
279
286
  lib/docspring/models/template_actor.rb
@@ -284,6 +291,7 @@ lib/docspring/models/template_diff.rb
284
291
  lib/docspring/models/template_diff_summary.rb
285
292
  lib/docspring/models/template_document.rb
286
293
  lib/docspring/models/template_document_state.rb
294
+ lib/docspring/models/template_document_summary.rb
287
295
  lib/docspring/models/template_field_change.rb
288
296
  lib/docspring/models/template_field_changes.rb
289
297
  lib/docspring/models/template_field_dependency.rb
@@ -304,6 +312,8 @@ lib/docspring/models/template_page_fields_status.rb
304
312
  lib/docspring/models/template_page_image_status.rb
305
313
  lib/docspring/models/template_page_images.rb
306
314
  lib/docspring/models/template_page_processing_status.rb
315
+ lib/docspring/models/template_preview.rb
316
+ lib/docspring/models/template_preview_state.rb
307
317
  lib/docspring/models/template_source_pdf.rb
308
318
  lib/docspring/models/template_summary.rb
309
319
  lib/docspring/models/template_summary_list.rb
@@ -351,6 +361,7 @@ spec/models/create_signature_request_event_request_spec.rb
351
361
  spec/models/create_signature_request_token_request_spec.rb
352
362
  spec/models/create_submission_batch_request_spec.rb
353
363
  spec/models/create_submission_request_spec.rb
364
+ spec/models/create_template_preview_request_spec.rb
354
365
  spec/models/create_template_request_spec.rb
355
366
  spec/models/create_webhook_request_spec.rb
356
367
  spec/models/custom_file_list_spec.rb
@@ -432,6 +443,7 @@ spec/models/submission_source_pdf_spec.rb
432
443
  spec/models/submission_source_spec.rb
433
444
  spec/models/submission_spec.rb
434
445
  spec/models/submission_state_spec.rb
446
+ spec/models/submission_summary_spec.rb
435
447
  spec/models/submission_validation_spec.rb
436
448
  spec/models/template_actor_spec.rb
437
449
  spec/models/template_actor_type_spec.rb
@@ -441,6 +453,7 @@ spec/models/template_diff_spec.rb
441
453
  spec/models/template_diff_summary_spec.rb
442
454
  spec/models/template_document_spec.rb
443
455
  spec/models/template_document_state_spec.rb
456
+ spec/models/template_document_summary_spec.rb
444
457
  spec/models/template_field_change_spec.rb
445
458
  spec/models/template_field_changes_spec.rb
446
459
  spec/models/template_field_dependency_action_spec.rb
@@ -461,6 +474,8 @@ spec/models/template_page_fields_status_spec.rb
461
474
  spec/models/template_page_image_status_spec.rb
462
475
  spec/models/template_page_images_spec.rb
463
476
  spec/models/template_page_processing_status_spec.rb
477
+ spec/models/template_preview_spec.rb
478
+ spec/models/template_preview_state_spec.rb
464
479
  spec/models/template_source_pdf_spec.rb
465
480
  spec/models/template_spec.rb
466
481
  spec/models/template_summary_list_spec.rb
data/.travis.yml CHANGED
@@ -8,4 +8,4 @@ script:
8
8
  - bundle install --path vendor/bundle
9
9
  - bundle exec rspec
10
10
  - gem build docspring.gemspec
11
- - gem install ./docspring-4.1.0.gem
11
+ - gem install ./docspring-4.2.0.gem
data/AGENTS.md CHANGED
@@ -69,8 +69,9 @@ keeps it.
69
69
  (https://docspring.com/docs/webhooks/overview/). A webhook created with API v2 sends events in API v2's format
70
70
  (version 4).
71
71
  - Verify each request's `X-DocSpring-Signature` header before acting on it: an HMAC-SHA256 of `{t}.{raw body}` with the
72
- webhook's signing secret, computed over the raw body exactly as received
73
- (https://docspring.com/docs/webhooks/verifying-signatures/).
72
+ webhook's signing secret, where `t` must be within 5 minutes
73
+ (https://docspring.com/docs/webhooks/verifying-signatures/). Pass the raw body exactly as received, not parsed JSON,
74
+ to `DocSpring.verify_webhook_signature(payload, signature_header, secret)`, which returns true or false.
74
75
  - No webhook is sent when a submission starts waiting for credits.
75
76
 
76
77
  ## Signature requests
data/CHANGELOG.md CHANGED
@@ -1,3 +1,43 @@
1
+ ### 4.2.0 [October 29, 2026]
2
+
3
+ - **BREAKING CHANGE**: list_templates returns a shorter `TemplateSummary`: a template's name, description, type, folder
4
+ (`parent_folder_id`, `path`), latest published version, whether it's `ready`, and its PDF's file name, state, error
5
+ and page count (`document`, a `TemplateDocumentSummary`). get_template returns its settings and the rest.
6
+ - **BREAKING CHANGE**: list_submissions and list_template_submissions return `SubmissionSummary` instead of
7
+ `Submission`: without signature requests and uploads, with `data` only when you pass `include_data` (as before), and
8
+ with `files` only when you pass the new `include_files` (without the links to page images). get_submission returns the
9
+ whole submission.
10
+ - New: the template webhook events (version 4) send the whole template, as get_template returns it, without its
11
+ `embed_edit_token`. They sent the settings without the rest.
12
+ - New: list_submissions and list_template_submissions take a `state` filter: one state, such as `invalid_data` or
13
+ `error`.
14
+ - New: get_template_model_code takes `just_types`, for the types alone, without the code that converts and checks JSON
15
+ (TypeScript, Ruby, Python, Java, C#, Elixir and Go: JavaScript and PHP code is the same either way).
16
+ - New: create_submission, create_submission_batch and create_combined_pdf take an `Idempotency-Key` header. A request
17
+ repeated with the same key within 24 hours returns the first response and creates nothing. The same key with a
18
+ different request is a 422, and a repeat while the first request is still running is a 409.
19
+ - New: create_template_preview and get_template_preview fill an HTML or PDF template's draft (or a published version)
20
+ 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
21
+ send live data. A preview creates no submission and uses no credits. Get the preview until its `state` is
22
+ `processed`. Previews are watermarked like test PDFs.
23
+ - New: HTML templates' `html_escape_data` setting HTML-escapes the values they print (`{{ value }}`). It's on for new
24
+ templates and off for existing ones; `{{ value | raw }}` prints a value as it is.
25
+ - New: `DocSpring.verify_webhook_signature(payload, signature_header, secret)` checks a webhook request's
26
+ `X-DocSpring-Signature` header. Pass it the request body exactly as it was received. It returns true or false, accepts
27
+ any `v1` that matches and rejects a timestamp more than 5 minutes old (`tolerance:` for another tolerance).
28
+ - publish_template_version answers 409 when the draft hasn't changed since the latest published version, instead of
29
+ publishing a copy of it (code `conflict`). A template's first publish always works.
30
+ - Every operation documents the 429 rate limit response (with `Retry-After`), and the creates that the sync hosts wait
31
+ for document their 504 (the record was saved: get it by the ID in the error).
32
+ - Every optional field takes `null` in a submission's `data`, whatever its type, so model code that writes missing
33
+ values as null works. A null checkbox or group of fields (an object or a list) gets its defaults, as a missing key
34
+ does, and a null text, number, date, image or signature field prints blank, as before. Null in a required field is
35
+ still an error.
36
+ - Query parameters and request body values that take a date and time (`created_after`, `created_before`) take a `Time`,
37
+ `DateTime` or `Date` as well as a string, sent as RFC 3339 (a `Date` as midnight UTC). They failed the request's
38
+ validation before.
39
+ - Template and webhook names can be up to 512 characters, up from 255.
40
+
1
41
  ### 4.1.0 [October 27, 2026]
2
42
 
3
43
  - New: list_template_fields, add_template_fields, update_template_fields, remove_template_fields and
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- docspring (4.1.0)
4
+ docspring (4.2.0)
5
5
  logger
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
@@ -14,7 +14,7 @@ GEM
14
14
  coderay (1.1.3)
15
15
  date (3.6.0)
16
16
  diff-lcs (1.6.2)
17
- ethon (0.18.0)
17
+ ethon (0.19.1)
18
18
  ffi (>= 1.15.0)
19
19
  logger
20
20
  ffi (1.17.4)
@@ -28,7 +28,7 @@ GEM
28
28
  ffi (1.17.4-x86_64-darwin)
29
29
  ffi (1.17.4-x86_64-linux-gnu)
30
30
  ffi (1.17.4-x86_64-linux-musl)
31
- io-console (0.9.4)
31
+ io-console (0.9.5)
32
32
  jaro_winkler (1.5.6)
33
33
  logger (1.7.0)
34
34
  method_source (1.1.0)
@@ -74,8 +74,8 @@ GEM
74
74
  unicode-display_width (>= 1.4.0, < 1.6)
75
75
  ruby-progressbar (1.13.0)
76
76
  stringio (3.2.0)
77
- typhoeus (1.6.0)
78
- ethon (>= 0.18.0)
77
+ typhoeus (1.7.1)
78
+ ethon (>= 0.19.1, < 0.20.0)
79
79
  unicode-display_width (1.5.0)
80
80
 
81
81
  PLATFORMS
@@ -104,8 +104,8 @@ CHECKSUMS
104
104
  coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
105
105
  date (3.6.0) sha256=18ac945c4e24ebd93534f8eab8c2fd8c5604b3e977105b3798d62a1e8d27b580
106
106
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
107
- docspring (4.1.0)
108
- ethon (0.18.0) sha256=b598afc9f30448cb068b850714b7d6948e941476095d04f90a4ac65b8d6efcb2
107
+ docspring (4.2.0)
108
+ ethon (0.19.1) sha256=f309dec67cfdefaf96b3d1ee0ed4f186eac518f131340f607bb3df3b4e13ddc4
109
109
  ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
110
110
  ffi (1.17.4-aarch64-linux-gnu) sha256=b208f06f91ffd8f5e1193da3cae3d2ccfc27fc36fba577baf698d26d91c080df
111
111
  ffi (1.17.4-aarch64-linux-musl) sha256=9286b7a615f2676245283aef0a0a3b475ae3aae2bb5448baace630bb77b91f39
@@ -117,7 +117,7 @@ CHECKSUMS
117
117
  ffi (1.17.4-x86_64-darwin) sha256=aa70390523cf3235096cf64962b709b4cfbd5c082a2cb2ae714eb0fe2ccda496
118
118
  ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d
119
119
  ffi (1.17.4-x86_64-linux-musl) sha256=3fdf9888483de005f8ef8d1cf2d3b20d86626af206cbf780f6a6a12439a9c49e
120
- io-console (0.9.4) sha256=a403304f32928ee85e56d457b4612ca43f2703b561a3258844992bd24085fbb1
120
+ io-console (0.9.5) sha256=83dd9bbf4c4680416629245b39cd4212eb5f4d9a4ea91804870c1f6b846414d5
121
121
  jaro_winkler (1.5.6) sha256=007db7805527ada1cc12f2547676181d63b0a504ec4dd7a9a2eb2424521ccd81
122
122
  logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
123
123
  method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
@@ -138,7 +138,7 @@ CHECKSUMS
138
138
  rubocop (0.66.0) sha256=f05a6896f367765b3f0fba663d0add120444f8de604dada405662b10a0860f5a
139
139
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
140
140
  stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
141
- typhoeus (1.6.0) sha256=bacc41c23e379547e29801dc235cd1699b70b955a1ba3d32b2b877aa844c331d
141
+ typhoeus (1.7.1) sha256=86dcb6d787ee08e34947c9436b24af3c4b02880dc83c466b6ca4dbfc53c2ee7f
142
142
  unicode-display_width (1.5.0) sha256=9890eebd24feb4cb0e0542c9b8c6beecb40cda27be8c7afe49312625b36156eb
143
143
 
144
144
  BUNDLED WITH
data/README.md CHANGED
@@ -9,7 +9,7 @@ templates with your data, generates PDFs from HTML templates, combines PDFs and
9
9
  The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
10
10
  pull requests are welcome.
11
11
 
12
- Version 4.1.0. Requires Ruby >= 2.7.
12
+ Version 4.2.0. Requires Ruby >= 2.7.
13
13
 
14
14
  ## Install and configure
15
15
 
@@ -96,6 +96,7 @@ Ruby code for every method.
96
96
  | [`create_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_submission) | Generate a PDF |
97
97
  | [`create_submission_batch`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_submission_batch) | Generate PDFs in a batch |
98
98
  | [`create_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_template) | Create a template |
99
+ | [`create_template_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_template_preview) | Preview a template with data |
99
100
  | [`create_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_webhook) | Create a webhook |
100
101
  | [`delete_custom_file`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_custom_file) | Delete a custom file |
101
102
  | [`delete_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_folder) | Delete a folder |
@@ -116,6 +117,7 @@ Ruby code for every method.
116
117
  | [`get_template_diff`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_diff) | Compare a version of a template with the one before it |
117
118
  | [`get_template_model_code`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_model_code) | Generate typed code for a template's submission data |
118
119
  | [`get_template_page_images`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_page_images) | Get images of a template's pages |
120
+ | [`get_template_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_preview) | Get a template preview |
119
121
  | [`get_template_schema`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_schema) | Get the JSON Schema of a template's submission data |
120
122
  | [`get_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_webhook) | Get a webhook |
121
123
  | [`list_combined_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_combined_pdfs) | List combined PDFs |
@@ -175,6 +177,8 @@ On top of the generated code, we add:
175
177
 
176
178
  - A client constructor that reads your credentials, region and host from the environment.
177
179
  - A fix for multipart PUT requests in Ethon (file uploads to `upload_template_document`).
180
+ - Dates and times in a request (`created_after`, a model's date-time attribute) can be a `Time`, `DateTime` or `Date`, sent as RFC 3339 strings. A `Date` is midnight UTC.
181
+ - `DocSpring.verify_webhook_signature(payload, signature_header, secret)` checks a webhook request's `X-DocSpring-Signature` header, with `tolerance:` and `now:` keywords.
178
182
 
179
183
  Each release regenerates every file, so a change made only here would be lost in the next one. Issues and pull
180
184
  requests are welcome all the same: [open an issue](https://github.com/DocSpring/docspring-ruby/issues) or a pull request, or email
data/docs/Client.md CHANGED
@@ -14,6 +14,7 @@ All URIs are relative to *https://sync.api.docspring.com/api/v2*
14
14
  | [**create_submission**](Client.md#create_submission) | **POST** /templates/{template_id}/submissions | Generate a PDF |
15
15
  | [**create_submission_batch**](Client.md#create_submission_batch) | **POST** /submissions/batches | Generate PDFs in a batch |
16
16
  | [**create_template**](Client.md#create_template) | **POST** /templates | Create a template |
17
+ | [**create_template_preview**](Client.md#create_template_preview) | **POST** /templates/{template_id}/previews | Preview a template with data |
17
18
  | [**create_webhook**](Client.md#create_webhook) | **POST** /webhooks | Create a webhook |
18
19
  | [**delete_custom_file**](Client.md#delete_custom_file) | **DELETE** /custom_files/{custom_file_id} | Delete a custom file |
19
20
  | [**delete_folder**](Client.md#delete_folder) | **DELETE** /folders/{folder_id} | Delete a folder |
@@ -34,6 +35,7 @@ All URIs are relative to *https://sync.api.docspring.com/api/v2*
34
35
  | [**get_template_diff**](Client.md#get_template_diff) | **GET** /templates/{template_id}/diff | Compare a version of a template with the one before it |
35
36
  | [**get_template_model_code**](Client.md#get_template_model_code) | **GET** /templates/{template_id}/model_code | Generate typed code for a template's submission data |
36
37
  | [**get_template_page_images**](Client.md#get_template_page_images) | **GET** /templates/{template_id}/page_images | Get images of a template's pages |
38
+ | [**get_template_preview**](Client.md#get_template_preview) | **GET** /templates/{template_id}/previews/{preview_id} | Get a template preview |
37
39
  | [**get_template_schema**](Client.md#get_template_schema) | **GET** /templates/{template_id}/schema | Get the JSON Schema of a template's submission data |
38
40
  | [**get_webhook**](Client.md#get_webhook) | **GET** /webhooks/{webhook_id} | Get a webhook |
39
41
  | [**list_combined_pdfs**](Client.md#list_combined_pdfs) | **GET** /combined_pdfs | List combined PDFs |
@@ -231,7 +233,8 @@ end
231
233
  api_instance = DocSpring::Client.new
232
234
  body = DocSpring::CreateCombinedPdfRequest.new({source_pdfs: [DocSpring::CombinedPdfSourcePdf.new({type: 'type_example', id: 'id_example'})]}) # CreateCombinedPdfRequest | The PDFs to merge, and the combined PDF's settings.
233
235
  opts = {
234
- wait: true # Boolean | Wait until the PDF has been generated before responding. Default true on sync.api hosts.
236
+ wait: true, # Boolean | Wait until the PDF has been generated before responding. Default true on sync.api hosts.
237
+ idempotency_key: 'idempotency_key_example' # String | A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another combined PDF. Send a new key with each new combined PDF, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
235
238
  }
236
239
 
237
240
  begin
@@ -267,6 +270,7 @@ end
267
270
  | ---- | ---- | ----------- | ----- |
268
271
  | **body** | [**CreateCombinedPdfRequest**](CreateCombinedPdfRequest.md) | The PDFs to merge, and the combined PDF's settings. | |
269
272
  | **wait** | **Boolean** | Wait until the PDF has been generated before responding. Default true on sync.api hosts. | [optional] |
273
+ | **idempotency_key** | **String** | A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another combined PDF. Send a new key with each new combined PDF, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds. | [optional] |
270
274
 
271
275
  ### Return type
272
276
 
@@ -428,7 +432,7 @@ end
428
432
 
429
433
  Record a signature request event
430
434
 
431
- Records something that happened outside DocSpring in the signature request's audit trail: you sent the request to the person (`send_request`). The audit trail shows it as reported by your account.
435
+ Records something that happened outside DocSpring in the signature request's audit trail: you sent the request to the person (`send_request`). The audit trail shows it as reported by your account. A finished (completed, declined or expired) signature request's audit trail takes no more events, and a test API token can't record one for a live signature request.
432
436
 
433
437
  ### Examples
434
438
 
@@ -593,7 +597,8 @@ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
593
597
  body = DocSpring::CreateSubmissionRequest.new # CreateSubmissionRequest | The submission's data and settings.
594
598
  opts = {
595
599
  version: 'version_example', # String | The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
596
- wait: true # Boolean | Wait until the files have been generated before responding. Default true on sync.api hosts.
600
+ wait: true, # Boolean | Wait until the files have been generated before responding. Default true on sync.api hosts.
601
+ idempotency_key: 'idempotency_key_example' # String | A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another submission. Send a new key with each new submission, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
597
602
  }
598
603
 
599
604
  begin
@@ -631,6 +636,7 @@ end
631
636
  | **body** | [**CreateSubmissionRequest**](CreateSubmissionRequest.md) | The submission's data and settings. | |
632
637
  | **version** | **String** | The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published). | [optional] |
633
638
  | **wait** | **Boolean** | Wait until the files have been generated before responding. Default true on sync.api hosts. | [optional] |
639
+ | **idempotency_key** | **String** | A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another submission. Send a new key with each new submission, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds. | [optional] |
634
640
 
635
641
  ### Return type
636
642
 
@@ -669,7 +675,8 @@ end
669
675
  api_instance = DocSpring::Client.new
670
676
  body = DocSpring::CreateSubmissionBatchRequest.new({submissions: [DocSpring::SubmissionInput.new]}) # CreateSubmissionBatchRequest | The submissions to create, and the settings they share.
671
677
  opts = {
672
- wait: true # Boolean | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
678
+ wait: true, # Boolean | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
679
+ idempotency_key: 'idempotency_key_example' # String | A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another batch. Send a new key with each new batch, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
673
680
  }
674
681
 
675
682
  begin
@@ -705,6 +712,7 @@ end
705
712
  | ---- | ---- | ----------- | ----- |
706
713
  | **body** | [**CreateSubmissionBatchRequest**](CreateSubmissionBatchRequest.md) | The submissions to create, and the settings they share. | |
707
714
  | **wait** | **Boolean** | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts. | [optional] |
715
+ | **idempotency_key** | **String** | A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another batch. Send a new key with each new batch, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds. | [optional] |
708
716
 
709
717
  ### Return type
710
718
 
@@ -794,6 +802,82 @@ end
794
802
  - **Accept**: application/json
795
803
 
796
804
 
805
+ ## create_template_preview
806
+
807
+ > <TemplatePreview> create_template_preview(template_id, body, opts)
808
+
809
+ Preview a template with data
810
+
811
+ Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML or PDF template prints with your data before you publish a version or send live data. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
812
+
813
+ ### Examples
814
+
815
+ ```ruby
816
+ require 'time'
817
+ require 'docspring'
818
+ # setup authorization
819
+ DocSpring.configure do |config|
820
+ # Configure HTTP basic authorization: api_token_basic
821
+ config.username = 'YOUR USERNAME'
822
+ config.password = 'YOUR PASSWORD'
823
+ end
824
+
825
+ api_instance = DocSpring::Client.new
826
+ template_id = 'tpl_1234567890abcdef02' # String | The template's ID.
827
+ body = DocSpring::CreateTemplatePreviewRequest.new({data: { key: 3.56}}) # CreateTemplatePreviewRequest | The data to render the template with.
828
+ opts = {
829
+ version: 'version_example' # String | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
830
+ }
831
+
832
+ begin
833
+ # Preview a template with data
834
+ result = api_instance.create_template_preview(template_id, body, opts)
835
+ p result
836
+ rescue DocSpring::ApiError => e
837
+ puts "Error when calling Client->create_template_preview: #{e}"
838
+ end
839
+ ```
840
+
841
+ #### Using the create_template_preview_with_http_info variant
842
+
843
+ This returns an Array which contains the response data, status code and headers.
844
+
845
+ > <Array(<TemplatePreview>, Integer, Hash)> create_template_preview_with_http_info(template_id, body, opts)
846
+
847
+ ```ruby
848
+ begin
849
+ # Preview a template with data
850
+ data, status_code, headers = api_instance.create_template_preview_with_http_info(template_id, body, opts)
851
+ p status_code # => 2xx
852
+ p headers # => { ... }
853
+ p data # => <TemplatePreview>
854
+ rescue DocSpring::ApiError => e
855
+ puts "Error when calling Client->create_template_preview_with_http_info: #{e}"
856
+ end
857
+ ```
858
+
859
+ ### Parameters
860
+
861
+ | Name | Type | Description | Notes |
862
+ | ---- | ---- | ----------- | ----- |
863
+ | **template_id** | **String** | The template's ID. | |
864
+ | **body** | [**CreateTemplatePreviewRequest**](CreateTemplatePreviewRequest.md) | The data to render the template with. | |
865
+ | **version** | **String** | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`. | [optional] |
866
+
867
+ ### Return type
868
+
869
+ [**TemplatePreview**](TemplatePreview.md)
870
+
871
+ ### Authorization
872
+
873
+ [api_token_basic](../README.md#api_token_basic)
874
+
875
+ ### HTTP request headers
876
+
877
+ - **Content-Type**: application/json
878
+ - **Accept**: application/json
879
+
880
+
797
881
  ## create_webhook
798
882
 
799
883
  > <Webhook> create_webhook(body)
@@ -2079,7 +2163,7 @@ end
2079
2163
 
2080
2164
  Generate typed code for a template's submission data
2081
2165
 
2082
- Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
2166
+ Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object, and `just_types=true` leaves out the code that converts JSON to and from the types. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
2083
2167
 
2084
2168
  ### Examples
2085
2169
 
@@ -2097,7 +2181,8 @@ api_instance = DocSpring::Client.new
2097
2181
  template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
2098
2182
  lang = DocSpring::ModelCodeLanguage::TYPESCRIPT # ModelCodeLanguage | The language to generate the code in.
2099
2183
  opts = {
2100
- version: 'draft' # String | The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
2184
+ version: 'draft', # String | The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
2185
+ just_types: true # Boolean | Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types and PHP no types-only code, so theirs is the same either way.
2101
2186
  }
2102
2187
 
2103
2188
  begin
@@ -2134,6 +2219,7 @@ end
2134
2219
  | **template_id** | **String** | The template's ID. | |
2135
2220
  | **lang** | [**ModelCodeLanguage**](.md) | The language to generate the code in. | |
2136
2221
  | **version** | **String** | The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default. | [optional] |
2222
+ | **just_types** | **Boolean** | Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types and PHP no types-only code, so theirs is the same either way. | [optional] |
2137
2223
 
2138
2224
  ### Return type
2139
2225
 
@@ -2223,6 +2309,78 @@ end
2223
2309
  - **Accept**: application/json
2224
2310
 
2225
2311
 
2312
+ ## get_template_preview
2313
+
2314
+ > <TemplatePreview> get_template_preview(template_id, preview_id)
2315
+
2316
+ Get a template preview
2317
+
2318
+ Returns a preview made with POST /templates/{template_id}/previews. Once it's `processed`, `pages` has a PNG image of each page with a temporary link to download it: a preview has no PDF. Previews are deleted an hour after they're created.
2319
+
2320
+ ### Examples
2321
+
2322
+ ```ruby
2323
+ require 'time'
2324
+ require 'docspring'
2325
+ # setup authorization
2326
+ DocSpring.configure do |config|
2327
+ # Configure HTTP basic authorization: api_token_basic
2328
+ config.username = 'YOUR USERNAME'
2329
+ config.password = 'YOUR PASSWORD'
2330
+ end
2331
+
2332
+ api_instance = DocSpring::Client.new
2333
+ template_id = 'tpl_1234567890abcdef02' # String | The template's ID.
2334
+ preview_id = 'tpv_1234567890abcdef0123' # String | The preview's ID.
2335
+
2336
+ begin
2337
+ # Get a template preview
2338
+ result = api_instance.get_template_preview(template_id, preview_id)
2339
+ p result
2340
+ rescue DocSpring::ApiError => e
2341
+ puts "Error when calling Client->get_template_preview: #{e}"
2342
+ end
2343
+ ```
2344
+
2345
+ #### Using the get_template_preview_with_http_info variant
2346
+
2347
+ This returns an Array which contains the response data, status code and headers.
2348
+
2349
+ > <Array(<TemplatePreview>, Integer, Hash)> get_template_preview_with_http_info(template_id, preview_id)
2350
+
2351
+ ```ruby
2352
+ begin
2353
+ # Get a template preview
2354
+ data, status_code, headers = api_instance.get_template_preview_with_http_info(template_id, preview_id)
2355
+ p status_code # => 2xx
2356
+ p headers # => { ... }
2357
+ p data # => <TemplatePreview>
2358
+ rescue DocSpring::ApiError => e
2359
+ puts "Error when calling Client->get_template_preview_with_http_info: #{e}"
2360
+ end
2361
+ ```
2362
+
2363
+ ### Parameters
2364
+
2365
+ | Name | Type | Description | Notes |
2366
+ | ---- | ---- | ----------- | ----- |
2367
+ | **template_id** | **String** | The template's ID. | |
2368
+ | **preview_id** | **String** | The preview's ID. | |
2369
+
2370
+ ### Return type
2371
+
2372
+ [**TemplatePreview**](TemplatePreview.md)
2373
+
2374
+ ### Authorization
2375
+
2376
+ [api_token_basic](../README.md#api_token_basic)
2377
+
2378
+ ### HTTP request headers
2379
+
2380
+ - **Content-Type**: Not defined
2381
+ - **Accept**: application/json
2382
+
2383
+
2226
2384
  ## get_template_schema
2227
2385
 
2228
2386
  > Hash&lt;String, Object&gt; get_template_schema(template_id, opts)
@@ -2597,7 +2755,7 @@ end
2597
2755
 
2598
2756
  List submissions
2599
2757
 
2600
- Returns the submissions in your account, newest first, one page at a time. Lists leave out each submission's `data` unless you pass `include_data=true`.
2758
+ Returns the submissions in your account, newest first, one page at a time. Each one is a summary: its `data` is null unless you pass `include_data=true`, and its `files` are empty unless you pass `include_files=true`. Get a submission by its ID for its signature requests, uploads and page images.
2601
2759
 
2602
2760
  ### Examples
2603
2761
 
@@ -2619,7 +2777,9 @@ opts = {
2619
2777
  created_before: Time.parse('2018-10-20T09:00:00Z'), # Time | Only list submissions created before this time.
2620
2778
  include_data: true, # Boolean | Include each submission's `data` (null without it).
2621
2779
  limit: 56, # Integer | How many items to return (1-100, default 50).
2622
- cursor: 'cursor_example' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2780
+ cursor: 'cursor_example', # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2781
+ state: DocSpring::SubmissionState::PENDING, # SubmissionState | Only list submissions in this state (one state per request). The ones that failed are `invalid_data`, `error`, `syntax_error`, `image_download_failed` and `image_processing_failed`, and one still `pending` an hour after it was created is stuck.
2782
+ include_files: true # Boolean | Include each submission's generated files and their download links (`files`, empty without it), without the page images' links.
2623
2783
  }
2624
2784
 
2625
2785
  begin
@@ -2660,6 +2820,8 @@ end
2660
2820
  | **include_data** | **Boolean** | Include each submission's `data` (null without it). | [optional] |
2661
2821
  | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2662
2822
  | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2823
+ | **state** | [**SubmissionState**](.md) | Only list submissions in this state (one state per request). The ones that failed are `invalid_data`, `error`, `syntax_error`, `image_download_failed` and `image_processing_failed`, and one still `pending` an hour after it was created is stuck. | [optional] |
2824
+ | **include_files** | **Boolean** | Include each submission's generated files and their download links (`files`, empty without it), without the page images' links. | [optional] |
2663
2825
 
2664
2826
  ### Return type
2665
2827
 
@@ -2777,7 +2939,9 @@ opts = {
2777
2939
  created_before: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Only list submissions created before this time.
2778
2940
  include_data: true, # Boolean | Include each submission's `data` (null without it).
2779
2941
  limit: 56, # Integer | How many items to return (1-100, default 50).
2780
- cursor: 'cursor_example' # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2942
+ cursor: 'cursor_example', # String | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
2943
+ state: DocSpring::SubmissionState::PENDING, # SubmissionState | Only list submissions in this state (one state per request). The ones that failed are `invalid_data`, `error`, `syntax_error`, `image_download_failed` and `image_processing_failed`, and one still `pending` an hour after it was created is stuck.
2944
+ include_files: true # Boolean | Include each submission's generated files and their download links (`files`, empty without it), without the page images' links.
2781
2945
  }
2782
2946
 
2783
2947
  begin
@@ -2818,6 +2982,8 @@ end
2818
2982
  | **include_data** | **Boolean** | Include each submission's `data` (null without it). | [optional] |
2819
2983
  | **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
2820
2984
  | **cursor** | **String** | The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one. | [optional] |
2985
+ | **state** | [**SubmissionState**](.md) | Only list submissions in this state (one state per request). The ones that failed are `invalid_data`, `error`, `syntax_error`, `image_download_failed` and `image_processing_failed`, and one still `pending` an hour after it was created is stuck. | [optional] |
2986
+ | **include_files** | **Boolean** | Include each submission's generated files and their download links (`files`, empty without it), without the page images' links. | [optional] |
2821
2987
 
2822
2988
  ### Return type
2823
2989
 
@@ -2839,7 +3005,7 @@ end
2839
3005
 
2840
3006
  List templates
2841
3007
 
2842
- Returns the templates in your account (their drafts), newest first, one page at a time. Get a template by its ID for its HTML, defaults and published versions.
3008
+ Returns the templates in your account (their drafts), newest first, one page at a time. Each one is a summary: get a template by its ID for its settings, its PDF in full, its HTML, defaults and published versions.
2843
3009
 
2844
3010
  ### Examples
2845
3011
 
data/docs/CombinedPdf.md CHANGED
@@ -7,7 +7,7 @@
7
7
  | **id** | **String** | The combined PDF's ID. | |
8
8
  | **state** | [**CombinedPdfState**](CombinedPdfState.md) | `pending` until the PDF has been generated, then `processed`. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. `error`: the PDFs couldn't be merged (see `error_message`). Waiting ends in `error` if it's discarded or takes over 30 days. | |
9
9
  | **source_pdfs** | [**Array&lt;CombinedPdfSource&gt;**](CombinedPdfSource.md) | The PDFs to merge, in order. | |
10
- | **metadata** | **Hash&lt;String, Object&gt;** | Your own data about the combined PDF, such as an ID from your app. | |
10
+ | **metadata** | **Hash&lt;String, Object&gt;** | Your own data about the combined PDF, such as an ID from your app. Its `pdf_filename` key names the PDF's file (`files.pdf.filename`, and its download): a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the combined PDF's ID (`com_1234567890abcdef01.pdf`). | |
11
11
  | **has_password** | **Boolean** | Whether the PDF needs a password to open (`password`). | |
12
12
  | **delete_custom_files** | **Boolean** | Delete the custom files in `source_pdfs` once the combined PDF has been generated (they're kept if it fails). Other combined PDFs can't use them after that. A test API token can't delete custom files. | |
13
13
  | **error_message** | **String** | Why the PDFs couldn't be merged, when `state` is `error`. | |
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **source_pdfs** | [**Array&lt;CombinedPdfSourceInput&gt;**](CombinedPdfSourceInput.md) | The PDFs to merge, in order. | |
8
- | **metadata** | **Hash&lt;String, Object&gt;** | Your own data about the combined PDF, such as an ID from your app. | [optional] |
8
+ | **metadata** | **Hash&lt;String, Object&gt;** | Your own data about the combined PDF, such as an ID from your app. Its `pdf_filename` key names the PDF's file (`files.pdf.filename`, and its download): a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the combined PDF's ID (`com_1234567890abcdef01.pdf`). | [optional] |
9
9
  | **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. | [optional] |
10
10
  | **delete_custom_files** | **Boolean** | Delete the custom files in `source_pdfs` once the combined PDF has been generated (they're kept if it fails). Other combined PDFs can't use them after that. A test API token can't delete custom files. | [optional] |
11
11
  | **expires_in** | **Integer** | Seconds after the PDF is generated until the combined PDF expires, up to 10 years (315360000). One that fails is kept for at least 48 hours. Without it, the combined PDF is kept until you delete it. | [optional] |