docspring 3.3.0 → 4.0.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 (158) hide show
  1. package/AGENTS.md +79 -19
  2. package/README.md +65 -63
  3. package/dist/ApiClient.js +63 -28
  4. package/dist/RequestSchemas.js +2297 -0
  5. package/dist/RequestValidator.js +494 -0
  6. package/dist/api/Client.js +1346 -948
  7. package/dist/index.js +651 -154
  8. package/dist/model/AiFieldNamingLanguage.js +64 -0
  9. package/dist/model/{CreateWebhookData.js → AuthenticationCheck.js} +32 -28
  10. package/dist/model/BarcodeSymbology.js +89 -0
  11. package/dist/model/CheckCharacter.js +74 -0
  12. package/dist/model/CombinedFieldType.js +59 -0
  13. package/dist/model/CombinedPdf.js +294 -0
  14. package/dist/model/{MoveFolderData.js → CombinedPdfFiles.js} +27 -27
  15. package/dist/model/CombinedPdfList.js +132 -0
  16. package/dist/model/{ForbiddenErrorResponse.js → CombinedPdfSource.js} +59 -73
  17. package/dist/model/CombinedPdfSourceInput.js +270 -0
  18. package/dist/model/CombinedPdfSourcePdf.js +130 -0
  19. package/dist/model/CombinedPdfSourceType.js +74 -0
  20. package/dist/model/CombinedPdfState.js +74 -0
  21. package/dist/model/{CopyTemplateOptions.js → CopyTemplateRequest.js} +26 -22
  22. package/dist/model/{CombinePdfsData.js → CreateCombinedPdfRequest.js} +69 -53
  23. package/dist/model/{CreateCustomFileData.js → CreateCustomFileFromUploadRequest.js} +25 -23
  24. package/dist/model/{CreateFolderData.js → CreateFolderRequest.js} +47 -28
  25. package/dist/model/{TemplateDeleteResponse.js → CreateSignatureRequestEventRequest.js} +49 -74
  26. package/dist/model/CreateSignatureRequestTokenRequest.js +88 -0
  27. package/dist/model/{SubmissionBatchData.js → CreateSubmissionBatchRequest.js} +67 -42
  28. package/dist/model/CreateSubmissionRequest.js +212 -0
  29. package/dist/model/CreateTemplateRequest.js +545 -0
  30. package/dist/model/CreateWebhookRequest.js +234 -0
  31. package/dist/model/CustomFile.js +67 -16
  32. package/dist/model/CustomFileList.js +132 -0
  33. package/dist/model/CustomFileSourcePdf.js +130 -0
  34. package/dist/model/ErrorCode.js +154 -0
  35. package/dist/model/{CreateSubmissionResponse.js → ErrorDetail.js} +65 -75
  36. package/dist/model/ErrorInfo.js +211 -0
  37. package/dist/model/ErrorResponse.js +12 -41
  38. package/dist/model/ExpirationInterval.js +64 -0
  39. package/dist/model/FieldComparisonCondition.js +137 -0
  40. package/dist/model/FieldComparisonOperator.js +69 -0
  41. package/dist/model/FieldDisplayType.js +79 -0
  42. package/dist/model/{MultipleErrorsResponse.js → FieldEqualsCondition.js} +48 -52
  43. package/dist/model/FieldEqualsOperator.js +59 -0
  44. package/dist/model/{SuccessMultipleErrorsResponse.js → FieldInCondition.js} +54 -53
  45. package/dist/model/FieldOverride.js +722 -0
  46. package/dist/model/FieldPresenceCondition.js +126 -0
  47. package/dist/model/FieldPresenceOperator.js +59 -0
  48. package/dist/model/FieldRangeCondition.js +148 -0
  49. package/dist/model/FieldReimportState.js +69 -0
  50. package/dist/model/FieldSetupLogic.js +59 -0
  51. package/dist/model/FieldSetupNaming.js +59 -0
  52. package/dist/model/FieldSetupSource.js +64 -0
  53. package/dist/model/Folder.js +38 -11
  54. package/dist/model/FolderList.js +132 -0
  55. package/dist/model/GeneratedFile.js +214 -0
  56. package/dist/model/GeneratedFileState.js +64 -0
  57. package/dist/model/HtmlEngineOptions.js +230 -0
  58. package/dist/model/HtmlEngineOptionsInput.js +193 -0
  59. package/dist/model/ImageGravity.js +94 -0
  60. package/dist/model/ImageScaleType.js +64 -0
  61. package/dist/model/ModelCodeLanguage.js +94 -0
  62. package/dist/model/{UpdatePdfTemplate.js → MoveFolderRequest.js} +34 -28
  63. package/dist/model/{MoveTemplateData.js → MoveTemplateRequest.js} +25 -35
  64. package/dist/model/NumberConditionType.js +79 -0
  65. package/dist/model/PageFormat.js +114 -0
  66. package/dist/model/{PublishVersionData.js → PublishTemplateVersionRequest.js} +33 -33
  67. package/dist/model/{RenameFolderData.js → RenameFolderRequest.js} +25 -23
  68. package/dist/model/{RestoreVersionData.js → RestoreTemplateVersionRequest.js} +25 -23
  69. package/dist/model/ShapeType.js +79 -0
  70. package/dist/model/{SubmissionDataRequestShow.js → SignatureRequest.js} +165 -240
  71. package/dist/model/SignatureRequestAuthSecondFactorType.js +79 -0
  72. package/dist/model/SignatureRequestAuthType.js +84 -0
  73. package/dist/model/{SubmissionDataRequestEvent.js → SignatureRequestEvent.js} +67 -149
  74. package/dist/model/SignatureRequestEventType.js +79 -0
  75. package/dist/model/SignatureRequestInput.js +278 -0
  76. package/dist/model/SignatureRequestMessageType.js +94 -0
  77. package/dist/model/SignatureRequestState.js +64 -0
  78. package/dist/model/SignatureRequestToken.js +195 -0
  79. package/dist/model/SignatureRequestTokenType.js +59 -0
  80. package/dist/model/StringConditionType.js +74 -0
  81. package/dist/model/Submission.js +186 -345
  82. package/dist/model/SubmissionAction.js +30 -115
  83. package/dist/model/SubmissionActionState.js +69 -0
  84. package/dist/model/SubmissionActionType.js +84 -0
  85. package/dist/model/SubmissionBatch.js +74 -55
  86. package/dist/model/SubmissionBatchState.js +64 -0
  87. package/dist/model/SubmissionFiles.js +108 -0
  88. package/dist/model/SubmissionInput.js +204 -0
  89. package/dist/model/{ListSubmissionsResponse.js → SubmissionList.js} +35 -42
  90. package/dist/model/SubmissionSource.js +69 -0
  91. package/dist/model/SubmissionSourcePdf.js +130 -0
  92. package/dist/model/SubmissionState.js +114 -0
  93. package/dist/model/Template.js +310 -573
  94. package/dist/model/TemplateActor.js +171 -0
  95. package/dist/model/TemplateActorType.js +64 -0
  96. package/dist/model/TemplateDefaults.js +307 -0
  97. package/dist/model/TemplateDefaultsInput.js +305 -0
  98. package/dist/model/TemplateDocument.js +280 -0
  99. package/dist/model/TemplateDocumentState.js +74 -0
  100. package/dist/model/{CreatePdfSubmissionData.js → TemplateFieldDependency.js} +70 -89
  101. package/dist/model/TemplateFieldDependencyAction.js +64 -0
  102. package/dist/model/{TemplatePublishVersionResponse.js → TemplateFieldDependencyCondition.js} +51 -61
  103. package/dist/model/TemplateFieldDependencyConditionInput.js +304 -0
  104. package/dist/model/TemplateFieldDependencyInput.js +182 -0
  105. package/dist/model/TemplateFieldDependencyMatch.js +59 -0
  106. package/dist/model/TemplateFieldDependencyOperator.js +99 -0
  107. package/dist/model/TemplateFieldLogicStatus.js +74 -0
  108. package/dist/model/TemplateFormMode.js +64 -0
  109. package/dist/model/{TemplateModelCodeResponse.js → TemplateModelCode.js} +34 -86
  110. package/dist/model/TemplatePageAiError.js +69 -0
  111. package/dist/model/TemplatePageAiNamingStatus.js +59 -0
  112. package/dist/model/TemplatePageFieldsStatus.js +74 -0
  113. package/dist/model/TemplatePageImageStatus.js +59 -0
  114. package/dist/model/TemplatePageProcessingStatus.js +162 -0
  115. package/dist/model/{SubmissionDataRequestToken.js → TemplateSourcePdf.js} +52 -56
  116. package/dist/model/TemplateSummary.js +560 -0
  117. package/dist/model/{SuccessErrorResponse.js → TemplateSummaryList.js} +43 -55
  118. package/dist/model/TemplateType.js +59 -0
  119. package/dist/model/{Submission422Response.js → TemplateVersion.js} +60 -63
  120. package/dist/model/TemplateVersionType.js +64 -0
  121. package/dist/model/TextAlignment.js +69 -0
  122. package/dist/model/TextOverflow.js +59 -0
  123. package/dist/model/TextVerticalAlignment.js +64 -0
  124. package/dist/model/Typeface.js +134 -0
  125. package/dist/model/UpdateSignatureRequestRequest.js +183 -0
  126. package/dist/model/UpdateTemplateDocumentRequest.js +136 -0
  127. package/dist/model/UpdateTemplateRequest.js +450 -0
  128. package/dist/model/UpdateWebhookRequest.js +209 -0
  129. package/dist/model/UploadMethod.js +54 -0
  130. package/dist/model/{UploadPresignResponse.js → UploadPresign.js} +53 -58
  131. package/dist/model/{AddFieldsData.js → UrlSourcePdf.js} +49 -31
  132. package/dist/model/Webhook.js +58 -73
  133. package/dist/model/WebhookEventType.js +174 -0
  134. package/dist/model/WebhookList.js +132 -0
  135. package/dist/model/WebhookMode.js +59 -0
  136. package/package.json +1 -1
  137. package/dist/model/BatchGeneratePdfs201Response.js +0 -194
  138. package/dist/model/CombinedSubmission.js +0 -313
  139. package/dist/model/CombinedSubmissionAction.js +0 -268
  140. package/dist/model/CreateCombinedSubmissionResponse.js +0 -180
  141. package/dist/model/CreateCustomFileResponse.js +0 -167
  142. package/dist/model/CreateHtmlTemplate.js +0 -108
  143. package/dist/model/CreatePdfTemplate.js +0 -108
  144. package/dist/model/CreateSubmissionDataRequestData.js +0 -314
  145. package/dist/model/CreateSubmissionDataRequestEventRequest.js +0 -239
  146. package/dist/model/CreateSubmissionDataRequestEventResponse.js +0 -167
  147. package/dist/model/CreateSubmissionDataRequestResponse.js +0 -167
  148. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +0 -167
  149. package/dist/model/ErrorOrMultipleErrorsResponse.js +0 -153
  150. package/dist/model/JsonSchema.js +0 -205
  151. package/dist/model/SubmissionBatchWithSubmissions.js +0 -228
  152. package/dist/model/SubmissionDataRequest.js +0 -496
  153. package/dist/model/SubmissionPreview.js +0 -509
  154. package/dist/model/TemplateAddFieldsResponse.js +0 -156
  155. package/dist/model/TemplatePreview.js +0 -796
  156. package/dist/model/UpdateHtmlTemplate.js +0 -108
  157. package/dist/model/UpdateSubmissionDataRequestData.js +0 -311
  158. package/dist/model/UpdateWebhookData.js +0 -108
