docspring 4.1.0 → 4.3.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 (169) hide show
  1. package/AGENTS.md +5 -4
  2. package/README.md +10 -6
  3. package/dist/ApiClient.js +3 -3
  4. package/dist/RequestSchemas.js +94 -15
  5. package/dist/WebhookSignature.js +86 -0
  6. package/dist/api/Client.js +193 -57
  7. package/dist/index.js +42 -0
  8. package/dist/model/AddTemplateFieldsRequest.js +2 -2
  9. package/dist/model/AiFieldNamingLanguage.js +1 -1
  10. package/dist/model/AuthenticationCheck.js +2 -2
  11. package/dist/model/BarcodeSymbology.js +1 -1
  12. package/dist/model/CheckCharacter.js +1 -1
  13. package/dist/model/CombinedFieldType.js +1 -1
  14. package/dist/model/CombinedPdf.js +4 -4
  15. package/dist/model/CombinedPdfFiles.js +2 -2
  16. package/dist/model/CombinedPdfList.js +2 -2
  17. package/dist/model/CombinedPdfSource.js +2 -2
  18. package/dist/model/CombinedPdfSourceInput.js +2 -2
  19. package/dist/model/CombinedPdfSourcePdf.js +2 -2
  20. package/dist/model/CombinedPdfSourceType.js +1 -1
  21. package/dist/model/CombinedPdfState.js +1 -1
  22. package/dist/model/CopyTemplateRequest.js +2 -2
  23. package/dist/model/CreateCombinedPdfRequest.js +3 -3
  24. package/dist/model/CreateCustomFileFromUploadRequest.js +2 -2
  25. package/dist/model/CreateFolderRequest.js +2 -2
  26. package/dist/model/CreateSignatureRequestEventRequest.js +2 -2
  27. package/dist/model/CreateSignatureRequestTokenRequest.js +2 -2
  28. package/dist/model/CreateSubmissionBatchRequest.js +2 -2
  29. package/dist/model/CreateSubmissionRequest.js +7 -7
  30. package/dist/model/CreateTemplatePreviewRequest.js +112 -0
  31. package/dist/model/CreateTemplateRequest.js +32 -13
  32. package/dist/model/CreateWebhookRequest.js +2 -2
  33. package/dist/model/CustomFile.js +2 -2
  34. package/dist/model/CustomFileList.js +2 -2
  35. package/dist/model/CustomFileSourcePdf.js +2 -2
  36. package/dist/model/ErrorCode.js +12 -2
  37. package/dist/model/ErrorDetail.js +3 -3
  38. package/dist/model/ErrorInfo.js +7 -7
  39. package/dist/model/ErrorResponse.js +2 -2
  40. package/dist/model/ExpirationInterval.js +1 -1
  41. package/dist/model/Field.js +3 -3
  42. package/dist/model/FieldComparisonCondition.js +2 -2
  43. package/dist/model/FieldComparisonOperator.js +1 -1
  44. package/dist/model/FieldDependency.js +2 -2
  45. package/dist/model/FieldDependencyInput.js +2 -2
  46. package/dist/model/FieldDisplayType.js +1 -1
  47. package/dist/model/FieldEqualsCondition.js +2 -2
  48. package/dist/model/FieldEqualsOperator.js +1 -1
  49. package/dist/model/FieldGroup.js +6 -6
  50. package/dist/model/FieldGroupInput.js +3 -3
  51. package/dist/model/FieldGroupType.js +1 -1
  52. package/dist/model/FieldInCondition.js +2 -2
  53. package/dist/model/FieldInput.js +3 -3
  54. package/dist/model/FieldOverride.js +2 -2
  55. package/dist/model/FieldPresenceCondition.js +2 -2
  56. package/dist/model/FieldPresenceOperator.js +1 -1
  57. package/dist/model/FieldRangeCondition.js +2 -2
  58. package/dist/model/FieldReimportState.js +1 -1
  59. package/dist/model/FieldSetupLogic.js +1 -1
  60. package/dist/model/FieldSetupNaming.js +1 -1
  61. package/dist/model/FieldSetupSource.js +1 -1
  62. package/dist/model/FieldType.js +1 -1
  63. package/dist/model/Folder.js +2 -2
  64. package/dist/model/FolderList.js +2 -2
  65. package/dist/model/GenerateFilesFormat.js +16 -1
  66. package/dist/model/GenerateSubmissionFilesRequest.js +4 -4
  67. package/dist/model/GeneratedFile.js +7 -7
  68. package/dist/model/GeneratedFileState.js +1 -1
  69. package/dist/model/HtmlEngineOptions.js +2 -2
  70. package/dist/model/HtmlEngineOptionsInput.js +2 -2
  71. package/dist/model/ImageGravity.js +1 -1
  72. package/dist/model/ImageScaleType.js +1 -1
  73. package/dist/model/ModelCodeLanguage.js +7 -2
  74. package/dist/model/MoveFolderRequest.js +2 -2
  75. package/dist/model/MoveTemplateRequest.js +2 -2
  76. package/dist/model/NumberConditionType.js +1 -1
  77. package/dist/model/OutputFormat.js +11 -1
  78. package/dist/model/PageFormat.js +1 -1
  79. package/dist/model/PageImage.js +2 -2
  80. package/dist/model/PageImages.js +2 -2
  81. package/dist/model/PredefinedField.js +2 -2
  82. package/dist/model/PredefinedFieldInput.js +2 -2
  83. package/dist/model/PublishTemplateVersionRequest.js +2 -2
  84. package/dist/model/RemoveTemplateFieldsRequest.js +2 -2
  85. package/dist/model/RenameFolderRequest.js +2 -2
  86. package/dist/model/ReorderTemplateFieldsRequest.js +2 -2
  87. package/dist/model/RestoreTemplateVersionRequest.js +2 -2
  88. package/dist/model/ShapeType.js +1 -1
  89. package/dist/model/SignatureRequest.js +2 -2
  90. package/dist/model/SignatureRequestAuthSecondFactorType.js +1 -1
  91. package/dist/model/SignatureRequestAuthType.js +1 -1
  92. package/dist/model/SignatureRequestEvent.js +2 -2
  93. package/dist/model/SignatureRequestEventType.js +1 -1
  94. package/dist/model/SignatureRequestInput.js +2 -2
  95. package/dist/model/SignatureRequestMessageType.js +1 -1
  96. package/dist/model/SignatureRequestState.js +1 -1
  97. package/dist/model/SignatureRequestToken.js +2 -2
  98. package/dist/model/SignatureRequestTokenType.js +1 -1
  99. package/dist/model/StringConditionType.js +1 -1
  100. package/dist/model/Submission.js +82 -82
  101. package/dist/model/SubmissionAction.js +2 -2
  102. package/dist/model/SubmissionActionState.js +1 -1
  103. package/dist/model/SubmissionActionType.js +1 -1
  104. package/dist/model/SubmissionBatch.js +9 -9
  105. package/dist/model/SubmissionBatchState.js +1 -1
  106. package/dist/model/SubmissionFiles.js +20 -2
  107. package/dist/model/SubmissionInput.js +7 -7
  108. package/dist/model/SubmissionList.js +6 -6
  109. package/dist/model/SubmissionSource.js +1 -1
  110. package/dist/model/SubmissionSourcePdf.js +2 -2
  111. package/dist/model/SubmissionState.js +1 -1
  112. package/dist/model/SubmissionSummary.js +343 -0
  113. package/dist/model/SubmissionValidation.js +2 -2
  114. package/dist/model/Template.js +95 -72
  115. package/dist/model/TemplateActor.js +4 -4
  116. package/dist/model/TemplateActorType.js +1 -1
  117. package/dist/model/TemplateDefaults.js +2 -2
  118. package/dist/model/TemplateDefaultsInput.js +2 -2
  119. package/dist/model/TemplateDiff.js +6 -6
  120. package/dist/model/TemplateDiffSummary.js +2 -2
  121. package/dist/model/TemplateDocument.js +49 -49
  122. package/dist/model/TemplateDocumentState.js +12 -2
  123. package/dist/model/TemplateDocumentSummary.js +152 -0
  124. package/dist/model/TemplateFieldChange.js +2 -2
  125. package/dist/model/TemplateFieldChanges.js +2 -2
  126. package/dist/model/TemplateFieldDependency.js +2 -2
  127. package/dist/model/TemplateFieldDependencyAction.js +1 -1
  128. package/dist/model/TemplateFieldDependencyCondition.js +2 -2
  129. package/dist/model/TemplateFieldDependencyConditionInput.js +2 -2
  130. package/dist/model/TemplateFieldDependencyInput.js +2 -2
  131. package/dist/model/TemplateFieldDependencyMatch.js +1 -1
  132. package/dist/model/TemplateFieldDependencyOperator.js +1 -1
  133. package/dist/model/TemplateFieldLogicStatus.js +1 -1
  134. package/dist/model/TemplateFieldMove.js +2 -2
  135. package/dist/model/TemplateFields.js +2 -2
  136. package/dist/model/TemplateFormMode.js +1 -1
  137. package/dist/model/TemplateModelCode.js +2 -2
  138. package/dist/model/TemplatePageAiError.js +1 -1
  139. package/dist/model/TemplatePageAiNamingStatus.js +1 -1
  140. package/dist/model/TemplatePageFieldsStatus.js +1 -1
  141. package/dist/model/TemplatePageImageStatus.js +1 -1
  142. package/dist/model/TemplatePageImages.js +2 -2
  143. package/dist/model/TemplatePageProcessingStatus.js +2 -2
  144. package/dist/model/TemplatePreview.js +211 -0
  145. package/dist/model/TemplatePreviewState.js +64 -0
  146. package/dist/model/TemplateSourcePdf.js +2 -2
  147. package/dist/model/TemplateSummary.js +29 -291
  148. package/dist/model/TemplateSummaryList.js +2 -2
  149. package/dist/model/TemplateType.js +7 -2
  150. package/dist/model/TemplateVersion.js +2 -2
  151. package/dist/model/TemplateVersionType.js +1 -1
  152. package/dist/model/TextAlignment.js +1 -1
  153. package/dist/model/TextOverflow.js +1 -1
  154. package/dist/model/TextVerticalAlignment.js +1 -1
  155. package/dist/model/Typeface.js +1 -1
  156. package/dist/model/UpdateSignatureRequestRequest.js +2 -2
  157. package/dist/model/UpdateTemplateDocumentRequest.js +8 -8
  158. package/dist/model/UpdateTemplateFieldsRequest.js +2 -2
  159. package/dist/model/UpdateTemplateRequest.js +26 -7
  160. package/dist/model/UpdateWebhookRequest.js +2 -2
  161. package/dist/model/UploadMethod.js +1 -1
  162. package/dist/model/UploadPresign.js +2 -2
  163. package/dist/model/UrlSourcePdf.js +2 -2
  164. package/dist/model/ValidateSubmissionRequest.js +7 -7
  165. package/dist/model/Webhook.js +2 -2
  166. package/dist/model/WebhookEventType.js +1 -1
  167. package/dist/model/WebhookList.js +2 -2
  168. package/dist/model/WebhookMode.js +1 -1
  169. package/package.json +4 -3
