docspring 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +4 -1
  3. package/dist/ApiClient.js +2 -2
  4. package/dist/RequestSchemas.js +75 -8
  5. package/dist/WebhookSignature.js +86 -0
  6. package/dist/api/Client.js +147 -15
  7. package/dist/index.js +42 -0
  8. package/dist/model/AddTemplateFieldsRequest.js +1 -1
  9. package/dist/model/AuthenticationCheck.js +1 -1
  10. package/dist/model/CombinedPdf.js +3 -3
  11. package/dist/model/CombinedPdfFiles.js +1 -1
  12. package/dist/model/CombinedPdfList.js +1 -1
  13. package/dist/model/CombinedPdfSource.js +1 -1
  14. package/dist/model/CombinedPdfSourceInput.js +1 -1
  15. package/dist/model/CombinedPdfSourcePdf.js +1 -1
  16. package/dist/model/CopyTemplateRequest.js +1 -1
  17. package/dist/model/CreateCombinedPdfRequest.js +2 -2
  18. package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
  19. package/dist/model/CreateFolderRequest.js +1 -1
  20. package/dist/model/CreateSignatureRequestEventRequest.js +1 -1
  21. package/dist/model/CreateSignatureRequestTokenRequest.js +1 -1
  22. package/dist/model/CreateSubmissionBatchRequest.js +1 -1
  23. package/dist/model/CreateSubmissionRequest.js +3 -3
  24. package/dist/model/CreateTemplatePreviewRequest.js +112 -0
  25. package/dist/model/CreateTemplateRequest.js +11 -2
  26. package/dist/model/CreateWebhookRequest.js +1 -1
  27. package/dist/model/CustomFile.js +1 -1
  28. package/dist/model/CustomFileList.js +1 -1
  29. package/dist/model/CustomFileSourcePdf.js +1 -1
  30. package/dist/model/ErrorCode.js +11 -1
  31. package/dist/model/ErrorDetail.js +2 -2
  32. package/dist/model/ErrorInfo.js +6 -6
  33. package/dist/model/ErrorResponse.js +1 -1
  34. package/dist/model/Field.js +1 -1
  35. package/dist/model/FieldComparisonCondition.js +1 -1
  36. package/dist/model/FieldDependency.js +1 -1
  37. package/dist/model/FieldDependencyInput.js +1 -1
  38. package/dist/model/FieldEqualsCondition.js +1 -1
  39. package/dist/model/FieldGroup.js +1 -1
  40. package/dist/model/FieldGroupInput.js +1 -1
  41. package/dist/model/FieldInCondition.js +1 -1
  42. package/dist/model/FieldInput.js +1 -1
  43. package/dist/model/FieldOverride.js +1 -1
  44. package/dist/model/FieldPresenceCondition.js +1 -1
  45. package/dist/model/FieldRangeCondition.js +1 -1
  46. package/dist/model/Folder.js +1 -1
  47. package/dist/model/FolderList.js +1 -1
  48. package/dist/model/GenerateSubmissionFilesRequest.js +1 -1
  49. package/dist/model/GeneratedFile.js +1 -1
  50. package/dist/model/HtmlEngineOptions.js +1 -1
  51. package/dist/model/HtmlEngineOptionsInput.js +1 -1
  52. package/dist/model/MoveFolderRequest.js +1 -1
  53. package/dist/model/MoveTemplateRequest.js +1 -1
  54. package/dist/model/PageImage.js +1 -1
  55. package/dist/model/PageImages.js +1 -1
  56. package/dist/model/PredefinedField.js +1 -1
  57. package/dist/model/PredefinedFieldInput.js +1 -1
  58. package/dist/model/PublishTemplateVersionRequest.js +1 -1
  59. package/dist/model/RemoveTemplateFieldsRequest.js +1 -1
  60. package/dist/model/RenameFolderRequest.js +1 -1
  61. package/dist/model/ReorderTemplateFieldsRequest.js +1 -1
  62. package/dist/model/RestoreTemplateVersionRequest.js +1 -1
  63. package/dist/model/SignatureRequest.js +1 -1
  64. package/dist/model/SignatureRequestEvent.js +1 -1
  65. package/dist/model/SignatureRequestInput.js +1 -1
  66. package/dist/model/SignatureRequestToken.js +1 -1
  67. package/dist/model/Submission.js +75 -75
  68. package/dist/model/SubmissionAction.js +1 -1
  69. package/dist/model/SubmissionBatch.js +1 -1
  70. package/dist/model/SubmissionFiles.js +1 -1
  71. package/dist/model/SubmissionInput.js +3 -3
  72. package/dist/model/SubmissionList.js +5 -5
  73. package/dist/model/SubmissionSourcePdf.js +1 -1
  74. package/dist/model/SubmissionSummary.js +343 -0
  75. package/dist/model/SubmissionValidation.js +1 -1
  76. package/dist/model/Template.js +68 -57
  77. package/dist/model/TemplateActor.js +3 -3
  78. package/dist/model/TemplateDefaults.js +1 -1
  79. package/dist/model/TemplateDefaultsInput.js +1 -1
  80. package/dist/model/TemplateDiff.js +1 -1
  81. package/dist/model/TemplateDiffSummary.js +1 -1
  82. package/dist/model/TemplateDocument.js +33 -33
  83. package/dist/model/TemplateDocumentSummary.js +152 -0
  84. package/dist/model/TemplateFieldChange.js +1 -1
  85. package/dist/model/TemplateFieldChanges.js +1 -1
  86. package/dist/model/TemplateFieldDependency.js +1 -1
  87. package/dist/model/TemplateFieldDependencyCondition.js +1 -1
  88. package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
  89. package/dist/model/TemplateFieldDependencyInput.js +1 -1
  90. package/dist/model/TemplateFieldMove.js +1 -1
  91. package/dist/model/TemplateFields.js +1 -1
  92. package/dist/model/TemplateModelCode.js +1 -1
  93. package/dist/model/TemplatePageImages.js +1 -1
  94. package/dist/model/TemplatePageProcessingStatus.js +1 -1
  95. package/dist/model/TemplatePreview.js +211 -0
  96. package/dist/model/TemplatePreviewState.js +64 -0
  97. package/dist/model/TemplateSourcePdf.js +1 -1
  98. package/dist/model/TemplateSummary.js +14 -288
  99. package/dist/model/TemplateSummaryList.js +1 -1
  100. package/dist/model/TemplateVersion.js +1 -1
  101. package/dist/model/UpdateSignatureRequestRequest.js +1 -1
  102. package/dist/model/UpdateTemplateDocumentRequest.js +1 -1
  103. package/dist/model/UpdateTemplateFieldsRequest.js +1 -1
  104. package/dist/model/UpdateTemplateRequest.js +11 -2
  105. package/dist/model/UpdateWebhookRequest.js +1 -1
  106. package/dist/model/UploadPresign.js +1 -1
  107. package/dist/model/UrlSourcePdf.js +1 -1
  108. package/dist/model/ValidateSubmissionRequest.js +3 -3
  109. package/dist/model/Webhook.js +1 -1
  110. package/dist/model/WebhookList.js +1 -1
  111. package/package.json +3 -2