@@ -5,6 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _AiFieldNamingLanguage = _interopRequireDefault(require("./AiFieldNamingLanguage"));
9
+ var _ExpirationInterval = _interopRequireDefault(require("./ExpirationInterval"));
10
+ var _HtmlEngineOptions = _interopRequireDefault(require("./HtmlEngineOptions"));
11
+ var _TemplateActor = _interopRequireDefault(require("./TemplateActor"));
12
+ var _TemplateDefaults = _interopRequireDefault(require("./TemplateDefaults"));
13
+ var _TemplateDocument = _interopRequireDefault(require("./TemplateDocument"));
14
+ var _TemplateFieldDependency = _interopRequireDefault(require("./TemplateFieldDependency"));
15
+ var _TemplateFormMode = _interopRequireDefault(require("./TemplateFormMode"));
16
+ var _TemplateType = _interopRequireDefault(require("./TemplateType"));
17
+ var _TemplateVersion = _interopRequireDefault(require("./TemplateVersion"));
8
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
19
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
20
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -16,9 +26,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
26
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
27
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
28
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
29
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
30
  *
21
- * The version of the OpenAPI document: v1
31
+ * The version of the OpenAPI document: v2
22
32
  *
23
33
  *
24
34
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -29,79 +39,64 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
39
  /**
30
40
  * The Template model module.
31
41
  * @module model/Template
32
- * @version 3.3.0
42
+ * @version 4.0.0
33
43
  */
34
44
  var Template = /*#__PURE__*/function () {
35
45
  /**
36
46
  * Constructs a new <code>Template</code>.
47
+ * A template that generates PDFs from submission data.
37
48
  * @alias module:model/Template
38
49
  * @extends Object
39
- * @param add_data_request_submission_id_footers {Boolean}
40
- * @param allow_additional_properties {Boolean}
41
- * @param description {String}
42
- * @param document_filename {String}
43
- * @param document_md5 {String}
44
- * @param document_parse_error {Boolean}
45
- * @param document_processed {Boolean}
46
- * @param document_state {module:model/Template.DocumentStateEnum}
47
- * @param document_url {String}
48
- * @param editable_submissions {Boolean}
49
- * @param embed_domains {String}
50
- * @param embed_edit_allow_settings {Boolean}
51
- * @param embed_edit_allow_versioning {Boolean}
52
- * @param embed_edit_allow_document_replacement {Boolean}
53
- * @param encrypt_pdfs_password {String}
54
- * @param encrypt_pdfs {Boolean}
55
- * @param expiration_interval {String}
56
- * @param expire_after {Number}
57
- * @param expire_submissions {Boolean}
58
- * @param external_predefined_fields_template_id {String}
59
- * @param external_predefined_fields_template_name {String}
60
- * @param first_template {Boolean}
61
- * @param id {String}
62
- * @param locked {Boolean}
63
- * @param merge_audit_trail_pdf {Boolean}
64
- * @param name {String}
65
- * @param page_count {Number}
66
- * @param page_dimensions {Array.<Array.<Number>>}
67
- * @param parent_folder_id {String}
68
- * @param parse_dates_using_template_date_format {Boolean}
69
- * @param path {String}
70
- * @param permanent_document_url {String}
71
- * @param public_submissions {Boolean}
72
- * @param public_web_form {Boolean}
73
- * @param redirect_url {String}
74
- * @param slack_webhook_url {String}
75
- * @param template_type {module:model/Template.TemplateTypeEnum}
76
- * @param updated_at {String}
77
- * @param version_published_at {String}
78
- * @param version {String}
79
- * @param webhook_url {String}
80
- * @param demo {Boolean}
81
- * @param latest_version {String}
82
- * @param last_changed_at {String}
83
- * @param last_changed_by_type {module:model/Template.LastChangedByTypeEnum}
84
- * @param last_changed_by_id {String}
85
- * @param last_changed_by_external_name {String}
86
- * @param last_changed_by_external_email {String}
87
- * @param last_changed_by_external_id {String}
88
- * @param defaults {Object}
89
- * @param field_dependencies {Array.<Object>}
90
- * @param field_order {Array.<Array.<Number>>}
91
- * @param fields {Object}
92
- * @param footer_html {String}
93
- * @param header_html {String}
94
- * @param html_engine_options {Object}
95
- * @param html {String}
96
- * @param predefined_fields {Array.<Object>}
97
- * @param scss {String}
98
- * @param shared_field_data {Object}
99
- * @param template_schema_version {Number}
100
- * @param versions {Array.<Object>}
50
+ * @param id {String} The template's ID.
51
+ * @param name {String} The template's name.
52
+ * @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.
53
+ * @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.
54
+ * @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`).
55
+ * @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.
56
+ * @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.
57
+ * @param path {String} The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root.
58
+ * @param version {String} The published version this is, such as `1.2.0`. Null for the draft.
59
+ * @param latest_version {String} The template's latest published version. Null if no version has been published.
60
+ * @param version_published_at {Date} When this version was published. Null for the draft.
61
+ * @param locked {Boolean} A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
62
+ * @param add_signature_request_submission_id_footers {Boolean} Print the submission ID in the footer of each page of PDFs signed through signature requests.
63
+ * @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.
64
+ * @param allow_additional_properties {Boolean} Accept submission data with properties that aren't fields of the template.
65
+ * @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.
66
+ * @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.
67
+ * @param editable_submissions {Boolean} Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it.
68
+ * @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.
69
+ * @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).
70
+ * @param embed_edit_allow_versioning {Boolean} Allow the embedded template editor to publish, restore, compare and delete published versions.
71
+ * @param embed_edit_allow_document_replacement {Boolean} Allow the embedded template editor to replace the template's PDF.
72
+ * @param encrypt_pdfs {Boolean} Encrypt generated PDFs with `encrypt_pdfs_password`.
73
+ * @param has_encrypt_pdfs_password {Boolean} Whether `encrypt_pdfs_password` is set.
74
+ * @param expire_submissions {Boolean} Delete each submission's data and PDF after `expire_after` `expiration_interval`.
75
+ * @param expire_after {Number} 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).
76
+ * @param expiration_interval {module:model/ExpirationInterval} The unit of `expire_after`.
77
+ * @param merge_audit_trail_pdf {Boolean} Add the audit trail to the end of PDFs signed through signature requests.
78
+ * @param 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.
79
+ * @param public_submissions {Boolean} Allow anyone with a submission's ID to download its PDF.
80
+ * @param public_web_form {Boolean} Allow anyone to fill in the template's web form.
81
+ * @param redirect_url {String} Where the web form sends people after they submit it.
82
+ * @param has_slack_webhook_url {Boolean} Whether `slack_webhook_url` is set.
83
+ * @param last_changed_at {Date} When the draft was last changed.
84
+ * @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.
85
+ * @param created_at {Date} When the template was created.
86
+ * @param updated_at {Date} When the template was last updated.
87
+ * @param defaults {module:model/TemplateDefaults}
88
+ * @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.
89
+ * @param html {String} The HTML of an HTML template, as a Liquid template. Null for PDF templates.
90
+ * @param scss {String} The SCSS of an HTML template.
91
+ * @param header_html {String} The HTML printed at the top of each page of an HTML template.
92
+ * @param footer_html {String} The HTML printed at the bottom of each page of an HTML template.
93
+ * @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.
94
+ * @param embed_edit_token {String} The token that opens the template in the embedded template editor.
95
+ * @param versions {Array.<module:model/TemplateVersion>} The template's published versions, newest first (up to 100).
101
96
  */
102
- function Template(add_data_request_submission_id_footers, allow_additional_properties, description, document_filename, document_md5, document_parse_error, document_processed, document_state, document_url, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs_password, encrypt_pdfs, expiration_interval, expire_after, expire_submissions, external_predefined_fields_template_id, external_predefined_fields_template_name, first_template, id, locked, merge_audit_trail_pdf, name, page_count, page_dimensions, parent_folder_id, parse_dates_using_template_date_format, path, permanent_document_url, public_submissions, public_web_form, redirect_url, slack_webhook_url, template_type, updated_at, version_published_at, version, webhook_url, demo, latest_version, last_changed_at, last_changed_by_type, last_changed_by_id, last_changed_by_external_name, last_changed_by_external_email, last_changed_by_external_id, defaults, field_dependencies, field_order, fields, footer_html, header_html, html_engine_options, html, predefined_fields, scss, shared_field_data, template_schema_version, versions) {
97
+ 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, html, scss, header_html, footer_html, html_engine_options, embed_edit_token, versions) {
103
98
  _classCallCheck(this, Template);
104
- Template.initialize(this, add_data_request_submission_id_footers, allow_additional_properties, description, document_filename, document_md5, document_parse_error, document_processed, document_state, document_url, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs_password, encrypt_pdfs, expiration_interval, expire_after, expire_submissions, external_predefined_fields_template_id, external_predefined_fields_template_name, first_template, id, locked, merge_audit_trail_pdf, name, page_count, page_dimensions, parent_folder_id, parse_dates_using_template_date_format, path, permanent_document_url, public_submissions, public_web_form, redirect_url, slack_webhook_url, template_type, updated_at, version_published_at, version, webhook_url, demo, latest_version, last_changed_at, last_changed_by_type, last_changed_by_id, last_changed_by_external_name, last_changed_by_external_email, last_changed_by_external_id, defaults, field_dependencies, field_order, fields, footer_html, header_html, html_engine_options, html, predefined_fields, scss, shared_field_data, template_schema_version, versions);
99
+ 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, html, scss, header_html, footer_html, html_engine_options, embed_edit_token, versions);
105
100
  }