@@ -24,7 +24,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
24
24
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
25
25
  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); } /**
26
26
  * DocSpring API
27
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
27
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
28
28
  *
29
29
  * The version of the OpenAPI document: v2
30
30
  *
@@ -37,43 +37,43 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
37
37
  /**
38
38
  * The Submission model module.
39
39
  * @module model/Submission
40
- * @version 4.1.0
40
+ * @version 4.3.0
41
41
  */
42
42
  var Submission = /*#__PURE__*/function () {
43
43
  /**
44
44
  * Constructs a new <code>Submission</code>.
45
- * Data submitted to a template, and the PDF generated from it.
45
+ * Data submitted to a template, and the files generated from it (a PDF, a Word document, an OpenDocument file, or more than one of them).
46
46
  * @alias module:model/Submission
47
47
  * @extends Object
48
48
  * @param id {String} The submission's ID.
49
49
  * @param template_id {String} Null once the template has been permanently deleted.
50
- * @param template_type {module:model/TemplateType} The template's type: `pdf` or `html`.
50
+ * @param template_type {module:model/TemplateType} The template's type: `pdf`, `html` or `docx`.
51
51
  * @param template_version {String} The published version of the template the submission used. Null for the draft.
52
52
  * @param batch_id {String} The ID of the batch the submission was created in.
53
53
  * @param source {module:model/SubmissionSource} `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again.
54
- * @param state {module:model/SubmissionState} `pending` until the PDF has been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no PDF: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the PDF failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`.
54
+ * @param state {module:model/SubmissionState} `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no files: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`.
55
55
  * @param test {Boolean} Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
56
56
  * @param editable {Boolean} `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`.
57
- * @param data {Object.<String, Object>} The submission's data, with the values entered in completed signature requests. Lists leave it out (null) unless you pass `include_data=true`. Empty once the submission has expired.
57
+ * @param data {Object.<String, Object>} The submission's data, with the values entered in completed signature requests. Empty once the submission has expired. Null in a batch's submissions unless you pass `include_data=true`, and in the events of a webhook that leaves out submission data.
58
58
  * @param data_errors {Array.<module:model/ErrorDetail>} Why the data doesn't match the template's fields, when `state` is `invalid_data`: the same details as the 422 response that recorded it, with pointers into the request that created the submission (`/data/name`). Cleared once the submission has expired.
59
59
  * @param error_message {String} Why the PDF couldn't be generated, when `state` is `error`.
60
- * @param metadata {Object.<String, Object>} Your own data about the submission, such as an ID from your app. It isn't printed on the PDF.
61
- * @param has_password {Boolean} Whether the PDF needs a password to open (`password`).
62
- * @param signature_requests {Array.<module:model/SignatureRequest>} The people asked to sign the submission (and fill in their fields), in order.
63
- * @param actions {Array.<module:model/SubmissionAction>} The uploads of the submission's PDF to your storage (account integrations).
64
- * @param truncated_text {Object.<String, Array.<String>>} The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired.
65
- * @param output_formats {Array.<module:model/OutputFormat>} What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
66
- * @param files {module:model/SubmissionFiles} The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
67
- * @param preview_generated_at {Date} When the preview PDF was generated. Null if there is no preview.
60
+ * @param metadata {Object.<String, Object>} Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`).
61
+ * @param files {module:model/SubmissionFiles} The generated files: `pdf`, `docx` and `odt` (by `output_formats`) once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
68
62
  * @param expired {Boolean} An expired submission's data, metadata, password and PDF have been deleted.
69
63
  * @param expires_at {Date} When the submission expires. Null if it's kept until you delete it.
70
64
  * @param processed_at {Date} When the PDF was generated. Null until then.
71
65
  * @param created_at {Date} When the submission was created.
72
66
  * @param updated_at {Date} When the submission was last updated.
67
+ * @param has_password {Boolean} Whether the PDF needs a password to open (`password`).
68
+ * @param signature_requests {Array.<module:model/SignatureRequest>} The people asked to sign the submission (and fill in their fields), in order.
69
+ * @param actions {Array.<module:model/SubmissionAction>} The uploads of the submission's PDF to your storage (account integrations).
70
+ * @param truncated_text {Object.<String, Array.<String>>} The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired.
71
+ * @param output_formats {Array.<module:model/OutputFormat>} What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission.
72
+ * @param preview_generated_at {Date} When the preview PDF was generated. Null if there is no preview.
73
73
  */
74
- function Submission(id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, output_formats, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at) {
74
+ function Submission(id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, files, expired, expires_at, processed_at, created_at, updated_at, has_password, signature_requests, actions, truncated_text, output_formats, preview_generated_at) {
75
75
  _classCallCheck(this, Submission);
76
- Submission.initialize(this, id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, output_formats, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at);
76
+ Submission.initialize(this, id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, files, expired, expires_at, processed_at, created_at, updated_at, has_password, signature_requests, actions, truncated_text, output_formats, preview_generated_at);
77
77
  }
78
78
 
79
79
  /**
@@ -83,7 +83,7 @@ var Submission = /*#__PURE__*/function () {
83
83
  */
84
84
  return _createClass(Submission, null, [{
85
85
  key: "initialize",
86
- value: function initialize(obj, id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, output_formats, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at) {
86
+ value: function initialize(obj, id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, files, expired, expires_at, processed_at, created_at, updated_at, has_password, signature_requests, actions, truncated_text, output_formats, preview_generated_at) {
87
87
  obj['id'] = id;
88
88
  obj['template_id'] = template_id;
89
89
  obj['template_type'] = template_type;
@@ -97,18 +97,18 @@ var Submission = /*#__PURE__*/function () {
97
97
  obj['data_errors'] = data_errors;
98
98
  obj['error_message'] = error_message;
99
99
  obj['metadata'] = metadata;
100
- obj['has_password'] = has_password;
101
- obj['signature_requests'] = signature_requests;
102
- obj['actions'] = actions;
103
- obj['truncated_text'] = truncated_text;
104
- obj['output_formats'] = output_formats;
105
100
  obj['files'] = files;
106
- obj['preview_generated_at'] = preview_generated_at;
107
101
  obj['expired'] = expired;
108
102
  obj['expires_at'] = expires_at;
109
103
  obj['processed_at'] = processed_at;
110
104
  obj['created_at'] = created_at;
111
105
  obj['updated_at'] = updated_at;
106
+ obj['has_password'] = has_password;
107
+ obj['signature_requests'] = signature_requests;
108
+ obj['actions'] = actions;
109
+ obj['truncated_text'] = truncated_text;
110
+ obj['output_formats'] = output_formats;
111
+ obj['preview_generated_at'] = preview_generated_at;
112
112
  }
113
113
 
114
114
  /**
@@ -167,6 +167,24 @@ var Submission = /*#__PURE__*/function () {
167
167
  'String': Object
168
168
  });
169
169
  }
170
+ if (data.hasOwnProperty('files')) {
171
+ obj['files'] = _ApiClient["default"].convertToType(data['files'], _SubmissionFiles["default"]);
172
+ }
173
+ if (data.hasOwnProperty('expired')) {
174
+ obj['expired'] = _ApiClient["default"].convertToType(data['expired'], 'Boolean');
175
+ }
176
+ if (data.hasOwnProperty('expires_at')) {
177
+ obj['expires_at'] = _ApiClient["default"].convertToType(data['expires_at'], 'Date');
178
+ }
179
+ if (data.hasOwnProperty('processed_at')) {
180
+ obj['processed_at'] = _ApiClient["default"].convertToType(data['processed_at'], 'Date');
181
+ }
182
+ if (data.hasOwnProperty('created_at')) {
183
+ obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
184
+ }
185
+ if (data.hasOwnProperty('updated_at')) {
186
+ obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
187
+ }
170
188
  if (data.hasOwnProperty('has_password')) {
171
189
  obj['has_password'] = _ApiClient["default"].convertToType(data['has_password'], 'Boolean');
172
190
  }
@@ -184,27 +202,9 @@ var Submission = /*#__PURE__*/function () {
184
202
  if (data.hasOwnProperty('output_formats')) {
185
203
  obj['output_formats'] = _ApiClient["default"].convertToType(data['output_formats'], [_OutputFormat["default"]]);
186
204
  }
187
- if (data.hasOwnProperty('files')) {
188
- obj['files'] = _ApiClient["default"].convertToType(data['files'], _SubmissionFiles["default"]);
189
- }
190
205
  if (data.hasOwnProperty('preview_generated_at')) {
191
206
  obj['preview_generated_at'] = _ApiClient["default"].convertToType(data['preview_generated_at'], 'Date');
192
207
  }
193
- if (data.hasOwnProperty('expired')) {
194
- obj['expired'] = _ApiClient["default"].convertToType(data['expired'], 'Boolean');
195
- }
196
- if (data.hasOwnProperty('expires_at')) {
197
- obj['expires_at'] = _ApiClient["default"].convertToType(data['expires_at'], 'Date');
198
- }
199
- if (data.hasOwnProperty('processed_at')) {
200
- obj['processed_at'] = _ApiClient["default"].convertToType(data['processed_at'], 'Date');
201
- }
202
- if (data.hasOwnProperty('created_at')) {
203
- obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
204
- }
205
- if (data.hasOwnProperty('updated_at')) {
206
- obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
207
- }
208
208
  }
209
209
  return obj;
210
210
  }
@@ -272,7 +272,7 @@ var Submission = /*#__PURE__*/function () {
272
272
  }
273
273
  }]);
274
274
  }();
275
- Submission.RequiredProperties = ["id", "template_id", "template_type", "template_version", "batch_id", "source", "state", "test", "editable", "data", "data_errors", "error_message", "metadata", "has_password", "signature_requests", "actions", "truncated_text", "output_formats", "files", "preview_generated_at", "expired", "expires_at", "processed_at", "created_at", "updated_at"];
275
+ Submission.RequiredProperties = ["id", "template_id", "template_type", "template_version", "batch_id", "source", "state", "test", "editable", "data", "data_errors", "error_message", "metadata", "files", "expired", "expires_at", "processed_at", "created_at", "updated_at", "has_password", "signature_requests", "actions", "truncated_text", "output_formats", "preview_generated_at"];
276
276
 
277
277
  /**
278
278
  * The submission's ID.
@@ -287,7 +287,7 @@ Submission.prototype['id'] = undefined;
287
287
  Submission.prototype['template_id'] = undefined;
288
288
 
289
289
  /**
290
- * The template's type: `pdf` or `html`.
290
+ * The template's type: `pdf`, `html` or `docx`.
291
291
  * @member {module:model/TemplateType} template_type
292
292
  */
293
293
  Submission.prototype['template_type'] = undefined;
@@ -311,7 +311,7 @@ Submission.prototype['batch_id'] = undefined;
311
311
  Submission.prototype['source'] = undefined;
312
312
 
313
313
  /**
314
- * `pending` until the PDF has been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no PDF: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the PDF failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`.
314
+ * `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no files: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`.
315
315
  * @member {module:model/SubmissionState} state
316
316
  */
317
317
  Submission.prototype['state'] = undefined;
@@ -329,7 +329,7 @@ Submission.prototype['test'] = undefined;
329
329
  Submission.prototype['editable'] = undefined;
330
330
 
331
331
  /**
332
- * The submission's data, with the values entered in completed signature requests. Lists leave it out (null) unless you pass `include_data=true`. Empty once the submission has expired.
332
+ * The submission's data, with the values entered in completed signature requests. Empty once the submission has expired. Null in a batch's submissions unless you pass `include_data=true`, and in the events of a webhook that leaves out submission data.
333
333
  * @member {Object.<String, Object>} data
334
334
  */
335
335
  Submission.prototype['data'] = undefined;
@@ -347,80 +347,80 @@ Submission.prototype['data_errors'] = undefined;
347
347
  Submission.prototype['error_message'] = undefined;
348
348
 
349
349
  /**
350
- * Your own data about the submission, such as an ID from your app. It isn't printed on the PDF.
350
+ * Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`).
351
351
  * @member {Object.<String, Object>} metadata
352
352
  */
353
353
  Submission.prototype['metadata'] = undefined;
354
354
 
355
355
  /**
356
- * Whether the PDF needs a password to open (`password`).
357
- * @member {Boolean} has_password
356
+ * The generated files: `pdf`, `docx` and `odt` (by `output_formats`) once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
357
+ * @member {module:model/SubmissionFiles} files
358
358
  */
359
- Submission.prototype['has_password'] = undefined;
359
+ Submission.prototype['files'] = undefined;
360
360
 
361
361
  /**
362
- * The people asked to sign the submission (and fill in their fields), in order.
363
- * @member {Array.<module:model/SignatureRequest>} signature_requests
362
+ * An expired submission's data, metadata, password and PDF have been deleted.
363
+ * @member {Boolean} expired
364
364
  */
365
- Submission.prototype['signature_requests'] = undefined;
365
+ Submission.prototype['expired'] = undefined;
366
366
 
367
367
  /**
368
- * The uploads of the submission's PDF to your storage (account integrations).
369
- * @member {Array.<module:model/SubmissionAction>} actions
368
+ * When the submission expires. Null if it's kept until you delete it.
369
+ * @member {Date} expires_at
370
370
  */
371
- Submission.prototype['actions'] = undefined;
371
+ Submission.prototype['expires_at'] = undefined;
372
372
 
373
373
  /**
374
- * The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired.
375
- * @member {Object.<String, Array.<String>>} truncated_text
374
+ * When the PDF was generated. Null until then.
375
+ * @member {Date} processed_at
376
376
  */
377
- Submission.prototype['truncated_text'] = undefined;
377
+ Submission.prototype['processed_at'] = undefined;
378
378
 
379
379
  /**
380
- * What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
381
- * @member {Array.<module:model/OutputFormat>} output_formats
380
+ * When the submission was created.
381
+ * @member {Date} created_at
382
382
  */
383
- Submission.prototype['output_formats'] = undefined;
383
+ Submission.prototype['created_at'] = undefined;
384
384
 
385
385
  /**
386
- * The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
387
- * @member {module:model/SubmissionFiles} files
386
+ * When the submission was last updated.
387
+ * @member {Date} updated_at
388
388
  */
389
- Submission.prototype['files'] = undefined;
389
+ Submission.prototype['updated_at'] = undefined;
390
390
 
391
391
  /**
392
- * When the preview PDF was generated. Null if there is no preview.
393
- * @member {Date} preview_generated_at
392
+ * Whether the PDF needs a password to open (`password`).
393
+ * @member {Boolean} has_password
394
394
  */
395
- Submission.prototype['preview_generated_at'] = undefined;
395
+ Submission.prototype['has_password'] = undefined;
396
396
 
397
397
  /**
398
- * An expired submission's data, metadata, password and PDF have been deleted.
399
- * @member {Boolean} expired
398
+ * The people asked to sign the submission (and fill in their fields), in order.
399
+ * @member {Array.<module:model/SignatureRequest>} signature_requests
400
400
  */
401
- Submission.prototype['expired'] = undefined;
401
+ Submission.prototype['signature_requests'] = undefined;
402
402
 
403
403
  /**
404
- * When the submission expires. Null if it's kept until you delete it.
405
- * @member {Date} expires_at
404
+ * The uploads of the submission's PDF to your storage (account integrations).
405
+ * @member {Array.<module:model/SubmissionAction>} actions
406
406
  */
407
- Submission.prototype['expires_at'] = undefined;
407
+ Submission.prototype['actions'] = undefined;
408
408
 
409
409
  /**
410
- * When the PDF was generated. Null until then.
411
- * @member {Date} processed_at
410
+ * The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired.
411
+ * @member {Object.<String, Array.<String>>} truncated_text
412
412
  */
413
- Submission.prototype['processed_at'] = undefined;
413
+ Submission.prototype['truncated_text'] = undefined;
414
414
 
415
415
  /**
416
- * When the submission was created.
417
- * @member {Date} created_at
416
+ * What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission.
417
+ * @member {Array.<module:model/OutputFormat>} output_formats
418
418
  */
419
- Submission.prototype['created_at'] = undefined;
419
+ Submission.prototype['output_formats'] = undefined;
420
420
 
421
421
  /**
422
- * When the submission was last updated.
423
- * @member {Date} updated_at
422
+ * When the preview PDF was generated. Null if there is no preview.
423
+ * @member {Date} preview_generated_at
424
424
  */
425
- Submission.prototype['updated_at'] = undefined;
425
+ Submission.prototype['preview_generated_at'] = undefined;
426
426
  var _default = exports["default"] = Submission;
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  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); } /**
20
20
  * DocSpring API
21
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
21
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
22
22
  *
23
23
  * The version of the OpenAPI document: v2
24
24
  *
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The SubmissionAction model module.
33
33
  * @module model/SubmissionAction
34
- * @version 4.1.0
34
+ * @version 4.3.0
35
35
  */