@@ -41,7 +41,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
41
41
  /**
42
42
  * The Template model module.
43
43
  * @module model/Template
44
- * @version 4.1.0
44
+ * @version 4.2.0
45
45
  */
46
46
  var Template = /*#__PURE__*/function () {
47
47
  /**
@@ -53,21 +53,24 @@ var Template = /*#__PURE__*/function () {
53
53
  * @param name {String} The template's name.
54
54
  * @param 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.
55
55
  * @param template_type {module:model/TemplateType} `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.
56
- * @param 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`).
56
+ * @param 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.
57
57
  * @param document {module:model/TemplateDocument} The PDF of a PDF template. Null for HTML templates, and for a PDF template that has no PDF yet.
58
58
  * @param 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.
59
59
  * @param path {String} The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root.
60
- * @param version {String} The published version this is, such as `1.2.0`. Null for the draft.
61
60
  * @param latest_version {String} The template's latest published version. Null if no version has been published.
62
61
  * @param version_published_at {Date} When this version was published. Null for the draft.
63
62
  * @param locked {Boolean} A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
63
+ * @param last_changed_at {Date} When the draft was last changed.
64
+ * @param created_at {Date} When the template was created.
65
+ * @param updated_at {Date} When the template was last updated.
66
+ * @param version {String} The published version this is, such as `1.2.0`. Null for the draft.
64
67
  * @param add_signature_request_submission_id_footers {Boolean} Print the submission ID in the footer of each page of PDFs signed through signature requests.
65
68
  * @param ai_field_naming_language {module:model/AiFieldNamingLanguage} 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.
66
69
  * @param allow_additional_properties {Boolean} Accept submission data with properties that aren't fields of the template.
67
70
  * @param 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.
68
71
  * @param default_form_mode {module:model/TemplateFormMode} 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.
69
72
  * @param editable_submissions {Boolean} Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it.
70
- * @param 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.
73
+ * @param 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.
71
74
  * @param 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).
