docspring 4.0.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 (167) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +99 -0
  3. data/.travis.yml +1 -1
  4. data/AGENTS.md +3 -2
  5. data/CHANGELOG.md +64 -0
  6. data/Gemfile.lock +9 -9
  7. data/README.md +14 -1
  8. data/docs/AddTemplateFieldsRequest.md +18 -0
  9. data/docs/Client.md +917 -80
  10. data/docs/CombinedPdf.md +1 -1
  11. data/docs/CreateCombinedPdfRequest.md +1 -1
  12. data/docs/CreateSubmissionBatchRequest.md +2 -0
  13. data/docs/CreateSubmissionRequest.md +4 -2
  14. data/docs/CreateTemplatePreviewRequest.md +18 -0
  15. data/docs/CreateTemplateRequest.md +13 -3
  16. data/docs/ErrorDetail.md +1 -1
  17. data/docs/ErrorInfo.md +4 -4
  18. data/docs/Field.md +198 -0
  19. data/docs/FieldDependency.md +22 -0
  20. data/docs/FieldDependencyInput.md +22 -0
  21. data/docs/FieldGroup.md +32 -0
  22. data/docs/FieldGroupInput.md +30 -0
  23. data/docs/FieldGroupType.md +15 -0
  24. data/docs/FieldInput.md +196 -0
  25. data/docs/FieldType.md +15 -0
  26. data/docs/GenerateFilesFormat.md +15 -0
  27. data/docs/GenerateSubmissionFilesRequest.md +18 -0
  28. data/docs/OutputFormat.md +15 -0
  29. data/docs/PageImage.md +34 -0
  30. data/docs/PageImages.md +24 -0
  31. data/docs/PredefinedField.md +30 -0
  32. data/docs/PredefinedFieldInput.md +30 -0
  33. data/docs/RemoveTemplateFieldsRequest.md +18 -0
  34. data/docs/ReorderTemplateFieldsRequest.md +18 -0
  35. data/docs/Submission.md +16 -14
  36. data/docs/SubmissionFiles.md +3 -1
  37. data/docs/SubmissionInput.md +4 -2
  38. data/docs/SubmissionList.md +1 -1
  39. data/docs/SubmissionSummary.md +54 -0
  40. data/docs/SubmissionValidation.md +24 -0
  41. data/docs/Template.md +18 -10
  42. data/docs/TemplateActor.md +1 -1
  43. data/docs/TemplateDiff.md +30 -0
  44. data/docs/TemplateDiffSummary.md +28 -0
  45. data/docs/TemplateDocument.md +6 -6
  46. data/docs/TemplateDocumentSummary.md +24 -0
  47. data/docs/TemplateFieldChange.md +24 -0
  48. data/docs/TemplateFieldChanges.md +24 -0
  49. data/docs/TemplateFieldDependency.md +1 -1
  50. data/docs/TemplateFieldDependencyInput.md +1 -1
  51. data/docs/TemplateFieldMove.md +22 -0
  52. data/docs/TemplateFields.md +22 -0
  53. data/docs/TemplatePageImages.md +24 -0
  54. data/docs/TemplatePreview.md +32 -0
  55. data/docs/TemplatePreviewState.md +15 -0
  56. data/docs/TemplateSummary.md +2 -48
  57. data/docs/UpdateTemplateDocumentRequest.md +6 -2
  58. data/docs/UpdateTemplateFieldsRequest.md +18 -0
  59. data/docs/UpdateTemplateRequest.md +10 -2
  60. data/docs/ValidateSubmissionRequest.md +38 -0
  61. data/lib/docspring/api/client.rb +869 -51
  62. data/lib/docspring/api_client.rb +4 -2
  63. data/lib/docspring/date_time_values.rb +33 -0
  64. data/lib/docspring/models/add_template_fields_request.rb +187 -0
  65. data/lib/docspring/models/combined_pdf.rb +1 -1
  66. data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
  67. data/lib/docspring/models/create_submission_batch_request.rb +23 -1
  68. data/lib/docspring/models/create_submission_request.rb +25 -3
  69. data/lib/docspring/models/create_template_preview_request.rb +187 -0
  70. data/lib/docspring/models/create_template_request.rb +59 -4
  71. data/lib/docspring/models/error_code.rb +3 -1
  72. data/lib/docspring/models/error_detail.rb +1 -1
  73. data/lib/docspring/models/error_info.rb +4 -4
  74. data/lib/docspring/models/field.rb +2217 -0
  75. data/lib/docspring/models/field_dependency.rb +246 -0
  76. data/lib/docspring/models/field_dependency_input.rb +246 -0
  77. data/lib/docspring/models/field_group.rb +368 -0
  78. data/lib/docspring/models/field_group_input.rb +247 -0
  79. data/lib/docspring/models/field_group_type.rb +41 -0
  80. data/lib/docspring/models/field_input.rb +1109 -0
  81. data/lib/docspring/models/field_type.rb +54 -0
  82. data/lib/docspring/models/generate_files_format.rb +40 -0
  83. data/lib/docspring/models/generate_submission_files_request.rb +187 -0
  84. data/lib/docspring/models/output_format.rb +41 -0
  85. data/lib/docspring/models/page_image.rb +359 -0
  86. data/lib/docspring/models/page_images.rb +248 -0
  87. data/lib/docspring/models/predefined_field.rb +287 -0
  88. data/lib/docspring/models/predefined_field_input.rb +287 -0
  89. data/lib/docspring/models/remove_template_fields_request.rb +187 -0
  90. data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
  91. data/lib/docspring/models/submission.rb +146 -117
  92. data/lib/docspring/models/submission_files.rb +13 -4
  93. data/lib/docspring/models/submission_input.rb +25 -3
  94. data/lib/docspring/models/submission_list.rb +1 -1
  95. data/lib/docspring/models/submission_summary.rb +601 -0
  96. data/lib/docspring/models/submission_validation.rb +234 -0
  97. data/lib/docspring/models/template.rb +169 -83
  98. data/lib/docspring/models/template_actor.rb +1 -1
  99. data/lib/docspring/models/template_diff.rb +321 -0
  100. data/lib/docspring/models/template_diff_summary.rb +320 -0
  101. data/lib/docspring/models/template_document.rb +44 -44
  102. data/lib/docspring/models/template_document_state.rb +3 -1
  103. data/lib/docspring/models/template_document_summary.rb +260 -0
  104. data/lib/docspring/models/template_field_change.rb +266 -0
  105. data/lib/docspring/models/template_field_changes.rb +274 -0
  106. data/lib/docspring/models/template_field_dependency.rb +1 -1
  107. data/lib/docspring/models/template_field_dependency_input.rb +1 -1
  108. data/lib/docspring/models/template_field_move.rb +239 -0
  109. data/lib/docspring/models/template_fields.rb +227 -0
  110. data/lib/docspring/models/template_page_images.rb +254 -0
  111. data/lib/docspring/models/template_preview.rb +356 -0
  112. data/lib/docspring/models/template_preview_state.rb +42 -0
  113. data/lib/docspring/models/template_summary.rb +5 -572
  114. data/lib/docspring/models/update_template_document_request.rb +23 -20
  115. data/lib/docspring/models/update_template_fields_request.rb +187 -0
  116. data/lib/docspring/models/update_template_request.rb +53 -6
  117. data/lib/docspring/models/validate_submission_request.rb +288 -0
  118. data/lib/docspring/request_schemas.json +3465 -1588
  119. data/lib/docspring/version.rb +1 -1
  120. data/lib/docspring/webhook_signature.rb +45 -0
  121. data/lib/docspring.rb +34 -0
  122. data/spec/api/client_spec.rb +167 -13
  123. data/spec/models/add_template_fields_request_spec.rb +36 -0
  124. data/spec/models/create_submission_batch_request_spec.rb +6 -0
  125. data/spec/models/create_submission_request_spec.rb +6 -0
  126. data/spec/models/create_template_preview_request_spec.rb +36 -0
  127. data/spec/models/create_template_request_spec.rb +30 -0
  128. data/spec/models/field_dependency_input_spec.rb +48 -0
  129. data/spec/models/field_dependency_spec.rb +48 -0
  130. data/spec/models/field_group_input_spec.rb +72 -0
  131. data/spec/models/field_group_spec.rb +78 -0
  132. data/spec/models/field_group_type_spec.rb +30 -0
  133. data/spec/models/field_input_spec.rb +570 -0
  134. data/spec/models/field_spec.rb +576 -0
  135. data/spec/models/field_type_spec.rb +30 -0
  136. data/spec/models/generate_files_format_spec.rb +30 -0
  137. data/spec/models/generate_submission_files_request_spec.rb +36 -0
  138. data/spec/models/output_format_spec.rb +30 -0
  139. data/spec/models/page_image_spec.rb +84 -0
  140. data/spec/models/page_images_spec.rb +54 -0
  141. data/spec/models/predefined_field_input_spec.rb +72 -0
  142. data/spec/models/predefined_field_spec.rb +72 -0
  143. data/spec/models/remove_template_fields_request_spec.rb +36 -0
  144. data/spec/models/reorder_template_fields_request_spec.rb +36 -0
  145. data/spec/models/submission_files_spec.rb +6 -0
  146. data/spec/models/submission_input_spec.rb +6 -0
  147. data/spec/models/submission_spec.rb +17 -11
  148. data/spec/models/submission_summary_spec.rb +144 -0
  149. data/spec/models/submission_validation_spec.rb +54 -0
  150. data/spec/models/template_diff_spec.rb +72 -0
  151. data/spec/models/template_diff_summary_spec.rb +66 -0
  152. data/spec/models/template_document_spec.rb +5 -5
  153. data/spec/models/template_document_summary_spec.rb +54 -0
  154. data/spec/models/template_field_change_spec.rb +54 -0
  155. data/spec/models/template_field_changes_spec.rb +54 -0
  156. data/spec/models/template_field_move_spec.rb +48 -0
  157. data/spec/models/template_fields_spec.rb +48 -0
  158. data/spec/models/template_page_images_spec.rb +54 -0
  159. data/spec/models/template_preview_spec.rb +78 -0
  160. data/spec/models/template_preview_state_spec.rb +30 -0
  161. data/spec/models/template_spec.rb +34 -10
  162. data/spec/models/template_summary_spec.rb +0 -138
  163. data/spec/models/update_template_document_request_spec.rb +12 -0
  164. data/spec/models/update_template_fields_request_spec.rb +36 -0
  165. data/spec/models/update_template_request_spec.rb +24 -0
  166. data/spec/models/validate_submission_request_spec.rb +96 -0
  167. metadata +135 -1