36
36
  var SubmissionAction = /*#__PURE__*/function () {
37
37
  /**
@@ -14,7 +14,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
14
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
15
  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); } /**
16
16
  * DocSpring API
17
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
17
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
18
18
  *
19
19
  * The version of the OpenAPI document: v2
20
20
  *
@@ -14,7 +14,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
14
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
15
  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); } /**
16
16
  * DocSpring API
17
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
17
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
18
18
  *
19
19
  * The version of the OpenAPI document: v2
20
20
  *
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  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); } /**
20
20
  * DocSpring API
21
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
21
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
22
22
  *
23
23
  * The version of the OpenAPI document: v2
24
24
  *
@@ -31,20 +31,20 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The SubmissionBatch model module.
33
33
  * @module model/SubmissionBatch
34
- * @version 4.1.0
34
+ * @version 4.3.0
35
35
  */
36
36
  var SubmissionBatch = /*#__PURE__*/function () {
37
37
  /**
38
38
  * Constructs a new <code>SubmissionBatch</code>.
39
- * Submissions created together in one request. Their PDFs are only generated when every submission in the batch is valid.
39
+ * Submissions created together in one request. Their files are only generated when every submission in the batch is valid.
40
40
  * @alias module:model/SubmissionBatch
41
41
  * @extends Object
42
42
  * @param id {String} The batch's ID.
43
- * @param state {module:model/SubmissionBatchState} `pending` while the PDFs are being generated, then `processed`. `error` as soon as a submission fails, while the others can still be pending: the batch has finished once `processed_at` is set.
43
+ * @param state {module:model/SubmissionBatchState} `pending` while the files are being generated, then `processed`. `error` as soon as a submission fails, while the others can still be pending: the batch has finished once `processed_at` is set.
44
44
  * @param metadata {Object.<String, Object>} Your own data about the batch, such as an ID from your app.
45
45
  * @param total_count {Number} The number of submissions in the request.
46
- * @param pending_count {Number} The submissions whose PDFs haven't been generated yet.
47
- * @param error_count {Number} The submissions that were invalid or whose PDFs couldn't be generated.
46
+ * @param pending_count {Number} The submissions whose files haven't been generated yet.
47
+ * @param error_count {Number} The submissions that were invalid or whose files couldn't be generated.
48
48
  * @param completion_percentage {Number} The percentage of the batch's submissions that have finished, from 0 to 100.
49
49
  * @param submissions {Array.<module:model/Submission>} The batch's submissions, in the order of the request. Their `data` is null unless you pass `include_data=true`. A batch that failed validation only has the submissions that were recorded as `invalid_data`.
50
50
  * @param processed_at {Date} When every submission had finished.
@@ -173,7 +173,7 @@ SubmissionBatch.RequiredProperties = ["id", "state", "metadata", "total_count",
173
173
  SubmissionBatch.prototype['id'] = undefined;
174
174
 
175
175
  /**
176
- * `pending` while the PDFs are being generated, then `processed`. `error` as soon as a submission fails, while the others can still be pending: the batch has finished once `processed_at` is set.
176
+ * `pending` while the files are being generated, then `processed`. `error` as soon as a submission fails, while the others can still be pending: the batch has finished once `processed_at` is set.
177
177
  * @member {module:model/SubmissionBatchState} state
178
178
  */
179
179
  SubmissionBatch.prototype['state'] = undefined;
@@ -191,13 +191,13 @@ SubmissionBatch.prototype['metadata'] = undefined;
191
191
  SubmissionBatch.prototype['total_count'] = undefined;
192
192
 
193
193
  /**
194
- * The submissions whose PDFs haven't been generated yet.
194
+ * The submissions whose files haven't been generated yet.
195
195
  * @member {Number} pending_count
196
196
  */
197
197
  SubmissionBatch.prototype['pending_count'] = undefined;
198
198
 
199
199
  /**
200
- * The submissions that were invalid or whose PDFs couldn't be generated.
200
+ * The submissions that were invalid or whose files couldn't be generated.
201
201
  * @member {Number} error_count
202
202
  */
203
203
  SubmissionBatch.prototype['error_count'] = undefined;
@@ -14,7 +14,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
14
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
15
  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); } /**
16
16
  * DocSpring API
17
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
17
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
18
18
  *
19
19
  * The version of the OpenAPI document: v2
20
20
  *
@@ -15,7 +15,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
16
  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); } /**
17
17
  * DocSpring API
18
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
18
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
19
19
  *
20
20
  * The version of the OpenAPI document: v2
21
21
  *
@@ -28,7 +28,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
28
28
  /**
29
29
  * The SubmissionFiles model module.
30
30
  * @module model/SubmissionFiles
31
- * @version 4.1.0
31
+ * @version 4.3.0
32
32
  */
