docspring 4.0.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.
- package/AGENTS.md +3 -2
- package/README.md +13 -1
- package/dist/ApiClient.js +2 -2
- package/dist/RequestSchemas.js +1231 -9
- package/dist/WebhookSignature.js +86 -0
- package/dist/api/Client.js +620 -38
- package/dist/index.js +238 -0
- package/dist/model/AddTemplateFieldsRequest.js +132 -0
- package/dist/model/AuthenticationCheck.js +1 -1
- package/dist/model/CombinedPdf.js +3 -3
- package/dist/model/CombinedPdfFiles.js +1 -1
- package/dist/model/CombinedPdfList.js +1 -1
- package/dist/model/CombinedPdfSource.js +1 -1
- package/dist/model/CombinedPdfSourceInput.js +1 -1
- package/dist/model/CombinedPdfSourcePdf.js +1 -1
- package/dist/model/CopyTemplateRequest.js +1 -1
- package/dist/model/CreateCombinedPdfRequest.js +2 -2
- package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
- package/dist/model/CreateFolderRequest.js +1 -1
- package/dist/model/CreateSignatureRequestEventRequest.js +1 -1
- package/dist/model/CreateSignatureRequestTokenRequest.js +1 -1
- package/dist/model/CreateSubmissionBatchRequest.js +15 -1
- package/dist/model/CreateSubmissionRequest.js +17 -3
- package/dist/model/CreateTemplatePreviewRequest.js +112 -0
- package/dist/model/CreateTemplateRequest.js +81 -4
- package/dist/model/CreateWebhookRequest.js +1 -1
- package/dist/model/CustomFile.js +1 -1
- package/dist/model/CustomFileList.js +1 -1
- package/dist/model/CustomFileSourcePdf.js +1 -1
- package/dist/model/ErrorCode.js +11 -1
- package/dist/model/ErrorDetail.js +2 -2
- package/dist/model/ErrorInfo.js +6 -6
- package/dist/model/ErrorResponse.js +1 -1
- package/dist/model/Field.js +1230 -0
- package/dist/model/FieldComparisonCondition.js +1 -1
- package/dist/model/FieldDependency.js +154 -0
- package/dist/model/FieldDependencyInput.js +154 -0
- package/dist/model/FieldEqualsCondition.js +1 -1
- package/dist/model/FieldGroup.js +206 -0
- package/dist/model/FieldGroupInput.js +180 -0
- package/dist/model/FieldGroupType.js +59 -0
- package/dist/model/FieldInCondition.js +1 -1
- package/dist/model/FieldInput.js +1012 -0
- package/dist/model/FieldOverride.js +1 -1
- package/dist/model/FieldPresenceCondition.js +1 -1
- package/dist/model/FieldRangeCondition.js +1 -1
- package/dist/model/FieldType.js +124 -0
- package/dist/model/Folder.js +1 -1
- package/dist/model/FolderList.js +1 -1
- package/dist/model/GenerateFilesFormat.js +54 -0
- package/dist/model/GenerateSubmissionFilesRequest.js +115 -0
- package/dist/model/GeneratedFile.js +1 -1
- package/dist/model/HtmlEngineOptions.js +1 -1
- package/dist/model/HtmlEngineOptionsInput.js +1 -1
- package/dist/model/MoveFolderRequest.js +1 -1
- package/dist/model/MoveTemplateRequest.js +1 -1
- package/dist/model/OutputFormat.js +59 -0
- package/dist/model/PageImage.js +220 -0
- package/dist/model/PageImages.js +155 -0
- package/dist/model/PredefinedField.js +183 -0
- package/dist/model/PredefinedFieldInput.js +183 -0
- package/dist/model/PublishTemplateVersionRequest.js +1 -1
- package/dist/model/RemoveTemplateFieldsRequest.js +114 -0
- package/dist/model/RenameFolderRequest.js +1 -1
- package/dist/model/ReorderTemplateFieldsRequest.js +114 -0
- package/dist/model/RestoreTemplateVersionRequest.js +1 -1
- package/dist/model/SignatureRequest.js +1 -1
- package/dist/model/SignatureRequestEvent.js +1 -1
- package/dist/model/SignatureRequestInput.js +1 -1
- package/dist/model/SignatureRequestToken.js +1 -1
- package/dist/model/Submission.js +84 -68
- package/dist/model/SubmissionAction.js +1 -1
- package/dist/model/SubmissionBatch.js +1 -1
- package/dist/model/SubmissionFiles.js +10 -1
- package/dist/model/SubmissionInput.js +17 -3
- package/dist/model/SubmissionList.js +5 -5
- package/dist/model/SubmissionSourcePdf.js +1 -1
- package/dist/model/SubmissionSummary.js +343 -0
- package/dist/model/SubmissionValidation.js +151 -0
- package/dist/model/Template.js +129 -56
- package/dist/model/TemplateActor.js +3 -3
- package/dist/model/TemplateDefaults.js +1 -1
- package/dist/model/TemplateDefaultsInput.js +1 -1
- package/dist/model/TemplateDiff.js +206 -0
- package/dist/model/TemplateDiffSummary.js +165 -0
- package/dist/model/TemplateDocument.js +36 -36
- package/dist/model/TemplateDocumentState.js +11 -1
- package/dist/model/TemplateDocumentSummary.js +152 -0
- package/dist/model/TemplateFieldChange.js +146 -0
- package/dist/model/TemplateFieldChanges.js +196 -0
- package/dist/model/TemplateFieldDependency.js +3 -3
- package/dist/model/TemplateFieldDependencyCondition.js +1 -1
- package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
- package/dist/model/TemplateFieldDependencyInput.js +3 -3
- package/dist/model/TemplateFieldMove.js +132 -0
- package/dist/model/TemplateFields.js +147 -0
- package/dist/model/TemplateModelCode.js +1 -1
- package/dist/model/TemplatePageImages.js +158 -0
- package/dist/model/TemplatePageProcessingStatus.js +1 -1
- package/dist/model/TemplatePreview.js +211 -0
- package/dist/model/TemplatePreviewState.js +64 -0
- package/dist/model/TemplateSourcePdf.js +1 -1
- package/dist/model/TemplateSummary.js +14 -288
- package/dist/model/TemplateSummaryList.js +1 -1
- package/dist/model/TemplateVersion.js +1 -1
- package/dist/model/UpdateSignatureRequestRequest.js +1 -1
- package/dist/model/UpdateTemplateDocumentRequest.js +33 -30
- package/dist/model/UpdateTemplateFieldsRequest.js +132 -0
- package/dist/model/UpdateTemplateRequest.js +84 -2
- package/dist/model/UpdateWebhookRequest.js +1 -1
- package/dist/model/UploadPresign.js +1 -1
- package/dist/model/UrlSourcePdf.js +1 -1
- package/dist/model/ValidateSubmissionRequest.js +226 -0
- package/dist/model/Webhook.js +1 -1
- package/dist/model/WebhookList.js +1 -1
- package/package.json +3 -2
|
@@ -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.
|
|
32
|
+
* @version 4.2.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.
|
|
29
|
+
* @version 4.2.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 CreateCombinedPdfRequest model module.
|
|
32
32
|
* @module model/CreateCombinedPdfRequest
|
|
33
|
-
* @version 4.
|
|
33
|
+
* @version 4.2.0
|
|
34
34
|
*/
|
|
35
35
|
var CreateCombinedPdfRequest = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -149,7 +149,7 @@ CreateCombinedPdfRequest.RequiredProperties = ["source_pdfs"];
|
|
|
149
149
|
CreateCombinedPdfRequest.prototype['source_pdfs'] = undefined;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
|
-
* Your own data about the combined PDF, such as an ID from your app.
|
|
152
|
+
* Your own data about the combined PDF, such as an ID from your app. Its `pdf_filename` key names the PDF's file (`files.pdf.filename`, and its download): 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 combined PDF's ID (`com_1234567890abcdef01.pdf`).
|
|
153
153
|
* @member {Object.<String, Object>} metadata
|
|
154
154
|
*/
|
|
155
155
|
CreateCombinedPdfRequest.prototype['metadata'] = undefined;
|
|
@@ -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.
|
|
32
|
+
* @version 4.2.0
|
|
33
33
|
*/
|
|
34
34
|
var CreateCustomFileFromUploadRequest = /*#__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.
|
|
32
|
+
* @version 4.2.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.
|
|
34
|
+
* @version 4.2.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.
|
|
30
|
+
* @version 4.2.0
|
|
31
31
|
*/
|
|
32
32
|
var CreateSignatureRequestTokenRequest = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _OutputFormat = _interopRequireDefault(require("./OutputFormat"));
|
|
8
9
|
var _SubmissionInput = _interopRequireDefault(require("./SubmissionInput"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
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); }
|
|
@@ -30,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
30
31
|
/**
|
|
31
32
|
* The CreateSubmissionBatchRequest model module.
|
|
32
33
|
* @module model/CreateSubmissionBatchRequest
|
|
33
|
-
* @version 4.
|
|
34
|
+
* @version 4.2.0
|
|
34
35
|
*/
|
|
35
36
|
var CreateSubmissionBatchRequest = /*#__PURE__*/function () {
|
|
36
37
|
/**
|
|
@@ -81,6 +82,9 @@ var CreateSubmissionBatchRequest = /*#__PURE__*/function () {
|
|
|
81
82
|
if (data.hasOwnProperty('test')) {
|
|
82
83
|
obj['test'] = _ApiClient["default"].convertToType(data['test'], 'Boolean');
|
|
83
84
|
}
|
|
85
|
+
if (data.hasOwnProperty('output_formats')) {
|
|
86
|
+
obj['output_formats'] = _ApiClient["default"].convertToType(data['output_formats'], [_OutputFormat["default"]]);
|
|
87
|
+
}
|
|
84
88
|
if (data.hasOwnProperty('submissions')) {
|
|
85
89
|
obj['submissions'] = _ApiClient["default"].convertToType(data['submissions'], [_SubmissionInput["default"]]);
|
|
86
90
|
}
|
|
@@ -119,6 +123,10 @@ var CreateSubmissionBatchRequest = /*#__PURE__*/function () {
|
|
|
119
123
|
if (data['template_version'] && !(typeof data['template_version'] === 'string' || data['template_version'] instanceof String)) {
|
|
120
124
|
throw new Error("Expected the field `template_version` to be a primitive type in the JSON string but got " + data['template_version']);
|
|
121
125
|
}
|
|
126
|
+
// ensure the json data is an array
|
|
127
|
+
if (!Array.isArray(data['output_formats'])) {
|
|
128
|
+
throw new Error("Expected the field `output_formats` to be an array in the JSON data but got " + data['output_formats']);
|
|
129
|
+
}
|
|
122
130
|
if (data['submissions']) {
|
|
123
131
|
// data not null
|
|
124
132
|
// ensure the json data is an array
|
|
@@ -170,6 +178,12 @@ CreateSubmissionBatchRequest.prototype['template_version'] = undefined;
|
|
|
170
178
|
*/
|
|
171
179
|
CreateSubmissionBatchRequest.prototype['test'] = undefined;
|
|
172
180
|
|
|
181
|
+
/**
|
|
182
|
+
* The default `output_formats` for each submission that doesn't set its own.
|
|
183
|
+
* @member {Array.<module:model/OutputFormat>} output_formats
|
|
184
|
+
*/
|
|
185
|
+
CreateSubmissionBatchRequest.prototype['output_formats'] = undefined;
|
|
186
|
+
|
|
173
187
|
/**
|
|
174
188
|
* Up to 50 submissions. Each one takes the properties of POST /templates/{template_id}/submissions except `signature_requests`, plus `template_id` and `template_version` when it uses a different template from the batch.
|
|
175
189
|
* @member {Array.<module:model/SubmissionInput>} submissions
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _FieldOverride = _interopRequireDefault(require("./FieldOverride"));
|
|
9
|
+
var _OutputFormat = _interopRequireDefault(require("./OutputFormat"));
|
|
9
10
|
var _SignatureRequestInput = _interopRequireDefault(require("./SignatureRequestInput"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
12
|
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); }
|
|
@@ -31,7 +32,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
31
32
|
/**
|
|
32
33
|
* The CreateSubmissionRequest model module.
|
|
33
34
|
* @module model/CreateSubmissionRequest
|
|
34
|
-
* @version 4.
|
|
35
|
+
* @version 4.2.0
|
|
35
36
|
*/
|
|
36
37
|
var CreateSubmissionRequest = /*#__PURE__*/function () {
|
|
37
38
|
/**
|
|
@@ -84,6 +85,9 @@ var CreateSubmissionRequest = /*#__PURE__*/function () {
|
|
|
84
85
|
if (data.hasOwnProperty('password')) {
|
|
85
86
|
obj['password'] = _ApiClient["default"].convertToType(data['password'], 'String');
|
|
86
87
|
}
|
|
88
|
+
if (data.hasOwnProperty('output_formats')) {
|
|
89
|
+
obj['output_formats'] = _ApiClient["default"].convertToType(data['output_formats'], [_OutputFormat["default"]]);
|
|
90
|
+
}
|
|
87
91
|
if (data.hasOwnProperty('expires_in')) {
|
|
88
92
|
obj['expires_in'] = _ApiClient["default"].convertToType(data['expires_in'], 'Number');
|
|
89
93
|
}
|
|
@@ -117,6 +121,10 @@ var CreateSubmissionRequest = /*#__PURE__*/function () {
|
|
|
117
121
|
if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) {
|
|
118
122
|
throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']);
|
|
119
123
|
}
|
|
124
|
+
// ensure the json data is an array
|
|
125
|
+
if (!Array.isArray(data['output_formats'])) {
|
|
126
|
+
throw new Error("Expected the field `output_formats` to be an array in the JSON data but got " + data['output_formats']);
|
|
127
|
+
}
|
|
120
128
|
// ensure the json data is a string
|
|
121
129
|
if (data['html'] && !(typeof data['html'] === 'string' || data['html'] instanceof String)) {
|
|
122
130
|
throw new Error("Expected the field `html` to be a primitive type in the JSON string but got " + data['html']);
|
|
@@ -169,7 +177,7 @@ CreateSubmissionRequest.prototype['editable'] = undefined;
|
|
|
169
177
|
CreateSubmissionRequest.prototype['data'] = undefined;
|
|
170
178
|
|
|
171
179
|
/**
|
|
172
|
-
* Your own data about the submission, such as an ID from your app. It isn't printed on the PDF.
|
|
180
|
+
* 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`).
|
|
173
181
|
* @member {Object.<String, Object>} metadata
|
|
174
182
|
*/
|
|
175
183
|
CreateSubmissionRequest.prototype['metadata'] = undefined;
|
|
@@ -180,6 +188,12 @@ CreateSubmissionRequest.prototype['metadata'] = undefined;
|
|
|
180
188
|
*/
|
|
181
189
|
CreateSubmissionRequest.prototype['password'] = undefined;
|
|
182
190
|
|
|
191
|
+
/**
|
|
192
|
+
* 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.
|
|
193
|
+
* @member {Array.<module:model/OutputFormat>} output_formats
|
|
194
|
+
*/
|
|
195
|
+
CreateSubmissionRequest.prototype['output_formats'] = undefined;
|
|
196
|
+
|
|
183
197
|
/**
|
|
184
198
|
* Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours.
|
|
185
199
|
* @member {Number} expires_in
|
|
@@ -199,7 +213,7 @@ CreateSubmissionRequest.prototype['field_overrides'] = undefined;
|
|
|
199
213
|
CreateSubmissionRequest.prototype['html'] = undefined;
|
|
200
214
|
|
|
201
215
|
/**
|
|
202
|
-
* For an HTML template, CSS
|
|
216
|
+
* 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
217
|
* @member {String} css
|
|
204
218
|
*/
|
|
205
219
|
CreateSubmissionRequest.prototype['css'] = undefined;
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
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; } } }; }
|
|
11
|
+
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; } }
|
|
12
|
+
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; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
18
|
+
* DocSpring API
|
|
19
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document: v2
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The CreateTemplatePreviewRequest model module.
|
|
31
|
+
* @module model/CreateTemplatePreviewRequest
|
|
32
|
+
* @version 4.2.0
|
|
33
|
+
*/
|
|
34
|
+
var CreateTemplatePreviewRequest = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>CreateTemplatePreviewRequest</code>.
|
|
37
|
+
* The data to render the template with.
|
|
38
|
+
* @alias module:model/CreateTemplatePreviewRequest
|
|
39
|
+
* @param data {Object.<String, Object>} The values of the template's fields, by field name, as you'd send them to create a submission. They're rendered as they are: they aren't checked against the template's fields. A value that a field can't print, such as an image URL that doesn't download, makes the preview's `state` `error`, with an `error_message`.
|
|
40
|
+
*/
|
|
41
|
+
function CreateTemplatePreviewRequest(data) {
|
|
42
|
+
_classCallCheck(this, CreateTemplatePreviewRequest);
|
|
43
|
+
CreateTemplatePreviewRequest.initialize(this, data);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(CreateTemplatePreviewRequest, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, data) {
|
|
54
|
+
obj['data'] = data;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>CreateTemplatePreviewRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/CreateTemplatePreviewRequest} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/CreateTemplatePreviewRequest} The populated <code>CreateTemplatePreviewRequest</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new CreateTemplatePreviewRequest();
|
|
69
|
+
if (data.hasOwnProperty('data')) {
|
|
70
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], {
|
|
71
|
+
'String': Object
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>CreateTemplatePreviewRequest</code>.
|
|
80
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateTemplatePreviewRequest</code>.
|
|
82
|
+
*/
|
|
83
|
+
}, {
|
|
84
|
+
key: "validateJSON",
|
|
85
|
+
value: function validateJSON(data) {
|
|
86
|
+
// check to make sure all required properties are present in the JSON string
|
|
87
|
+
var _iterator = _createForOfIteratorHelper(CreateTemplatePreviewRequest.RequiredProperties),
|
|
88
|
+
_step;
|
|
89
|
+
try {
|
|
90
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
91
|
+
var property = _step.value;
|
|
92
|
+
if (!data.hasOwnProperty(property)) {
|
|
93
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
}]);
|
|
104
|
+
}();
|
|
105
|
+
CreateTemplatePreviewRequest.RequiredProperties = ["data"];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The values of the template's fields, by field name, as you'd send them to create a submission. They're rendered as they are: they aren't checked against the template's fields. A value that a field can't print, such as an image URL that doesn't download, makes the preview's `state` `error`, with an `error_message`.
|
|
109
|
+
* @member {Object.<String, Object>} data
|
|
110
|
+
*/
|
|
111
|
+
CreateTemplatePreviewRequest.prototype['data'] = undefined;
|
|
112
|
+
var _default = exports["default"] = CreateTemplatePreviewRequest;
|
|
@@ -11,6 +11,7 @@ var _FieldSetupLogic = _interopRequireDefault(require("./FieldSetupLogic"));
|
|
|
11
11
|
var _FieldSetupNaming = _interopRequireDefault(require("./FieldSetupNaming"));
|
|
12
12
|
var _FieldSetupSource = _interopRequireDefault(require("./FieldSetupSource"));
|
|
13
13
|
var _HtmlEngineOptionsInput = _interopRequireDefault(require("./HtmlEngineOptionsInput"));
|
|
14
|
+
var _PredefinedFieldInput = _interopRequireDefault(require("./PredefinedFieldInput"));
|
|
14
15
|
var _TemplateDefaultsInput = _interopRequireDefault(require("./TemplateDefaultsInput"));
|
|
15
16
|
var _TemplateFieldDependencyInput = _interopRequireDefault(require("./TemplateFieldDependencyInput"));
|
|
16
17
|
var _TemplateFormMode = _interopRequireDefault(require("./TemplateFormMode"));
|
|
@@ -39,7 +40,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
39
40
|
/**
|
|
40
41
|
* The CreateTemplateRequest model module.
|
|
41
42
|
* @module model/CreateTemplateRequest
|
|
42
|
-
* @version 4.
|
|
43
|
+
* @version 4.2.0
|
|
43
44
|
*/
|
|
44
45
|
var CreateTemplateRequest = /*#__PURE__*/function () {
|
|
45
46
|
/**
|
|
@@ -160,6 +161,14 @@ var CreateTemplateRequest = /*#__PURE__*/function () {
|
|
|
160
161
|
if (data.hasOwnProperty('field_dependencies')) {
|
|
161
162
|
obj['field_dependencies'] = _ApiClient["default"].convertToType(data['field_dependencies'], [_TemplateFieldDependencyInput["default"]]);
|
|
162
163
|
}
|
|
164
|
+
if (data.hasOwnProperty('predefined_fields')) {
|
|
165
|
+
obj['predefined_fields'] = _ApiClient["default"].convertToType(data['predefined_fields'], [_PredefinedFieldInput["default"]]);
|
|
166
|
+
}
|
|
167
|
+
if (data.hasOwnProperty('predefined_fields_sample_data')) {
|
|
168
|
+
obj['predefined_fields_sample_data'] = _ApiClient["default"].convertToType(data['predefined_fields_sample_data'], {
|
|
169
|
+
'String': Object
|
|
170
|
+
});
|
|
171
|
+
}
|
|
163
172
|
if (data.hasOwnProperty('html')) {
|
|
164
173
|
obj['html'] = _ApiClient["default"].convertToType(data['html'], 'String');
|
|
165
174
|
}
|
|
@@ -175,9 +184,18 @@ var CreateTemplateRequest = /*#__PURE__*/function () {
|
|
|
175
184
|
if (data.hasOwnProperty('html_engine_options')) {
|
|
176
185
|
obj['html_engine_options'] = _ApiClient["default"].convertToType(data['html_engine_options'], _HtmlEngineOptionsInput["default"]);
|
|
177
186
|
}
|
|
187
|
+
if (data.hasOwnProperty('html_escape_data')) {
|
|
188
|
+
obj['html_escape_data'] = _ApiClient["default"].convertToType(data['html_escape_data'], 'Boolean');
|
|
189
|
+
}
|
|
178
190
|
if (data.hasOwnProperty('cache_id')) {
|
|
179
191
|
obj['cache_id'] = _ApiClient["default"].convertToType(data['cache_id'], 'String');
|
|
180
192
|
}
|
|
193
|
+
if (data.hasOwnProperty('document_url')) {
|
|
194
|
+
obj['document_url'] = _ApiClient["default"].convertToType(data['document_url'], 'String');
|
|
195
|
+
}
|
|
196
|
+
if (data.hasOwnProperty('document_base64')) {
|
|
197
|
+
obj['document_base64'] = _ApiClient["default"].convertToType(data['document_base64'], 'String');
|
|
198
|
+
}
|
|
181
199
|
if (data.hasOwnProperty('filename')) {
|
|
182
200
|
obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String');
|
|
183
201
|
}
|
|
@@ -274,6 +292,27 @@ var CreateTemplateRequest = /*#__PURE__*/function () {
|
|
|
274
292
|
}
|
|
275
293
|
;
|
|
276
294
|
}
|
|
295
|
+
if (data['predefined_fields']) {
|
|
296
|
+
// data not null
|
|
297
|
+
// ensure the json data is an array
|
|
298
|
+
if (!Array.isArray(data['predefined_fields'])) {
|
|
299
|
+
throw new Error("Expected the field `predefined_fields` to be an array in the JSON data but got " + data['predefined_fields']);
|
|
300
|
+
}
|
|
301
|
+
// validate the optional field `predefined_fields` (array)
|
|
302
|
+
var _iterator3 = _createForOfIteratorHelper(data['predefined_fields']),
|
|
303
|
+
_step3;
|
|
304
|
+
try {
|
|
305
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
306
|
+
var _item = _step3.value;
|
|
307
|
+
_PredefinedFieldInput["default"].validateJSON(_item);
|
|
308
|
+
}
|
|
309
|
+
} catch (err) {
|
|
310
|
+
_iterator3.e(err);
|
|
311
|
+
} finally {
|
|
312
|
+
_iterator3.f();
|
|
313
|
+
}
|
|
314
|
+
;
|
|
315
|
+
}
|
|
277
316
|
// ensure the json data is a string
|
|
278
317
|
if (data['html'] && !(typeof data['html'] === 'string' || data['html'] instanceof String)) {
|
|
279
318
|
throw new Error("Expected the field `html` to be a primitive type in the JSON string but got " + data['html']);
|
|
@@ -300,6 +339,14 @@ var CreateTemplateRequest = /*#__PURE__*/function () {
|
|
|
300
339
|
throw new Error("Expected the field `cache_id` to be a primitive type in the JSON string but got " + data['cache_id']);
|
|
301
340
|
}
|
|
302
341
|
// ensure the json data is a string
|
|
342
|
+
if (data['document_url'] && !(typeof data['document_url'] === 'string' || data['document_url'] instanceof String)) {
|
|
343
|
+
throw new Error("Expected the field `document_url` to be a primitive type in the JSON string but got " + data['document_url']);
|
|
344
|
+
}
|
|
345
|
+
// ensure the json data is a string
|
|
346
|
+
if (data['document_base64'] && !(typeof data['document_base64'] === 'string' || data['document_base64'] instanceof String)) {
|
|
347
|
+
throw new Error("Expected the field `document_base64` to be a primitive type in the JSON string but got " + data['document_base64']);
|
|
348
|
+
}
|
|
349
|
+
// ensure the json data is a string
|
|
303
350
|
if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) {
|
|
304
351
|
throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']);
|
|
305
352
|
}
|
|
@@ -376,7 +423,7 @@ CreateTemplateRequest.prototype['default_form_mode'] = undefined;
|
|
|
376
423
|
CreateTemplateRequest.prototype['editable_submissions'] = undefined;
|
|
377
424
|
|
|
378
425
|
/**
|
|
379
|
-
* The sites
|
|
426
|
+
* The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work). Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and the simple form) aren't restricted.
|
|
380
427
|
* @member {Array.<String>} embed_domains
|
|
381
428
|
*/
|
|
382
429
|
CreateTemplateRequest.prototype['embed_domains'] = undefined;
|
|
@@ -477,6 +524,18 @@ CreateTemplateRequest.prototype['defaults'] = undefined;
|
|
|
477
524
|
*/
|
|
478
525
|
CreateTemplateRequest.prototype['field_dependencies'] = undefined;
|
|
479
526
|
|
|
527
|
+
/**
|
|
528
|
+
* The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off.
|
|
529
|
+
* @member {Array.<module:model/PredefinedFieldInput>} predefined_fields
|
|
530
|
+
*/
|
|
531
|
+
CreateTemplateRequest.prototype['predefined_fields'] = undefined;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Sample submission data that sets `predefined_fields`: each value becomes a predefined field, with a type that fits it (`string`, `number`, `boolean`, `date`, `email` or `url`) and `required_in_template` true. Nested objects and arrays become names with `/`, such as `customer/email`. Without `predefined_fields` in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for.
|
|
535
|
+
* @member {Object.<String, Object>} predefined_fields_sample_data
|
|
536
|
+
*/
|
|
537
|
+
CreateTemplateRequest.prototype['predefined_fields_sample_data'] = undefined;
|
|
538
|
+
|
|
480
539
|
/**
|
|
481
540
|
* The HTML of an HTML template, as a Liquid template. Null for PDF templates.
|
|
482
541
|
* @member {String} html
|
|
@@ -508,13 +567,31 @@ CreateTemplateRequest.prototype['footer_html'] = undefined;
|
|
|
508
567
|
CreateTemplateRequest.prototype['html_engine_options'] = undefined;
|
|
509
568
|
|
|
510
569
|
/**
|
|
511
|
-
*
|
|
570
|
+
* Whether an HTML template HTML-escapes the values it prints. When true, `{{ value }}` prints a value as text, so a `<` or `&` in it is printed as that character, and `{{ value | raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for PDF templates.
|
|
571
|
+
* @member {Boolean} html_escape_data
|
|
572
|
+
*/
|
|
573
|
+
CreateTemplateRequest.prototype['html_escape_data'] = undefined;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* A PDF template's document: the `fields.key` of a file you uploaded with the presigned upload (GET /uploads/presign). A PDF template needs one of `cache_id`, `document_url` and `document_base64`. To upload the PDF with the request, use POST /templates/upload.
|
|
512
577
|
* @member {String} cache_id
|
|
513
578
|
*/
|
|
514
579
|
CreateTemplateRequest.prototype['cache_id'] = undefined;
|
|
515
580
|
|
|
516
581
|
/**
|
|
517
|
-
*
|
|
582
|
+
* An https:// link to the template's PDF (up to 100 MB), instead of `cache_id`. DocSpring downloads it after responding, following redirects to other https:// links: the template's `document.state` is `downloading` until then (sync.api hosts wait for it). If it can't be downloaded, the state is `download_failed` and `document.error_message` says why.
|
|
583
|
+
* @member {String} document_url
|
|
584
|
+
*/
|
|
585
|
+
CreateTemplateRequest.prototype['document_url'] = undefined;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The template's PDF, encoded as base64 (a `data:` URI works too), instead of `cache_id`. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`.
|
|
589
|
+
* @member {String} document_base64
|
|
590
|
+
*/
|
|
591
|
+
CreateTemplateRequest.prototype['document_base64'] = undefined;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* The PDF's file name, for a `cache_id` (presigned uploads don't send one) or `document_base64`. A `document_url`'s is the last part of its path unless you set it.
|
|
518
595
|
* @member {String} filename
|
|
519
596
|
*/
|
|
520
597
|
CreateTemplateRequest.prototype['filename'] = undefined;
|
|
@@ -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.
|
|
34
|
+
* @version 4.2.0
|
|
35
35
|
*/
|
|
36
36
|
var CreateWebhookRequest = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
package/dist/model/CustomFile.js
CHANGED
|
@@ -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.
|
|
33
|
+
* @version 4.2.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.
|
|
32
|
+
* @version 4.2.0
|
|
33
33
|
*/
|
|
34
34
|
var CustomFileSourcePdf = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
package/dist/model/ErrorCode.js
CHANGED
|
@@ -151,4 +151,14 @@ _defineProperty(ErrorCode, "upstream_timeout", "upstream_timeout");
|
|
|
151
151
|
* value: "polling_timeout"
|
|
152
152
|
* @const
|
|
153
153
|
*/
|
|
154
|
-
_defineProperty(ErrorCode, "polling_timeout", "polling_timeout");
|
|
154
|
+
_defineProperty(ErrorCode, "polling_timeout", "polling_timeout");
|
|
155
|
+
/**
|
|
156
|
+
* value: "idempotency_key_in_use"
|
|
157
|
+
* @const
|
|
158
|
+
*/
|
|
159
|
+
_defineProperty(ErrorCode, "idempotency_key_in_use", "idempotency_key_in_use");
|
|
160
|
+
/**
|
|
161
|
+
* value: "idempotency_key_reused"
|
|
162
|
+
* @const
|
|
163
|
+
*/
|
|
164
|
+
_defineProperty(ErrorCode, "idempotency_key_reused", "idempotency_key_reused");
|
|
@@ -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.
|
|
32
|
+
* @version 4.2.0
|
|
33
33
|
*/
|
|
34
34
|
var ErrorDetail = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -157,7 +157,7 @@ ErrorDetail.prototype['message'] = undefined;
|
|
|
157
157
|
ErrorDetail.prototype['pointer'] = undefined;
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
-
* The query parameter the detail is about.
|
|
160
|
+
* The query parameter or header the detail is about.
|
|
161
161
|
* @member {String} parameter
|
|
162
162
|
*/
|
|
163
163
|
ErrorDetail.prototype['parameter'] = undefined;
|
package/dist/model/ErrorInfo.js
CHANGED
|
@@ -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.
|
|
34
|
+
* @version 4.2.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`. `upgrade_required` (403): your plan doesn't include this, such as more templates or the embedded template editor. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the PDF wasn'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.
|
|
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`. `upgrade_required` (403): your plan doesn't include this, such as more templates or the embedded template editor. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the PDF wasn'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): a request with the same Idempotency-Key is still being processed. Send the request again in a few seconds; when the first request has already created its record, its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request.
|
|
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.
|
|
@@ -162,7 +162,7 @@ var ErrorInfo = /*#__PURE__*/function () {
|
|
|
162
162
|
ErrorInfo.RequiredProperties = ["code", "message", "details", "request_id"];
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
* 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`. `upgrade_required` (403): your plan doesn't include this, such as more templates or the embedded template editor. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the PDF wasn'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.
|
|
165
|
+
* 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`. `upgrade_required` (403): your plan doesn't include this, such as more templates or the embedded template editor. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the PDF wasn'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): a request with the same Idempotency-Key is still being processed. Send the request again in a few seconds; when the first request has already created its record, its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request.
|
|
166
166
|
* @member {module:model/ErrorCode} code
|
|
167
167
|
*/
|
|
168
168
|
ErrorInfo.prototype['code'] = undefined;
|
|
@@ -186,19 +186,19 @@ ErrorInfo.prototype['details'] = undefined;
|
|
|
186
186
|
ErrorInfo.prototype['request_id'] = undefined;
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
|
-
* When a submission's data fails validation, the submission is still recorded (state `invalid_data`) so you can see it in the dashboard. This is its ID. With `insufficient_credits`, the submission that waits for credits. With `polling_timeout`, the submission that's still being processed.
|
|
189
|
+
* When a submission's data fails validation, the submission is still recorded (state `invalid_data`) so you can see it in the dashboard. This is its ID. With `insufficient_credits`, the submission that waits for credits. With `polling_timeout` or `idempotency_key_in_use`, the submission that's still being processed.
|
|
190
190
|
* @member {String} submission_id
|
|
191
191
|
*/
|
|
192
192
|
ErrorInfo.prototype['submission_id'] = undefined;
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* The ID of the recorded batch, when items in a batch fail validation. With `insufficient_credits`, the batch whose submissions wait for credits. With `polling_timeout`, the batch that's still being processed.
|
|
195
|
+
* The ID of the recorded batch, when items in a batch fail validation. With `insufficient_credits`, the batch whose submissions wait for credits. With `polling_timeout` or `idempotency_key_in_use`, the batch that's still being processed.
|
|
196
196
|
* @member {String} submission_batch_id
|
|
197
197
|
*/
|
|
198
198
|
ErrorInfo.prototype['submission_batch_id'] = undefined;
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
|
-
* With `insufficient_credits`, the combined PDF that waits for credits. With `polling_timeout`, the combined PDF that's still being processed.
|
|
201
|
+
* With `insufficient_credits`, the combined PDF that waits for credits. With `polling_timeout` or `idempotency_key_in_use`, the combined PDF that's still being processed.
|
|
202
202
|
* @member {String} combined_pdf_id
|
|
203
203
|
*/
|
|
204
204
|
ErrorInfo.prototype['combined_pdf_id'] = undefined;
|
|
@@ -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.
|
|
33
|
+
* @version 4.2.0
|
|
34
34
|
*/
|
|
35
35
|
var ErrorResponse = /*#__PURE__*/function () {
|
|
36
36
|
/**
|