docspring 4.4.0 → 4.5.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 (128) hide show
  1. package/AGENTS.md +2 -0
  2. package/LICENSE +1 -1
  3. package/README.md +4 -1
  4. package/dist/ApiClient.js +2 -2
  5. package/dist/RequestSchemas.js +65 -10
  6. package/dist/api/Client.js +101 -98
  7. package/dist/index.js +14 -0
  8. package/dist/model/AddTemplateFieldsRequest.js +1 -1
  9. package/dist/model/AuthenticationCheck.js +1 -1
  10. package/dist/model/CombinedPdf.js +1 -1
  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/CreateAccountEmailActionRequest.js +1 -1
  18. package/dist/model/CreateCombinedPdfRequest.js +1 -1
  19. package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
  20. package/dist/model/CreateEmailActionRequest.js +1 -1
  21. package/dist/model/CreateEmailDomainRequest.js +1 -1
  22. package/dist/model/CreateFolderRequest.js +1 -1
  23. package/dist/model/CreateSignatureRequestEventRequest.js +1 -1
  24. package/dist/model/CreateSignatureRequestTokenRequest.js +1 -1
  25. package/dist/model/CreateSubmissionBatchRequest.js +1 -1
  26. package/dist/model/CreateSubmissionRequest.js +4 -4
  27. package/dist/model/CreateTemplatePreviewRequest.js +1 -1
  28. package/dist/model/CreateTemplateRequest.js +47 -3
  29. package/dist/model/CreateWebhookRequest.js +1 -1
  30. package/dist/model/CustomFile.js +1 -1
  31. package/dist/model/CustomFileList.js +1 -1
  32. package/dist/model/CustomFileSourcePdf.js +1 -1
  33. package/dist/model/EmailAction.js +1 -1
  34. package/dist/model/EmailActionConditions.js +1 -1
  35. package/dist/model/EmailActionConditionsInput.js +1 -1
  36. package/dist/model/EmailActionCustomization.js +1 -1
  37. package/dist/model/EmailActionList.js +1 -1
  38. package/dist/model/EmailActionTestEmail.js +1 -1
  39. package/dist/model/EmailDomain.js +1 -1
  40. package/dist/model/EmailDomainDnsRecord.js +1 -1
  41. package/dist/model/EmailDomainList.js +1 -1
  42. package/dist/model/ErrorDetail.js +1 -1
  43. package/dist/model/ErrorInfo.js +30 -4
  44. package/dist/model/ErrorResponse.js +1 -1
  45. package/dist/model/Field.js +1 -1
  46. package/dist/model/FieldComparisonCondition.js +1 -1
  47. package/dist/model/FieldDependency.js +1 -1
  48. package/dist/model/FieldDependencyInput.js +1 -1
  49. package/dist/model/FieldEqualsCondition.js +1 -1
  50. package/dist/model/FieldGroup.js +1 -1
  51. package/dist/model/FieldGroupInput.js +1 -1
  52. package/dist/model/FieldInCondition.js +1 -1
  53. package/dist/model/FieldInput.js +1 -1
  54. package/dist/model/FieldOverride.js +1 -1
  55. package/dist/model/FieldPresenceCondition.js +1 -1
  56. package/dist/model/FieldRangeCondition.js +1 -1
  57. package/dist/model/Folder.js +1 -1
  58. package/dist/model/FolderList.js +1 -1
  59. package/dist/model/GenerateSubmissionFilesRequest.js +1 -1
  60. package/dist/model/GeneratedFile.js +1 -1
  61. package/dist/model/HtmlEngineOptions.js +7 -7
  62. package/dist/model/HtmlEngineOptionsInput.js +5 -5
  63. package/dist/model/MoveFolderRequest.js +1 -1
  64. package/dist/model/MoveTemplateRequest.js +1 -1
  65. package/dist/model/PageImage.js +1 -1
  66. package/dist/model/PageImages.js +1 -1
  67. package/dist/model/PredefinedField.js +1 -1
  68. package/dist/model/PredefinedFieldInput.js +1 -1
  69. package/dist/model/PublishTemplateVersionRequest.js +1 -1
  70. package/dist/model/RemoveTemplateFieldsRequest.js +1 -1
  71. package/dist/model/RenameFolderRequest.js +1 -1
  72. package/dist/model/ReorderTemplateFieldsRequest.js +1 -1
  73. package/dist/model/RestoreTemplateVersionRequest.js +1 -1
  74. package/dist/model/SendAccountEmailActionTestEmailRequest.js +1 -1
  75. package/dist/model/SignatureRequest.js +1 -1
  76. package/dist/model/SignatureRequestEvent.js +1 -1
  77. package/dist/model/SignatureRequestInput.js +1 -1
  78. package/dist/model/SignatureRequestReminders.js +1 -1
  79. package/dist/model/SignatureRequestToken.js +1 -1
  80. package/dist/model/Submission.js +1 -1
  81. package/dist/model/SubmissionAction.js +1 -1
  82. package/dist/model/SubmissionBatch.js +1 -1
  83. package/dist/model/SubmissionFiles.js +1 -1
  84. package/dist/model/SubmissionInput.js +2 -2
  85. package/dist/model/SubmissionList.js +1 -1
  86. package/dist/model/SubmissionSourcePdf.js +1 -1
  87. package/dist/model/SubmissionSummary.js +1 -1
  88. package/dist/model/SubmissionValidation.js +1 -1
  89. package/dist/model/Template.js +66 -9
  90. package/dist/model/TemplateActor.js +1 -1
  91. package/dist/model/TemplateDefaults.js +1 -1
  92. package/dist/model/TemplateDefaultsInput.js +1 -1
  93. package/dist/model/TemplateDiff.js +1 -1
  94. package/dist/model/TemplateDiffSummary.js +1 -1
  95. package/dist/model/TemplateDocument.js +1 -1
  96. package/dist/model/TemplateDocumentSummary.js +1 -1
  97. package/dist/model/TemplateFieldChange.js +1 -1
  98. package/dist/model/TemplateFieldChanges.js +1 -1
  99. package/dist/model/TemplateFieldDependency.js +1 -1
  100. package/dist/model/TemplateFieldDependencyCondition.js +1 -1
  101. package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
  102. package/dist/model/TemplateFieldDependencyInput.js +1 -1
  103. package/dist/model/TemplateFieldMove.js +1 -1
  104. package/dist/model/TemplateFields.js +1 -1
  105. package/dist/model/TemplateFormSection.js +161 -0
  106. package/dist/model/TemplateFormSectionInput.js +157 -0
  107. package/dist/model/TemplateModelCode.js +1 -1
  108. package/dist/model/TemplatePageImages.js +1 -1
  109. package/dist/model/TemplatePageProcessingStatus.js +1 -1
  110. package/dist/model/TemplatePreview.js +1 -1
  111. package/dist/model/TemplateSourcePdf.js +1 -1
  112. package/dist/model/TemplateSummary.js +1 -1
  113. package/dist/model/TemplateSummaryList.js +1 -1
  114. package/dist/model/TemplateVersion.js +1 -1
  115. package/dist/model/UpdateAccountEmailActionRequest.js +1 -1
  116. package/dist/model/UpdateEmailActionCustomizationRequest.js +1 -1
  117. package/dist/model/UpdateEmailActionRequest.js +1 -1
  118. package/dist/model/UpdateSignatureRequestRequest.js +1 -1
  119. package/dist/model/UpdateTemplateDocumentRequest.js +1 -1
  120. package/dist/model/UpdateTemplateFieldsRequest.js +1 -1
  121. package/dist/model/UpdateTemplateRequest.js +75 -9
  122. package/dist/model/UpdateWebhookRequest.js +1 -1
  123. package/dist/model/UploadPresign.js +1 -1
  124. package/dist/model/UrlSourcePdf.js +1 -1
  125. package/dist/model/ValidateSubmissionRequest.js +4 -4
  126. package/dist/model/Webhook.js +1 -1
  127. package/dist/model/WebhookList.js +1 -1
  128. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -939,6 +939,18 @@ Object.defineProperty(exports, "TemplateFormMode", {
939
939
  return _TemplateFormMode["default"];
940
940
  }
941
941
  });