33
33
  var SubmissionFiles = /*#__PURE__*/function () {
34
34
  /**
@@ -73,6 +73,12 @@ var SubmissionFiles = /*#__PURE__*/function () {
73
73
  if (data.hasOwnProperty('preview')) {
74
74
  obj['preview'] = _ApiClient["default"].convertToType(data['preview'], _GeneratedFile["default"]);
75
75
  }
76
+ if (data.hasOwnProperty('docx')) {
77
+ obj['docx'] = _ApiClient["default"].convertToType(data['docx'], _GeneratedFile["default"]);
78
+ }
79
+ if (data.hasOwnProperty('odt')) {
80
+ obj['odt'] = _ApiClient["default"].convertToType(data['odt'], _GeneratedFile["default"]);
81
+ }
76
82
  if (data.hasOwnProperty('png')) {
77
83
  obj['png'] = data['png'] === null ? null : _PageImages["default"].constructFromObject(data['png']);
78
84
  }
@@ -110,6 +116,18 @@ SubmissionFiles.prototype['audit_trail'] = undefined;
110
116
  */
111
117
  SubmissionFiles.prototype['preview'] = undefined;
112
118
 
119
+ /**
120
+ * The Word document of a Word template's submission, when the submission makes one (`output_formats`).
121
+ * @member {module:model/GeneratedFile} docx
122
+ */
123
+ SubmissionFiles.prototype['docx'] = undefined;
124
+
125
+ /**
126
+ * The OpenDocument file (.odt, the format LibreOffice uses) of a Word template's submission, converted from its Word document, when the submission makes one (`output_formats`).
127
+ * @member {module:model/GeneratedFile} odt
128
+ */
129
+ SubmissionFiles.prototype['odt'] = undefined;
130
+
113
131
  /**
114
132
  * @member {module:model/PageImages} png
115
133
  */
@@ -15,7 +15,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
16
  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); } /**
17
17
  * DocSpring API
18
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
18
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
19
19
  *
20
20
  * The version of the OpenAPI document: v2
21
21
  *
@@ -28,7 +28,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
28
28
  /**
29
29
  * The SubmissionInput model module.
30
30
  * @module model/SubmissionInput
31
- * @version 4.1.0
31
+ * @version 4.3.0
32
32
  */
