docspring 4.7.0 → 4.8.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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +18 -1
  4. data/lib/docspring/api/client.rb +1354 -123
  5. data/lib/docspring/api_client.rb +1 -1
  6. data/lib/docspring/models/add_page_numbers_request.rb +279 -0
  7. data/lib/docspring/models/ask_support_help_request.rb +1 -1
  8. data/lib/docspring/models/base64_job_source.rb +222 -0
  9. data/lib/docspring/models/combined_pdf_job_source.rb +222 -0
  10. data/lib/docspring/models/compress_pdf_request.rb +207 -0
  11. data/lib/docspring/models/create_template_request.rb +22 -2
  12. data/lib/docspring/models/custom_file_job_source.rb +222 -0
  13. data/lib/docspring/models/decrypt_pdf_request.rb +217 -0
  14. data/lib/docspring/models/encrypt_pdf_request.rb +237 -0
  15. data/lib/docspring/models/error_info.rb +15 -5
  16. data/lib/docspring/models/extract_pages_request.rb +234 -0
  17. data/lib/docspring/models/field.rb +1 -1
  18. data/lib/docspring/models/field_input.rb +1 -1
  19. data/lib/docspring/models/flatten_pdf_request.rb +207 -0
  20. data/lib/docspring/models/html_engine_options.rb +1 -1
  21. data/lib/docspring/models/html_engine_options_input.rb +1 -1
  22. data/lib/docspring/models/htmlto_pdf_request.rb +322 -0
  23. data/lib/docspring/models/image_format.rb +41 -0
  24. data/lib/docspring/models/images_to_pdf_request.rb +241 -0
  25. data/lib/docspring/models/job.rb +508 -0
  26. data/lib/docspring/models/job_file.rb +308 -0
  27. data/lib/docspring/models/job_file_job_source.rb +232 -0
  28. data/lib/docspring/models/job_html_engine.rb +41 -0
  29. data/lib/docspring/models/job_list.rb +200 -0
  30. data/lib/docspring/models/job_operation.rb +53 -0
  31. data/lib/docspring/models/job_operation_filter.rb +53 -0
  32. data/lib/docspring/models/job_options.rb +392 -0
  33. data/lib/docspring/models/job_page_margin.rb +198 -0
  34. data/lib/docspring/models/job_page_size.rb +51 -0
  35. data/lib/docspring/models/job_source.rb +267 -0
  36. data/lib/docspring/models/job_source_input.rb +66 -0
  37. data/lib/docspring/models/job_source_type.rb +46 -0
  38. data/lib/docspring/models/job_state.rb +42 -0
  39. data/lib/docspring/models/markdown_to_pdf_request.rb +312 -0
  40. data/lib/docspring/models/page_image.rb +3 -3
  41. data/lib/docspring/models/page_number_position.rb +45 -0
  42. data/lib/docspring/models/page_size.rb +45 -0
  43. data/lib/docspring/models/pdf_permissions.rb +198 -0
  44. data/lib/docspring/models/pdf_permissions_input.rb +198 -0
  45. data/lib/docspring/models/pdfto_images_request.rb +269 -0
  46. data/lib/docspring/models/pdfto_text_request.rb +217 -0
  47. data/lib/docspring/models/rotate_pages_request.rb +244 -0
  48. data/lib/docspring/models/split_pdf_request.rb +229 -0
  49. data/lib/docspring/models/submission_job_source.rb +222 -0
  50. data/lib/docspring/models/template.rb +41 -2
  51. data/lib/docspring/models/template_blank_page.rb +212 -0
  52. data/lib/docspring/models/template_blank_page_input.rb +212 -0
  53. data/lib/docspring/models/template_document.rb +1 -1
  54. data/lib/docspring/models/template_html_engine.rb +41 -0
  55. data/lib/docspring/models/template_page_images.rb +3 -3
  56. data/lib/docspring/models/template_page_list.rb +243 -0
  57. data/lib/docspring/models/template_page_list_input.rb +243 -0
  58. data/lib/docspring/models/template_page_processing_status.rb +28 -1
  59. data/lib/docspring/models/update_template_request.rb +33 -2
  60. data/lib/docspring/models/upload_job_source.rb +222 -0
  61. data/lib/docspring/models/url_job_source.rb +222 -0
  62. data/lib/docspring/models/watermark_layer.rb +41 -0
  63. data/lib/docspring/models/watermark_pdf_request.rb +316 -0
  64. data/lib/docspring/models/webhook_event_type.rb +4 -1
  65. data/lib/docspring/request_schemas.json +1997 -45
  66. data/lib/docspring/version.rb +1 -1
  67. data/lib/docspring.rb +45 -0
  68. metadata +46 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f1401ec0b0f8d154f8341c3e0bebb89f271a2a3317cf99623ca5e82b52033d6