942
+ Object.defineProperty(exports, "TemplateFormSection", {
943
+ enumerable: true,
944
+ get: function get() {
945
+ return _TemplateFormSection["default"];
946
+ }
947
+ });
948
+ Object.defineProperty(exports, "TemplateFormSectionInput", {
949
+ enumerable: true,
950
+ get: function get() {
951
+ return _TemplateFormSectionInput["default"];
952
+ }
953
+ });
942
954
  Object.defineProperty(exports, "TemplateModelCode", {
943
955
  enumerable: true,
944
956
  get: function get() {
@@ -1318,6 +1330,8 @@ var _TemplateFieldLogicStatus = _interopRequireDefault(require("./model/Template
1318
1330
  var _TemplateFieldMove = _interopRequireDefault(require("./model/TemplateFieldMove"));
1319
1331
  var _TemplateFields = _interopRequireDefault(require("./model/TemplateFields"));
1320
1332
  var _TemplateFormMode = _interopRequireDefault(require("./model/TemplateFormMode"));
1333
+ var _TemplateFormSection = _interopRequireDefault(require("./model/TemplateFormSection"));
1334
+ var _TemplateFormSectionInput = _interopRequireDefault(require("./model/TemplateFormSectionInput"));
1321
1335
  var _TemplateModelCode = _interopRequireDefault(require("./model/TemplateModelCode"));
1322
1336
  var _TemplatePageAiError = _interopRequireDefault(require("./model/TemplatePageAiError"));
1323
1337
  var _TemplatePageAiNamingStatus = _interopRequireDefault(require("./model/TemplatePageAiNamingStatus"));
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The AddTemplateFieldsRequest model module.
32
32
  * @module model/AddTemplateFieldsRequest
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var AddTemplateFieldsRequest = /*#__PURE__*/function () {
36
36
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The AuthenticationCheck model module.
31
31
  * @module model/AuthenticationCheck
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var AuthenticationCheck = /*#__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 CombinedPdf model module.
35
35
  * @module model/CombinedPdf
36
- * @version 4.4.0
36
+ * @version 4.5.0
37
37
  */
38
38
  var CombinedPdf = /*#__PURE__*/function () {
39
39
  /**
@@ -27,7 +27,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
27
27
  /**
28
28
  * The CombinedPdfFiles model module.
29
29
  * @module model/CombinedPdfFiles
30
- * @version 4.4.0
30
+ * @version 4.5.0
31
31
  */
32
32
  var CombinedPdfFiles = /*#__PURE__*/function () {
33
33
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The CombinedPdfList model module.
32
32
  * @module model/CombinedPdfList
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var CombinedPdfList = /*#__PURE__*/function () {
36
36
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The CombinedPdfSource model module.
32
32
  * @module model/CombinedPdfSource
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var CombinedPdfSource = /*#__PURE__*/function () {
36
36
  /**
@@ -33,7 +33,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
33
33
  /**
34
34
  * The CombinedPdfSourceInput model module.
35
35
  * @module model/CombinedPdfSourceInput
36
- * @version 4.4.0
36
+ * @version 4.5.0
37
37
  */
38
38
  var CombinedPdfSourceInput = /*#__PURE__*/function () {
39
39
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The CombinedPdfSourcePdf model module.
31
31
  * @module model/CombinedPdfSourcePdf
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var CombinedPdfSourcePdf = /*#__PURE__*/function () {
35
35
  /**
@@ -26,7 +26,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
26
26
  /**
27
27
  * The CopyTemplateRequest model module.
28
28
  * @module model/CopyTemplateRequest
29
- * @version 4.4.0
29
+ * @version 4.5.0
30
30
  */
31
31
  var CopyTemplateRequest = /*#__PURE__*/function () {
32
32
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The CreateAccountEmailActionRequest model module.
32
32
  * @module model/CreateAccountEmailActionRequest
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var CreateAccountEmailActionRequest = /*#__PURE__*/function () {
36
36
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The CreateCombinedPdfRequest model module.
32
32
  * @module model/CreateCombinedPdfRequest
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var CreateCombinedPdfRequest = /*#__PURE__*/function () {
36
36
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The CreateCustomFileFromUploadRequest model module.
31
31
  * @module model/CreateCustomFileFromUploadRequest
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var CreateCustomFileFromUploadRequest = /*#__PURE__*/function () {
35
35
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The CreateEmailActionRequest model module.
32
32
  * @module model/CreateEmailActionRequest
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var CreateEmailActionRequest = /*#__PURE__*/function () {
36
36
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The CreateEmailDomainRequest model module.
31
31
  * @module model/CreateEmailDomainRequest
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var CreateEmailDomainRequest = /*#__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 CreateFolderRequest model module.
31
31
  * @module model/CreateFolderRequest
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var CreateFolderRequest = /*#__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 CreateSignatureRequestEventRequest model module.
33
33
  * @module model/CreateSignatureRequestEventRequest
34
- * @version 4.4.0
34
+ * @version 4.5.0
35
35
  */
36
36
  var CreateSignatureRequestEventRequest = /*#__PURE__*/function () {
37
37
  /**
@@ -27,7 +27,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
27
27
  /**
28
28
  * The CreateSignatureRequestTokenRequest model module.
29
29
  * @module model/CreateSignatureRequestTokenRequest
30
- * @version 4.4.0
30
+ * @version 4.5.0
31
31
  */
32
32
  var CreateSignatureRequestTokenRequest = /*#__PURE__*/function () {
33
33
  /**
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The CreateSubmissionBatchRequest model module.
33
33
  * @module model/CreateSubmissionBatchRequest
34
- * @version 4.4.0
34
+ * @version 4.5.0
35
35
  */
36
36
  var CreateSubmissionBatchRequest = /*#__PURE__*/function () {
37
37
  /**
@@ -34,7 +34,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
34
34
  /**
35
35
  * The CreateSubmissionRequest model module.
36
36
  * @module model/CreateSubmissionRequest
37
- * @version 4.4.0
37
+ * @version 4.5.0
38
38
  */
39
39
  var CreateSubmissionRequest = /*#__PURE__*/function () {
40
40
  /**
@@ -225,7 +225,7 @@ CreateSubmissionRequest.prototype['test'] = undefined;
225
225
  CreateSubmissionRequest.prototype['editable'] = undefined;
226
226
 
227
227
  /**
228
- * The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only).
228
+ * The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only). Signatures come only from signature requests: a value for a signature or initials field makes the submission `invalid_data`, in test mode too. To print an image or a name you send, use an Image or Text field.
229
229
  * @member {Object.<String, Object>} data
230
230
  */
231
231
  CreateSubmissionRequest.prototype['data'] = undefined;
@@ -255,7 +255,7 @@ CreateSubmissionRequest.prototype['output_formats'] = undefined;
255
255
  CreateSubmissionRequest.prototype['expires_in'] = undefined;
256
256
 
257
257
  /**
258
- * Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`.
258
+ * Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. A `default` for a signature or initials field makes the submission `invalid_data`. With `signature_requests`, `editable: true` is a 422.
259
259
  * @member {Object.<String, module:model/FieldOverride>} field_overrides
260
260
  */
261
261
  CreateSubmissionRequest.prototype['field_overrides'] = undefined;
@@ -273,7 +273,7 @@ CreateSubmissionRequest.prototype['html'] = undefined;
273
273
  CreateSubmissionRequest.prototype['css'] = undefined;
274
274
 
275
275
  /**
276
- * The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out. Only the signers sign: a value for a signature or initials field in `data` makes the submission `invalid_data`.
276
+ * The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out.
277
277
  * @member {Array.<module:model/SignatureRequestInput>} signature_requests
278
278
  */
279
279
  CreateSubmissionRequest.prototype['signature_requests'] = undefined;
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The CreateTemplatePreviewRequest model module.
31
31
  * @module model/CreateTemplatePreviewRequest
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var CreateTemplatePreviewRequest = /*#__PURE__*/function () {
35
35
  /**
@@ -42,7 +42,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
42
42
  /**
43
43
  * The CreateTemplateRequest model module.
44
44
  * @module model/CreateTemplateRequest
45
- * @version 4.4.0
45
+ * @version 4.5.0
46
46
  */
47
47
  var CreateTemplateRequest = /*#__PURE__*/function () {
48
48
  /**
@@ -178,6 +178,15 @@ var CreateTemplateRequest = /*#__PURE__*/function () {
178
178
  if (data.hasOwnProperty('signature_request_signing_url')) {
179
179
  obj['signature_request_signing_url'] = _ApiClient["default"].convertToType(data['signature_request_signing_url'], 'String');
180
180
  }
181
+ if (data.hasOwnProperty('success_title')) {
182
+ obj['success_title'] = _ApiClient["default"].convertToType(data['success_title'], 'String');
183
+ }
184
+ if (data.hasOwnProperty('success_message')) {
185
+ obj['success_message'] = _ApiClient["default"].convertToType(data['success_message'], 'String');
186
+ }
187
+ if (data.hasOwnProperty('show_fill_again_button')) {
188
+ obj['show_fill_again_button'] = _ApiClient["default"].convertToType(data['show_fill_again_button'], 'Boolean');
189
+ }
181
190
  if (data.hasOwnProperty('slack_webhook_url')) {
182
191
  obj['slack_webhook_url'] = _ApiClient["default"].convertToType(data['slack_webhook_url'], 'String');
183
192
  }
@@ -242,6 +251,9 @@ var CreateTemplateRequest = /*#__PURE__*/function () {
242
251
  if (data.hasOwnProperty('field_logic')) {
243
252
  obj['field_logic'] = _ApiClient["default"].convertToType(data['field_logic'], _FieldSetupLogic["default"]);
244
253
  }
254
+ if (data.hasOwnProperty('include_office_use_fields')) {
255
+ obj['include_office_use_fields'] = _ApiClient["default"].convertToType(data['include_office_use_fields'], 'Boolean');
256
+ }
245
257
  }
246
258
  return obj;
247
259
  }
@@ -314,6 +326,14 @@ var CreateTemplateRequest = /*#__PURE__*/function () {
314
326
  throw new Error("Expected the field `signature_request_signing_url` to be a primitive type in the JSON string but got " + data['signature_request_signing_url']);
315
327
  }
316
328
  // ensure the json data is a string
329
+ if (data['success_title'] && !(typeof data['success_title'] === 'string' || data['success_title'] instanceof String)) {
330
+ throw new Error("Expected the field `success_title` to be a primitive type in the JSON string but got " + data['success_title']);
331
+ }
332
+ // ensure the json data is a string
333
+ if (data['success_message'] && !(typeof data['success_message'] === 'string' || data['success_message'] instanceof String)) {
334
+ throw new Error("Expected the field `success_message` to be a primitive type in the JSON string but got " + data['success_message']);
335
+ }
336
+ // ensure the json data is a string
317
337
  if (data['slack_webhook_url'] && !(typeof data['slack_webhook_url'] === 'string' || data['slack_webhook_url'] instanceof String)) {
318
338
  throw new Error("Expected the field `slack_webhook_url` to be a primitive type in the JSON string but got " + data['slack_webhook_url']);
319
339
  }
@@ -480,7 +500,7 @@ CreateTemplateRequest.prototype['default_form_mode'] = undefined;
480
500
  CreateTemplateRequest.prototype['editable_submissions'] = undefined;
481
501
 
482
502
  /**
483
- * The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and the simple form) aren't restricted.
503
+ * The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Each one is stored in lowercase, without a trailing slash. 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 Web Forms JS) aren't restricted.
484
504
  * @member {Array.<String>} embed_domains
485
505
  */
486
506
  CreateTemplateRequest.prototype['embed_domains'] = undefined;
@@ -558,7 +578,7 @@ CreateTemplateRequest.prototype['public_submissions'] = undefined;
558
578
  CreateTemplateRequest.prototype['public_web_form'] = undefined;
559
579
 
560
580
  /**
561
- * Where the web form sends people after they submit it.
581
+ * Where the web form sends people after they submit it, instead of showing its success screen. After its `?` or `#`, it can have variables such as `{{ data.first_name }}`, which the form fills in with what they submitted.
562
582
  * @member {String} redirect_url
563
583
  */
564
584
  CreateTemplateRequest.prototype['redirect_url'] = undefined;
@@ -605,6 +625,24 @@ CreateTemplateRequest.prototype['signature_request_reply_to'] = undefined;
605
625
  */
606
626
  CreateTemplateRequest.prototype['signature_request_signing_url'] = undefined;
607
627
 
628
+ /**
629
+ * The title of the web form's success screen. When it's null or empty, the screen says "Thanks for filling out" and the template's name. It can have variables such as `{{ data.first_name }}`.
630
+ * @member {String} success_title
631
+ */
632
+ CreateTemplateRequest.prototype['success_title'] = undefined;
633
+
634
+ /**
635
+ * A message under the title of the web form's success screen, as plain text. Line breaks show, and web addresses become links. It can have variables such as `{{ data.first_name }}`.
636
+ * @member {String} success_message
637
+ */
638
+ CreateTemplateRequest.prototype['success_message'] = undefined;
639
+
640
+ /**
641
+ * Whether the web form's success screen has a "Fill out again" button, which clears the form so someone can fill it in again.
642
+ * @member {Boolean} show_fill_again_button
643
+ */
644
+ CreateTemplateRequest.prototype['show_fill_again_button'] = undefined;
645
+
608
646
  /**
609
647
  * A Slack incoming webhook URL that is notified about the template's submissions. It's never returned; `has_slack_webhook_url` says if it's set.
610
648
  * @member {String} slack_webhook_url
@@ -724,4 +762,10 @@ CreateTemplateRequest.prototype['field_naming'] = undefined;
724
762
  * @member {module:model/FieldSetupLogic} field_logic
725
763
  */
726
764
  CreateTemplateRequest.prototype['field_logic'] = undefined;
765
+
766
+ /**
767
+ * With `detect_fields`, whether AI field setup keeps the fields that only the office receiving the form fills in, such as a "For office use only" box (`true`), or leaves them out (`false`). Default: your account's template settings.
768
+ * @member {Boolean} include_office_use_fields
769
+ */
770
+ CreateTemplateRequest.prototype['include_office_use_fields'] = undefined;
727
771
  var _default = exports["default"] = CreateTemplateRequest;
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The CreateWebhookRequest model module.
33
33
  * @module model/CreateWebhookRequest
34
- * @version 4.4.0
34
+ * @version 4.5.0
35
35
  */
36
36
  var CreateWebhookRequest = /*#__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 CustomFile model module.
31
31
  * @module model/CustomFile
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var CustomFile = /*#__PURE__*/function () {
35
35
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The CustomFileList model module.
32
32
  * @module model/CustomFileList
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var CustomFileList = /*#__PURE__*/function () {
36
36
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The CustomFileSourcePdf model module.
31
31
  * @module model/CustomFileSourcePdf
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var CustomFileSourcePdf = /*#__PURE__*/function () {
35
35
  /**
@@ -34,7 +34,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
34
34
  /**
35
35
  * The EmailAction model module.
36
36
  * @module model/EmailAction
37
- * @version 4.4.0
37
+ * @version 4.5.0
38
38
  */
39
39
  var EmailAction = /*#__PURE__*/function () {
40
40
  /**
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The EmailActionConditions model module.
33
33
  * @module model/EmailActionConditions
34
- * @version 4.4.0
34
+ * @version 4.5.0
35
35
  */
36
36
  var EmailActionConditions = /*#__PURE__*/function () {
37
37
  /**
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The EmailActionConditionsInput model module.
33
33
  * @module model/EmailActionConditionsInput
34
- * @version 4.4.0
34
+ * @version 4.5.0
35
35
  */
36
36
  var EmailActionConditionsInput = /*#__PURE__*/function () {
37
37
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The EmailActionCustomization model module.
32
32
  * @module model/EmailActionCustomization
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var EmailActionCustomization = /*#__PURE__*/function () {
36
36
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The EmailActionList model module.
32
32
  * @module model/EmailActionList
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var EmailActionList = /*#__PURE__*/function () {
36
36
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The EmailActionTestEmail model module.
31
31
  * @module model/EmailActionTestEmail
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var EmailActionTestEmail = /*#__PURE__*/function () {
35
35
  /**
@@ -32,7 +32,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
32
32
  /**
33
33
  * The EmailDomain model module.
34
34
  * @module model/EmailDomain
35
- * @version 4.4.0
35
+ * @version 4.5.0
36
36
  */
37
37
  var EmailDomain = /*#__PURE__*/function () {
38
38
  /**
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The EmailDomainDnsRecord model module.
33
33
  * @module model/EmailDomainDnsRecord
34
- * @version 4.4.0
34
+ * @version 4.5.0
35
35
  */
36
36
  var EmailDomainDnsRecord = /*#__PURE__*/function () {
37
37
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The EmailDomainList model module.
32
32
  * @module model/EmailDomainList
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var EmailDomainList = /*#__PURE__*/function () {
36
36
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The ErrorDetail model module.
31
31
  * @module model/ErrorDetail
32
- * @version 4.4.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var ErrorDetail = /*#__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 ErrorInfo model module.
33
33
  * @module model/ErrorInfo
34
- * @version 4.4.0
34
+ * @version 4.5.0
35
35
  */
36
36
  var ErrorInfo = /*#__PURE__*/function () {
37
37
  /**
@@ -39,7 +39,7 @@ var ErrorInfo = /*#__PURE__*/function () {
39
39
  * What went wrong.
40
40
  * @alias module:model/ErrorInfo
41
41
  * @extends Object
42
- * @param code {module:model/ErrorCode} A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `insufficient_credits_to_send` (402): your credit balance can't cover a live signature request that DocSpring would email, so nothing was saved. Add credits and send the request again. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count), the embedded template editor, email actions, or live signature requests before your account's first payment. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): the first request with the same Idempotency-Key is still being processed, and the response has a `Retry-After` header: send the request again then. Without the header, the first request was processed but its response is no longer kept. When the first request created a record, its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id`, `template_id`, `folder_id`, `custom_file_id` or `webhook_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. `rate_limited` (429): too many API requests. Wait for the `Retry-After` header's seconds. `daily_email_limit_reached` (429): a submission that DocSpring would email would take your account over its daily email limit, so nothing was saved. Send it again after the `Retry-After` header's seconds (midnight UTC), or send the signing links yourself (`send_email: false`).
42
+ * @param code {module:model/ErrorCode} A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `insufficient_credits_to_send` (402): your credit balance can't cover a live signature request that DocSpring would email, so nothing was saved. Add credits and send the request again. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count), the embedded template editor, email actions, or live signature requests before your account's first payment. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): the first request with the same Idempotency-Key is still being processed, and the response has a `Retry-After` header: send the request again then. Without the header, the first request was processed but its response is no longer kept, or it failed after creating or changing a record, and the message says which. When the first request created a record, or changed a template's fields or published a version of it, the message names it, and its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id`, `template_id`, `folder_id`, `custom_file_id`, `webhook_id`, `email_action_id` or `email_domain_id` (a signature request's events and tokens have no member). `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. `rate_limited` (429): too many API requests. Wait for the `Retry-After` header's seconds. `daily_email_limit_reached` (429): a submission that DocSpring would email would take your account over its daily email limit, so nothing was saved. Send it again after the `Retry-After` header's seconds (midnight UTC), or send the signing links yourself (`send_email: false`).
43
43
  * @param message {String} A human-readable explanation, safe to show to developers.
44
44
  * @param details {Array.<module:model/ErrorDetail>} What was wrong with each part of the request. Empty when the error isn't about one part of it.
45
45
  * @param request_id {String} The ID of the request. Include it when you contact support.
@@ -109,6 +109,12 @@ var ErrorInfo = /*#__PURE__*/function () {
109
109
  if (data.hasOwnProperty('webhook_id')) {
110
110
  obj['webhook_id'] = _ApiClient["default"].convertToType(data['webhook_id'], 'String');
111
111
  }
112
+ if (data.hasOwnProperty('email_action_id')) {
113
+ obj['email_action_id'] = _ApiClient["default"].convertToType(data['email_action_id'], 'String');
114
+ }
115
+ if (data.hasOwnProperty('email_domain_id')) {
116
+ obj['email_domain_id'] = _ApiClient["default"].convertToType(data['email_domain_id'], 'String');
117
+ }
112
118
  }
113
119
  return obj;
114
120
  }
@@ -176,6 +182,14 @@ var ErrorInfo = /*#__PURE__*/function () {
176
182
  if (data['webhook_id'] && !(typeof data['webhook_id'] === 'string' || data['webhook_id'] instanceof String)) {
177
183
  throw new Error("Expected the field `webhook_id` to be a primitive type in the JSON string but got " + data['webhook_id']);
178
184
  }
185
+ // ensure the json data is a string
186
+ if (data['email_action_id'] && !(typeof data['email_action_id'] === 'string' || data['email_action_id'] instanceof String)) {
187
+ throw new Error("Expected the field `email_action_id` to be a primitive type in the JSON string but got " + data['email_action_id']);
188
+ }
189
+ // ensure the json data is a string
190
+ if (data['email_domain_id'] && !(typeof data['email_domain_id'] === 'string' || data['email_domain_id'] instanceof String)) {
191
+ throw new Error("Expected the field `email_domain_id` to be a primitive type in the JSON string but got " + data['email_domain_id']);
192
+ }
179
193
  return true;
180
194
  }
181
195
  }]);
@@ -183,7 +197,7 @@ var ErrorInfo = /*#__PURE__*/function () {
183
197
  ErrorInfo.RequiredProperties = ["code", "message", "details", "request_id"];
184
198
 
185
199
  /**
186
- * A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `insufficient_credits_to_send` (402): your credit balance can't cover a live signature request that DocSpring would email, so nothing was saved. Add credits and send the request again. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count), the embedded template editor, email actions, or live signature requests before your account's first payment. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): the first request with the same Idempotency-Key is still being processed, and the response has a `Retry-After` header: send the request again then. Without the header, the first request was processed but its response is no longer kept. When the first request created a record, its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id`, `template_id`, `folder_id`, `custom_file_id` or `webhook_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. `rate_limited` (429): too many API requests. Wait for the `Retry-After` header's seconds. `daily_email_limit_reached` (429): a submission that DocSpring would email would take your account over its daily email limit, so nothing was saved. Send it again after the `Retry-After` header's seconds (midnight UTC), or send the signing links yourself (`send_email: false`).
200
+ * A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `insufficient_credits_to_send` (402): your credit balance can't cover a live signature request that DocSpring would email, so nothing was saved. Add credits and send the request again. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count), the embedded template editor, email actions, or live signature requests before your account's first payment. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): the first request with the same Idempotency-Key is still being processed, and the response has a `Retry-After` header: send the request again then. Without the header, the first request was processed but its response is no longer kept, or it failed after creating or changing a record, and the message says which. When the first request created a record, or changed a template's fields or published a version of it, the message names it, and its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id`, `template_id`, `folder_id`, `custom_file_id`, `webhook_id`, `email_action_id` or `email_domain_id` (a signature request's events and tokens have no member). `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. `rate_limited` (429): too many API requests. Wait for the `Retry-After` header's seconds. `daily_email_limit_reached` (429): a submission that DocSpring would email would take your account over its daily email limit, so nothing was saved. Send it again after the `Retry-After` header's seconds (midnight UTC), or send the signing links yourself (`send_email: false`).
187
201
  * @member {module:model/ErrorCode} code
188
202
  */
189
203
  ErrorInfo.prototype['code'] = undefined;
@@ -225,7 +239,7 @@ ErrorInfo.prototype['submission_batch_id'] = undefined;
225
239
  ErrorInfo.prototype['combined_pdf_id'] = undefined;
226
240
 
227
241
  /**
228
- * With `polling_timeout`, the template whose PDF is still being processed. With `idempotency_key_in_use`, the template the first request with the key created.
242
+ * With `polling_timeout`, the template whose PDF is still being processed. With `idempotency_key_in_use`, the template the first request with the key created, or whose fields it changed or whose version it published.
229
243
  * @member {String} template_id
230
244
  */
231
245
  ErrorInfo.prototype['template_id'] = undefined;
@@ -247,4 +261,16 @@ ErrorInfo.prototype['custom_file_id'] = undefined;
247
261
  * @member {String} webhook_id
248
262
  */
249
263
  ErrorInfo.prototype['webhook_id'] = undefined;
264
+
265
+ /**
266
+ * With `idempotency_key_in_use`, the email action the first request with the key created.
267
+ * @member {String} email_action_id
268
+ */
269
+ ErrorInfo.prototype['email_action_id'] = undefined;
270
+
271
+ /**
272
+ * With `idempotency_key_in_use`, the email domain the first request with the key created.
273
+ * @member {String} email_domain_id
274
+ */
275
+ ErrorInfo.prototype['email_domain_id'] = undefined;
250
276
  var _default = exports["default"] = ErrorInfo;
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The ErrorResponse model module.
32
32
  * @module model/ErrorResponse
33
- * @version 4.4.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var ErrorResponse = /*#__PURE__*/function () {
36
36
  /**
@@ -44,7 +44,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
44
44
  /**
45
45
  * The Field model module.
46
46
  * @module model/Field
47
- * @version 4.4.0
47
+ * @version 4.5.0
48
48
  */
49
49
  var Field = /*#__PURE__*/function () {
50
50
  /**