docspring 4.3.0 → 4.4.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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +80 -0
  3. data/.openapi-generator/FILES +84 -0
  4. data/CHANGELOG.md +55 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +20 -1
  7. data/docs/AddTemplateFieldsRequest.md +1 -1
  8. data/docs/Client.md +2311 -766
  9. data/docs/CombinedPdfSource.md +1 -1
  10. data/docs/CreateAccountEmailActionRequest.md +54 -0
  11. data/docs/CreateEmailActionRequest.md +50 -0
  12. data/docs/CreateEmailDomainRequest.md +18 -0
  13. data/docs/CreateSubmissionBatchRequest.md +2 -2
  14. data/docs/CreateSubmissionRequest.md +22 -4
  15. data/docs/CreateTemplateRequest.md +22 -6
  16. data/docs/DnsRecordType.md +15 -0
  17. data/docs/EmailAction.md +76 -0
  18. data/docs/EmailActionConditions.md +20 -0
  19. data/docs/EmailActionConditionsInput.md +20 -0
  20. data/docs/EmailActionCustomization.md +36 -0
  21. data/docs/EmailActionDelivery.md +15 -0
  22. data/docs/EmailActionFileFormats.md +15 -0
  23. data/docs/EmailActionList.md +20 -0
  24. data/docs/EmailActionSetting.md +15 -0
  25. data/docs/EmailActionSubmissionType.md +15 -0
  26. data/docs/EmailActionTestEmail.md +18 -0
  27. data/docs/EmailDomain.md +38 -0
  28. data/docs/EmailDomainDnsRecord.md +24 -0
  29. data/docs/EmailDomainDnsRecordPurpose.md +15 -0
  30. data/docs/EmailDomainList.md +20 -0
  31. data/docs/EmailDomainRecordState.md +15 -0
  32. data/docs/EmailDomainState.md +15 -0
  33. data/docs/ErrorInfo.md +12 -6
  34. data/docs/Field.md +1 -1
  35. data/docs/FieldInput.md +1 -1
  36. data/docs/HtmlEngineOptions.md +1 -1
  37. data/docs/HtmlEngineOptionsInput.md +1 -1
  38. data/docs/SendAccountEmailActionTestEmailRequest.md +18 -0
  39. data/docs/SignatureRequest.md +9 -1
  40. data/docs/SignatureRequestEmailAttachments.md +15 -0
  41. data/docs/SignatureRequestEmailStatus.md +15 -0
  42. data/docs/SignatureRequestInput.md +7 -3
  43. data/docs/SignatureRequestReminders.md +20 -0
  44. data/docs/SigningOrder.md +15 -0
  45. data/docs/Submission.md +4 -2
  46. data/docs/SubmissionAction.md +5 -3
  47. data/docs/SubmissionInput.md +3 -3
  48. data/docs/SubmissionSummary.md +1 -1
  49. data/docs/Template.md +23 -7
  50. data/docs/TemplateSourcePdf.md +1 -1
  51. data/docs/TemplateSummary.md +4 -4
  52. data/docs/UpdateAccountEmailActionRequest.md +54 -0
  53. data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
  54. data/docs/UpdateEmailActionRequest.md +50 -0
  55. data/docs/UpdateTemplateDocumentRequest.md +1 -1
  56. data/docs/UpdateTemplateRequest.md +21 -5
  57. data/docs/ValidateSubmissionRequest.md +22 -4
  58. data/lib/docspring/api/client.rb +1749 -314
  59. data/lib/docspring/api_client.rb +1 -1
  60. data/lib/docspring/models/add_template_fields_request.rb +1 -1
  61. data/lib/docspring/models/combined_pdf_source.rb +1 -1
  62. data/lib/docspring/models/create_account_email_action_request.rb +388 -0
  63. data/lib/docspring/models/create_email_action_request.rb +364 -0
  64. data/lib/docspring/models/create_email_domain_request.rb +185 -0
  65. data/lib/docspring/models/create_submission_batch_request.rb +2 -2
  66. data/lib/docspring/models/create_submission_request.rb +143 -7
  67. data/lib/docspring/models/create_template_request.rb +107 -7
  68. data/lib/docspring/models/dns_record_type.rb +42 -0
  69. data/lib/docspring/models/email_action.rb +790 -0
  70. data/lib/docspring/models/email_action_conditions.rb +219 -0
  71. data/lib/docspring/models/email_action_conditions_input.rb +219 -0
  72. data/lib/docspring/models/email_action_customization.rb +360 -0
  73. data/lib/docspring/models/email_action_delivery.rb +41 -0
  74. data/lib/docspring/models/email_action_file_formats.rb +43 -0
  75. data/lib/docspring/models/email_action_list.rb +200 -0
  76. data/lib/docspring/models/email_action_setting.rb +53 -0
  77. data/lib/docspring/models/email_action_submission_type.rb +42 -0
  78. data/lib/docspring/models/email_action_test_email.rb +185 -0
  79. data/lib/docspring/models/email_domain.rb +423 -0
  80. data/lib/docspring/models/email_domain_dns_record.rb +288 -0
  81. data/lib/docspring/models/email_domain_dns_record_purpose.rb +42 -0
  82. data/lib/docspring/models/email_domain_list.rb +200 -0
  83. data/lib/docspring/models/email_domain_record_state.rb +42 -0
  84. data/lib/docspring/models/email_domain_state.rb +42 -0
  85. data/lib/docspring/models/error_code.rb +3 -1
  86. data/lib/docspring/models/error_info.rb +39 -9
  87. data/lib/docspring/models/field.rb +1 -1
  88. data/lib/docspring/models/field_input.rb +1 -1
  89. data/lib/docspring/models/html_engine_options.rb +1 -1
  90. data/lib/docspring/models/html_engine_options_input.rb +1 -1
  91. data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
  92. data/lib/docspring/models/signature_request.rb +68 -2
  93. data/lib/docspring/models/signature_request_email_attachments.rb +41 -0
  94. data/lib/docspring/models/signature_request_email_status.rb +47 -0
  95. data/lib/docspring/models/signature_request_event_type.rb +3 -1
  96. data/lib/docspring/models/signature_request_input.rb +25 -22
  97. data/lib/docspring/models/signature_request_reminders.rb +212 -0
  98. data/lib/docspring/models/signing_order.rb +41 -0
  99. data/lib/docspring/models/string_condition_type.rb +8 -1
  100. data/lib/docspring/models/submission.rb +30 -3
  101. data/lib/docspring/models/submission_action.rb +18 -5
  102. data/lib/docspring/models/submission_input.rb +3 -3
  103. data/lib/docspring/models/submission_summary.rb +1 -1
  104. data/lib/docspring/models/template.rb +144 -8
  105. data/lib/docspring/models/template_source_pdf.rb +1 -1
  106. data/lib/docspring/models/template_summary.rb +4 -4
  107. data/lib/docspring/models/template_type.rb +2 -1
  108. data/lib/docspring/models/update_account_email_action_request.rb +388 -0
  109. data/lib/docspring/models/update_email_action_customization_request.rb +343 -0
  110. data/lib/docspring/models/update_email_action_request.rb +364 -0
  111. data/lib/docspring/models/update_template_document_request.rb +1 -1
  112. data/lib/docspring/models/update_template_request.rb +108 -8
  113. data/lib/docspring/models/validate_submission_request.rb +143 -7
  114. data/lib/docspring/models/webhook_event_type.rb +3 -1
  115. data/lib/docspring/request_schemas.json +1691 -145
  116. data/lib/docspring/request_validator.rb +4 -0
  117. data/lib/docspring/version.rb +1 -1
  118. data/lib/docspring.rb +28 -0
  119. data/spec/api/client_spec.rb +306 -18
  120. data/spec/models/create_account_email_action_request_spec.rb +144 -0
  121. data/spec/models/create_email_action_request_spec.rb +132 -0
  122. data/spec/models/create_email_domain_request_spec.rb +36 -0
  123. data/spec/models/create_submission_request_spec.rb +54 -0
  124. data/spec/models/create_template_request_spec.rb +48 -0
  125. data/spec/models/dns_record_type_spec.rb +30 -0
  126. data/spec/models/email_action_conditions_input_spec.rb +42 -0
  127. data/spec/models/email_action_conditions_spec.rb +42 -0
  128. data/spec/models/email_action_customization_spec.rb +90 -0
  129. data/spec/models/email_action_delivery_spec.rb +30 -0
  130. data/spec/models/email_action_file_formats_spec.rb +30 -0
  131. data/spec/models/email_action_list_spec.rb +42 -0
  132. data/spec/models/email_action_setting_spec.rb +30 -0
  133. data/spec/models/email_action_spec.rb +210 -0
  134. data/spec/models/email_action_submission_type_spec.rb +30 -0
  135. data/spec/models/email_action_test_email_spec.rb +36 -0
  136. data/spec/models/email_domain_dns_record_purpose_spec.rb +30 -0
  137. data/spec/models/email_domain_dns_record_spec.rb +54 -0
  138. data/spec/models/email_domain_list_spec.rb +42 -0
  139. data/spec/models/email_domain_record_state_spec.rb +30 -0
  140. data/spec/models/email_domain_spec.rb +96 -0
  141. data/spec/models/email_domain_state_spec.rb +30 -0
  142. data/spec/models/error_info_spec.rb +18 -0
  143. data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
  144. data/spec/models/signature_request_email_attachments_spec.rb +30 -0
  145. data/spec/models/signature_request_email_status_spec.rb +30 -0
  146. data/spec/models/signature_request_input_spec.rb +12 -0
  147. data/spec/models/signature_request_reminders_spec.rb +42 -0
  148. data/spec/models/signature_request_spec.rb +24 -0
  149. data/spec/models/signing_order_spec.rb +30 -0
  150. data/spec/models/submission_action_spec.rb +6 -0
  151. data/spec/models/submission_spec.rb +6 -0
  152. data/spec/models/template_spec.rb +48 -0
  153. data/spec/models/update_account_email_action_request_spec.rb +144 -0
  154. data/spec/models/update_email_action_customization_request_spec.rb +120 -0
  155. data/spec/models/update_email_action_request_spec.rb +132 -0
  156. data/spec/models/update_template_request_spec.rb +48 -0
  157. data/spec/models/validate_submission_request_spec.rb +54 -0
  158. metadata +115 -4
  159. data/.gitlab-ci.yml +0 -26
  160. data/.travis.yml +0 -11
