docspring 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +4 -1
  3. package/dist/ApiClient.js +2 -2
  4. package/dist/RequestSchemas.js +75 -8
  5. package/dist/WebhookSignature.js +86 -0
  6. package/dist/api/Client.js +147 -15
  7. package/dist/index.js +42 -0
  8. package/dist/model/AddTemplateFieldsRequest.js +1 -1
  9. package/dist/model/AuthenticationCheck.js +1 -1
  10. package/dist/model/CombinedPdf.js +3 -3
  11. package/dist/model/CombinedPdfFiles.js +1 -1
  12. package/dist/model/CombinedPdfList.js +1 -1
  13. package/dist/model/CombinedPdfSource.js +1 -1
  14. package/dist/model/CombinedPdfSourceInput.js +1 -1
  15. package/dist/model/CombinedPdfSourcePdf.js +1 -1
  16. package/dist/model/CopyTemplateRequest.js +1 -1
  17. package/dist/model/CreateCombinedPdfRequest.js +2 -2
  18. package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
  19. package/dist/model/CreateFolderRequest.js +1 -1
  20. package/dist/model/CreateSignatureRequestEventRequest.js +1 -1
  21. package/dist/model/CreateSignatureRequestTokenRequest.js +1 -1
  22. package/dist/model/CreateSubmissionBatchRequest.js +1 -1
  23. package/dist/model/CreateSubmissionRequest.js +3 -3
  24. package/dist/model/CreateTemplatePreviewRequest.js +112 -0
  25. package/dist/model/CreateTemplateRequest.js +11 -2
  26. package/dist/model/CreateWebhookRequest.js +1 -1
  27. package/dist/model/CustomFile.js +1 -1
  28. package/dist/model/CustomFileList.js +1 -1
  29. package/dist/model/CustomFileSourcePdf.js +1 -1
  30. package/dist/model/ErrorCode.js +11 -1
  31. package/dist/model/ErrorDetail.js +2 -2
  32. package/dist/model/ErrorInfo.js +6 -6
  33. package/dist/model/ErrorResponse.js +1 -1
  34. package/dist/model/Field.js +1 -1
  35. package/dist/model/FieldComparisonCondition.js +1 -1
  36. package/dist/model/FieldDependency.js +1 -1
  37. package/dist/model/FieldDependencyInput.js +1 -1
  38. package/dist/model/FieldEqualsCondition.js +1 -1
  39. package/dist/model/FieldGroup.js +1 -1
  40. package/dist/model/FieldGroupInput.js +1 -1
  41. package/dist/model/FieldInCondition.js +1 -1
  42. package/dist/model/FieldInput.js +1 -1
  43. package/dist/model/FieldOverride.js +1 -1
  44. package/dist/model/FieldPresenceCondition.js +1 -1
  45. package/dist/model/FieldRangeCondition.js +1 -1
  46. package/dist/model/Folder.js +1 -1
  47. package/dist/model/FolderList.js +1 -1
  48. package/dist/model/GenerateSubmissionFilesRequest.js +1 -1
  49. package/dist/model/GeneratedFile.js +1 -1
  50. package/dist/model/HtmlEngineOptions.js +1 -1
  51. package/dist/model/HtmlEngineOptionsInput.js +1 -1
  52. package/dist/model/MoveFolderRequest.js +1 -1
  53. package/dist/model/MoveTemplateRequest.js +1 -1
  54. package/dist/model/PageImage.js +1 -1
  55. package/dist/model/PageImages.js +1 -1
  56. package/dist/model/PredefinedField.js +1 -1
  57. package/dist/model/PredefinedFieldInput.js +1 -1
  58. package/dist/model/PublishTemplateVersionRequest.js +1 -1
  59. package/dist/model/RemoveTemplateFieldsRequest.js +1 -1
  60. package/dist/model/RenameFolderRequest.js +1 -1
  61. package/dist/model/ReorderTemplateFieldsRequest.js +1 -1
  62. package/dist/model/RestoreTemplateVersionRequest.js +1 -1
  63. package/dist/model/SignatureRequest.js +1 -1
  64. package/dist/model/SignatureRequestEvent.js +1 -1
  65. package/dist/model/SignatureRequestInput.js +1 -1
  66. package/dist/model/SignatureRequestToken.js +1 -1
  67. package/dist/model/Submission.js +75 -75
  68. package/dist/model/SubmissionAction.js +1 -1
  69. package/dist/model/SubmissionBatch.js +1 -1
  70. package/dist/model/SubmissionFiles.js +1 -1
  71. package/dist/model/SubmissionInput.js +3 -3
  72. package/dist/model/SubmissionList.js +5 -5
  73. package/dist/model/SubmissionSourcePdf.js +1 -1
  74. package/dist/model/SubmissionSummary.js +343 -0
  75. package/dist/model/SubmissionValidation.js +1 -1
  76. package/dist/model/Template.js +68 -57
  77. package/dist/model/TemplateActor.js +3 -3
  78. package/dist/model/TemplateDefaults.js +1 -1
  79. package/dist/model/TemplateDefaultsInput.js +1 -1
  80. package/dist/model/TemplateDiff.js +1 -1
  81. package/dist/model/TemplateDiffSummary.js +1 -1
  82. package/dist/model/TemplateDocument.js +33 -33
  83. package/dist/model/TemplateDocumentSummary.js +152 -0
  84. package/dist/model/TemplateFieldChange.js +1 -1
  85. package/dist/model/TemplateFieldChanges.js +1 -1
  86. package/dist/model/TemplateFieldDependency.js +1 -1
  87. package/dist/model/TemplateFieldDependencyCondition.js +1 -1
  88. package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
  89. package/dist/model/TemplateFieldDependencyInput.js +1 -1
  90. package/dist/model/TemplateFieldMove.js +1 -1
  91. package/dist/model/TemplateFields.js +1 -1
  92. package/dist/model/TemplateModelCode.js +1 -1
  93. package/dist/model/TemplatePageImages.js +1 -1
  94. package/dist/model/TemplatePageProcessingStatus.js +1 -1
  95. package/dist/model/TemplatePreview.js +211 -0
  96. package/dist/model/TemplatePreviewState.js +64 -0
  97. package/dist/model/TemplateSourcePdf.js +1 -1
  98. package/dist/model/TemplateSummary.js +14 -288
  99. package/dist/model/TemplateSummaryList.js +1 -1
  100. package/dist/model/TemplateVersion.js +1 -1
  101. package/dist/model/UpdateSignatureRequestRequest.js +1 -1
  102. package/dist/model/UpdateTemplateDocumentRequest.js +1 -1
  103. package/dist/model/UpdateTemplateFieldsRequest.js +1 -1
  104. package/dist/model/UpdateTemplateRequest.js +11 -2
  105. package/dist/model/UpdateWebhookRequest.js +1 -1
  106. package/dist/model/UploadPresign.js +1 -1
  107. package/dist/model/UrlSourcePdf.js +1 -1
  108. package/dist/model/ValidateSubmissionRequest.js +3 -3
  109. package/dist/model/Webhook.js +1 -1
  110. package/dist/model/WebhookList.js +1 -1
  111. package/package.json +3 -2
