docspring 4.3.0 → 4.4.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/README.md +20 -1
- package/dist/ApiClient.js +2 -2
- package/dist/RequestSchemas.js +1118 -93
- package/dist/RequestValidator.js +4 -0
- package/dist/api/Client.js +1360 -206
- package/dist/index.js +196 -0
- package/dist/model/AddTemplateFieldsRequest.js +3 -3
- package/dist/model/AuthenticationCheck.js +1 -1
- package/dist/model/CombinedPdf.js +1 -1
- package/dist/model/CombinedPdfFiles.js +1 -1
- package/dist/model/CombinedPdfList.js +1 -1
- package/dist/model/CombinedPdfSource.js +2 -2
- package/dist/model/CombinedPdfSourceInput.js +2 -2
- package/dist/model/CombinedPdfSourcePdf.js +1 -1
- package/dist/model/CopyTemplateRequest.js +1 -1
- package/dist/model/CreateAccountEmailActionRequest.js +306 -0
- package/dist/model/CreateCombinedPdfRequest.js +1 -1
- package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
- package/dist/model/CreateEmailActionRequest.js +280 -0
- package/dist/model/CreateEmailDomainRequest.js +114 -0
- 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 +4 -4
- package/dist/model/CreateSubmissionRequest.js +112 -4
- package/dist/model/CreateTemplatePreviewRequest.js +1 -1
- package/dist/model/CreateTemplateRequest.js +103 -8
- 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/DnsRecordType.js +64 -0
- package/dist/model/EmailAction.js +510 -0
- package/dist/model/EmailActionConditions.js +142 -0
- package/dist/model/EmailActionConditionsInput.js +142 -0
- package/dist/model/EmailActionCustomization.js +222 -0
- package/dist/model/EmailActionDelivery.js +59 -0
- package/dist/model/EmailActionFileFormats.js +69 -0
- package/dist/model/EmailActionList.js +132 -0
- package/dist/model/EmailActionSetting.js +119 -0
- package/dist/model/EmailActionSubmissionType.js +64 -0
- package/dist/model/EmailActionTestEmail.js +116 -0
- package/dist/model/EmailDomain.js +245 -0
- package/dist/model/EmailDomainDnsRecord.js +155 -0
- package/dist/model/EmailDomainDnsRecordPurpose.js +64 -0
- package/dist/model/EmailDomainList.js +132 -0
- package/dist/model/EmailDomainRecordState.js +64 -0
- package/dist/model/EmailDomainState.js +64 -0
- package/dist/model/ErrorCode.js +10 -0
- package/dist/model/ErrorDetail.js +1 -1
- package/dist/model/ErrorInfo.js +46 -7
- package/dist/model/ErrorResponse.js +1 -1
- package/dist/model/Field.js +3 -3
- package/dist/model/FieldComparisonCondition.js +1 -1
- package/dist/model/FieldDependency.js +1 -1
- package/dist/model/FieldDependencyInput.js +1 -1
- package/dist/model/FieldEqualsCondition.js +1 -1
- package/dist/model/FieldGroup.js +1 -1
- package/dist/model/FieldGroupInput.js +1 -1
- package/dist/model/FieldInCondition.js +1 -1
- package/dist/model/FieldInput.js +2 -2
- package/dist/model/FieldOverride.js +1 -1
- package/dist/model/FieldPresenceCondition.js +1 -1
- package/dist/model/FieldRangeCondition.js +1 -1
- package/dist/model/Folder.js +1 -1
- package/dist/model/FolderList.js +1 -1
- package/dist/model/GenerateSubmissionFilesRequest.js +1 -1
- package/dist/model/GeneratedFile.js +1 -1
- package/dist/model/HtmlEngineOptions.js +3 -3
- package/dist/model/HtmlEngineOptionsInput.js +2 -2
- package/dist/model/MoveFolderRequest.js +1 -1
- package/dist/model/MoveTemplateRequest.js +1 -1
- package/dist/model/PageImage.js +1 -1
- package/dist/model/PageImages.js +1 -1
- package/dist/model/PredefinedField.js +1 -1
- package/dist/model/PredefinedFieldInput.js +1 -1
- package/dist/model/PublishTemplateVersionRequest.js +1 -1
- package/dist/model/RemoveTemplateFieldsRequest.js +1 -1
- package/dist/model/RenameFolderRequest.js +1 -1
- package/dist/model/ReorderTemplateFieldsRequest.js +1 -1
- package/dist/model/RestoreTemplateVersionRequest.js +1 -1
- package/dist/model/SendAccountEmailActionTestEmailRequest.js +91 -0
- package/dist/model/SignatureRequest.js +52 -7
- package/dist/model/SignatureRequestEmailAttachments.js +59 -0
- package/dist/model/SignatureRequestEmailStatus.js +89 -0
- package/dist/model/SignatureRequestEvent.js +1 -1
- package/dist/model/SignatureRequestEventType.js +11 -1
- package/dist/model/SignatureRequestInput.js +24 -8
- package/dist/model/SignatureRequestReminders.js +121 -0
- package/dist/model/SignatureRequestToken.js +1 -1
- package/dist/model/SigningOrder.js +59 -0
- package/dist/model/StringConditionType.js +36 -1
- package/dist/model/Submission.js +21 -9
- package/dist/model/SubmissionAction.js +27 -12
- package/dist/model/SubmissionBatch.js +1 -1
- package/dist/model/SubmissionFiles.js +1 -1
- package/dist/model/SubmissionInput.js +4 -4
- package/dist/model/SubmissionList.js +1 -1
- package/dist/model/SubmissionSourcePdf.js +1 -1
- package/dist/model/SubmissionSummary.js +3 -3
- package/dist/model/SubmissionValidation.js +1 -1
- package/dist/model/Template.js +130 -19
- package/dist/model/TemplateActor.js +1 -1
- package/dist/model/TemplateDefaults.js +1 -1
- package/dist/model/TemplateDefaultsInput.js +1 -1
- package/dist/model/TemplateDiff.js +1 -1
- package/dist/model/TemplateDiffSummary.js +1 -1
- package/dist/model/TemplateDocument.js +1 -1
- package/dist/model/TemplateDocumentSummary.js +1 -1
- package/dist/model/TemplateFieldChange.js +1 -1
- package/dist/model/TemplateFieldChanges.js +1 -1
- package/dist/model/TemplateFieldDependency.js +1 -1
- package/dist/model/TemplateFieldDependencyCondition.js +1 -1
- package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
- package/dist/model/TemplateFieldDependencyInput.js +1 -1
- package/dist/model/TemplateFieldMove.js +1 -1
- package/dist/model/TemplateFields.js +1 -1
- package/dist/model/TemplateModelCode.js +1 -1
- package/dist/model/TemplatePageImages.js +1 -1
- package/dist/model/TemplatePageProcessingStatus.js +1 -1
- package/dist/model/TemplatePreview.js +1 -1
- package/dist/model/TemplateSourcePdf.js +2 -2
- package/dist/model/TemplateSummary.js +9 -9
- package/dist/model/TemplateSummaryList.js +1 -1
- package/dist/model/TemplateType.js +6 -1
- package/dist/model/TemplateVersion.js +1 -1
- package/dist/model/UpdateAccountEmailActionRequest.js +306 -0
- package/dist/model/UpdateEmailActionCustomizationRequest.js +258 -0
- package/dist/model/UpdateEmailActionRequest.js +280 -0
- package/dist/model/UpdateSignatureRequestRequest.js +1 -1
- package/dist/model/UpdateTemplateDocumentRequest.js +2 -2
- package/dist/model/UpdateTemplateFieldsRequest.js +1 -1
- package/dist/model/UpdateTemplateRequest.js +100 -5
- 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 +112 -4
- package/dist/model/Webhook.js +1 -1
- package/dist/model/WebhookEventType.js +10 -0
- package/dist/model/WebhookList.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* DocSpring API
|
|
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
|
+
*
|
|
19
|
+
* The version of the OpenAPI document: v2
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Enum class SigningOrder.
|
|
29
|
+
* @enum {}
|
|
30
|
+
* @readonly
|
|
31
|
+
*/
|
|
32
|
+
var SigningOrder = exports["default"] = /*#__PURE__*/function () {
|
|
33
|
+
function SigningOrder() {
|
|
34
|
+
_classCallCheck(this, SigningOrder);
|
|
35
|
+
}
|
|
36
|
+
return _createClass(SigningOrder, null, [{
|
|
37
|
+
key: "constructFromObject",
|
|
38
|
+
value:
|
|
39
|
+
/**
|
|
40
|
+
* Returns a <code>SigningOrder</code> enum value from a Javascript object name.
|
|
41
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
42
|
+
* @return {module:model/SigningOrder} The enum <code>SigningOrder</code> value.
|
|
43
|
+
*/
|
|
44
|
+
function constructFromObject(object) {
|
|
45
|
+
// Any value, including one added to the API after this client was released
|
|
46
|
+
return object;
|
|
47
|
+
}
|
|
48
|
+
}]);
|
|
49
|
+
}();
|
|
50
|
+
/**
|
|
51
|
+
* value: "parallel"
|
|
52
|
+
* @const
|
|
53
|
+
*/
|
|
54
|
+
_defineProperty(SigningOrder, "parallel", "parallel");
|
|
55
|
+
/**
|
|
56
|
+
* value: "sequential"
|
|
57
|
+
* @const
|
|
58
|
+
*/
|
|
59
|
+
_defineProperty(SigningOrder, "sequential", "sequential");
|
|
@@ -52,23 +52,58 @@ var StringConditionType = exports["default"] = /*#__PURE__*/function () {
|
|
|
52
52
|
* @const
|
|
53
53
|
*/
|
|
54
54
|
_defineProperty(StringConditionType, "equals", "equals");
|
|
55
|
+
/**
|
|
56
|
+
* value: "not_equals"
|
|
57
|
+
* @const
|
|
58
|
+
*/
|
|
59
|
+
_defineProperty(StringConditionType, "not_equals", "not_equals");
|
|
55
60
|
/**
|
|
56
61
|
* value: "contains"
|
|
57
62
|
* @const
|
|
58
63
|
*/
|
|
59
64
|
_defineProperty(StringConditionType, "contains", "contains");
|
|
65
|
+
/**
|
|
66
|
+
* value: "not_contains"
|
|
67
|
+
* @const
|
|
68
|
+
*/
|
|
69
|
+
_defineProperty(StringConditionType, "not_contains", "not_contains");
|
|
60
70
|
/**
|
|
61
71
|
* value: "starts_with"
|
|
62
72
|
* @const
|
|
63
73
|
*/
|
|
64
74
|
_defineProperty(StringConditionType, "starts_with", "starts_with");
|
|
75
|
+
/**
|
|
76
|
+
* value: "not_starts_with"
|
|
77
|
+
* @const
|
|
78
|
+
*/
|
|
79
|
+
_defineProperty(StringConditionType, "not_starts_with", "not_starts_with");
|
|
65
80
|
/**
|
|
66
81
|
* value: "ends_with"
|
|
67
82
|
* @const
|
|
68
83
|
*/
|
|
69
84
|
_defineProperty(StringConditionType, "ends_with", "ends_with");
|
|
85
|
+
/**
|
|
86
|
+
* value: "not_ends_with"
|
|
87
|
+
* @const
|
|
88
|
+
*/
|
|
89
|
+
_defineProperty(StringConditionType, "not_ends_with", "not_ends_with");
|
|
70
90
|
/**
|
|
71
91
|
* value: "regex"
|
|
72
92
|
* @const
|
|
73
93
|
*/
|
|
74
|
-
_defineProperty(StringConditionType, "regex", "regex");
|
|
94
|
+
_defineProperty(StringConditionType, "regex", "regex");
|
|
95
|
+
/**
|
|
96
|
+
* value: "not_regex"
|
|
97
|
+
* @const
|
|
98
|
+
*/
|
|
99
|
+
_defineProperty(StringConditionType, "not_regex", "not_regex");
|
|
100
|
+
/**
|
|
101
|
+
* value: "blank"
|
|
102
|
+
* @const
|
|
103
|
+
*/
|
|
104
|
+
_defineProperty(StringConditionType, "blank", "blank");
|
|
105
|
+
/**
|
|
106
|
+
* value: "not_blank"
|
|
107
|
+
* @const
|
|
108
|
+
*/
|
|
109
|
+
_defineProperty(StringConditionType, "not_blank", "not_blank");
|
package/dist/model/Submission.js
CHANGED
|
@@ -8,6 +8,7 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
|
8
8
|
var _ErrorDetail = _interopRequireDefault(require("./ErrorDetail"));
|
|
9
9
|
var _OutputFormat = _interopRequireDefault(require("./OutputFormat"));
|
|
10
10
|
var _SignatureRequest = _interopRequireDefault(require("./SignatureRequest"));
|
|
11
|
+
var _SigningOrder = _interopRequireDefault(require("./SigningOrder"));
|
|
11
12
|
var _SubmissionAction = _interopRequireDefault(require("./SubmissionAction"));
|
|
12
13
|
var _SubmissionFiles = _interopRequireDefault(require("./SubmissionFiles"));
|
|
13
14
|
var _SubmissionSource = _interopRequireDefault(require("./SubmissionSource"));
|
|
@@ -37,7 +38,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
37
38
|
/**
|
|
38
39
|
* The Submission model module.
|
|
39
40
|
* @module model/Submission
|
|
40
|
-
* @version 4.
|
|
41
|
+
* @version 4.4.0
|
|
41
42
|
*/
|
|
42
43
|
var Submission = /*#__PURE__*/function () {
|
|
43
44
|
/**
|
|
@@ -52,7 +53,7 @@ var Submission = /*#__PURE__*/function () {
|
|
|
52
53
|
* @param batch_id {String} The ID of the batch the submission was created in.
|
|
53
54
|
* @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
55
|
* @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
|
-
* @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
|
+
* @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, and the demo API token's are always live.
|
|
56
57
|
* @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
58
|
* @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
59
|
* @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.
|
|
@@ -66,14 +67,15 @@ var Submission = /*#__PURE__*/function () {
|
|
|
66
67
|
* @param updated_at {Date} When the submission was last updated.
|
|
67
68
|
* @param has_password {Boolean} Whether the PDF needs a password to open (`password`).
|
|
68
69
|
* @param signature_requests {Array.<module:model/SignatureRequest>} The people asked to sign the submission (and fill in their fields), in order.
|
|
69
|
-
* @param
|
|
70
|
+
* @param signing_order {module:model/SigningOrder} `parallel`: everyone can sign at once. `sequential`: people sign one step at a time (each signature request's `signing_step`).
|
|
71
|
+
* @param actions {Array.<module:model/SubmissionAction>} The uploads of the submission's PDF to your storage (account integrations), and the emails its template's email actions sent.
|
|
70
72
|
* @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
73
|
* @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
74
|
* @param preview_generated_at {Date} When the preview PDF was generated. Null if there is no preview.
|
|
73
75
|
*/
|
|
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) {
|
|
76
|
+
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, signing_order, actions, truncated_text, output_formats, preview_generated_at) {
|
|
75
77
|
_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, files, expired, expires_at, processed_at, created_at, updated_at, has_password, signature_requests, actions, truncated_text, output_formats, preview_generated_at);
|
|
78
|
+
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, signing_order, actions, truncated_text, output_formats, preview_generated_at);
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
/**
|
|
@@ -83,7 +85,7 @@ var Submission = /*#__PURE__*/function () {
|
|
|
83
85
|
*/
|
|
84
86
|
return _createClass(Submission, null, [{
|
|
85
87
|
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, files, expired, expires_at, processed_at, created_at, updated_at, has_password, signature_requests, actions, truncated_text, output_formats, preview_generated_at) {
|
|
88
|
+
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, signing_order, actions, truncated_text, output_formats, preview_generated_at) {
|
|
87
89
|
obj['id'] = id;
|
|
88
90
|
obj['template_id'] = template_id;
|
|
89
91
|
obj['template_type'] = template_type;
|
|
@@ -105,6 +107,7 @@ var Submission = /*#__PURE__*/function () {
|
|
|
105
107
|
obj['updated_at'] = updated_at;
|
|
106
108
|
obj['has_password'] = has_password;
|
|
107
109
|
obj['signature_requests'] = signature_requests;
|
|
110
|
+
obj['signing_order'] = signing_order;
|
|
108
111
|
obj['actions'] = actions;
|
|
109
112
|
obj['truncated_text'] = truncated_text;
|
|
110
113
|
obj['output_formats'] = output_formats;
|
|
@@ -191,6 +194,9 @@ var Submission = /*#__PURE__*/function () {
|
|
|
191
194
|
if (data.hasOwnProperty('signature_requests')) {
|
|
192
195
|
obj['signature_requests'] = _ApiClient["default"].convertToType(data['signature_requests'], [_SignatureRequest["default"]]);
|
|
193
196
|
}
|
|
197
|
+
if (data.hasOwnProperty('signing_order')) {
|
|
198
|
+
obj['signing_order'] = _ApiClient["default"].convertToType(data['signing_order'], _SigningOrder["default"]);
|
|
199
|
+
}
|
|
194
200
|
if (data.hasOwnProperty('actions')) {
|
|
195
201
|
obj['actions'] = _ApiClient["default"].convertToType(data['actions'], [_SubmissionAction["default"]]);
|
|
196
202
|
}
|
|
@@ -272,7 +278,7 @@ var Submission = /*#__PURE__*/function () {
|
|
|
272
278
|
}
|
|
273
279
|
}]);
|
|
274
280
|
}();
|
|
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"];
|
|
281
|
+
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", "signing_order", "actions", "truncated_text", "output_formats", "preview_generated_at"];
|
|
276
282
|
|
|
277
283
|
/**
|
|
278
284
|
* The submission's ID.
|
|
@@ -317,7 +323,7 @@ Submission.prototype['source'] = undefined;
|
|
|
317
323
|
Submission.prototype['state'] = undefined;
|
|
318
324
|
|
|
319
325
|
/**
|
|
320
|
-
* Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
|
|
326
|
+
* Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live.
|
|
321
327
|
* @member {Boolean} test
|
|
322
328
|
*/
|
|
323
329
|
Submission.prototype['test'] = undefined;
|
|
@@ -401,7 +407,13 @@ Submission.prototype['has_password'] = undefined;
|
|
|
401
407
|
Submission.prototype['signature_requests'] = undefined;
|
|
402
408
|
|
|
403
409
|
/**
|
|
404
|
-
*
|
|
410
|
+
* `parallel`: everyone can sign at once. `sequential`: people sign one step at a time (each signature request's `signing_step`).
|
|
411
|
+
* @member {module:model/SigningOrder} signing_order
|
|
412
|
+
*/
|
|
413
|
+
Submission.prototype['signing_order'] = undefined;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* The uploads of the submission's PDF to your storage (account integrations), and the emails its template's email actions sent.
|
|
405
417
|
* @member {Array.<module:model/SubmissionAction>} actions
|
|
406
418
|
*/
|
|
407
419
|
Submission.prototype['actions'] = undefined;
|
|
@@ -31,24 +31,25 @@ 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.
|
|
34
|
+
* @version 4.4.0
|
|
35
35
|
*/
|
|
36
36
|
var SubmissionAction = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
38
38
|
* Constructs a new <code>SubmissionAction</code>.
|
|
39
|
-
* An upload of a PDF to your storage, such as an S3 bucket.
|
|
39
|
+
* An upload of a PDF to your storage, such as an S3 bucket, or an email action's email.
|
|
40
40
|
* @alias module:model/SubmissionAction
|
|
41
41
|
* @extends Object
|
|
42
42
|
* @param id {String} The upload's ID.
|
|
43
43
|
* @param integration_id {String} The ID of the account integration it used.
|
|
44
|
-
* @param
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
44
|
+
* @param email_action_id {String} The ID of the email action that sent the email. Null for an upload, or once the email action is deleted.
|
|
45
|
+
* @param state {module:model/SubmissionActionState} `pending` until the upload or email has run, then `processed`. `failed`: your storage or the email service rejected it. `error`: it failed in DocSpring.
|
|
46
|
+
* @param action_type {module:model/SubmissionActionType} The kind of storage, such as `aws_s3_upload` for an S3 bucket, or `email` for an email action's email.
|
|
47
|
+
* @param result_data {Object.<String, Object>} Where the PDF was uploaded, such as the S3 bucket and key. For an email: its `subject`, `recipients`, each with its `address`, `kind` (`to`, `cc` or `bcc`), `source`, `field` or `metadata` when the address came from one, and `status` (`sent`, `delivered`, `bounced`, `complained`, `skipped` and others), `sent_at`, `delivery`, and `files` (the files it sent: `pdf`, `docx`, `odt`). An email whose submission didn't meet the email action's `send_when` conditions has only `skipped`, `conditions_not_met`, and its state is `processed`. An email whose submission made none of the files the email action sends has `skipped`, `no_files` and the action's `file_formats`, and its state is `processed` too. When the submission's data is left out (a batch, or a webhook without submission data), the subject and the addresses that came from fields or metadata are null.
|
|
47
48
|
* @param error_message {String} Why the upload failed, when `state` is `failed` or `error`.
|
|
48
49
|
*/
|
|
49
|
-
function SubmissionAction(id, integration_id, state, action_type, result_data, error_message) {
|
|
50
|
+
function SubmissionAction(id, integration_id, email_action_id, state, action_type, result_data, error_message) {
|
|
50
51
|
_classCallCheck(this, SubmissionAction);
|
|
51
|
-
SubmissionAction.initialize(this, id, integration_id, state, action_type, result_data, error_message);
|
|
52
|
+
SubmissionAction.initialize(this, id, integration_id, email_action_id, state, action_type, result_data, error_message);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
/**
|
|
@@ -58,9 +59,10 @@ var SubmissionAction = /*#__PURE__*/function () {
|
|
|
58
59
|
*/
|
|
59
60
|
return _createClass(SubmissionAction, null, [{
|
|
60
61
|
key: "initialize",
|
|
61
|
-
value: function initialize(obj, id, integration_id, state, action_type, result_data, error_message) {
|
|
62
|
+
value: function initialize(obj, id, integration_id, email_action_id, state, action_type, result_data, error_message) {
|
|
62
63
|
obj['id'] = id;
|
|
63
64
|
obj['integration_id'] = integration_id;
|
|
65
|
+
obj['email_action_id'] = email_action_id;
|
|
64
66
|
obj['state'] = state;
|
|
65
67
|
obj['action_type'] = action_type;
|
|
66
68
|
obj['result_data'] = result_data;
|
|
@@ -86,6 +88,9 @@ var SubmissionAction = /*#__PURE__*/function () {
|
|
|
86
88
|
if (data.hasOwnProperty('integration_id')) {
|
|
87
89
|
obj['integration_id'] = _ApiClient["default"].convertToType(data['integration_id'], 'String');
|
|
88
90
|
}
|
|
91
|
+
if (data.hasOwnProperty('email_action_id')) {
|
|
92
|
+
obj['email_action_id'] = _ApiClient["default"].convertToType(data['email_action_id'], 'String');
|
|
93
|
+
}
|
|
89
94
|
if (data.hasOwnProperty('state')) {
|
|
90
95
|
obj['state'] = _ApiClient["default"].convertToType(data['state'], _SubmissionActionState["default"]);
|
|
91
96
|
}
|
|
@@ -136,6 +141,10 @@ var SubmissionAction = /*#__PURE__*/function () {
|
|
|
136
141
|
throw new Error("Expected the field `integration_id` to be a primitive type in the JSON string but got " + data['integration_id']);
|
|
137
142
|
}
|
|
138
143
|
// ensure the json data is a string
|
|
144
|
+
if (data['email_action_id'] && !(typeof data['email_action_id'] === 'string' || data['email_action_id'] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `email_action_id` to be a primitive type in the JSON string but got " + data['email_action_id']);
|
|
146
|
+
}
|
|
147
|
+
// ensure the json data is a string
|
|
139
148
|
if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
|
|
140
149
|
throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
|
|
141
150
|
}
|
|
@@ -143,7 +152,7 @@ var SubmissionAction = /*#__PURE__*/function () {
|
|
|
143
152
|
}
|
|
144
153
|
}]);
|
|
145
154
|
}();
|
|
146
|
-
SubmissionAction.RequiredProperties = ["id", "integration_id", "state", "action_type", "result_data", "error_message"];
|
|
155
|
+
SubmissionAction.RequiredProperties = ["id", "integration_id", "email_action_id", "state", "action_type", "result_data", "error_message"];
|
|
147
156
|
|
|
148
157
|
/**
|
|
149
158
|
* The upload's ID.
|
|
@@ -158,19 +167,25 @@ SubmissionAction.prototype['id'] = undefined;
|
|
|
158
167
|
SubmissionAction.prototype['integration_id'] = undefined;
|
|
159
168
|
|
|
160
169
|
/**
|
|
161
|
-
*
|
|
170
|
+
* The ID of the email action that sent the email. Null for an upload, or once the email action is deleted.
|
|
171
|
+
* @member {String} email_action_id
|
|
172
|
+
*/
|
|
173
|
+
SubmissionAction.prototype['email_action_id'] = undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* `pending` until the upload or email has run, then `processed`. `failed`: your storage or the email service rejected it. `error`: it failed in DocSpring.
|
|
162
177
|
* @member {module:model/SubmissionActionState} state
|
|
163
178
|
*/
|
|
164
179
|
SubmissionAction.prototype['state'] = undefined;
|
|
165
180
|
|
|
166
181
|
/**
|
|
167
|
-
* The kind of storage, such as `aws_s3_upload` for an S3 bucket.
|
|
182
|
+
* The kind of storage, such as `aws_s3_upload` for an S3 bucket, or `email` for an email action's email.
|
|
168
183
|
* @member {module:model/SubmissionActionType} action_type
|
|
169
184
|
*/
|
|
170
185
|
SubmissionAction.prototype['action_type'] = undefined;
|
|
171
186
|
|
|
172
187
|
/**
|
|
173
|
-
* Where the PDF was uploaded, such as the S3 bucket and key.
|
|
188
|
+
* Where the PDF was uploaded, such as the S3 bucket and key. For an email: its `subject`, `recipients`, each with its `address`, `kind` (`to`, `cc` or `bcc`), `source`, `field` or `metadata` when the address came from one, and `status` (`sent`, `delivered`, `bounced`, `complained`, `skipped` and others), `sent_at`, `delivery`, and `files` (the files it sent: `pdf`, `docx`, `odt`). An email whose submission didn't meet the email action's `send_when` conditions has only `skipped`, `conditions_not_met`, and its state is `processed`. An email whose submission made none of the files the email action sends has `skipped`, `no_files` and the action's `file_formats`, and its state is `processed` too. When the submission's data is left out (a batch, or a webhook without submission data), the subject and the addresses that came from fields or metadata are null.
|
|
174
189
|
* @member {Object.<String, Object>} result_data
|
|
175
190
|
*/
|
|
176
191
|
SubmissionAction.prototype['result_data'] = undefined;
|
|
@@ -31,7 +31,7 @@ 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.
|
|
34
|
+
* @version 4.4.0
|
|
35
35
|
*/
|
|
36
36
|
var SubmissionBatch = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -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.
|
|
31
|
+
* @version 4.4.0
|
|
32
32
|
*/
|
|
33
33
|
var SubmissionFiles = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -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.
|
|
31
|
+
* @version 4.4.0
|
|
32
32
|
*/
|
|
33
33
|
var SubmissionInput = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -145,7 +145,7 @@ var SubmissionInput = /*#__PURE__*/function () {
|
|
|
145
145
|
}]);
|
|
146
146
|
}();
|
|
147
147
|
/**
|
|
148
|
-
* Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
|
|
148
|
+
* Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live.
|
|
149
149
|
* @member {Boolean} test
|
|
150
150
|
*/
|
|
151
151
|
SubmissionInput.prototype['test'] = undefined;
|
|
@@ -157,7 +157,7 @@ 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 PDF
|
|
160
|
+
* The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs.
|
|
161
161
|
* @member {Object.<String, Object>} data
|
|
162
162
|
*/
|
|
163
163
|
SubmissionInput.prototype['data'] = undefined;
|
|
@@ -181,7 +181,7 @@ SubmissionInput.prototype['password'] = undefined;
|
|
|
181
181
|
SubmissionInput.prototype['output_formats'] = undefined;
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
* 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.
|
|
184
|
+
* 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. The demo API token's submissions expire within an hour: up to 3600, and that's their default.
|
|
185
185
|
* @member {Number} expires_in
|
|
186
186
|
*/
|
|
187
187
|
SubmissionInput.prototype['expires_in'] = undefined;
|
|
@@ -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.
|
|
33
|
+
* @version 4.4.0
|
|
34
34
|
*/
|
|
35
35
|
var SubmissionList = /*#__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 SubmissionSourcePdf model module.
|
|
31
31
|
* @module model/SubmissionSourcePdf
|
|
32
|
-
* @version 4.
|
|
32
|
+
* @version 4.4.0
|
|
33
33
|
*/
|
|
34
34
|
var SubmissionSourcePdf = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -34,7 +34,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
34
34
|
/**
|
|
35
35
|
* The SubmissionSummary model module.
|
|
36
36
|
* @module model/SubmissionSummary
|
|
37
|
-
* @version 4.
|
|
37
|
+
* @version 4.4.0
|
|
38
38
|
*/
|
|
39
39
|
var SubmissionSummary = /*#__PURE__*/function () {
|
|
40
40
|
/**
|
|
@@ -49,7 +49,7 @@ var SubmissionSummary = /*#__PURE__*/function () {
|
|
|
49
49
|
* @param batch_id {String} The ID of the batch the submission was created in.
|
|
50
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
51
|
* @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`.
|
|
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.
|
|
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, and the demo API token's are always live.
|
|
53
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
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
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.
|
|
@@ -270,7 +270,7 @@ SubmissionSummary.prototype['source'] = undefined;
|
|
|
270
270
|
SubmissionSummary.prototype['state'] = undefined;
|
|
271
271
|
|
|
272
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.
|
|
273
|
+
* Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live.
|
|
274
274
|
* @member {Boolean} test
|
|
275
275
|
*/
|
|
276
276
|
SubmissionSummary.prototype['test'] = undefined;
|
|
@@ -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.
|
|
33
|
+
* @version 4.4.0
|
|
34
34
|
*/
|
|
35
35
|
var SubmissionValidation = /*#__PURE__*/function () {
|
|
36
36
|
/**
|