@@ -0,0 +1,38 @@
1
+ # DocSpring::EmailDomain
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The email domain's ID. | |
8
+ | **domain** | **String** | The domain name, such as `example.com` or `mail.example.com`. Email actions can send from any address at it. | |
9
+ | **state** | [**EmailDomainState**](EmailDomainState.md) | `pending` until its DNS records are found, then `verified`. `failed`: its records weren't found within 3 days, or were removed. Verify it again after fixing them. | |
10
+ | **dkim_state** | [**EmailDomainRecordState**](EmailDomainRecordState.md) | Whether the DKIM records were found. | |
11
+ | **mail_from_state** | [**EmailDomainRecordState**](EmailDomainRecordState.md) | Whether the MAIL FROM records were found. They're optional: they let SPF pass for your domain too. | |
12
+ | **dns_records** | [**Array<EmailDomainDnsRecord>**](EmailDomainDnsRecord.md) | The DNS records to add to the domain. Empty while DocSpring is still setting the domain up: verify it again in a few minutes to get them. | |
13
+ | **dmarc_policy** | **String** | The policy (`p=`) of the domain's DMARC record, once it has been found. | |
14
+ | **last_error** | **String** | Why the domain isn't verified yet, or what to fix. | |
15
+ | **verified_at** | **Time** | When the domain was verified. | |
16
+ | **checked_at** | **Time** | When DocSpring last checked the domain's DNS records. | |
17
+ | **created_at** | **Time** | When the domain was added. | |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'docspring'
23
+
24
+ instance = DocSpring::EmailDomain.new(
25
+ id: null,
26
+ domain: null,
27
+ state: null,
28
+ dkim_state: null,
29
+ mail_from_state: null,
30
+ dns_records: null,
31
+ dmarc_policy: null,
32
+ last_error: null,
33
+ verified_at: null,
34
+ checked_at: null,
35
+ created_at: null
36
+ )
37
+ ```
38
+
@@ -0,0 +1,24 @@
1
+ # DocSpring::EmailDomainDnsRecord
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **purpose** | [**EmailDomainDnsRecordPurpose**](EmailDomainDnsRecordPurpose.md) | What the record is for. `dkim` signs the emails (required), `mail_from` lets SPF pass for your domain (recommended), and `dmarc` tells inboxes what to do with emails that fail these checks (required). | |
8
+ | **type** | [**DnsRecordType**](DnsRecordType.md) | The record's type. | |
9
+ | **name** | **String** | The record's name. Some DNS hosts add the domain to the end of a name by themselves. | |
10
+ | **value** | **String** | The record's value. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'docspring'
16
+
17
+ instance = DocSpring::EmailDomainDnsRecord.new(
18
+ purpose: null,
19
+ type: null,
20
+ name: null,
21
+ value: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,15 @@
1
+ # DocSpring::EmailDomainDnsRecordPurpose
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'docspring'
12
+
13
+ instance = DocSpring::EmailDomainDnsRecordPurpose.new()
14
+ ```
15
+
@@ -0,0 +1,20 @@
1
+ # DocSpring::EmailDomainList
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array<EmailDomain>**](EmailDomain.md) | The items on this page. | |
8
+ | **next_cursor** | **String** | Pass it as `cursor` to get the next page. Null on the last page. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'docspring'
14
+
15
+ instance = DocSpring::EmailDomainList.new(
16
+ data: null,
17
+ next_cursor: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,15 @@
1
+ # DocSpring::EmailDomainRecordState
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'docspring'
12
+
13
+ instance = DocSpring::EmailDomainRecordState.new()
14
+ ```
15
+
@@ -0,0 +1,15 @@
1
+ # DocSpring::EmailDomainState
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'docspring'
12
+
13
+ instance = DocSpring::EmailDomainState.new()
14
+ ```
15
+
data/docs/ErrorInfo.md CHANGED
@@ -4,14 +4,17 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **code** | [**ErrorCode**](ErrorCode.md) | A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count) or the embedded template editor. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): a request with the same Idempotency-Key is still being processed. Send the request again in a few seconds; when the first request has already created its record, its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. | |
7
+ | **code** | [**ErrorCode**](ErrorCode.md) | A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `insufficient_credits_to_send` (402): your credit balance can't cover a live signature request that DocSpring would email, so nothing was saved. Add credits and send the request again. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count), the embedded template editor, email actions, or live signature requests before your account's first payment. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): the first request with the same Idempotency-Key is still being processed, and the response has a `Retry-After` header: send the request again then. Without the header, the first request was processed but its response is no longer kept. When the first request created a record, its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id`, `template_id`, `folder_id`, `custom_file_id` or `webhook_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. `rate_limited` (429): too many API requests. Wait for the `Retry-After` header's seconds. `daily_email_limit_reached` (429): a submission that DocSpring would email would take your account over its daily email limit, so nothing was saved. Send it again after the `Retry-After` header's seconds (midnight UTC), or send the signing links yourself (`send_email: false`). | |
8
8
  | **message** | **String** | A human-readable explanation, safe to show to developers. | |