72
75
  * @param embed_edit_allow_versioning {Boolean} Allow the embedded template editor to publish, restore, compare and delete published versions.
73
76
  * @param embed_edit_allow_document_replacement {Boolean} Allow the embedded template editor to replace the template's PDF.
@@ -82,10 +85,7 @@ var Template = /*#__PURE__*/function () {
82
85
  * @param public_web_form {Boolean} Allow anyone to fill in the template's web form.
83
86
  * @param redirect_url {String} Where the web form sends people after they submit it.
84
87
  * @param has_slack_webhook_url {Boolean} Whether `slack_webhook_url` is set.
85
- * @param last_changed_at {Date} When the draft was last changed.
86
88
  * @param last_changed_by {module:model/TemplateActor} 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.
87
- * @param created_at {Date} When the template was created.
88
- * @param updated_at {Date} When the template was last updated.
89
89
  * @param defaults {module:model/TemplateDefaults}
90
90
  * @param field_dependencies {Array.<module:model/TemplateFieldDependency>} Conditional logic: each rule shows or hides its target fields, or makes them required, depending on the values of other fields.
91
91
  * @param field_groups {Array.<module:model/FieldGroup>} 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/~`.
@@ -96,12 +96,13 @@ var Template = /*#__PURE__*/function () {
96
96
  * @param header_html {String} The HTML printed at the top of each page of an HTML template.
97
97
  * @param footer_html {String} The HTML printed at the bottom of each page of an HTML template.
98
98
  * @param html_engine_options {module:model/HtmlEngineOptions} How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults.
99
+ * @param 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.
99
100
  * @param embed_edit_token {String} The token that opens the template in the embedded template editor.
100
101
  * @param versions {Array.<module:model/TemplateVersion>} The template's published versions, newest first (up to 100).
101
102
  */
102
- function Template(id, name, description, template_type, ready, document, parent_folder_id, path, version, latest_version, version_published_at, locked, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_at, last_changed_by, created_at, updated_at, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, embed_edit_token, versions) {
103
+ function Template(id, name, description, template_type, ready, document, parent_folder_id, path, latest_version, version_published_at, locked, last_changed_at, created_at, updated_at, version, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, embed_edit_token, versions) {
103
104
  _classCallCheck(this, Template);
104
- Template.initialize(this, id, name, description, template_type, ready, document, parent_folder_id, path, version, latest_version, version_published_at, locked, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_at, last_changed_by, created_at, updated_at, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, embed_edit_token, versions);
105
+ Template.initialize(this, id, name, description, template_type, ready, document, parent_folder_id, path, latest_version, version_published_at, locked, last_changed_at, created_at, updated_at, version, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, embed_edit_token, versions);
105
106
  }
106
107
 
107
108
  /**
@@ -111,7 +112,7 @@ var Template = /*#__PURE__*/function () {
111
112
  */
112
113
  return _createClass(Template, null, [{
113
114
  key: "initialize",
114
- value: function initialize(obj, id, name, description, template_type, ready, document, parent_folder_id, path, version, latest_version, version_published_at, locked, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_at, last_changed_by, created_at, updated_at, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, embed_edit_token, versions) {
115
+ value: function initialize(obj, id, name, description, template_type, ready, document, parent_folder_id, path, latest_version, version_published_at, locked, last_changed_at, created_at, updated_at, version, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, embed_edit_token, versions) {
115
116
  obj['id'] = id;
116
117
  obj['name'] = name;
117
118
  obj['description'] = description;
@@ -120,10 +121,13 @@ var Template = /*#__PURE__*/function () {
120
121
  obj['document'] = document;
121
122
  obj['parent_folder_id'] = parent_folder_id;
122
123
  obj['path'] = path;
123
- obj['version'] = version;
124
124
  obj['latest_version'] = latest_version;
125
125
  obj['version_published_at'] = version_published_at;
126
126
  obj['locked'] = locked;
127
+ obj['last_changed_at'] = last_changed_at;
128
+ obj['created_at'] = created_at;
129
+ obj['updated_at'] = updated_at;
130
+ obj['version'] = version;
127
131
  obj['add_signature_request_submission_id_footers'] = add_signature_request_submission_id_footers;
128
132
  obj['ai_field_naming_language'] = ai_field_naming_language;
129
133
  obj['allow_additional_properties'] = allow_additional_properties;
@@ -145,10 +149,7 @@ var Template = /*#__PURE__*/function () {
145
149
  obj['public_web_form'] = public_web_form;
146
150
  obj['redirect_url'] = redirect_url;
147
151
  obj['has_slack_webhook_url'] = has_slack_webhook_url;
148
- obj['last_changed_at'] = last_changed_at;
149
152
  obj['last_changed_by'] = last_changed_by;
150
- obj['created_at'] = created_at;
151
- obj['updated_at'] = updated_at;
152
153
  obj['defaults'] = defaults;
153
154
  obj['field_dependencies'] = field_dependencies;
154
155
  obj['field_groups'] = field_groups;
@@ -159,6 +160,7 @@ var Template = /*#__PURE__*/function () {
159
160
  obj['header_html'] = header_html;
160
161
  obj['footer_html'] = footer_html;
161
162
  obj['html_engine_options'] = html_engine_options;
163
+ obj['html_escape_data'] = html_escape_data;
162
164
  obj['embed_edit_token'] = embed_edit_token;
163
165
  obj['versions'] = versions;
164
166
  }
@@ -200,9 +202,6 @@ var Template = /*#__PURE__*/function () {
200
202
  if (data.hasOwnProperty('path')) {
201
203
  obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String');
202
204
  }
203
- if (data.hasOwnProperty('version')) {
204
- obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
205
- }
206
205
  if (data.hasOwnProperty('latest_version')) {
207
206
  obj['latest_version'] = _ApiClient["default"].convertToType(data['latest_version'], 'String');
208
207
  }
@@ -212,6 +211,18 @@ var Template = /*#__PURE__*/function () {
212
211
  if (data.hasOwnProperty('locked')) {
213
212
  obj['locked'] = _ApiClient["default"].convertToType(data['locked'], 'Boolean');
214
213
  }
214
+ if (data.hasOwnProperty('last_changed_at')) {
215
+ obj['last_changed_at'] = _ApiClient["default"].convertToType(data['last_changed_at'], 'Date');
216
+ }
217
+ if (data.hasOwnProperty('created_at')) {
218
+ obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
219
+ }
220
+ if (data.hasOwnProperty('updated_at')) {
221
+ obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
222
+ }
223
+ if (data.hasOwnProperty('version')) {
224
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
225
+ }
215
226
  if (data.hasOwnProperty('add_signature_request_submission_id_footers')) {
216
227
  obj['add_signature_request_submission_id_footers'] = _ApiClient["default"].convertToType(data['add_signature_request_submission_id_footers'], 'Boolean');
217
228
  }
@@ -275,18 +286,9 @@ var Template = /*#__PURE__*/function () {
275
286
  if (data.hasOwnProperty('has_slack_webhook_url')) {
276
287
  obj['has_slack_webhook_url'] = _ApiClient["default"].convertToType(data['has_slack_webhook_url'], 'Boolean');
277
288
  }
278
- if (data.hasOwnProperty('last_changed_at')) {
279
- obj['last_changed_at'] = _ApiClient["default"].convertToType(data['last_changed_at'], 'Date');
280
- }
281
289
  if (data.hasOwnProperty('last_changed_by')) {
282
290
  obj['last_changed_by'] = _ApiClient["default"].convertToType(data['last_changed_by'], _TemplateActor["default"]);
283
291
  }
284
- if (data.hasOwnProperty('created_at')) {
285
- obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
286
- }
287
- if (data.hasOwnProperty('updated_at')) {
288
- obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
289
- }
290
292
  if (data.hasOwnProperty('defaults')) {
291
293
  obj['defaults'] = data['defaults'] === null ? null : _TemplateDefaults["default"].constructFromObject(data['defaults']);
292
294
  }
@@ -319,6 +321,9 @@ var Template = /*#__PURE__*/function () {
319
321
  if (data.hasOwnProperty('html_engine_options')) {
320
322
  obj['html_engine_options'] = _ApiClient["default"].convertToType(data['html_engine_options'], _HtmlEngineOptions["default"]);
321
323
  }
324
+ if (data.hasOwnProperty('html_escape_data')) {
325
+ obj['html_escape_data'] = _ApiClient["default"].convertToType(data['html_escape_data'], 'Boolean');
326
+ }
322
327
  if (data.hasOwnProperty('embed_edit_token')) {
323
328
  obj['embed_edit_token'] = _ApiClient["default"].convertToType(data['embed_edit_token'], 'String');
324
329
  }
@@ -378,13 +383,13 @@ var Template = /*#__PURE__*/function () {
378
383
  throw new Error("Expected the field `path` to be a primitive type in the JSON string but got " + data['path']);
379
384
  }
380
385
  // ensure the json data is a string
381
- if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
382
- throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
383
- }
384
- // ensure the json data is a string
385
386
  if (data['latest_version'] && !(typeof data['latest_version'] === 'string' || data['latest_version'] instanceof String)) {
386
387
  throw new Error("Expected the field `latest_version` to be a primitive type in the JSON string but got " + data['latest_version']);
387
388
  }
389
+ // ensure the json data is a string
390
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
391
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
392
+ }
388
393
  // ensure the json data is an array
389
394
  if (!Array.isArray(data['embed_domains'])) {
390
395
  throw new Error("Expected the field `embed_domains` to be an array in the JSON data but got " + data['embed_domains']);
@@ -460,7 +465,7 @@ var Template = /*#__PURE__*/function () {
460
465
  }
461
466
  }]);
462
467
  }();
463
- Template.RequiredProperties = ["id", "name", "description", "template_type", "ready", "document", "parent_folder_id", "path", "version", "latest_version", "version_published_at", "locked", "add_signature_request_submission_id_footers", "ai_field_naming_language", "allow_additional_properties", "allow_skipping_optional_fields", "default_form_mode", "editable_submissions", "embed_domains", "embed_edit_allow_settings", "embed_edit_allow_versioning", "embed_edit_allow_document_replacement", "encrypt_pdfs", "has_encrypt_pdfs_password", "expire_submissions", "expire_after", "expiration_interval", "merge_audit_trail_pdf", "parse_dates_using_template_date_format", "public_submissions", "public_web_form", "redirect_url", "has_slack_webhook_url", "last_changed_at", "last_changed_by", "created_at", "updated_at", "defaults", "field_dependencies", "field_groups", "predefined_fields", "predefined_fields_sample_data", "html", "scss", "header_html", "footer_html", "html_engine_options", "embed_edit_token", "versions"];
468
+ Template.RequiredProperties = ["id", "name", "description", "template_type", "ready", "document", "parent_folder_id", "path", "latest_version", "version_published_at", "locked", "last_changed_at", "created_at", "updated_at", "version", "add_signature_request_submission_id_footers", "ai_field_naming_language", "allow_additional_properties", "allow_skipping_optional_fields", "default_form_mode", "editable_submissions", "embed_domains", "embed_edit_allow_settings", "embed_edit_allow_versioning", "embed_edit_allow_document_replacement", "encrypt_pdfs", "has_encrypt_pdfs_password", "expire_submissions", "expire_after", "expiration_interval", "merge_audit_trail_pdf", "parse_dates_using_template_date_format", "public_submissions", "public_web_form", "redirect_url", "has_slack_webhook_url", "last_changed_by", "defaults", "field_dependencies", "field_groups", "predefined_fields", "predefined_fields_sample_data", "html", "scss", "header_html", "footer_html", "html_engine_options", "html_escape_data", "embed_edit_token", "versions"];
464
469
 
465
470
  /**
466
471
  * The template's ID.
@@ -487,7 +492,7 @@ Template.prototype['description'] = undefined;
487
492
  Template.prototype['template_type'] = undefined;
488
493
 
489
494
  /**
490
- * 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`).
495
+ * 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.
491
496
  * @member {Boolean} ready