@@ -0,0 +1,343 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _ErrorDetail = _interopRequireDefault(require("./ErrorDetail"));
9
+ var _SubmissionFiles = _interopRequireDefault(require("./SubmissionFiles"));
10
+ var _SubmissionSource = _interopRequireDefault(require("./SubmissionSource"));
11
+ var _SubmissionState = _interopRequireDefault(require("./SubmissionState"));
12
+ var _TemplateType = _interopRequireDefault(require("./TemplateType"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
+ 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); }
15
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
16
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
17
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
20
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
+ 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); } /**
23
+ * DocSpring API
24
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
25
+ *
26
+ * The version of the OpenAPI document: v2
27
+ *
28
+ *
29
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
30
+ * https://openapi-generator.tech
31
+ * Do not edit the class manually.
32
+ *
33
+ */
34
+ /**
35
+ * The SubmissionSummary model module.
36
+ * @module model/SubmissionSummary
37
+ * @version 4.2.0
38
+ */
39
+ var SubmissionSummary = /*#__PURE__*/function () {
40
+ /**
41
+ * Constructs a new <code>SubmissionSummary</code>.
42
+ * A submission in a list: its template, state, test or live, metadata and timestamps, with its data and files when you ask for them. Get a submission by its ID for its signature requests, uploads and page images.
43
+ * @alias module:model/SubmissionSummary
44
+ * @extends Object
45
+ * @param id {String} The submission's ID.
46
+ * @param template_id {String} Null once the template has been permanently deleted.
47
+ * @param template_type {module:model/TemplateType} The template's type: `pdf` or `html`.
48
+ * @param template_version {String} The published version of the template the submission used. Null for the draft.
49
+ * @param batch_id {String} The ID of the batch the submission was created in.
50
+ * @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.
51
+ * @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`.
52
+ * @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.
53
+ * @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`.
54
+ * @param data {Object.<String, Object>} The submission's data, with the values entered in completed signature requests. Null unless you pass `include_data=true`. Empty once the submission has expired.
55
+ * @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.
56
+ * @param error_message {String} Why the PDF couldn't be generated, when `state` is `error`.
57
+ * @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`).
58
+ * @param files {module:model/SubmissionFiles} Empty unless you pass `include_files=true`: then the generated files, as when you get the submission, without the `png` pages' links (`files.png.pages` is null). Get the submission for its page images.
59
+ * @param expired {Boolean} An expired submission's data, metadata, password and PDF have been deleted.
60
+ * @param expires_at {Date} When the submission expires. Null if it's kept until you delete it.
61
+ * @param processed_at {Date} When the PDF was generated. Null until then.
62
+ * @param created_at {Date} When the submission was created.
63
+ * @param updated_at {Date} When the submission was last updated.
64
+ */
65
+ function SubmissionSummary(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) {
66
+ _classCallCheck(this, SubmissionSummary);
67
+ SubmissionSummary.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);
68
+ }
69
+
70
+ /**
71
+ * Initializes the fields of this object.
72
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
73
+ * Only for internal use.
74
+ */
75
+ return _createClass(SubmissionSummary, null, [{
76
+ key: "initialize",
77
+ 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) {
78
+ obj['id'] = id;
79
+ obj['template_id'] = template_id;
80
+ obj['template_type'] = template_type;
81
+ obj['template_version'] = template_version;
82
+ obj['batch_id'] = batch_id;
83
+ obj['source'] = source;
84
+ obj['state'] = state;
85
+ obj['test'] = test;
86
+ obj['editable'] = editable;
87
+ obj['data'] = data;
88
+ obj['data_errors'] = data_errors;
89
+ obj['error_message'] = error_message;
90
+ obj['metadata'] = metadata;
91
+ obj['files'] = files;
92
+ obj['expired'] = expired;
93
+ obj['expires_at'] = expires_at;
94
+ obj['processed_at'] = processed_at;
95
+ obj['created_at'] = created_at;
96
+ obj['updated_at'] = updated_at;
97
+ }
98
+
99
+ /**
100
+ * Constructs a <code>SubmissionSummary</code> from a plain JavaScript object, optionally creating a new instance.
101
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
102
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
103
+ * @param {module:model/SubmissionSummary} obj Optional instance to populate.
104
+ * @return {module:model/SubmissionSummary} The populated <code>SubmissionSummary</code> instance.
105
+ */
106
+ }, {
107
+ key: "constructFromObject",
108
+ value: function constructFromObject(data, obj) {
109
+ if (data) {
110
+ obj = obj || new SubmissionSummary();
111
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
112
+ if (data.hasOwnProperty('id')) {
113
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
114
+ }
115
+ if (data.hasOwnProperty('template_id')) {
116
+ obj['template_id'] = _ApiClient["default"].convertToType(data['template_id'], 'String');
117
+ }
118
+ if (data.hasOwnProperty('template_type')) {
119
+ obj['template_type'] = _ApiClient["default"].convertToType(data['template_type'], _TemplateType["default"]);
120
+ }
121
+ if (data.hasOwnProperty('template_version')) {
122
+ obj['template_version'] = _ApiClient["default"].convertToType(data['template_version'], 'String');
123
+ }
124
+ if (data.hasOwnProperty('batch_id')) {
125
+ obj['batch_id'] = _ApiClient["default"].convertToType(data['batch_id'], 'String');
126
+ }
127
+ if (data.hasOwnProperty('source')) {
128
+ obj['source'] = _ApiClient["default"].convertToType(data['source'], _SubmissionSource["default"]);
129
+ }
130
+ if (data.hasOwnProperty('state')) {
131
+ obj['state'] = _ApiClient["default"].convertToType(data['state'], _SubmissionState["default"]);
132
+ }
133
+ if (data.hasOwnProperty('test')) {
134
+ obj['test'] = _ApiClient["default"].convertToType(data['test'], 'Boolean');
135
+ }
136
+ if (data.hasOwnProperty('editable')) {
137
+ obj['editable'] = _ApiClient["default"].convertToType(data['editable'], 'Boolean');
138
+ }
139
+ if (data.hasOwnProperty('data')) {
140
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], {
141
+ 'String': Object
142
+ });
143
+ }
144
+ if (data.hasOwnProperty('data_errors')) {
145
+ obj['data_errors'] = _ApiClient["default"].convertToType(data['data_errors'], [_ErrorDetail["default"]]);
146
+ }
147
+ if (data.hasOwnProperty('error_message')) {
148
+ obj['error_message'] = _ApiClient["default"].convertToType(data['error_message'], 'String');
149
+ }
150
+ if (data.hasOwnProperty('metadata')) {
151
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
152
+ 'String': Object
153
+ });
154
+ }
155
+ if (data.hasOwnProperty('files')) {
156
+ obj['files'] = _ApiClient["default"].convertToType(data['files'], _SubmissionFiles["default"]);
157
+ }
158
+ if (data.hasOwnProperty('expired')) {
159
+ obj['expired'] = _ApiClient["default"].convertToType(data['expired'], 'Boolean');
160
+ }
161
+ if (data.hasOwnProperty('expires_at')) {
162
+ obj['expires_at'] = _ApiClient["default"].convertToType(data['expires_at'], 'Date');
163
+ }
164
+ if (data.hasOwnProperty('processed_at')) {
165
+ obj['processed_at'] = _ApiClient["default"].convertToType(data['processed_at'], 'Date');
166
+ }
167
+ if (data.hasOwnProperty('created_at')) {
168
+ obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
169
+ }
170
+ if (data.hasOwnProperty('updated_at')) {
171
+ obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
172
+ }
173
+ }
174
+ return obj;
175
+ }
176
+
177
+ /**
178
+ * Validates the JSON data with respect to <code>SubmissionSummary</code>.
179
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
180
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SubmissionSummary</code>.
181
+ */
182
+ }, {
183
+ key: "validateJSON",
184
+ value: function validateJSON(data) {
185
+ // check to make sure all required properties are present in the JSON string
186
+ var _iterator = _createForOfIteratorHelper(SubmissionSummary.RequiredProperties),
187
+ _step;
188
+ try {
189
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
190
+ var property = _step.value;
191
+ if (!data.hasOwnProperty(property)) {
192
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
193
+ }
194
+ }
195
+ // ensure the json data is a string
196
+ } catch (err) {
197
+ _iterator.e(err);
198
+ } finally {
199
+ _iterator.f();
200
+ }
201
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
202
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
203
+ }
204
+ // ensure the json data is a string
205
+ if (data['template_id'] && !(typeof data['template_id'] === 'string' || data['template_id'] instanceof String)) {
206
+ throw new Error("Expected the field `template_id` to be a primitive type in the JSON string but got " + data['template_id']);
207
+ }
208
+ // ensure the json data is a string
209
+ if (data['template_version'] && !(typeof data['template_version'] === 'string' || data['template_version'] instanceof String)) {
210
+ throw new Error("Expected the field `template_version` to be a primitive type in the JSON string but got " + data['template_version']);
211
+ }
212
+ // ensure the json data is a string
213
+ if (data['batch_id'] && !(typeof data['batch_id'] === 'string' || data['batch_id'] instanceof String)) {
214
+ throw new Error("Expected the field `batch_id` to be a primitive type in the JSON string but got " + data['batch_id']);
215
+ }
216
+ // ensure the json data is an array
217
+ if (!Array.isArray(data['data_errors'])) {
218
+ throw new Error("Expected the field `data_errors` to be an array in the JSON data but got " + data['data_errors']);
219
+ }
220
+ // ensure the json data is a string
221
+ if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
222
+ throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
223
+ }
224
+ return true;
225
+ }
226
+ }]);
227
+ }();
228
+ SubmissionSummary.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"];
229
+
230
+ /**
231
+ * The submission's ID.
232
+ * @member {String} id
233
+ */
234
+ SubmissionSummary.prototype['id'] = undefined;
235
+
236
+ /**
237
+ * Null once the template has been permanently deleted.
238
+ * @member {String} template_id
239
+ */
240
+ SubmissionSummary.prototype['template_id'] = undefined;
241
+
242
+ /**
243
+ * The template's type: `pdf` or `html`.
244
+ * @member {module:model/TemplateType} template_type
245
+ */
246
+ SubmissionSummary.prototype['template_type'] = undefined;
247
+
248
+ /**
249
+ * The published version of the template the submission used. Null for the draft.
250
+ * @member {String} template_version
251
+ */
252
+ SubmissionSummary.prototype['template_version'] = undefined;
253
+
254
+ /**
255
+ * The ID of the batch the submission was created in.
256
+ * @member {String} batch_id
257
+ */
258
+ SubmissionSummary.prototype['batch_id'] = undefined;
259
+
260
+ /**
261
+ * `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again.
262
+ * @member {module:model/SubmissionSource} source
263
+ */
264
+ SubmissionSummary.prototype['source'] = undefined;
265
+
266
+ /**
267
+ * `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`.
268
+ * @member {module:model/SubmissionState} state
269
+ */
270
+ SubmissionSummary.prototype['state'] = undefined;
271
+
272
+ /**
273
+ * Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
274
+ * @member {Boolean} test
275
+ */
276
+ SubmissionSummary.prototype['test'] = undefined;
277
+
278
+ /**
279
+ * `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`.
280
+ * @member {Boolean} editable
281
+ */
282
+ SubmissionSummary.prototype['editable'] = undefined;
283
+
284
+ /**
285
+ * The submission's data, with the values entered in completed signature requests. Null unless you pass `include_data=true`. Empty once the submission has expired.
286
+ * @member {Object.<String, Object>} data
287
+ */
288
+ SubmissionSummary.prototype['data'] = undefined;
289
+
290
+ /**
291
+ * 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.
292
+ * @member {Array.<module:model/ErrorDetail>} data_errors
293
+ */
294
+ SubmissionSummary.prototype['data_errors'] = undefined;
295
+
296
+ /**
297
+ * Why the PDF couldn't be generated, when `state` is `error`.
298
+ * @member {String} error_message
299
+ */
300
+ SubmissionSummary.prototype['error_message'] = undefined;
301
+
302
+ /**
303
+ * 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`).
304
+ * @member {Object.<String, Object>} metadata
305
+ */
306
+ SubmissionSummary.prototype['metadata'] = undefined;
307
+
308
+ /**
309
+ * Empty unless you pass `include_files=true`: then the generated files, as when you get the submission, without the `png` pages' links (`files.png.pages` is null). Get the submission for its page images.
310
+ * @member {module:model/SubmissionFiles} files
311
+ */
312
+ SubmissionSummary.prototype['files'] = undefined;
313
+
314
+ /**
315
+ * An expired submission's data, metadata, password and PDF have been deleted.
316
+ * @member {Boolean} expired
317
+ */
318
+ SubmissionSummary.prototype['expired'] = undefined;
319
+
320
+ /**
321
+ * When the submission expires. Null if it's kept until you delete it.
322
+ * @member {Date} expires_at
323
+ */
324
+ SubmissionSummary.prototype['expires_at'] = undefined;
325
+
326
+ /**
327
+ * When the PDF was generated. Null until then.
328
+ * @member {Date} processed_at
329
+ */
330
+ SubmissionSummary.prototype['processed_at'] = undefined;
331
+
332
+ /**
333
+ * When the submission was created.
334
+ * @member {Date} created_at
335
+ */
336
+ SubmissionSummary.prototype['created_at'] = undefined;
337
+
338
+ /**
339
+ * When the submission was last updated.
340
+ * @member {Date} updated_at
341
+ */
342
+ SubmissionSummary.prototype['updated_at'] = undefined;
343
+ var _default = exports["default"] = SubmissionSummary;
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The SubmissionValidation model module.
32
32
  * @module model/SubmissionValidation
33
- * @version 4.1.0
33
+ * @version 4.2.0
34
34
  */
35
35
  var SubmissionValidation = /*#__PURE__*/function () {
36
36
  /**