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
package/dist/api/Client.js
CHANGED
|
@@ -5,56 +5,63 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var _CreateWebhookData = _interopRequireDefault(require("../model/CreateWebhookData"));
|
|
26
|
-
var _ErrorOrMultipleErrorsResponse = _interopRequireDefault(require("../model/ErrorOrMultipleErrorsResponse"));
|
|
8
|
+
var _AddTemplateFieldsRequest = _interopRequireDefault(require("../model/AddTemplateFieldsRequest"));
|
|
9
|
+
var _AiFieldNamingLanguage = _interopRequireDefault(require("../model/AiFieldNamingLanguage"));
|
|
10
|
+
var _AuthenticationCheck = _interopRequireDefault(require("../model/AuthenticationCheck"));
|
|
11
|
+
var _CombinedPdf = _interopRequireDefault(require("../model/CombinedPdf"));
|
|
12
|
+
var _CombinedPdfList = _interopRequireDefault(require("../model/CombinedPdfList"));
|
|
13
|
+
var _CopyTemplateRequest = _interopRequireDefault(require("../model/CopyTemplateRequest"));
|
|
14
|
+
var _CreateCombinedPdfRequest = _interopRequireDefault(require("../model/CreateCombinedPdfRequest"));
|
|
15
|
+
var _CreateCustomFileFromUploadRequest = _interopRequireDefault(require("../model/CreateCustomFileFromUploadRequest"));
|
|
16
|
+
var _CreateFolderRequest = _interopRequireDefault(require("../model/CreateFolderRequest"));
|
|
17
|
+
var _CreateSignatureRequestEventRequest = _interopRequireDefault(require("../model/CreateSignatureRequestEventRequest"));
|
|
18
|
+
var _CreateSignatureRequestTokenRequest = _interopRequireDefault(require("../model/CreateSignatureRequestTokenRequest"));
|
|
19
|
+
var _CreateSubmissionBatchRequest = _interopRequireDefault(require("../model/CreateSubmissionBatchRequest"));
|
|
20
|
+
var _CreateSubmissionRequest = _interopRequireDefault(require("../model/CreateSubmissionRequest"));
|
|
21
|
+
var _CreateTemplateRequest = _interopRequireDefault(require("../model/CreateTemplateRequest"));
|
|
22
|
+
var _CreateWebhookRequest = _interopRequireDefault(require("../model/CreateWebhookRequest"));
|
|
23
|
+
var _CustomFile = _interopRequireDefault(require("../model/CustomFile"));
|
|
24
|
+
var _CustomFileList = _interopRequireDefault(require("../model/CustomFileList"));
|
|
27
25
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
26
|
+
var _FieldSetupLogic = _interopRequireDefault(require("../model/FieldSetupLogic"));
|
|
27
|
+
var _FieldSetupNaming = _interopRequireDefault(require("../model/FieldSetupNaming"));
|
|
28
|
+
var _FieldSetupSource = _interopRequireDefault(require("../model/FieldSetupSource"));
|
|
28
29
|
var _Folder = _interopRequireDefault(require("../model/Folder"));
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
30
|
+
var _FolderList = _interopRequireDefault(require("../model/FolderList"));
|
|
31
|
+
var _GenerateSubmissionFilesRequest = _interopRequireDefault(require("../model/GenerateSubmissionFilesRequest"));
|
|
32
|
+
var _ModelCodeLanguage = _interopRequireDefault(require("../model/ModelCodeLanguage"));
|
|
33
|
+
var _MoveFolderRequest = _interopRequireDefault(require("../model/MoveFolderRequest"));
|
|
34
|
+
var _MoveTemplateRequest = _interopRequireDefault(require("../model/MoveTemplateRequest"));
|
|
35
|
+
var _PublishTemplateVersionRequest = _interopRequireDefault(require("../model/PublishTemplateVersionRequest"));
|
|
36
|
+
var _RemoveTemplateFieldsRequest = _interopRequireDefault(require("../model/RemoveTemplateFieldsRequest"));
|
|
37
|
+
var _RenameFolderRequest = _interopRequireDefault(require("../model/RenameFolderRequest"));
|
|
38
|
+
var _ReorderTemplateFieldsRequest = _interopRequireDefault(require("../model/ReorderTemplateFieldsRequest"));
|
|
39
|
+
var _RestoreTemplateVersionRequest = _interopRequireDefault(require("../model/RestoreTemplateVersionRequest"));
|
|
40
|
+
var _SignatureRequest = _interopRequireDefault(require("../model/SignatureRequest"));
|
|
41
|
+
var _SignatureRequestEvent = _interopRequireDefault(require("../model/SignatureRequestEvent"));
|
|
42
|
+
var _SignatureRequestToken = _interopRequireDefault(require("../model/SignatureRequestToken"));
|
|
38
43
|
var _Submission = _interopRequireDefault(require("../model/Submission"));
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var _SubmissionDataRequestShow = _interopRequireDefault(require("../model/SubmissionDataRequestShow"));
|
|
43
|
-
var _SubmissionPreview = _interopRequireDefault(require("../model/SubmissionPreview"));
|
|
44
|
-
var _SuccessErrorResponse = _interopRequireDefault(require("../model/SuccessErrorResponse"));
|
|
45
|
-
var _SuccessMultipleErrorsResponse = _interopRequireDefault(require("../model/SuccessMultipleErrorsResponse"));
|
|
44
|
+
var _SubmissionBatch = _interopRequireDefault(require("../model/SubmissionBatch"));
|
|
45
|
+
var _SubmissionList = _interopRequireDefault(require("../model/SubmissionList"));
|
|
46
|
+
var _SubmissionValidation = _interopRequireDefault(require("../model/SubmissionValidation"));
|
|
46
47
|
var _Template = _interopRequireDefault(require("../model/Template"));
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
48
|
+
var _TemplateDiff = _interopRequireDefault(require("../model/TemplateDiff"));
|
|
49
|
+
var _TemplateFields = _interopRequireDefault(require("../model/TemplateFields"));
|
|
50
|
+
var _TemplateModelCode = _interopRequireDefault(require("../model/TemplateModelCode"));
|
|
51
|
+
var _TemplatePageImages = _interopRequireDefault(require("../model/TemplatePageImages"));
|
|
52
|
+
var _TemplateSummaryList = _interopRequireDefault(require("../model/TemplateSummaryList"));
|
|
53
|
+
var _TemplateVersion = _interopRequireDefault(require("../model/TemplateVersion"));
|
|
54
|
+
var _UpdateSignatureRequestRequest = _interopRequireDefault(require("../model/UpdateSignatureRequestRequest"));
|
|
55
|
+
var _UpdateTemplateDocumentRequest = _interopRequireDefault(require("../model/UpdateTemplateDocumentRequest"));
|
|
56
|
+
var _UpdateTemplateFieldsRequest = _interopRequireDefault(require("../model/UpdateTemplateFieldsRequest"));
|
|
57
|
+
var _UpdateTemplateRequest = _interopRequireDefault(require("../model/UpdateTemplateRequest"));
|
|
58
|
+
var _UpdateWebhookRequest = _interopRequireDefault(require("../model/UpdateWebhookRequest"));
|
|
59
|
+
var _UploadPresign = _interopRequireDefault(require("../model/UploadPresign"));
|
|
60
|
+
var _ValidateSubmissionRequest = _interopRequireDefault(require("../model/ValidateSubmissionRequest"));
|
|
57
61
|
var _Webhook = _interopRequireDefault(require("../model/Webhook"));
|
|
62
|
+
var _WebhookEventType = _interopRequireDefault(require("../model/WebhookEventType"));
|
|
63
|
+
var _WebhookList = _interopRequireDefault(require("../model/WebhookList"));
|
|
64
|
+
var _WebhookMode = _interopRequireDefault(require("../model/WebhookMode"));
|
|
58
65
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
59
66
|
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); }
|
|
60
67
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -63,9 +70,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
63
70
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
64
71
|
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); } /**
|
|
65
72
|
* DocSpring API
|
|
66
|
-
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
73
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
67
74
|
*
|
|
68
|
-
* The version of the OpenAPI document:
|
|
75
|
+
* The version of the OpenAPI document: v2
|
|
69
76
|
*
|
|
70
77
|
*
|
|
71
78
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -76,7 +83,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
76
83
|
/**
|
|
77
84
|
* Client service.
|
|
78
85
|
* @module api/Client
|
|
79
|
-
* @version
|
|
86
|
+
* @version 4.1.0
|
|
80
87
|
*/
|
|
81
88
|
var Client = exports["default"] = /*#__PURE__*/function () {
|
|
82
89
|
/**
|
|
@@ -93,13 +100,23 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
93
100
|
if (options && options.constructor && options.constructor.name === 'ApiClient') {
|
|
94
101
|
this.apiClient = options;
|
|
95
102
|
} else {
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
// A client given credentials, a host or a region gets its own ApiClient, so two clients don't change each
|
|
104
|
+
// other's. Without them it uses the shared ApiClient.instance.
|
|
105
|
+
var ownApiClient = ['apiTokenId', 'apiTokenSecret', 'host', 'region'].some(function (key) {
|
|
106
|
+
return options[key] !== undefined;
|
|
107
|
+
});
|
|
108
|
+
var apiClient = options.apiClient || (ownApiClient ? new _ApiClient["default"]() : _ApiClient["default"].instance);
|
|
98
109
|
var env = typeof process !== 'undefined' && process.env ? process.env : {};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
110
|
+
|
|
111
|
+
// Use the credentials passed in, or the environment variables. An empty string counts as not set.
|
|
112
|
+
var apiTokenId = options.apiTokenId || env.DOCSPRING_TOKEN_ID || null;
|
|
113
|
+
var apiTokenSecret = options.apiTokenSecret || env.DOCSPRING_TOKEN_SECRET || null;
|
|
114
|
+
|
|
115
|
+
// Without credentials the client is still created, and the API's 401 response says what's missing
|
|
116
|
+
if (apiTokenId != null) {
|
|
102
117
|
apiClient.authentications['api_token_basic'].username = apiTokenId;
|
|
118
|
+
}
|
|
119
|
+
if (apiTokenSecret != null) {
|
|
103
120
|
apiClient.authentications['api_token_basic'].password = apiTokenSecret;
|
|
104
121
|
}
|
|
105
122
|
|
|
@@ -114,7 +131,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
114
131
|
var url = String(host).trim();
|
|
115
132
|
if (!/^https?:\/\//i.test(url)) url = "https://".concat(url);
|
|
116
133
|
url = url.replace(/\/+$/, '');
|
|
117
|
-
|
|
134
|
+
// Any API version's path (such as /api/v1 from a 3.x setup) becomes /api/v2
|
|
135
|
+
url = "".concat(url.replace(/\/api\/v\d+$/i, ''), "/api/v2");
|
|
118
136
|
apiClient.basePath = url;
|
|
119
137
|
}
|
|
120
138
|
this.apiClient = apiClient;
|
|
@@ -122,32 +140,23 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
122
140
|
}
|
|
123
141
|
|
|
124
142
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* @param {String}
|
|
128
|
-
* @param {module:model/
|
|
129
|
-
* @
|
|
130
|
-
*/
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Add new fields to a Template
|
|
134
|
-
* Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.
|
|
135
|
-
* @param {String} template_id
|
|
136
|
-
* @param {module:model/AddFieldsData} data
|
|
137
|
-
* @param {module:api/Client~addFieldsToTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
138
|
-
* data is of type: {@link module:model/TemplateAddFieldsResponse}
|
|
143
|
+
* Add fields to a template
|
|
144
|
+
* Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
145
|
+
* @param {String} template_id The template's ID.
|
|
146
|
+
* @param {module:model/AddTemplateFieldsRequest} body The fields to add to the template's draft.
|
|
147
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
139
148
|
*/
|
|
140
149
|
return _createClass(Client, [{
|
|
141
|
-
key: "
|
|
142
|
-
value: function
|
|
143
|
-
var postBody =
|
|
150
|
+
key: "addTemplateFieldsWithHttpInfo",
|
|
151
|
+
value: function addTemplateFieldsWithHttpInfo(template_id, body) {
|
|
152
|
+
var postBody = body;
|
|
144
153
|
// verify the required parameter 'template_id' is set
|
|
145
154
|
if (template_id === undefined || template_id === null) {
|
|
146
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
155
|
+
throw new Error("Missing the required parameter 'template_id' when calling addTemplateFields");
|
|
147
156
|
}
|
|
148
|
-
// verify the required parameter '
|
|
149
|
-
if (
|
|
150
|
-
throw new Error("Missing the required parameter '
|
|
157
|
+
// verify the required parameter 'body' is set
|
|
158
|
+
if (body === undefined || body === null) {
|
|
159
|
+
throw new Error("Missing the required parameter 'body' when calling addTemplateFields");
|
|
151
160
|
}
|
|
152
161
|
var pathParams = {
|
|
153
162
|
'template_id': template_id
|
|
@@ -158,144 +167,169 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
158
167
|
var authNames = ['api_token_basic'];
|
|
159
168
|
var contentTypes = ['application/json'];
|
|
160
169
|
var accepts = ['application/json'];
|
|
161
|
-
var returnType =
|
|
162
|
-
return this.apiClient.callApi('/templates/{template_id}/
|
|
170
|
+
var returnType = _TemplateFields["default"];
|
|
171
|
+
return this.apiClient.callApi('/templates/{template_id}/fields', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
163
172
|
}
|
|
164
173
|
|
|
165
174
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* @param {String}
|
|
169
|
-
* @param {module:model/
|
|
170
|
-
* @
|
|
175
|
+
* Add fields to a template
|
|
176
|
+
* Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
177
|
+
* @param {String} template_id The template's ID.
|
|
178
|
+
* @param {module:model/AddTemplateFieldsRequest} body The fields to add to the template's draft.
|
|
179
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
171
180
|
*/
|
|
181
|
+
}, {
|
|
182
|
+
key: "addTemplateFields",
|
|
183
|
+
value: function addTemplateFields(template_id, body) {
|
|
184
|
+
return this.addTemplateFieldsWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
185
|
+
return response_and_data.data;
|
|
186
|
+
});
|
|
187
|
+
}
|
|
172
188
|
|
|
173
189
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* @param {
|
|
190
|
+
* Copy a template
|
|
191
|
+
* Copies a template (its draft, or a published version) into a new template.
|
|
192
|
+
* @param {String} template_id The template's ID.
|
|
177
193
|
* @param {Object} opts Optional parameters
|
|
178
|
-
* @param {
|
|
179
|
-
* @
|
|
180
|
-
* data is of type: {@link module:model/BatchGeneratePdfs201Response}
|
|
194
|
+
* @param {module:model/CopyTemplateRequest} [body] Settings for the copy.
|
|
195
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
181
196
|
*/
|
|
182
197
|
}, {
|
|
183
|
-
key: "
|
|
184
|
-
value: function
|
|
198
|
+
key: "copyTemplateWithHttpInfo",
|
|
199
|
+
value: function copyTemplateWithHttpInfo(template_id, opts) {
|
|
185
200
|
opts = opts || {};
|
|
186
|
-
var postBody =
|
|
187
|
-
// verify the required parameter '
|
|
188
|
-
if (
|
|
189
|
-
throw new Error("Missing the required parameter '
|
|
201
|
+
var postBody = opts['body'];
|
|
202
|
+
// verify the required parameter 'template_id' is set
|
|
203
|
+
if (template_id === undefined || template_id === null) {
|
|
204
|
+
throw new Error("Missing the required parameter 'template_id' when calling copyTemplate");
|
|
190
205
|
}
|
|
191
|
-
var pathParams = {
|
|
192
|
-
|
|
193
|
-
'wait': opts['wait']
|
|
206
|
+
var pathParams = {
|
|
207
|
+
'template_id': template_id
|
|
194
208
|
};
|
|
209
|
+
var queryParams = {};
|
|
195
210
|
var headerParams = {};
|
|
196
211
|
var formParams = {};
|
|
197
212
|
var authNames = ['api_token_basic'];
|
|
198
213
|
var contentTypes = ['application/json'];
|
|
199
214
|
var accepts = ['application/json'];
|
|
200
|
-
var returnType =
|
|
201
|
-
return this.apiClient.callApi('/
|
|
215
|
+
var returnType = _Template["default"];
|
|
216
|
+
return this.apiClient.callApi('/templates/{template_id}/copy', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
202
217
|
}
|
|
203
218
|
|
|
204
219
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* @param {String}
|
|
208
|
-
* @param {
|
|
209
|
-
* @param {
|
|
220
|
+
* Copy a template
|
|
221
|
+
* Copies a template (its draft, or a published version) into a new template.
|
|
222
|
+
* @param {String} template_id The template's ID.
|
|
223
|
+
* @param {Object} opts Optional parameters
|
|
224
|
+
* @param {module:model/CopyTemplateRequest} opts.body Settings for the copy.
|
|
225
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
210
226
|
*/
|
|
227
|
+
}, {
|
|
228
|
+
key: "copyTemplate",
|
|
229
|
+
value: function copyTemplate(template_id, opts) {
|
|
230
|
+
return this.copyTemplateWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
231
|
+
return response_and_data.data;
|
|
232
|
+
});
|
|
233
|
+
}
|
|
211
234
|
|
|
212
235
|
/**
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* @param {module:model/
|
|
216
|
-
* @param {
|
|
217
|
-
*
|
|
236
|
+
* Combine PDFs
|
|
237
|
+
* Merges PDFs into one: submissions, other combined PDFs, templates, custom files (POST /custom_files) and PDFs from URLs, in the order of `source_pdfs`. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /combined_pdfs/{combined_pdf_id} until `state` isn't `pending`. A template source merges the template's processed PDF by default: the PDF submissions are filled in on, decrypted and with its form fields removed. Pass `processed: false` to merge the PDF as it was uploaded.
|
|
238
|
+
* @param {module:model/CreateCombinedPdfRequest} body The PDFs to merge, and the combined PDF's settings.
|
|
239
|
+
* @param {Object} opts Optional parameters
|
|
240
|
+
* @param {Boolean} [wait] Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
241
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
218
242
|
*/
|
|
219
243
|
}, {
|
|
220
|
-
key: "
|
|
221
|
-
value: function
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
244
|
+
key: "createCombinedPdfWithHttpInfo",
|
|
245
|
+
value: function createCombinedPdfWithHttpInfo(body, opts) {
|
|
246
|
+
opts = opts || {};
|
|
247
|
+
var postBody = body;
|
|
248
|
+
// verify the required parameter 'body' is set
|
|
249
|
+
if (body === undefined || body === null) {
|
|
250
|
+
throw new Error("Missing the required parameter 'body' when calling createCombinedPdf");
|
|
226
251
|
}
|
|
227
252
|
var pathParams = {};
|
|
228
|
-
var queryParams = {
|
|
253
|
+
var queryParams = {
|
|
254
|
+
'wait': opts['wait']
|
|
255
|
+
};
|
|
229
256
|
var headerParams = {};
|
|
230
257
|
var formParams = {};
|
|
231
258
|
var authNames = ['api_token_basic'];
|
|
232
259
|
var contentTypes = ['application/json'];
|
|
233
260
|
var accepts = ['application/json'];
|
|
234
|
-
var returnType =
|
|
235
|
-
return this.apiClient.callApi('/
|
|
261
|
+
var returnType = _CombinedPdf["default"];
|
|
262
|
+
return this.apiClient.callApi('/combined_pdfs', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
236
263
|
}
|
|
237
264
|
|
|
238
265
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* @param {
|
|
242
|
-
* @param {
|
|
243
|
-
* @param {
|
|
266
|
+
* Combine PDFs
|
|
267
|
+
* Merges PDFs into one: submissions, other combined PDFs, templates, custom files (POST /custom_files) and PDFs from URLs, in the order of `source_pdfs`. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /combined_pdfs/{combined_pdf_id} until `state` isn't `pending`. A template source merges the template's processed PDF by default: the PDF submissions are filled in on, decrypted and with its form fields removed. Pass `processed: false` to merge the PDF as it was uploaded.
|
|
268
|
+
* @param {module:model/CreateCombinedPdfRequest} body The PDFs to merge, and the combined PDF's settings.
|
|
269
|
+
* @param {Object} opts Optional parameters
|
|
270
|
+
* @param {Boolean} opts.wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
271
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
244
272
|
*/
|
|
273
|
+
}, {
|
|
274
|
+
key: "createCombinedPdf",
|
|
275
|
+
value: function createCombinedPdf(body, opts) {
|
|
276
|
+
return this.createCombinedPdfWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
277
|
+
return response_and_data.data;
|
|
278
|
+
});
|
|
279
|
+
}
|
|
245
280
|
|
|
246
281
|
/**
|
|
247
|
-
*
|
|
248
|
-
* Creates a
|
|
249
|
-
* @param {
|
|
250
|
-
* @
|
|
251
|
-
* @param {module:model/CopyTemplateOptions} [options]
|
|
252
|
-
* @param {module:api/Client~copyTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
253
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
282
|
+
* Create a custom file from an upload
|
|
283
|
+
* Creates a custom file from a PDF you uploaded, so you can merge it with other PDFs. Upload the file with the presigned upload (GET /uploads/presign) first, then pass its `fields.key` as `cache_id`.
|
|
284
|
+
* @param {module:model/CreateCustomFileFromUploadRequest} body The uploaded file to create the custom file from.
|
|
285
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
254
286
|
*/
|
|
255
287
|
}, {
|
|
256
|
-
key: "
|
|
257
|
-
value: function
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
throw new Error("Missing the required parameter 'template_id' when calling copyTemplate");
|
|
288
|
+
key: "createCustomFileFromUploadWithHttpInfo",
|
|
289
|
+
value: function createCustomFileFromUploadWithHttpInfo(body) {
|
|
290
|
+
var postBody = body;
|
|
291
|
+
// verify the required parameter 'body' is set
|
|
292
|
+
if (body === undefined || body === null) {
|
|
293
|
+
throw new Error("Missing the required parameter 'body' when calling createCustomFileFromUpload");
|
|
263
294
|
}
|
|
264
|
-
var pathParams = {
|
|
265
|
-
'template_id': template_id
|
|
266
|
-
};
|
|
295
|
+
var pathParams = {};
|
|
267
296
|
var queryParams = {};
|
|
268
297
|
var headerParams = {};
|
|
269
298
|
var formParams = {};
|
|
270
299
|
var authNames = ['api_token_basic'];
|
|
271
300
|
var contentTypes = ['application/json'];
|
|
272
301
|
var accepts = ['application/json'];
|
|
273
|
-
var returnType =
|
|
274
|
-
return this.apiClient.callApi('/
|
|
302
|
+
var returnType = _CustomFile["default"];
|
|
303
|
+
return this.apiClient.callApi('/custom_files', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
275
304
|
}
|
|
276
305
|
|
|
277
306
|
/**
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* @param {
|
|
281
|
-
* @
|
|
282
|
-
* @param {String} response The complete HTTP response.
|
|
307
|
+
* Create a custom file from an upload
|
|
308
|
+
* Creates a custom file from a PDF you uploaded, so you can merge it with other PDFs. Upload the file with the presigned upload (GET /uploads/presign) first, then pass its `fields.key` as `cache_id`.
|
|
309
|
+
* @param {module:model/CreateCustomFileFromUploadRequest} body The uploaded file to create the custom file from.
|
|
310
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
283
311
|
*/
|
|
312
|
+
}, {
|
|
313
|
+
key: "createCustomFileFromUpload",
|
|
314
|
+
value: function createCustomFileFromUpload(body) {
|
|
315
|
+
return this.createCustomFileFromUploadWithHttpInfo(body).then(function (response_and_data) {
|
|
316
|
+
return response_and_data.data;
|
|
317
|
+
});
|
|
318
|
+
}
|
|
284
319
|
|
|
285
320
|
/**
|
|
286
|
-
* Create a
|
|
287
|
-
*
|
|
288
|
-
* @param {module:model/
|
|
289
|
-
* @
|
|
290
|
-
* data is of type: {@link module:model/CreateCustomFileResponse}
|
|
321
|
+
* Create a folder
|
|
322
|
+
* Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
323
|
+
* @param {module:model/CreateFolderRequest} body The folder to create.
|
|
324
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
291
325
|
*/
|
|
292
326
|
}, {
|
|
293
|
-
key: "
|
|
294
|
-
value: function
|
|
295
|
-
var postBody =
|
|
296
|
-
// verify the required parameter '
|
|
297
|
-
if (
|
|
298
|
-
throw new Error("Missing the required parameter '
|
|
327
|
+
key: "createFolderWithHttpInfo",
|
|
328
|
+
value: function createFolderWithHttpInfo(body) {
|
|
329
|
+
var postBody = body;
|
|
330
|
+
// verify the required parameter 'body' is set
|
|
331
|
+
if (body === undefined || body === null) {
|
|
332
|
+
throw new Error("Missing the required parameter 'body' when calling createFolder");
|
|
299
333
|
}
|
|
300
334
|
var pathParams = {};
|
|
301
335
|
var queryParams = {};
|
|
@@ -304,40 +338,45 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
304
338
|
var authNames = ['api_token_basic'];
|
|
305
339
|
var contentTypes = ['application/json'];
|
|
306
340
|
var accepts = ['application/json'];
|
|
307
|
-
var returnType =
|
|
308
|
-
return this.apiClient.callApi('/
|
|
341
|
+
var returnType = _Folder["default"];
|
|
342
|
+
return this.apiClient.callApi('/folders', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
309
343
|
}
|
|
310
344
|
|
|
311
345
|
/**
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* @param {
|
|
315
|
-
* @
|
|
316
|
-
* @param {String} response The complete HTTP response.
|
|
346
|
+
* Create a folder
|
|
347
|
+
* Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
348
|
+
* @param {module:model/CreateFolderRequest} body The folder to create.
|
|
349
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
317
350
|
*/
|
|
351
|
+
}, {
|
|
352
|
+
key: "createFolder",
|
|
353
|
+
value: function createFolder(body) {
|
|
354
|
+
return this.createFolderWithHttpInfo(body).then(function (response_and_data) {
|
|
355
|
+
return response_and_data.data;
|
|
356
|
+
});
|
|
357
|
+
}
|
|
318
358
|
|
|
319
359
|
/**
|
|
320
|
-
*
|
|
321
|
-
* Records
|
|
322
|
-
* @param {String}
|
|
323
|
-
* @param {module:model/
|
|
324
|
-
* @
|
|
325
|
-
* data is of type: {@link module:model/CreateSubmissionDataRequestEventResponse}
|
|
360
|
+
* Record a signature request event
|
|
361
|
+
* Records something that happened outside DocSpring in the signature request's audit trail: you sent the request to the person (`send_request`). The audit trail shows it as reported by your account.
|
|
362
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
363
|
+
* @param {module:model/CreateSignatureRequestEventRequest} body The event to record.
|
|
364
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequestEvent} and HTTP response
|
|
326
365
|
*/
|
|
327
366
|
}, {
|
|
328
|
-
key: "
|
|
329
|
-
value: function
|
|
330
|
-
var postBody =
|
|
331
|
-
// verify the required parameter '
|
|
332
|
-
if (
|
|
333
|
-
throw new Error("Missing the required parameter '
|
|
367
|
+
key: "createSignatureRequestEventWithHttpInfo",
|
|
368
|
+
value: function createSignatureRequestEventWithHttpInfo(signature_request_id, body) {
|
|
369
|
+
var postBody = body;
|
|
370
|
+
// verify the required parameter 'signature_request_id' is set
|
|
371
|
+
if (signature_request_id === undefined || signature_request_id === null) {
|
|
372
|
+
throw new Error("Missing the required parameter 'signature_request_id' when calling createSignatureRequestEvent");
|
|
334
373
|
}
|
|
335
|
-
// verify the required parameter '
|
|
336
|
-
if (
|
|
337
|
-
throw new Error("Missing the required parameter '
|
|
374
|
+
// verify the required parameter 'body' is set
|
|
375
|
+
if (body === undefined || body === null) {
|
|
376
|
+
throw new Error("Missing the required parameter 'body' when calling createSignatureRequestEvent");
|
|
338
377
|
}
|
|
339
378
|
var pathParams = {
|
|
340
|
-
'
|
|
379
|
+
'signature_request_id': signature_request_id
|
|
341
380
|
};
|
|
342
381
|
var queryParams = {};
|
|
343
382
|
var headerParams = {};
|
|
@@ -345,192 +384,233 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
345
384
|
var authNames = ['api_token_basic'];
|
|
346
385
|
var contentTypes = ['application/json'];
|
|
347
386
|
var accepts = ['application/json'];
|
|
348
|
-
var returnType =
|
|
349
|
-
return this.apiClient.callApi('/
|
|
387
|
+
var returnType = _SignatureRequestEvent["default"];
|
|
388
|
+
return this.apiClient.callApi('/signature_requests/{signature_request_id}/events', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
350
389
|
}
|
|
351
390
|
|
|
352
391
|
/**
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
* @param {String}
|
|
356
|
-
* @param {module:model/
|
|
357
|
-
* @
|
|
392
|
+
* Record a signature request event
|
|
393
|
+
* Records something that happened outside DocSpring in the signature request's audit trail: you sent the request to the person (`send_request`). The audit trail shows it as reported by your account.
|
|
394
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
395
|
+
* @param {module:model/CreateSignatureRequestEventRequest} body The event to record.
|
|
396
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequestEvent}
|
|
358
397
|
*/
|
|
398
|
+
}, {
|
|
399
|
+
key: "createSignatureRequestEvent",
|
|
400
|
+
value: function createSignatureRequestEvent(signature_request_id, body) {
|
|
401
|
+
return this.createSignatureRequestEventWithHttpInfo(signature_request_id, body).then(function (response_and_data) {
|
|
402
|
+
return response_and_data.data;
|
|
403
|
+
});
|
|
404
|
+
}
|
|
359
405
|
|
|
360
406
|
/**
|
|
361
|
-
* Create a
|
|
362
|
-
* Creates
|
|
363
|
-
* @param {String}
|
|
407
|
+
* Create a signature request token
|
|
408
|
+
* Creates a token that opens the signature request without signing in, in a form embedded in your app or from a link you send. The response is the only time the token's secret is returned. The link works for 24 hours, or 7 days for an `email` token, and a signing page that opened in time keeps working for 7 more days. A test API token can't create a token for a live signature request.
|
|
409
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
364
410
|
* @param {Object} opts Optional parameters
|
|
365
|
-
* @param {module:model/
|
|
366
|
-
* @
|
|
367
|
-
* data is of type: {@link module:model/CreateSubmissionDataRequestTokenResponse}
|
|
411
|
+
* @param {module:model/CreateSignatureRequestTokenRequest} [body] The kind of link to make. Send no body for an `api` token.
|
|
412
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequestToken} and HTTP response
|
|
368
413
|
*/
|
|
369
414
|
}, {
|
|
370
|
-
key: "
|
|
371
|
-
value: function
|
|
415
|
+
key: "createSignatureRequestTokenWithHttpInfo",
|
|
416
|
+
value: function createSignatureRequestTokenWithHttpInfo(signature_request_id, opts) {
|
|
372
417
|
opts = opts || {};
|
|
373
|
-
var postBody =
|
|
374
|
-
// verify the required parameter '
|
|
375
|
-
if (
|
|
376
|
-
throw new Error("Missing the required parameter '
|
|
418
|
+
var postBody = opts['body'];
|
|
419
|
+
// verify the required parameter 'signature_request_id' is set
|
|
420
|
+
if (signature_request_id === undefined || signature_request_id === null) {
|
|
421
|
+
throw new Error("Missing the required parameter 'signature_request_id' when calling createSignatureRequestToken");
|
|
377
422
|
}
|
|
378
423
|
var pathParams = {
|
|
379
|
-
'
|
|
380
|
-
};
|
|
381
|
-
var queryParams = {
|
|
382
|
-
'type': opts['type']
|
|
424
|
+
'signature_request_id': signature_request_id
|
|
383
425
|
};
|
|
426
|
+
var queryParams = {};
|
|
384
427
|
var headerParams = {};
|
|
385
428
|
var formParams = {};
|
|
386
429
|
var authNames = ['api_token_basic'];
|
|
387
|
-
var contentTypes = [];
|
|
430
|
+
var contentTypes = ['application/json'];
|
|
388
431
|
var accepts = ['application/json'];
|
|
389
|
-
var returnType =
|
|
390
|
-
return this.apiClient.callApi('/
|
|
432
|
+
var returnType = _SignatureRequestToken["default"];
|
|
433
|
+
return this.apiClient.callApi('/signature_requests/{signature_request_id}/tokens', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
391
434
|
}
|
|
392
435
|
|
|
393
436
|
/**
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
* @param {String}
|
|
397
|
-
* @param {
|
|
398
|
-
* @param {
|
|
437
|
+
* Create a signature request token
|
|
438
|
+
* Creates a token that opens the signature request without signing in, in a form embedded in your app or from a link you send. The response is the only time the token's secret is returned. The link works for 24 hours, or 7 days for an `email` token, and a signing page that opened in time keeps working for 7 more days. A test API token can't create a token for a live signature request.
|
|
439
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
440
|
+
* @param {Object} opts Optional parameters
|
|
441
|
+
* @param {module:model/CreateSignatureRequestTokenRequest} opts.body The kind of link to make. Send no body for an `api` token.
|
|
442
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequestToken}
|
|
399
443
|
*/
|
|
444
|
+
}, {
|
|
445
|
+
key: "createSignatureRequestToken",
|
|
446
|
+
value: function createSignatureRequestToken(signature_request_id, opts) {
|
|
447
|
+
return this.createSignatureRequestTokenWithHttpInfo(signature_request_id, opts).then(function (response_and_data) {
|
|
448
|
+
return response_and_data.data;
|
|
449
|
+
});
|
|
450
|
+
}
|
|
400
451
|
|
|
401
452
|
/**
|
|
402
|
-
*
|
|
403
|
-
* Creates a
|
|
404
|
-
* @param {
|
|
405
|
-
* @param {module:
|
|
406
|
-
*
|
|
453
|
+
* Generate a PDF
|
|
454
|
+
* Creates a submission: fills in a template with your data and generates a PDF. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until `state` isn't `pending`. Data that doesn't match the template's fields returns a 422 with an `invalid_data` error. The submission is still saved, with its errors, so you can find it in DocSpring: the error's `submission_id` is its ID.
|
|
455
|
+
* @param {String} template_id The template's ID.
|
|
456
|
+
* @param {module:model/CreateSubmissionRequest} body The submission's data and settings.
|
|
457
|
+
* @param {Object} opts Optional parameters
|
|
458
|
+
* @param {String} [version] The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
459
|
+
* @param {Boolean} [wait] Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
460
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
407
461
|
*/
|
|
408
462
|
}, {
|
|
409
|
-
key: "
|
|
410
|
-
value: function
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
463
|
+
key: "createSubmissionWithHttpInfo",
|
|
464
|
+
value: function createSubmissionWithHttpInfo(template_id, body, opts) {
|
|
465
|
+
opts = opts || {};
|
|
466
|
+
var postBody = body;
|
|
467
|
+
// verify the required parameter 'template_id' is set
|
|
468
|
+
if (template_id === undefined || template_id === null) {
|
|
469
|
+
throw new Error("Missing the required parameter 'template_id' when calling createSubmission");
|
|
415
470
|
}
|
|
416
|
-
|
|
417
|
-
|
|
471
|
+
// verify the required parameter 'body' is set
|
|
472
|
+
if (body === undefined || body === null) {
|
|
473
|
+
throw new Error("Missing the required parameter 'body' when calling createSubmission");
|
|
474
|
+
}
|
|
475
|
+
var pathParams = {
|
|
476
|
+
'template_id': template_id
|
|
477
|
+
};
|
|
478
|
+
var queryParams = {
|
|
479
|
+
'version': opts['version'],
|
|
480
|
+
'wait': opts['wait']
|
|
481
|
+
};
|
|
418
482
|
var headerParams = {};
|
|
419
483
|
var formParams = {};
|
|
420
484
|
var authNames = ['api_token_basic'];
|
|
421
485
|
var contentTypes = ['application/json'];
|
|
422
486
|
var accepts = ['application/json'];
|
|
423
|
-
var returnType =
|
|
424
|
-
return this.apiClient.callApi('/
|
|
487
|
+
var returnType = _Submission["default"];
|
|
488
|
+
return this.apiClient.callApi('/templates/{template_id}/submissions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
425
489
|
}
|
|
426
490
|
|
|
427
491
|
/**
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
* @param {String}
|
|
431
|
-
* @param {module:model/
|
|
432
|
-
* @param {
|
|
492
|
+
* Generate a PDF
|
|
493
|
+
* Creates a submission: fills in a template with your data and generates a PDF. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until `state` isn't `pending`. Data that doesn't match the template's fields returns a 422 with an `invalid_data` error. The submission is still saved, with its errors, so you can find it in DocSpring: the error's `submission_id` is its ID.
|
|
494
|
+
* @param {String} template_id The template's ID.
|
|
495
|
+
* @param {module:model/CreateSubmissionRequest} body The submission's data and settings.
|
|
496
|
+
* @param {Object} opts Optional parameters
|
|
497
|
+
* @param {String} opts.version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
498
|
+
* @param {Boolean} opts.wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
499
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
433
500
|
*/
|
|
501
|
+
}, {
|
|
502
|
+
key: "createSubmission",
|
|
503
|
+
value: function createSubmission(template_id, body, opts) {
|
|
504
|
+
return this.createSubmissionWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
505
|
+
return response_and_data.data;
|
|
506
|
+
});
|
|
507
|
+
}
|
|
434
508
|
|
|
435
509
|
/**
|
|
436
|
-
*
|
|
437
|
-
* Creates
|
|
438
|
-
* @param {module:model/
|
|
439
|
-
* @param {
|
|
440
|
-
*
|
|
510
|
+
* Generate PDFs in a batch
|
|
511
|
+
* Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
|
|
512
|
+
* @param {module:model/CreateSubmissionBatchRequest} body The submissions to create, and the settings they share.
|
|
513
|
+
* @param {Object} opts Optional parameters
|
|
514
|
+
* @param {Boolean} [wait] Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
515
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionBatch} and HTTP response
|
|
441
516
|
*/
|
|
442
517
|
}, {
|
|
443
|
-
key: "
|
|
444
|
-
value: function
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
518
|
+
key: "createSubmissionBatchWithHttpInfo",
|
|
519
|
+
value: function createSubmissionBatchWithHttpInfo(body, opts) {
|
|
520
|
+
opts = opts || {};
|
|
521
|
+
var postBody = body;
|
|
522
|
+
// verify the required parameter 'body' is set
|
|
523
|
+
if (body === undefined || body === null) {
|
|
524
|
+
throw new Error("Missing the required parameter 'body' when calling createSubmissionBatch");
|
|
449
525
|
}
|
|
450
526
|
var pathParams = {};
|
|
451
|
-
var queryParams = {
|
|
527
|
+
var queryParams = {
|
|
528
|
+
'wait': opts['wait']
|
|
529
|
+
};
|
|
452
530
|
var headerParams = {};
|
|
453
531
|
var formParams = {};
|
|
454
532
|
var authNames = ['api_token_basic'];
|
|
455
533
|
var contentTypes = ['application/json'];
|
|
456
534
|
var accepts = ['application/json'];
|
|
457
|
-
var returnType =
|
|
458
|
-
return this.apiClient.callApi('/
|
|
535
|
+
var returnType = _SubmissionBatch["default"];
|
|
536
|
+
return this.apiClient.callApi('/submissions/batches', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
459
537
|
}
|
|
460
538
|
|
|
461
539
|
/**
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* @param {
|
|
465
|
-
* @param {
|
|
466
|
-
* @param {
|
|
540
|
+
* Generate PDFs in a batch
|
|
541
|
+
* Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
|
|
542
|
+
* @param {module:model/CreateSubmissionBatchRequest} body The submissions to create, and the settings they share.
|
|
543
|
+
* @param {Object} opts Optional parameters
|
|
544
|
+
* @param {Boolean} opts.wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
545
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionBatch}
|
|
467
546
|
*/
|
|
547
|
+
}, {
|
|
548
|
+
key: "createSubmissionBatch",
|
|
549
|
+
value: function createSubmissionBatch(body, opts) {
|
|
550
|
+
return this.createSubmissionBatchWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
551
|
+
return response_and_data.data;
|
|
552
|
+
});
|
|
553
|
+
}
|
|
468
554
|
|
|
469
555
|
/**
|
|
470
|
-
* Create a
|
|
471
|
-
* Creates a
|
|
472
|
-
* @param {
|
|
473
|
-
* @param {String} template_name
|
|
556
|
+
* Create a template
|
|
557
|
+
* Creates an HTML template, or a PDF template from a PDF you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. To send the PDF with the request instead, use POST /templates/upload. A PDF template is ready to generate PDFs once DocSpring has processed its PDF (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
558
|
+
* @param {module:model/CreateTemplateRequest} body The template to create.
|
|
474
559
|
* @param {Object} opts Optional parameters
|
|
475
|
-
* @param {Boolean} [wait
|
|
476
|
-
* @
|
|
477
|
-
* @param {String} [template_parent_folder_id]
|
|
478
|
-
* @param {module:api/Client~createPdfTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
479
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
560
|
+
* @param {Boolean} [wait] Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
561
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
480
562
|
*/
|
|
481
563
|
}, {
|
|
482
|
-
key: "
|
|
483
|
-
value: function
|
|
564
|
+
key: "createTemplateWithHttpInfo",
|
|
565
|
+
value: function createTemplateWithHttpInfo(body, opts) {
|
|
484
566
|
opts = opts || {};
|
|
485
|
-
var postBody =
|
|
486
|
-
// verify the required parameter '
|
|
487
|
-
if (
|
|
488
|
-
throw new Error("Missing the required parameter '
|
|
489
|
-
}
|
|
490
|
-
// verify the required parameter 'template_name' is set
|
|
491
|
-
if (template_name === undefined || template_name === null) {
|
|
492
|
-
throw new Error("Missing the required parameter 'template_name' when calling createPdfTemplate");
|
|
567
|
+
var postBody = body;
|
|
568
|
+
// verify the required parameter 'body' is set
|
|
569
|
+
if (body === undefined || body === null) {
|
|
570
|
+
throw new Error("Missing the required parameter 'body' when calling createTemplate");
|
|
493
571
|
}
|
|
494
572
|
var pathParams = {};
|
|
495
573
|
var queryParams = {
|
|
496
574
|
'wait': opts['wait']
|
|
497
575
|
};
|
|
498
576
|
var headerParams = {};
|
|
499
|
-
var formParams = {
|
|
500
|
-
'template[document]': template_document,
|
|
501
|
-
'template[name]': template_name,
|
|
502
|
-
'template[description]': opts['template_description'],
|
|
503
|
-
'template[parent_folder_id]': opts['template_parent_folder_id']
|
|
504
|
-
};
|
|
577
|
+
var formParams = {};
|
|
505
578
|
var authNames = ['api_token_basic'];
|
|
506
|
-
var contentTypes = ['
|
|
579
|
+
var contentTypes = ['application/json'];
|
|
507
580
|
var accepts = ['application/json'];
|
|
508
|
-
var returnType =
|
|
509
|
-
return this.apiClient.callApi('/templates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
581
|
+
var returnType = _Template["default"];
|
|
582
|
+
return this.apiClient.callApi('/templates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
510
583
|
}
|
|
511
584
|
|
|
512
585
|
/**
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
* @param {
|
|
516
|
-
* @param {
|
|
517
|
-
* @param {
|
|
586
|
+
* Create a template
|
|
587
|
+
* Creates an HTML template, or a PDF template from a PDF you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. To send the PDF with the request instead, use POST /templates/upload. A PDF template is ready to generate PDFs once DocSpring has processed its PDF (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
588
|
+
* @param {module:model/CreateTemplateRequest} body The template to create.
|
|
589
|
+
* @param {Object} opts Optional parameters
|
|
590
|
+
* @param {Boolean} opts.wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
591
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
518
592
|
*/
|
|
593
|
+
}, {
|
|
594
|
+
key: "createTemplate",
|
|
595
|
+
value: function createTemplate(body, opts) {
|
|
596
|
+
return this.createTemplateWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
597
|
+
return response_and_data.data;
|
|
598
|
+
});
|
|
599
|
+
}
|
|
519
600
|
|
|
520
601
|
/**
|
|
521
|
-
* Create a
|
|
522
|
-
* Creates a
|
|
523
|
-
* @param {module:model/
|
|
524
|
-
* @
|
|
525
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
602
|
+
* Create a webhook
|
|
603
|
+
* Creates a webhook that sends a POST request to your endpoint whenever a subscribed event happens. Scope it to API tokens, templates or folders to receive only their events.
|
|
604
|
+
* @param {module:model/CreateWebhookRequest} body The webhook to create.
|
|
605
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
526
606
|
*/
|
|
527
607
|
}, {
|
|
528
|
-
key: "
|
|
529
|
-
value: function
|
|
530
|
-
var postBody =
|
|
531
|
-
// verify the required parameter '
|
|
532
|
-
if (
|
|
533
|
-
throw new Error("Missing the required parameter '
|
|
608
|
+
key: "createWebhookWithHttpInfo",
|
|
609
|
+
value: function createWebhookWithHttpInfo(body) {
|
|
610
|
+
var postBody = body;
|
|
611
|
+
// verify the required parameter 'body' is set
|
|
612
|
+
if (body === undefined || body === null) {
|
|
613
|
+
throw new Error("Missing the required parameter 'body' when calling createWebhook");
|
|
534
614
|
}
|
|
535
615
|
var pathParams = {};
|
|
536
616
|
var queryParams = {};
|
|
@@ -539,62 +619,74 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
539
619
|
var authNames = ['api_token_basic'];
|
|
540
620
|
var contentTypes = ['application/json'];
|
|
541
621
|
var accepts = ['application/json'];
|
|
542
|
-
var returnType =
|
|
543
|
-
return this.apiClient.callApi('/
|
|
622
|
+
var returnType = _Webhook["default"];
|
|
623
|
+
return this.apiClient.callApi('/webhooks', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
544
624
|
}
|
|
545
625
|
|
|
546
626
|
/**
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
* @param {
|
|
550
|
-
* @
|
|
551
|
-
* @param {String} response The complete HTTP response.
|
|
627
|
+
* Create a webhook
|
|
628
|
+
* Creates a webhook that sends a POST request to your endpoint whenever a subscribed event happens. Scope it to API tokens, templates or folders to receive only their events.
|
|
629
|
+
* @param {module:model/CreateWebhookRequest} body The webhook to create.
|
|
630
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
552
631
|
*/
|
|
632
|
+
}, {
|
|
633
|
+
key: "createWebhook",
|
|
634
|
+
value: function createWebhook(body) {
|
|
635
|
+
return this.createWebhookWithHttpInfo(body).then(function (response_and_data) {
|
|
636
|
+
return response_and_data.data;
|
|
637
|
+
});
|
|
638
|
+
}
|
|
553
639
|
|
|
554
640
|
/**
|
|
555
|
-
*
|
|
556
|
-
*
|
|
557
|
-
* @param {
|
|
558
|
-
* @
|
|
559
|
-
* data is of type: {@link module:model/Webhook}
|
|
641
|
+
* Delete a custom file
|
|
642
|
+
* Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
643
|
+
* @param {String} custom_file_id The custom file's ID.
|
|
644
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
560
645
|
*/
|
|
561
646
|
}, {
|
|
562
|
-
key: "
|
|
563
|
-
value: function
|
|
564
|
-
var postBody =
|
|
565
|
-
// verify the required parameter '
|
|
566
|
-
if (
|
|
567
|
-
throw new Error("Missing the required parameter '
|
|
647
|
+
key: "deleteCustomFileWithHttpInfo",
|
|
648
|
+
value: function deleteCustomFileWithHttpInfo(custom_file_id) {
|
|
649
|
+
var postBody = null;
|
|
650
|
+
// verify the required parameter 'custom_file_id' is set
|
|
651
|
+
if (custom_file_id === undefined || custom_file_id === null) {
|
|
652
|
+
throw new Error("Missing the required parameter 'custom_file_id' when calling deleteCustomFile");
|
|
568
653
|
}
|
|
569
|
-
var pathParams = {
|
|
654
|
+
var pathParams = {
|
|
655
|
+
'custom_file_id': custom_file_id
|
|
656
|
+
};
|
|
570
657
|
var queryParams = {};
|
|
571
658
|
var headerParams = {};
|
|
572
659
|
var formParams = {};
|
|
573
660
|
var authNames = ['api_token_basic'];
|
|
574
|
-
var contentTypes = [
|
|
661
|
+
var contentTypes = [];
|
|
575
662
|
var accepts = ['application/json'];
|
|
576
|
-
var returnType =
|
|
577
|
-
return this.apiClient.callApi('/
|
|
663
|
+
var returnType = _CustomFile["default"];
|
|
664
|
+
return this.apiClient.callApi('/custom_files/{custom_file_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
578
665
|
}
|
|
579
666
|
|
|
580
667
|
/**
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* @param {String}
|
|
584
|
-
* @
|
|
585
|
-
* @param {String} response The complete HTTP response.
|
|
668
|
+
* Delete a custom file
|
|
669
|
+
* Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
670
|
+
* @param {String} custom_file_id The custom file's ID.
|
|
671
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
586
672
|
*/
|
|
673
|
+
}, {
|
|
674
|
+
key: "deleteCustomFile",
|
|
675
|
+
value: function deleteCustomFile(custom_file_id) {
|
|
676
|
+
return this.deleteCustomFileWithHttpInfo(custom_file_id).then(function (response_and_data) {
|
|
677
|
+
return response_and_data.data;
|
|
678
|
+
});
|
|
679
|
+
}
|
|
587
680
|
|
|
588
681
|
/**
|
|
589
682
|
* Delete a folder
|
|
590
|
-
* Deletes an empty folder.
|
|
591
|
-
* @param {String} folder_id
|
|
592
|
-
* @
|
|
593
|
-
* data is of type: {@link module:model/Folder}
|
|
683
|
+
* Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
684
|
+
* @param {String} folder_id The folder's ID.
|
|
685
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
594
686
|
*/
|
|
595
687
|
}, {
|
|
596
|
-
key: "
|
|
597
|
-
value: function
|
|
688
|
+
key: "deleteFolderWithHttpInfo",
|
|
689
|
+
value: function deleteFolderWithHttpInfo(folder_id) {
|
|
598
690
|
var postBody = null;
|
|
599
691
|
// verify the required parameter 'folder_id' is set
|
|
600
692
|
if (folder_id === undefined || folder_id === null) {
|
|
@@ -610,29 +702,34 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
610
702
|
var contentTypes = [];
|
|
611
703
|
var accepts = ['application/json'];
|
|
612
704
|
var returnType = _Folder["default"];
|
|
613
|
-
return this.apiClient.callApi('/folders/{folder_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
705
|
+
return this.apiClient.callApi('/folders/{folder_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
614
706
|
}
|
|
615
707
|
|
|
616
708
|
/**
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
* @param {String}
|
|
620
|
-
* @
|
|
621
|
-
* @param {String} response The complete HTTP response.
|
|
709
|
+
* Delete a folder
|
|
710
|
+
* Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
711
|
+
* @param {String} folder_id The folder's ID.
|
|
712
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
622
713
|
*/
|
|
714
|
+
}, {
|
|
715
|
+
key: "deleteFolder",
|
|
716
|
+
value: function deleteFolder(folder_id) {
|
|
717
|
+
return this.deleteFolderWithHttpInfo(folder_id).then(function (response_and_data) {
|
|
718
|
+
return response_and_data.data;
|
|
719
|
+
});
|
|
720
|
+
}
|
|
623
721
|
|
|
624
722
|
/**
|
|
625
723
|
* Delete a template
|
|
626
|
-
* Deletes a template
|
|
627
|
-
* @param {String} template_id
|
|
724
|
+
* Deletes a template's draft and all of its published versions, or one published version (`version`). Returns the template as it was before it was deleted.
|
|
725
|
+
* @param {String} template_id The template's ID.
|
|
628
726
|
* @param {Object} opts Optional parameters
|
|
629
|
-
* @param {String} [version]
|
|
630
|
-
* @
|
|
631
|
-
* data is of type: {@link module:model/TemplateDeleteResponse}
|
|
727
|
+
* @param {String} [version] Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted.
|
|
728
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
632
729
|
*/
|
|
633
730
|
}, {
|
|
634
|
-
key: "
|
|
635
|
-
value: function
|
|
731
|
+
key: "deleteTemplateWithHttpInfo",
|
|
732
|
+
value: function deleteTemplateWithHttpInfo(template_id, opts) {
|
|
636
733
|
opts = opts || {};
|
|
637
734
|
var postBody = null;
|
|
638
735
|
// verify the required parameter 'template_id' is set
|
|
@@ -650,28 +747,35 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
650
747
|
var authNames = ['api_token_basic'];
|
|
651
748
|
var contentTypes = [];
|
|
652
749
|
var accepts = ['application/json'];
|
|
653
|
-
var returnType =
|
|
654
|
-
return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
750
|
+
var returnType = _Template["default"];
|
|
751
|
+
return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
655
752
|
}
|
|
656
753
|
|
|
657
754
|
/**
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
* @param {String}
|
|
661
|
-
* @param {
|
|
662
|
-
* @param {String}
|
|
755
|
+
* Delete a template
|
|
756
|
+
* Deletes a template's draft and all of its published versions, or one published version (`version`). Returns the template as it was before it was deleted.
|
|
757
|
+
* @param {String} template_id The template's ID.
|
|
758
|
+
* @param {Object} opts Optional parameters
|
|
759
|
+
* @param {String} opts.version Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted.
|
|
760
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
663
761
|
*/
|
|
762
|
+
}, {
|
|
763
|
+
key: "deleteTemplate",
|
|
764
|
+
value: function deleteTemplate(template_id, opts) {
|
|
765
|
+
return this.deleteTemplateWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
766
|
+
return response_and_data.data;
|
|
767
|
+
});
|
|
768
|
+
}
|
|
664
769
|
|
|
665
770
|
/**
|
|
666
771
|
* Delete a webhook
|
|
667
|
-
*
|
|
668
|
-
* @param {String} webhook_id
|
|
669
|
-
* @
|
|
670
|
-
* data is of type: {@link module:model/Webhook}
|
|
772
|
+
* Deletes a webhook so it stops receiving events, and returns it.
|
|
773
|
+
* @param {String} webhook_id The webhook's ID.
|
|
774
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
671
775
|
*/
|
|
672
776
|
}, {
|
|
673
|
-
key: "
|
|
674
|
-
value: function
|
|
777
|
+
key: "deleteWebhookWithHttpInfo",
|
|
778
|
+
value: function deleteWebhookWithHttpInfo(webhook_id) {
|
|
675
779
|
var postBody = null;
|
|
676
780
|
// verify the required parameter 'webhook_id' is set
|
|
677
781
|
if (webhook_id === undefined || webhook_id === null) {
|
|
@@ -687,34 +791,39 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
687
791
|
var contentTypes = [];
|
|
688
792
|
var accepts = ['application/json'];
|
|
689
793
|
var returnType = _Webhook["default"];
|
|
690
|
-
return this.apiClient.callApi('/webhooks/{webhook_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
794
|
+
return this.apiClient.callApi('/webhooks/{webhook_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
691
795
|
}
|
|
692
796
|
|
|
693
797
|
/**
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
* @param {String}
|
|
697
|
-
* @
|
|
698
|
-
* @param {String} response The complete HTTP response.
|
|
798
|
+
* Delete a webhook
|
|
799
|
+
* Deletes a webhook so it stops receiving events, and returns it.
|
|
800
|
+
* @param {String} webhook_id The webhook's ID.
|
|
801
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
699
802
|
*/
|
|
803
|
+
}, {
|
|
804
|
+
key: "deleteWebhook",
|
|
805
|
+
value: function deleteWebhook(webhook_id) {
|
|
806
|
+
return this.deleteWebhookWithHttpInfo(webhook_id).then(function (response_and_data) {
|
|
807
|
+
return response_and_data.data;
|
|
808
|
+
});
|
|
809
|
+
}
|
|
700
810
|
|
|
701
811
|
/**
|
|
702
|
-
* Expire a combined
|
|
703
|
-
*
|
|
704
|
-
* @param {String}
|
|
705
|
-
* @
|
|
706
|
-
* data is of type: {@link module:model/CombinedSubmission}
|
|
812
|
+
* Expire a combined PDF
|
|
813
|
+
* Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
814
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
815
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
707
816
|
*/
|
|
708
817
|
}, {
|
|
709
|
-
key: "
|
|
710
|
-
value: function
|
|
818
|
+
key: "expireCombinedPdfWithHttpInfo",
|
|
819
|
+
value: function expireCombinedPdfWithHttpInfo(combined_pdf_id) {
|
|
711
820
|
var postBody = null;
|
|
712
|
-
// verify the required parameter '
|
|
713
|
-
if (
|
|
714
|
-
throw new Error("Missing the required parameter '
|
|
821
|
+
// verify the required parameter 'combined_pdf_id' is set
|
|
822
|
+
if (combined_pdf_id === undefined || combined_pdf_id === null) {
|
|
823
|
+
throw new Error("Missing the required parameter 'combined_pdf_id' when calling expireCombinedPdf");
|
|
715
824
|
}
|
|
716
825
|
var pathParams = {
|
|
717
|
-
'
|
|
826
|
+
'combined_pdf_id': combined_pdf_id
|
|
718
827
|
};
|
|
719
828
|
var queryParams = {};
|
|
720
829
|
var headerParams = {};
|
|
@@ -722,28 +831,33 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
722
831
|
var authNames = ['api_token_basic'];
|
|
723
832
|
var contentTypes = [];
|
|
724
833
|
var accepts = ['application/json'];
|
|
725
|
-
var returnType =
|
|
726
|
-
return this.apiClient.callApi('/
|
|
834
|
+
var returnType = _CombinedPdf["default"];
|
|
835
|
+
return this.apiClient.callApi('/combined_pdfs/{combined_pdf_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
727
836
|
}
|
|
728
837
|
|
|
729
838
|
/**
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
* @param {String}
|
|
733
|
-
* @
|
|
734
|
-
* @param {String} response The complete HTTP response.
|
|
839
|
+
* Expire a combined PDF
|
|
840
|
+
* Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
841
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
842
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
735
843
|
*/
|
|
844
|
+
}, {
|
|
845
|
+
key: "expireCombinedPdf",
|
|
846
|
+
value: function expireCombinedPdf(combined_pdf_id) {
|
|
847
|
+
return this.expireCombinedPdfWithHttpInfo(combined_pdf_id).then(function (response_and_data) {
|
|
848
|
+
return response_and_data.data;
|
|
849
|
+
});
|
|
850
|
+
}
|
|
736
851
|
|
|
737
852
|
/**
|
|
738
|
-
* Expire a
|
|
739
|
-
*
|
|
740
|
-
* @param {String} submission_id
|
|
741
|
-
* @
|
|
742
|
-
* data is of type: {@link module:model/SubmissionPreview}
|
|
853
|
+
* Expire a submission
|
|
854
|
+
* Deletes a submission's data and PDF now, and returns the expired submission.
|
|
855
|
+
* @param {String} submission_id The submission's ID.
|
|
856
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
743
857
|
*/
|
|
744
858
|
}, {
|
|
745
|
-
key: "
|
|
746
|
-
value: function
|
|
859
|
+
key: "expireSubmissionWithHttpInfo",
|
|
860
|
+
value: function expireSubmissionWithHttpInfo(submission_id) {
|
|
747
861
|
var postBody = null;
|
|
748
862
|
// verify the required parameter 'submission_id' is set
|
|
749
863
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -758,43 +872,48 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
758
872
|
var authNames = ['api_token_basic'];
|
|
759
873
|
var contentTypes = [];
|
|
760
874
|
var accepts = ['application/json'];
|
|
761
|
-
var returnType =
|
|
762
|
-
return this.apiClient.callApi('/submissions/{submission_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
875
|
+
var returnType = _Submission["default"];
|
|
876
|
+
return this.apiClient.callApi('/submissions/{submission_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
763
877
|
}
|
|
764
878
|
|
|
765
879
|
/**
|
|
766
|
-
*
|
|
767
|
-
*
|
|
768
|
-
* @param {String}
|
|
769
|
-
* @
|
|
770
|
-
* @param {String} response The complete HTTP response.
|
|
880
|
+
* Expire a submission
|
|
881
|
+
* Deletes a submission's data and PDF now, and returns the expired submission.
|
|
882
|
+
* @param {String} submission_id The submission's ID.
|
|
883
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
771
884
|
*/
|
|
885
|
+
}, {
|
|
886
|
+
key: "expireSubmission",
|
|
887
|
+
value: function expireSubmission(submission_id) {
|
|
888
|
+
return this.expireSubmissionWithHttpInfo(submission_id).then(function (response_and_data) {
|
|
889
|
+
return response_and_data.data;
|
|
890
|
+
});
|
|
891
|
+
}
|
|
772
892
|
|
|
773
893
|
/**
|
|
774
|
-
* Generate
|
|
775
|
-
*
|
|
776
|
-
* @param {String}
|
|
777
|
-
* @param {module:model/
|
|
894
|
+
* Generate more files
|
|
895
|
+
* Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
896
|
+
* @param {String} submission_id The submission's ID.
|
|
897
|
+
* @param {module:model/GenerateSubmissionFilesRequest} body The formats to make.
|
|
778
898
|
* @param {Object} opts Optional parameters
|
|
779
|
-
* @param {Boolean} [wait
|
|
780
|
-
* @
|
|
781
|
-
* data is of type: {@link module:model/CreateSubmissionResponse}
|
|
899
|
+
* @param {Boolean} [wait] Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
900
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
782
901
|
*/
|
|
783
902
|
}, {
|
|
784
|
-
key: "
|
|
785
|
-
value: function
|
|
903
|
+
key: "generateSubmissionFilesWithHttpInfo",
|
|
904
|
+
value: function generateSubmissionFilesWithHttpInfo(submission_id, body, opts) {
|
|
786
905
|
opts = opts || {};
|
|
787
|
-
var postBody =
|
|
788
|
-
// verify the required parameter '
|
|
789
|
-
if (
|
|
790
|
-
throw new Error("Missing the required parameter '
|
|
906
|
+
var postBody = body;
|
|
907
|
+
// verify the required parameter 'submission_id' is set
|
|
908
|
+
if (submission_id === undefined || submission_id === null) {
|
|
909
|
+
throw new Error("Missing the required parameter 'submission_id' when calling generateSubmissionFiles");
|
|
791
910
|
}
|
|
792
|
-
// verify the required parameter '
|
|
793
|
-
if (
|
|
794
|
-
throw new Error("Missing the required parameter '
|
|
911
|
+
// verify the required parameter 'body' is set
|
|
912
|
+
if (body === undefined || body === null) {
|
|
913
|
+
throw new Error("Missing the required parameter 'body' when calling generateSubmissionFiles");
|
|
795
914
|
}
|
|
796
915
|
var pathParams = {
|
|
797
|
-
'
|
|
916
|
+
'submission_id': submission_id
|
|
798
917
|
};
|
|
799
918
|
var queryParams = {
|
|
800
919
|
'wait': opts['wait']
|
|
@@ -804,32 +923,40 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
804
923
|
var authNames = ['api_token_basic'];
|
|
805
924
|
var contentTypes = ['application/json'];
|
|
806
925
|
var accepts = ['application/json'];
|
|
807
|
-
var returnType =
|
|
808
|
-
return this.apiClient.callApi('/
|
|
926
|
+
var returnType = _Submission["default"];
|
|
927
|
+
return this.apiClient.callApi('/submissions/{submission_id}/generate_files', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
809
928
|
}
|
|
810
929
|
|
|
811
930
|
/**
|
|
812
|
-
*
|
|
813
|
-
*
|
|
814
|
-
* @param {String}
|
|
815
|
-
* @param {module:model/
|
|
816
|
-
* @param {
|
|
931
|
+
* Generate more files
|
|
932
|
+
* Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
933
|
+
* @param {String} submission_id The submission's ID.
|
|
934
|
+
* @param {module:model/GenerateSubmissionFilesRequest} body The formats to make.
|
|
935
|
+
* @param {Object} opts Optional parameters
|
|
936
|
+
* @param {Boolean} opts.wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
937
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
817
938
|
*/
|
|
939
|
+
}, {
|
|
940
|
+
key: "generateSubmissionFiles",
|
|
941
|
+
value: function generateSubmissionFiles(submission_id, body, opts) {
|
|
942
|
+
return this.generateSubmissionFilesWithHttpInfo(submission_id, body, opts).then(function (response_and_data) {
|
|
943
|
+
return response_and_data.data;
|
|
944
|
+
});
|
|
945
|
+
}
|
|
818
946
|
|
|
819
947
|
/**
|
|
820
|
-
* Generate a preview PDF
|
|
821
|
-
* Generates a preview
|
|
822
|
-
* @param {String} submission_id
|
|
823
|
-
* @
|
|
824
|
-
* data is of type: {@link module:model/SuccessErrorResponse}
|
|
948
|
+
* Generate a preview PDF
|
|
949
|
+
* Generates a preview of a submission's PDF in the background, such as for a submission still waiting for its signature requests. It's in `files.preview` once `preview_generated_at` changes.
|
|
950
|
+
* @param {String} submission_id The submission's ID.
|
|
951
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
825
952
|
*/
|
|
826
953
|
}, {
|
|
827
|
-
key: "
|
|
828
|
-
value: function
|
|
954
|
+
key: "generateSubmissionPreviewWithHttpInfo",
|
|
955
|
+
value: function generateSubmissionPreviewWithHttpInfo(submission_id) {
|
|
829
956
|
var postBody = null;
|
|
830
957
|
// verify the required parameter 'submission_id' is set
|
|
831
958
|
if (submission_id === undefined || submission_id === null) {
|
|
832
|
-
throw new Error("Missing the required parameter 'submission_id' when calling
|
|
959
|
+
throw new Error("Missing the required parameter 'submission_id' when calling generateSubmissionPreview");
|
|
833
960
|
}
|
|
834
961
|
var pathParams = {
|
|
835
962
|
'submission_id': submission_id
|
|
@@ -840,35 +967,40 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
840
967
|
var authNames = ['api_token_basic'];
|
|
841
968
|
var contentTypes = [];
|
|
842
969
|
var accepts = ['application/json'];
|
|
843
|
-
var returnType =
|
|
844
|
-
return this.apiClient.callApi('/submissions/{submission_id}/generate_preview', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
970
|
+
var returnType = _Submission["default"];
|
|
971
|
+
return this.apiClient.callApi('/submissions/{submission_id}/generate_preview', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
845
972
|
}
|
|
846
973
|
|
|
847
974
|
/**
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
* @param {String}
|
|
851
|
-
* @
|
|
852
|
-
* @param {String} response The complete HTTP response.
|
|
975
|
+
* Generate a preview PDF
|
|
976
|
+
* Generates a preview of a submission's PDF in the background, such as for a submission still waiting for its signature requests. It's in `files.preview` once `preview_generated_at` changes.
|
|
977
|
+
* @param {String} submission_id The submission's ID.
|
|
978
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
853
979
|
*/
|
|
980
|
+
}, {
|
|
981
|
+
key: "generateSubmissionPreview",
|
|
982
|
+
value: function generateSubmissionPreview(submission_id) {
|
|
983
|
+
return this.generateSubmissionPreviewWithHttpInfo(submission_id).then(function (response_and_data) {
|
|
984
|
+
return response_and_data.data;
|
|
985
|
+
});
|
|
986
|
+
}
|
|
854
987
|
|
|
855
988
|
/**
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
* @param {String}
|
|
859
|
-
* @
|
|
860
|
-
* data is of type: {@link module:model/CombinedSubmission}
|
|
989
|
+
* Get a combined PDF
|
|
990
|
+
* Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
991
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
992
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
861
993
|
*/
|
|
862
994
|
}, {
|
|
863
|
-
key: "
|
|
864
|
-
value: function
|
|
995
|
+
key: "getCombinedPdfWithHttpInfo",
|
|
996
|
+
value: function getCombinedPdfWithHttpInfo(combined_pdf_id) {
|
|
865
997
|
var postBody = null;
|
|
866
|
-
// verify the required parameter '
|
|
867
|
-
if (
|
|
868
|
-
throw new Error("Missing the required parameter '
|
|
998
|
+
// verify the required parameter 'combined_pdf_id' is set
|
|
999
|
+
if (combined_pdf_id === undefined || combined_pdf_id === null) {
|
|
1000
|
+
throw new Error("Missing the required parameter 'combined_pdf_id' when calling getCombinedPdf");
|
|
869
1001
|
}
|
|
870
1002
|
var pathParams = {
|
|
871
|
-
'
|
|
1003
|
+
'combined_pdf_id': combined_pdf_id
|
|
872
1004
|
};
|
|
873
1005
|
var queryParams = {};
|
|
874
1006
|
var headerParams = {};
|
|
@@ -876,35 +1008,40 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
876
1008
|
var authNames = ['api_token_basic'];
|
|
877
1009
|
var contentTypes = [];
|
|
878
1010
|
var accepts = ['application/json'];
|
|
879
|
-
var returnType =
|
|
880
|
-
return this.apiClient.callApi('/
|
|
1011
|
+
var returnType = _CombinedPdf["default"];
|
|
1012
|
+
return this.apiClient.callApi('/combined_pdfs/{combined_pdf_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
881
1013
|
}
|
|
882
1014
|
|
|
883
1015
|
/**
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
* @param {String}
|
|
887
|
-
* @
|
|
888
|
-
* @param {String} response The complete HTTP response.
|
|
1016
|
+
* Get a combined PDF
|
|
1017
|
+
* Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
1018
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
1019
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
889
1020
|
*/
|
|
1021
|
+
}, {
|
|
1022
|
+
key: "getCombinedPdf",
|
|
1023
|
+
value: function getCombinedPdf(combined_pdf_id) {
|
|
1024
|
+
return this.getCombinedPdfWithHttpInfo(combined_pdf_id).then(function (response_and_data) {
|
|
1025
|
+
return response_and_data.data;
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
890
1028
|
|
|
891
1029
|
/**
|
|
892
|
-
*
|
|
893
|
-
*
|
|
894
|
-
* @param {String}
|
|
895
|
-
* @
|
|
896
|
-
* data is of type: {@link module:model/SubmissionDataRequestShow}
|
|
1030
|
+
* Get a custom file
|
|
1031
|
+
* Returns a custom file, with a temporary URL to download it.
|
|
1032
|
+
* @param {String} custom_file_id The custom file's ID.
|
|
1033
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
897
1034
|
*/
|
|
898
1035
|
}, {
|
|
899
|
-
key: "
|
|
900
|
-
value: function
|
|
1036
|
+
key: "getCustomFileWithHttpInfo",
|
|
1037
|
+
value: function getCustomFileWithHttpInfo(custom_file_id) {
|
|
901
1038
|
var postBody = null;
|
|
902
|
-
// verify the required parameter '
|
|
903
|
-
if (
|
|
904
|
-
throw new Error("Missing the required parameter '
|
|
1039
|
+
// verify the required parameter 'custom_file_id' is set
|
|
1040
|
+
if (custom_file_id === undefined || custom_file_id === null) {
|
|
1041
|
+
throw new Error("Missing the required parameter 'custom_file_id' when calling getCustomFile");
|
|
905
1042
|
}
|
|
906
1043
|
var pathParams = {
|
|
907
|
-
'
|
|
1044
|
+
'custom_file_id': custom_file_id
|
|
908
1045
|
};
|
|
909
1046
|
var queryParams = {};
|
|
910
1047
|
var headerParams = {};
|
|
@@ -912,35 +1049,40 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
912
1049
|
var authNames = ['api_token_basic'];
|
|
913
1050
|
var contentTypes = [];
|
|
914
1051
|
var accepts = ['application/json'];
|
|
915
|
-
var returnType =
|
|
916
|
-
return this.apiClient.callApi('/
|
|
1052
|
+
var returnType = _CustomFile["default"];
|
|
1053
|
+
return this.apiClient.callApi('/custom_files/{custom_file_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
917
1054
|
}
|
|
918
1055
|
|
|
919
1056
|
/**
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
* @param {String}
|
|
923
|
-
* @
|
|
924
|
-
* @param {String} response The complete HTTP response.
|
|
1057
|
+
* Get a custom file
|
|
1058
|
+
* Returns a custom file, with a temporary URL to download it.
|
|
1059
|
+
* @param {String} custom_file_id The custom file's ID.
|
|
1060
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
925
1061
|
*/
|
|
1062
|
+
}, {
|
|
1063
|
+
key: "getCustomFile",
|
|
1064
|
+
value: function getCustomFile(custom_file_id) {
|
|
1065
|
+
return this.getCustomFileWithHttpInfo(custom_file_id).then(function (response_and_data) {
|
|
1066
|
+
return response_and_data.data;
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
926
1069
|
|
|
927
1070
|
/**
|
|
928
|
-
*
|
|
929
|
-
*
|
|
930
|
-
* @param {String}
|
|
931
|
-
* @
|
|
932
|
-
* data is of type: {@link module:model/Template}
|
|
1071
|
+
* Get a folder
|
|
1072
|
+
* Returns a folder.
|
|
1073
|
+
* @param {String} folder_id The folder's ID.
|
|
1074
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
933
1075
|
*/
|
|
934
1076
|
}, {
|
|
935
|
-
key: "
|
|
936
|
-
value: function
|
|
1077
|
+
key: "getFolderWithHttpInfo",
|
|
1078
|
+
value: function getFolderWithHttpInfo(folder_id) {
|
|
937
1079
|
var postBody = null;
|
|
938
|
-
// verify the required parameter '
|
|
939
|
-
if (
|
|
940
|
-
throw new Error("Missing the required parameter '
|
|
1080
|
+
// verify the required parameter 'folder_id' is set
|
|
1081
|
+
if (folder_id === undefined || folder_id === null) {
|
|
1082
|
+
throw new Error("Missing the required parameter 'folder_id' when calling getFolder");
|
|
941
1083
|
}
|
|
942
1084
|
var pathParams = {
|
|
943
|
-
'
|
|
1085
|
+
'folder_id': folder_id
|
|
944
1086
|
};
|
|
945
1087
|
var queryParams = {};
|
|
946
1088
|
var headerParams = {};
|
|
@@ -948,27 +1090,32 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
948
1090
|
var authNames = ['api_token_basic'];
|
|
949
1091
|
var contentTypes = [];
|
|
950
1092
|
var accepts = ['application/json'];
|
|
951
|
-
var returnType =
|
|
952
|
-
return this.apiClient.callApi('/
|
|
1093
|
+
var returnType = _Folder["default"];
|
|
1094
|
+
return this.apiClient.callApi('/folders/{folder_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
953
1095
|
}
|
|
954
1096
|
|
|
955
1097
|
/**
|
|
956
|
-
*
|
|
957
|
-
*
|
|
958
|
-
* @param {String}
|
|
959
|
-
* @
|
|
960
|
-
* @param {String} response The complete HTTP response.
|
|
1098
|
+
* Get a folder
|
|
1099
|
+
* Returns a folder.
|
|
1100
|
+
* @param {String} folder_id The folder's ID.
|
|
1101
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
961
1102
|
*/
|
|
1103
|
+
}, {
|
|
1104
|
+
key: "getFolder",
|
|
1105
|
+
value: function getFolder(folder_id) {
|
|
1106
|
+
return this.getFolderWithHttpInfo(folder_id).then(function (response_and_data) {
|
|
1107
|
+
return response_and_data.data;
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
962
1110
|
|
|
963
1111
|
/**
|
|
964
|
-
* Get a presigned
|
|
965
|
-
* Returns a presigned S3
|
|
966
|
-
* @
|
|
967
|
-
* data is of type: {@link module:model/UploadPresignResponse}
|
|
1112
|
+
* Get a presigned URL to upload a file
|
|
1113
|
+
* Returns a presigned S3 form for uploading a file directly to DocSpring, for files too large to send in a request body. POST the `fields` and the file (as `file`) to `url` as multipart/form-data, then pass `fields.key` as the `cache_id` when you create a custom file.
|
|
1114
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UploadPresign} and HTTP response
|
|
968
1115
|
*/
|
|
969
1116
|
}, {
|
|
970
|
-
key: "
|
|
971
|
-
value: function
|
|
1117
|
+
key: "getPresignUrlWithHttpInfo",
|
|
1118
|
+
value: function getPresignUrlWithHttpInfo() {
|
|
972
1119
|
var postBody = null;
|
|
973
1120
|
var pathParams = {};
|
|
974
1121
|
var queryParams = {};
|
|
@@ -977,31 +1124,73 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
977
1124
|
var authNames = ['api_token_basic'];
|
|
978
1125
|
var contentTypes = [];
|
|
979
1126
|
var accepts = ['application/json'];
|
|
980
|
-
var returnType =
|
|
981
|
-
return this.apiClient.callApi('/uploads/presign', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1127
|
+
var returnType = _UploadPresign["default"];
|
|
1128
|
+
return this.apiClient.callApi('/uploads/presign', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
982
1129
|
}
|
|
983
1130
|
|
|
984
1131
|
/**
|
|
985
|
-
*
|
|
986
|
-
*
|
|
987
|
-
* @
|
|
988
|
-
* @param {module:model/Submission} data The data returned by the service call.
|
|
989
|
-
* @param {String} response The complete HTTP response.
|
|
1132
|
+
* Get a presigned URL to upload a file
|
|
1133
|
+
* Returns a presigned S3 form for uploading a file directly to DocSpring, for files too large to send in a request body. POST the `fields` and the file (as `file`) to `url` as multipart/form-data, then pass `fields.key` as the `cache_id` when you create a custom file.
|
|
1134
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UploadPresign}
|
|
990
1135
|
*/
|
|
1136
|
+
}, {
|
|
1137
|
+
key: "getPresignUrl",
|
|
1138
|
+
value: function getPresignUrl() {
|
|
1139
|
+
return this.getPresignUrlWithHttpInfo().then(function (response_and_data) {
|
|
1140
|
+
return response_and_data.data;
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
991
1143
|
|
|
992
1144
|
/**
|
|
993
|
-
*
|
|
994
|
-
*
|
|
995
|
-
* @param {String}
|
|
996
|
-
* @
|
|
997
|
-
* @param {Boolean} [include_data]
|
|
998
|
-
* @param {module:api/Client~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
|
|
999
|
-
* data is of type: {@link module:model/Submission}
|
|
1145
|
+
* Get a signature request
|
|
1146
|
+
* Returns a signature request, with the values the person has entered so far.
|
|
1147
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
1148
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequest} and HTTP response
|
|
1000
1149
|
*/
|
|
1001
1150
|
}, {
|
|
1002
|
-
key: "
|
|
1003
|
-
value: function
|
|
1004
|
-
|
|
1151
|
+
key: "getSignatureRequestWithHttpInfo",
|
|
1152
|
+
value: function getSignatureRequestWithHttpInfo(signature_request_id) {
|
|
1153
|
+
var postBody = null;
|
|
1154
|
+
// verify the required parameter 'signature_request_id' is set
|
|
1155
|
+
if (signature_request_id === undefined || signature_request_id === null) {
|
|
1156
|
+
throw new Error("Missing the required parameter 'signature_request_id' when calling getSignatureRequest");
|
|
1157
|
+
}
|
|
1158
|
+
var pathParams = {
|
|
1159
|
+
'signature_request_id': signature_request_id
|
|
1160
|
+
};
|
|
1161
|
+
var queryParams = {};
|
|
1162
|
+
var headerParams = {};
|
|
1163
|
+
var formParams = {};
|
|
1164
|
+
var authNames = ['api_token_basic'];
|
|
1165
|
+
var contentTypes = [];
|
|
1166
|
+
var accepts = ['application/json'];
|
|
1167
|
+
var returnType = _SignatureRequest["default"];
|
|
1168
|
+
return this.apiClient.callApi('/signature_requests/{signature_request_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Get a signature request
|
|
1173
|
+
* Returns a signature request, with the values the person has entered so far.
|
|
1174
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
1175
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequest}
|
|
1176
|
+
*/
|
|
1177
|
+
}, {
|
|
1178
|
+
key: "getSignatureRequest",
|
|
1179
|
+
value: function getSignatureRequest(signature_request_id) {
|
|
1180
|
+
return this.getSignatureRequestWithHttpInfo(signature_request_id).then(function (response_and_data) {
|
|
1181
|
+
return response_and_data.data;
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Get a submission
|
|
1187
|
+
* Returns a submission, with its data and links to download its PDF.
|
|
1188
|
+
* @param {String} submission_id The submission's ID.
|
|
1189
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
1190
|
+
*/
|
|
1191
|
+
}, {
|
|
1192
|
+
key: "getSubmissionWithHttpInfo",
|
|
1193
|
+
value: function getSubmissionWithHttpInfo(submission_id) {
|
|
1005
1194
|
var postBody = null;
|
|
1006
1195
|
// verify the required parameter 'submission_id' is set
|
|
1007
1196
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -1010,38 +1199,41 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1010
1199
|
var pathParams = {
|
|
1011
1200
|
'submission_id': submission_id
|
|
1012
1201
|
};
|
|
1013
|
-
var queryParams = {
|
|
1014
|
-
'include_data': opts['include_data']
|
|
1015
|
-
};
|
|
1202
|
+
var queryParams = {};
|
|
1016
1203
|
var headerParams = {};
|
|
1017
1204
|
var formParams = {};
|
|
1018
1205
|
var authNames = ['api_token_basic'];
|
|
1019
1206
|
var contentTypes = [];
|
|
1020
1207
|
var accepts = ['application/json'];
|
|
1021
1208
|
var returnType = _Submission["default"];
|
|
1022
|
-
return this.apiClient.callApi('/submissions/{submission_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1209
|
+
return this.apiClient.callApi('/submissions/{submission_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1023
1210
|
}
|
|
1024
1211
|
|
|
1025
1212
|
/**
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
* @param {String}
|
|
1029
|
-
* @
|
|
1030
|
-
* @param {String} response The complete HTTP response.
|
|
1213
|
+
* Get a submission
|
|
1214
|
+
* Returns a submission, with its data and links to download its PDF.
|
|
1215
|
+
* @param {String} submission_id The submission's ID.
|
|
1216
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
1031
1217
|
*/
|
|
1218
|
+
}, {
|
|
1219
|
+
key: "getSubmission",
|
|
1220
|
+
value: function getSubmission(submission_id) {
|
|
1221
|
+
return this.getSubmissionWithHttpInfo(submission_id).then(function (response_and_data) {
|
|
1222
|
+
return response_and_data.data;
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1032
1225
|
|
|
1033
1226
|
/**
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
* @param {String} submission_batch_id
|
|
1227
|
+
* Get a batch
|
|
1228
|
+
* Returns a batch with its submissions. The batch has finished once `processed_at` is set: its `state` is `processed` when every PDF was generated, or `error` when any submission failed.
|
|
1229
|
+
* @param {String} submission_batch_id The batch's ID.
|
|
1037
1230
|
* @param {Object} opts Optional parameters
|
|
1038
|
-
* @param {Boolean} [
|
|
1039
|
-
* @
|
|
1040
|
-
* data is of type: {@link module:model/SubmissionBatchWithSubmissions}
|
|
1231
|
+
* @param {Boolean} [include_data] Include each submission's `data` (null without it).
|
|
1232
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionBatch} and HTTP response
|
|
1041
1233
|
*/
|
|
1042
1234
|
}, {
|
|
1043
|
-
key: "
|
|
1044
|
-
value: function
|
|
1235
|
+
key: "getSubmissionBatchWithHttpInfo",
|
|
1236
|
+
value: function getSubmissionBatchWithHttpInfo(submission_batch_id, opts) {
|
|
1045
1237
|
opts = opts || {};
|
|
1046
1238
|
var postBody = null;
|
|
1047
1239
|
// verify the required parameter 'submission_batch_id' is set
|
|
@@ -1052,35 +1244,45 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1052
1244
|
'submission_batch_id': submission_batch_id
|
|
1053
1245
|
};
|
|
1054
1246
|
var queryParams = {
|
|
1055
|
-
'
|
|
1247
|
+
'include_data': opts['include_data']
|
|
1056
1248
|
};
|
|
1057
1249
|
var headerParams = {};
|
|
1058
1250
|
var formParams = {};
|
|
1059
1251
|
var authNames = ['api_token_basic'];
|
|
1060
1252
|
var contentTypes = [];
|
|
1061
1253
|
var accepts = ['application/json'];
|
|
1062
|
-
var returnType =
|
|
1063
|
-
return this.apiClient.callApi('/submissions/batches/{submission_batch_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1254
|
+
var returnType = _SubmissionBatch["default"];
|
|
1255
|
+
return this.apiClient.callApi('/submissions/batches/{submission_batch_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1064
1256
|
}
|
|
1065
1257
|
|
|
1066
1258
|
/**
|
|
1067
|
-
*
|
|
1068
|
-
*
|
|
1069
|
-
* @param {String}
|
|
1070
|
-
* @param {
|
|
1071
|
-
* @param {
|
|
1259
|
+
* Get a batch
|
|
1260
|
+
* Returns a batch with its submissions. The batch has finished once `processed_at` is set: its `state` is `processed` when every PDF was generated, or `error` when any submission failed.
|
|
1261
|
+
* @param {String} submission_batch_id The batch's ID.
|
|
1262
|
+
* @param {Object} opts Optional parameters
|
|
1263
|
+
* @param {Boolean} opts.include_data Include each submission's `data` (null without it).
|
|
1264
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionBatch}
|
|
1072
1265
|
*/
|
|
1266
|
+
}, {
|
|
1267
|
+
key: "getSubmissionBatch",
|
|
1268
|
+
value: function getSubmissionBatch(submission_batch_id, opts) {
|
|
1269
|
+
return this.getSubmissionBatchWithHttpInfo(submission_batch_id, opts).then(function (response_and_data) {
|
|
1270
|
+
return response_and_data.data;
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1073
1273
|
|
|
1074
1274
|
/**
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
* @param {String} template_id
|
|
1078
|
-
* @param {
|
|
1079
|
-
*
|
|
1275
|
+
* Get a template
|
|
1276
|
+
* Returns a template: its draft, or one of its published versions.
|
|
1277
|
+
* @param {String} template_id The template's ID.
|
|
1278
|
+
* @param {Object} opts Optional parameters
|
|
1279
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1280
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1080
1281
|
*/
|
|
1081
1282
|
}, {
|
|
1082
|
-
key: "
|
|
1083
|
-
value: function
|
|
1283
|
+
key: "getTemplateWithHttpInfo",
|
|
1284
|
+
value: function getTemplateWithHttpInfo(template_id, opts) {
|
|
1285
|
+
opts = opts || {};
|
|
1084
1286
|
var postBody = null;
|
|
1085
1287
|
// verify the required parameter 'template_id' is set
|
|
1086
1288
|
if (template_id === undefined || template_id === null) {
|
|
@@ -1089,113 +1291,244 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1089
1291
|
var pathParams = {
|
|
1090
1292
|
'template_id': template_id
|
|
1091
1293
|
};
|
|
1092
|
-
var queryParams = {
|
|
1294
|
+
var queryParams = {
|
|
1295
|
+
'version': opts['version']
|
|
1296
|
+
};
|
|
1093
1297
|
var headerParams = {};
|
|
1094
1298
|
var formParams = {};
|
|
1095
1299
|
var authNames = ['api_token_basic'];
|
|
1096
1300
|
var contentTypes = [];
|
|
1097
1301
|
var accepts = ['application/json'];
|
|
1098
|
-
var returnType =
|
|
1099
|
-
return this.apiClient.callApi('/templates/{template_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1302
|
+
var returnType = _Template["default"];
|
|
1303
|
+
return this.apiClient.callApi('/templates/{template_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1100
1304
|
}
|
|
1101
1305
|
|
|
1102
1306
|
/**
|
|
1103
|
-
*
|
|
1104
|
-
*
|
|
1105
|
-
* @param {String}
|
|
1106
|
-
* @param {
|
|
1107
|
-
* @param {String}
|
|
1307
|
+
* Get a template
|
|
1308
|
+
* Returns a template: its draft, or one of its published versions.
|
|
1309
|
+
* @param {String} template_id The template's ID.
|
|
1310
|
+
* @param {Object} opts Optional parameters
|
|
1311
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1312
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1108
1313
|
*/
|
|
1314
|
+
}, {
|
|
1315
|
+
key: "getTemplate",
|
|
1316
|
+
value: function getTemplate(template_id, opts) {
|
|
1317
|
+
return this.getTemplateWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1318
|
+
return response_and_data.data;
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1109
1321
|
|
|
1110
1322
|
/**
|
|
1111
|
-
*
|
|
1112
|
-
*
|
|
1113
|
-
* @param {String} template_id
|
|
1114
|
-
* @param {
|
|
1115
|
-
* @param {
|
|
1116
|
-
* data
|
|
1323
|
+
* Compare a version of a template with the one before it
|
|
1324
|
+
* Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
|
|
1325
|
+
* @param {String} template_id The template's ID.
|
|
1326
|
+
* @param {Object} opts Optional parameters
|
|
1327
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1328
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateDiff} and HTTP response
|
|
1117
1329
|
*/
|
|
1118
1330
|
}, {
|
|
1119
|
-
key: "
|
|
1120
|
-
value: function
|
|
1331
|
+
key: "getTemplateDiffWithHttpInfo",
|
|
1332
|
+
value: function getTemplateDiffWithHttpInfo(template_id, opts) {
|
|
1333
|
+
opts = opts || {};
|
|
1121
1334
|
var postBody = null;
|
|
1122
1335
|
// verify the required parameter 'template_id' is set
|
|
1123
1336
|
if (template_id === undefined || template_id === null) {
|
|
1124
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
1125
|
-
}
|
|
1126
|
-
// verify the required parameter 'lang' is set
|
|
1127
|
-
if (lang === undefined || lang === null) {
|
|
1128
|
-
throw new Error("Missing the required parameter 'lang' when calling getTemplateModelCode");
|
|
1337
|
+
throw new Error("Missing the required parameter 'template_id' when calling getTemplateDiff");
|
|
1129
1338
|
}
|
|
1130
1339
|
var pathParams = {
|
|
1131
1340
|
'template_id': template_id
|
|
1132
1341
|
};
|
|
1133
1342
|
var queryParams = {
|
|
1134
|
-
'
|
|
1343
|
+
'version': opts['version']
|
|
1135
1344
|
};
|
|
1136
1345
|
var headerParams = {};
|
|
1137
1346
|
var formParams = {};
|
|
1138
1347
|
var authNames = ['api_token_basic'];
|
|
1139
1348
|
var contentTypes = [];
|
|
1140
1349
|
var accepts = ['application/json'];
|
|
1141
|
-
var returnType =
|
|
1142
|
-
return this.apiClient.callApi('/templates/{template_id}/
|
|
1350
|
+
var returnType = _TemplateDiff["default"];
|
|
1351
|
+
return this.apiClient.callApi('/templates/{template_id}/diff', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1143
1352
|
}
|
|
1144
1353
|
|
|
1145
1354
|
/**
|
|
1146
|
-
*
|
|
1147
|
-
*
|
|
1148
|
-
* @param {String}
|
|
1149
|
-
* @param {
|
|
1150
|
-
* @param {String}
|
|
1355
|
+
* Compare a version of a template with the one before it
|
|
1356
|
+
* Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
|
|
1357
|
+
* @param {String} template_id The template's ID.
|
|
1358
|
+
* @param {Object} opts Optional parameters
|
|
1359
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1360
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateDiff}
|
|
1151
1361
|
*/
|
|
1362
|
+
}, {
|
|
1363
|
+
key: "getTemplateDiff",
|
|
1364
|
+
value: function getTemplateDiff(template_id, opts) {
|
|
1365
|
+
return this.getTemplateDiffWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1366
|
+
return response_and_data.data;
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1152
1369
|
|
|
1153
1370
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
* @param {String} template_id
|
|
1157
|
-
* @param {module:
|
|
1158
|
-
*
|
|
1371
|
+
* Generate typed code for a template's submission data
|
|
1372
|
+
* Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
|
|
1373
|
+
* @param {String} template_id The template's ID.
|
|
1374
|
+
* @param {module:model/ModelCodeLanguage} lang The language to generate the code in.
|
|
1375
|
+
* @param {Object} opts Optional parameters
|
|
1376
|
+
* @param {String} [version] The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
1377
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateModelCode} and HTTP response
|
|
1159
1378
|
*/
|
|
1160
1379
|
}, {
|
|
1161
|
-
key: "
|
|
1162
|
-
value: function
|
|
1380
|
+
key: "getTemplateModelCodeWithHttpInfo",
|
|
1381
|
+
value: function getTemplateModelCodeWithHttpInfo(template_id, lang, opts) {
|
|
1382
|
+
opts = opts || {};
|
|
1163
1383
|
var postBody = null;
|
|
1164
1384
|
// verify the required parameter 'template_id' is set
|
|
1165
1385
|
if (template_id === undefined || template_id === null) {
|
|
1166
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
1386
|
+
throw new Error("Missing the required parameter 'template_id' when calling getTemplateModelCode");
|
|
1387
|
+
}
|
|
1388
|
+
// verify the required parameter 'lang' is set
|
|
1389
|
+
if (lang === undefined || lang === null) {
|
|
1390
|
+
throw new Error("Missing the required parameter 'lang' when calling getTemplateModelCode");
|
|
1167
1391
|
}
|
|
1168
1392
|
var pathParams = {
|
|
1169
1393
|
'template_id': template_id
|
|
1170
1394
|
};
|
|
1171
|
-
var queryParams = {
|
|
1395
|
+
var queryParams = {
|
|
1396
|
+
'version': opts['version'],
|
|
1397
|
+
'lang': lang
|
|
1398
|
+
};
|
|
1172
1399
|
var headerParams = {};
|
|
1173
1400
|
var formParams = {};
|
|
1174
1401
|
var authNames = ['api_token_basic'];
|
|
1175
1402
|
var contentTypes = [];
|
|
1176
1403
|
var accepts = ['application/json'];
|
|
1177
|
-
var returnType =
|
|
1178
|
-
return this.apiClient.callApi('/templates/{template_id}/
|
|
1404
|
+
var returnType = _TemplateModelCode["default"];
|
|
1405
|
+
return this.apiClient.callApi('/templates/{template_id}/model_code', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1179
1406
|
}
|
|
1180
1407
|
|
|
1181
1408
|
/**
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1184
|
-
* @param {String}
|
|
1185
|
-
* @param {module:model/
|
|
1186
|
-
* @param {
|
|
1409
|
+
* Generate typed code for a template's submission data
|
|
1410
|
+
* Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
|
|
1411
|
+
* @param {String} template_id The template's ID.
|
|
1412
|
+
* @param {module:model/ModelCodeLanguage} lang The language to generate the code in.
|
|
1413
|
+
* @param {Object} opts Optional parameters
|
|
1414
|
+
* @param {String} opts.version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
1415
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateModelCode}
|
|
1187
1416
|
*/
|
|
1188
|
-
|
|
1417
|
+
}, {
|
|
1418
|
+
key: "getTemplateModelCode",
|
|
1419
|
+
value: function getTemplateModelCode(template_id, lang, opts) {
|
|
1420
|
+
return this.getTemplateModelCodeWithHttpInfo(template_id, lang, opts).then(function (response_and_data) {
|
|
1421
|
+
return response_and_data.data;
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* Get images of a template's pages
|
|
1427
|
+
* Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
|
|
1428
|
+
* @param {String} template_id The template's ID.
|
|
1429
|
+
* @param {Object} opts Optional parameters
|
|
1430
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1431
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplatePageImages} and HTTP response
|
|
1432
|
+
*/
|
|
1433
|
+
}, {
|
|
1434
|
+
key: "getTemplatePageImagesWithHttpInfo",
|
|
1435
|
+
value: function getTemplatePageImagesWithHttpInfo(template_id, opts) {
|
|
1436
|
+
opts = opts || {};
|
|
1437
|
+
var postBody = null;
|
|
1438
|
+
// verify the required parameter 'template_id' is set
|
|
1439
|
+
if (template_id === undefined || template_id === null) {
|
|
1440
|
+
throw new Error("Missing the required parameter 'template_id' when calling getTemplatePageImages");
|
|
1441
|
+
}
|
|
1442
|
+
var pathParams = {
|
|
1443
|
+
'template_id': template_id
|
|
1444
|
+
};
|
|
1445
|
+
var queryParams = {
|
|
1446
|
+
'version': opts['version']
|
|
1447
|
+
};
|
|
1448
|
+
var headerParams = {};
|
|
1449
|
+
var formParams = {};
|
|
1450
|
+
var authNames = ['api_token_basic'];
|
|
1451
|
+
var contentTypes = [];
|
|
1452
|
+
var accepts = ['application/json'];
|
|
1453
|
+
var returnType = _TemplatePageImages["default"];
|
|
1454
|
+
return this.apiClient.callApi('/templates/{template_id}/page_images', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* Get images of a template's pages
|
|
1459
|
+
* Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
|
|
1460
|
+
* @param {String} template_id The template's ID.
|
|
1461
|
+
* @param {Object} opts Optional parameters
|
|
1462
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1463
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplatePageImages}
|
|
1464
|
+
*/
|
|
1465
|
+
}, {
|
|
1466
|
+
key: "getTemplatePageImages",
|
|
1467
|
+
value: function getTemplatePageImages(template_id, opts) {
|
|
1468
|
+
return this.getTemplatePageImagesWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1469
|
+
return response_and_data.data;
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* Get the JSON Schema of a template's submission data
|
|
1475
|
+
* Returns the JSON Schema that a submission's `data` must match. Use it to check data before you create submissions, or to build a form for the template's fields.
|
|
1476
|
+
* @param {String} template_id The template's ID.
|
|
1477
|
+
* @param {Object} opts Optional parameters
|
|
1478
|
+
* @param {String} [version] The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
1479
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object.<String, {String: Object}>} and HTTP response
|
|
1480
|
+
*/
|
|
1481
|
+
}, {
|
|
1482
|
+
key: "getTemplateSchemaWithHttpInfo",
|
|
1483
|
+
value: function getTemplateSchemaWithHttpInfo(template_id, opts) {
|
|
1484
|
+
opts = opts || {};
|
|
1485
|
+
var postBody = null;
|
|
1486
|
+
// verify the required parameter 'template_id' is set
|
|
1487
|
+
if (template_id === undefined || template_id === null) {
|
|
1488
|
+
throw new Error("Missing the required parameter 'template_id' when calling getTemplateSchema");
|
|
1489
|
+
}
|
|
1490
|
+
var pathParams = {
|
|
1491
|
+
'template_id': template_id
|
|
1492
|
+
};
|
|
1493
|
+
var queryParams = {
|
|
1494
|
+
'version': opts['version']
|
|
1495
|
+
};
|
|
1496
|
+
var headerParams = {};
|
|
1497
|
+
var formParams = {};
|
|
1498
|
+
var authNames = ['api_token_basic'];
|
|
1499
|
+
var contentTypes = [];
|
|
1500
|
+
var accepts = ['application/json'];
|
|
1501
|
+
var returnType = {
|
|
1502
|
+
'String': Object
|
|
1503
|
+
};
|
|
1504
|
+
return this.apiClient.callApi('/templates/{template_id}/schema', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
* Get the JSON Schema of a template's submission data
|
|
1509
|
+
* Returns the JSON Schema that a submission's `data` must match. Use it to check data before you create submissions, or to build a form for the template's fields.
|
|
1510
|
+
* @param {String} template_id The template's ID.
|
|
1511
|
+
* @param {Object} opts Optional parameters
|
|
1512
|
+
* @param {String} opts.version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
1513
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object.<String, {String: Object}>}
|
|
1514
|
+
*/
|
|
1515
|
+
}, {
|
|
1516
|
+
key: "getTemplateSchema",
|
|
1517
|
+
value: function getTemplateSchema(template_id, opts) {
|
|
1518
|
+
return this.getTemplateSchemaWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1519
|
+
return response_and_data.data;
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1189
1523
|
/**
|
|
1190
1524
|
* Get a webhook
|
|
1191
|
-
*
|
|
1192
|
-
* @param {String} webhook_id
|
|
1193
|
-
* @
|
|
1194
|
-
* data is of type: {@link module:model/Webhook}
|
|
1525
|
+
* Returns a webhook.
|
|
1526
|
+
* @param {String} webhook_id The webhook's ID.
|
|
1527
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
1195
1528
|
*/
|
|
1196
1529
|
}, {
|
|
1197
|
-
key: "
|
|
1198
|
-
value: function
|
|
1530
|
+
key: "getWebhookWithHttpInfo",
|
|
1531
|
+
value: function getWebhookWithHttpInfo(webhook_id) {
|
|
1199
1532
|
var postBody = null;
|
|
1200
1533
|
// verify the required parameter 'webhook_id' is set
|
|
1201
1534
|
if (webhook_id === undefined || webhook_id === null) {
|
|
@@ -1211,148 +1544,277 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1211
1544
|
var contentTypes = [];
|
|
1212
1545
|
var accepts = ['application/json'];
|
|
1213
1546
|
var returnType = _Webhook["default"];
|
|
1214
|
-
return this.apiClient.callApi('/webhooks/{webhook_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1547
|
+
return this.apiClient.callApi('/webhooks/{webhook_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1215
1548
|
}
|
|
1216
1549
|
|
|
1217
1550
|
/**
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1220
|
-
* @param {String}
|
|
1221
|
-
* @
|
|
1222
|
-
* @param {String} response The complete HTTP response.
|
|
1551
|
+
* Get a webhook
|
|
1552
|
+
* Returns a webhook.
|
|
1553
|
+
* @param {String} webhook_id The webhook's ID.
|
|
1554
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
1223
1555
|
*/
|
|
1556
|
+
}, {
|
|
1557
|
+
key: "getWebhook",
|
|
1558
|
+
value: function getWebhook(webhook_id) {
|
|
1559
|
+
return this.getWebhookWithHttpInfo(webhook_id).then(function (response_and_data) {
|
|
1560
|
+
return response_and_data.data;
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1224
1563
|
|
|
1225
1564
|
/**
|
|
1226
|
-
*
|
|
1227
|
-
* Returns
|
|
1565
|
+
* List combined PDFs
|
|
1566
|
+
* Returns the combined PDFs in your account, newest first, one page at a time.
|
|
1228
1567
|
* @param {Object} opts Optional parameters
|
|
1229
|
-
* @param {Number} [
|
|
1230
|
-
* @param {
|
|
1231
|
-
* @
|
|
1232
|
-
* data is of type: {@link Array.<module:model/CombinedSubmission>}
|
|
1568
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1569
|
+
* @param {String} [cursor] The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1570
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdfList} and HTTP response
|
|
1233
1571
|
*/
|
|
1234
1572
|
}, {
|
|
1235
|
-
key: "
|
|
1236
|
-
value: function
|
|
1573
|
+
key: "listCombinedPdfsWithHttpInfo",
|
|
1574
|
+
value: function listCombinedPdfsWithHttpInfo(opts) {
|
|
1237
1575
|
opts = opts || {};
|
|
1238
1576
|
var postBody = null;
|
|
1239
1577
|
var pathParams = {};
|
|
1240
1578
|
var queryParams = {
|
|
1241
|
-
'
|
|
1242
|
-
'
|
|
1579
|
+
'limit': opts['limit'],
|
|
1580
|
+
'cursor': opts['cursor']
|
|
1243
1581
|
};
|
|
1244
1582
|
var headerParams = {};
|
|
1245
1583
|
var formParams = {};
|
|
1246
1584
|
var authNames = ['api_token_basic'];
|
|
1247
1585
|
var contentTypes = [];
|
|
1248
1586
|
var accepts = ['application/json'];
|
|
1249
|
-
var returnType = [
|
|
1250
|
-
return this.apiClient.callApi('/
|
|
1587
|
+
var returnType = _CombinedPdfList["default"];
|
|
1588
|
+
return this.apiClient.callApi('/combined_pdfs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1251
1589
|
}
|
|
1252
1590
|
|
|
1253
1591
|
/**
|
|
1254
|
-
*
|
|
1255
|
-
*
|
|
1256
|
-
* @param {
|
|
1257
|
-
* @param {
|
|
1258
|
-
* @param {String}
|
|
1592
|
+
* List combined PDFs
|
|
1593
|
+
* Returns the combined PDFs in your account, newest first, one page at a time.
|
|
1594
|
+
* @param {Object} opts Optional parameters
|
|
1595
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1596
|
+
* @param {String} opts.cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1597
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdfList}
|
|
1259
1598
|
*/
|
|
1599
|
+
}, {
|
|
1600
|
+
key: "listCombinedPdfs",
|
|
1601
|
+
value: function listCombinedPdfs(opts) {
|
|
1602
|
+
return this.listCombinedPdfsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1603
|
+
return response_and_data.data;
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1260
1606
|
|
|
1261
1607
|
/**
|
|
1262
|
-
*
|
|
1263
|
-
* Returns
|
|
1608
|
+
* List custom files
|
|
1609
|
+
* Returns the custom files in your account, newest first, one page at a time.
|
|
1264
1610
|
* @param {Object} opts Optional parameters
|
|
1265
|
-
* @param {
|
|
1266
|
-
* @param {
|
|
1267
|
-
* data
|
|
1611
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1612
|
+
* @param {String} [cursor] The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1613
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFileList} and HTTP response
|
|
1268
1614
|
*/
|
|
1269
1615
|
}, {
|
|
1270
|
-
key: "
|
|
1271
|
-
value: function
|
|
1616
|
+
key: "listCustomFilesWithHttpInfo",
|
|
1617
|
+
value: function listCustomFilesWithHttpInfo(opts) {
|
|
1272
1618
|
opts = opts || {};
|
|
1273
1619
|
var postBody = null;
|
|
1274
1620
|
var pathParams = {};
|
|
1275
1621
|
var queryParams = {
|
|
1276
|
-
'
|
|
1622
|
+
'limit': opts['limit'],
|
|
1623
|
+
'cursor': opts['cursor']
|
|
1277
1624
|
};
|
|
1278
1625
|
var headerParams = {};
|
|
1279
1626
|
var formParams = {};
|
|
1280
1627
|
var authNames = ['api_token_basic'];
|
|
1281
1628
|
var contentTypes = [];
|
|
1282
1629
|
var accepts = ['application/json'];
|
|
1283
|
-
var returnType = [
|
|
1284
|
-
return this.apiClient.callApi('/
|
|
1630
|
+
var returnType = _CustomFileList["default"];
|
|
1631
|
+
return this.apiClient.callApi('/custom_files', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1285
1632
|
}
|
|
1286
1633
|
|
|
1287
1634
|
/**
|
|
1288
|
-
*
|
|
1289
|
-
*
|
|
1290
|
-
* @param {
|
|
1291
|
-
* @param {
|
|
1292
|
-
* @param {String}
|
|
1635
|
+
* List custom files
|
|
1636
|
+
* Returns the custom files in your account, newest first, one page at a time.
|
|
1637
|
+
* @param {Object} opts Optional parameters
|
|
1638
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1639
|
+
* @param {String} opts.cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1640
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFileList}
|
|
1293
1641
|
*/
|
|
1642
|
+
}, {
|
|
1643
|
+
key: "listCustomFiles",
|
|
1644
|
+
value: function listCustomFiles(opts) {
|
|
1645
|
+
return this.listCustomFilesWithHttpInfo(opts).then(function (response_and_data) {
|
|
1646
|
+
return response_and_data.data;
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1294
1649
|
|
|
1295
1650
|
/**
|
|
1296
|
-
* List
|
|
1297
|
-
* Returns
|
|
1651
|
+
* List folders
|
|
1652
|
+
* Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
1298
1653
|
* @param {Object} opts Optional parameters
|
|
1299
|
-
* @param {String} [
|
|
1300
|
-
* @param {Number} [limit]
|
|
1301
|
-
* @param {String} [
|
|
1302
|
-
* @
|
|
1303
|
-
* @param {String} [type]
|
|
1304
|
-
* @param {Boolean} [include_data]
|
|
1305
|
-
* @param {module:api/Client~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
|
|
1306
|
-
* data is of type: {@link module:model/ListSubmissionsResponse}
|
|
1654
|
+
* @param {String} [parent_folder_id] Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
1655
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1656
|
+
* @param {String} [cursor] The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1657
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FolderList} and HTTP response
|
|
1307
1658
|
*/
|
|
1308
1659
|
}, {
|
|
1309
|
-
key: "
|
|
1310
|
-
value: function
|
|
1660
|
+
key: "listFoldersWithHttpInfo",
|
|
1661
|
+
value: function listFoldersWithHttpInfo(opts) {
|
|
1311
1662
|
opts = opts || {};
|
|
1312
1663
|
var postBody = null;
|
|
1313
1664
|
var pathParams = {};
|
|
1314
1665
|
var queryParams = {
|
|
1315
|
-
'
|
|
1666
|
+
'parent_folder_id': opts['parent_folder_id'],
|
|
1316
1667
|
'limit': opts['limit'],
|
|
1668
|
+
'cursor': opts['cursor']
|
|
1669
|
+
};
|
|
1670
|
+
var headerParams = {};
|
|
1671
|
+
var formParams = {};
|
|
1672
|
+
var authNames = ['api_token_basic'];
|
|
1673
|
+
var contentTypes = [];
|
|
1674
|
+
var accepts = ['application/json'];
|
|
1675
|
+
var returnType = _FolderList["default"];
|
|
1676
|
+
return this.apiClient.callApi('/folders', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* List folders
|
|
1681
|
+
* Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
1682
|
+
* @param {Object} opts Optional parameters
|
|
1683
|
+
* @param {String} opts.parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
1684
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1685
|
+
* @param {String} opts.cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1686
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FolderList}
|
|
1687
|
+
*/
|
|
1688
|
+
}, {
|
|
1689
|
+
key: "listFolders",
|
|
1690
|
+
value: function listFolders(opts) {
|
|
1691
|
+
return this.listFoldersWithHttpInfo(opts).then(function (response_and_data) {
|
|
1692
|
+
return response_and_data.data;
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* List submissions
|
|
1698
|
+
* Returns the submissions in your account, newest first, one page at a time. Lists leave out each submission's `data` unless you pass `include_data=true`.
|
|
1699
|
+
* @param {Object} opts Optional parameters
|
|
1700
|
+
* @param {String} [template_id] Only list this template's submissions.
|
|
1701
|
+
* @param {Boolean} [test] Only list test submissions (true) or live submissions (false).
|
|
1702
|
+
* @param {Date} [created_after] Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
1703
|
+
* @param {Date} [created_before] Only list submissions created before this time.
|
|
1704
|
+
* @param {Boolean} [include_data] Include each submission's `data` (null without it).
|
|
1705
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1706
|
+
* @param {String} [cursor] The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1707
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionList} and HTTP response
|
|
1708
|
+
*/
|
|
1709
|
+
}, {
|
|
1710
|
+
key: "listSubmissionsWithHttpInfo",
|
|
1711
|
+
value: function listSubmissionsWithHttpInfo(opts) {
|
|
1712
|
+
opts = opts || {};
|
|
1713
|
+
var postBody = null;
|
|
1714
|
+
var pathParams = {};
|
|
1715
|
+
var queryParams = {
|
|
1716
|
+
'template_id': opts['template_id'],
|
|
1717
|
+
'test': opts['test'],
|
|
1317
1718
|
'created_after': opts['created_after'],
|
|
1318
1719
|
'created_before': opts['created_before'],
|
|
1319
|
-
'
|
|
1320
|
-
'
|
|
1720
|
+
'include_data': opts['include_data'],
|
|
1721
|
+
'limit': opts['limit'],
|
|
1722
|
+
'cursor': opts['cursor']
|
|
1321
1723
|
};
|
|
1322
1724
|
var headerParams = {};
|
|
1323
1725
|
var formParams = {};
|
|
1324
1726
|
var authNames = ['api_token_basic'];
|
|
1325
1727
|
var contentTypes = [];
|
|
1326
1728
|
var accepts = ['application/json'];
|
|
1327
|
-
var returnType =
|
|
1328
|
-
return this.apiClient.callApi('/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1729
|
+
var returnType = _SubmissionList["default"];
|
|
1730
|
+
return this.apiClient.callApi('/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1329
1731
|
}
|
|
1330
1732
|
|
|
1331
1733
|
/**
|
|
1332
|
-
*
|
|
1333
|
-
*
|
|
1334
|
-
* @param {
|
|
1335
|
-
* @param {
|
|
1336
|
-
* @param {
|
|
1734
|
+
* List submissions
|
|
1735
|
+
* Returns the submissions in your account, newest first, one page at a time. Lists leave out each submission's `data` unless you pass `include_data=true`.
|
|
1736
|
+
* @param {Object} opts Optional parameters
|
|
1737
|
+
* @param {String} opts.template_id Only list this template's submissions.
|
|
1738
|
+
* @param {Boolean} opts.test Only list test submissions (true) or live submissions (false).
|
|
1739
|
+
* @param {Date} opts.created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
1740
|
+
* @param {Date} opts.created_before Only list submissions created before this time.
|
|
1741
|
+
* @param {Boolean} opts.include_data Include each submission's `data` (null without it).
|
|
1742
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1743
|
+
* @param {String} opts.cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1744
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionList}
|
|
1337
1745
|
*/
|
|
1746
|
+
}, {
|
|
1747
|
+
key: "listSubmissions",
|
|
1748
|
+
value: function listSubmissions(opts) {
|
|
1749
|
+
return this.listSubmissionsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1750
|
+
return response_and_data.data;
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1338
1753
|
|
|
1339
1754
|
/**
|
|
1340
|
-
* List
|
|
1341
|
-
* Returns a
|
|
1342
|
-
* @param {String} template_id
|
|
1755
|
+
* List a template's fields
|
|
1756
|
+
* Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
|
|
1757
|
+
* @param {String} template_id The template's ID.
|
|
1343
1758
|
* @param {Object} opts Optional parameters
|
|
1344
|
-
* @param {String} [
|
|
1345
|
-
* @
|
|
1346
|
-
* @param {String} [created_after]
|
|
1347
|
-
* @param {String} [created_before]
|
|
1348
|
-
* @param {String} [type]
|
|
1349
|
-
* @param {Boolean} [include_data]
|
|
1350
|
-
* @param {module:api/Client~listTemplateSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
|
|
1351
|
-
* data is of type: {@link module:model/ListSubmissionsResponse}
|
|
1759
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1760
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
1352
1761
|
*/
|
|
1353
1762
|
}, {
|
|
1354
|
-
key: "
|
|
1355
|
-
value: function
|
|
1763
|
+
key: "listTemplateFieldsWithHttpInfo",
|
|
1764
|
+
value: function listTemplateFieldsWithHttpInfo(template_id, opts) {
|
|
1765
|
+
opts = opts || {};
|
|
1766
|
+
var postBody = null;
|
|
1767
|
+
// verify the required parameter 'template_id' is set
|
|
1768
|
+
if (template_id === undefined || template_id === null) {
|
|
1769
|
+
throw new Error("Missing the required parameter 'template_id' when calling listTemplateFields");
|
|
1770
|
+
}
|
|
1771
|
+
var pathParams = {
|
|
1772
|
+
'template_id': template_id
|
|
1773
|
+
};
|
|
1774
|
+
var queryParams = {
|
|
1775
|
+
'version': opts['version']
|
|
1776
|
+
};
|
|
1777
|
+
var headerParams = {};
|
|
1778
|
+
var formParams = {};
|
|
1779
|
+
var authNames = ['api_token_basic'];
|
|
1780
|
+
var contentTypes = [];
|
|
1781
|
+
var accepts = ['application/json'];
|
|
1782
|
+
var returnType = _TemplateFields["default"];
|
|
1783
|
+
return this.apiClient.callApi('/templates/{template_id}/fields', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
/**
|
|
1787
|
+
* List a template's fields
|
|
1788
|
+
* Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
|
|
1789
|
+
* @param {String} template_id The template's ID.
|
|
1790
|
+
* @param {Object} opts Optional parameters
|
|
1791
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1792
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
1793
|
+
*/
|
|
1794
|
+
}, {
|
|
1795
|
+
key: "listTemplateFields",
|
|
1796
|
+
value: function listTemplateFields(template_id, opts) {
|
|
1797
|
+
return this.listTemplateFieldsWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1798
|
+
return response_and_data.data;
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* List a template's submissions
|
|
1804
|
+
* Returns a template's submissions (from every version of the template), newest first.
|
|
1805
|
+
* @param {String} template_id The template's ID.
|
|
1806
|
+
* @param {Object} opts Optional parameters
|
|
1807
|
+
* @param {Boolean} [test] Only list test submissions (true) or live submissions (false).
|
|
1808
|
+
* @param {Date} [created_after] Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
1809
|
+
* @param {Date} [created_before] Only list submissions created before this time.
|
|
1810
|
+
* @param {Boolean} [include_data] Include each submission's `data` (null without it).
|
|
1811
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1812
|
+
* @param {String} [cursor] The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1813
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionList} and HTTP response
|
|
1814
|
+
*/
|
|
1815
|
+
}, {
|
|
1816
|
+
key: "listTemplateSubmissionsWithHttpInfo",
|
|
1817
|
+
value: function listTemplateSubmissionsWithHttpInfo(template_id, opts) {
|
|
1356
1818
|
opts = opts || {};
|
|
1357
1819
|
var postBody = null;
|
|
1358
1820
|
// verify the required parameter 'template_id' is set
|
|
@@ -1363,135 +1825,168 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1363
1825
|
'template_id': template_id
|
|
1364
1826
|
};
|
|
1365
1827
|
var queryParams = {
|
|
1366
|
-
'
|
|
1367
|
-
'limit': opts['limit'],
|
|
1828
|
+
'test': opts['test'],
|
|
1368
1829
|
'created_after': opts['created_after'],
|
|
1369
1830
|
'created_before': opts['created_before'],
|
|
1370
|
-
'
|
|
1371
|
-
'
|
|
1831
|
+
'include_data': opts['include_data'],
|
|
1832
|
+
'limit': opts['limit'],
|
|
1833
|
+
'cursor': opts['cursor']
|
|
1372
1834
|
};
|
|
1373
1835
|
var headerParams = {};
|
|
1374
1836
|
var formParams = {};
|
|
1375
1837
|
var authNames = ['api_token_basic'];
|
|
1376
1838
|
var contentTypes = [];
|
|
1377
1839
|
var accepts = ['application/json'];
|
|
1378
|
-
var returnType =
|
|
1379
|
-
return this.apiClient.callApi('/templates/{template_id}/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1840
|
+
var returnType = _SubmissionList["default"];
|
|
1841
|
+
return this.apiClient.callApi('/templates/{template_id}/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1380
1842
|
}
|
|
1381
1843
|
|
|
1382
1844
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
*
|
|
1385
|
-
* @param {String}
|
|
1386
|
-
* @param {
|
|
1387
|
-
* @param {
|
|
1845
|
+
* List a template's submissions
|
|
1846
|
+
* Returns a template's submissions (from every version of the template), newest first.
|
|
1847
|
+
* @param {String} template_id The template's ID.
|
|
1848
|
+
* @param {Object} opts Optional parameters
|
|
1849
|
+
* @param {Boolean} opts.test Only list test submissions (true) or live submissions (false).
|
|
1850
|
+
* @param {Date} opts.created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
1851
|
+
* @param {Date} opts.created_before Only list submissions created before this time.
|
|
1852
|
+
* @param {Boolean} opts.include_data Include each submission's `data` (null without it).
|
|
1853
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1854
|
+
* @param {String} opts.cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1855
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionList}
|
|
1388
1856
|
*/
|
|
1857
|
+
}, {
|
|
1858
|
+
key: "listTemplateSubmissions",
|
|
1859
|
+
value: function listTemplateSubmissions(template_id, opts) {
|
|
1860
|
+
return this.listTemplateSubmissionsWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1861
|
+
return response_and_data.data;
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1389
1864
|
|
|
1390
1865
|
/**
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1866
|
+
* List templates
|
|
1867
|
+
* Returns the templates in your account (their drafts), newest first, one page at a time. Get a template by its ID for its HTML, defaults and published versions.
|
|
1393
1868
|
* @param {Object} opts Optional parameters
|
|
1394
|
-
* @param {String} [query]
|
|
1395
|
-
* @param {String} [parent_folder_id]
|
|
1396
|
-
* @param {Number} [
|
|
1397
|
-
* @param {
|
|
1398
|
-
* @
|
|
1399
|
-
* data is of type: {@link Array.<module:model/TemplatePreview>}
|
|
1869
|
+
* @param {String} [query] Only list templates whose name contains this text (ignoring case).
|
|
1870
|
+
* @param {String} [parent_folder_id] Only list the templates in this folder (not in its subfolders).
|
|
1871
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1872
|
+
* @param {String} [cursor] The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1873
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateSummaryList} and HTTP response
|
|
1400
1874
|
*/
|
|
1401
1875
|
}, {
|
|
1402
|
-
key: "
|
|
1403
|
-
value: function
|
|
1876
|
+
key: "listTemplatesWithHttpInfo",
|
|
1877
|
+
value: function listTemplatesWithHttpInfo(opts) {
|
|
1404
1878
|
opts = opts || {};
|
|
1405
1879
|
var postBody = null;
|
|
1406
1880
|
var pathParams = {};
|
|
1407
1881
|
var queryParams = {
|
|
1408
1882
|
'query': opts['query'],
|
|
1409
1883
|
'parent_folder_id': opts['parent_folder_id'],
|
|
1410
|
-
'
|
|
1411
|
-
'
|
|
1884
|
+
'limit': opts['limit'],
|
|
1885
|
+
'cursor': opts['cursor']
|
|
1412
1886
|
};
|
|
1413
1887
|
var headerParams = {};
|
|
1414
1888
|
var formParams = {};
|
|
1415
1889
|
var authNames = ['api_token_basic'];
|
|
1416
1890
|
var contentTypes = [];
|
|
1417
1891
|
var accepts = ['application/json'];
|
|
1418
|
-
var returnType = [
|
|
1419
|
-
return this.apiClient.callApi('/templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1892
|
+
var returnType = _TemplateSummaryList["default"];
|
|
1893
|
+
return this.apiClient.callApi('/templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1420
1894
|
}
|
|
1421
1895
|
|
|
1422
1896
|
/**
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1425
|
-
* @param {
|
|
1426
|
-
* @param {
|
|
1427
|
-
* @param {String}
|
|
1897
|
+
* List templates
|
|
1898
|
+
* Returns the templates in your account (their drafts), newest first, one page at a time. Get a template by its ID for its HTML, defaults and published versions.
|
|
1899
|
+
* @param {Object} opts Optional parameters
|
|
1900
|
+
* @param {String} opts.query Only list templates whose name contains this text (ignoring case).
|
|
1901
|
+
* @param {String} opts.parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
1902
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1903
|
+
* @param {String} opts.cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1904
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateSummaryList}
|
|
1428
1905
|
*/
|
|
1906
|
+
}, {
|
|
1907
|
+
key: "listTemplates",
|
|
1908
|
+
value: function listTemplates(opts) {
|
|
1909
|
+
return this.listTemplatesWithHttpInfo(opts).then(function (response_and_data) {
|
|
1910
|
+
return response_and_data.data;
|
|
1911
|
+
});
|
|
1912
|
+
}
|
|
1429
1913
|
|
|
1430
1914
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
* Returns
|
|
1915
|
+
* List webhooks
|
|
1916
|
+
* Returns the webhooks in your account, newest first, one page at a time. Filter them by event type, mode, or the API token, template or folder they're scoped to.
|
|
1433
1917
|
* @param {Object} opts Optional parameters
|
|
1434
|
-
* @param {
|
|
1435
|
-
* @param {
|
|
1436
|
-
* @param {String} [
|
|
1437
|
-
* @param {String} [
|
|
1438
|
-
* @param {String} [
|
|
1439
|
-
* @param {
|
|
1440
|
-
* @param {String} [
|
|
1441
|
-
* @
|
|
1442
|
-
* data is of type: {@link Array.<module:model/Webhook>}
|
|
1918
|
+
* @param {module:model/WebhookEventType} [event_type] Only list webhooks that subscribe to this event.
|
|
1919
|
+
* @param {module:model/WebhookMode} [mode] Only list webhooks set to this mode.
|
|
1920
|
+
* @param {String} [template_id] Only list webhooks scoped to this template.
|
|
1921
|
+
* @param {String} [folder_id] Only list webhooks scoped to this folder.
|
|
1922
|
+
* @param {String} [api_token_id] Only list webhooks scoped to this API token.
|
|
1923
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1924
|
+
* @param {String} [cursor] The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1925
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WebhookList} and HTTP response
|
|
1443
1926
|
*/
|
|
1444
1927
|
}, {
|
|
1445
|
-
key: "
|
|
1446
|
-
value: function
|
|
1928
|
+
key: "listWebhooksWithHttpInfo",
|
|
1929
|
+
value: function listWebhooksWithHttpInfo(opts) {
|
|
1447
1930
|
opts = opts || {};
|
|
1448
1931
|
var postBody = null;
|
|
1449
1932
|
var pathParams = {};
|
|
1450
1933
|
var queryParams = {
|
|
1451
|
-
'page': opts['page'],
|
|
1452
|
-
'per_page': opts['per_page'],
|
|
1453
1934
|
'event_type': opts['event_type'],
|
|
1454
1935
|
'mode': opts['mode'],
|
|
1455
1936
|
'template_id': opts['template_id'],
|
|
1456
1937
|
'folder_id': opts['folder_id'],
|
|
1457
|
-
'api_token_id': opts['api_token_id']
|
|
1938
|
+
'api_token_id': opts['api_token_id'],
|
|
1939
|
+
'limit': opts['limit'],
|
|
1940
|
+
'cursor': opts['cursor']
|
|
1458
1941
|
};
|
|
1459
1942
|
var headerParams = {};
|
|
1460
1943
|
var formParams = {};
|
|
1461
1944
|
var authNames = ['api_token_basic'];
|
|
1462
1945
|
var contentTypes = [];
|
|
1463
1946
|
var accepts = ['application/json'];
|
|
1464
|
-
var returnType = [
|
|
1465
|
-
return this.apiClient.callApi('/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1947
|
+
var returnType = _WebhookList["default"];
|
|
1948
|
+
return this.apiClient.callApi('/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1466
1949
|
}
|
|
1467
1950
|
|
|
1468
1951
|
/**
|
|
1469
|
-
*
|
|
1470
|
-
*
|
|
1471
|
-
* @param {
|
|
1472
|
-
* @param {module:model/
|
|
1473
|
-
* @param {
|
|
1952
|
+
* List webhooks
|
|
1953
|
+
* Returns the webhooks in your account, newest first, one page at a time. Filter them by event type, mode, or the API token, template or folder they're scoped to.
|
|
1954
|
+
* @param {Object} opts Optional parameters
|
|
1955
|
+
* @param {module:model/WebhookEventType} opts.event_type Only list webhooks that subscribe to this event.
|
|
1956
|
+
* @param {module:model/WebhookMode} opts.mode Only list webhooks set to this mode.
|
|
1957
|
+
* @param {String} opts.template_id Only list webhooks scoped to this template.
|
|
1958
|
+
* @param {String} opts.folder_id Only list webhooks scoped to this folder.
|
|
1959
|
+
* @param {String} opts.api_token_id Only list webhooks scoped to this API token.
|
|
1960
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1961
|
+
* @param {String} opts.cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1962
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookList}
|
|
1474
1963
|
*/
|
|
1964
|
+
}, {
|
|
1965
|
+
key: "listWebhooks",
|
|
1966
|
+
value: function listWebhooks(opts) {
|
|
1967
|
+
return this.listWebhooksWithHttpInfo(opts).then(function (response_and_data) {
|
|
1968
|
+
return response_and_data.data;
|
|
1969
|
+
});
|
|
1970
|
+
}
|
|
1475
1971
|
|
|
1476
1972
|
/**
|
|
1477
1973
|
* Move a folder
|
|
1478
|
-
* Moves a folder
|
|
1479
|
-
* @param {String} folder_id
|
|
1480
|
-
* @param {module:model/
|
|
1481
|
-
* @
|
|
1482
|
-
* data is of type: {@link module:model/Folder}
|
|
1974
|
+
* Moves a folder into another folder, or to the root with `parent_folder_id: null`. Its templates and folders move with it. A folder can't move into itself or one of its own folders.
|
|
1975
|
+
* @param {String} folder_id The folder's ID.
|
|
1976
|
+
* @param {module:model/MoveFolderRequest} body Where to move the folder.
|
|
1977
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
1483
1978
|
*/
|
|
1484
1979
|
}, {
|
|
1485
|
-
key: "
|
|
1486
|
-
value: function
|
|
1487
|
-
var postBody =
|
|
1980
|
+
key: "moveFolderWithHttpInfo",
|
|
1981
|
+
value: function moveFolderWithHttpInfo(folder_id, body) {
|
|
1982
|
+
var postBody = body;
|
|
1488
1983
|
// verify the required parameter 'folder_id' is set
|
|
1489
1984
|
if (folder_id === undefined || folder_id === null) {
|
|
1490
|
-
throw new Error("Missing the required parameter 'folder_id' when calling
|
|
1985
|
+
throw new Error("Missing the required parameter 'folder_id' when calling moveFolder");
|
|
1491
1986
|
}
|
|
1492
|
-
// verify the required parameter '
|
|
1493
|
-
if (
|
|
1494
|
-
throw new Error("Missing the required parameter '
|
|
1987
|
+
// verify the required parameter 'body' is set
|
|
1988
|
+
if (body === undefined || body === null) {
|
|
1989
|
+
throw new Error("Missing the required parameter 'body' when calling moveFolder");
|
|
1495
1990
|
}
|
|
1496
1991
|
var pathParams = {
|
|
1497
1992
|
'folder_id': folder_id
|
|
@@ -1503,36 +1998,42 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1503
1998
|
var contentTypes = ['application/json'];
|
|
1504
1999
|
var accepts = ['application/json'];
|
|
1505
2000
|
var returnType = _Folder["default"];
|
|
1506
|
-
return this.apiClient.callApi('/folders/{folder_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2001
|
+
return this.apiClient.callApi('/folders/{folder_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1507
2002
|
}
|
|
1508
2003
|
|
|
1509
2004
|
/**
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1512
|
-
* @param {String}
|
|
1513
|
-
* @param {module:model/
|
|
1514
|
-
* @
|
|
2005
|
+
* Move a folder
|
|
2006
|
+
* Moves a folder into another folder, or to the root with `parent_folder_id: null`. Its templates and folders move with it. A folder can't move into itself or one of its own folders.
|
|
2007
|
+
* @param {String} folder_id The folder's ID.
|
|
2008
|
+
* @param {module:model/MoveFolderRequest} body Where to move the folder.
|
|
2009
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
1515
2010
|
*/
|
|
2011
|
+
}, {
|
|
2012
|
+
key: "moveFolder",
|
|
2013
|
+
value: function moveFolder(folder_id, body) {
|
|
2014
|
+
return this.moveFolderWithHttpInfo(folder_id, body).then(function (response_and_data) {
|
|
2015
|
+
return response_and_data.data;
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
1516
2018
|
|
|
1517
2019
|
/**
|
|
1518
|
-
* Move
|
|
1519
|
-
* Moves a template
|
|
1520
|
-
* @param {String} template_id
|
|
1521
|
-
* @param {module:model/
|
|
1522
|
-
* @
|
|
1523
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
2020
|
+
* Move a template to a folder
|
|
2021
|
+
* Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2022
|
+
* @param {String} template_id The template's ID.
|
|
2023
|
+
* @param {module:model/MoveTemplateRequest} body Where to move the template.
|
|
2024
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1524
2025
|
*/
|
|
1525
2026
|
}, {
|
|
1526
|
-
key: "
|
|
1527
|
-
value: function
|
|
1528
|
-
var postBody =
|
|
2027
|
+
key: "moveTemplateWithHttpInfo",
|
|
2028
|
+
value: function moveTemplateWithHttpInfo(template_id, body) {
|
|
2029
|
+
var postBody = body;
|
|
1529
2030
|
// verify the required parameter 'template_id' is set
|
|
1530
2031
|
if (template_id === undefined || template_id === null) {
|
|
1531
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
2032
|
+
throw new Error("Missing the required parameter 'template_id' when calling moveTemplate");
|
|
1532
2033
|
}
|
|
1533
|
-
// verify the required parameter '
|
|
1534
|
-
if (
|
|
1535
|
-
throw new Error("Missing the required parameter '
|
|
2034
|
+
// verify the required parameter 'body' is set
|
|
2035
|
+
if (body === undefined || body === null) {
|
|
2036
|
+
throw new Error("Missing the required parameter 'body' when calling moveTemplate");
|
|
1536
2037
|
}
|
|
1537
2038
|
var pathParams = {
|
|
1538
2039
|
'template_id': template_id
|
|
@@ -1543,37 +2044,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1543
2044
|
var authNames = ['api_token_basic'];
|
|
1544
2045
|
var contentTypes = ['application/json'];
|
|
1545
2046
|
var accepts = ['application/json'];
|
|
1546
|
-
var returnType =
|
|
1547
|
-
return this.apiClient.callApi('/templates/{template_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2047
|
+
var returnType = _Template["default"];
|
|
2048
|
+
return this.apiClient.callApi('/templates/{template_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1548
2049
|
}
|
|
1549
2050
|
|
|
1550
2051
|
/**
|
|
1551
|
-
*
|
|
1552
|
-
*
|
|
1553
|
-
* @param {String}
|
|
1554
|
-
* @param {module:model/
|
|
1555
|
-
* @
|
|
2052
|
+
* Move a template to a folder
|
|
2053
|
+
* Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2054
|
+
* @param {String} template_id The template's ID.
|
|
2055
|
+
* @param {module:model/MoveTemplateRequest} body Where to move the template.
|
|
2056
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1556
2057
|
*/
|
|
2058
|
+
}, {
|
|
2059
|
+
key: "moveTemplate",
|
|
2060
|
+
value: function moveTemplate(template_id, body) {
|
|
2061
|
+
return this.moveTemplateWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2062
|
+
return response_and_data.data;
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
1557
2065
|
|
|
1558
2066
|
/**
|
|
1559
2067
|
* Publish a template version
|
|
1560
|
-
* Publishes the
|
|
1561
|
-
* @param {String} template_id
|
|
1562
|
-
* @param {module:model/
|
|
1563
|
-
* @
|
|
1564
|
-
* data is of type: {@link module:model/TemplatePublishVersionResponse}
|
|
2068
|
+
* Publishes the template's draft as a new version that doesn't change. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
2069
|
+
* @param {String} template_id The template's ID.
|
|
2070
|
+
* @param {module:model/PublishTemplateVersionRequest} body The version to publish.
|
|
2071
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateVersion} and HTTP response
|
|
1565
2072
|
*/
|
|
1566
2073
|
}, {
|
|
1567
|
-
key: "
|
|
1568
|
-
value: function
|
|
1569
|
-
var postBody =
|
|
2074
|
+
key: "publishTemplateVersionWithHttpInfo",
|
|
2075
|
+
value: function publishTemplateVersionWithHttpInfo(template_id, body) {
|
|
2076
|
+
var postBody = body;
|
|
1570
2077
|
// verify the required parameter 'template_id' is set
|
|
1571
2078
|
if (template_id === undefined || template_id === null) {
|
|
1572
2079
|
throw new Error("Missing the required parameter 'template_id' when calling publishTemplateVersion");
|
|
1573
2080
|
}
|
|
1574
|
-
// verify the required parameter '
|
|
1575
|
-
if (
|
|
1576
|
-
throw new Error("Missing the required parameter '
|
|
2081
|
+
// verify the required parameter 'body' is set
|
|
2082
|
+
if (body === undefined || body === null) {
|
|
2083
|
+
throw new Error("Missing the required parameter 'body' when calling publishTemplateVersion");
|
|
1577
2084
|
}
|
|
1578
2085
|
var pathParams = {
|
|
1579
2086
|
'template_id': template_id
|
|
@@ -1584,37 +2091,90 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1584
2091
|
var authNames = ['api_token_basic'];
|
|
1585
2092
|
var contentTypes = ['application/json'];
|
|
1586
2093
|
var accepts = ['application/json'];
|
|
1587
|
-
var returnType =
|
|
1588
|
-
return this.apiClient.callApi('/templates/{template_id}/publish_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2094
|
+
var returnType = _TemplateVersion["default"];
|
|
2095
|
+
return this.apiClient.callApi('/templates/{template_id}/publish_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1589
2096
|
}
|
|
1590
2097
|
|
|
1591
2098
|
/**
|
|
1592
|
-
*
|
|
1593
|
-
*
|
|
1594
|
-
* @param {String}
|
|
1595
|
-
* @param {module:model/
|
|
1596
|
-
* @
|
|
2099
|
+
* Publish a template version
|
|
2100
|
+
* Publishes the template's draft as a new version that doesn't change. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
2101
|
+
* @param {String} template_id The template's ID.
|
|
2102
|
+
* @param {module:model/PublishTemplateVersionRequest} body The version to publish.
|
|
2103
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateVersion}
|
|
1597
2104
|
*/
|
|
2105
|
+
}, {
|
|
2106
|
+
key: "publishTemplateVersion",
|
|
2107
|
+
value: function publishTemplateVersion(template_id, body) {
|
|
2108
|
+
return this.publishTemplateVersionWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2109
|
+
return response_and_data.data;
|
|
2110
|
+
});
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Remove fields from a template
|
|
2115
|
+
* Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
2116
|
+
* @param {String} template_id The template's ID.
|
|
2117
|
+
* @param {module:model/RemoveTemplateFieldsRequest} body The fields to remove from the template's draft.
|
|
2118
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
2119
|
+
*/
|
|
2120
|
+
}, {
|
|
2121
|
+
key: "removeTemplateFieldsWithHttpInfo",
|
|
2122
|
+
value: function removeTemplateFieldsWithHttpInfo(template_id, body) {
|
|
2123
|
+
var postBody = body;
|
|
2124
|
+
// verify the required parameter 'template_id' is set
|
|
2125
|
+
if (template_id === undefined || template_id === null) {
|
|
2126
|
+
throw new Error("Missing the required parameter 'template_id' when calling removeTemplateFields");
|
|
2127
|
+
}
|
|
2128
|
+
// verify the required parameter 'body' is set
|
|
2129
|
+
if (body === undefined || body === null) {
|
|
2130
|
+
throw new Error("Missing the required parameter 'body' when calling removeTemplateFields");
|
|
2131
|
+
}
|
|
2132
|
+
var pathParams = {
|
|
2133
|
+
'template_id': template_id
|
|
2134
|
+
};
|
|
2135
|
+
var queryParams = {};
|
|
2136
|
+
var headerParams = {};
|
|
2137
|
+
var formParams = {};
|
|
2138
|
+
var authNames = ['api_token_basic'];
|
|
2139
|
+
var contentTypes = ['application/json'];
|
|
2140
|
+
var accepts = ['application/json'];
|
|
2141
|
+
var returnType = _TemplateFields["default"];
|
|
2142
|
+
return this.apiClient.callApi('/templates/{template_id}/fields/remove', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* Remove fields from a template
|
|
2147
|
+
* Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
2148
|
+
* @param {String} template_id The template's ID.
|
|
2149
|
+
* @param {module:model/RemoveTemplateFieldsRequest} body The fields to remove from the template's draft.
|
|
2150
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
2151
|
+
*/
|
|
2152
|
+
}, {
|
|
2153
|
+
key: "removeTemplateFields",
|
|
2154
|
+
value: function removeTemplateFields(template_id, body) {
|
|
2155
|
+
return this.removeTemplateFieldsWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2156
|
+
return response_and_data.data;
|
|
2157
|
+
});
|
|
2158
|
+
}
|
|
1598
2159
|
|
|
1599
2160
|
/**
|
|
1600
2161
|
* Rename a folder
|
|
1601
|
-
* Renames
|
|
1602
|
-
* @param {String} folder_id
|
|
1603
|
-
* @param {module:model/
|
|
1604
|
-
* @
|
|
1605
|
-
* data is of type: {@link module:model/Folder}
|
|
2162
|
+
* Renames a folder. The name must be unique within its parent folder.
|
|
2163
|
+
* @param {String} folder_id The folder's ID.
|
|
2164
|
+
* @param {module:model/RenameFolderRequest} body The folder's new name.
|
|
2165
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
1606
2166
|
*/
|
|
1607
2167
|
}, {
|
|
1608
|
-
key: "
|
|
1609
|
-
value: function
|
|
1610
|
-
var postBody =
|
|
2168
|
+
key: "renameFolderWithHttpInfo",
|
|
2169
|
+
value: function renameFolderWithHttpInfo(folder_id, body) {
|
|
2170
|
+
var postBody = body;
|
|
1611
2171
|
// verify the required parameter 'folder_id' is set
|
|
1612
2172
|
if (folder_id === undefined || folder_id === null) {
|
|
1613
2173
|
throw new Error("Missing the required parameter 'folder_id' when calling renameFolder");
|
|
1614
2174
|
}
|
|
1615
|
-
// verify the required parameter '
|
|
1616
|
-
if (
|
|
1617
|
-
throw new Error("Missing the required parameter '
|
|
2175
|
+
// verify the required parameter 'body' is set
|
|
2176
|
+
if (body === undefined || body === null) {
|
|
2177
|
+
throw new Error("Missing the required parameter 'body' when calling renameFolder");
|
|
1618
2178
|
}
|
|
1619
2179
|
var pathParams = {
|
|
1620
2180
|
'folder_id': folder_id
|
|
@@ -1626,36 +2186,89 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1626
2186
|
var contentTypes = ['application/json'];
|
|
1627
2187
|
var accepts = ['application/json'];
|
|
1628
2188
|
var returnType = _Folder["default"];
|
|
1629
|
-
return this.apiClient.callApi('/folders/{folder_id}/rename', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2189
|
+
return this.apiClient.callApi('/folders/{folder_id}/rename', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
/**
|
|
2193
|
+
* Rename a folder
|
|
2194
|
+
* Renames a folder. The name must be unique within its parent folder.
|
|
2195
|
+
* @param {String} folder_id The folder's ID.
|
|
2196
|
+
* @param {module:model/RenameFolderRequest} body The folder's new name.
|
|
2197
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
2198
|
+
*/
|
|
2199
|
+
}, {
|
|
2200
|
+
key: "renameFolder",
|
|
2201
|
+
value: function renameFolder(folder_id, body) {
|
|
2202
|
+
return this.renameFolderWithHttpInfo(folder_id, body).then(function (response_and_data) {
|
|
2203
|
+
return response_and_data.data;
|
|
2204
|
+
});
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* Reorder a template's fields
|
|
2209
|
+
* Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
2210
|
+
* @param {String} template_id The template's ID.
|
|
2211
|
+
* @param {module:model/ReorderTemplateFieldsRequest} body The new order of the fields in the template's draft.
|
|
2212
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
2213
|
+
*/
|
|
2214
|
+
}, {
|
|
2215
|
+
key: "reorderTemplateFieldsWithHttpInfo",
|
|
2216
|
+
value: function reorderTemplateFieldsWithHttpInfo(template_id, body) {
|
|
2217
|
+
var postBody = body;
|
|
2218
|
+
// verify the required parameter 'template_id' is set
|
|
2219
|
+
if (template_id === undefined || template_id === null) {
|
|
2220
|
+
throw new Error("Missing the required parameter 'template_id' when calling reorderTemplateFields");
|
|
2221
|
+
}
|
|
2222
|
+
// verify the required parameter 'body' is set
|
|
2223
|
+
if (body === undefined || body === null) {
|
|
2224
|
+
throw new Error("Missing the required parameter 'body' when calling reorderTemplateFields");
|
|
2225
|
+
}
|
|
2226
|
+
var pathParams = {
|
|
2227
|
+
'template_id': template_id
|
|
2228
|
+
};
|
|
2229
|
+
var queryParams = {};
|
|
2230
|
+
var headerParams = {};
|
|
2231
|
+
var formParams = {};
|
|
2232
|
+
var authNames = ['api_token_basic'];
|
|
2233
|
+
var contentTypes = ['application/json'];
|
|
2234
|
+
var accepts = ['application/json'];
|
|
2235
|
+
var returnType = _TemplateFields["default"];
|
|
2236
|
+
return this.apiClient.callApi('/templates/{template_id}/fields/reorder', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1630
2237
|
}
|
|
1631
2238
|
|
|
1632
2239
|
/**
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
* @param {String}
|
|
1636
|
-
* @param {module:model/
|
|
1637
|
-
* @
|
|
2240
|
+
* Reorder a template's fields
|
|
2241
|
+
* Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
2242
|
+
* @param {String} template_id The template's ID.
|
|
2243
|
+
* @param {module:model/ReorderTemplateFieldsRequest} body The new order of the fields in the template's draft.
|
|
2244
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
1638
2245
|
*/
|
|
2246
|
+
}, {
|
|
2247
|
+
key: "reorderTemplateFields",
|
|
2248
|
+
value: function reorderTemplateFields(template_id, body) {
|
|
2249
|
+
return this.reorderTemplateFieldsWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2250
|
+
return response_and_data.data;
|
|
2251
|
+
});
|
|
2252
|
+
}
|
|
1639
2253
|
|
|
1640
2254
|
/**
|
|
1641
2255
|
* Restore a template version
|
|
1642
|
-
*
|
|
1643
|
-
* @param {String} template_id
|
|
1644
|
-
* @param {module:model/
|
|
1645
|
-
* @
|
|
1646
|
-
* data is of type: {@link module:model/SuccessErrorResponse}
|
|
2256
|
+
* Replaces the template's draft with a copy of one of its published versions.
|
|
2257
|
+
* @param {String} template_id The template's ID.
|
|
2258
|
+
* @param {module:model/RestoreTemplateVersionRequest} body The version to restore.
|
|
2259
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1647
2260
|
*/
|
|
1648
2261
|
}, {
|
|
1649
|
-
key: "
|
|
1650
|
-
value: function
|
|
1651
|
-
var postBody =
|
|
2262
|
+
key: "restoreTemplateVersionWithHttpInfo",
|
|
2263
|
+
value: function restoreTemplateVersionWithHttpInfo(template_id, body) {
|
|
2264
|
+
var postBody = body;
|
|
1652
2265
|
// verify the required parameter 'template_id' is set
|
|
1653
2266
|
if (template_id === undefined || template_id === null) {
|
|
1654
2267
|
throw new Error("Missing the required parameter 'template_id' when calling restoreTemplateVersion");
|
|
1655
2268
|
}
|
|
1656
|
-
// verify the required parameter '
|
|
1657
|
-
if (
|
|
1658
|
-
throw new Error("Missing the required parameter '
|
|
2269
|
+
// verify the required parameter 'body' is set
|
|
2270
|
+
if (body === undefined || body === null) {
|
|
2271
|
+
throw new Error("Missing the required parameter 'body' when calling restoreTemplateVersion");
|
|
1659
2272
|
}
|
|
1660
2273
|
var pathParams = {
|
|
1661
2274
|
'template_id': template_id
|
|
@@ -1666,27 +2279,33 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1666
2279
|
var authNames = ['api_token_basic'];
|
|
1667
2280
|
var contentTypes = ['application/json'];
|
|
1668
2281
|
var accepts = ['application/json'];
|
|
1669
|
-
var returnType =
|
|
1670
|
-
return this.apiClient.callApi('/templates/{template_id}/restore_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2282
|
+
var returnType = _Template["default"];
|
|
2283
|
+
return this.apiClient.callApi('/templates/{template_id}/restore_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1671
2284
|
}
|
|
1672
2285
|
|
|
1673
2286
|
/**
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1676
|
-
* @param {String}
|
|
1677
|
-
* @param {module:model/
|
|
1678
|
-
* @
|
|
2287
|
+
* Restore a template version
|
|
2288
|
+
* Replaces the template's draft with a copy of one of its published versions.
|
|
2289
|
+
* @param {String} template_id The template's ID.
|
|
2290
|
+
* @param {module:model/RestoreTemplateVersionRequest} body The version to restore.
|
|
2291
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1679
2292
|
*/
|
|
2293
|
+
}, {
|
|
2294
|
+
key: "restoreTemplateVersion",
|
|
2295
|
+
value: function restoreTemplateVersion(template_id, body) {
|
|
2296
|
+
return this.restoreTemplateVersionWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2297
|
+
return response_and_data.data;
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
1680
2300
|
|
|
1681
2301
|
/**
|
|
1682
2302
|
* Test authentication
|
|
1683
|
-
* Checks whether your API token is valid by making an authenticated request.
|
|
1684
|
-
* @
|
|
1685
|
-
* data is of type: {@link module:model/SuccessErrorResponse}
|
|
2303
|
+
* Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
2304
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AuthenticationCheck} and HTTP response
|
|
1686
2305
|
*/
|
|
1687
2306
|
}, {
|
|
1688
|
-
key: "
|
|
1689
|
-
value: function
|
|
2307
|
+
key: "testAuthenticationWithHttpInfo",
|
|
2308
|
+
value: function testAuthenticationWithHttpInfo() {
|
|
1690
2309
|
var postBody = null;
|
|
1691
2310
|
var pathParams = {};
|
|
1692
2311
|
var queryParams = {};
|
|
@@ -1695,40 +2314,44 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1695
2314
|
var authNames = ['api_token_basic'];
|
|
1696
2315
|
var contentTypes = [];
|
|
1697
2316
|
var accepts = ['application/json'];
|
|
1698
|
-
var returnType =
|
|
1699
|
-
return this.apiClient.callApi('/authentication', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2317
|
+
var returnType = _AuthenticationCheck["default"];
|
|
2318
|
+
return this.apiClient.callApi('/authentication', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1700
2319
|
}
|
|
1701
2320
|
|
|
1702
2321
|
/**
|
|
1703
|
-
*
|
|
1704
|
-
*
|
|
1705
|
-
* @
|
|
1706
|
-
* @param {module:model/CreateSubmissionDataRequestResponse} data The data returned by the service call.
|
|
1707
|
-
* @param {String} response The complete HTTP response.
|
|
2322
|
+
* Test authentication
|
|
2323
|
+
* Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
2324
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AuthenticationCheck}
|
|
1708
2325
|
*/
|
|
2326
|
+
}, {
|
|
2327
|
+
key: "testAuthentication",
|
|
2328
|
+
value: function testAuthentication() {
|
|
2329
|
+
return this.testAuthenticationWithHttpInfo().then(function (response_and_data) {
|
|
2330
|
+
return response_and_data.data;
|
|
2331
|
+
});
|
|
2332
|
+
}
|
|
1709
2333
|
|
|
1710
2334
|
/**
|
|
1711
|
-
* Update a
|
|
1712
|
-
*
|
|
1713
|
-
* @param {String}
|
|
1714
|
-
* @param {module:model/
|
|
1715
|
-
* @
|
|
1716
|
-
* data is of type: {@link module:model/CreateSubmissionDataRequestResponse}
|
|
2335
|
+
* Update a signature request
|
|
2336
|
+
* Changes a pending signature request's metadata, or how your app authenticated the person (for the audit trail). Once the person has opened it, only its metadata can be changed, and a completed or declined signature request can't be changed.
|
|
2337
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
2338
|
+
* @param {module:model/UpdateSignatureRequestRequest} body The settings to change. Properties left out keep their values.
|
|
2339
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequest} and HTTP response
|
|
1717
2340
|
*/
|
|
1718
2341
|
}, {
|
|
1719
|
-
key: "
|
|
1720
|
-
value: function
|
|
1721
|
-
var postBody =
|
|
1722
|
-
// verify the required parameter '
|
|
1723
|
-
if (
|
|
1724
|
-
throw new Error("Missing the required parameter '
|
|
2342
|
+
key: "updateSignatureRequestWithHttpInfo",
|
|
2343
|
+
value: function updateSignatureRequestWithHttpInfo(signature_request_id, body) {
|
|
2344
|
+
var postBody = body;
|
|
2345
|
+
// verify the required parameter 'signature_request_id' is set
|
|
2346
|
+
if (signature_request_id === undefined || signature_request_id === null) {
|
|
2347
|
+
throw new Error("Missing the required parameter 'signature_request_id' when calling updateSignatureRequest");
|
|
1725
2348
|
}
|
|
1726
|
-
// verify the required parameter '
|
|
1727
|
-
if (
|
|
1728
|
-
throw new Error("Missing the required parameter '
|
|
2349
|
+
// verify the required parameter 'body' is set
|
|
2350
|
+
if (body === undefined || body === null) {
|
|
2351
|
+
throw new Error("Missing the required parameter 'body' when calling updateSignatureRequest");
|
|
1729
2352
|
}
|
|
1730
2353
|
var pathParams = {
|
|
1731
|
-
'
|
|
2354
|
+
'signature_request_id': signature_request_id
|
|
1732
2355
|
};
|
|
1733
2356
|
var queryParams = {};
|
|
1734
2357
|
var headerParams = {};
|
|
@@ -1736,37 +2359,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1736
2359
|
var authNames = ['api_token_basic'];
|
|
1737
2360
|
var contentTypes = ['application/json'];
|
|
1738
2361
|
var accepts = ['application/json'];
|
|
1739
|
-
var returnType =
|
|
1740
|
-
return this.apiClient.callApi('/
|
|
2362
|
+
var returnType = _SignatureRequest["default"];
|
|
2363
|
+
return this.apiClient.callApi('/signature_requests/{signature_request_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1741
2364
|
}
|
|
1742
2365
|
|
|
1743
2366
|
/**
|
|
1744
|
-
*
|
|
1745
|
-
*
|
|
1746
|
-
* @param {String}
|
|
1747
|
-
* @param {module:model/
|
|
1748
|
-
* @
|
|
2367
|
+
* Update a signature request
|
|
2368
|
+
* Changes a pending signature request's metadata, or how your app authenticated the person (for the audit trail). Once the person has opened it, only its metadata can be changed, and a completed or declined signature request can't be changed.
|
|
2369
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
2370
|
+
* @param {module:model/UpdateSignatureRequestRequest} body The settings to change. Properties left out keep their values.
|
|
2371
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequest}
|
|
1749
2372
|
*/
|
|
2373
|
+
}, {
|
|
2374
|
+
key: "updateSignatureRequest",
|
|
2375
|
+
value: function updateSignatureRequest(signature_request_id, body) {
|
|
2376
|
+
return this.updateSignatureRequestWithHttpInfo(signature_request_id, body).then(function (response_and_data) {
|
|
2377
|
+
return response_and_data.data;
|
|
2378
|
+
});
|
|
2379
|
+
}
|
|
1750
2380
|
|
|
1751
2381
|
/**
|
|
1752
|
-
* Update a
|
|
1753
|
-
*
|
|
1754
|
-
* @param {String} template_id
|
|
1755
|
-
* @param {module:model/
|
|
1756
|
-
* @
|
|
1757
|
-
* data is of type: {@link module:model/SuccessMultipleErrorsResponse}
|
|
2382
|
+
* Update a template
|
|
2383
|
+
* Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Setting `parent_folder_id` moves the template and all of its published versions.
|
|
2384
|
+
* @param {String} template_id The template's ID.
|
|
2385
|
+
* @param {module:model/UpdateTemplateRequest} body The settings to change. Properties left out keep their values.
|
|
2386
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1758
2387
|
*/
|
|
1759
2388
|
}, {
|
|
1760
|
-
key: "
|
|
1761
|
-
value: function
|
|
1762
|
-
var postBody =
|
|
2389
|
+
key: "updateTemplateWithHttpInfo",
|
|
2390
|
+
value: function updateTemplateWithHttpInfo(template_id, body) {
|
|
2391
|
+
var postBody = body;
|
|
1763
2392
|
// verify the required parameter 'template_id' is set
|
|
1764
2393
|
if (template_id === undefined || template_id === null) {
|
|
1765
2394
|
throw new Error("Missing the required parameter 'template_id' when calling updateTemplate");
|
|
1766
2395
|
}
|
|
1767
|
-
// verify the required parameter '
|
|
1768
|
-
if (
|
|
1769
|
-
throw new Error("Missing the required parameter '
|
|
2396
|
+
// verify the required parameter 'body' is set
|
|
2397
|
+
if (body === undefined || body === null) {
|
|
2398
|
+
throw new Error("Missing the required parameter 'body' when calling updateTemplate");
|
|
1770
2399
|
}
|
|
1771
2400
|
var pathParams = {
|
|
1772
2401
|
'template_id': template_id
|
|
@@ -1777,84 +2406,97 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1777
2406
|
var authNames = ['api_token_basic'];
|
|
1778
2407
|
var contentTypes = ['application/json'];
|
|
1779
2408
|
var accepts = ['application/json'];
|
|
1780
|
-
var returnType =
|
|
1781
|
-
return this.apiClient.callApi('/templates/{template_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2409
|
+
var returnType = _Template["default"];
|
|
2410
|
+
return this.apiClient.callApi('/templates/{template_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1782
2411
|
}
|
|
1783
2412
|
|
|
1784
2413
|
/**
|
|
1785
|
-
*
|
|
1786
|
-
*
|
|
1787
|
-
* @param {String}
|
|
1788
|
-
* @param {module:model/
|
|
1789
|
-
* @
|
|
2414
|
+
* Update a template
|
|
2415
|
+
* Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Setting `parent_folder_id` moves the template and all of its published versions.
|
|
2416
|
+
* @param {String} template_id The template's ID.
|
|
2417
|
+
* @param {module:model/UpdateTemplateRequest} body The settings to change. Properties left out keep their values.
|
|
2418
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1790
2419
|
*/
|
|
2420
|
+
}, {
|
|
2421
|
+
key: "updateTemplate",
|
|
2422
|
+
value: function updateTemplate(template_id, body) {
|
|
2423
|
+
return this.updateTemplateWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2424
|
+
return response_and_data.data;
|
|
2425
|
+
});
|
|
2426
|
+
}
|
|
1791
2427
|
|
|
1792
2428
|
/**
|
|
1793
|
-
*
|
|
1794
|
-
*
|
|
1795
|
-
* @param {String} template_id
|
|
1796
|
-
* @param {
|
|
2429
|
+
* Replace a template's PDF
|
|
2430
|
+
* Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
2431
|
+
* @param {String} template_id The template's ID.
|
|
2432
|
+
* @param {module:model/UpdateTemplateDocumentRequest} body The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
1797
2433
|
* @param {Object} opts Optional parameters
|
|
1798
|
-
* @param {
|
|
1799
|
-
* @
|
|
1800
|
-
* data is of type: {@link module:model/SuccessMultipleErrorsResponse}
|
|
2434
|
+
* @param {Boolean} [wait] Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
2435
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1801
2436
|
*/
|
|
1802
2437
|
}, {
|
|
1803
|
-
key: "
|
|
1804
|
-
value: function
|
|
2438
|
+
key: "updateTemplateDocumentWithHttpInfo",
|
|
2439
|
+
value: function updateTemplateDocumentWithHttpInfo(template_id, body, opts) {
|
|
1805
2440
|
opts = opts || {};
|
|
1806
|
-
var postBody =
|
|
2441
|
+
var postBody = body;
|
|
1807
2442
|
// verify the required parameter 'template_id' is set
|
|
1808
2443
|
if (template_id === undefined || template_id === null) {
|
|
1809
2444
|
throw new Error("Missing the required parameter 'template_id' when calling updateTemplateDocument");
|
|
1810
2445
|
}
|
|
1811
|
-
// verify the required parameter '
|
|
1812
|
-
if (
|
|
1813
|
-
throw new Error("Missing the required parameter '
|
|
2446
|
+
// verify the required parameter 'body' is set
|
|
2447
|
+
if (body === undefined || body === null) {
|
|
2448
|
+
throw new Error("Missing the required parameter 'body' when calling updateTemplateDocument");
|
|
1814
2449
|
}
|
|
1815
2450
|
var pathParams = {
|
|
1816
2451
|
'template_id': template_id
|
|
1817
2452
|
};
|
|
1818
|
-
var queryParams = {
|
|
1819
|
-
|
|
1820
|
-
var formParams = {
|
|
1821
|
-
'template[document]': template_document,
|
|
1822
|
-
'template[name]': opts['template_name']
|
|
2453
|
+
var queryParams = {
|
|
2454
|
+
'wait': opts['wait']
|
|
1823
2455
|
};
|
|
2456
|
+
var headerParams = {};
|
|
2457
|
+
var formParams = {};
|
|
1824
2458
|
var authNames = ['api_token_basic'];
|
|
1825
|
-
var contentTypes = ['
|
|
2459
|
+
var contentTypes = ['application/json'];
|
|
1826
2460
|
var accepts = ['application/json'];
|
|
1827
|
-
var returnType =
|
|
1828
|
-
return this.apiClient.callApi('/templates/{template_id}
|
|
2461
|
+
var returnType = _Template["default"];
|
|
2462
|
+
return this.apiClient.callApi('/templates/{template_id}/document', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1829
2463
|
}
|
|
1830
2464
|
|
|
1831
2465
|
/**
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1834
|
-
* @param {String}
|
|
1835
|
-
* @param {module:model/
|
|
1836
|
-
* @param {
|
|
2466
|
+
* Replace a template's PDF
|
|
2467
|
+
* Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
2468
|
+
* @param {String} template_id The template's ID.
|
|
2469
|
+
* @param {module:model/UpdateTemplateDocumentRequest} body The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
2470
|
+
* @param {Object} opts Optional parameters
|
|
2471
|
+
* @param {Boolean} opts.wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
2472
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1837
2473
|
*/
|
|
2474
|
+
}, {
|
|
2475
|
+
key: "updateTemplateDocument",
|
|
2476
|
+
value: function updateTemplateDocument(template_id, body, opts) {
|
|
2477
|
+
return this.updateTemplateDocumentWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2478
|
+
return response_and_data.data;
|
|
2479
|
+
});
|
|
2480
|
+
}
|
|
1838
2481
|
|
|
1839
2482
|
/**
|
|
1840
|
-
* Update a template's
|
|
1841
|
-
*
|
|
1842
|
-
* @param {String} template_id
|
|
1843
|
-
* @param {module:model/
|
|
1844
|
-
* @
|
|
1845
|
-
* data is of type: {@link module:model/SuccessMultipleErrorsResponse}
|
|
2483
|
+
* Update a template's fields
|
|
2484
|
+
* Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
|
|
2485
|
+
* @param {String} template_id The template's ID.
|
|
2486
|
+
* @param {module:model/UpdateTemplateFieldsRequest} body The fields to change in the template's draft.
|
|
2487
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
1846
2488
|
*/
|
|
1847
2489
|
}, {
|
|
1848
|
-
key: "
|
|
1849
|
-
value: function
|
|
1850
|
-
var postBody =
|
|
2490
|
+
key: "updateTemplateFieldsWithHttpInfo",
|
|
2491
|
+
value: function updateTemplateFieldsWithHttpInfo(template_id, body) {
|
|
2492
|
+
var postBody = body;
|
|
1851
2493
|
// verify the required parameter 'template_id' is set
|
|
1852
2494
|
if (template_id === undefined || template_id === null) {
|
|
1853
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
2495
|
+
throw new Error("Missing the required parameter 'template_id' when calling updateTemplateFields");
|
|
1854
2496
|
}
|
|
1855
|
-
// verify the required parameter '
|
|
1856
|
-
if (
|
|
1857
|
-
throw new Error("Missing the required parameter '
|
|
2497
|
+
// verify the required parameter 'body' is set
|
|
2498
|
+
if (body === undefined || body === null) {
|
|
2499
|
+
throw new Error("Missing the required parameter 'body' when calling updateTemplateFields");
|
|
1858
2500
|
}
|
|
1859
2501
|
var pathParams = {
|
|
1860
2502
|
'template_id': template_id
|
|
@@ -1865,37 +2507,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1865
2507
|
var authNames = ['api_token_basic'];
|
|
1866
2508
|
var contentTypes = ['application/json'];
|
|
1867
2509
|
var accepts = ['application/json'];
|
|
1868
|
-
var returnType =
|
|
1869
|
-
return this.apiClient.callApi('/templates/{template_id}
|
|
2510
|
+
var returnType = _TemplateFields["default"];
|
|
2511
|
+
return this.apiClient.callApi('/templates/{template_id}/fields', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1870
2512
|
}
|
|
1871
2513
|
|
|
1872
2514
|
/**
|
|
1873
|
-
*
|
|
1874
|
-
*
|
|
1875
|
-
* @param {String}
|
|
1876
|
-
* @param {module:model/
|
|
1877
|
-
* @
|
|
2515
|
+
* Update a template's fields
|
|
2516
|
+
* Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
|
|
2517
|
+
* @param {String} template_id The template's ID.
|
|
2518
|
+
* @param {module:model/UpdateTemplateFieldsRequest} body The fields to change in the template's draft.
|
|
2519
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
1878
2520
|
*/
|
|
2521
|
+
}, {
|
|
2522
|
+
key: "updateTemplateFields",
|
|
2523
|
+
value: function updateTemplateFields(template_id, body) {
|
|
2524
|
+
return this.updateTemplateFieldsWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2525
|
+
return response_and_data.data;
|
|
2526
|
+
});
|
|
2527
|
+
}
|
|
1879
2528
|
|
|
1880
2529
|
/**
|
|
1881
2530
|
* Update a webhook
|
|
1882
|
-
* Updates the
|
|
1883
|
-
* @param {String} webhook_id
|
|
1884
|
-
* @param {module:model/
|
|
1885
|
-
* @
|
|
1886
|
-
* data is of type: {@link module:model/Webhook}
|
|
2531
|
+
* Updates a webhook. Only the properties you send change.
|
|
2532
|
+
* @param {String} webhook_id The webhook's ID.
|
|
2533
|
+
* @param {module:model/UpdateWebhookRequest} body The settings to change. Properties left out keep their values.
|
|
2534
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
1887
2535
|
*/
|
|
1888
2536
|
}, {
|
|
1889
|
-
key: "
|
|
1890
|
-
value: function
|
|
1891
|
-
var postBody =
|
|
2537
|
+
key: "updateWebhookWithHttpInfo",
|
|
2538
|
+
value: function updateWebhookWithHttpInfo(webhook_id, body) {
|
|
2539
|
+
var postBody = body;
|
|
1892
2540
|
// verify the required parameter 'webhook_id' is set
|
|
1893
2541
|
if (webhook_id === undefined || webhook_id === null) {
|
|
1894
2542
|
throw new Error("Missing the required parameter 'webhook_id' when calling updateWebhook");
|
|
1895
2543
|
}
|
|
1896
|
-
// verify the required parameter '
|
|
1897
|
-
if (
|
|
1898
|
-
throw new Error("Missing the required parameter '
|
|
2544
|
+
// verify the required parameter 'body' is set
|
|
2545
|
+
if (body === undefined || body === null) {
|
|
2546
|
+
throw new Error("Missing the required parameter 'body' when calling updateWebhook");
|
|
1899
2547
|
}
|
|
1900
2548
|
var pathParams = {
|
|
1901
2549
|
'webhook_id': webhook_id
|
|
@@ -1907,7 +2555,207 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1907
2555
|
var contentTypes = ['application/json'];
|
|
1908
2556
|
var accepts = ['application/json'];
|
|
1909
2557
|
var returnType = _Webhook["default"];
|
|
1910
|
-
return this.apiClient.callApi('/webhooks/{webhook_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2558
|
+
return this.apiClient.callApi('/webhooks/{webhook_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
/**
|
|
2562
|
+
* Update a webhook
|
|
2563
|
+
* Updates a webhook. Only the properties you send change.
|
|
2564
|
+
* @param {String} webhook_id The webhook's ID.
|
|
2565
|
+
* @param {module:model/UpdateWebhookRequest} body The settings to change. Properties left out keep their values.
|
|
2566
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
2567
|
+
*/
|
|
2568
|
+
}, {
|
|
2569
|
+
key: "updateWebhook",
|
|
2570
|
+
value: function updateWebhook(webhook_id, body) {
|
|
2571
|
+
return this.updateWebhookWithHttpInfo(webhook_id, body).then(function (response_and_data) {
|
|
2572
|
+
return response_and_data.data;
|
|
2573
|
+
});
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* Create a PDF template from an uploaded PDF
|
|
2578
|
+
* Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the PDF with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
|
|
2579
|
+
* @param {File} document The PDF.
|
|
2580
|
+
* @param {Object} opts Optional parameters
|
|
2581
|
+
* @param {Boolean} [wait] Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
2582
|
+
* @param {String} [name] The template's name.
|
|
2583
|
+
* @param {String} [description] The template's description.
|
|
2584
|
+
* @param {String} [parent_folder_id] The folder to put the template in. Left out, it's created at the root.
|
|
2585
|
+
* @param {module:model/AiFieldNamingLanguage} [ai_field_naming_language] The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. Default: your account's template settings.
|
|
2586
|
+
* @param {Boolean} [detect_fields] Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up.
|
|
2587
|
+
* @param {module:model/FieldSetupSource} [field_source] With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
2588
|
+
* @param {module:model/FieldSetupNaming} [field_naming] With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
|
|
2589
|
+
* @param {module:model/FieldSetupLogic} [field_logic] With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
|
|
2590
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2591
|
+
*/
|
|
2592
|
+
}, {
|
|
2593
|
+
key: "uploadTemplateWithHttpInfo",
|
|
2594
|
+
value: function uploadTemplateWithHttpInfo(document, opts) {
|
|
2595
|
+
opts = opts || {};
|
|
2596
|
+
var postBody = null;
|
|
2597
|
+
// verify the required parameter 'document' is set
|
|
2598
|
+
if (document === undefined || document === null) {
|
|
2599
|
+
throw new Error("Missing the required parameter 'document' when calling uploadTemplate");
|
|
2600
|
+
}
|
|
2601
|
+
var pathParams = {};
|
|
2602
|
+
var queryParams = {
|
|
2603
|
+
'wait': opts['wait']
|
|
2604
|
+
};
|
|
2605
|
+
var headerParams = {};
|
|
2606
|
+
var formParams = {
|
|
2607
|
+
'document': document,
|
|
2608
|
+
'name': opts['name'],
|
|
2609
|
+
'description': opts['description'],
|
|
2610
|
+
'parent_folder_id': opts['parent_folder_id'],
|
|
2611
|
+
'ai_field_naming_language': opts['ai_field_naming_language'],
|
|
2612
|
+
'detect_fields': opts['detect_fields'],
|
|
2613
|
+
'field_source': opts['field_source'],
|
|
2614
|
+
'field_naming': opts['field_naming'],
|
|
2615
|
+
'field_logic': opts['field_logic']
|
|
2616
|
+
};
|
|
2617
|
+
var authNames = ['api_token_basic'];
|
|
2618
|
+
var contentTypes = ['multipart/form-data'];
|
|
2619
|
+
var accepts = ['application/json'];
|
|
2620
|
+
var returnType = _Template["default"];
|
|
2621
|
+
return this.apiClient.callApi('/templates/upload', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* Create a PDF template from an uploaded PDF
|
|
2626
|
+
* Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the PDF with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
|
|
2627
|
+
* @param {File} document The PDF.
|
|
2628
|
+
* @param {Object} opts Optional parameters
|
|
2629
|
+
* @param {Boolean} opts.wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
2630
|
+
* @param {String} opts.name The template's name.
|
|
2631
|
+
* @param {String} opts.description The template's description.
|
|
2632
|
+
* @param {String} opts.parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
2633
|
+
* @param {module:model/AiFieldNamingLanguage} opts.ai_field_naming_language The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. Default: your account's template settings.
|
|
2634
|
+
* @param {Boolean} opts.detect_fields Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up.
|
|
2635
|
+
* @param {module:model/FieldSetupSource} opts.field_source With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
2636
|
+
* @param {module:model/FieldSetupNaming} opts.field_naming With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
|
|
2637
|
+
* @param {module:model/FieldSetupLogic} opts.field_logic With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
|
|
2638
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2639
|
+
*/
|
|
2640
|
+
}, {
|
|
2641
|
+
key: "uploadTemplate",
|
|
2642
|
+
value: function uploadTemplate(document, opts) {
|
|
2643
|
+
return this.uploadTemplateWithHttpInfo(document, opts).then(function (response_and_data) {
|
|
2644
|
+
return response_and_data.data;
|
|
2645
|
+
});
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
/**
|
|
2649
|
+
* Replace a template's PDF with an uploaded PDF
|
|
2650
|
+
* Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields.
|
|
2651
|
+
* @param {String} template_id The template's ID.
|
|
2652
|
+
* @param {File} document The new PDF.
|
|
2653
|
+
* @param {Object} opts Optional parameters
|
|
2654
|
+
* @param {Boolean} [wait] Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
2655
|
+
* @param {Boolean} [reimport_fields] Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
|
|
2656
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2657
|
+
*/
|
|
2658
|
+
}, {
|
|
2659
|
+
key: "uploadTemplateDocumentWithHttpInfo",
|
|
2660
|
+
value: function uploadTemplateDocumentWithHttpInfo(template_id, document, opts) {
|
|
2661
|
+
opts = opts || {};
|
|
2662
|
+
var postBody = null;
|
|
2663
|
+
// verify the required parameter 'template_id' is set
|
|
2664
|
+
if (template_id === undefined || template_id === null) {
|
|
2665
|
+
throw new Error("Missing the required parameter 'template_id' when calling uploadTemplateDocument");
|
|
2666
|
+
}
|
|
2667
|
+
// verify the required parameter 'document' is set
|
|
2668
|
+
if (document === undefined || document === null) {
|
|
2669
|
+
throw new Error("Missing the required parameter 'document' when calling uploadTemplateDocument");
|
|
2670
|
+
}
|
|
2671
|
+
var pathParams = {
|
|
2672
|
+
'template_id': template_id
|
|
2673
|
+
};
|
|
2674
|
+
var queryParams = {
|
|
2675
|
+
'wait': opts['wait']
|
|
2676
|
+
};
|
|
2677
|
+
var headerParams = {};
|
|
2678
|
+
var formParams = {
|
|
2679
|
+
'document': document,
|
|
2680
|
+
'reimport_fields': opts['reimport_fields']
|
|
2681
|
+
};
|
|
2682
|
+
var authNames = ['api_token_basic'];
|
|
2683
|
+
var contentTypes = ['multipart/form-data'];
|
|
2684
|
+
var accepts = ['application/json'];
|
|
2685
|
+
var returnType = _Template["default"];
|
|
2686
|
+
return this.apiClient.callApi('/templates/{template_id}/document/upload', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
/**
|
|
2690
|
+
* Replace a template's PDF with an uploaded PDF
|
|
2691
|
+
* Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields.
|
|
2692
|
+
* @param {String} template_id The template's ID.
|
|
2693
|
+
* @param {File} document The new PDF.
|
|
2694
|
+
* @param {Object} opts Optional parameters
|
|
2695
|
+
* @param {Boolean} opts.wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
2696
|
+
* @param {Boolean} opts.reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
|
|
2697
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2698
|
+
*/
|
|
2699
|
+
}, {
|
|
2700
|
+
key: "uploadTemplateDocument",
|
|
2701
|
+
value: function uploadTemplateDocument(template_id, document, opts) {
|
|
2702
|
+
return this.uploadTemplateDocumentWithHttpInfo(template_id, document, opts).then(function (response_and_data) {
|
|
2703
|
+
return response_and_data.data;
|
|
2704
|
+
});
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
/**
|
|
2708
|
+
* Check a submission without creating it
|
|
2709
|
+
* Checks a submission as creating it would (its data against the template's fields, its settings and signature requests) without saving it, generating anything or using credits. It doesn't check your account's credits. The response says whether the submission is valid, and if not, has the error that creating it would return.
|
|
2710
|
+
* @param {String} template_id The template's ID.
|
|
2711
|
+
* @param {module:model/ValidateSubmissionRequest} body The submission's data and settings.
|
|
2712
|
+
* @param {Object} opts Optional parameters
|
|
2713
|
+
* @param {String} [version] The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
2714
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionValidation} and HTTP response
|
|
2715
|
+
*/
|
|
2716
|
+
}, {
|
|
2717
|
+
key: "validateSubmissionWithHttpInfo",
|
|
2718
|
+
value: function validateSubmissionWithHttpInfo(template_id, body, opts) {
|
|
2719
|
+
opts = opts || {};
|
|
2720
|
+
var postBody = body;
|
|
2721
|
+
// verify the required parameter 'template_id' is set
|
|
2722
|
+
if (template_id === undefined || template_id === null) {
|
|
2723
|
+
throw new Error("Missing the required parameter 'template_id' when calling validateSubmission");
|
|
2724
|
+
}
|
|
2725
|
+
// verify the required parameter 'body' is set
|
|
2726
|
+
if (body === undefined || body === null) {
|
|
2727
|
+
throw new Error("Missing the required parameter 'body' when calling validateSubmission");
|
|
2728
|
+
}
|
|
2729
|
+
var pathParams = {
|
|
2730
|
+
'template_id': template_id
|
|
2731
|
+
};
|
|
2732
|
+
var queryParams = {
|
|
2733
|
+
'version': opts['version']
|
|
2734
|
+
};
|
|
2735
|
+
var headerParams = {};
|
|
2736
|
+
var formParams = {};
|
|
2737
|
+
var authNames = ['api_token_basic'];
|
|
2738
|
+
var contentTypes = ['application/json'];
|
|
2739
|
+
var accepts = ['application/json'];
|
|
2740
|
+
var returnType = _SubmissionValidation["default"];
|
|
2741
|
+
return this.apiClient.callApi('/templates/{template_id}/submissions/validate', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
/**
|
|
2745
|
+
* Check a submission without creating it
|
|
2746
|
+
* Checks a submission as creating it would (its data against the template's fields, its settings and signature requests) without saving it, generating anything or using credits. It doesn't check your account's credits. The response says whether the submission is valid, and if not, has the error that creating it would return.
|
|
2747
|
+
* @param {String} template_id The template's ID.
|
|
2748
|
+
* @param {module:model/ValidateSubmissionRequest} body The submission's data and settings.
|
|
2749
|
+
* @param {Object} opts Optional parameters
|
|
2750
|
+
* @param {String} opts.version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
2751
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionValidation}
|
|
2752
|
+
*/
|
|
2753
|
+
}, {
|
|
2754
|
+
key: "validateSubmission",
|
|
2755
|
+
value: function validateSubmission(template_id, body, opts) {
|
|
2756
|
+
return this.validateSubmissionWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2757
|
+
return response_and_data.data;
|
|
2758
|
+
});
|
|
1911
2759
|
}
|
|
1912
2760
|
}]);
|
|
1913
2761
|
}();
|