33
33
  var SubmissionInput = /*#__PURE__*/function () {
34
34
  /**
@@ -157,25 +157,25 @@ SubmissionInput.prototype['test'] = undefined;
157
157
  SubmissionInput.prototype['editable'] = undefined;
158
158
 
159
159
  /**
160
- * The values of the template's fields, by field name. Required for a PDF template.
160
+ * The values of the template's fields, by field name. Required for PDF and Word templates.
161
161
  * @member {Object.<String, Object>} data
162
162
  */
163
163
  SubmissionInput.prototype['data'] = undefined;
164
164
 
165
165
  /**
166
- * Your own data about the submission, such as an ID from your app. It isn't printed on the PDF.
166
+ * Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`).
167
167
  * @member {Object.<String, Object>} metadata
168
168
  */
169
169
  SubmissionInput.prototype['metadata'] = undefined;
170
170
 
171
171
  /**
172
- * A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set.
172
+ * A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. Word documents and OpenDocument files can't be password-protected, so a submission with a password can't make them.
173
173
  * @member {String} password
174
174
  */
175
175
  SubmissionInput.prototype['password'] = undefined;
176
176
 
177
177
  /**
178
- * What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
178
+ * What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission.
179
179
  * @member {Array.<module:model/OutputFormat>} output_formats
180
180
  */
181
181
  SubmissionInput.prototype['output_formats'] = undefined;
@@ -199,7 +199,7 @@ SubmissionInput.prototype['field_overrides'] = undefined;
199
199
  SubmissionInput.prototype['html'] = undefined;
200
200
 
201
201
  /**
202
- * For an HTML template, CSS to use instead of the template's.
202
+ * For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity.
203
203
  * @member {String} css
204
204
  */
205
205
  SubmissionInput.prototype['css'] = undefined;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _Submission = _interopRequireDefault(require("./Submission"));
8
+ var _SubmissionSummary = _interopRequireDefault(require("./SubmissionSummary"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  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); }
11
11
  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; } } }; }
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
18
  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); } /**
19
19
  * DocSpring API
20
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
21
21
  *
22
22
  * The version of the OpenAPI document: v2
23
23
  *
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The SubmissionList model module.
32
32
  * @module model/SubmissionList
33
- * @version 4.1.0
33
+ * @version 4.3.0
34
34
  */