9
9
  | **details** | [**Array<ErrorDetail>**](ErrorDetail.md) | What was wrong with each part of the request. Empty when the error isn't about one part of it. | |
10
10
  | **request_id** | **String** | The ID of the request. Include it when you contact support. | |
11
- | **submission_id** | **String** | When a submission's data fails validation, the submission is still recorded (state `invalid_data`) so you can see it in the dashboard. This is its ID. With `insufficient_credits`, the submission that waits for credits. With `polling_timeout` or `idempotency_key_in_use`, the submission that's still being processed. | [optional] |
12
- | **submission_batch_id** | **String** | The ID of the recorded batch, when items in a batch fail validation. With `insufficient_credits`, the batch whose submissions wait for credits. With `polling_timeout` or `idempotency_key_in_use`, the batch that's still being processed. | [optional] |
13
- | **combined_pdf_id** | **String** | With `insufficient_credits`, the combined PDF that waits for credits. With `polling_timeout` or `idempotency_key_in_use`, the combined PDF that's still being processed. | [optional] |
14
- | **template_id** | **String** | With `polling_timeout`, the template whose PDF is still being processed. | [optional] |
11
+ | **submission_id** | **String** | When a submission's data fails validation, the submission is still recorded (state `invalid_data`) so you can see it in the dashboard. This is its ID. With `insufficient_credits`, the submission that waits for credits. With `polling_timeout`, the submission that's still being processed. With `idempotency_key_in_use`, the submission the first request with the key created. | [optional] |
12
+ | **submission_batch_id** | **String** | The ID of the recorded batch, when items in a batch fail validation. With `insufficient_credits`, the batch whose submissions wait for credits. With `polling_timeout`, the batch that's still being processed. With `idempotency_key_in_use`, the batch the first request with the key created. | [optional] |
13
+ | **combined_pdf_id** | **String** | With `insufficient_credits`, the combined PDF that waits for credits. With `polling_timeout`, the combined PDF that's still being processed. With `idempotency_key_in_use`, the combined PDF the first request with the key created. | [optional] |
14
+ | **template_id** | **String** | With `polling_timeout`, the template whose PDF is still being processed. With `idempotency_key_in_use`, the template the first request with the key created. | [optional] |
15
+ | **folder_id** | **String** | With `idempotency_key_in_use`, the folder the first request with the key created. | [optional] |
16
+ | **custom_file_id** | **String** | With `idempotency_key_in_use`, the custom file the first request with the key created. | [optional] |
17
+ | **webhook_id** | **String** | With `idempotency_key_in_use`, the webhook the first request with the key created. | [optional] |
15
18
 
16
19
  ## Example
17
20
 
@@ -26,7 +29,10 @@ instance = DocSpring::ErrorInfo.new(
26
29
  submission_id: null,
27
30
  submission_batch_id: null,
28
31
  combined_pdf_id: null,
29
- template_id: null
32
+ template_id: null,
33
+ folder_id: null,
34
+ custom_file_id: null,
35
+ webhook_id: null
30
36
  )
