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,171 @@
|
|
|
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 _TemplateActorType = _interopRequireDefault(require("./TemplateActorType"));
|
|
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 TemplateActor model module.
|
|
32
|
+
* @module model/TemplateActor
|
|
33
|
+
* @version 4.0.0
|
|
34
|
+
*/
|
|
35
|
+
var TemplateActor = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>TemplateActor</code>.
|
|
38
|
+
* A user in your account, an API token, or someone using the embedded template editor.
|
|
39
|
+
* @alias module:model/TemplateActor
|
|
40
|
+
* @param type {module:model/TemplateActorType} `user`: a user in your account. `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
|
|
41
|
+
* @param user_id {String} The user's ID, for `user`.
|
|
42
|
+
* @param external_id {String} The ID your app gave the embedded editor's user, for `external_user`.
|
|
43
|
+
* @param name {String} The user's name, or the name your app gave the embedded editor's user.
|
|
44
|
+
* @param email {String} The email address your app gave the embedded editor's user, for `external_user`.
|
|
45
|
+
*/
|
|
46
|
+
function TemplateActor(type, user_id, external_id, name, email) {
|
|
47
|
+
_classCallCheck(this, TemplateActor);
|
|
48
|
+
TemplateActor.initialize(this, type, user_id, external_id, name, email);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Initializes the fields of this object.
|
|
53
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
54
|
+
* Only for internal use.
|
|
55
|
+
*/
|
|
56
|
+
return _createClass(TemplateActor, null, [{
|
|
57
|
+
key: "initialize",
|
|
58
|
+
value: function initialize(obj, type, user_id, external_id, name, email) {
|
|
59
|
+
obj['type'] = type;
|
|
60
|
+
obj['user_id'] = user_id;
|
|
61
|
+
obj['external_id'] = external_id;
|
|
62
|
+
obj['name'] = name;
|
|
63
|
+
obj['email'] = email;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Constructs a <code>TemplateActor</code> from a plain JavaScript object, optionally creating a new instance.
|
|
68
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
69
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
70
|
+
* @param {module:model/TemplateActor} obj Optional instance to populate.
|
|
71
|
+
* @return {module:model/TemplateActor} The populated <code>TemplateActor</code> instance.
|
|
72
|
+
*/
|
|
73
|
+
}, {
|
|
74
|
+
key: "constructFromObject",
|
|
75
|
+
value: function constructFromObject(data, obj) {
|
|
76
|
+
if (data) {
|
|
77
|
+
obj = obj || new TemplateActor();
|
|
78
|
+
if (data.hasOwnProperty('type')) {
|
|
79
|
+
obj['type'] = _ApiClient["default"].convertToType(data['type'], _TemplateActorType["default"]);
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('user_id')) {
|
|
82
|
+
obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'String');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('external_id')) {
|
|
85
|
+
obj['external_id'] = _ApiClient["default"].convertToType(data['external_id'], 'String');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('name')) {
|
|
88
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('email')) {
|
|
91
|
+
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return obj;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Validates the JSON data with respect to <code>TemplateActor</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>TemplateActor</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(TemplateActor.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['user_id'] && !(typeof data['user_id'] === 'string' || data['user_id'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `user_id` to be a primitive type in the JSON string but got " + data['user_id']);
|
|
123
|
+
}
|
|
124
|
+
// ensure the json data is a string
|
|
125
|
+
if (data['external_id'] && !(typeof data['external_id'] === 'string' || data['external_id'] instanceof String)) {
|
|
126
|
+
throw new Error("Expected the field `external_id` to be a primitive type in the JSON string but got " + data['external_id']);
|
|
127
|
+
}
|
|
128
|
+
// ensure the json data is a string
|
|
129
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
135
|
+
}
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}]);
|
|
139
|
+
}();
|
|
140
|
+
TemplateActor.RequiredProperties = ["type", "user_id", "external_id", "name", "email"];
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* `user`: a user in your account. `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
|
|
144
|
+
* @member {module:model/TemplateActorType} type
|
|
145
|
+
*/
|
|
146
|
+
TemplateActor.prototype['type'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The user's ID, for `user`.
|
|
150
|
+
* @member {String} user_id
|
|
151
|
+
*/
|
|
152
|
+
TemplateActor.prototype['user_id'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The ID your app gave the embedded editor's user, for `external_user`.
|
|
156
|
+
* @member {String} external_id
|
|
157
|
+
*/
|
|
158
|
+
TemplateActor.prototype['external_id'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The user's name, or the name your app gave the embedded editor's user.
|
|
162
|
+
* @member {String} name
|
|
163
|
+
*/
|
|
164
|
+
TemplateActor.prototype['name'] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The email address your app gave the embedded editor's user, for `external_user`.
|
|
168
|
+
* @member {String} email
|
|
169
|
+
*/
|
|
170
|
+
TemplateActor.prototype['email'] = undefined;
|
|
171
|
+
var _default = exports["default"] = TemplateActor;
|
|
@@ -0,0 +1,64 @@
|
|
|
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 TemplateActorType.
|
|
29
|
+
* @enum {}
|
|
30
|
+
* @readonly
|
|
31
|
+
*/
|
|
32
|
+
var TemplateActorType = exports["default"] = /*#__PURE__*/function () {
|
|
33
|
+
function TemplateActorType() {
|
|
34
|
+
_classCallCheck(this, TemplateActorType);
|
|
35
|
+
}
|
|
36
|
+
return _createClass(TemplateActorType, null, [{
|
|
37
|
+
key: "constructFromObject",
|
|
38
|
+
value:
|
|
39
|
+
/**
|
|
40
|
+
* Returns a <code>TemplateActorType</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/TemplateActorType} The enum <code>TemplateActorType</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: "user"
|
|
52
|
+
* @const
|
|
53
|
+
*/
|
|
54
|
+
_defineProperty(TemplateActorType, "user", "user");
|
|
55
|
+
/**
|
|
56
|
+
* value: "api"
|
|
57
|
+
* @const
|
|
58
|
+
*/
|
|
59
|
+
_defineProperty(TemplateActorType, "api", "api");
|
|
60
|
+
/**
|
|
61
|
+
* value: "external_user"
|
|
62
|
+
* @const
|
|
63
|
+
*/
|
|
64
|
+
_defineProperty(TemplateActorType, "external_user", "external_user");
|
|
@@ -0,0 +1,307 @@
|
|
|
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 TemplateDefaults model module.
|
|
31
|
+
* @module model/TemplateDefaults
|
|
32
|
+
* @version 4.0.0
|
|
33
|
+
*/
|
|
34
|
+
var TemplateDefaults = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>TemplateDefaults</code>.
|
|
37
|
+
* The default style of the template's fields. Each field can override it.
|
|
38
|
+
* @alias module:model/TemplateDefaults
|
|
39
|
+
* @extends Object
|
|
40
|
+
*/
|
|
41
|
+
function TemplateDefaults() {
|
|
42
|
+
_classCallCheck(this, TemplateDefaults);
|
|
43
|
+
TemplateDefaults.initialize(this);
|
|
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(TemplateDefaults, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj) {}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>TemplateDefaults</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:model/TemplateDefaults} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/TemplateDefaults} The populated <code>TemplateDefaults</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new TemplateDefaults();
|
|
67
|
+
_ApiClient["default"].constructFromObject(data, obj, 'Object');
|
|
68
|
+
if (data.hasOwnProperty('typeface')) {
|
|
69
|
+
obj['typeface'] = _ApiClient["default"].convertToType(data['typeface'], _Typeface["default"]);
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('font_size')) {
|
|
72
|
+
obj['font_size'] = _ApiClient["default"].convertToType(data['font_size'], 'Number');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('character_spacing')) {
|
|
75
|
+
obj['character_spacing'] = _ApiClient["default"].convertToType(data['character_spacing'], 'Number');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('color')) {
|
|
78
|
+
obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('background_color')) {
|
|
81
|
+
obj['background_color'] = _ApiClient["default"].convertToType(data['background_color'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('bold')) {
|
|
84
|
+
obj['bold'] = _ApiClient["default"].convertToType(data['bold'], 'Boolean');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('uppercase')) {
|
|
87
|
+
obj['uppercase'] = _ApiClient["default"].convertToType(data['uppercase'], 'Boolean');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('alignment')) {
|
|
90
|
+
obj['alignment'] = _ApiClient["default"].convertToType(data['alignment'], _TextAlignment["default"]);
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('opacity')) {
|
|
93
|
+
obj['opacity'] = _ApiClient["default"].convertToType(data['opacity'], 'Number');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('date_format')) {
|
|
96
|
+
obj['date_format'] = _ApiClient["default"].convertToType(data['date_format'], 'String');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('date_time_format')) {
|
|
99
|
+
obj['date_time_format'] = _ApiClient["default"].convertToType(data['date_time_format'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('check_color')) {
|
|
102
|
+
obj['check_color'] = _ApiClient["default"].convertToType(data['check_color'], 'String');
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('check_character')) {
|
|
105
|
+
obj['check_character'] = _ApiClient["default"].convertToType(data['check_character'], _CheckCharacter["default"]);
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('check_background_color')) {
|
|
108
|
+
obj['check_background_color'] = _ApiClient["default"].convertToType(data['check_background_color'], 'String');
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('required_field_background_color')) {
|
|
111
|
+
obj['required_field_background_color'] = _ApiClient["default"].convertToType(data['required_field_background_color'], 'String');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('true_text')) {
|
|
114
|
+
obj['true_text'] = _ApiClient["default"].convertToType(data['true_text'], 'String');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('false_text')) {
|
|
117
|
+
obj['false_text'] = _ApiClient["default"].convertToType(data['false_text'], 'String');
|
|
118
|
+
}
|
|
119
|
+
if (data.hasOwnProperty('shape_fill_color')) {
|
|
120
|
+
obj['shape_fill_color'] = _ApiClient["default"].convertToType(data['shape_fill_color'], 'String');
|
|
121
|
+
}
|
|
122
|
+
if (data.hasOwnProperty('shape_border_color')) {
|
|
123
|
+
obj['shape_border_color'] = _ApiClient["default"].convertToType(data['shape_border_color'], 'String');
|
|
124
|
+
}
|
|
125
|
+
if (data.hasOwnProperty('shape_border_width')) {
|
|
126
|
+
obj['shape_border_width'] = _ApiClient["default"].convertToType(data['shape_border_width'], 'Number');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return obj;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Validates the JSON data with respect to <code>TemplateDefaults</code>.
|
|
134
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
135
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplateDefaults</code>.
|
|
136
|
+
*/
|
|
137
|
+
}, {
|
|
138
|
+
key: "validateJSON",
|
|
139
|
+
value: function validateJSON(data) {
|
|
140
|
+
// ensure the json data is a string
|
|
141
|
+
if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) {
|
|
142
|
+
throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']);
|
|
143
|
+
}
|
|
144
|
+
// ensure the json data is a string
|
|
145
|
+
if (data['background_color'] && !(typeof data['background_color'] === 'string' || data['background_color'] instanceof String)) {
|
|
146
|
+
throw new Error("Expected the field `background_color` to be a primitive type in the JSON string but got " + data['background_color']);
|
|
147
|
+
}
|
|
148
|
+
// ensure the json data is a string
|
|
149
|
+
if (data['date_format'] && !(typeof data['date_format'] === 'string' || data['date_format'] instanceof String)) {
|
|
150
|
+
throw new Error("Expected the field `date_format` to be a primitive type in the JSON string but got " + data['date_format']);
|
|
151
|
+
}
|
|
152
|
+
// ensure the json data is a string
|
|
153
|
+
if (data['date_time_format'] && !(typeof data['date_time_format'] === 'string' || data['date_time_format'] instanceof String)) {
|
|
154
|
+
throw new Error("Expected the field `date_time_format` to be a primitive type in the JSON string but got " + data['date_time_format']);
|
|
155
|
+
}
|
|
156
|
+
// ensure the json data is a string
|
|
157
|
+
if (data['check_color'] && !(typeof data['check_color'] === 'string' || data['check_color'] instanceof String)) {
|
|
158
|
+
throw new Error("Expected the field `check_color` to be a primitive type in the JSON string but got " + data['check_color']);
|
|
159
|
+
}
|
|
160
|
+
// ensure the json data is a string
|
|
161
|
+
if (data['check_background_color'] && !(typeof data['check_background_color'] === 'string' || data['check_background_color'] instanceof String)) {
|
|
162
|
+
throw new Error("Expected the field `check_background_color` to be a primitive type in the JSON string but got " + data['check_background_color']);
|
|
163
|
+
}
|
|
164
|
+
// ensure the json data is a string
|
|
165
|
+
if (data['required_field_background_color'] && !(typeof data['required_field_background_color'] === 'string' || data['required_field_background_color'] instanceof String)) {
|
|
166
|
+
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']);
|
|
167
|
+
}
|
|
168
|
+
// ensure the json data is a string
|
|
169
|
+
if (data['true_text'] && !(typeof data['true_text'] === 'string' || data['true_text'] instanceof String)) {
|
|
170
|
+
throw new Error("Expected the field `true_text` to be a primitive type in the JSON string but got " + data['true_text']);
|
|
171
|
+
}
|
|
172
|
+
// ensure the json data is a string
|
|
173
|
+
if (data['false_text'] && !(typeof data['false_text'] === 'string' || data['false_text'] instanceof String)) {
|
|
174
|
+
throw new Error("Expected the field `false_text` to be a primitive type in the JSON string but got " + data['false_text']);
|
|
175
|
+
}
|
|
176
|
+
// ensure the json data is a string
|
|
177
|
+
if (data['shape_fill_color'] && !(typeof data['shape_fill_color'] === 'string' || data['shape_fill_color'] instanceof String)) {
|
|
178
|
+
throw new Error("Expected the field `shape_fill_color` to be a primitive type in the JSON string but got " + data['shape_fill_color']);
|
|
179
|
+
}
|
|
180
|
+
// ensure the json data is a string
|
|
181
|
+
if (data['shape_border_color'] && !(typeof data['shape_border_color'] === 'string' || data['shape_border_color'] instanceof String)) {
|
|
182
|
+
throw new Error("Expected the field `shape_border_color` to be a primitive type in the JSON string but got " + data['shape_border_color']);
|
|
183
|
+
}
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
}]);
|
|
187
|
+
}();
|
|
188
|
+
/**
|
|
189
|
+
* The font of text fields.
|
|
190
|
+
* @member {module:model/Typeface} typeface
|
|
191
|
+
*/
|
|
192
|
+
TemplateDefaults.prototype['typeface'] = undefined;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* The font size in points, a whole number.
|
|
196
|
+
* @member {Number} font_size
|
|
197
|
+
*/
|
|
198
|
+
TemplateDefaults.prototype['font_size'] = undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Extra space between characters, in points (0 to 50).
|
|
202
|
+
* @member {Number} character_spacing
|
|
203
|
+
*/
|
|
204
|
+
TemplateDefaults.prototype['character_spacing'] = undefined;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The text color, as 6 hex digits without `#`, such as `444444`.
|
|
208
|
+
* @member {String} color
|
|
209
|
+
*/
|
|
210
|
+
TemplateDefaults.prototype['color'] = undefined;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The field's background color, as 6 hex digits.
|
|
214
|
+
* @member {String} background_color
|
|
215
|
+
*/
|
|
216
|
+
TemplateDefaults.prototype['background_color'] = undefined;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Print text in bold.
|
|
220
|
+
* @member {Boolean} bold
|
|
221
|
+
*/
|
|
222
|
+
TemplateDefaults.prototype['bold'] = undefined;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Print text in capital letters.
|
|
226
|
+
* @member {Boolean} uppercase
|
|
227
|
+
*/
|
|
228
|
+
TemplateDefaults.prototype['uppercase'] = undefined;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* How text is aligned in its field. `justify` lines up both edges of every line of multiline text except the last of each paragraph.
|
|
232
|
+
* @member {module:model/TextAlignment} alignment
|
|
233
|
+
*/
|
|
234
|
+
TemplateDefaults.prototype['alignment'] = undefined;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* The opacity of the field's content, from 0 (invisible) to 1.
|
|
238
|
+
* @member {Number} opacity
|
|
239
|
+
*/
|
|
240
|
+
TemplateDefaults.prototype['opacity'] = undefined;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* How date fields are printed, as a strftime format such as `%m/%d/%Y`.
|
|
244
|
+
* @member {String} date_format
|
|
245
|
+
*/
|
|
246
|
+
TemplateDefaults.prototype['date_format'] = undefined;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* How date-time fields are printed, as a strftime format such as `%m/%d/%Y %H:%M:%S`.
|
|
250
|
+
* @member {String} date_time_format
|
|
251
|
+
*/
|
|
252
|
+
TemplateDefaults.prototype['date_time_format'] = undefined;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* The color of check marks, as 6 hex digits.
|
|
256
|
+
* @member {String} check_color
|
|
257
|
+
*/
|
|
258
|
+
TemplateDefaults.prototype['check_color'] = undefined;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The character that a ticked check box prints.
|
|
262
|
+
* @member {module:model/CheckCharacter} check_character
|
|
263
|
+
*/
|
|
264
|
+
TemplateDefaults.prototype['check_character'] = undefined;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* The check box's background color, as 6 hex digits.
|
|
268
|
+
* @member {String} check_background_color
|
|
269
|
+
*/
|
|
270
|
+
TemplateDefaults.prototype['check_background_color'] = undefined;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* The background color that highlights required fields on visual forms and signature request forms, as 6 hex digits. PDFs don't print it.
|
|
274
|
+
* @member {String} required_field_background_color
|
|
275
|
+
*/
|
|
276
|
+
TemplateDefaults.prototype['required_field_background_color'] = undefined;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The text a boolean field prints for `true`.
|
|
280
|
+
* @member {String} true_text
|
|
281
|
+
*/
|
|
282
|
+
TemplateDefaults.prototype['true_text'] = undefined;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The text a boolean field prints for `false`.
|
|
286
|
+
* @member {String} false_text
|
|
287
|
+
*/
|
|
288
|
+
TemplateDefaults.prototype['false_text'] = undefined;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* The fill color of shapes, as 6 hex digits.
|
|
292
|
+
* @member {String} shape_fill_color
|
|
293
|
+
*/
|
|
294
|
+
TemplateDefaults.prototype['shape_fill_color'] = undefined;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The border color of shapes, as 6 hex digits.
|
|
298
|
+
* @member {String} shape_border_color
|
|
299
|
+
*/
|
|
300
|
+
TemplateDefaults.prototype['shape_border_color'] = undefined;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The border width of shapes, in whole points (at least 1).
|
|
304
|
+
* @member {Number} shape_border_width
|
|
305
|
+
*/
|
|
306
|
+
TemplateDefaults.prototype['shape_border_width'] = undefined;
|
|
307
|
+
var _default = exports["default"] = TemplateDefaults;
|