492
497
  */
493
498
  Template.prototype['ready'] = undefined;
@@ -510,12 +515,6 @@ Template.prototype['parent_folder_id'] = undefined;
510
515
  */
511
516
  Template.prototype['path'] = undefined;
512
517
 
513
- /**
514
- * The published version this is, such as `1.2.0`. Null for the draft.
515
- * @member {String} version
516
- */
517
- Template.prototype['version'] = undefined;
518
-
519
518
  /**
520
519
  * The template's latest published version. Null if no version has been published.
521
520
  * @member {String} latest_version
@@ -534,6 +533,30 @@ Template.prototype['version_published_at'] = undefined;
534
533
  */
535
534
  Template.prototype['locked'] = undefined;
536
535
 
536
+ /**
537
+ * When the draft was last changed.
538
+ * @member {Date} last_changed_at
539
+ */
540
+ Template.prototype['last_changed_at'] = undefined;
541
+
542
+ /**
543
+ * When the template was created.
544
+ * @member {Date} created_at
545
+ */
546
+ Template.prototype['created_at'] = undefined;
547
+
548
+ /**
549
+ * When the template was last updated.
550
+ * @member {Date} updated_at
551
+ */
552
+ Template.prototype['updated_at'] = undefined;
553
+
554
+ /**
555
+ * The published version this is, such as `1.2.0`. Null for the draft.
556
+ * @member {String} version
557
+ */
558
+ Template.prototype['version'] = undefined;
559
+
537
560
  /**
538
561
  * Print the submission ID in the footer of each page of PDFs signed through signature requests.
539
562
  * @member {Boolean} add_signature_request_submission_id_footers
@@ -571,7 +594,7 @@ Template.prototype['default_form_mode'] = undefined;
571
594
  Template.prototype['editable_submissions'] = undefined;
572
595
 
573
596
  /**
574
- * 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.
597
+ * 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.
575
598
  * @member {Array.<String>} embed_domains
576
599
  */