35
35
  var SubmissionList = /*#__PURE__*/function () {
36
36
  /**
@@ -38,7 +38,7 @@ var SubmissionList = /*#__PURE__*/function () {
38
38
  * A page of submissions, newest first.
39
39
  * @alias module:model/SubmissionList
40
40
  * @extends Object
41
- * @param data {Array.<module:model/Submission>} The items on this page.
41
+ * @param data {Array.<module:model/SubmissionSummary>} The items on this page.
42
42
  * @param next_cursor {String} Pass it as `cursor` to get the next page. Null on the last page.
43
43
  */
44
44
  function SubmissionList(data, next_cursor) {
@@ -72,7 +72,7 @@ var SubmissionList = /*#__PURE__*/function () {
72
72
  obj = obj || new SubmissionList();
73
73
  _ApiClient["default"].constructFromObject(data, obj, 'Object');
74
74
  if (data.hasOwnProperty('data')) {
75
- obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Submission["default"]]);
75
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_SubmissionSummary["default"]]);
76
76
  }
77
77
  if (data.hasOwnProperty('next_cursor')) {
78
78
  obj['next_cursor'] = _ApiClient["default"].convertToType(data['next_cursor'], 'String');
@@ -120,7 +120,7 @@ SubmissionList.RequiredProperties = ["data", "next_cursor"];
120
120
 
121
121
  /**
122
122
  * The items on this page.
123
- * @member {Array.<module:model/Submission>} data
123
+ * @member {Array.<module:model/SubmissionSummary>} data
124
124
  */
125
125
  SubmissionList.prototype['data'] = undefined;
126
126
 
@@ -14,7 +14,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
14
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
15
  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); } /**
16
16
  * DocSpring API
17
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
17
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
18
18
  *
19
19
  * The version of the OpenAPI document: v2
20
20
  *