31
37
  ```
32
38
 
data/docs/Field.md CHANGED
@@ -83,7 +83,7 @@
83
83
  | **true_text** | **String** | Boolean fields with text display: the text printed when the value is `true`. Empty uses the template's `true_text`; when neither is set, nothing prints. | |
84
84
  | **false_text** | **String** | Boolean fields with text display: the text printed when the value is `false`. Empty uses the template's `false_text`; when neither is set, nothing prints. | |
85
85
  | **condition** | **String** | Check and shape display only: the value a string or number field's value is compared with, by `string_condition_type` or `number_condition_type`, to decide whether the check mark or shape prints. Boolean fields print when `true` (see `invert_boolean_condition`), and other types print when they have a value. | |
86
- | **string_condition_type** | [**StringConditionType**](StringConditionType.md) | String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression the value must match. | |
86
+ | **string_condition_type** | [**StringConditionType**](StringConditionType.md) | String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression (RE2 syntax) the value must match; each has a `not_` form that prints when it doesn't match (`not_equals`, `not_regex`, ...). `blank` prints when the value is empty or only spaces and line breaks, and `not_blank` when it isn't; they ignore `condition`. | |
87
87
  | **number_condition_type** | [**NumberConditionType**](NumberConditionType.md) | Number fields with check or shape display: how the value is compared with `condition`: `equals`, `gt` (greater than), `gte` (greater than or equal to), `lt` (less than), `lte` (less than or equal to), or `range`, between `number_condition_range_min` and `number_condition_range_max`. | |
88
88
  | **number_condition_range_min** | **Float** | With `number_condition_type` `range`: the lower end of the range, included unless `number_condition_range_exclusive_min` is set. | |
89
89
  | **number_condition_range_max** | **Float** | With `number_condition_type` `range`: the upper end of the range, included unless `number_condition_range_exclusive_max` is set. | |
data/docs/FieldInput.md CHANGED
@@ -81,7 +81,7 @@
81
81
  | **true_text** | **String** | Boolean fields with text display: the text printed when the value is `true`. Empty uses the template's `true_text`; when neither is set, nothing prints. | [optional] |
82
82
  | **false_text** | **String** | Boolean fields with text display: the text printed when the value is `false`. Empty uses the template's `false_text`; when neither is set, nothing prints. | [optional] |
83
83
  | **condition** | **String** | Check and shape display only: the value a string or number field's value is compared with, by `string_condition_type` or `number_condition_type`, to decide whether the check mark or shape prints. Boolean fields print when `true` (see `invert_boolean_condition`), and other types print when they have a value. | [optional] |
84
- | **string_condition_type** | [**StringConditionType**](StringConditionType.md) | String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression the value must match. | [optional] |
84
+ | **string_condition_type** | [**StringConditionType**](StringConditionType.md) | String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression (RE2 syntax) the value must match; each has a `not_` form that prints when it doesn't match (`not_equals`, `not_regex`, ...). `blank` prints when the value is empty or only spaces and line breaks, and `not_blank` when it isn't; they ignore `condition`. | [optional] |
85
85
  | **number_condition_type** | [**NumberConditionType**](NumberConditionType.md) | Number fields with check or shape display: how the value is compared with `condition`: `equals`, `gt` (greater than), `gte` (greater than or equal to), `lt` (less than), `lte` (less than or equal to), or `range`, between `number_condition_range_min` and `number_condition_range_max`. | [optional] |
86
86
  | **number_condition_range_min** | **Float** | With `number_condition_type` `range`: the lower end of the range, included unless `number_condition_range_exclusive_min` is set. | [optional] |
87
87
  | **number_condition_range_max** | **Float** | With `number_condition_type` `range`: the upper end of the range, included unless `number_condition_range_exclusive_max` is set. | [optional] |
@@ -7,7 +7,7 @@
7
7
  | **format** | [**PageFormat**](PageFormat.md) | The paper size. `Custom` uses `width` and `height`. | |
8
8
  | **width** | **String** | The page width for the `Custom` format, with a unit (`8.5in`, `210mm`). | [optional] |
9
9
  | **height** | **String** | The page height for the `Custom` format, with a unit. | [optional] |
10
- | **scale** | **Float** | How much to scale the page, such as `0.8`. `1` prints it at its normal size. | |
10
+ | **scale** | **Float** | How much to scale the page, from 0.1 to 2, such as `0.8`. `1` prints it at its normal size. | |
11
11
  | **landscape** | **Boolean** | Print pages in landscape orientation. | |
12
12
  | **print_background** | **Boolean** | Print background colors and images. | |
13
13
  | **margin_top** | **String** | The top margin, with a unit, such as `1in` or `20mm`. | |
@@ -7,7 +7,7 @@
7
7
  | **format** | [**PageFormat**](PageFormat.md) | The paper size. `Custom` uses `width` and `height`. | [optional] |
8
8
  | **width** | **String** | The page width for the `Custom` format, with a unit (`8.5in`, `210mm`). | [optional] |
9
9
  | **height** | **String** | The page height for the `Custom` format, with a unit. | [optional] |
10
- | **scale** | **Float** | How much to scale the page, such as `0.8`. `1` prints it at its normal size. | [optional] |
10
+ | **scale** | **Float** | How much to scale the page, from 0.1 to 2, such as `0.8`. `1` prints it at its normal size. | [optional] |
11
11
  | **landscape** | **Boolean** | Print pages in landscape orientation. | [optional] |
12
12
  | **print_background** | **Boolean** | Print background colors and images. | [optional] |
13
13
  | **margin_top** | **String** | The top margin, with a unit, such as `1in` or `20mm`. | [optional] |
@@ -0,0 +1,18 @@
1
+ # DocSpring::SendAccountEmailActionTestEmailRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **template_id** | **String** | A template the email action sends for: the test uses its PDF and name. Left out, it uses the one that changed most recently. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'docspring'
13
+
14
+ instance = DocSpring::SendAccountEmailActionTestEmailRequest.new(
15
+ template_id: null
16
+ )
17
+ ```
18
+
@@ -7,11 +7,15 @@
7
7
  | **id** | **String** | The signature request's ID. | |