4
- data.tar.gz: 303bb4829df9a0292a4b68e7fd7e2e47e7209fb47bc02080d312e10501e4c87d
3
+ metadata.gz: 40be9ad44e900739c5a45302f51be413594279bb4170dbf17eaf3774f94438a2
4
+ data.tar.gz: e758a9288b8e3521891b099215fbfb5db7a54bebc42744ecf78736fb289cb727
5
5
  SHA512:
6
- metadata.gz: ec1ace213a31532e6541cba90af6692efb6fc038b5866d756e6d40234561f56e64ae06df1400af480ea4d8d826b3cb3e523466d27dce59415f24e83995c0ad5e
7
- data.tar.gz: 7d7737c9a14306bc4f3856bbc0d6c702d339619239bd73f478092d601acb2c47b5fd1847cbd13f7d76cd2860521886e442c0ab56693417ca1b57679160cf243b
6
+ metadata.gz: b60849c3a48122065efaaf6dc54d57c7e0030e31df545d50b7717a3be91ff0aea89e724d7957312cdf524b852594a7fead82544a05d68c989413913d68bf1e54
7
+ data.tar.gz: 7329e1643a54ebbbe5ed17b17ab4d27d8036cff51b1ac654c57c2512105af80b2f0584be6faf31897afc2c3dde00b34c085d0c5ac87d8a52f2344819fa9c50ad
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ### 4.8.0 [December 4, 2026]
2
+
3
+ - New: the PDF tools, which run on files you send, with no template. `split_pdf`, `extract_pages`,
4
+ `rotate_pages`, `encrypt_pdf`, `decrypt_pdf`, `watermark_pdf`, `add_page_numbers`, `compress_pdf`, `flatten_pdf`,
5
+ `pdf_to_images`, `images_to_pdf` and `pdf_to_text` each start a job on a PDF (or images) you give as a URL, an upload,
6
+ base64 or a file already in DocSpring. `html_to_pdf` and `markdown_to_pdf` convert HTML or Markdown you send to a PDF.
7
+ Each returns a job with links to the files it made: `get_job` reads it again, `list_jobs` lists your jobs and
8
+ `delete_job` deletes one and its files. See [PDF Tools API](https://docspring.com/docs/api-guide/pdf-tools/).
9
+ - New: `Template` has `page_list`, a PDF template's pages in the order its generated PDFs have them (`TemplatePageList`: `source_pages`, the `pages` in order, and the `blank_pages` added), which update_template takes too. Null puts the PDF's pages back in order. Fields' `page` numbers and get_template_page_images follow it, and a blank page's `PageImage` has a null `download_url`.
10
+
1
11
  ### 4.7.0 [November 18, 2026]
2
12
 
3
13
  - New: support for AI agents that use DocSpring. `ask_support_help` puts a question to DocSpring's AI help, which
@@ -24,6 +34,11 @@
24
34
  - New: `SubmissionFiles` has `signing_manifest`, the audit data behind a signed submission's audit trail, as JSON.
25
35
  - Changed: without `expires_in`, a submission follows its template's expiry, or your account's data retention settings
26
36
  when the template doesn't override them, and a combined PDF follows your account's settings.
37
+ - New: `Template` has `markdown`, whether an HTML template's body is written in Markdown (GitHub Flavored Markdown,
38
+ which can also hold HTML), which create_template and update_template take too.
39
+ - New: `Template` has `html_engine`, what renders an HTML template's PDFs: `standard` (DocSpring's own renderer, much
40
+ faster) or `chromium` (headless Chrome, which runs JavaScript), which create_template and update_template take too.
41
+ Other values are refused.
27
42
  - New: `Template` has `form_sections_in_order`, whether a web form with sections makes people fill them out in order, which create_template and update_template take too.