@@ -0,0 +1,24 @@
1
+ # DocSpring::SubmissionValidation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **valid** | **Boolean** | True when creating the submission would succeed. | |
8
+ | **template_id** | **String** | The template's ID. | |
9
+ | **template_version** | **String** | The published version the request was checked against, such as `1.2.0`. Null for the draft. | |
10
+ | **error** | [**ErrorInfo**](ErrorInfo.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'docspring'
16
+
17
+ instance = DocSpring::SubmissionValidation.new(
18
+ valid: null,
19
+ template_id: null,
20
+ template_version: null,
21
+ error: null
22
+ )
23
+ ```
24
+
data/docs/Template.md CHANGED
@@ -8,21 +8,24 @@
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
10
  | **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created. | |
11
- | **ready** | **Boolean** | Whether the template can generate PDFs. HTML templates are always ready. A PDF template is ready once its document has been processed (`document.state` is `processed`). | |
11
+ | **ready** | **Boolean** | Whether the template can generate PDFs. 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. | |
12
12
  | **document** | [**TemplateDocument**](TemplateDocument.md) | The PDF of a PDF template. Null for HTML templates, and for a PDF template that has no PDF yet. | |
13
13
  | **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. | |
14
14
  | **path** | **String** | The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root. | |
15
- | **version** | **String** | The published version this is, such as `1.2.0`. Null for the draft. | |
16
15
  | **latest_version** | **String** | The template's latest published version. Null if no version has been published. | |
17
16
  | **version_published_at** | **Time** | When this version was published. Null for the draft. | |
18
17
  | **locked** | **Boolean** | A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed). | |
18
+ | **last_changed_at** | **Time** | When the draft was last changed. | |
19
+ | **created_at** | **Time** | When the template was created. | |
20
+ | **updated_at** | **Time** | When the template was last updated. | |
21
+ | **version** | **String** | The published version this is, such as `1.2.0`. Null for the draft. | |
19
22
  | **add_signature_request_submission_id_footers** | **Boolean** | Print the submission ID in the footer of each page of PDFs signed through signature requests. | |
20
23
  | **ai_field_naming_language** | [**AiFieldNamingLanguage**](AiFieldNamingLanguage.md) | The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. New templates take it from your account's template settings. Null for HTML templates. | |
21
24
  | **allow_additional_properties** | **Boolean** | Accept submission data with properties that aren't fields of the template. | |
22
25
  | **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. | |
23
26
  | **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). HTML templates have no visual form, so `web` is the only value they accept. | |
24
27
  | **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | |
25
- | **embed_domains** | **Array<String>** | The sites where the template's signature requests, forms and embedded template editor can be loaded: 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). When it's empty, live signature requests don't load on any site, and the embedded template editor loads on every site. | |
28
+ | **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. | |
26
29
  | **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). | |
27
30
  | **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | |
28
31
  | **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | |
@@ -37,17 +40,18 @@
37
40
  | **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | |
38
41
  | **redirect_url** | **String** | Where the web form sends people after they submit it. | |
39
42
  | **has_slack_webhook_url** | **Boolean** | Whether `slack_webhook_url` is set. | |
40
- | **last_changed_at** | **Time** | When the draft was last changed. | |
41
43
  | **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. | |
42
- | **created_at** | **Time** | When the template was created. | |
43
- | **updated_at** | **Time** | When the template was last updated. | |
44
44
  | **defaults** | [**TemplateDefaults**](TemplateDefaults.md) | | |
45
45
  | **field_dependencies** | [**Array<TemplateFieldDependency>**](TemplateFieldDependency.md) | Conditional logic: each rule shows or hides its target fields, or makes them required, depending on the values of other fields. | |
46
+ | **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/~`. | |
47
+ | **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. | |
48
+ | **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. | |
46
49
  | **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF templates. | |
47
50
  | **scss** | **String** | The SCSS of an HTML template. | |
48
51
  | **header_html** | **String** | The HTML printed at the top of each page of an HTML template. | |
49
52
  | **footer_html** | **String** | The HTML printed at the bottom of each page of an HTML template. | |
50
53
  | **html_engine_options** | [**HtmlEngineOptions**](HtmlEngineOptions.md) | How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults. | |
54
+ | **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. | |
51
55
  | **embed_edit_token** | **String** | The token that opens the template in the embedded template editor. | |
52
56
  | **versions** | [**Array<TemplateVersion>**](TemplateVersion.md) | The template's published versions, newest first (up to 100). | |
53
57
 
@@ -65,10 +69,13 @@ instance = DocSpring::Template.new(
65
69
  document: null,
66
70
  parent_folder_id: null,
67
71
  path: null,
68
- version: null,
69
72
  latest_version: null,
70
73
  version_published_at: null,
71
74
  locked: null,
75
+ last_changed_at: null,
76
+ created_at: null,
77
+ updated_at: null,
78
+ version: null,
72
79
  add_signature_request_submission_id_footers: null,
73
80
  ai_field_naming_language: null,
74
81
  allow_additional_properties: null,
@@ -90,17 +97,18 @@ instance = DocSpring::Template.new(
90
97
  public_web_form: null,
91
98
  redirect_url: null,
92
99
  has_slack_webhook_url: null,
93
- last_changed_at: null,
94
100
  last_changed_by: null,
95
- created_at: null,
96
- updated_at: null,
97
101
  defaults: null,
98
102
  field_dependencies: null,
103
+ field_groups: null,
104
+ predefined_fields: null,
105
+ predefined_fields_sample_data: null,
99
106
  html: null,
100
107
  scss: null,
101
108
  header_html: null,
102
109
  footer_html: null,
103
110
  html_engine_options: null,
111
+ html_escape_data: null,
104
112
  embed_edit_token: null,
105
113
  versions: null
106
114
  )
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **type** | [**TemplateActorType**](TemplateActorType.md) | `user`: a user in your account. `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app. | |
7
+ | **type** | [**TemplateActorType**](TemplateActorType.md) | `user`: a user in your account, also when they make the change with an app they connected (an OAuth access token). `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app. | |
8
8
  | **user_id** | **String** | The user's ID, for `user`. | |
9
9
  | **external_id** | **String** | The ID your app gave the embedded editor's user, for `external_user`. | |
10
10
  | **name** | **String** | The user's name, or the name your app gave the embedded editor's user. | |
@@ -0,0 +1,30 @@
1
+ # DocSpring::TemplateDiff
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **template_id** | **String** | The template's ID. | |
8
+ | **from_version** | **String** | The earlier version, such as `1.1.0`. Null when no version was published before `to_version`: it's compared with a new template, so all of its fields are added. | |
9
+ | **to_version** | **String** | The later version, such as `1.2.0`. Null for the draft. | |
10
+ | **summary** | [**TemplateDiffSummary**](TemplateDiffSummary.md) | How many changes of each kind there are. | |
11
+ | **fields** | [**TemplateFieldChanges**](TemplateFieldChanges.md) | The fields that changed. | |
12
+ | **changed_settings** | **Array<String>** | The names of the template's settings that changed, as they're named on the Template (`name`, `html`, `defaults`, `expire_after`, ...). Values aren't included, and secrets like `encrypt_pdfs_password` are named when they change. | |
13
+ | **document_changed** | **Boolean** | The template's PDF was replaced (or added, when there's no `from_version`). | |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'docspring'
19
+
20
+ instance = DocSpring::TemplateDiff.new(
21
+ template_id: null,
22
+ from_version: null,
23
+ to_version: null,
24
+ summary: null,
25
+ fields: null,
26
+ changed_settings: null,
27
+ document_changed: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,28 @@
1
+ # DocSpring::TemplateDiffSummary
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **fields_added** | **Integer** | How many fields were added. | |
8
+ | **fields_removed** | **Integer** | How many fields were removed. | |
9
+ | **fields_changed** | **Integer** | How many fields have changed settings. | |
10
+ | **fields_reordered** | **Integer** | How many fields moved in the template's field order. | |
11
+ | **settings_changed** | **Integer** | How many of the template's settings changed. | |
12
+ | **total_changes** | **Integer** | All the changes, counting a new document as one. Zero when the versions are the same. | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'docspring'
18
+
19
+ instance = DocSpring::TemplateDiffSummary.new(
20
+ fields_added: null,
21
+ fields_removed: null,
22
+ fields_changed: null,
23
+ fields_reordered: null,
24
+ settings_changed: null,
25
+ total_changes: null
26
+ )
27
+ ```
28
+
@@ -4,12 +4,12 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **filename** | **String** | The PDF's file name. | |
7
+ | **filename** | **String** | The PDF's file name. Null until a `document_url` has been downloaded. | |
8
+ | **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed` (`ready` says when its pages are done too). `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. `downloading` while DocSpring downloads a `document_url`, then as for an upload. `download_failed` means it couldn't be downloaded, and `error_message` says why. A template keeps its PDF while a new one is downloaded, and when it couldn't be. | |
9
+ | **error_message** | **String** | Why the PDF couldn't be processed or downloaded, and how to fix it. Null unless `state` is an error. | |
10
+ | **page_count** | **Integer** | 0 until the PDF has been processed. | |
8
11
  | **md5** | **String** | The MD5 hash of the PDF. | |
9
- | **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed`. `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. | |
10
- | **error_message** | **String** | Why the PDF couldn't be processed, and how to fix it. Null unless `state` is an error. | |
11
12
  | **field_reimport_state** | [**FieldReimportState**](FieldReimportState.md) | Whether the fields are being re-imported from this PDF (`reimport_fields` when the PDF was replaced): `requested` while DocSpring processes the PDF, then `imported`, or `no_fields` when the PDF had no fillable fields and the template kept its fields. `none` when no re-import was asked for, or when it couldn't run (the PDF couldn't be processed, or the template was locked or published while it was). | |
12
- | **page_count** | **Integer** | 0 until the PDF has been processed. | |
13
13
  | **page_dimensions** | **Array<Array<Float>>** | Each page's width and height in PDF points. Null until the PDF has been processed. | |
14
14
  | **has_fillable_fields** | **Boolean** | Whether the PDF has fillable form fields. Null until DocSpring has read the PDF. | |
15
15
  | **page_processing_statuses** | [**Array<TemplatePageProcessingStatus>**](TemplatePageProcessingStatus.md) | How processing is going on each page, in page order: its image, and its fields when DocSpring sets them up (`detect_fields` when the template was created). `state` becomes `processed` once every page is done. Empty until DocSpring has read the PDF, and for PDFs uploaded before DocSpring recorded page statuses. | |
@@ -24,11 +24,11 @@ require 'docspring'
24
24
 
25
25
  instance = DocSpring::TemplateDocument.new(
26
26
  filename: null,
27
- md5: null,
28
27
  state: null,
29
28
  error_message: null,
30
- field_reimport_state: null,
31
29
  page_count: null,
30
+ md5: null,
31
+ field_reimport_state: null,
32
32
  page_dimensions: null,
33
33
  has_fillable_fields: null,
34
34
  page_processing_statuses: null,
@@ -0,0 +1,24 @@
1
+ # DocSpring::TemplateDocumentSummary
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **filename** | **String** | The PDF's file name. Null until a `document_url` has been downloaded. | |
8
+ | **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed` (`ready` says when its pages are done too). `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. `downloading` while DocSpring downloads a `document_url`, then as for an upload. `download_failed` means it couldn't be downloaded, and `error_message` says why. A template keeps its PDF while a new one is downloaded, and when it couldn't be. | |
9
+ | **error_message** | **String** | Why the PDF couldn't be processed or downloaded, and how to fix it. Null unless `state` is an error. | |
10
+ | **page_count** | **Integer** | 0 until the PDF has been processed. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'docspring'
16
+
17
+ instance = DocSpring::TemplateDocumentSummary.new(
18
+ filename: null,
19
+ state: null,
20
+ error_message: null,
21
+ page_count: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,24 @@
1
+ # DocSpring::TemplateFieldChange
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | The field's ID. | |
8
+ | **changed_settings** | **Array<String>** | The names of the settings that changed, such as `x` or `required`. | |
9
+ | **old** | [**Field**](Field.md) | | |
10
+ | **new** | [**Field**](Field.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'docspring'
16
+
17
+ instance = DocSpring::TemplateFieldChange.new(
18
+ id: null,
19
+ changed_settings: null,
20
+ old: null,
21
+ new: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,24 @@
1
+ # DocSpring::TemplateFieldChanges
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **added** | [**Array<Field>**](Field.md) | The fields that `to_version` has and `from_version` doesn't. | |
8
+ | **removed** | [**Array<Field>**](Field.md) | The fields that `from_version` has and `to_version` doesn't, as they were. | |
9
+ | **changed** | [**Array<TemplateFieldChange>**](TemplateFieldChange.md) | The fields with changed settings. | |
10
+ | **reordered** | [**Array<TemplateFieldMove>**](TemplateFieldMove.md) | The fields that moved in the template's field order (the order of its fields across all its pages, as the fields endpoint lists them): fields that swapped places, or the field that moved the furthest. The fields that a move pushed along aren't listed. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'docspring'
16
+
17
+ instance = DocSpring::TemplateFieldChanges.new(
18
+ added: null,
19
+ removed: null,
20
+ changed: null,
21
+ reordered: null
22
+ )
23
+ ```
24
+
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **action** | [**TemplateFieldDependencyAction**](TemplateFieldDependencyAction.md) | What the rule does to its targets when its conditions are met. | |
7
+ | **action** | [**TemplateFieldDependencyAction**](TemplateFieldDependencyAction.md) | What the rule does to the fields it applies to when its conditions are met. | |
8
8
  | **match** | [**TemplateFieldDependencyMatch**](TemplateFieldDependencyMatch.md) | Whether all of the conditions (the default) or any of them must be met. | [optional] |
9
9
  | **conditions** | [**Array<TemplateFieldDependencyCondition>**](TemplateFieldDependencyCondition.md) | The conditions on other fields' values. | |
10
10
  | **targets** | **Array<String>** | The names of the fields the rule shows or makes required. | |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **action** | [**TemplateFieldDependencyAction**](TemplateFieldDependencyAction.md) | What the rule does to its targets when its conditions are met. | |
7
+ | **action** | [**TemplateFieldDependencyAction**](TemplateFieldDependencyAction.md) | What the rule does to the fields it applies to when its conditions are met. | |
8
8
  | **match** | [**TemplateFieldDependencyMatch**](TemplateFieldDependencyMatch.md) | Whether all of the conditions (the default) or any of them must be met. | [optional] |
9
9
  | **conditions** | [**Array<TemplateFieldDependencyConditionInput>**](TemplateFieldDependencyConditionInput.md) | The conditions on other fields' values. | |
10
10
  | **targets** | **Array<String>** | The names of the fields the rule shows or makes required. | |
@@ -0,0 +1,22 @@
1
+ # DocSpring::TemplateFieldMove
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | The field's ID. | |
8
+ | **old_index** | **Integer** | Its place in `from_version`'s field order, starting at 0. | |
9
+ | **new_index** | **Integer** | Its place in `to_version`'s field order, starting at 0. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'docspring'
15
+
16
+ instance = DocSpring::TemplateFieldMove.new(
17
+ id: null,
18
+ old_index: null,
19
+ new_index: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # DocSpring::TemplateFields
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **template_id** | **String** | The template's ID. | |
8
+ | **version** | **String** | The published version the fields are of, such as `1.2.0`. Null for the draft. | |
9
+ | **fields** | [**Array<Field>**](Field.md) | The fields. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'docspring'
15
+
16
+ instance = DocSpring::TemplateFields.new(
17
+ template_id: null,
18
+ version: null,
19
+ fields: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # DocSpring::TemplatePageImages
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **template_id** | **String** | The template's ID. | |
8
+ | **version** | **String** | The published version the images are of, such as `1.2.0`. Null for the draft. | |
9
+ | **page_count** | **Integer** | How many pages the PDF has. | |
10
+ | **pages** | [**Array<PageImage>**](PageImage.md) | An image of each page, in order: `pages[0]` is page 1. Their `download_url`s expire, so get them again when you need them. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'docspring'
16
+
17
+ instance = DocSpring::TemplatePageImages.new(
18
+ template_id: null,
19
+ version: null,
20
+ page_count: null,
21
+ pages: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,32 @@
1
+ # DocSpring::TemplatePreview
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The preview's ID. | |
8
+ | **template_id** | **String** | The template's ID. | |
9
+ | **version** | **String** | The published version that was rendered, such as `1.2.0`. Null for the draft. | |
10
+ | **state** | [**TemplatePreviewState**](TemplatePreviewState.md) | `pending` while it renders (usually a few seconds), then `processed`, or `error` with an `error_message`. | |
11
+ | **error_message** | **String** | Why the preview couldn't be rendered, such as an error in an HTML template's Liquid, or a value in the data that a field can't print. | |
12
+ | **page_count** | **Integer** | How many pages the template printed, once it's processed. | |
13
+ | **pages** | [**Array<PageImage>**](PageImage.md) | A PNG image of each page once it's processed, in order: `pages[0]` is page 1. A preview has no PDF. Their `download_url`s expire, so get the preview again when you need them. | |
14
+ | **expires_at** | **Time** | When the preview and its images are deleted. | |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'docspring'
20
+
21
+ instance = DocSpring::TemplatePreview.new(
22
+ id: null,
23
+ template_id: null,
24
+ version: null,
25
+ state: null,
26
+ error_message: null,
27
+ page_count: null,
28
+ pages: null,
29
+ expires_at: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,15 @@
1
+ # DocSpring::TemplatePreviewState
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'docspring'
12
+
13
+ instance = DocSpring::TemplatePreviewState.new()
14
+ ```
15
+
@@ -8,37 +8,14 @@
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
10
  | **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created. | |
11
- | **ready** | **Boolean** | Whether the template can generate PDFs. HTML templates are always ready. A PDF template is ready once its document has been processed (`document.state` is `processed`). | |
12
- | **document** | [**TemplateDocument**](TemplateDocument.md) | The PDF of a PDF template. Null for HTML templates, and for a PDF template that has no PDF yet. | |
11
+ | **ready** | **Boolean** | Whether the template can generate PDFs. 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. | |
12
+ | **document** | [**TemplateDocumentSummary**](TemplateDocumentSummary.md) | The PDF of a PDF template: its file name, page count and processing state. Null for HTML templates, and for a PDF template that has no PDF yet. | |
13
13
  | **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. | |
14
14
  | **path** | **String** | The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root. | |
15
- | **version** | **String** | The published version this is, such as `1.2.0`. Null for the draft. | |
16
15
  | **latest_version** | **String** | The template's latest published version. Null if no version has been published. | |
17
16
  | **version_published_at** | **Time** | When this version was published. Null for the draft. | |
18
17
  | **locked** | **Boolean** | A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed). | |
19
- | **add_signature_request_submission_id_footers** | **Boolean** | Print the submission ID in the footer of each page of PDFs signed through signature requests. | |
20
- | **ai_field_naming_language** | [**AiFieldNamingLanguage**](AiFieldNamingLanguage.md) | The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. New templates take it from your account's template settings. Null for HTML templates. | |
21
- | **allow_additional_properties** | **Boolean** | Accept submission data with properties that aren't fields of the template. | |
22
- | **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. | |
23
- | **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). HTML templates have no visual form, so `web` is the only value they accept. | |
24
- | **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | |
25
- | **embed_domains** | **Array<String>** | The sites where the template's signature requests, forms and embedded template editor can be loaded: 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). When it's empty, live signature requests don't load on any site, and the embedded template editor loads on every site. | |
26
- | **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). | |
27
- | **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | |
28
- | **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | |
29
- | **encrypt_pdfs** | **Boolean** | Encrypt generated PDFs with `encrypt_pdfs_password`. | |
30
- | **has_encrypt_pdfs_password** | **Boolean** | Whether `encrypt_pdfs_password` is set. | |
31
- | **expire_submissions** | **Boolean** | Delete each submission's data and PDF after `expire_after` `expiration_interval`. | |
32
- | **expire_after** | **Integer** | How many `expiration_interval`s a submission's data and PDF are kept for, when `expire_submissions` is on. At most 5256000 (10 years in minutes). | |
33
- | **expiration_interval** | [**ExpirationInterval**](ExpirationInterval.md) | The unit of `expire_after`. | |
34
- | **merge_audit_trail_pdf** | **Boolean** | Add the audit trail to the end of PDFs signed through signature requests. | |
35
- | **parse_dates_using_template_date_format** | **Boolean** | Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way. | |
36
- | **public_submissions** | **Boolean** | Allow anyone with a submission's ID to download its PDF. | |
37
- | **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | |
38
- | **redirect_url** | **String** | Where the web form sends people after they submit it. | |
39
- | **has_slack_webhook_url** | **Boolean** | Whether `slack_webhook_url` is set. | |
40
18
  | **last_changed_at** | **Time** | When the draft was last changed. | |
41
- | **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. | |
42
19
  | **created_at** | **Time** | When the template was created. | |
43
20
  | **updated_at** | **Time** | When the template was last updated. | |
44
21
 
@@ -56,33 +33,10 @@ instance = DocSpring::TemplateSummary.new(
56
33
  document: null,
57
34
  parent_folder_id: null,
58
35
  path: null,
59
- version: null,
60
36
  latest_version: null,
61
37
  version_published_at: null,
62
38
  locked: null,
63
- add_signature_request_submission_id_footers: null,
64
- ai_field_naming_language: null,
65
- allow_additional_properties: null,
66
- allow_skipping_optional_fields: null,
67
- default_form_mode: null,
68
- editable_submissions: null,
69
- embed_domains: null,
70
- embed_edit_allow_settings: null,
71
- embed_edit_allow_versioning: null,
72
- embed_edit_allow_document_replacement: null,
73
- encrypt_pdfs: null,
74
- has_encrypt_pdfs_password: null,
75
- expire_submissions: null,
76
- expire_after: null,
77
- expiration_interval: null,
78
- merge_audit_trail_pdf: null,
79
- parse_dates_using_template_date_format: null,
80
- public_submissions: null,
81
- public_web_form: null,
82
- redirect_url: null,
83
- has_slack_webhook_url: null,
84
39
  last_changed_at: null,
85
- last_changed_by: null,
86
40
  created_at: null,
87
41
  updated_at: null
88
42
  )
@@ -4,8 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **cache_id** | **String** | The `fields.key` of the new PDF, uploaded with the presigned upload (GET /uploads/presign). | |
8
- | **filename** | **String** | The PDF's file name, for a `cache_id` (presigned uploads don't send one). | [optional] |
7
+ | **cache_id** | **String** | The `fields.key` of the new PDF, uploaded with the presigned upload (GET /uploads/presign). | [optional] |
8
+ | **document_url** | **String** | An https:// link to the template's PDF (up to 100 MB), instead of `cache_id`. DocSpring downloads it after responding, following redirects to other https:// links: the template's `document.state` is `downloading` until then (sync.api hosts wait for it). If it can't be downloaded, the state is `download_failed` and `document.error_message` says why. | [optional] |
9
+ | **document_base64** | **String** | The template's PDF, encoded as base64 (a `data:` URI works too), instead of `cache_id`. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`. | [optional] |
10
+ | **filename** | **String** | The PDF's file name, for a `cache_id` (presigned uploads don't send one) or `document_base64`. A `document_url`'s is the last part of its path unless you set it. | [optional] |
9
11
  | **reimport_fields** | **Boolean** | Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. | [optional] |
10
12
 
11
13
  ## Example
@@ -15,6 +17,8 @@ require 'docspring'
15
17
 
16
18
  instance = DocSpring::UpdateTemplateDocumentRequest.new(
17
19
  cache_id: null,
20
+ document_url: null,
21
+ document_base64: null,
18
22
  filename: null,
19
23
  reimport_fields: null
20
24
  )
@@ -0,0 +1,18 @@
1
+ # DocSpring::UpdateTemplateFieldsRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **fields** | [**Array<FieldInput>**](FieldInput.md) | The changes, each with the `id` of the field it changes. Settings left out keep their values. Changing a shared setting changes it for every field with the same name. Renaming a field moves it to the shared settings of its new name, and conditional logic and formulas that use the old name follow it when no other field has that name. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'docspring'
13
+
14
+ instance = DocSpring::UpdateTemplateFieldsRequest.new(
15
+ fields: null
16
+ )
17
+ ```
18
+
@@ -14,7 +14,7 @@
14
14
  | **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. | [optional] |
15
15
  | **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). HTML templates have no visual form, so `web` is the only value they accept. | [optional] |
16
16
  | **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | [optional] |
17
- | **embed_domains** | **Array<String>** | The sites where the template's signature requests, forms and embedded template editor can be loaded: 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). When it's empty, live signature requests don't load on any site, and the embedded template editor loads on every site. | [optional] |
17
+ | **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. | [optional] |
18
18
  | **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). | [optional] |
19
19
  | **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | [optional] |
20
20
  | **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | [optional] |
@@ -31,11 +31,15 @@
31
31
  | **slack_webhook_url** | **String** | A Slack incoming webhook URL that is notified about the template's submissions. It's never returned; `has_slack_webhook_url` says if it's set. | [optional] |
32
32
  | **defaults** | [**TemplateDefaultsInput**](TemplateDefaultsInput.md) | The default style of the template's fields. Setting it replaces the whole object. | [optional] |
33
33
  | **field_dependencies** | [**Array<TemplateFieldDependencyInput>**](TemplateFieldDependencyInput.md) | The template's conditional logic rules. Setting them replaces all of the rules. | [optional] |
34
+ | **field_groups** | [**Array<FieldGroupInput>**](FieldGroupInput.md) | Changes to the settings of the template's field groups, each with the `name` of the group it changes. Settings left out keep their values, and groups left out are unchanged. | [optional] |
35
+ | **predefined_fields** | [**Array<PredefinedFieldInput>**](PredefinedFieldInput.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. | [optional] |
36
+ | **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. | [optional] |
34
37
  | **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF templates. | [optional] |
35
38
  | **scss** | **String** | The SCSS of an HTML template. | [optional] |
36
39
  | **header_html** | **String** | The HTML printed at the top of each page of an HTML template. | [optional] |
37
40
  | **footer_html** | **String** | The HTML printed at the bottom of each page of an HTML template. | [optional] |
38
41
  | **html_engine_options** | [**HtmlEngineOptionsInput**](HtmlEngineOptionsInput.md) | Null resets the options to their defaults. | [optional] |
42
+ | **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. | [optional] |
39
43
 
40
44
  ## Example
41
45
 
@@ -70,11 +74,15 @@ instance = DocSpring::UpdateTemplateRequest.new(
70
74
  slack_webhook_url: null,
71
75
  defaults: null,
72
76
  field_dependencies: null,
77
+ field_groups: null,
78
+ predefined_fields: null,
79
+ predefined_fields_sample_data: null,
73
80
  html: null,
74
81
  scss: null,
75
82
  header_html: null,
76
83
  footer_html: null,
77
- html_engine_options: null
84
+ html_engine_options: null,
85
+ html_escape_data: null
78
86
  )
79
87
  ```
80
88