106
101
 
107
102
  /**
@@ -111,68 +106,52 @@ var Template = /*#__PURE__*/function () {
111
106
  */
112
107
  return _createClass(Template, null, [{
113
108
  key: "initialize",
114
- value: function initialize(obj, add_data_request_submission_id_footers, allow_additional_properties, description, document_filename, document_md5, document_parse_error, document_processed, document_state, document_url, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs_password, encrypt_pdfs, expiration_interval, expire_after, expire_submissions, external_predefined_fields_template_id, external_predefined_fields_template_name, first_template, id, locked, merge_audit_trail_pdf, name, page_count, page_dimensions, parent_folder_id, parse_dates_using_template_date_format, path, permanent_document_url, public_submissions, public_web_form, redirect_url, slack_webhook_url, template_type, updated_at, version_published_at, version, webhook_url, demo, latest_version, last_changed_at, last_changed_by_type, last_changed_by_id, last_changed_by_external_name, last_changed_by_external_email, last_changed_by_external_id, defaults, field_dependencies, field_order, fields, footer_html, header_html, html_engine_options, html, predefined_fields, scss, shared_field_data, template_schema_version, versions) {
115
- obj['add_data_request_submission_id_footers'] = add_data_request_submission_id_footers;
116
- obj['allow_additional_properties'] = allow_additional_properties;
109
+ 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, html, scss, header_html, footer_html, html_engine_options, embed_edit_token, versions) {
110
+ obj['id'] = id;
111
+ obj['name'] = name;
117
112
  obj['description'] = description;
118
- obj['document_filename'] = document_filename;
119
- obj['document_md5'] = document_md5;
120
- obj['document_parse_error'] = document_parse_error;
121
- obj['document_processed'] = document_processed;
122
- obj['document_state'] = document_state;
123
- obj['document_url'] = document_url;
113
+ obj['template_type'] = template_type;
114
+ obj['ready'] = ready;
115
+ obj['document'] = document;
116
+ obj['parent_folder_id'] = parent_folder_id;
117
+ obj['path'] = path;
118
+ obj['version'] = version;
119
+ obj['latest_version'] = latest_version;
120
+ obj['version_published_at'] = version_published_at;
121
+ obj['locked'] = locked;
122
+ obj['add_signature_request_submission_id_footers'] = add_signature_request_submission_id_footers;
123
+ obj['ai_field_naming_language'] = ai_field_naming_language;
124
+ obj['allow_additional_properties'] = allow_additional_properties;
125
+ obj['allow_skipping_optional_fields'] = allow_skipping_optional_fields;
126
+ obj['default_form_mode'] = default_form_mode;
124
127
  obj['editable_submissions'] = editable_submissions;
125
128
  obj['embed_domains'] = embed_domains;
126
129
  obj['embed_edit_allow_settings'] = embed_edit_allow_settings;
127
130
  obj['embed_edit_allow_versioning'] = embed_edit_allow_versioning;
128
131
  obj['embed_edit_allow_document_replacement'] = embed_edit_allow_document_replacement;
129
- obj['encrypt_pdfs_password'] = encrypt_pdfs_password;
130
132
  obj['encrypt_pdfs'] = encrypt_pdfs;
131
- obj['expiration_interval'] = expiration_interval;
132
- obj['expire_after'] = expire_after;
133
+ obj['has_encrypt_pdfs_password'] = has_encrypt_pdfs_password;
133
134
  obj['expire_submissions'] = expire_submissions;
134
- obj['external_predefined_fields_template_id'] = external_predefined_fields_template_id;
135
- obj['external_predefined_fields_template_name'] = external_predefined_fields_template_name;
136
- obj['first_template'] = first_template;
137
- obj['id'] = id;
138
- obj['locked'] = locked;
135
+ obj['expire_after'] = expire_after;
136
+ obj['expiration_interval'] = expiration_interval;
139
137
  obj['merge_audit_trail_pdf'] = merge_audit_trail_pdf;
140
- obj['name'] = name;
141
- obj['page_count'] = page_count;
142
- obj['page_dimensions'] = page_dimensions;
143
- obj['parent_folder_id'] = parent_folder_id;
144
138
  obj['parse_dates_using_template_date_format'] = parse_dates_using_template_date_format;
145
- obj['path'] = path;
146
- obj['permanent_document_url'] = permanent_document_url;
147
139
  obj['public_submissions'] = public_submissions;
148
140
  obj['public_web_form'] = public_web_form;
149
141
  obj['redirect_url'] = redirect_url;
150
- obj['slack_webhook_url'] = slack_webhook_url;
151
- obj['template_type'] = template_type;
152
- obj['updated_at'] = updated_at;
153
- obj['version_published_at'] = version_published_at;
154
- obj['version'] = version;
155
- obj['webhook_url'] = webhook_url;
156
- obj['demo'] = demo;
157
- obj['latest_version'] = latest_version;
142
+ obj['has_slack_webhook_url'] = has_slack_webhook_url;
158
143
  obj['last_changed_at'] = last_changed_at;
159
- obj['last_changed_by_type'] = last_changed_by_type;
160
- obj['last_changed_by_id'] = last_changed_by_id;
161
- obj['last_changed_by_external_name'] = last_changed_by_external_name;
162
- obj['last_changed_by_external_email'] = last_changed_by_external_email;
163
- obj['last_changed_by_external_id'] = last_changed_by_external_id;
144
+ obj['last_changed_by'] = last_changed_by;
145
+ obj['created_at'] = created_at;
146
+ obj['updated_at'] = updated_at;
164
147
  obj['defaults'] = defaults;
165
148
  obj['field_dependencies'] = field_dependencies;
166
- obj['field_order'] = field_order;
167
- obj['fields'] = fields;
168
- obj['footer_html'] = footer_html;
169
- obj['header_html'] = header_html;
170
- obj['html_engine_options'] = html_engine_options;
171
149
  obj['html'] = html;
172
- obj['predefined_fields'] = predefined_fields;
173
150
  obj['scss'] = scss;
174
- obj['shared_field_data'] = shared_field_data;
175
- obj['template_schema_version'] = template_schema_version;
151
+ obj['header_html'] = header_html;
152
+ obj['footer_html'] = footer_html;
153
+ obj['html_engine_options'] = html_engine_options;
154
+ obj['embed_edit_token'] = embed_edit_token;
176
155
  obj['versions'] = versions;
177
156
  }
178
157
 
@@ -189,38 +168,62 @@ var Template = /*#__PURE__*/function () {
189
168
  if (data) {
190
169
  obj = obj || new Template();
191
170
  _ApiClient["default"].constructFromObject(data, obj, 'Object');
192
- if (data.hasOwnProperty('add_data_request_submission_id_footers')) {
193
- obj['add_data_request_submission_id_footers'] = _ApiClient["default"].convertToType(data['add_data_request_submission_id_footers'], 'Boolean');
171
+ if (data.hasOwnProperty('id')) {
172
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
194
173
  }
195
- if (data.hasOwnProperty('allow_additional_properties')) {
196
- obj['allow_additional_properties'] = _ApiClient["default"].convertToType(data['allow_additional_properties'], 'Boolean');
174
+ if (data.hasOwnProperty('name')) {
175
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
197
176
  }
198
177
  if (data.hasOwnProperty('description')) {
199
178
  obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
200
179
  }
201
- if (data.hasOwnProperty('document_filename')) {
202
- obj['document_filename'] = _ApiClient["default"].convertToType(data['document_filename'], 'String');
180
+ if (data.hasOwnProperty('template_type')) {
181
+ obj['template_type'] = _ApiClient["default"].convertToType(data['template_type'], _TemplateType["default"]);
203
182
  }
204
- if (data.hasOwnProperty('document_md5')) {
205
- obj['document_md5'] = _ApiClient["default"].convertToType(data['document_md5'], 'String');
183
+ if (data.hasOwnProperty('ready')) {
184
+ obj['ready'] = _ApiClient["default"].convertToType(data['ready'], 'Boolean');
206
185
  }
207
- if (data.hasOwnProperty('document_parse_error')) {
208
- obj['document_parse_error'] = _ApiClient["default"].convertToType(data['document_parse_error'], 'Boolean');
186
+ if (data.hasOwnProperty('document')) {
187
+ obj['document'] = _ApiClient["default"].convertToType(data['document'], _TemplateDocument["default"]);
209
188
  }
210
- if (data.hasOwnProperty('document_processed')) {
211
- obj['document_processed'] = _ApiClient["default"].convertToType(data['document_processed'], 'Boolean');
189
+ if (data.hasOwnProperty('parent_folder_id')) {
190
+ obj['parent_folder_id'] = _ApiClient["default"].convertToType(data['parent_folder_id'], 'String');
212
191
  }
213
- if (data.hasOwnProperty('document_state')) {
214
- obj['document_state'] = _ApiClient["default"].convertToType(data['document_state'], 'String');
192
+ if (data.hasOwnProperty('path')) {
193
+ obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String');
215
194
  }
216
- if (data.hasOwnProperty('document_url')) {
217
- obj['document_url'] = _ApiClient["default"].convertToType(data['document_url'], 'String');
195
+ if (data.hasOwnProperty('version')) {
196
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
197
+ }
198
+ if (data.hasOwnProperty('latest_version')) {
199
+ obj['latest_version'] = _ApiClient["default"].convertToType(data['latest_version'], 'String');
200
+ }
201
+ if (data.hasOwnProperty('version_published_at')) {
202
+ obj['version_published_at'] = _ApiClient["default"].convertToType(data['version_published_at'], 'Date');
203
+ }
204
+ if (data.hasOwnProperty('locked')) {
205
+ obj['locked'] = _ApiClient["default"].convertToType(data['locked'], 'Boolean');
206
+ }
207
+ if (data.hasOwnProperty('add_signature_request_submission_id_footers')) {
208
+ obj['add_signature_request_submission_id_footers'] = _ApiClient["default"].convertToType(data['add_signature_request_submission_id_footers'], 'Boolean');
209
+ }
210
+ if (data.hasOwnProperty('ai_field_naming_language')) {
211
+ obj['ai_field_naming_language'] = _ApiClient["default"].convertToType(data['ai_field_naming_language'], _AiFieldNamingLanguage["default"]);
212
+ }
213
+ if (data.hasOwnProperty('allow_additional_properties')) {
214
+ obj['allow_additional_properties'] = _ApiClient["default"].convertToType(data['allow_additional_properties'], 'Boolean');
215
+ }
216
+ if (data.hasOwnProperty('allow_skipping_optional_fields')) {
217
+ obj['allow_skipping_optional_fields'] = _ApiClient["default"].convertToType(data['allow_skipping_optional_fields'], 'Boolean');
218
+ }
219
+ if (data.hasOwnProperty('default_form_mode')) {
220
+ obj['default_form_mode'] = _ApiClient["default"].convertToType(data['default_form_mode'], _TemplateFormMode["default"]);
218
221
  }
219
222
  if (data.hasOwnProperty('editable_submissions')) {
220
223
  obj['editable_submissions'] = _ApiClient["default"].convertToType(data['editable_submissions'], 'Boolean');
221
224
  }
222
225
  if (data.hasOwnProperty('embed_domains')) {
223
- obj['embed_domains'] = _ApiClient["default"].convertToType(data['embed_domains'], 'String');
226
+ obj['embed_domains'] = _ApiClient["default"].convertToType(data['embed_domains'], ['String']);
224
227
  }
225
228
  if (data.hasOwnProperty('embed_edit_allow_settings')) {
226
229
  obj['embed_edit_allow_settings'] = _ApiClient["default"].convertToType(data['embed_edit_allow_settings'], 'Boolean');
@@ -231,60 +234,27 @@ var Template = /*#__PURE__*/function () {
231
234
  if (data.hasOwnProperty('embed_edit_allow_document_replacement')) {
232
235
  obj['embed_edit_allow_document_replacement'] = _ApiClient["default"].convertToType(data['embed_edit_allow_document_replacement'], 'Boolean');
233
236
  }
234
- if (data.hasOwnProperty('encrypt_pdfs_password')) {
235
- obj['encrypt_pdfs_password'] = _ApiClient["default"].convertToType(data['encrypt_pdfs_password'], 'String');
236
- }
237
237
  if (data.hasOwnProperty('encrypt_pdfs')) {
238
238
  obj['encrypt_pdfs'] = _ApiClient["default"].convertToType(data['encrypt_pdfs'], 'Boolean');
239
239
  }
240
- if (data.hasOwnProperty('expiration_interval')) {
241
- obj['expiration_interval'] = _ApiClient["default"].convertToType(data['expiration_interval'], 'String');
242
- }
243
- if (data.hasOwnProperty('expire_after')) {
244
- obj['expire_after'] = _ApiClient["default"].convertToType(data['expire_after'], 'Number');
240
+ if (data.hasOwnProperty('has_encrypt_pdfs_password')) {
241
+ obj['has_encrypt_pdfs_password'] = _ApiClient["default"].convertToType(data['has_encrypt_pdfs_password'], 'Boolean');
245
242
  }
246
243
  if (data.hasOwnProperty('expire_submissions')) {
247
244
  obj['expire_submissions'] = _ApiClient["default"].convertToType(data['expire_submissions'], 'Boolean');
248
245
  }
249
- if (data.hasOwnProperty('external_predefined_fields_template_id')) {
250
- obj['external_predefined_fields_template_id'] = _ApiClient["default"].convertToType(data['external_predefined_fields_template_id'], 'String');
251
- }
252
- if (data.hasOwnProperty('external_predefined_fields_template_name')) {
253
- obj['external_predefined_fields_template_name'] = _ApiClient["default"].convertToType(data['external_predefined_fields_template_name'], 'String');
254
- }
255
- if (data.hasOwnProperty('first_template')) {
256
- obj['first_template'] = _ApiClient["default"].convertToType(data['first_template'], 'Boolean');
257
- }
258
- if (data.hasOwnProperty('id')) {
259
- obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
246
+ if (data.hasOwnProperty('expire_after')) {
247
+ obj['expire_after'] = _ApiClient["default"].convertToType(data['expire_after'], 'Number');
260
248
  }
261
- if (data.hasOwnProperty('locked')) {
262
- obj['locked'] = _ApiClient["default"].convertToType(data['locked'], 'Boolean');
249
+ if (data.hasOwnProperty('expiration_interval')) {
250
+ obj['expiration_interval'] = _ApiClient["default"].convertToType(data['expiration_interval'], _ExpirationInterval["default"]);
263
251
  }
264
252
  if (data.hasOwnProperty('merge_audit_trail_pdf')) {
265
253
  obj['merge_audit_trail_pdf'] = _ApiClient["default"].convertToType(data['merge_audit_trail_pdf'], 'Boolean');
266
254
  }
267
- if (data.hasOwnProperty('name')) {
268
- obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
269
- }
270
- if (data.hasOwnProperty('page_count')) {
271
- obj['page_count'] = _ApiClient["default"].convertToType(data['page_count'], 'Number');
272
- }
273
- if (data.hasOwnProperty('page_dimensions')) {
274
- obj['page_dimensions'] = _ApiClient["default"].convertToType(data['page_dimensions'], [['Number']]);
275
- }
276
- if (data.hasOwnProperty('parent_folder_id')) {
277
- obj['parent_folder_id'] = _ApiClient["default"].convertToType(data['parent_folder_id'], 'String');
278
- }
279
255
  if (data.hasOwnProperty('parse_dates_using_template_date_format')) {
280
256
  obj['parse_dates_using_template_date_format'] = _ApiClient["default"].convertToType(data['parse_dates_using_template_date_format'], 'Boolean');
281
257
  }
282
- if (data.hasOwnProperty('path')) {
283
- obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String');
284
- }
285
- if (data.hasOwnProperty('permanent_document_url')) {
286
- obj['permanent_document_url'] = _ApiClient["default"].convertToType(data['permanent_document_url'], 'String');
287
- }
288
258
  if (data.hasOwnProperty('public_submissions')) {
289
259
  obj['public_submissions'] = _ApiClient["default"].convertToType(data['public_submissions'], 'Boolean');
290
260
  }
@@ -294,89 +264,47 @@ var Template = /*#__PURE__*/function () {
294
264
  if (data.hasOwnProperty('redirect_url')) {
295
265
  obj['redirect_url'] = _ApiClient["default"].convertToType(data['redirect_url'], 'String');
296
266
  }
297
- if (data.hasOwnProperty('slack_webhook_url')) {
298
- obj['slack_webhook_url'] = _ApiClient["default"].convertToType(data['slack_webhook_url'], 'String');
299
- }
300
- if (data.hasOwnProperty('template_type')) {
301
- obj['template_type'] = _ApiClient["default"].convertToType(data['template_type'], 'String');
302
- }
303
- if (data.hasOwnProperty('updated_at')) {
304
- obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'String');
305
- }
306
- if (data.hasOwnProperty('version_published_at')) {
307
- obj['version_published_at'] = _ApiClient["default"].convertToType(data['version_published_at'], 'String');
308
- }
309
- if (data.hasOwnProperty('version')) {
310
- obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
311
- }
312
- if (data.hasOwnProperty('webhook_url')) {
313
- obj['webhook_url'] = _ApiClient["default"].convertToType(data['webhook_url'], 'String');
314
- }
315
- if (data.hasOwnProperty('embed_edit_token')) {
316
- obj['embed_edit_token'] = _ApiClient["default"].convertToType(data['embed_edit_token'], 'String');
317
- }
318
- if (data.hasOwnProperty('demo')) {
319
- obj['demo'] = _ApiClient["default"].convertToType(data['demo'], 'Boolean');
320
- }
321
- if (data.hasOwnProperty('latest_version')) {
322
- obj['latest_version'] = _ApiClient["default"].convertToType(data['latest_version'], 'String');
267
+ if (data.hasOwnProperty('has_slack_webhook_url')) {
268
+ obj['has_slack_webhook_url'] = _ApiClient["default"].convertToType(data['has_slack_webhook_url'], 'Boolean');
323
269
  }
324
270
  if (data.hasOwnProperty('last_changed_at')) {
325
- obj['last_changed_at'] = _ApiClient["default"].convertToType(data['last_changed_at'], 'String');
326
- }
327
- if (data.hasOwnProperty('last_changed_by_type')) {
328
- obj['last_changed_by_type'] = _ApiClient["default"].convertToType(data['last_changed_by_type'], 'String');
271
+ obj['last_changed_at'] = _ApiClient["default"].convertToType(data['last_changed_at'], 'Date');
329
272
  }
330
- if (data.hasOwnProperty('last_changed_by_id')) {
331
- obj['last_changed_by_id'] = _ApiClient["default"].convertToType(data['last_changed_by_id'], 'String');
273
+ if (data.hasOwnProperty('last_changed_by')) {
274
+ obj['last_changed_by'] = _ApiClient["default"].convertToType(data['last_changed_by'], _TemplateActor["default"]);
332
275
  }
333
- if (data.hasOwnProperty('last_changed_by_external_name')) {
334
- obj['last_changed_by_external_name'] = _ApiClient["default"].convertToType(data['last_changed_by_external_name'], 'String');
276
+ if (data.hasOwnProperty('created_at')) {
277
+ obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
335
278
  }
336
- if (data.hasOwnProperty('last_changed_by_external_email')) {
337
- obj['last_changed_by_external_email'] = _ApiClient["default"].convertToType(data['last_changed_by_external_email'], 'String');
338
- }
339
- if (data.hasOwnProperty('last_changed_by_external_id')) {
340
- obj['last_changed_by_external_id'] = _ApiClient["default"].convertToType(data['last_changed_by_external_id'], 'String');
279
+ if (data.hasOwnProperty('updated_at')) {
280
+ obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
341
281
  }
342
282
  if (data.hasOwnProperty('defaults')) {
343
- obj['defaults'] = _ApiClient["default"].convertToType(data['defaults'], Object);
283
+ obj['defaults'] = data['defaults'] === null ? null : _TemplateDefaults["default"].constructFromObject(data['defaults']);
344
284
  }
345
285
  if (data.hasOwnProperty('field_dependencies')) {
346
- obj['field_dependencies'] = _ApiClient["default"].convertToType(data['field_dependencies'], [Object]);
347
- }
348
- if (data.hasOwnProperty('field_order')) {
349
- obj['field_order'] = _ApiClient["default"].convertToType(data['field_order'], [['Number']]);
350
- }
351
- if (data.hasOwnProperty('fields')) {
352
- obj['fields'] = _ApiClient["default"].convertToType(data['fields'], Object);
353
- }
354
- if (data.hasOwnProperty('footer_html')) {
355
- obj['footer_html'] = _ApiClient["default"].convertToType(data['footer_html'], 'String');
356
- }
357
- if (data.hasOwnProperty('header_html')) {
358
- obj['header_html'] = _ApiClient["default"].convertToType(data['header_html'], 'String');
359
- }
360
- if (data.hasOwnProperty('html_engine_options')) {
361
- obj['html_engine_options'] = _ApiClient["default"].convertToType(data['html_engine_options'], Object);
286
+ obj['field_dependencies'] = _ApiClient["default"].convertToType(data['field_dependencies'], [_TemplateFieldDependency["default"]]);
362
287
  }
363
288
  if (data.hasOwnProperty('html')) {
364
289
  obj['html'] = _ApiClient["default"].convertToType(data['html'], 'String');
365
290
  }
366
- if (data.hasOwnProperty('predefined_fields')) {
367
- obj['predefined_fields'] = _ApiClient["default"].convertToType(data['predefined_fields'], [Object]);
368
- }
369
291
  if (data.hasOwnProperty('scss')) {
370
292
  obj['scss'] = _ApiClient["default"].convertToType(data['scss'], 'String');
371
293
  }
372
- if (data.hasOwnProperty('shared_field_data')) {
373
- obj['shared_field_data'] = _ApiClient["default"].convertToType(data['shared_field_data'], Object);
294
+ if (data.hasOwnProperty('header_html')) {
295
+ obj['header_html'] = _ApiClient["default"].convertToType(data['header_html'], 'String');
296
+ }
297
+ if (data.hasOwnProperty('footer_html')) {
298
+ obj['footer_html'] = _ApiClient["default"].convertToType(data['footer_html'], 'String');
299
+ }
300
+ if (data.hasOwnProperty('html_engine_options')) {
301
+ obj['html_engine_options'] = _ApiClient["default"].convertToType(data['html_engine_options'], _HtmlEngineOptions["default"]);
374
302
  }
375
- if (data.hasOwnProperty('template_schema_version')) {
376
- obj['template_schema_version'] = _ApiClient["default"].convertToType(data['template_schema_version'], 'Number');
303
+ if (data.hasOwnProperty('embed_edit_token')) {
304
+ obj['embed_edit_token'] = _ApiClient["default"].convertToType(data['embed_edit_token'], 'String');
377
305
  }
378
306
  if (data.hasOwnProperty('versions')) {
379
- obj['versions'] = _ApiClient["default"].convertToType(data['versions'], [Object]);
307
+ obj['versions'] = _ApiClient["default"].convertToType(data['versions'], [_TemplateVersion["default"]]);
380
308
  }
381
309
  }
382
310
  return obj;
@@ -406,46 +334,6 @@ var Template = /*#__PURE__*/function () {
406
334
  } finally {
407
335
  _iterator.f();
408
336
  }
409
- if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
410
- throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
411
- }
412
- // ensure the json data is a string
413
- if (data['document_filename'] && !(typeof data['document_filename'] === 'string' || data['document_filename'] instanceof String)) {
414
- throw new Error("Expected the field `document_filename` to be a primitive type in the JSON string but got " + data['document_filename']);
415
- }
416
- // ensure the json data is a string
417
- if (data['document_md5'] && !(typeof data['document_md5'] === 'string' || data['document_md5'] instanceof String)) {
418
- throw new Error("Expected the field `document_md5` to be a primitive type in the JSON string but got " + data['document_md5']);
419
- }
420
- // ensure the json data is a string
421
- if (data['document_state'] && !(typeof data['document_state'] === 'string' || data['document_state'] instanceof String)) {
422
- throw new Error("Expected the field `document_state` to be a primitive type in the JSON string but got " + data['document_state']);
423
- }
424
- // ensure the json data is a string
425
- if (data['document_url'] && !(typeof data['document_url'] === 'string' || data['document_url'] instanceof String)) {
426
- throw new Error("Expected the field `document_url` to be a primitive type in the JSON string but got " + data['document_url']);
427
- }
428
- // ensure the json data is a string
429
- if (data['embed_domains'] && !(typeof data['embed_domains'] === 'string' || data['embed_domains'] instanceof String)) {
430
- throw new Error("Expected the field `embed_domains` to be a primitive type in the JSON string but got " + data['embed_domains']);
431
- }
432
- // ensure the json data is a string
433
- if (data['encrypt_pdfs_password'] && !(typeof data['encrypt_pdfs_password'] === 'string' || data['encrypt_pdfs_password'] instanceof String)) {
434
- throw new Error("Expected the field `encrypt_pdfs_password` to be a primitive type in the JSON string but got " + data['encrypt_pdfs_password']);
435
- }
436
- // ensure the json data is a string
437
- if (data['expiration_interval'] && !(typeof data['expiration_interval'] === 'string' || data['expiration_interval'] instanceof String)) {
438
- throw new Error("Expected the field `expiration_interval` to be a primitive type in the JSON string but got " + data['expiration_interval']);
439
- }
440
- // ensure the json data is a string
441
- if (data['external_predefined_fields_template_id'] && !(typeof data['external_predefined_fields_template_id'] === 'string' || data['external_predefined_fields_template_id'] instanceof String)) {
442
- throw new Error("Expected the field `external_predefined_fields_template_id` to be a primitive type in the JSON string but got " + data['external_predefined_fields_template_id']);
443
- }
444
- // ensure the json data is a string
445
- if (data['external_predefined_fields_template_name'] && !(typeof data['external_predefined_fields_template_name'] === 'string' || data['external_predefined_fields_template_name'] instanceof String)) {
446
- throw new Error("Expected the field `external_predefined_fields_template_name` to be a primitive type in the JSON string but got " + data['external_predefined_fields_template_name']);
447
- }
448
- // ensure the json data is a string
449
337
  if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
450
338
  throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
451
339
  }
@@ -453,9 +341,14 @@ var Template = /*#__PURE__*/function () {
453
341
  if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
454
342
  throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
455
343
  }
456
- // ensure the json data is an array
457
- if (!Array.isArray(data['page_dimensions'])) {
458
- throw new Error("Expected the field `page_dimensions` to be an array in the JSON data but got " + data['page_dimensions']);
344
+ // ensure the json data is a string
345
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
346
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
347
+ }
348
+ // validate the optional field `document`
349
+ if (data['document']) {
350
+ // data not null
351
+ _TemplateDocument["default"].validateJSON(data['document']);
459
352
  }
460
353
  // ensure the json data is a string
461
354
  if (data['parent_folder_id'] && !(typeof data['parent_folder_id'] === 'string' || data['parent_folder_id'] instanceof String)) {
@@ -466,96 +359,54 @@ var Template = /*#__PURE__*/function () {
466
359
  throw new Error("Expected the field `path` to be a primitive type in the JSON string but got " + data['path']);
467
360
  }
468
361
  // ensure the json data is a string
469
- if (data['permanent_document_url'] && !(typeof data['permanent_document_url'] === 'string' || data['permanent_document_url'] instanceof String)) {
470
- throw new Error("Expected the field `permanent_document_url` to be a primitive type in the JSON string but got " + data['permanent_document_url']);
471
- }
472
- // ensure the json data is a string
473
- if (data['redirect_url'] && !(typeof data['redirect_url'] === 'string' || data['redirect_url'] instanceof String)) {
474
- throw new Error("Expected the field `redirect_url` to be a primitive type in the JSON string but got " + data['redirect_url']);
475
- }
476
- // ensure the json data is a string
477
- if (data['slack_webhook_url'] && !(typeof data['slack_webhook_url'] === 'string' || data['slack_webhook_url'] instanceof String)) {
478
- throw new Error("Expected the field `slack_webhook_url` to be a primitive type in the JSON string but got " + data['slack_webhook_url']);
479
- }
480
- // ensure the json data is a string
481
- if (data['template_type'] && !(typeof data['template_type'] === 'string' || data['template_type'] instanceof String)) {
482
- throw new Error("Expected the field `template_type` to be a primitive type in the JSON string but got " + data['template_type']);
483
- }
484
- // ensure the json data is a string
485
- if (data['updated_at'] && !(typeof data['updated_at'] === 'string' || data['updated_at'] instanceof String)) {
486
- throw new Error("Expected the field `updated_at` to be a primitive type in the JSON string but got " + data['updated_at']);
487
- }
488
- // ensure the json data is a string
489
- if (data['version_published_at'] && !(typeof data['version_published_at'] === 'string' || data['version_published_at'] instanceof String)) {
490
- throw new Error("Expected the field `version_published_at` to be a primitive type in the JSON string but got " + data['version_published_at']);
491
- }
492
- // ensure the json data is a string
493
362
  if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
494
363
  throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
495
364
  }
496
365
  // ensure the json data is a string
497
- if (data['webhook_url'] && !(typeof data['webhook_url'] === 'string' || data['webhook_url'] instanceof String)) {
498
- throw new Error("Expected the field `webhook_url` to be a primitive type in the JSON string but got " + data['webhook_url']);
499
- }
500
- // ensure the json data is a string
501
- if (data['embed_edit_token'] && !(typeof data['embed_edit_token'] === 'string' || data['embed_edit_token'] instanceof String)) {
502
- throw new Error("Expected the field `embed_edit_token` to be a primitive type in the JSON string but got " + data['embed_edit_token']);
503
- }
504
- // ensure the json data is a string
505
366
  if (data['latest_version'] && !(typeof data['latest_version'] === 'string' || data['latest_version'] instanceof String)) {
506
367
  throw new Error("Expected the field `latest_version` to be a primitive type in the JSON string but got " + data['latest_version']);
507
368
  }
508
- // ensure the json data is a string
509
- if (data['last_changed_at'] && !(typeof data['last_changed_at'] === 'string' || data['last_changed_at'] instanceof String)) {
510
- throw new Error("Expected the field `last_changed_at` to be a primitive type in the JSON string but got " + data['last_changed_at']);
511
- }
512
- // ensure the json data is a string
513
- if (data['last_changed_by_type'] && !(typeof data['last_changed_by_type'] === 'string' || data['last_changed_by_type'] instanceof String)) {
514
- throw new Error("Expected the field `last_changed_by_type` to be a primitive type in the JSON string but got " + data['last_changed_by_type']);
515
- }
516
- // ensure the json data is a string
517
- if (data['last_changed_by_id'] && !(typeof data['last_changed_by_id'] === 'string' || data['last_changed_by_id'] instanceof String)) {
518
- throw new Error("Expected the field `last_changed_by_id` to be a primitive type in the JSON string but got " + data['last_changed_by_id']);
519
- }
520
- // ensure the json data is a string
521
- if (data['last_changed_by_external_name'] && !(typeof data['last_changed_by_external_name'] === 'string' || data['last_changed_by_external_name'] instanceof String)) {
522
- throw new Error("Expected the field `last_changed_by_external_name` to be a primitive type in the JSON string but got " + data['last_changed_by_external_name']);
369
+ // ensure the json data is an array
370
+ if (!Array.isArray(data['embed_domains'])) {
371
+ throw new Error("Expected the field `embed_domains` to be an array in the JSON data but got " + data['embed_domains']);
523
372
  }
524
373
  // ensure the json data is a string
525
- if (data['last_changed_by_external_email'] && !(typeof data['last_changed_by_external_email'] === 'string' || data['last_changed_by_external_email'] instanceof String)) {
526
- throw new Error("Expected the field `last_changed_by_external_email` to be a primitive type in the JSON string but got " + data['last_changed_by_external_email']);
374
+ if (data['redirect_url'] && !(typeof data['redirect_url'] === 'string' || data['redirect_url'] instanceof String)) {
375
+ throw new Error("Expected the field `redirect_url` to be a primitive type in the JSON string but got " + data['redirect_url']);
527
376
  }
528
- // ensure the json data is a string
529
- if (data['last_changed_by_external_id'] && !(typeof data['last_changed_by_external_id'] === 'string' || data['last_changed_by_external_id'] instanceof String)) {
530
- throw new Error("Expected the field `last_changed_by_external_id` to be a primitive type in the JSON string but got " + data['last_changed_by_external_id']);
377
+ // validate the optional field `last_changed_by`
378
+ if (data['last_changed_by']) {
379
+ // data not null
380
+ _TemplateActor["default"].validateJSON(data['last_changed_by']);
531
381
  }
532
382
  // ensure the json data is an array
533
383
  if (!Array.isArray(data['field_dependencies'])) {
534
384
  throw new Error("Expected the field `field_dependencies` to be an array in the JSON data but got " + data['field_dependencies']);
535
385
  }
536
- // ensure the json data is an array
537
- if (!Array.isArray(data['field_order'])) {
538
- throw new Error("Expected the field `field_order` to be an array in the JSON data but got " + data['field_order']);
386
+ // ensure the json data is a string
387
+ if (data['html'] && !(typeof data['html'] === 'string' || data['html'] instanceof String)) {
388
+ throw new Error("Expected the field `html` to be a primitive type in the JSON string but got " + data['html']);
539
389
  }
540
390
  // ensure the json data is a string
541
- if (data['footer_html'] && !(typeof data['footer_html'] === 'string' || data['footer_html'] instanceof String)) {
542
- throw new Error("Expected the field `footer_html` to be a primitive type in the JSON string but got " + data['footer_html']);
391
+ if (data['scss'] && !(typeof data['scss'] === 'string' || data['scss'] instanceof String)) {
392
+ throw new Error("Expected the field `scss` to be a primitive type in the JSON string but got " + data['scss']);
543
393
  }
544
394
  // ensure the json data is a string
545
395
  if (data['header_html'] && !(typeof data['header_html'] === 'string' || data['header_html'] instanceof String)) {
546
396
  throw new Error("Expected the field `header_html` to be a primitive type in the JSON string but got " + data['header_html']);
547
397
  }
548
398
  // ensure the json data is a string
549
- if (data['html'] && !(typeof data['html'] === 'string' || data['html'] instanceof String)) {
550
- throw new Error("Expected the field `html` to be a primitive type in the JSON string but got " + data['html']);
399
+ if (data['footer_html'] && !(typeof data['footer_html'] === 'string' || data['footer_html'] instanceof String)) {
400
+ throw new Error("Expected the field `footer_html` to be a primitive type in the JSON string but got " + data['footer_html']);
551
401
  }
552
- // ensure the json data is an array
553
- if (!Array.isArray(data['predefined_fields'])) {
554
- throw new Error("Expected the field `predefined_fields` to be an array in the JSON data but got " + data['predefined_fields']);
402
+ // validate the optional field `html_engine_options`
403
+ if (data['html_engine_options']) {
404
+ // data not null
405
+ _HtmlEngineOptions["default"].validateJSON(data['html_engine_options']);
555
406
  }
556
407
  // ensure the json data is a string
557
- if (data['scss'] && !(typeof data['scss'] === 'string' || data['scss'] instanceof String)) {
558
- throw new Error("Expected the field `scss` to be a primitive type in the JSON string but got " + data['scss']);
408
+ if (data['embed_edit_token'] && !(typeof data['embed_edit_token'] === 'string' || data['embed_edit_token'] instanceof String)) {
409
+ throw new Error("Expected the field `embed_edit_token` to be a primitive type in the JSON string but got " + data['embed_edit_token']);
559
410
  }
560
411
  // ensure the json data is an array
561
412
  if (!Array.isArray(data['versions'])) {
@@ -565,394 +416,280 @@ var Template = /*#__PURE__*/function () {
565
416
  }
566
417
  }]);
567
418
  }();
568
- Template.RequiredProperties = ["add_data_request_submission_id_footers", "allow_additional_properties", "description", "document_filename", "document_md5", "document_parse_error", "document_processed", "document_state", "document_url", "editable_submissions", "embed_domains", "embed_edit_allow_settings", "embed_edit_allow_versioning", "embed_edit_allow_document_replacement", "encrypt_pdfs_password", "encrypt_pdfs", "expiration_interval", "expire_after", "expire_submissions", "external_predefined_fields_template_id", "external_predefined_fields_template_name", "first_template", "id", "locked", "merge_audit_trail_pdf", "name", "page_count", "page_dimensions", "parent_folder_id", "parse_dates_using_template_date_format", "path", "permanent_document_url", "public_submissions", "public_web_form", "redirect_url", "slack_webhook_url", "template_type", "updated_at", "version_published_at", "version", "webhook_url", "demo", "latest_version", "last_changed_at", "last_changed_by_type", "last_changed_by_id", "last_changed_by_external_name", "last_changed_by_external_email", "last_changed_by_external_id", "defaults", "field_dependencies", "field_order", "fields", "footer_html", "header_html", "html_engine_options", "html", "predefined_fields", "scss", "shared_field_data", "template_schema_version", "versions"];
419
+ 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", "html", "scss", "header_html", "footer_html", "html_engine_options", "embed_edit_token", "versions"];
569
420
 
570
421
  /**
571
- * @member {Boolean} add_data_request_submission_id_footers
422
+ * The template's ID.
423
+ * @member {String} id
572
424
  */
573
- Template.prototype['add_data_request_submission_id_footers'] = undefined;
425
+ Template.prototype['id'] = undefined;
574
426
 
575
427
  /**
576
- * @member {Boolean} allow_additional_properties
428
+ * The template's name.
429
+ * @member {String} name
577
430
  */
578
- Template.prototype['allow_additional_properties'] = undefined;
431
+ Template.prototype['name'] = undefined;
579
432
 
580
433
  /**
434
+ * 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.
581
435
  * @member {String} description
582
436
  */
583
437
  Template.prototype['description'] = undefined;
584
438
 
585
439
  /**
586
- * @member {String} document_filename
440
+ * `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.
441
+ * @member {module:model/TemplateType} template_type
587
442
  */
588
- Template.prototype['document_filename'] = undefined;
589
-
590
- /**
591
- * @member {String} document_md5
592
- */
593
- Template.prototype['document_md5'] = undefined;
443
+ Template.prototype['template_type'] = undefined;
594
444
 
595
445
  /**
596
- * @member {Boolean} document_parse_error
446
+ * 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`).
447
+ * @member {Boolean} ready
597
448
  */
598
- Template.prototype['document_parse_error'] = undefined;
449
+ Template.prototype['ready'] = undefined;
599
450
 
600
451
  /**
601
- * @member {Boolean} document_processed
452
+ * The PDF of a PDF template. Null for HTML templates, and for a PDF template that has no PDF yet.
453
+ * @member {module:model/TemplateDocument} document
602
454
  */
603
- Template.prototype['document_processed'] = undefined;
455
+ Template.prototype['document'] = undefined;
604
456
 
605
457
  /**
606
- * @member {module:model/Template.DocumentStateEnum} document_state
458
+ * 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.
459
+ * @member {String} parent_folder_id
607
460
  */
608
- Template.prototype['document_state'] = undefined;
461
+ Template.prototype['parent_folder_id'] = undefined;
609
462
 
610
463
  /**
611
- * @member {String} document_url
464
+ * The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root.
465
+ * @member {String} path
612
466
  */
613
- Template.prototype['document_url'] = undefined;
467
+ Template.prototype['path'] = undefined;
614
468
 
615
469
  /**
616
- * @member {Boolean} editable_submissions
470
+ * The published version this is, such as `1.2.0`. Null for the draft.
471
+ * @member {String} version
617
472
  */
618
- Template.prototype['editable_submissions'] = undefined;
473
+ Template.prototype['version'] = undefined;
619
474
 
620
475
  /**
621
- * @member {String} embed_domains
476
+ * The template's latest published version. Null if no version has been published.
477
+ * @member {String} latest_version
622
478
  */
623
- Template.prototype['embed_domains'] = undefined;
479
+ Template.prototype['latest_version'] = undefined;
624
480
 
625
481
  /**
626
- * @member {Boolean} embed_edit_allow_settings
482
+ * When this version was published. Null for the draft.
483
+ * @member {Date} version_published_at
627
484
  */
628
- Template.prototype['embed_edit_allow_settings'] = undefined;
485
+ Template.prototype['version_published_at'] = undefined;
629
486
 
630
487
  /**
631
- * @member {Boolean} embed_edit_allow_versioning
488
+ * A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
489
+ * @member {Boolean} locked
632
490
  */
633
- Template.prototype['embed_edit_allow_versioning'] = undefined;
491
+ Template.prototype['locked'] = undefined;
634
492
 
635
493
  /**
636
- * @member {Boolean} embed_edit_allow_document_replacement
494
+ * Print the submission ID in the footer of each page of PDFs signed through signature requests.
495
+ * @member {Boolean} add_signature_request_submission_id_footers
637
496
  */
638
- Template.prototype['embed_edit_allow_document_replacement'] = undefined;
497
+ Template.prototype['add_signature_request_submission_id_footers'] = undefined;
639
498
 
640
499
  /**
641
- * @member {String} encrypt_pdfs_password
500
+ * 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.
501
+ * @member {module:model/AiFieldNamingLanguage} ai_field_naming_language
642
502
  */
643
- Template.prototype['encrypt_pdfs_password'] = undefined;
503
+ Template.prototype['ai_field_naming_language'] = undefined;
644
504
 
645
505
  /**
646
- * @member {Boolean} encrypt_pdfs
506
+ * Accept submission data with properties that aren't fields of the template.
507
+ * @member {Boolean} allow_additional_properties
647
508
  */
648
- Template.prototype['encrypt_pdfs'] = undefined;
509
+ Template.prototype['allow_additional_properties'] = undefined;
649
510
 
650
511
  /**
651
- * @member {String} expiration_interval
512
+ * 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.
513
+ * @member {Boolean} allow_skipping_optional_fields
652
514
  */
653
- Template.prototype['expiration_interval'] = undefined;
515
+ Template.prototype['allow_skipping_optional_fields'] = undefined;
654
516
 
655
517
  /**
656
- * @member {Number} expire_after
518
+ * 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.
519
+ * @member {module:model/TemplateFormMode} default_form_mode
657
520
  */
658
- Template.prototype['expire_after'] = undefined;
521
+ Template.prototype['default_form_mode'] = undefined;
659
522
 
660
523
  /**
661
- * @member {Boolean} expire_submissions
524
+ * Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it.
525
+ * @member {Boolean} editable_submissions
662
526
  */
663
- Template.prototype['expire_submissions'] = undefined;
527
+ Template.prototype['editable_submissions'] = undefined;
664
528
 
665
529
  /**
666
- * @member {String} external_predefined_fields_template_id
530
+ * 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.
531
+ * @member {Array.<String>} embed_domains
667
532
  */
668
- Template.prototype['external_predefined_fields_template_id'] = undefined;
533
+ Template.prototype['embed_domains'] = undefined;
669
534
 
670
535
  /**
671
- * @member {String} external_predefined_fields_template_name
536
+ * Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on).
537
+ * @member {Boolean} embed_edit_allow_settings
672
538
  */
673
- Template.prototype['external_predefined_fields_template_name'] = undefined;
539
+ Template.prototype['embed_edit_allow_settings'] = undefined;
674
540
 
675
541
  /**
676
- * @member {Boolean} first_template
542
+ * Allow the embedded template editor to publish, restore, compare and delete published versions.
543
+ * @member {Boolean} embed_edit_allow_versioning
677
544
  */
678
- Template.prototype['first_template'] = undefined;
545
+ Template.prototype['embed_edit_allow_versioning'] = undefined;
679
546
 
680
547
  /**
681
- * @member {String} id
548
+ * Allow the embedded template editor to replace the template's PDF.
549
+ * @member {Boolean} embed_edit_allow_document_replacement
682
550
  */
683
- Template.prototype['id'] = undefined;
551
+ Template.prototype['embed_edit_allow_document_replacement'] = undefined;
684
552
 
685
553
  /**
686
- * @member {Boolean} locked
554
+ * Encrypt generated PDFs with `encrypt_pdfs_password`.
555
+ * @member {Boolean} encrypt_pdfs
687
556
  */
688
- Template.prototype['locked'] = undefined;
557
+ Template.prototype['encrypt_pdfs'] = undefined;
689
558
 
690
559
  /**
691
- * @member {Boolean} merge_audit_trail_pdf
560
+ * Whether `encrypt_pdfs_password` is set.
561
+ * @member {Boolean} has_encrypt_pdfs_password
692
562
  */
693
- Template.prototype['merge_audit_trail_pdf'] = undefined;
563
+ Template.prototype['has_encrypt_pdfs_password'] = undefined;
694
564
 
695
565
  /**
696
- * @member {String} name
566
+ * Delete each submission's data and PDF after `expire_after` `expiration_interval`.
567
+ * @member {Boolean} expire_submissions
697
568
  */
698
- Template.prototype['name'] = undefined;
569
+ Template.prototype['expire_submissions'] = undefined;
699
570
 
700
571
  /**
701
- * @member {Number} page_count
572
+ * 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).
573
+ * @member {Number} expire_after
702
574
  */
703
- Template.prototype['page_count'] = undefined;
575
+ Template.prototype['expire_after'] = undefined;
704
576
 
705
577
  /**
706
- * @member {Array.<Array.<Number>>} page_dimensions
578
+ * The unit of `expire_after`.
579
+ * @member {module:model/ExpirationInterval} expiration_interval
707
580
  */
708
- Template.prototype['page_dimensions'] = undefined;
581
+ Template.prototype['expiration_interval'] = undefined;
709
582
 
710
583
  /**
711
- * @member {String} parent_folder_id
584
+ * Add the audit trail to the end of PDFs signed through signature requests.
585
+ * @member {Boolean} merge_audit_trail_pdf
712
586
  */
713
- Template.prototype['parent_folder_id'] = undefined;
587
+ Template.prototype['merge_audit_trail_pdf'] = undefined;
714
588
 
715
589
  /**
590
+ * 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.
716
591
  * @member {Boolean} parse_dates_using_template_date_format
717
592
  */
718
593
  Template.prototype['parse_dates_using_template_date_format'] = undefined;
719
594
 
720
595
  /**
721
- * @member {String} path
722
- */
723
- Template.prototype['path'] = undefined;
724
-
725
- /**
726
- * @member {String} permanent_document_url
727
- */
728
- Template.prototype['permanent_document_url'] = undefined;
729
-
730
- /**
596
+ * Allow anyone with a submission's ID to download its PDF.
731
597
  * @member {Boolean} public_submissions
732
598
  */
733
599
  Template.prototype['public_submissions'] = undefined;
734
600
 
735
601
  /**
602
+ * Allow anyone to fill in the template's web form.
736
603
  * @member {Boolean} public_web_form
737
604
  */
738
605
  Template.prototype['public_web_form'] = undefined;
739
606
 
740
607
  /**
608
+ * Where the web form sends people after they submit it.
741
609
  * @member {String} redirect_url
742
610
  */
743
611
  Template.prototype['redirect_url'] = undefined;
744
612
 
745
613
  /**
746
- * @member {String} slack_webhook_url
747
- */
748
- Template.prototype['slack_webhook_url'] = undefined;
749
-
750
- /**
751
- * @member {module:model/Template.TemplateTypeEnum} template_type
752
- */
753
- Template.prototype['template_type'] = undefined;
754
-
755
- /**
756
- * @member {String} updated_at
757
- */
758
- Template.prototype['updated_at'] = undefined;
759
-
760
- /**
761
- * @member {String} version_published_at
762
- */
763
- Template.prototype['version_published_at'] = undefined;
764
-
765
- /**
766
- * @member {String} version
767
- */
768
- Template.prototype['version'] = undefined;
769
-
770
- /**
771
- * @member {String} webhook_url
614
+ * Whether `slack_webhook_url` is set.
615
+ * @member {Boolean} has_slack_webhook_url
772
616
  */
773
- Template.prototype['webhook_url'] = undefined;
617
+ Template.prototype['has_slack_webhook_url'] = undefined;
774
618
 
775
619
  /**
776
- * @member {String} embed_edit_token
777
- */
778
- Template.prototype['embed_edit_token'] = undefined;
779
-
780
- /**
781
- * @member {Boolean} demo
782
- */
783
- Template.prototype['demo'] = undefined;
784
-
785
- /**
786
- * @member {String} latest_version
787
- */
788
- Template.prototype['latest_version'] = undefined;
789
-
790
- /**
791
- * @member {String} last_changed_at
620
+ * When the draft was last changed.
621
+ * @member {Date} last_changed_at
792
622
  */
793
623
  Template.prototype['last_changed_at'] = undefined;
794
624
 
795
625
  /**
796
- * @member {module:model/Template.LastChangedByTypeEnum} last_changed_by_type
797
- */
798
- Template.prototype['last_changed_by_type'] = undefined;
799
-
800
- /**
801
- * @member {String} last_changed_by_id
626
+ * 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.
627
+ * @member {module:model/TemplateActor} last_changed_by
802
628
  */
803
- Template.prototype['last_changed_by_id'] = undefined;
629
+ Template.prototype['last_changed_by'] = undefined;
804
630
 
805
631
  /**
806
- * @member {String} last_changed_by_external_name
632
+ * When the template was created.
633
+ * @member {Date} created_at
807
634
  */
808
- Template.prototype['last_changed_by_external_name'] = undefined;
635
+ Template.prototype['created_at'] = undefined;
809
636
 
810
637
  /**
811
- * @member {String} last_changed_by_external_email
638
+ * When the template was last updated.
639
+ * @member {Date} updated_at
812
640
  */
813
- Template.prototype['last_changed_by_external_email'] = undefined;
814
-
815
- /**
816
- * @member {String} last_changed_by_external_id
817
- */
818
- Template.prototype['last_changed_by_external_id'] = undefined;
641
+ Template.prototype['updated_at'] = undefined;
819
642
 
820
643
  /**
821
- * @member {Object} defaults
644
+ * @member {module:model/TemplateDefaults} defaults
822
645
  */
823
646
  Template.prototype['defaults'] = undefined;
824
647
 
825
648
  /**
826
- * @member {Array.<Object>} field_dependencies
649
+ * Conditional logic: each rule shows or hides its target fields, or makes them required, depending on the values of other fields.
650
+ * @member {Array.<module:model/TemplateFieldDependency>} field_dependencies
827
651
  */
828
652
  Template.prototype['field_dependencies'] = undefined;
829
653
 
830
654
  /**
831
- * @member {Array.<Array.<Number>>} field_order
832
- */
833
- Template.prototype['field_order'] = undefined;
834
-
835
- /**
836
- * @member {Object} fields
837
- */
838
- Template.prototype['fields'] = undefined;
839
-
840
- /**
841
- * @member {String} footer_html
842
- */
843
- Template.prototype['footer_html'] = undefined;
844
-
845
- /**
846
- * @member {String} header_html
847
- */
848
- Template.prototype['header_html'] = undefined;
849
-
850
- /**
851
- * @member {Object} html_engine_options
852
- */
853
- Template.prototype['html_engine_options'] = undefined;
854
-
855
- /**
655
+ * The HTML of an HTML template, as a Liquid template. Null for PDF templates.
856
656
  * @member {String} html
857
657
  */
858
658
  Template.prototype['html'] = undefined;
859
659
 
860
660
  /**
861
- * @member {Array.<Object>} predefined_fields
862
- */
863
- Template.prototype['predefined_fields'] = undefined;
864
-
865
- /**
661
+ * The SCSS of an HTML template.
866
662
  * @member {String} scss
867
663
  */
868
664
  Template.prototype['scss'] = undefined;
869
665
 
870
666
  /**
871
- * @member {Object} shared_field_data
872
- */
873
- Template.prototype['shared_field_data'] = undefined;
874
-
875
- /**
876
- * @member {Number} template_schema_version
667
+ * The HTML printed at the top of each page of an HTML template.
668
+ * @member {String} header_html
877
669
  */
878
- Template.prototype['template_schema_version'] = undefined;
670
+ Template.prototype['header_html'] = undefined;
879
671
 
880
672
  /**
881
- * @member {Array.<Object>} versions
673
+ * The HTML printed at the bottom of each page of an HTML template.
674
+ * @member {String} footer_html
882
675
  */
883
- Template.prototype['versions'] = undefined;
676
+ Template.prototype['footer_html'] = undefined;
884
677
 
885
678
  /**
886
- * Allowed values for the <code>document_state</code> property.
887
- * @enum {String}
888
- * @readonly
679
+ * How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults.
680
+ * @member {module:model/HtmlEngineOptions} html_engine_options
889
681
  */
890
- Template['DocumentStateEnum'] = {
891
- /**
892
- * value: "pending"
893
- * @const
894
- */
895
- "pending": "pending",
896
- /**
897
- * value: "processed"
898
- * @const
899
- */
900
- "processed": "processed",
901
- /**
902
- * value: "password_required"
903
- * @const
904
- */
905
- "password_required": "password_required",
906
- /**
907
- * value: "malformed_pdf"
908
- * @const
909
- */
910
- "malformed_pdf": "malformed_pdf",
911
- /**
912
- * value: "unknown_error"
913
- * @const
914
- */
915
- "unknown_error": "unknown_error"
916
- };
682
+ Template.prototype['html_engine_options'] = undefined;
917
683
 
918
684
  /**
919
- * Allowed values for the <code>template_type</code> property.
920
- * @enum {String}
921
- * @readonly
685
+ * The token that opens the template in the embedded template editor.
686
+ * @member {String} embed_edit_token
922
687
  */
923
- Template['TemplateTypeEnum'] = {
924
- /**
925
- * value: "pdf"
926
- * @const
927
- */
928
- "pdf": "pdf",
929
- /**
930
- * value: "html"
931
- * @const
932
- */
933
- "html": "html"
934
- };
688
+ Template.prototype['embed_edit_token'] = undefined;
935
689
 
936
690
  /**
937
- * Allowed values for the <code>last_changed_by_type</code> property.
938
- * @enum {String}
939
- * @readonly
691
+ * The template's published versions, newest first (up to 100).
692
+ * @member {Array.<module:model/TemplateVersion>} versions
940
693
  */
941
- Template['LastChangedByTypeEnum'] = {
942
- /**
943
- * value: "user"
944
- * @const
945
- */
946
- "user": "user",
947
- /**
948
- * value: "api"
949
- * @const
950
- */
951
- "api": "api",
952
- /**
953
- * value: "external_user"
954
- * @const
955
- */
956
- "external_user": "external_user"
957
- };
694
+ Template.prototype['versions'] = undefined;
958
695
  var _default = exports["default"] = Template;