8
8
  | **submission_id** | **String** | The ID of the submission the signature request belongs to. | |
9
9
  | **name** | **String** | The name of the person the request is for. | |
10
- | **email** | **String** | Their email address. | |
10
+ | **email** | **String** | Their email address. Null when they have none. | |
11
11
  | **fields** | **Array<String>** | The fields this person fills in. Null for a signature request created with API v1 without a field list: it asks for every field the submission's data doesn't have. | |
12
12
  | **metadata** | **Hash<String, Object>** | Your own data about the signature request, such as an ID from your app. | |
13
13
  | **role** | **String** | Which of the template's signers the person is. Until templates have roles of their own, a template's signers are `Signer 1`, `Signer 2` and so on, up to `Signer 100`: `Signer 1` is the one whose details the template's `@@signature_requests/0` fields print. | |
14
14
  | **sort_order** | **Integer** | The signer's position, from 0: `Signer 1` is 0. The template's `@@signature_requests/<sort_order>` fields print this signature request's details. | |
15
+ | **send_email** | **Boolean** | Whether DocSpring emails this person their signing link. | |
16
+ | **signing_step** | **Integer** | When this person signs, when the submission's `signing_order` is `sequential`: everyone in step 1 first, then step 2, and so on. Null when everyone can sign at once. | |
17
+ | **sent_at** | **Time** | When DocSpring first emailed this person their signing link. Null until it has, and when it doesn't email them (`send_email` is false). | |
18
+ | **email_status** | [**SignatureRequestEmailStatus**](SignatureRequestEmailStatus.md) | What happened to the latest email DocSpring sent this person with their signing link: `sent` until the email service reports on it, then `delayed` (still trying), `delivered`, `undelivered` (it stopped trying, as with a full mailbox), `bounced` (the address doesn't exist) or `complained` (marked as spam). `failed` means DocSpring couldn't send the first email with their link, and `unknown` that it couldn't tell whether that email went: neither is sent again. Null until DocSpring has emailed them or tried to. | |
15
19
  | **state** | [**SignatureRequestState**](SignatureRequestState.md) | `pending` until the person completes the signature request (`completed`) or declines it (`declined`). | |
16
20
  | **data** | **Hash<String, Object>** | The values this person entered for their own fields (`fields`). Null when their submission's data is left out: in lists without `include_data=true`, in the events of a webhook that leaves out submission data, and once the submission has expired. | |
17
21
  | **viewed_at** | **Time** | When the person first opened the signature request. | |
@@ -44,6 +48,10 @@ instance = DocSpring::SignatureRequest.new(
44
48
  metadata: null,
45
49
  role: null,
46
50
  sort_order: null,
51
+ send_email: null,
52
+ signing_step: null,
53
+ sent_at: null,
54
+ email_status: null,
47
55
  state: null,
48
56
  data: null,
49
57
  viewed_at: null,
@@ -0,0 +1,15 @@
1
+ # DocSpring::SignatureRequestEmailAttachments
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'docspring'
12
+
13
+ instance = DocSpring::SignatureRequestEmailAttachments.new()
14
+ ```
15
+
@@ -0,0 +1,15 @@
1
+ # DocSpring::SignatureRequestEmailStatus
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'docspring'
12
+
13
+ instance = DocSpring::SignatureRequestEmailStatus.new()
14
+ ```
15
+
@@ -5,11 +5,11 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | The name of the person the request is for. | [optional] |
8
- | **email** | **String** | Their email address. | [optional] |
8
+ | **email** | **String** | Their email address. Null when they have none. | [optional] |
9
9
  | **fields** | **Array<String>** | The fields this person fills in. Each field can only be in one signature request, and a field that `data` fills in needs `prefilled_values_editable`. | |
10
10
  | **metadata** | **Hash<String, Object>** | Your own data about the signature request, such as an ID from your app. | [optional] |
11
11
  | **role** | **String** | Which of the template's signers the person is: `Signer 1`, `Signer 2` and so on, up to `Signer 100`, until templates have roles of their own. Either every signature request has a `role` or none does, and each role can only have one. | [optional] |
12
- | **auth_type** | [**SignatureRequestAuthType**](SignatureRequestAuthType.md) | How your app authenticated the person before it showed them the signature request. | |
12
+ | **auth_type** | [**SignatureRequestAuthType**](SignatureRequestAuthType.md) | How your app authenticated the person before it showed them the signature request. | [optional] |
13
13
  | **auth_second_factor_type** | [**SignatureRequestAuthSecondFactorType**](SignatureRequestAuthSecondFactorType.md) | The second factor your app authenticated them with, if any. | [optional] |
14
14
  | **auth_provider** | **String** | The service that authenticated them, such as `google`. Required when `auth_type` is `oauth`. | [optional] |
15
15
  | **auth_session_started_at** | **Time** | When your app authenticated them. Set for you with `email_link`. | [optional] |
@@ -19,6 +19,8 @@
19
19
  | **auth_phone_number_hash** | **String** | The phone number they authenticated with, or a SHA-256 hash of a salt and the phone number. | [optional] |
20
20
  | **ignore_unknown_fields** | **Boolean** | Leave out names in `fields` that the template doesn't have, for one field list that you send with several templates. Without it, an unknown name makes the submission `invalid_data`. | [optional] |
21
21
  | **prefilled_values_editable** | **Boolean** | Let the person change the values that `data` already has for fields in `fields`. Without it, those fields are a 422. | [optional] |
22
+ | **send_email** | **Boolean** | Whether DocSpring emails this person their signing link. Default: the submission's `send_email`. Set it to false for someone who signs in your app (embedded signing) or whose link you send yourself. When DocSpring emails them, `email` is required and `auth_type` is `email_link` (the default). Otherwise `auth_type` is required. | [optional] |
23
+ | **signing_step** | **Integer** | When this person signs, with `signing_order: sequential`: everyone in step 1 first, then step 2, and so on. People in the same step sign in any order. Only the order of the numbers matters. Either every signature request has a `signing_step` or none does; without them, each person is a step of their own, in the order of `signature_requests`. | [optional] |
22
24
 
23
25
  ## Example
24
26
 
@@ -40,7 +42,9 @@ instance = DocSpring::SignatureRequestInput.new(
40
42
  auth_username_hash: null,
41
43
  auth_phone_number_hash: null,
42
44
  ignore_unknown_fields: null,
43
- prefilled_values_editable: null
45
+ prefilled_values_editable: null,
46
+ send_email: null,
47
+ signing_step: null
44
48
  )
45
49
  ```
46
50
 
@@ -0,0 +1,20 @@
1
+ # DocSpring::SignatureRequestReminders
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **interval_days** | **Integer** | Days between reminders. | |
8
+ | **max_count** | **Integer** | The most reminders each person gets. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'docspring'
14
+
15
+ instance = DocSpring::SignatureRequestReminders.new(
16
+ interval_days: null,
17
+ max_count: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,15 @@
1
+ # DocSpring::SigningOrder
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'docspring'
12
+
13
+ instance = DocSpring::SigningOrder.new()
14
+ ```
15
+
data/docs/Submission.md CHANGED
@@ -11,7 +11,7 @@
11
11
  | **batch_id** | **String** | The ID of the batch the submission was created in. | |
12
12
  | **source** | [**SubmissionSource**](SubmissionSource.md) | `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again. | |
13
13
  | **state** | [**SubmissionState**](SubmissionState.md) | `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no files: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`. | |
14
- | **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions. | |
14
+ | **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live. | |
15
15
  | **editable** | **Boolean** | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | |
16
16
  | **data** | **Hash<String, Object>** | The submission's data, with the values entered in completed signature requests. Empty once the submission has expired. Null in a batch's submissions unless you pass `include_data=true`, and in the events of a webhook that leaves out submission data. | |
17
17
  | **data_errors** | [**Array<ErrorDetail>**](ErrorDetail.md) | Why the data doesn't match the template's fields, when `state` is `invalid_data`: the same details as the 422 response that recorded it, with pointers into the request that created the submission (`/data/name`). Cleared once the submission has expired. | |
@@ -25,7 +25,8 @@
25
25
  | **updated_at** | **Time** | When the submission was last updated. | |
26
26
  | **has_password** | **Boolean** | Whether the PDF needs a password to open (`password`). | |
27
27
  | **signature_requests** | [**Array<SignatureRequest>**](SignatureRequest.md) | The people asked to sign the submission (and fill in their fields), in order. | |
28
- | **actions** | [**Array<SubmissionAction>**](SubmissionAction.md) | The uploads of the submission's PDF to your storage (account integrations). | |
28
+ | **signing_order** | [**SigningOrder**](SigningOrder.md) | `parallel`: everyone can sign at once. `sequential`: people sign one step at a time (each signature request's `signing_step`). | |
29
+ | **actions** | [**Array<SubmissionAction>**](SubmissionAction.md) | The uploads of the submission's PDF to your storage (account integrations), and the emails its template's email actions sent. | |
29
30
  | **truncated_text** | **Hash<String, Array<String>>** | The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired. | |
30
31
  | **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission. | |
31
32
  | **preview_generated_at** | **Time** | When the preview PDF was generated. Null if there is no preview. | |
@@ -57,6 +58,7 @@ instance = DocSpring::Submission.new(
57
58
  updated_at: null,
58
59
  has_password: null,
59
60
  signature_requests: null,
61
+ signing_order: null,
60
62
  actions: null,
61
63
  truncated_text: null,
62
64
  output_formats: null,
@@ -6,9 +6,10 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | The upload's ID. | |
8
8
  | **integration_id** | **String** | The ID of the account integration it used. | |
9
- | **state** | [**SubmissionActionState**](SubmissionActionState.md) | `pending` until the upload has run, then `processed`. `failed`: your storage rejected it. `error`: it failed in DocSpring. | |
10
- | **action_type** | [**SubmissionActionType**](SubmissionActionType.md) | The kind of storage, such as `aws_s3_upload` for an S3 bucket. | |
11
- | **result_data** | **Hash<String, Object>** | Where the PDF was uploaded, such as the S3 bucket and key. | |
9
+ | **email_action_id** | **String** | The ID of the email action that sent the email. Null for an upload, or once the email action is deleted. | |
10
+ | **state** | [**SubmissionActionState**](SubmissionActionState.md) | `pending` until the upload or email has run, then `processed`. `failed`: your storage or the email service rejected it. `error`: it failed in DocSpring. | |
11
+ | **action_type** | [**SubmissionActionType**](SubmissionActionType.md) | The kind of storage, such as `aws_s3_upload` for an S3 bucket, or `email` for an email action's email. | |
12
+ | **result_data** | **Hash<String, Object>** | Where the PDF was uploaded, such as the S3 bucket and key. For an email: its `subject`, `recipients`, each with its `address`, `kind` (`to`, `cc` or `bcc`), `source`, `field` or `metadata` when the address came from one, and `status` (`sent`, `delivered`, `bounced`, `complained`, `skipped` and others), `sent_at`, `delivery`, and `files` (the files it sent: `pdf`, `docx`, `odt`). An email whose submission didn't meet the email action's `send_when` conditions has only `skipped`, `conditions_not_met`, and its state is `processed`. An email whose submission made none of the files the email action sends has `skipped`, `no_files` and the action's `file_formats`, and its state is `processed` too. When the submission's data is left out (a batch, or a webhook without submission data), the subject and the addresses that came from fields or metadata are null. | |
12
13
  | **error_message** | **String** | Why the upload failed, when `state` is `failed` or `error`. | |
13
14
 
14
15
  ## Example
@@ -19,6 +20,7 @@ require 'docspring'
19
20
  instance = DocSpring::SubmissionAction.new(
20
21
  id: null,
21
22
  integration_id: null,
23
+ email_action_id: null,
22
24
  state: null,
23
25
  action_type: null,
24
26
  result_data: null,
@@ -4,13 +4,13 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions. | [optional] |
7
+ | **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live. | [optional] |
8
8
  | **editable** | **Boolean** | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | [optional] |
9
- | **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF and Word templates. | [optional] |
9
+ | **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs. | [optional] |
10
10
  | **metadata** | **Hash<String, Object>** | Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, 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 submission's ID (`sub_1234567890abcdef01.pdf`). | [optional] |
11
11
  | **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. Word documents and OpenDocument files can't be password-protected, so a submission with a password can't make them. | [optional] |
12
12
  | **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission. | [optional] |
13
- | **expires_in** | **Integer** | Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. | [optional] |
13
+ | **expires_in** | **Integer** | Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. The demo API token's submissions expire within an hour: up to 3600, and that's their default. | [optional] |
14
14
  | **field_overrides** | [**Hash<String, FieldOverride>**](FieldOverride.md) | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`. | [optional] |
15
15
  | **html** | **String** | For an HTML template, HTML to use instead of the template's. | [optional] |
16
16
  | **css** | **String** | For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity. | [optional] |
@@ -11,7 +11,7 @@
11
11
  | **batch_id** | **String** | The ID of the batch the submission was created in. | |
12
12
  | **source** | [**SubmissionSource**](SubmissionSource.md) | `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again. | |
13
13
  | **state** | [**SubmissionState**](SubmissionState.md) | `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no files: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`. | |
14
- | **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions. | |
14
+ | **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live. | |
15
15
  | **editable** | **Boolean** | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | |
16
16
  | **data** | **Hash<String, Object>** | The submission's data, with the values entered in completed signature requests. Null unless you pass `include_data=true`. Empty once the submission has expired. | |
17
17
  | **data_errors** | [**Array<ErrorDetail>**](ErrorDetail.md) | Why the data doesn't match the template's fields, when `state` is `invalid_data`: the same details as the 422 response that recorded it, with pointers into the request that created the submission (`/data/name`). Cleared once the submission has expired. | |
data/docs/Template.md CHANGED
@@ -7,9 +7,9 @@
7
7
  | **id** | **String** | The template's ID. | |
8
8
  | **name** | **String** | The template's name. | |
9
9
  | **description** | **String** | Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests. | |
10
- | **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created. | |
11
- | **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. | |
12
- | **ready** | **Boolean** | Whether the template can make documents. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded). | |
10
+ | **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. `page_designer`: a page design, a PDF laid out in the Page Designer from its `layout`. It can't be changed after the template is created. | |
11
+ | **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; other templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. | |
12
+ | **ready** | **Boolean** | Whether the template can make documents. HTML templates and page designs are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded). | |
13
13
  | **document** | [**TemplateDocument**](TemplateDocument.md) | The PDF of a PDF template, or the Word document of a Word template. Null for HTML templates, and for a PDF template that has no PDF yet. A template created from a `document_url` has one, with no file, while it's downloaded. | |
14
14
  | **parent_folder_id** | **String** | The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions. | |
15
15
  | **path** | **String** | The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root. | |
@@ -26,7 +26,7 @@
26
26
  | **allow_skipping_optional_fields** | **Boolean** | Visual forms and signature request forms show the Continue button as soon as the required fields are filled in, without visiting each optional field. The `allowSkippingOptionalFields` embed option overrides it. | |
27
27
  | **default_form_mode** | [**TemplateFormMode**](TemplateFormMode.md) | The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs). Only PDF templates have a visual form, so other templates accept only `web`. | |
28
28
  | **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | |
29
- | **embed_domains** | **Array<String>** | The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work). Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and the simple form) aren't restricted. | |
29
+ | **embed_domains** | **Array<String>** | The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and the simple form) aren't restricted. | |
30
30
  | **embed_edit_allow_settings** | **Boolean** | Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on). | |
31
31
  | **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | |
32
32
  | **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | |
@@ -40,6 +40,13 @@
40
40
  | **public_submissions** | **Boolean** | Allow anyone with a submission's ID to download its PDF. | |
41
41
  | **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | |
42
42
  | **redirect_url** | **String** | Where the web form sends people after they submit it. | |
43
+ | **signature_request_email_attachments** | [**SignatureRequestEmailAttachments**](SignatureRequestEmailAttachments.md) | How DocSpring's completed emails send the signed PDF to your signers and CCs: `attachment` (attached, or a download link when it's too big to attach) or `link` (a download link). Null uses your account's rule: a link if your account has signed a BAA, otherwise attached. PDF templates only. A signature request uses the value it had when the request was created. | |
44
+ | **signature_request_from_address** | **String** | The address DocSpring's emails to your signers come from: an address at one of your verified email domains, on the Growth plan or higher. Null sends them from DocSpring's shared address, with "via DocSpring" after the sender name. PDF templates only. | |
45
+ | **signature_request_include_signing_token** | **Boolean** | Puts a signing token in `signature_request_signing_url`, as `{{ token_id }}` and `{{ token_secret }}`, so your page can open the signing form without creating a token itself. The email then carries a credential: anyone who has it can open the form and sign. PDF templates only. | |
46
+ | **signature_request_from_name** | **String** | The sender name on the emails DocSpring sends your signers, as in "Acme via DocSpring". It can't contain an email address, a website or quotes. Null uses your account's name. PDF templates only. | |
47
+ | **signature_request_notification_emails** | **Array<String>** | Who DocSpring tells when a signature request's document is completed or declined, or an email bounces or can't be sent: members of your DocSpring team or addresses at your verified email domains. Empty means your account's owner. A submission's `notification_emails` replaces them. PDF templates only. | |
48
+ | **signature_request_reply_to** | **String** | Where your signers' replies to DocSpring's emails go: a member of your DocSpring team or an address at one of your verified email domains. Null means your account's owner. A submission's `reply_to` replaces it. PDF templates only. | |
49
+ | **signature_request_signing_url** | **String** | A page on your own site that the button in DocSpring's email to a signer opens, instead of DocSpring's signing page: an https URL on one of your verified email domains or a subdomain of one, on the Growth plan or higher. It must include `{{ signature_request_id }}`. Your page authenticates the signer, creates a token for the signature request, and opens the signing form with it. Null links to DocSpring's signing page. PDF templates only. | |
43
50
  | **has_slack_webhook_url** | **Boolean** | Whether `slack_webhook_url` is set. | |
44
51
  | **last_changed_by** | [**TemplateActor**](TemplateActor.md) | Who last changed the draft: a user in your account, an API token, or someone using the embedded template editor. Null if no change has been recorded. | |
45
52
  | **defaults** | [**TemplateDefaults**](TemplateDefaults.md) | | |
@@ -47,12 +54,13 @@
47
54
  | **field_groups** | [**Array<FieldGroup>**](FieldGroup.md) | The groups of the template's fields, with their settings. A field's name puts it in groups: `address/city` is in the group `address`, and `items/0/price` is in the list `items` and its items' group `items/~`. | |
48
55
  | **predefined_fields** | [**Array<PredefinedField>**](PredefinedField.md) | The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off. | |
49
56
  | **predefined_fields_sample_data** | **Hash<String, Object>** | Sample submission data that sets `predefined_fields`: each value becomes a predefined field, with a type that fits it (`string`, `number`, `boolean`, `date`, `email` or `url`) and `required_in_template` true. Nested objects and arrays become names with `/`, such as `customer/email`. Without `predefined_fields` in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for. | |
50
- | **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF and Word templates. | |
57
+ | **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for other templates. | |
51
58
  | **scss** | **String** | The SCSS of an HTML template. | |
52
59
  | **header_html** | **String** | The HTML printed at the top of each page of an HTML template. | |
53
60
  | **footer_html** | **String** | The HTML printed at the bottom of each page of an HTML template. | |
54
- | **html_engine_options** | [**HtmlEngineOptions**](HtmlEngineOptions.md) | How an HTML template's PDFs are printed. Null for PDF and Word templates. Setting it replaces the whole object: options left out use their defaults. | |
55
- | **html_escape_data** | **Boolean** | Whether an HTML template HTML-escapes the values it prints. When true, `{{ value }}` prints a value as text, so a `<` or `&` in it is printed as that character, and `{{ value | raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for PDF templates. | |
61
+ | **html_engine_options** | [**HtmlEngineOptions**](HtmlEngineOptions.md) | How an HTML template's PDFs are printed. Null for other templates. Setting it replaces the whole object: options left out use their defaults. | |
62
+ | **html_escape_data** | **Boolean** | Whether an HTML template HTML-escapes the values it prints. When true, `{{ value }}` prints a value as text, so a `<` or `&` in it is printed as that character, and `{{ value | raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for other templates. | |
63
+ | **layout** | **Hash<String, Object>** | A page design's layout: its page setup, its sections and the elements placed in them, in the Page Designer layout format (https://docspring.com/docs/page-designer/layout-format/). Its JSON Schema is at https://docspring.com/schemas/page-designer/layout.v1.json. Null for other templates. Setting it replaces the whole layout, and DocSpring adds a field for each value it reads. Left out when a page design is created, it starts with an empty page. | |
56
64
  | **embed_edit_token** | **String** | The token that opens the template in the embedded template editor. | |
57
65
  | **versions** | [**Array<TemplateVersion>**](TemplateVersion.md) | The template's published versions, newest first (up to 100). | |
58
66
 
@@ -98,6 +106,13 @@ instance = DocSpring::Template.new(
98
106
  public_submissions: null,
99
107
  public_web_form: null,
100
108
  redirect_url: null,
109
+ signature_request_email_attachments: null,
110
+ signature_request_from_address: null,
111
+ signature_request_include_signing_token: null,
112
+ signature_request_from_name: null,
113
+ signature_request_notification_emails: null,
114
+ signature_request_reply_to: null,
115
+ signature_request_signing_url: null,
101
116
  has_slack_webhook_url: null,
102
117
  last_changed_by: null,
103
118
  defaults: null,
@@ -111,6 +126,7 @@ instance = DocSpring::Template.new(
111
126
  footer_html: null,
112
127
  html_engine_options: null,
113
128
  html_escape_data: null,
129
+ layout: null,
114
130
  embed_edit_token: null,
115
131
  versions: null
116
132
  )
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **type** | **String** | Must be `template`. | [default to 'template'] |
8
8
  | **id** | **String** | The ID of the submission, combined PDF, template or custom file. | |
9
- | **template_version** | **String** | For a `template` source, the 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] |
9
+ | **template_version** | **String** | For a `template` source, the version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`. | [optional] |
10
10
  | **processed** | **Boolean** | For a `template` source: true (the default) merges the template's processed PDF, which is the PDF submissions are filled in on (decrypted, with its form fields removed). false merges the PDF as it was uploaded. | [optional] |
11
11
 
12
12
  ## Example
@@ -7,10 +7,10 @@
7
7
  | **id** | **String** | The template's ID. | |
8
8
  | **name** | **String** | The template's name. | |
9
9
  | **description** | **String** | Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests. | |
10
- | **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created. | |
11
- | **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. | |
12
- | **ready** | **Boolean** | Whether the template can make documents. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded). | |
13
- | **document** | [**TemplateDocumentSummary**](TemplateDocumentSummary.md) | The PDF of a PDF template, or the Word document of a Word template: its file name, page count and processing state. Null for HTML templates, and for a PDF template that has no PDF yet. A template created from a `document_url`, or a Word template created from an OpenDocument file (.odt), has one, with no file, while it's downloaded or converted. | |
10
+ | **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. `page_designer`: a page design, a PDF laid out in the Page Designer from its `layout`. It can't be changed after the template is created. | |
11
+ | **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; other templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. | |
12
+ | **ready** | **Boolean** | Whether the template can make documents. HTML templates and page designs are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded). | |
13
+ | **document** | [**TemplateDocumentSummary**](TemplateDocumentSummary.md) | The PDF of a PDF template, or the Word document of a Word template: its file name, page count and processing state. Null for HTML templates and page designs, and for a PDF template that has no PDF yet. A template created from a `document_url`, or a Word template created from an OpenDocument file (.odt), has one, with no file, while it's downloaded or converted. | |
14
14
  | **parent_folder_id** | **String** | The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions. | |
15
15
  | **path** | **String** | The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root. | |
16
16
  | **latest_version** | **String** | The template's latest published version. Null if no version has been published. | |