docspring 3.3.0 → 4.0.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 +79 -19
- package/README.md +65 -63
- package/dist/ApiClient.js +63 -28
- package/dist/RequestSchemas.js +2297 -0
- package/dist/RequestValidator.js +494 -0
- package/dist/api/Client.js +1346 -948
- package/dist/index.js +651 -154
- package/dist/model/AiFieldNamingLanguage.js +64 -0
- package/dist/model/{CreateWebhookData.js → AuthenticationCheck.js} +32 -28
- package/dist/model/BarcodeSymbology.js +89 -0
- package/dist/model/CheckCharacter.js +74 -0
- package/dist/model/CombinedFieldType.js +59 -0
- package/dist/model/CombinedPdf.js +294 -0
- package/dist/model/{MoveFolderData.js → CombinedPdfFiles.js} +27 -27
- package/dist/model/CombinedPdfList.js +132 -0
- package/dist/model/{ForbiddenErrorResponse.js → CombinedPdfSource.js} +59 -73
- package/dist/model/CombinedPdfSourceInput.js +270 -0
- package/dist/model/CombinedPdfSourcePdf.js +130 -0
- package/dist/model/CombinedPdfSourceType.js +74 -0
- package/dist/model/CombinedPdfState.js +74 -0
- package/dist/model/{CopyTemplateOptions.js → CopyTemplateRequest.js} +26 -22
- package/dist/model/{CombinePdfsData.js → CreateCombinedPdfRequest.js} +69 -53
- package/dist/model/{CreateCustomFileData.js → CreateCustomFileFromUploadRequest.js} +25 -23
- package/dist/model/{CreateFolderData.js → CreateFolderRequest.js} +47 -28
- package/dist/model/{TemplateDeleteResponse.js → CreateSignatureRequestEventRequest.js} +49 -74
- package/dist/model/CreateSignatureRequestTokenRequest.js +88 -0
- package/dist/model/{SubmissionBatchData.js → CreateSubmissionBatchRequest.js} +67 -42
- package/dist/model/CreateSubmissionRequest.js +212 -0
- package/dist/model/CreateTemplateRequest.js +545 -0
- package/dist/model/CreateWebhookRequest.js +234 -0
- package/dist/model/CustomFile.js +67 -16
- package/dist/model/CustomFileList.js +132 -0
- package/dist/model/CustomFileSourcePdf.js +130 -0
- package/dist/model/ErrorCode.js +154 -0
- package/dist/model/{CreateSubmissionResponse.js → ErrorDetail.js} +65 -75
- package/dist/model/ErrorInfo.js +211 -0
- package/dist/model/ErrorResponse.js +12 -41
- package/dist/model/ExpirationInterval.js +64 -0
- package/dist/model/FieldComparisonCondition.js +137 -0
- package/dist/model/FieldComparisonOperator.js +69 -0
- package/dist/model/FieldDisplayType.js +79 -0
- package/dist/model/{MultipleErrorsResponse.js → FieldEqualsCondition.js} +48 -52
- package/dist/model/FieldEqualsOperator.js +59 -0
- package/dist/model/{SuccessMultipleErrorsResponse.js → FieldInCondition.js} +54 -53
- package/dist/model/FieldOverride.js +722 -0
- package/dist/model/FieldPresenceCondition.js +126 -0
- package/dist/model/FieldPresenceOperator.js +59 -0
- package/dist/model/FieldRangeCondition.js +148 -0
- package/dist/model/FieldReimportState.js +69 -0
- package/dist/model/FieldSetupLogic.js +59 -0
- package/dist/model/FieldSetupNaming.js +59 -0
- package/dist/model/FieldSetupSource.js +64 -0
- package/dist/model/Folder.js +38 -11
- package/dist/model/FolderList.js +132 -0
- package/dist/model/GeneratedFile.js +214 -0
- package/dist/model/GeneratedFileState.js +64 -0
- package/dist/model/HtmlEngineOptions.js +230 -0
- package/dist/model/HtmlEngineOptionsInput.js +193 -0
- package/dist/model/ImageGravity.js +94 -0
- package/dist/model/ImageScaleType.js +64 -0
- package/dist/model/ModelCodeLanguage.js +94 -0
- package/dist/model/{UpdatePdfTemplate.js → MoveFolderRequest.js} +34 -28
- package/dist/model/{MoveTemplateData.js → MoveTemplateRequest.js} +25 -35
- package/dist/model/NumberConditionType.js +79 -0
- package/dist/model/PageFormat.js +114 -0
- package/dist/model/{PublishVersionData.js → PublishTemplateVersionRequest.js} +33 -33
- package/dist/model/{RenameFolderData.js → RenameFolderRequest.js} +25 -23
- package/dist/model/{RestoreVersionData.js → RestoreTemplateVersionRequest.js} +25 -23
- package/dist/model/ShapeType.js +79 -0
- package/dist/model/{SubmissionDataRequestShow.js → SignatureRequest.js} +165 -240
- package/dist/model/SignatureRequestAuthSecondFactorType.js +79 -0
- package/dist/model/SignatureRequestAuthType.js +84 -0
- package/dist/model/{SubmissionDataRequestEvent.js → SignatureRequestEvent.js} +67 -149
- package/dist/model/SignatureRequestEventType.js +79 -0
- package/dist/model/SignatureRequestInput.js +278 -0
- package/dist/model/SignatureRequestMessageType.js +94 -0
- package/dist/model/SignatureRequestState.js +64 -0
- package/dist/model/SignatureRequestToken.js +195 -0
- package/dist/model/SignatureRequestTokenType.js +59 -0
- package/dist/model/StringConditionType.js +74 -0
- package/dist/model/Submission.js +186 -345
- package/dist/model/SubmissionAction.js +30 -115
- package/dist/model/SubmissionActionState.js +69 -0
- package/dist/model/SubmissionActionType.js +84 -0
- package/dist/model/SubmissionBatch.js +74 -55
- package/dist/model/SubmissionBatchState.js +64 -0
- package/dist/model/SubmissionFiles.js +108 -0
- package/dist/model/SubmissionInput.js +204 -0
- package/dist/model/{ListSubmissionsResponse.js → SubmissionList.js} +35 -42
- package/dist/model/SubmissionSource.js +69 -0
- package/dist/model/SubmissionSourcePdf.js +130 -0
- package/dist/model/SubmissionState.js +114 -0
- package/dist/model/Template.js +310 -573
- package/dist/model/TemplateActor.js +171 -0
- package/dist/model/TemplateActorType.js +64 -0
- package/dist/model/TemplateDefaults.js +307 -0
- package/dist/model/TemplateDefaultsInput.js +305 -0
- package/dist/model/TemplateDocument.js +280 -0
- package/dist/model/TemplateDocumentState.js +74 -0
- package/dist/model/{CreatePdfSubmissionData.js → TemplateFieldDependency.js} +70 -89
- package/dist/model/TemplateFieldDependencyAction.js +64 -0
- package/dist/model/{TemplatePublishVersionResponse.js → TemplateFieldDependencyCondition.js} +51 -61
- package/dist/model/TemplateFieldDependencyConditionInput.js +304 -0
- package/dist/model/TemplateFieldDependencyInput.js +182 -0
- package/dist/model/TemplateFieldDependencyMatch.js +59 -0
- package/dist/model/TemplateFieldDependencyOperator.js +99 -0
- package/dist/model/TemplateFieldLogicStatus.js +74 -0
- package/dist/model/TemplateFormMode.js +64 -0
- package/dist/model/{TemplateModelCodeResponse.js → TemplateModelCode.js} +34 -86
- package/dist/model/TemplatePageAiError.js +69 -0
- package/dist/model/TemplatePageAiNamingStatus.js +59 -0
- package/dist/model/TemplatePageFieldsStatus.js +74 -0
- package/dist/model/TemplatePageImageStatus.js +59 -0
- package/dist/model/TemplatePageProcessingStatus.js +162 -0
- package/dist/model/{SubmissionDataRequestToken.js → TemplateSourcePdf.js} +52 -56
- package/dist/model/TemplateSummary.js +560 -0
- package/dist/model/{SuccessErrorResponse.js → TemplateSummaryList.js} +43 -55
- package/dist/model/TemplateType.js +59 -0
- package/dist/model/{Submission422Response.js → TemplateVersion.js} +60 -63
- package/dist/model/TemplateVersionType.js +64 -0
- package/dist/model/TextAlignment.js +69 -0
- package/dist/model/TextOverflow.js +59 -0
- package/dist/model/TextVerticalAlignment.js +64 -0
- package/dist/model/Typeface.js +134 -0
- package/dist/model/UpdateSignatureRequestRequest.js +183 -0
- package/dist/model/UpdateTemplateDocumentRequest.js +136 -0
- package/dist/model/UpdateTemplateRequest.js +450 -0
- package/dist/model/UpdateWebhookRequest.js +209 -0
- package/dist/model/UploadMethod.js +54 -0
- package/dist/model/{UploadPresignResponse.js → UploadPresign.js} +53 -58
- package/dist/model/{AddFieldsData.js → UrlSourcePdf.js} +49 -31
- package/dist/model/Webhook.js +58 -73
- package/dist/model/WebhookEventType.js +174 -0
- package/dist/model/WebhookList.js +132 -0
- package/dist/model/WebhookMode.js +59 -0
- package/package.json +1 -1
- package/dist/model/BatchGeneratePdfs201Response.js +0 -194
- package/dist/model/CombinedSubmission.js +0 -313
- package/dist/model/CombinedSubmissionAction.js +0 -268
- package/dist/model/CreateCombinedSubmissionResponse.js +0 -180
- package/dist/model/CreateCustomFileResponse.js +0 -167
- package/dist/model/CreateHtmlTemplate.js +0 -108
- package/dist/model/CreatePdfTemplate.js +0 -108
- package/dist/model/CreateSubmissionDataRequestData.js +0 -314
- package/dist/model/CreateSubmissionDataRequestEventRequest.js +0 -239
- package/dist/model/CreateSubmissionDataRequestEventResponse.js +0 -167
- package/dist/model/CreateSubmissionDataRequestResponse.js +0 -167
- package/dist/model/CreateSubmissionDataRequestTokenResponse.js +0 -167
- package/dist/model/ErrorOrMultipleErrorsResponse.js +0 -153
- package/dist/model/JsonSchema.js +0 -205
- package/dist/model/SubmissionBatchWithSubmissions.js +0 -228
- package/dist/model/SubmissionDataRequest.js +0 -496
- package/dist/model/SubmissionPreview.js +0 -509
- package/dist/model/TemplateAddFieldsResponse.js +0 -156
- package/dist/model/TemplatePreview.js +0 -796
- package/dist/model/UpdateHtmlTemplate.js +0 -108
- package/dist/model/UpdateSubmissionDataRequestData.js +0 -311
- package/dist/model/UpdateWebhookData.js +0 -108
|
@@ -0,0 +1,305 @@
|
|
|
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 _CheckCharacter = _interopRequireDefault(require("./CheckCharacter"));
|
|
9
|
+
var _TextAlignment = _interopRequireDefault(require("./TextAlignment"));
|
|
10
|
+
var _Typeface = _interopRequireDefault(require("./Typeface"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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); }
|
|
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 TemplateDefaultsInput model module.
|
|
31
|
+
* @module model/TemplateDefaultsInput
|
|
32
|
+
* @version 4.0.0
|
|
33
|
+
*/
|
|
34
|
+
var TemplateDefaultsInput = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>TemplateDefaultsInput</code>.
|
|
37
|
+
* The default style of the template's fields. Each field can override it.
|
|
38
|
+
* @alias module:model/TemplateDefaultsInput
|
|
39
|
+
*/
|
|
40
|
+
function TemplateDefaultsInput() {
|
|
41
|
+
_classCallCheck(this, TemplateDefaultsInput);
|
|
42
|
+
TemplateDefaultsInput.initialize(this);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(TemplateDefaultsInput, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>TemplateDefaultsInput</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
+
* @param {module:model/TemplateDefaultsInput} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/TemplateDefaultsInput} The populated <code>TemplateDefaultsInput</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
}, {
|
|
62
|
+
key: "constructFromObject",
|
|
63
|
+
value: function constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new TemplateDefaultsInput();
|
|
66
|
+
if (data.hasOwnProperty('typeface')) {
|
|
67
|
+
obj['typeface'] = _ApiClient["default"].convertToType(data['typeface'], _Typeface["default"]);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('font_size')) {
|
|
70
|
+
obj['font_size'] = _ApiClient["default"].convertToType(data['font_size'], 'Number');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('character_spacing')) {
|
|
73
|
+
obj['character_spacing'] = _ApiClient["default"].convertToType(data['character_spacing'], 'Number');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('color')) {
|
|
76
|
+
obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('background_color')) {
|
|
79
|
+
obj['background_color'] = _ApiClient["default"].convertToType(data['background_color'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('bold')) {
|
|
82
|
+
obj['bold'] = _ApiClient["default"].convertToType(data['bold'], 'Boolean');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('uppercase')) {
|
|
85
|
+
obj['uppercase'] = _ApiClient["default"].convertToType(data['uppercase'], 'Boolean');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('alignment')) {
|
|
88
|
+
obj['alignment'] = _ApiClient["default"].convertToType(data['alignment'], _TextAlignment["default"]);
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('opacity')) {
|
|
91
|
+
obj['opacity'] = _ApiClient["default"].convertToType(data['opacity'], 'Number');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('date_format')) {
|
|
94
|
+
obj['date_format'] = _ApiClient["default"].convertToType(data['date_format'], 'String');
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('date_time_format')) {
|
|
97
|
+
obj['date_time_format'] = _ApiClient["default"].convertToType(data['date_time_format'], 'String');
|
|
98
|
+
}
|
|
99
|
+
if (data.hasOwnProperty('check_color')) {
|
|
100
|
+
obj['check_color'] = _ApiClient["default"].convertToType(data['check_color'], 'String');
|
|
101
|
+
}
|
|
102
|
+
if (data.hasOwnProperty('check_character')) {
|
|
103
|
+
obj['check_character'] = _ApiClient["default"].convertToType(data['check_character'], _CheckCharacter["default"]);
|
|
104
|
+
}
|
|
105
|
+
if (data.hasOwnProperty('check_background_color')) {
|
|
106
|
+
obj['check_background_color'] = _ApiClient["default"].convertToType(data['check_background_color'], 'String');
|
|
107
|
+
}
|
|
108
|
+
if (data.hasOwnProperty('required_field_background_color')) {
|
|
109
|
+
obj['required_field_background_color'] = _ApiClient["default"].convertToType(data['required_field_background_color'], 'String');
|
|
110
|
+
}
|
|
111
|
+
if (data.hasOwnProperty('true_text')) {
|
|
112
|
+
obj['true_text'] = _ApiClient["default"].convertToType(data['true_text'], 'String');
|
|
113
|
+
}
|
|
114
|
+
if (data.hasOwnProperty('false_text')) {
|
|
115
|
+
obj['false_text'] = _ApiClient["default"].convertToType(data['false_text'], 'String');
|
|
116
|
+
}
|
|
117
|
+
if (data.hasOwnProperty('shape_fill_color')) {
|
|
118
|
+
obj['shape_fill_color'] = _ApiClient["default"].convertToType(data['shape_fill_color'], 'String');
|
|
119
|
+
}
|
|
120
|
+
if (data.hasOwnProperty('shape_border_color')) {
|
|
121
|
+
obj['shape_border_color'] = _ApiClient["default"].convertToType(data['shape_border_color'], 'String');
|
|
122
|
+
}
|
|
123
|
+
if (data.hasOwnProperty('shape_border_width')) {
|
|
124
|
+
obj['shape_border_width'] = _ApiClient["default"].convertToType(data['shape_border_width'], 'Number');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return obj;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Validates the JSON data with respect to <code>TemplateDefaultsInput</code>.
|
|
132
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
133
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplateDefaultsInput</code>.
|
|
134
|
+
*/
|
|
135
|
+
}, {
|
|
136
|
+
key: "validateJSON",
|
|
137
|
+
value: function validateJSON(data) {
|
|
138
|
+
// ensure the json data is a string
|
|
139
|
+
if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) {
|
|
140
|
+
throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']);
|
|
141
|
+
}
|
|
142
|
+
// ensure the json data is a string
|
|
143
|
+
if (data['background_color'] && !(typeof data['background_color'] === 'string' || data['background_color'] instanceof String)) {
|
|
144
|
+
throw new Error("Expected the field `background_color` to be a primitive type in the JSON string but got " + data['background_color']);
|
|
145
|
+
}
|
|
146
|
+
// ensure the json data is a string
|
|
147
|
+
if (data['date_format'] && !(typeof data['date_format'] === 'string' || data['date_format'] instanceof String)) {
|
|
148
|
+
throw new Error("Expected the field `date_format` to be a primitive type in the JSON string but got " + data['date_format']);
|
|
149
|
+
}
|
|
150
|
+
// ensure the json data is a string
|
|
151
|
+
if (data['date_time_format'] && !(typeof data['date_time_format'] === 'string' || data['date_time_format'] instanceof String)) {
|
|
152
|
+
throw new Error("Expected the field `date_time_format` to be a primitive type in the JSON string but got " + data['date_time_format']);
|
|
153
|
+
}
|
|
154
|
+
// ensure the json data is a string
|
|
155
|
+
if (data['check_color'] && !(typeof data['check_color'] === 'string' || data['check_color'] instanceof String)) {
|
|
156
|
+
throw new Error("Expected the field `check_color` to be a primitive type in the JSON string but got " + data['check_color']);
|
|
157
|
+
}
|
|
158
|
+
// ensure the json data is a string
|
|
159
|
+
if (data['check_background_color'] && !(typeof data['check_background_color'] === 'string' || data['check_background_color'] instanceof String)) {
|
|
160
|
+
throw new Error("Expected the field `check_background_color` to be a primitive type in the JSON string but got " + data['check_background_color']);
|
|
161
|
+
}
|
|
162
|
+
// ensure the json data is a string
|
|
163
|
+
if (data['required_field_background_color'] && !(typeof data['required_field_background_color'] === 'string' || data['required_field_background_color'] instanceof String)) {
|
|
164
|
+
throw new Error("Expected the field `required_field_background_color` to be a primitive type in the JSON string but got " + data['required_field_background_color']);
|
|
165
|
+
}
|
|
166
|
+
// ensure the json data is a string
|
|
167
|
+
if (data['true_text'] && !(typeof data['true_text'] === 'string' || data['true_text'] instanceof String)) {
|
|
168
|
+
throw new Error("Expected the field `true_text` to be a primitive type in the JSON string but got " + data['true_text']);
|
|
169
|
+
}
|
|
170
|
+
// ensure the json data is a string
|
|
171
|
+
if (data['false_text'] && !(typeof data['false_text'] === 'string' || data['false_text'] instanceof String)) {
|
|
172
|
+
throw new Error("Expected the field `false_text` to be a primitive type in the JSON string but got " + data['false_text']);
|
|
173
|
+
}
|
|
174
|
+
// ensure the json data is a string
|
|
175
|
+
if (data['shape_fill_color'] && !(typeof data['shape_fill_color'] === 'string' || data['shape_fill_color'] instanceof String)) {
|
|
176
|
+
throw new Error("Expected the field `shape_fill_color` to be a primitive type in the JSON string but got " + data['shape_fill_color']);
|
|
177
|
+
}
|
|
178
|
+
// ensure the json data is a string
|
|
179
|
+
if (data['shape_border_color'] && !(typeof data['shape_border_color'] === 'string' || data['shape_border_color'] instanceof String)) {
|
|
180
|
+
throw new Error("Expected the field `shape_border_color` to be a primitive type in the JSON string but got " + data['shape_border_color']);
|
|
181
|
+
}
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
}]);
|
|
185
|
+
}();
|
|
186
|
+
/**
|
|
187
|
+
* The font of text fields.
|
|
188
|
+
* @member {module:model/Typeface} typeface
|
|
189
|
+
*/
|
|
190
|
+
TemplateDefaultsInput.prototype['typeface'] = undefined;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* The font size in points, a whole number.
|
|
194
|
+
* @member {Number} font_size
|
|
195
|
+
*/
|
|
196
|
+
TemplateDefaultsInput.prototype['font_size'] = undefined;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Extra space between characters, in points (0 to 50).
|
|
200
|
+
* @member {Number} character_spacing
|
|
201
|
+
*/
|
|
202
|
+
TemplateDefaultsInput.prototype['character_spacing'] = undefined;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* The text color, as 6 hex digits without `#`, such as `444444`.
|
|
206
|
+
* @member {String} color
|
|
207
|
+
*/
|
|
208
|
+
TemplateDefaultsInput.prototype['color'] = undefined;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The field's background color, as 6 hex digits.
|
|
212
|
+
* @member {String} background_color
|
|
213
|
+
*/
|
|
214
|
+
TemplateDefaultsInput.prototype['background_color'] = undefined;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Print text in bold.
|
|
218
|
+
* @member {Boolean} bold
|
|
219
|
+
*/
|
|
220
|
+
TemplateDefaultsInput.prototype['bold'] = undefined;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Print text in capital letters.
|
|
224
|
+
* @member {Boolean} uppercase
|
|
225
|
+
*/
|
|
226
|
+
TemplateDefaultsInput.prototype['uppercase'] = undefined;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* How text is aligned in its field. `justify` lines up both edges of every line of multiline text except the last of each paragraph.
|
|
230
|
+
* @member {module:model/TextAlignment} alignment
|
|
231
|
+
*/
|
|
232
|
+
TemplateDefaultsInput.prototype['alignment'] = undefined;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The opacity of the field's content, from 0 (invisible) to 1.
|
|
236
|
+
* @member {Number} opacity
|
|
237
|
+
*/
|
|
238
|
+
TemplateDefaultsInput.prototype['opacity'] = undefined;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* How date fields are printed, as a strftime format such as `%m/%d/%Y`.
|
|
242
|
+
* @member {String} date_format
|
|
243
|
+
*/
|
|
244
|
+
TemplateDefaultsInput.prototype['date_format'] = undefined;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* How date-time fields are printed, as a strftime format such as `%m/%d/%Y %H:%M:%S`.
|
|
248
|
+
* @member {String} date_time_format
|
|
249
|
+
*/
|
|
250
|
+
TemplateDefaultsInput.prototype['date_time_format'] = undefined;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The color of check marks, as 6 hex digits.
|
|
254
|
+
* @member {String} check_color
|
|
255
|
+
*/
|
|
256
|
+
TemplateDefaultsInput.prototype['check_color'] = undefined;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* The character that a ticked check box prints.
|
|
260
|
+
* @member {module:model/CheckCharacter} check_character
|
|
261
|
+
*/
|
|
262
|
+
TemplateDefaultsInput.prototype['check_character'] = undefined;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* The check box's background color, as 6 hex digits.
|
|
266
|
+
* @member {String} check_background_color
|
|
267
|
+
*/
|
|
268
|
+
TemplateDefaultsInput.prototype['check_background_color'] = undefined;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The background color that highlights required fields on visual forms and signature request forms, as 6 hex digits. PDFs don't print it.
|
|
272
|
+
* @member {String} required_field_background_color
|
|
273
|
+
*/
|
|
274
|
+
TemplateDefaultsInput.prototype['required_field_background_color'] = undefined;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* The text a boolean field prints for `true`.
|
|
278
|
+
* @member {String} true_text
|
|
279
|
+
*/
|
|
280
|
+
TemplateDefaultsInput.prototype['true_text'] = undefined;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* The text a boolean field prints for `false`.
|
|
284
|
+
* @member {String} false_text
|
|
285
|
+
*/
|
|
286
|
+
TemplateDefaultsInput.prototype['false_text'] = undefined;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* The fill color of shapes, as 6 hex digits.
|
|
290
|
+
* @member {String} shape_fill_color
|
|
291
|
+
*/
|
|
292
|
+
TemplateDefaultsInput.prototype['shape_fill_color'] = undefined;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* The border color of shapes, as 6 hex digits.
|
|
296
|
+
* @member {String} shape_border_color
|
|
297
|
+
*/
|
|
298
|
+
TemplateDefaultsInput.prototype['shape_border_color'] = undefined;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* The border width of shapes, in whole points (at least 1).
|
|
302
|
+
* @member {Number} shape_border_width
|
|
303
|
+
*/
|
|
304
|
+
TemplateDefaultsInput.prototype['shape_border_width'] = undefined;
|
|
305
|
+
var _default = exports["default"] = TemplateDefaultsInput;
|
|
@@ -0,0 +1,280 @@
|
|
|
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 _FieldReimportState = _interopRequireDefault(require("./FieldReimportState"));
|
|
9
|
+
var _TemplateDocumentState = _interopRequireDefault(require("./TemplateDocumentState"));
|
|
10
|
+
var _TemplateFieldLogicStatus = _interopRequireDefault(require("./TemplateFieldLogicStatus"));
|
|
11
|
+
var _TemplatePageProcessingStatus = _interopRequireDefault(require("./TemplatePageProcessingStatus"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; } } }; }
|
|
15
|
+
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; } }
|
|
16
|
+
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; }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
+
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); } /**
|
|
22
|
+
* DocSpring API
|
|
23
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
24
|
+
*
|
|
25
|
+
* The version of the OpenAPI document: v2
|
|
26
|
+
*
|
|
27
|
+
*
|
|
28
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
29
|
+
* https://openapi-generator.tech
|
|
30
|
+
* Do not edit the class manually.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* The TemplateDocument model module.
|
|
35
|
+
* @module model/TemplateDocument
|
|
36
|
+
* @version 4.0.0
|
|
37
|
+
*/
|
|
38
|
+
var TemplateDocument = /*#__PURE__*/function () {
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a new <code>TemplateDocument</code>.
|
|
41
|
+
* A PDF template's PDF.
|
|
42
|
+
* @alias module:model/TemplateDocument
|
|
43
|
+
* @param filename {String} The PDF's file name.
|
|
44
|
+
* @param md5 {String} The MD5 hash of the PDF.
|
|
45
|
+
* @param state {module:model/TemplateDocumentState} `pending` while DocSpring processes the PDF, then `processed`. `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one.
|
|
46
|
+
* @param error_message {String} Why the PDF couldn't be processed, and how to fix it. Null unless `state` is an error.
|
|
47
|
+
* @param field_reimport_state {module:model/FieldReimportState} Whether the fields are being re-imported from this PDF (`reimport_fields` when the PDF was replaced): `requested` while DocSpring processes the PDF, then `imported`, or `no_fields` when the PDF had no fillable fields and the template kept its fields. `none` when no re-import was asked for, or when it couldn't run (the PDF couldn't be processed, or the template was locked or published while it was).
|
|
48
|
+
* @param page_count {Number} 0 until the PDF has been processed.
|
|
49
|
+
* @param page_dimensions {Array.<Array.<Number>>} Each page's width and height in PDF points. Null until the PDF has been processed.
|
|
50
|
+
* @param has_fillable_fields {Boolean} Whether the PDF has fillable form fields. Null until DocSpring has read the PDF.
|
|
51
|
+
* @param page_processing_statuses {Array.<module:model/TemplatePageProcessingStatus>} How processing is going on each page, in page order: its image, and its fields when DocSpring sets them up (`detect_fields` when the template was created). `state` becomes `processed` once every page is done. Empty until DocSpring has read the PDF, and for PDFs uploaded before DocSpring recorded page statuses.
|
|
52
|
+
* @param field_logic_status {module:model/TemplateFieldLogicStatus} AI field setup's last step, which reads the whole form once every page is done and can still rename fields and add conditional logic and required fields: `pending` or `processing` until it finishes, then `processed`, `failed` or `skipped`. Null until every page is done, and when there's no logic step to run (`field_logic` is `none`, or the PDF has no fields).
|
|
53
|
+
* @param download_url {String} A temporary link to download the PDF.
|
|
54
|
+
* @param permanent_url {String} A link to download the PDF that doesn't expire. Null until the PDF has been processed.
|
|
55
|
+
*/
|
|
56
|
+
function TemplateDocument(filename, md5, state, error_message, field_reimport_state, page_count, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url) {
|
|
57
|
+
_classCallCheck(this, TemplateDocument);
|
|
58
|
+
TemplateDocument.initialize(this, filename, md5, state, error_message, field_reimport_state, page_count, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Initializes the fields of this object.
|
|
63
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
64
|
+
* Only for internal use.
|
|
65
|
+
*/
|
|
66
|
+
return _createClass(TemplateDocument, null, [{
|
|
67
|
+
key: "initialize",
|
|
68
|
+
value: function initialize(obj, filename, md5, state, error_message, field_reimport_state, page_count, page_dimensions, has_fillable_fields, page_processing_statuses, field_logic_status, download_url, permanent_url) {
|
|
69
|
+
obj['filename'] = filename;
|
|
70
|
+
obj['md5'] = md5;
|
|
71
|
+
obj['state'] = state;
|
|
72
|
+
obj['error_message'] = error_message;
|
|
73
|
+
obj['field_reimport_state'] = field_reimport_state;
|
|
74
|
+
obj['page_count'] = page_count;
|
|
75
|
+
obj['page_dimensions'] = page_dimensions;
|
|
76
|
+
obj['has_fillable_fields'] = has_fillable_fields;
|
|
77
|
+
obj['page_processing_statuses'] = page_processing_statuses;
|
|
78
|
+
obj['field_logic_status'] = field_logic_status;
|
|
79
|
+
obj['download_url'] = download_url;
|
|
80
|
+
obj['permanent_url'] = permanent_url;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Constructs a <code>TemplateDocument</code> from a plain JavaScript object, optionally creating a new instance.
|
|
85
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
86
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
87
|
+
* @param {module:model/TemplateDocument} obj Optional instance to populate.
|
|
88
|
+
* @return {module:model/TemplateDocument} The populated <code>TemplateDocument</code> instance.
|
|
89
|
+
*/
|
|
90
|
+
}, {
|
|
91
|
+
key: "constructFromObject",
|
|
92
|
+
value: function constructFromObject(data, obj) {
|
|
93
|
+
if (data) {
|
|
94
|
+
obj = obj || new TemplateDocument();
|
|
95
|
+
if (data.hasOwnProperty('filename')) {
|
|
96
|
+
obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('md5')) {
|
|
99
|
+
obj['md5'] = _ApiClient["default"].convertToType(data['md5'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('state')) {
|
|
102
|
+
obj['state'] = _ApiClient["default"].convertToType(data['state'], _TemplateDocumentState["default"]);
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('error_message')) {
|
|
105
|
+
obj['error_message'] = _ApiClient["default"].convertToType(data['error_message'], 'String');
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('field_reimport_state')) {
|
|
108
|
+
obj['field_reimport_state'] = _ApiClient["default"].convertToType(data['field_reimport_state'], _FieldReimportState["default"]);
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('page_count')) {
|
|
111
|
+
obj['page_count'] = _ApiClient["default"].convertToType(data['page_count'], 'Number');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('page_dimensions')) {
|
|
114
|
+
obj['page_dimensions'] = _ApiClient["default"].convertToType(data['page_dimensions'], [['Number']]);
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('has_fillable_fields')) {
|
|
117
|
+
obj['has_fillable_fields'] = _ApiClient["default"].convertToType(data['has_fillable_fields'], 'Boolean');
|
|
118
|
+
}
|
|
119
|
+
if (data.hasOwnProperty('page_processing_statuses')) {
|
|
120
|
+
obj['page_processing_statuses'] = _ApiClient["default"].convertToType(data['page_processing_statuses'], [_TemplatePageProcessingStatus["default"]]);
|
|
121
|
+
}
|
|
122
|
+
if (data.hasOwnProperty('field_logic_status')) {
|
|
123
|
+
obj['field_logic_status'] = _ApiClient["default"].convertToType(data['field_logic_status'], _TemplateFieldLogicStatus["default"]);
|
|
124
|
+
}
|
|
125
|
+
if (data.hasOwnProperty('download_url')) {
|
|
126
|
+
obj['download_url'] = _ApiClient["default"].convertToType(data['download_url'], 'String');
|
|
127
|
+
}
|
|
128
|
+
if (data.hasOwnProperty('permanent_url')) {
|
|
129
|
+
obj['permanent_url'] = _ApiClient["default"].convertToType(data['permanent_url'], 'String');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return obj;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Validates the JSON data with respect to <code>TemplateDocument</code>.
|
|
137
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
138
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplateDocument</code>.
|
|
139
|
+
*/
|
|
140
|
+
}, {
|
|
141
|
+
key: "validateJSON",
|
|
142
|
+
value: function validateJSON(data) {
|
|
143
|
+
// check to make sure all required properties are present in the JSON string
|
|
144
|
+
var _iterator = _createForOfIteratorHelper(TemplateDocument.RequiredProperties),
|
|
145
|
+
_step;
|
|
146
|
+
try {
|
|
147
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
148
|
+
var property = _step.value;
|
|
149
|
+
if (!data.hasOwnProperty(property)) {
|
|
150
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// ensure the json data is a string
|
|
154
|
+
} catch (err) {
|
|
155
|
+
_iterator.e(err);
|
|
156
|
+
} finally {
|
|
157
|
+
_iterator.f();
|
|
158
|
+
}
|
|
159
|
+
if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) {
|
|
160
|
+
throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']);
|
|
161
|
+
}
|
|
162
|
+
// ensure the json data is a string
|
|
163
|
+
if (data['md5'] && !(typeof data['md5'] === 'string' || data['md5'] instanceof String)) {
|
|
164
|
+
throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data['md5']);
|
|
165
|
+
}
|
|
166
|
+
// ensure the json data is a string
|
|
167
|
+
if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
|
|
168
|
+
throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
|
|
169
|
+
}
|
|
170
|
+
// ensure the json data is an array
|
|
171
|
+
if (!Array.isArray(data['page_dimensions'])) {
|
|
172
|
+
throw new Error("Expected the field `page_dimensions` to be an array in the JSON data but got " + data['page_dimensions']);
|
|
173
|
+
}
|
|
174
|
+
if (data['page_processing_statuses']) {
|
|
175
|
+
// data not null
|
|
176
|
+
// ensure the json data is an array
|
|
177
|
+
if (!Array.isArray(data['page_processing_statuses'])) {
|
|
178
|
+
throw new Error("Expected the field `page_processing_statuses` to be an array in the JSON data but got " + data['page_processing_statuses']);
|
|
179
|
+
}
|
|
180
|
+
// validate the optional field `page_processing_statuses` (array)
|
|
181
|
+
var _iterator2 = _createForOfIteratorHelper(data['page_processing_statuses']),
|
|
182
|
+
_step2;
|
|
183
|
+
try {
|
|
184
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
185
|
+
var item = _step2.value;
|
|
186
|
+
_TemplatePageProcessingStatus["default"].validateJSON(item);
|
|
187
|
+
}
|
|
188
|
+
} catch (err) {
|
|
189
|
+
_iterator2.e(err);
|
|
190
|
+
} finally {
|
|
191
|
+
_iterator2.f();
|
|
192
|
+
}
|
|
193
|
+
;
|
|
194
|
+
}
|
|
195
|
+
// ensure the json data is a string
|
|
196
|
+
if (data['download_url'] && !(typeof data['download_url'] === 'string' || data['download_url'] instanceof String)) {
|
|
197
|
+
throw new Error("Expected the field `download_url` to be a primitive type in the JSON string but got " + data['download_url']);
|
|
198
|
+
}
|
|
199
|
+
// ensure the json data is a string
|
|
200
|
+
if (data['permanent_url'] && !(typeof data['permanent_url'] === 'string' || data['permanent_url'] instanceof String)) {
|
|
201
|
+
throw new Error("Expected the field `permanent_url` to be a primitive type in the JSON string but got " + data['permanent_url']);
|
|
202
|
+
}
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
}]);
|
|
206
|
+
}();
|
|
207
|
+
TemplateDocument.RequiredProperties = ["filename", "md5", "state", "error_message", "field_reimport_state", "page_count", "page_dimensions", "has_fillable_fields", "page_processing_statuses", "field_logic_status", "download_url", "permanent_url"];
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The PDF's file name.
|
|
211
|
+
* @member {String} filename
|
|
212
|
+
*/
|
|
213
|
+
TemplateDocument.prototype['filename'] = undefined;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The MD5 hash of the PDF.
|
|
217
|
+
* @member {String} md5
|
|
218
|
+
*/
|
|
219
|
+
TemplateDocument.prototype['md5'] = undefined;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* `pending` while DocSpring processes the PDF, then `processed`. `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one.
|
|
223
|
+
* @member {module:model/TemplateDocumentState} state
|
|
224
|
+
*/
|
|
225
|
+
TemplateDocument.prototype['state'] = undefined;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Why the PDF couldn't be processed, and how to fix it. Null unless `state` is an error.
|
|
229
|
+
* @member {String} error_message
|
|
230
|
+
*/
|
|
231
|
+
TemplateDocument.prototype['error_message'] = undefined;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Whether the fields are being re-imported from this PDF (`reimport_fields` when the PDF was replaced): `requested` while DocSpring processes the PDF, then `imported`, or `no_fields` when the PDF had no fillable fields and the template kept its fields. `none` when no re-import was asked for, or when it couldn't run (the PDF couldn't be processed, or the template was locked or published while it was).
|
|
235
|
+
* @member {module:model/FieldReimportState} field_reimport_state
|
|
236
|
+
*/
|
|
237
|
+
TemplateDocument.prototype['field_reimport_state'] = undefined;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* 0 until the PDF has been processed.
|
|
241
|
+
* @member {Number} page_count
|
|
242
|
+
*/
|
|
243
|
+
TemplateDocument.prototype['page_count'] = undefined;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Each page's width and height in PDF points. Null until the PDF has been processed.
|
|
247
|
+
* @member {Array.<Array.<Number>>} page_dimensions
|
|
248
|
+
*/
|
|
249
|
+
TemplateDocument.prototype['page_dimensions'] = undefined;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Whether the PDF has fillable form fields. Null until DocSpring has read the PDF.
|
|
253
|
+
* @member {Boolean} has_fillable_fields
|
|
254
|
+
*/
|
|
255
|
+
TemplateDocument.prototype['has_fillable_fields'] = undefined;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* How processing is going on each page, in page order: its image, and its fields when DocSpring sets them up (`detect_fields` when the template was created). `state` becomes `processed` once every page is done. Empty until DocSpring has read the PDF, and for PDFs uploaded before DocSpring recorded page statuses.
|
|
259
|
+
* @member {Array.<module:model/TemplatePageProcessingStatus>} page_processing_statuses
|
|
260
|
+
*/
|
|
261
|
+
TemplateDocument.prototype['page_processing_statuses'] = undefined;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* AI field setup's last step, which reads the whole form once every page is done and can still rename fields and add conditional logic and required fields: `pending` or `processing` until it finishes, then `processed`, `failed` or `skipped`. Null until every page is done, and when there's no logic step to run (`field_logic` is `none`, or the PDF has no fields).
|
|
265
|
+
* @member {module:model/TemplateFieldLogicStatus} field_logic_status
|
|
266
|
+
*/
|
|
267
|
+
TemplateDocument.prototype['field_logic_status'] = undefined;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* A temporary link to download the PDF.
|
|
271
|
+
* @member {String} download_url
|
|
272
|
+
*/
|
|
273
|
+
TemplateDocument.prototype['download_url'] = undefined;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* A link to download the PDF that doesn't expire. Null until the PDF has been processed.
|
|
277
|
+
* @member {String} permanent_url
|
|
278
|
+
*/
|
|
279
|
+
TemplateDocument.prototype['permanent_url'] = undefined;
|
|
280
|
+
var _default = exports["default"] = TemplateDocument;
|
|
@@ -0,0 +1,74 @@
|
|
|
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 programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or 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 TemplateDocumentState.
|
|
29
|
+
* @enum {}
|
|
30
|
+
* @readonly
|
|
31
|
+
*/
|
|
32
|
+
var TemplateDocumentState = exports["default"] = /*#__PURE__*/function () {
|
|
33
|
+
function TemplateDocumentState() {
|
|
34
|
+
_classCallCheck(this, TemplateDocumentState);
|
|
35
|
+
}
|
|
36
|
+
return _createClass(TemplateDocumentState, null, [{
|
|
37
|
+
key: "constructFromObject",
|
|
38
|
+
value:
|
|
39
|
+
/**
|
|
40
|
+
* Returns a <code>TemplateDocumentState</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/TemplateDocumentState} The enum <code>TemplateDocumentState</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: "pending"
|
|
52
|
+
* @const
|
|
53
|
+
*/
|
|
54
|
+
_defineProperty(TemplateDocumentState, "pending", "pending");
|
|
55
|
+
/**
|
|
56
|
+
* value: "processed"
|
|
57
|
+
* @const
|
|
58
|
+
*/
|
|
59
|
+
_defineProperty(TemplateDocumentState, "processed", "processed");
|
|
60
|
+
/**
|
|
61
|
+
* value: "password_required"
|
|
62
|
+
* @const
|
|
63
|
+
*/
|
|
64
|
+
_defineProperty(TemplateDocumentState, "password_required", "password_required");
|
|
65
|
+
/**
|
|
66
|
+
* value: "malformed_pdf"
|
|
67
|
+
* @const
|
|
68
|
+
*/
|
|
69
|
+
_defineProperty(TemplateDocumentState, "malformed_pdf", "malformed_pdf");
|
|
70
|
+
/**
|
|
71
|
+
* value: "unknown_error"
|
|
72
|
+
* @const
|
|
73
|
+
*/
|
|
74
|
+
_defineProperty(TemplateDocumentState, "unknown_error", "unknown_error");
|