577
600
  Template.prototype['embed_domains'] = undefined;
@@ -660,30 +683,12 @@ Template.prototype['redirect_url'] = undefined;
660
683
  */
661
684
  Template.prototype['has_slack_webhook_url'] = undefined;
662
685
 
663
- /**
664
- * When the draft was last changed.
665
- * @member {Date} last_changed_at
666
- */
667
- Template.prototype['last_changed_at'] = undefined;
668
-
669
686
  /**
670
687
  * 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.
671
688
  * @member {module:model/TemplateActor} last_changed_by
672
689
  */
673
690
  Template.prototype['last_changed_by'] = undefined;
674
691
 
675
- /**
676
- * When the template was created.
677
- * @member {Date} created_at
678
- */
679
- Template.prototype['created_at'] = undefined;
680
-
681
- /**
682
- * When the template was last updated.
683
- * @member {Date} updated_at
684
- */
685
- Template.prototype['updated_at'] = undefined;
686
-
687
692
  /**
688
693
  * @member {module:model/TemplateDefaults} defaults
689
694
  */
@@ -743,6 +748,12 @@ Template.prototype['footer_html'] = undefined;
743
748
  */
744
749
  Template.prototype['html_engine_options'] = undefined;
745
750
 
751
+ /**
752
+ * 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.
753
+ * @member {Boolean} html_escape_data
754
+ */
755
+ Template.prototype['html_escape_data'] = undefined;
756
+
746
757
  /**
747
758
  * The token that opens the template in the embedded template editor.
748
759
  * @member {String} embed_edit_token
@@ -30,14 +30,14 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The TemplateActor model module.
32
32
  * @module model/TemplateActor
33
- * @version 4.1.0
33
+ * @version 4.2.0
34
34
  */