28
43
  - New: `Template` has `continue_before_optional_fields`, whether visual forms and signature requests show Continue
29
44
  next to Next as soon as the required fields are filled in (on by default), which create_template and update_template take too.
data/README.md CHANGED
@@ -13,7 +13,7 @@ pull requests are welcome.
13
13
  Outside Ruby code, the [DocSpring CLI](https://docspring.com/docs/cli/) calls the same API from a terminal or a
14
14
  shell script, and the [MCP server](https://docspring.com/docs/mcp/) connects AI assistants to your account.
15
15
 
16
- Version 4.7.0. Requires Ruby >= 2.7.
16
+ Version 4.8.0. Requires Ruby >= 2.7.
17
17
 
18
18
  ## Install and configure
19
19
 
@@ -90,8 +90,10 @@ Ruby code for every method.
90
90
 
91
91
  | Method | Description |
92
92
  | ------ | ----------- |
93
+ | [`add_page_numbers`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#add_page_numbers) | Add page numbers |
93
94
  | [`add_template_fields`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#add_template_fields) | Add fields to a template |
94
95
  | [`ask_support_help`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#ask_support_help) | Ask for help |
96
+ | [`compress_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#compress_pdf) | Compress a PDF |
95
97
  | [`copy_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#copy_template) | Copy a template |
96
98
  | [`create_account_email_action`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_account_email_action) | Create an account email action |
97
99
  | [`create_combined_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_combined_pdf) | Combine PDFs |
@@ -106,16 +108,21 @@ Ruby code for every method.
106
108
  | [`create_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_template) | Create a template |
107
109
  | [`create_template_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_template_preview) | Preview a template with data |
108
110
  | [`create_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_webhook) | Create a webhook |
111
+ | [`decrypt_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#decrypt_pdf) | Decrypt a PDF |
109
112
  | [`delete_account_email_action`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_account_email_action) | Delete an account email action |
110
113
  | [`delete_custom_file`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_custom_file) | Delete a custom file |
111
114
  | [`delete_email_action`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_email_action) | Delete an email action |
112
115
  | [`delete_email_action_customization`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_email_action_customization) | Reset an account email action's customization |
113
116
  | [`delete_email_domain`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_email_domain) | Remove an email domain |
114
117
  | [`delete_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_folder) | Delete a folder |
118
+ | [`delete_job`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_job) | Delete a job |
115
119
  | [`delete_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_template) | Delete a template |
116
120
  | [`delete_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_webhook) | Delete a webhook |
121
+ | [`encrypt_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#encrypt_pdf) | Encrypt a PDF |
117
122
  | [`expire_combined_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_combined_pdf) | Expire a combined PDF |
118
123
  | [`expire_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_submission) | Expire a submission |
124
+ | [`extract_pages`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#extract_pages) | Extract pages from a PDF |
125
+ | [`flatten_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#flatten_pdf) | Flatten a PDF |
119
126
  | [`generate_submission_files`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_submission_files) | Generate more files |
120
127
  | [`generate_submission_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_submission_preview) | Generate a preview PDF |
121
128
  | [`get_account_email_action`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_account_email_action) | Get an account email action |
@@ -124,6 +131,7 @@ Ruby code for every method.
124
131
  | [`get_email_action`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_email_action) | Get an email action |
125
132
  | [`get_email_domain`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_email_domain) | Get an email domain |
126
133
  | [`get_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_folder) | Get a folder |
134
+ | [`get_job`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_job) | Get a job |
127
135
  | [`get_presign_url`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_presign_url) | Get a presigned URL to upload a file |
128
136
  | [`get_signature_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_signature_request) | Get a signature request |
129
137
  | [`get_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission) | Get a submission |
@@ -137,30 +145,38 @@ Ruby code for every method.
137
145
  | [`get_template_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_preview) | Get a template preview |
138
146
  | [`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 |
139
147
  | [`get_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_webhook) | Get a webhook |
148
+ | [`html_to_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#html_to_pdf) | Convert HTML to a PDF |
149
+ | [`images_to_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#images_to_pdf) | Convert images to a PDF |
140
150
  | [`list_account_email_actions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_account_email_actions) | List account email actions |
141
151
  | [`list_combined_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_combined_pdfs) | List combined PDFs |
142
152
  | [`list_custom_files`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_custom_files) | List custom files |
143
153
  | [`list_email_actions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_email_actions) | List email actions |
144
154
  | [`list_email_domains`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_email_domains) | List email domains |
145
155
  | [`list_folders`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_folders) | List folders |
156
+ | [`list_jobs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_jobs) | List jobs |
146
157
  | [`list_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_submissions) | List submissions |
147
158
  | [`list_support_tickets`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_support_tickets) | List support tickets |
148
159
  | [`list_template_fields`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_template_fields) | List a template's fields |
149
160
  | [`list_template_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_template_submissions) | List a template's submissions |
150
161
  | [`list_templates`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_templates) | List templates |
151
162
  | [`list_webhooks`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_webhooks) | List webhooks |
163
+ | [`markdown_to_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#markdown_to_pdf) | Convert Markdown to a PDF |
152
164
  | [`move_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_folder) | Move a folder |
153
165
  | [`move_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_template) | Move a template to a folder |
154
166
  | [`open_support_ticket`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#open_support_ticket) | Open a support ticket |
167
+ | [`pdf_to_images`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#pdf_to_images) | Render PDF pages as images |
168
+ | [`pdf_to_text`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#pdf_to_text) | Extract text from a PDF |
155
169
  | [`publish_template_version`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#publish_template_version) | Publish a template version |
156
170
  | [`remove_template_fields`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#remove_template_fields) | Remove fields from a template |
157
171
  | [`rename_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#rename_folder) | Rename a folder |
158
172
  | [`reorder_template_fields`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#reorder_template_fields) | Reorder a template's fields |
159
173
  | [`reply_to_support_ticket`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#reply_to_support_ticket) | Reply to a support ticket |
160
174
  | [`restore_template_version`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#restore_template_version) | Restore a template version |
175
+ | [`rotate_pages`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#rotate_pages) | Rotate pages |
161
176
  | [`send_account_email_action_test_email`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#send_account_email_action_test_email) | Send a test email for an account email action |
162
177
  | [`send_email_action_test_email`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#send_email_action_test_email) | Send a test email |
163
178
  | [`send_support_feedback`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#send_support_feedback) | Send feedback |
179
+ | [`split_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#split_pdf) | Split a PDF |
164
180
  | [`test_authentication`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#test_authentication) | Test authentication |
165
181
  | [`update_account_email_action`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_account_email_action) | Update an account email action |
166
182
  | [`update_email_action`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_email_action) | Update an email action |
@@ -174,6 +190,7 @@ Ruby code for every method.
174
190
  | [`upload_template_document`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#upload_template_document) | Replace a template's document with an uploaded file |
175
191
  | [`validate_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#validate_submission) | Check a submission without creating it |
176
192
  | [`verify_email_domain`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#verify_email_domain) | Verify an email domain |
193
+ | [`watermark_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#watermark_pdf) | Watermark a PDF |
177
194
 
178
195
  ## Errors
179
196