docspring 4.0.0 → 4.1.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 +10 -1
- package/dist/ApiClient.js +2 -2
- package/dist/RequestSchemas.js +1171 -16
- package/dist/api/Client.js +474 -24
- package/dist/index.js +196 -0
- package/dist/model/AddTemplateFieldsRequest.js +132 -0
- 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 +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 +1 -1
- 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 +15 -1
- package/dist/model/CreateTemplateRequest.js +71 -3
- 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/ErrorDetail.js +1 -1
- package/dist/model/ErrorInfo.js +1 -1
- 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 +23 -7
- 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 +15 -1
- package/dist/model/SubmissionList.js +1 -1
- package/dist/model/SubmissionSourcePdf.js +1 -1
- package/dist/model/SubmissionValidation.js +151 -0
- package/dist/model/Template.js +67 -5
- 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 +206 -0
- package/dist/model/TemplateDiffSummary.js +165 -0
- package/dist/model/TemplateDocument.js +7 -7
- package/dist/model/TemplateDocumentState.js +11 -1
- 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/TemplateSourcePdf.js +1 -1
- package/dist/model/TemplateSummary.js +1 -1
- 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 +74 -1
- 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 +1 -1
|
@@ -0,0 +1,183 @@
|
|
|
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 _FieldType = _interopRequireDefault(require("./FieldType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
19
|
+
* DocSpring API
|
|
20
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
21
|
+
*
|
|
22
|
+
* The version of the OpenAPI document: v2
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The PredefinedFieldInput model module.
|
|
32
|
+
* @module model/PredefinedFieldInput
|
|
33
|
+
* @version 4.1.0
|
|
34
|
+
*/
|
|
35
|
+
var PredefinedFieldInput = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>PredefinedFieldInput</code>.
|
|
38
|
+
* A field name that people using the embedded template editor can choose from, with the data type and settings a field gets when it's given that name.
|
|
39
|
+
* @alias module:model/PredefinedFieldInput
|
|
40
|
+
* @param name {String} The field's name, the key of its value in submission data. A `/` nests the key in objects and arrays (`customer/email`, `signers/0/name`).
|
|
41
|
+
* @param type {module:model/FieldType} The data type a field gets when it's given this name, as a field's `type`.
|
|
42
|
+
*/
|
|
43
|
+
function PredefinedFieldInput(name, type) {
|
|
44
|
+
_classCallCheck(this, PredefinedFieldInput);
|
|
45
|
+
PredefinedFieldInput.initialize(this, name, type);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(PredefinedFieldInput, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, name, type) {
|
|
56
|
+
obj['name'] = name;
|
|
57
|
+
obj['type'] = type;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>PredefinedFieldInput</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:model/PredefinedFieldInput} obj Optional instance to populate.
|
|
65
|
+
* @return {module:model/PredefinedFieldInput} The populated <code>PredefinedFieldInput</code> instance.
|
|
66
|
+
*/
|
|
67
|
+
}, {
|
|
68
|
+
key: "constructFromObject",
|
|
69
|
+
value: function constructFromObject(data, obj) {
|
|
70
|
+
if (data) {
|
|
71
|
+
obj = obj || new PredefinedFieldInput();
|
|
72
|
+
if (data.hasOwnProperty('name')) {
|
|
73
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('display_name')) {
|
|
76
|
+
obj['display_name'] = _ApiClient["default"].convertToType(data['display_name'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('title')) {
|
|
79
|
+
obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('type')) {
|
|
82
|
+
obj['type'] = _ApiClient["default"].convertToType(data['type'], _FieldType["default"]);
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('option_list')) {
|
|
85
|
+
obj['option_list'] = _ApiClient["default"].convertToType(data['option_list'], 'String');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('required_in_template')) {
|
|
88
|
+
obj['required_in_template'] = _ApiClient["default"].convertToType(data['required_in_template'], 'Boolean');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('field_required')) {
|
|
91
|
+
obj['field_required'] = _ApiClient["default"].convertToType(data['field_required'], 'Boolean');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return obj;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Validates the JSON data with respect to <code>PredefinedFieldInput</code>.
|
|
99
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
100
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PredefinedFieldInput</code>.
|
|
101
|
+
*/
|
|
102
|
+
}, {
|
|
103
|
+
key: "validateJSON",
|
|
104
|
+
value: function validateJSON(data) {
|
|
105
|
+
// check to make sure all required properties are present in the JSON string
|
|
106
|
+
var _iterator = _createForOfIteratorHelper(PredefinedFieldInput.RequiredProperties),
|
|
107
|
+
_step;
|
|
108
|
+
try {
|
|
109
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
110
|
+
var property = _step.value;
|
|
111
|
+
if (!data.hasOwnProperty(property)) {
|
|
112
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// ensure the json data is a string
|
|
116
|
+
} catch (err) {
|
|
117
|
+
_iterator.e(err);
|
|
118
|
+
} finally {
|
|
119
|
+
_iterator.f();
|
|
120
|
+
}
|
|
121
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
123
|
+
}
|
|
124
|
+
// ensure the json data is a string
|
|
125
|
+
if (data['display_name'] && !(typeof data['display_name'] === 'string' || data['display_name'] instanceof String)) {
|
|
126
|
+
throw new Error("Expected the field `display_name` to be a primitive type in the JSON string but got " + data['display_name']);
|
|
127
|
+
}
|
|
128
|
+
// ensure the json data is a string
|
|
129
|
+
if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
if (data['option_list'] && !(typeof data['option_list'] === 'string' || data['option_list'] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `option_list` to be a primitive type in the JSON string but got " + data['option_list']);
|
|
135
|
+
}
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}]);
|
|
139
|
+
}();
|
|
140
|
+
PredefinedFieldInput.RequiredProperties = ["name", "type"];
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The field's name, the key of its value in submission data. A `/` nests the key in objects and arrays (`customer/email`, `signers/0/name`).
|
|
144
|
+
* @member {String} name
|
|
145
|
+
*/
|
|
146
|
+
PredefinedFieldInput.prototype['name'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The name the template editor shows instead of `name`, where a `/` puts it in a folder, such as `Defendant/Name`. Null shows `name`. Two names can't share a display name.
|
|
150
|
+
* @member {String} display_name
|
|
151
|
+
*/
|
|
152
|
+
PredefinedFieldInput.prototype['display_name'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The Title setting a field gets when it's given this name. Null leaves the field's title as it is.
|
|
156
|
+
* @member {String} title
|
|
157
|
+
*/
|
|
158
|
+
PredefinedFieldInput.prototype['title'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The data type a field gets when it's given this name, as a field's `type`.
|
|
162
|
+
* @member {module:model/FieldType} type
|
|
163
|
+
*/
|
|
164
|
+
PredefinedFieldInput.prototype['type'] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* String fields only: the values allowed, separated by commas, such as `Yes,No`. Null allows any value.
|
|
168
|
+
* @member {String} option_list
|
|
169
|
+
*/
|
|
170
|
+
PredefinedFieldInput.prototype['option_list'] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Whether the template must have a field with this name. The embedded editor shows the names that are missing, and with `disableDoneButtonIfPredefinedFieldsMissing` keeps its Done button disabled until the template has them. Default false.
|
|
174
|
+
* @member {Boolean} required_in_template
|
|
175
|
+
*/
|
|
176
|
+
PredefinedFieldInput.prototype['required_in_template'] = undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The Required setting a field gets when it's given this name. Default true.
|
|
180
|
+
* @member {Boolean} field_required
|
|
181
|
+
*/
|
|
182
|
+
PredefinedFieldInput.prototype['field_required'] = undefined;
|
|
183
|
+
var _default = exports["default"] = PredefinedFieldInput;
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
30
30
|
/**
|
|
31
31
|
* The PublishTemplateVersionRequest model module.
|
|
32
32
|
* @module model/PublishTemplateVersionRequest
|
|
33
|
-
* @version 4.
|
|
33
|
+
* @version 4.1.0
|
|
34
34
|
*/
|
|
35
35
|
var PublishTemplateVersionRequest = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -0,0 +1,114 @@
|
|
|
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 RemoveTemplateFieldsRequest model module.
|
|
31
|
+
* @module model/RemoveTemplateFieldsRequest
|
|
32
|
+
* @version 4.1.0
|
|
33
|
+
*/
|
|
34
|
+
var RemoveTemplateFieldsRequest = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>RemoveTemplateFieldsRequest</code>.
|
|
37
|
+
* The fields to remove from the template's draft.
|
|
38
|
+
* @alias module:model/RemoveTemplateFieldsRequest
|
|
39
|
+
* @param field_ids {Array.<Number>} The IDs of the fields to remove.
|
|
40
|
+
*/
|
|
41
|
+
function RemoveTemplateFieldsRequest(field_ids) {
|
|
42
|
+
_classCallCheck(this, RemoveTemplateFieldsRequest);
|
|
43
|
+
RemoveTemplateFieldsRequest.initialize(this, field_ids);
|
|
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(RemoveTemplateFieldsRequest, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, field_ids) {
|
|
54
|
+
obj['field_ids'] = field_ids;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>RemoveTemplateFieldsRequest</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/RemoveTemplateFieldsRequest} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/RemoveTemplateFieldsRequest} The populated <code>RemoveTemplateFieldsRequest</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new RemoveTemplateFieldsRequest();
|
|
69
|
+
if (data.hasOwnProperty('field_ids')) {
|
|
70
|
+
obj['field_ids'] = _ApiClient["default"].convertToType(data['field_ids'], ['Number']);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>RemoveTemplateFieldsRequest</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RemoveTemplateFieldsRequest</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
// check to make sure all required properties are present in the JSON string
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(RemoveTemplateFieldsRequest.RequiredProperties),
|
|
86
|
+
_step;
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var property = _step.value;
|
|
90
|
+
if (!data.hasOwnProperty(property)) {
|
|
91
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is an array
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
if (!Array.isArray(data['field_ids'])) {
|
|
101
|
+
throw new Error("Expected the field `field_ids` to be an array in the JSON data but got " + data['field_ids']);
|
|
102
|
+
}
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
}]);
|
|
106
|
+
}();
|
|
107
|
+
RemoveTemplateFieldsRequest.RequiredProperties = ["field_ids"];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The IDs of the fields to remove.
|
|
111
|
+
* @member {Array.<Number>} field_ids
|
|
112
|
+
*/
|
|
113
|
+
RemoveTemplateFieldsRequest.prototype['field_ids'] = undefined;
|
|
114
|
+
var _default = exports["default"] = RemoveTemplateFieldsRequest;
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
29
29
|
/**
|
|
30
30
|
* The RenameFolderRequest model module.
|
|
31
31
|
* @module model/RenameFolderRequest
|
|
32
|
-
* @version 4.
|
|
32
|
+
* @version 4.1.0
|
|
33
33
|
*/
|
|
34
34
|
var RenameFolderRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -0,0 +1,114 @@
|
|
|
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 ReorderTemplateFieldsRequest model module.
|
|
31
|
+
* @module model/ReorderTemplateFieldsRequest
|
|
32
|
+
* @version 4.1.0
|
|
33
|
+
*/
|
|
34
|
+
var ReorderTemplateFieldsRequest = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>ReorderTemplateFieldsRequest</code>.
|
|
37
|
+
* The new order of the fields in the template's draft.
|
|
38
|
+
* @alias module:model/ReorderTemplateFieldsRequest
|
|
39
|
+
* @param field_ids {Array.<Number>} The ID of every field, in the new order. Each field stays on its page, and a page's fields take the order their IDs have here: the order they're printed in (a later field prints over an earlier one where they overlap), and the order of their values in the template's data schema and forms.
|
|
40
|
+
*/
|
|
41
|
+
function ReorderTemplateFieldsRequest(field_ids) {
|
|
42
|
+
_classCallCheck(this, ReorderTemplateFieldsRequest);
|
|
43
|
+
ReorderTemplateFieldsRequest.initialize(this, field_ids);
|
|
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(ReorderTemplateFieldsRequest, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, field_ids) {
|
|
54
|
+
obj['field_ids'] = field_ids;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>ReorderTemplateFieldsRequest</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/ReorderTemplateFieldsRequest} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/ReorderTemplateFieldsRequest} The populated <code>ReorderTemplateFieldsRequest</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new ReorderTemplateFieldsRequest();
|
|
69
|
+
if (data.hasOwnProperty('field_ids')) {
|
|
70
|
+
obj['field_ids'] = _ApiClient["default"].convertToType(data['field_ids'], ['Number']);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>ReorderTemplateFieldsRequest</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ReorderTemplateFieldsRequest</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
// check to make sure all required properties are present in the JSON string
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(ReorderTemplateFieldsRequest.RequiredProperties),
|
|
86
|
+
_step;
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var property = _step.value;
|
|
90
|
+
if (!data.hasOwnProperty(property)) {
|
|
91
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is an array
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
if (!Array.isArray(data['field_ids'])) {
|
|
101
|
+
throw new Error("Expected the field `field_ids` to be an array in the JSON data but got " + data['field_ids']);
|
|
102
|
+
}
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
}]);
|
|
106
|
+
}();
|
|
107
|
+
ReorderTemplateFieldsRequest.RequiredProperties = ["field_ids"];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The ID of every field, in the new order. Each field stays on its page, and a page's fields take the order their IDs have here: the order they're printed in (a later field prints over an earlier one where they overlap), and the order of their values in the template's data schema and forms.
|
|
111
|
+
* @member {Array.<Number>} field_ids
|
|
112
|
+
*/
|
|
113
|
+
ReorderTemplateFieldsRequest.prototype['field_ids'] = undefined;
|
|
114
|
+
var _default = exports["default"] = ReorderTemplateFieldsRequest;
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
29
29
|
/**
|
|
30
30
|
* The RestoreTemplateVersionRequest model module.
|
|
31
31
|
* @module model/RestoreTemplateVersionRequest
|
|
32
|
-
* @version 4.
|
|
32
|
+
* @version 4.1.0
|
|
33
33
|
*/
|
|
34
34
|
var RestoreTemplateVersionRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -32,7 +32,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
32
32
|
/**
|
|
33
33
|
* The SignatureRequest model module.
|
|
34
34
|
* @module model/SignatureRequest
|
|
35
|
-
* @version 4.
|
|
35
|
+
* @version 4.1.0
|
|
36
36
|
*/
|
|
37
37
|
var SignatureRequest = /*#__PURE__*/function () {
|
|
38
38
|
/**
|
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
31
31
|
/**
|
|
32
32
|
* The SignatureRequestEvent model module.
|
|
33
33
|
* @module model/SignatureRequestEvent
|
|
34
|
-
* @version 4.
|
|
34
|
+
* @version 4.1.0
|
|
35
35
|
*/
|
|
36
36
|
var SignatureRequestEvent = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
31
31
|
/**
|
|
32
32
|
* The SignatureRequestInput model module.
|
|
33
33
|
* @module model/SignatureRequestInput
|
|
34
|
-
* @version 4.
|
|
34
|
+
* @version 4.1.0
|
|
35
35
|
*/
|
|
36
36
|
var SignatureRequestInput = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
30
30
|
/**
|
|
31
31
|
* The SignatureRequestToken model module.
|
|
32
32
|
* @module model/SignatureRequestToken
|
|
33
|
-
* @version 4.
|
|
33
|
+
* @version 4.1.0
|
|
34
34
|
*/
|
|
35
35
|
var SignatureRequestToken = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
package/dist/model/Submission.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ErrorDetail = _interopRequireDefault(require("./ErrorDetail"));
|
|
9
|
+
var _OutputFormat = _interopRequireDefault(require("./OutputFormat"));
|
|
9
10
|
var _SignatureRequest = _interopRequireDefault(require("./SignatureRequest"));
|
|
10
11
|
var _SubmissionAction = _interopRequireDefault(require("./SubmissionAction"));
|
|
11
12
|
var _SubmissionFiles = _interopRequireDefault(require("./SubmissionFiles"));
|
|
@@ -36,7 +37,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
36
37
|
/**
|
|
37
38
|
* The Submission model module.
|
|
38
39
|
* @module model/Submission
|
|
39
|
-
* @version 4.
|
|
40
|
+
* @version 4.1.0
|
|
40
41
|
*/
|
|
41
42
|
var Submission = /*#__PURE__*/function () {
|
|
42
43
|
/**
|
|
@@ -61,7 +62,8 @@ var Submission = /*#__PURE__*/function () {
|
|
|
61
62
|
* @param signature_requests {Array.<module:model/SignatureRequest>} The people asked to sign the submission (and fill in their fields), in order.
|
|
62
63
|
* @param actions {Array.<module:model/SubmissionAction>} The uploads of the submission's PDF to your storage (account integrations).
|
|
63
64
|
* @param truncated_text {Object.<String, Array.<String>>} The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired.
|
|
64
|
-
* @param
|
|
65
|
+
* @param output_formats {Array.<module:model/OutputFormat>} What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
|
|
66
|
+
* @param files {module:model/SubmissionFiles} The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
|
|
65
67
|
* @param preview_generated_at {Date} When the preview PDF was generated. Null if there is no preview.
|
|
66
68
|
* @param expired {Boolean} An expired submission's data, metadata, password and PDF have been deleted.
|
|
67
69
|
* @param expires_at {Date} When the submission expires. Null if it's kept until you delete it.
|
|
@@ -69,9 +71,9 @@ var Submission = /*#__PURE__*/function () {
|
|
|
69
71
|
* @param created_at {Date} When the submission was created.
|
|
70
72
|
* @param updated_at {Date} When the submission was last updated.
|
|
71
73
|
*/
|
|
72
|
-
function Submission(id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at) {
|
|
74
|
+
function Submission(id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, output_formats, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at) {
|
|
73
75
|
_classCallCheck(this, Submission);
|
|
74
|
-
Submission.initialize(this, id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at);
|
|
76
|
+
Submission.initialize(this, id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, output_formats, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at);
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
/**
|
|
@@ -81,7 +83,7 @@ var Submission = /*#__PURE__*/function () {
|
|
|
81
83
|
*/
|
|
82
84
|
return _createClass(Submission, null, [{
|
|
83
85
|
key: "initialize",
|
|
84
|
-
value: function initialize(obj, id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at) {
|
|
86
|
+
value: function initialize(obj, id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, output_formats, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at) {
|
|
85
87
|
obj['id'] = id;
|
|
86
88
|
obj['template_id'] = template_id;
|
|
87
89
|
obj['template_type'] = template_type;
|
|
@@ -99,6 +101,7 @@ var Submission = /*#__PURE__*/function () {
|
|
|
99
101
|
obj['signature_requests'] = signature_requests;
|
|
100
102
|
obj['actions'] = actions;
|
|
101
103
|
obj['truncated_text'] = truncated_text;
|
|
104
|
+
obj['output_formats'] = output_formats;
|
|
102
105
|
obj['files'] = files;
|
|
103
106
|
obj['preview_generated_at'] = preview_generated_at;
|
|
104
107
|
obj['expired'] = expired;
|
|
@@ -178,6 +181,9 @@ var Submission = /*#__PURE__*/function () {
|
|
|
178
181
|
'String': ['String']
|
|
179
182
|
});
|
|
180
183
|
}
|
|
184
|
+
if (data.hasOwnProperty('output_formats')) {
|
|
185
|
+
obj['output_formats'] = _ApiClient["default"].convertToType(data['output_formats'], [_OutputFormat["default"]]);
|
|
186
|
+
}
|
|
181
187
|
if (data.hasOwnProperty('files')) {
|
|
182
188
|
obj['files'] = _ApiClient["default"].convertToType(data['files'], _SubmissionFiles["default"]);
|
|
183
189
|
}
|
|
@@ -258,11 +264,15 @@ var Submission = /*#__PURE__*/function () {
|
|
|
258
264
|
if (!Array.isArray(data['actions'])) {
|
|
259
265
|
throw new Error("Expected the field `actions` to be an array in the JSON data but got " + data['actions']);
|
|
260
266
|
}
|
|
267
|
+
// ensure the json data is an array
|
|
268
|
+
if (!Array.isArray(data['output_formats'])) {
|
|
269
|
+
throw new Error("Expected the field `output_formats` to be an array in the JSON data but got " + data['output_formats']);
|
|
270
|
+
}
|
|
261
271
|
return true;
|
|
262
272
|
}
|
|
263
273
|
}]);
|
|
264
274
|
}();
|
|
265
|
-
Submission.RequiredProperties = ["id", "template_id", "template_type", "template_version", "batch_id", "source", "state", "test", "editable", "data", "data_errors", "error_message", "metadata", "has_password", "signature_requests", "actions", "truncated_text", "files", "preview_generated_at", "expired", "expires_at", "processed_at", "created_at", "updated_at"];
|
|
275
|
+
Submission.RequiredProperties = ["id", "template_id", "template_type", "template_version", "batch_id", "source", "state", "test", "editable", "data", "data_errors", "error_message", "metadata", "has_password", "signature_requests", "actions", "truncated_text", "output_formats", "files", "preview_generated_at", "expired", "expires_at", "processed_at", "created_at", "updated_at"];
|
|
266
276
|
|
|
267
277
|
/**
|
|
268
278
|
* The submission's ID.
|
|
@@ -367,7 +377,13 @@ Submission.prototype['actions'] = undefined;
|
|
|
367
377
|
Submission.prototype['truncated_text'] = undefined;
|
|
368
378
|
|
|
369
379
|
/**
|
|
370
|
-
*
|
|
380
|
+
* What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
|
|
381
|
+
* @member {Array.<module:model/OutputFormat>} output_formats
|
|
382
|
+
*/
|
|
383
|
+
Submission.prototype['output_formats'] = undefined;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
|
|
371
387
|
* @member {module:model/SubmissionFiles} files
|
|
372
388
|
*/
|
|
373
389
|
Submission.prototype['files'] = undefined;
|
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
31
31
|
/**
|
|
32
32
|
* The SubmissionAction model module.
|
|
33
33
|
* @module model/SubmissionAction
|
|
34
|
-
* @version 4.
|
|
34
|
+
* @version 4.1.0
|
|
35
35
|
*/
|
|
36
36
|
var SubmissionAction = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
31
31
|
/**
|
|
32
32
|
* The SubmissionBatch model module.
|
|
33
33
|
* @module model/SubmissionBatch
|
|
34
|
-
* @version 4.
|
|
34
|
+
* @version 4.1.0
|
|
35
35
|
*/
|
|
36
36
|
var SubmissionBatch = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _GeneratedFile = _interopRequireDefault(require("./GeneratedFile"));
|
|
9
|
+
var _PageImages = _interopRequireDefault(require("./PageImages"));
|
|
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); }
|
|
11
12
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -27,7 +28,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
27
28
|
/**
|
|
28
29
|
* The SubmissionFiles model module.
|
|
29
30
|
* @module model/SubmissionFiles
|
|
30
|
-
* @version 4.
|
|
31
|
+
* @version 4.1.0
|
|
31
32
|
*/
|
|
32
33
|
var SubmissionFiles = /*#__PURE__*/function () {
|
|
33
34
|
/**
|
|
@@ -72,6 +73,9 @@ var SubmissionFiles = /*#__PURE__*/function () {
|
|
|
72
73
|
if (data.hasOwnProperty('preview')) {
|
|
73
74
|
obj['preview'] = _ApiClient["default"].convertToType(data['preview'], _GeneratedFile["default"]);
|
|
74
75
|
}
|
|
76
|
+
if (data.hasOwnProperty('png')) {
|
|
77
|
+
obj['png'] = data['png'] === null ? null : _PageImages["default"].constructFromObject(data['png']);
|
|
78
|
+
}
|
|
75
79
|
}
|
|
76
80
|
return obj;
|
|
77
81
|
}
|
|
@@ -105,4 +109,9 @@ SubmissionFiles.prototype['audit_trail'] = undefined;
|
|
|
105
109
|
* @member {module:model/GeneratedFile} preview
|
|
106
110
|
*/
|
|
107
111
|
SubmissionFiles.prototype['preview'] = undefined;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @member {module:model/PageImages} png
|
|
115
|
+
*/
|
|
116
|
+
SubmissionFiles.prototype['png'] = undefined;
|
|
108
117
|
var _default = exports["default"] = SubmissionFiles;
|