35
35
  var TemplateActor = /*#__PURE__*/function () {
36
36
  /**
37
37
  * Constructs a new <code>TemplateActor</code>.
38
38
  * A user in your account, an API token, or someone using the embedded template editor.
39
39
  * @alias module:model/TemplateActor
40
- * @param type {module:model/TemplateActorType} `user`: a user in your account. `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
40
+ * @param type {module:model/TemplateActorType} `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.
41
41
  * @param user_id {String} The user's ID, for `user`.
42
42
  * @param external_id {String} The ID your app gave the embedded editor's user, for `external_user`.
43
43
  * @param name {String} The user's name, or the name your app gave the embedded editor's user.
@@ -140,7 +140,7 @@ var TemplateActor = /*#__PURE__*/function () {
140
140
  TemplateActor.RequiredProperties = ["type", "user_id", "external_id", "name", "email"];
141
141
 
142
142
  /**
143
- * `user`: a user in your account. `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
143
+ * `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.
144
144
  * @member {module:model/TemplateActorType} type
145
145
  */
146
146
  TemplateActor.prototype['type'] = undefined;
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The TemplateDefaults model module.
31
31
  * @module model/TemplateDefaults
32
- * @version 4.1.0
32
+ * @version 4.2.0
33
33
  */
34
34
  var TemplateDefaults = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The TemplateDefaultsInput model module.
31
31
  * @module model/TemplateDefaultsInput
32
- * @version 4.1.0
32
+ * @version 4.2.0
33
33
  */
34
34
  var TemplateDefaultsInput = /*#__PURE__*/function () {
35
35
  /**
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The TemplateDiff model module.
33
33
  * @module model/TemplateDiff
34
- * @version 4.1.0
34
+ * @version 4.2.0
35
35
  */
36
36
  var TemplateDiff = /*#__PURE__*/function () {
37
37
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The TemplateDiffSummary model module.
31
31
  * @module model/TemplateDiffSummary
32
- * @version 4.1.0
32
+ * @version 4.2.0
33
33
  */
34
34
  var TemplateDiffSummary = /*#__PURE__*/function () {
35
35
  /**
@@ -33,7 +33,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
33
33
  /**
34
34
  * The TemplateDocument model module.
35
35
  * @module model/TemplateDocument
36
- * @version 4.1.0
36
+ * @version 4.2.0
37
37
  */
38
38
  var TemplateDocument = /*#__PURE__*/function () {
39
39
  /**
@@ -41,11 +41,11 @@ var TemplateDocument = /*#__PURE__*/function () {
41
41
  * A PDF template's PDF.
42
42
  * @alias module:model/TemplateDocument
43
43
  * @param filename {String} The PDF's file name. Null until a `document_url` has been downloaded.
44
- * @param md5 {String} The MD5 hash of the PDF.
45
- * @param state {module:model/TemplateDocumentState} `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. `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.
44
+ * @param state {module:model/TemplateDocumentState} `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.
46
45
  * @param error_message {String} Why the PDF couldn't be processed or downloaded, and how to fix it. Null unless `state` is an error.
47
- * @param field_reimport_state {module:model/FieldReimportState} 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).
48
46
  * @param page_count {Number} 0 until the PDF has been processed.
47
+ * @param md5 {String} The MD5 hash of the PDF.
48
+ * @param field_reimport_state {module:model/FieldReimportState} 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).
49
49
  * @param page_dimensions {Array.<Array.<Number>>} Each page's width and height in PDF points. Null until the PDF has been processed.
50
50
  * @param has_fillable_fields {Boolean} Whether the PDF has fillable form fields. Null until DocSpring has read the PDF.
51
51
  * @param page_processing_statuses {Array.<module:model/TemplatePageProcessingStatus>} 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.
@@ -53,9 +53,9 @@ var TemplateDocument = /*#__PURE__*/function () {
53
53
  * @param download_url {String} A temporary link to download the PDF.
54
54
  * @param permanent_url {String} A link to download the PDF that doesn't expire. Null until the PDF has been processed.
55
55
  */
56
- function TemplateDocument(filename, md5, state, error_message, field_reimport_state, page_count, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url) {
56
+ function TemplateDocument(filename, state, error_message, page_count, md5, field_reimport_state, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url) {
57
57
  _classCallCheck(this, TemplateDocument);
58
- TemplateDocument.initialize(this, filename, md5, state, error_message, field_reimport_state, page_count, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url);
58
+ TemplateDocument.initialize(this, filename, state, error_message, page_count, md5, field_reimport_state, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url);
59
59
  }
60
60
 
61
61
  /**
@@ -65,13 +65,13 @@ var TemplateDocument = /*#__PURE__*/function () {
65
65
  */
66
66
  return _createClass(TemplateDocument, null, [{
67
67
  key: "initialize",
68
- value: function initialize(obj, filename, md5, state, error_message, field_reimport_state, page_count, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url) {
68
+ value: function initialize(obj, filename, state, error_message, page_count, md5, field_reimport_state, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url) {
69
69
  obj['filename'] = filename;
70
- obj['md5'] = md5;
71
70
  obj['state'] = state;
72
71
  obj['error_message'] = error_message;
73
- obj['field_reimport_state'] = field_reimport_state;
74
72
  obj['page_count'] = page_count;
73
+ obj['md5'] = md5;
74
+ obj['field_reimport_state'] = field_reimport_state;
75
75
  obj['page_dimensions'] = page_dimensions;
76
76
  obj['has_fillable_fields'] = has_fillable_fields;
77
77
  obj['page_processing_statuses'] = page_processing_statuses;
@@ -95,21 +95,21 @@ var TemplateDocument = /*#__PURE__*/function () {
95
95
  if (data.hasOwnProperty('filename')) {
96
96
  obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String');
97
97
  }
98
- if (data.hasOwnProperty('md5')) {
99
- obj['md5'] = _ApiClient["default"].convertToType(data['md5'], 'String');
100
- }
101
98
  if (data.hasOwnProperty('state')) {
102
99
  obj['state'] = _ApiClient["default"].convertToType(data['state'], _TemplateDocumentState["default"]);
103
100
  }
104
101
  if (data.hasOwnProperty('error_message')) {
105
102
  obj['error_message'] = _ApiClient["default"].convertToType(data['error_message'], 'String');
106
103
  }
107
- if (data.hasOwnProperty('field_reimport_state')) {
108
- obj['field_reimport_state'] = _ApiClient["default"].convertToType(data['field_reimport_state'], _FieldReimportState["default"]);
109
- }
110
104
  if (data.hasOwnProperty('page_count')) {
111
105
  obj['page_count'] = _ApiClient["default"].convertToType(data['page_count'], 'Number');
112
106
  }
107
+ if (data.hasOwnProperty('md5')) {
108
+ obj['md5'] = _ApiClient["default"].convertToType(data['md5'], 'String');
109
+ }
110
+ if (data.hasOwnProperty('field_reimport_state')) {
111
+ obj['field_reimport_state'] = _ApiClient["default"].convertToType(data['field_reimport_state'], _FieldReimportState["default"]);
112
+ }
113
113
  if (data.hasOwnProperty('page_dimensions')) {
114
114
  obj['page_dimensions'] = _ApiClient["default"].convertToType(data['page_dimensions'], [['Number']]);
115
115
  }
@@ -160,13 +160,13 @@ var TemplateDocument = /*#__PURE__*/function () {
160
160
  throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']);
161
161
  }
162
162
  // ensure the json data is a string
163
- if (data['md5'] && !(typeof data['md5'] === 'string' || data['md5'] instanceof String)) {
164
- throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data['md5']);
165
- }
166
- // ensure the json data is a string
167
163
  if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
168
164
  throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
169
165
  }
166
+ // ensure the json data is a string
167
+ if (data['md5'] && !(typeof data['md5'] === 'string' || data['md5'] instanceof String)) {
168
+ throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data['md5']);
169
+ }
170
170
  // ensure the json data is an array
171
171
  if (!Array.isArray(data['page_dimensions'])) {
172
172
  throw new Error("Expected the field `page_dimensions` to be an array in the JSON data but got " + data['page_dimensions']);
@@ -204,7 +204,7 @@ var TemplateDocument = /*#__PURE__*/function () {
204
204
  }
205
205
  }]);
206
206
  }();
207
- TemplateDocument.RequiredProperties = ["filename", "md5", "state", "error_message", "field_reimport_state", "page_count", "page_dimensions", "has_fillable_fields", "page_processing_statuses", "field_logic_status", "download_url", "permanent_url"];
207
+ TemplateDocument.RequiredProperties = ["filename", "state", "error_message", "page_count", "md5", "field_reimport_state", "page_dimensions", "has_fillable_fields", "page_processing_statuses", "field_logic_status", "download_url", "permanent_url"];
208
208
 
209
209
  /**
210
210
  * The PDF's file name. Null until a `document_url` has been downloaded.
@@ -213,13 +213,7 @@ TemplateDocument.RequiredProperties = ["filename", "md5", "state", "error_messag
213
213
  TemplateDocument.prototype['filename'] = undefined;
214
214
 
215
215
  /**
216
- * The MD5 hash of the PDF.
217
- * @member {String} md5
218
- */
219
- TemplateDocument.prototype['md5'] = undefined;
220
-
221
- /**
222
- * `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. `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.
216
+ * `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.
223
217
  * @member {module:model/TemplateDocumentState} state
224
218
  */
225
219
  TemplateDocument.prototype['state'] = undefined;
@@ -230,18 +224,24 @@ TemplateDocument.prototype['state'] = undefined;
230
224
  */
231
225
  TemplateDocument.prototype['error_message'] = undefined;
232
226
 
233
- /**
234
- * 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).
235
- * @member {module:model/FieldReimportState} field_reimport_state
236
- */
237
- TemplateDocument.prototype['field_reimport_state'] = undefined;
238
-
239
227
  /**
240
228
  * 0 until the PDF has been processed.
241
229
  * @member {Number} page_count
242
230
  */
243
231
  TemplateDocument.prototype['page_count'] = undefined;
244
232
 
233
+ /**
234
+ * The MD5 hash of the PDF.
235
+ * @member {String} md5
236
+ */
237
+ TemplateDocument.prototype['md5'] = undefined;
238
+
239
+ /**
240
+ * 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).
241
+ * @member {module:model/FieldReimportState} field_reimport_state
242
+ */
243
+ TemplateDocument.prototype['field_reimport_state'] = undefined;
244
+
245
245
  /**
246
246
  * Each page's width and height in PDF points. Null until the PDF has been processed.
247
247
  * @member {Array.<Array.<Number>>} page_dimensions