docspring 3.3.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/AGENTS.md +79 -19
- package/README.md +74 -63
- package/dist/ApiClient.js +63 -28
- package/dist/RequestSchemas.js +3452 -0
- package/dist/RequestValidator.js +494 -0
- package/dist/api/Client.js +1769 -921
- package/dist/index.js +847 -154
- package/dist/model/AddTemplateFieldsRequest.js +132 -0
- 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/{CreateCustomFileResponse.js → CreateSignatureRequestEventRequest.js} +49 -73
- package/dist/model/CreateSignatureRequestTokenRequest.js +88 -0
- package/dist/model/CreateSubmissionBatchRequest.js +192 -0
- package/dist/model/CreateSubmissionRequest.js +226 -0
- package/dist/model/CreateTemplateRequest.js +613 -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/Field.js +1230 -0
- package/dist/model/FieldComparisonCondition.js +137 -0
- package/dist/model/FieldComparisonOperator.js +69 -0
- package/dist/model/FieldDependency.js +154 -0
- package/dist/model/FieldDependencyInput.js +154 -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/FieldGroup.js +206 -0
- package/dist/model/FieldGroupInput.js +180 -0
- package/dist/model/FieldGroupType.js +59 -0
- package/dist/model/{SuccessMultipleErrorsResponse.js → FieldInCondition.js} +54 -53
- package/dist/model/FieldInput.js +1012 -0
- 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/FieldType.js +124 -0
- package/dist/model/Folder.js +38 -11
- package/dist/model/FolderList.js +132 -0
- package/dist/model/GenerateFilesFormat.js +54 -0
- package/dist/model/GenerateSubmissionFilesRequest.js +115 -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/OutputFormat.js +59 -0
- package/dist/model/PageFormat.js +114 -0
- package/dist/model/PageImage.js +220 -0
- package/dist/model/{TemplateDeleteResponse.js → PageImages.js} +57 -70
- package/dist/model/PredefinedField.js +183 -0
- package/dist/model/PredefinedFieldInput.js +183 -0
- package/dist/model/{PublishVersionData.js → PublishTemplateVersionRequest.js} +33 -33
- package/dist/model/{AddFieldsData.js → RemoveTemplateFieldsRequest.js} +32 -30
- package/dist/model/{RenameFolderData.js → RenameFolderRequest.js} +25 -23
- package/dist/model/ReorderTemplateFieldsRequest.js +114 -0
- 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 +198 -341
- 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 +117 -0
- package/dist/model/SubmissionInput.js +218 -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/{SubmissionBatchData.js → SubmissionValidation.js} +46 -48
- package/dist/model/Template.js +359 -560
- 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/TemplateDiff.js +206 -0
- package/dist/model/TemplateDiffSummary.js +165 -0
- package/dist/model/TemplateDocument.js +280 -0
- package/dist/model/TemplateDocumentState.js +84 -0
- package/dist/model/TemplateFieldChange.js +146 -0
- package/dist/model/TemplateFieldChanges.js +196 -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/{CreatePdfTemplate.js → TemplateFieldMove.js} +52 -28
- package/dist/model/TemplateFields.js +147 -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/TemplatePageImages.js +158 -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 +139 -0
- package/dist/model/UpdateTemplateFieldsRequest.js +132 -0
- package/dist/model/UpdateTemplateRequest.js +523 -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/UrlSourcePdf.js +130 -0
- package/dist/model/ValidateSubmissionRequest.js +226 -0
- 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/CreateHtmlTemplate.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,294 @@
|
|
|
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 _CombinedPdfFiles = _interopRequireDefault(require("./CombinedPdfFiles"));
|
|
9
|
+
var _CombinedPdfSource = _interopRequireDefault(require("./CombinedPdfSource"));
|
|
10
|
+
var _CombinedPdfState = _interopRequireDefault(require("./CombinedPdfState"));
|
|
11
|
+
var _SubmissionAction = _interopRequireDefault(require("./SubmissionAction"));
|
|
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 CombinedPdf model module.
|
|
35
|
+
* @module model/CombinedPdf
|
|
36
|
+
* @version 4.1.0
|
|
37
|
+
*/
|
|
38
|
+
var CombinedPdf = /*#__PURE__*/function () {
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a new <code>CombinedPdf</code>.
|
|
41
|
+
* A PDF made by merging other PDFs: submissions, other combined PDFs, templates, custom files and PDFs from URLs.
|
|
42
|
+
* @alias module:model/CombinedPdf
|
|
43
|
+
* @extends Object
|
|
44
|
+
* @param id {String} The combined PDF's ID.
|
|
45
|
+
* @param state {module:model/CombinedPdfState} `pending` until the PDF has been generated, then `processed`. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. `error`: the PDFs couldn't be merged (see `error_message`). Waiting ends in `error` if it's discarded or takes over 30 days.
|
|
46
|
+
* @param source_pdfs {Array.<module:model/CombinedPdfSource>} The PDFs to merge, in order.
|
|
47
|
+
* @param metadata {Object.<String, Object>} Your own data about the combined PDF, such as an ID from your app.
|
|
48
|
+
* @param has_password {Boolean} Whether the PDF needs a password to open (`password`).
|
|
49
|
+
* @param delete_custom_files {Boolean} Delete the custom files in `source_pdfs` once the combined PDF has been generated (they're kept if it fails). Other combined PDFs can't use them after that. A test API token can't delete custom files.
|
|
50
|
+
* @param error_message {String} Why the PDFs couldn't be merged, when `state` is `error`.
|
|
51
|
+
* @param files {module:model/CombinedPdfFiles} The generated files, by format. Empty until the PDF has been generated, and once it has expired.
|
|
52
|
+
* @param actions {Array.<module:model/SubmissionAction>} The uploads of the PDF to your storage (account integrations).
|
|
53
|
+
* @param expired {Boolean} An expired combined PDF's PDF, metadata, password and source URLs have been deleted.
|
|
54
|
+
* @param expires_at {Date} When the combined PDF expires (`expires_in` after it's generated). Null if it's kept until you delete it.
|
|
55
|
+
* @param processed_at {Date} When the PDF was generated. Null until then.
|
|
56
|
+
* @param created_at {Date} When the combined PDF was created.
|
|
57
|
+
* @param updated_at {Date} When the combined PDF was last updated.
|
|
58
|
+
*/
|
|
59
|
+
function CombinedPdf(id, state, source_pdfs, metadata, has_password, delete_custom_files, error_message, files, actions, expired, expires_at, processed_at, created_at, updated_at) {
|
|
60
|
+
_classCallCheck(this, CombinedPdf);
|
|
61
|
+
CombinedPdf.initialize(this, id, state, source_pdfs, metadata, has_password, delete_custom_files, error_message, files, actions, expired, expires_at, processed_at, created_at, updated_at);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Initializes the fields of this object.
|
|
66
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
67
|
+
* Only for internal use.
|
|
68
|
+
*/
|
|
69
|
+
return _createClass(CombinedPdf, null, [{
|
|
70
|
+
key: "initialize",
|
|
71
|
+
value: function initialize(obj, id, state, source_pdfs, metadata, has_password, delete_custom_files, error_message, files, actions, expired, expires_at, processed_at, created_at, updated_at) {
|
|
72
|
+
obj['id'] = id;
|
|
73
|
+
obj['state'] = state;
|
|
74
|
+
obj['source_pdfs'] = source_pdfs;
|
|
75
|
+
obj['metadata'] = metadata;
|
|
76
|
+
obj['has_password'] = has_password;
|
|
77
|
+
obj['delete_custom_files'] = delete_custom_files;
|
|
78
|
+
obj['error_message'] = error_message;
|
|
79
|
+
obj['files'] = files;
|
|
80
|
+
obj['actions'] = actions;
|
|
81
|
+
obj['expired'] = expired;
|
|
82
|
+
obj['expires_at'] = expires_at;
|
|
83
|
+
obj['processed_at'] = processed_at;
|
|
84
|
+
obj['created_at'] = created_at;
|
|
85
|
+
obj['updated_at'] = updated_at;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Constructs a <code>CombinedPdf</code> from a plain JavaScript object, optionally creating a new instance.
|
|
90
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
91
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
92
|
+
* @param {module:model/CombinedPdf} obj Optional instance to populate.
|
|
93
|
+
* @return {module:model/CombinedPdf} The populated <code>CombinedPdf</code> instance.
|
|
94
|
+
*/
|
|
95
|
+
}, {
|
|
96
|
+
key: "constructFromObject",
|
|
97
|
+
value: function constructFromObject(data, obj) {
|
|
98
|
+
if (data) {
|
|
99
|
+
obj = obj || new CombinedPdf();
|
|
100
|
+
_ApiClient["default"].constructFromObject(data, obj, 'Object');
|
|
101
|
+
if (data.hasOwnProperty('id')) {
|
|
102
|
+
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('state')) {
|
|
105
|
+
obj['state'] = _ApiClient["default"].convertToType(data['state'], _CombinedPdfState["default"]);
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('source_pdfs')) {
|
|
108
|
+
obj['source_pdfs'] = _ApiClient["default"].convertToType(data['source_pdfs'], [_CombinedPdfSource["default"]]);
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('metadata')) {
|
|
111
|
+
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
|
|
112
|
+
'String': Object
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (data.hasOwnProperty('has_password')) {
|
|
116
|
+
obj['has_password'] = _ApiClient["default"].convertToType(data['has_password'], 'Boolean');
|
|
117
|
+
}
|
|
118
|
+
if (data.hasOwnProperty('delete_custom_files')) {
|
|
119
|
+
obj['delete_custom_files'] = _ApiClient["default"].convertToType(data['delete_custom_files'], 'Boolean');
|
|
120
|
+
}
|
|
121
|
+
if (data.hasOwnProperty('error_message')) {
|
|
122
|
+
obj['error_message'] = _ApiClient["default"].convertToType(data['error_message'], 'String');
|
|
123
|
+
}
|
|
124
|
+
if (data.hasOwnProperty('files')) {
|
|
125
|
+
obj['files'] = _ApiClient["default"].convertToType(data['files'], _CombinedPdfFiles["default"]);
|
|
126
|
+
}
|
|
127
|
+
if (data.hasOwnProperty('actions')) {
|
|
128
|
+
obj['actions'] = _ApiClient["default"].convertToType(data['actions'], [_SubmissionAction["default"]]);
|
|
129
|
+
}
|
|
130
|
+
if (data.hasOwnProperty('expired')) {
|
|
131
|
+
obj['expired'] = _ApiClient["default"].convertToType(data['expired'], 'Boolean');
|
|
132
|
+
}
|
|
133
|
+
if (data.hasOwnProperty('expires_at')) {
|
|
134
|
+
obj['expires_at'] = _ApiClient["default"].convertToType(data['expires_at'], 'Date');
|
|
135
|
+
}
|
|
136
|
+
if (data.hasOwnProperty('processed_at')) {
|
|
137
|
+
obj['processed_at'] = _ApiClient["default"].convertToType(data['processed_at'], 'Date');
|
|
138
|
+
}
|
|
139
|
+
if (data.hasOwnProperty('created_at')) {
|
|
140
|
+
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
|
|
141
|
+
}
|
|
142
|
+
if (data.hasOwnProperty('updated_at')) {
|
|
143
|
+
obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return obj;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Validates the JSON data with respect to <code>CombinedPdf</code>.
|
|
151
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
152
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CombinedPdf</code>.
|
|
153
|
+
*/
|
|
154
|
+
}, {
|
|
155
|
+
key: "validateJSON",
|
|
156
|
+
value: function validateJSON(data) {
|
|
157
|
+
// check to make sure all required properties are present in the JSON string
|
|
158
|
+
var _iterator = _createForOfIteratorHelper(CombinedPdf.RequiredProperties),
|
|
159
|
+
_step;
|
|
160
|
+
try {
|
|
161
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
162
|
+
var property = _step.value;
|
|
163
|
+
if (!data.hasOwnProperty(property)) {
|
|
164
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
// ensure the json data is a string
|
|
168
|
+
} catch (err) {
|
|
169
|
+
_iterator.e(err);
|
|
170
|
+
} finally {
|
|
171
|
+
_iterator.f();
|
|
172
|
+
}
|
|
173
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
174
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
175
|
+
}
|
|
176
|
+
if (data['source_pdfs']) {
|
|
177
|
+
// data not null
|
|
178
|
+
// ensure the json data is an array
|
|
179
|
+
if (!Array.isArray(data['source_pdfs'])) {
|
|
180
|
+
throw new Error("Expected the field `source_pdfs` to be an array in the JSON data but got " + data['source_pdfs']);
|
|
181
|
+
}
|
|
182
|
+
// validate the optional field `source_pdfs` (array)
|
|
183
|
+
var _iterator2 = _createForOfIteratorHelper(data['source_pdfs']),
|
|
184
|
+
_step2;
|
|
185
|
+
try {
|
|
186
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
187
|
+
var item = _step2.value;
|
|
188
|
+
_CombinedPdfSource["default"].validateJSON(item);
|
|
189
|
+
}
|
|
190
|
+
} catch (err) {
|
|
191
|
+
_iterator2.e(err);
|
|
192
|
+
} finally {
|
|
193
|
+
_iterator2.f();
|
|
194
|
+
}
|
|
195
|
+
;
|
|
196
|
+
}
|
|
197
|
+
// ensure the json data is a string
|
|
198
|
+
if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
|
|
199
|
+
throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
|
|
200
|
+
}
|
|
201
|
+
// ensure the json data is an array
|
|
202
|
+
if (!Array.isArray(data['actions'])) {
|
|
203
|
+
throw new Error("Expected the field `actions` to be an array in the JSON data but got " + data['actions']);
|
|
204
|
+
}
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
}]);
|
|
208
|
+
}();
|
|
209
|
+
CombinedPdf.RequiredProperties = ["id", "state", "source_pdfs", "metadata", "has_password", "delete_custom_files", "error_message", "files", "actions", "expired", "expires_at", "processed_at", "created_at", "updated_at"];
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The combined PDF's ID.
|
|
213
|
+
* @member {String} id
|
|
214
|
+
*/
|
|
215
|
+
CombinedPdf.prototype['id'] = undefined;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* `pending` until the PDF has been generated, then `processed`. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. `error`: the PDFs couldn't be merged (see `error_message`). Waiting ends in `error` if it's discarded or takes over 30 days.
|
|
219
|
+
* @member {module:model/CombinedPdfState} state
|
|
220
|
+
*/
|
|
221
|
+
CombinedPdf.prototype['state'] = undefined;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The PDFs to merge, in order.
|
|
225
|
+
* @member {Array.<module:model/CombinedPdfSource>} source_pdfs
|
|
226
|
+
*/
|
|
227
|
+
CombinedPdf.prototype['source_pdfs'] = undefined;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Your own data about the combined PDF, such as an ID from your app.
|
|
231
|
+
* @member {Object.<String, Object>} metadata
|
|
232
|
+
*/
|
|
233
|
+
CombinedPdf.prototype['metadata'] = undefined;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Whether the PDF needs a password to open (`password`).
|
|
237
|
+
* @member {Boolean} has_password
|
|
238
|
+
*/
|
|
239
|
+
CombinedPdf.prototype['has_password'] = undefined;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Delete the custom files in `source_pdfs` once the combined PDF has been generated (they're kept if it fails). Other combined PDFs can't use them after that. A test API token can't delete custom files.
|
|
243
|
+
* @member {Boolean} delete_custom_files
|
|
244
|
+
*/
|
|
245
|
+
CombinedPdf.prototype['delete_custom_files'] = undefined;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Why the PDFs couldn't be merged, when `state` is `error`.
|
|
249
|
+
* @member {String} error_message
|
|
250
|
+
*/
|
|
251
|
+
CombinedPdf.prototype['error_message'] = undefined;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* The generated files, by format. Empty until the PDF has been generated, and once it has expired.
|
|
255
|
+
* @member {module:model/CombinedPdfFiles} files
|
|
256
|
+
*/
|
|
257
|
+
CombinedPdf.prototype['files'] = undefined;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The uploads of the PDF to your storage (account integrations).
|
|
261
|
+
* @member {Array.<module:model/SubmissionAction>} actions
|
|
262
|
+
*/
|
|
263
|
+
CombinedPdf.prototype['actions'] = undefined;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* An expired combined PDF's PDF, metadata, password and source URLs have been deleted.
|
|
267
|
+
* @member {Boolean} expired
|
|
268
|
+
*/
|
|
269
|
+
CombinedPdf.prototype['expired'] = undefined;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* When the combined PDF expires (`expires_in` after it's generated). Null if it's kept until you delete it.
|
|
273
|
+
* @member {Date} expires_at
|
|
274
|
+
*/
|
|
275
|
+
CombinedPdf.prototype['expires_at'] = undefined;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* When the PDF was generated. Null until then.
|
|
279
|
+
* @member {Date} processed_at
|
|
280
|
+
*/
|
|
281
|
+
CombinedPdf.prototype['processed_at'] = undefined;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* When the combined PDF was created.
|
|
285
|
+
* @member {Date} created_at
|
|
286
|
+
*/
|
|
287
|
+
CombinedPdf.prototype['created_at'] = undefined;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* When the combined PDF was last updated.
|
|
291
|
+
* @member {Date} updated_at
|
|
292
|
+
*/
|
|
293
|
+
CombinedPdf.prototype['updated_at'] = undefined;
|
|
294
|
+
var _default = exports["default"] = CombinedPdf;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _GeneratedFile = _interopRequireDefault(require("./GeneratedFile"));
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
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); }
|
|
10
11
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -13,9 +14,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
13
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
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); } /**
|
|
15
16
|
* DocSpring API
|
|
16
|
-
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
17
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
17
18
|
*
|
|
18
|
-
* The version of the OpenAPI document:
|
|
19
|
+
* The version of the OpenAPI document: v2
|
|
19
20
|
*
|
|
20
21
|
*
|
|
21
22
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -24,18 +25,20 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
24
25
|
*
|
|
25
26
|
*/
|
|
26
27
|
/**
|
|
27
|
-
* The
|
|
28
|
-
* @module model/
|
|
29
|
-
* @version
|
|
28
|
+
* The CombinedPdfFiles model module.
|
|
29
|
+
* @module model/CombinedPdfFiles
|
|
30
|
+
* @version 4.1.0
|
|
30
31
|
*/
|
|
31
|
-
var
|
|
32
|
+
var CombinedPdfFiles = /*#__PURE__*/function () {
|
|
32
33
|
/**
|
|
33
|
-
* Constructs a new <code>
|
|
34
|
-
*
|
|
34
|
+
* Constructs a new <code>CombinedPdfFiles</code>.
|
|
35
|
+
* A combined PDF's generated files, by format.
|
|
36
|
+
* @alias module:model/CombinedPdfFiles
|
|
37
|
+
* @extends Object
|
|
35
38
|
*/
|
|
36
|
-
function
|
|
37
|
-
_classCallCheck(this,
|
|
38
|
-
|
|
39
|
+
function CombinedPdfFiles() {
|
|
40
|
+
_classCallCheck(this, CombinedPdfFiles);
|
|
41
|
+
CombinedPdfFiles.initialize(this);
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
/**
|
|
@@ -43,47 +46,44 @@ var MoveFolderData = /*#__PURE__*/function () {
|
|
|
43
46
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
47
|
* Only for internal use.
|
|
45
48
|
*/
|
|
46
|
-
return _createClass(
|
|
49
|
+
return _createClass(CombinedPdfFiles, null, [{
|
|
47
50
|
key: "initialize",
|
|
48
51
|
value: function initialize(obj) {}
|
|
49
52
|
|
|
50
53
|
/**
|
|
51
|
-
* Constructs a <code>
|
|
54
|
+
* Constructs a <code>CombinedPdfFiles</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
55
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
56
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
-
* @param {module:model/
|
|
55
|
-
* @return {module:model/
|
|
57
|
+
* @param {module:model/CombinedPdfFiles} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/CombinedPdfFiles} The populated <code>CombinedPdfFiles</code> instance.
|
|
56
59
|
*/
|
|
57
60
|
}, {
|
|
58
61
|
key: "constructFromObject",
|
|
59
62
|
value: function constructFromObject(data, obj) {
|
|
60
63
|
if (data) {
|
|
61
|
-
obj = obj || new
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
obj = obj || new CombinedPdfFiles();
|
|
65
|
+
_ApiClient["default"].constructFromObject(data, obj, 'Object');
|
|
66
|
+
if (data.hasOwnProperty('pdf')) {
|
|
67
|
+
obj['pdf'] = data['pdf'] === null ? null : _GeneratedFile["default"].constructFromObject(data['pdf']);
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
return obj;
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
/**
|
|
70
|
-
* Validates the JSON data with respect to <code>
|
|
74
|
+
* Validates the JSON data with respect to <code>CombinedPdfFiles</code>.
|
|
71
75
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
76
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CombinedPdfFiles</code>.
|
|
73
77
|
*/
|
|
74
78
|
}, {
|
|
75
79
|
key: "validateJSON",
|
|
76
80
|
value: function validateJSON(data) {
|
|
77
|
-
// ensure the json data is a string
|
|
78
|
-
if (data['parent_folder_id'] && !(typeof data['parent_folder_id'] === 'string' || data['parent_folder_id'] instanceof String)) {
|
|
79
|
-
throw new Error("Expected the field `parent_folder_id` to be a primitive type in the JSON string but got " + data['parent_folder_id']);
|
|
80
|
-
}
|
|
81
81
|
return true;
|
|
82
82
|
}
|
|
83
83
|
}]);
|
|
84
84
|
}();
|
|
85
85
|
/**
|
|
86
|
-
* @member {
|
|
86
|
+
* @member {module:model/GeneratedFile} pdf
|
|
87
87
|
*/
|
|
88
|
-
|
|
89
|
-
var _default = exports["default"] =
|
|
88
|
+
CombinedPdfFiles.prototype['pdf'] = undefined;
|
|
89
|
+
var _default = exports["default"] = CombinedPdfFiles;
|
|
@@ -0,0 +1,132 @@
|
|
|
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 _CombinedPdf = _interopRequireDefault(require("./CombinedPdf"));
|
|
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 CombinedPdfList model module.
|
|
32
|
+
* @module model/CombinedPdfList
|
|
33
|
+
* @version 4.1.0
|
|
34
|
+
*/
|
|
35
|
+
var CombinedPdfList = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>CombinedPdfList</code>.
|
|
38
|
+
* A page of combined PDFs, newest first.
|
|
39
|
+
* @alias module:model/CombinedPdfList
|
|
40
|
+
* @extends Object
|
|
41
|
+
* @param data {Array.<module:model/CombinedPdf>} The items on this page.
|
|
42
|
+
* @param next_cursor {String} Pass it as `cursor` to get the next page. Null on the last page.
|
|
43
|
+
*/
|
|
44
|
+
function CombinedPdfList(data, next_cursor) {
|
|
45
|
+
_classCallCheck(this, CombinedPdfList);
|
|
46
|
+
CombinedPdfList.initialize(this, data, next_cursor);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initializes the fields of this object.
|
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
|
+
* Only for internal use.
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(CombinedPdfList, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj, data, next_cursor) {
|
|
57
|
+
obj['data'] = data;
|
|
58
|
+
obj['next_cursor'] = next_cursor;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>CombinedPdfList</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/CombinedPdfList} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/CombinedPdfList} The populated <code>CombinedPdfList</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new CombinedPdfList();
|
|
73
|
+
_ApiClient["default"].constructFromObject(data, obj, 'Object');
|
|
74
|
+
if (data.hasOwnProperty('data')) {
|
|
75
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_CombinedPdf["default"]]);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('next_cursor')) {
|
|
78
|
+
obj['next_cursor'] = _ApiClient["default"].convertToType(data['next_cursor'], 'String');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Validates the JSON data with respect to <code>CombinedPdfList</code>.
|
|
86
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
87
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CombinedPdfList</code>.
|
|
88
|
+
*/
|
|
89
|
+
}, {
|
|
90
|
+
key: "validateJSON",
|
|
91
|
+
value: function validateJSON(data) {
|
|
92
|
+
// check to make sure all required properties are present in the JSON string
|
|
93
|
+
var _iterator = _createForOfIteratorHelper(CombinedPdfList.RequiredProperties),
|
|
94
|
+
_step;
|
|
95
|
+
try {
|
|
96
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
97
|
+
var property = _step.value;
|
|
98
|
+
if (!data.hasOwnProperty(property)) {
|
|
99
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// ensure the json data is an array
|
|
103
|
+
} catch (err) {
|
|
104
|
+
_iterator.e(err);
|
|
105
|
+
} finally {
|
|
106
|
+
_iterator.f();
|
|
107
|
+
}
|
|
108
|
+
if (!Array.isArray(data['data'])) {
|
|
109
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
110
|
+
}
|
|
111
|
+
// ensure the json data is a string
|
|
112
|
+
if (data['next_cursor'] && !(typeof data['next_cursor'] === 'string' || data['next_cursor'] instanceof String)) {
|
|
113
|
+
throw new Error("Expected the field `next_cursor` to be a primitive type in the JSON string but got " + data['next_cursor']);
|
|
114
|
+
}
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
}]);
|
|
118
|
+
}();
|
|
119
|
+
CombinedPdfList.RequiredProperties = ["data", "next_cursor"];
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The items on this page.
|
|
123
|
+
* @member {Array.<module:model/CombinedPdf>} data
|
|
124
|
+
*/
|
|
125
|
+
CombinedPdfList.prototype['data'] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Pass it as `cursor` to get the next page. Null on the last page.
|
|
129
|
+
* @member {String} next_cursor
|
|
130
|
+
*/
|
|
131
|
+
CombinedPdfList.prototype['next_cursor'] = undefined;
|
|
132
|
+
var _default = exports["default"] = CombinedPdfList;
|