docspring 3.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +79 -19
- package/README.md +65 -63
- package/dist/ApiClient.js +62 -27
- package/dist/RequestSchemas.js +2297 -0
- package/dist/RequestValidator.js +494 -0
- package/dist/api/Client.js +1345 -946
- package/dist/index.js +655 -151
- package/dist/model/AiFieldNamingLanguage.js +64 -0
- package/dist/model/{AddFieldsData.js → AuthenticationCheck.js} +31 -31
- 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} +26 -26
- package/dist/model/CombinedPdfList.js +132 -0
- package/dist/model/{SubmissionDataRequestToken.js → CombinedPdfSource.js} +55 -52
- package/dist/model/CombinedPdfSourceInput.js +270 -0
- package/dist/model/{SuccessErrorResponse.js → CombinedPdfSourcePdf.js} +41 -55
- package/dist/model/CombinedPdfSourceType.js +74 -0
- package/dist/model/CombinedPdfState.js +74 -0
- package/dist/model/{CopyTemplateOptions.js → CopyTemplateRequest.js} +25 -21
- package/dist/model/{CombinePdfsData.js → CreateCombinedPdfRequest.js} +68 -52
- package/dist/model/{CreateCustomFileData.js → CreateCustomFileFromUploadRequest.js} +24 -22
- package/dist/model/{CreateFolderData.js → CreateFolderRequest.js} +46 -27
- package/dist/model/{CreateSubmissionDataRequestEventRequest.js → CreateSignatureRequestEventRequest.js} +41 -137
- package/dist/model/CreateSignatureRequestTokenRequest.js +88 -0
- package/dist/model/{CreatePdfSubmissionData.js → CreateSubmissionBatchRequest.js} +63 -87
- package/dist/model/CreateSubmissionRequest.js +212 -0
- package/dist/model/CreateTemplateRequest.js +545 -0
- package/dist/model/CreateWebhookRequest.js +234 -0
- package/dist/model/CustomFile.js +66 -15
- package/dist/model/CustomFileList.js +132 -0
- package/dist/model/CustomFileSourcePdf.js +130 -0
- package/dist/model/ErrorCode.js +154 -0
- package/dist/model/{BatchGeneratePdfs201Response.js → ErrorDetail.js} +65 -76
- package/dist/model/ErrorInfo.js +211 -0
- package/dist/model/ErrorResponse.js +11 -40
- package/dist/model/ExpirationInterval.js +64 -0
- package/dist/model/{CreateSubmissionResponse.js → FieldComparisonCondition.js} +46 -64
- package/dist/model/FieldComparisonOperator.js +69 -0
- package/dist/model/FieldDisplayType.js +79 -0
- package/dist/model/FieldEqualsCondition.js +137 -0
- package/dist/model/FieldEqualsOperator.js +59 -0
- package/dist/model/FieldInCondition.js +145 -0
- package/dist/model/FieldOverride.js +722 -0
- package/dist/model/{MultipleErrorsResponse.js → FieldPresenceCondition.js} +39 -54
- package/dist/model/FieldPresenceOperator.js +59 -0
- package/dist/model/FieldRangeCondition.js +148 -0
- package/dist/model/FieldReimportState.js +69 -0
- package/dist/model/FieldSetupLogic.js +59 -0
- package/dist/model/FieldSetupNaming.js +59 -0
- package/dist/model/FieldSetupSource.js +64 -0
- package/dist/model/Folder.js +37 -10
- package/dist/model/FolderList.js +132 -0
- package/dist/model/GeneratedFile.js +214 -0
- package/dist/model/GeneratedFileState.js +64 -0
- package/dist/model/HtmlEngineOptions.js +230 -0
- package/dist/model/HtmlEngineOptionsInput.js +193 -0
- package/dist/model/ImageGravity.js +94 -0
- package/dist/model/ImageScaleType.js +64 -0
- package/dist/model/ModelCodeLanguage.js +94 -0
- package/dist/model/{UpdatePdfTemplate.js → MoveFolderRequest.js} +33 -27
- package/dist/model/{MoveTemplateData.js → MoveTemplateRequest.js} +24 -34
- package/dist/model/NumberConditionType.js +79 -0
- package/dist/model/PageFormat.js +114 -0
- package/dist/model/{PublishVersionData.js → PublishTemplateVersionRequest.js} +32 -32
- package/dist/model/{RenameFolderData.js → RenameFolderRequest.js} +24 -22
- package/dist/model/{RestoreVersionData.js → RestoreTemplateVersionRequest.js} +24 -22
- package/dist/model/ShapeType.js +79 -0
- package/dist/model/{SubmissionDataRequestShow.js → SignatureRequest.js} +164 -239
- package/dist/model/SignatureRequestAuthSecondFactorType.js +79 -0
- package/dist/model/SignatureRequestAuthType.js +84 -0
- package/dist/model/{SubmissionDataRequestEvent.js → SignatureRequestEvent.js} +66 -148
- 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 +185 -339
- package/dist/model/SubmissionAction.js +29 -114
- package/dist/model/SubmissionActionState.js +69 -0
- package/dist/model/SubmissionActionType.js +84 -0
- package/dist/model/SubmissionBatch.js +73 -54
- package/dist/model/SubmissionBatchState.js +64 -0
- package/dist/model/SubmissionFiles.js +108 -0
- package/dist/model/SubmissionInput.js +204 -0
- package/dist/model/{ListSubmissionsResponse.js → SubmissionList.js} +34 -41
- package/dist/model/SubmissionSource.js +69 -0
- package/dist/model/SubmissionSourcePdf.js +130 -0
- package/dist/model/SubmissionState.js +114 -0
- package/dist/model/Template.js +309 -572
- package/dist/model/TemplateActor.js +171 -0
- package/dist/model/TemplateActorType.js +64 -0
- package/dist/model/TemplateDefaults.js +307 -0
- package/dist/model/TemplateDefaultsInput.js +305 -0
- package/dist/model/TemplateDocument.js +280 -0
- package/dist/model/TemplateDocumentState.js +74 -0
- package/dist/model/TemplateFieldDependency.js +184 -0
- package/dist/model/TemplateFieldDependencyAction.js +64 -0
- package/dist/model/{CreateCombinedSubmissionResponse.js → TemplateFieldDependencyCondition.js} +50 -61
- package/dist/model/TemplateFieldDependencyConditionInput.js +304 -0
- package/dist/model/TemplateFieldDependencyInput.js +182 -0
- package/dist/model/TemplateFieldDependencyMatch.js +59 -0
- package/dist/model/TemplateFieldDependencyOperator.js +99 -0
- package/dist/model/TemplateFieldLogicStatus.js +74 -0
- package/dist/model/TemplateFormMode.js +64 -0
- package/dist/model/{TemplateModelCodeResponse.js → TemplateModelCode.js} +33 -85
- package/dist/model/TemplatePageAiError.js +69 -0
- package/dist/model/TemplatePageAiNamingStatus.js +59 -0
- package/dist/model/TemplatePageFieldsStatus.js +74 -0
- package/dist/model/TemplatePageImageStatus.js +59 -0
- package/dist/model/TemplatePageProcessingStatus.js +162 -0
- package/dist/model/{SubmissionBatchData.js → TemplateSourcePdf.js} +49 -49
- package/dist/model/TemplateSummary.js +560 -0
- package/dist/model/{SuccessMultipleErrorsResponse.js → TemplateSummaryList.js} +43 -55
- package/dist/model/TemplateType.js +59 -0
- package/dist/model/{Submission422Response.js → TemplateVersion.js} +59 -62
- 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/{ErrorOrMultipleErrorsResponse.js → UpdateTemplateDocumentRequest.js} +43 -60
- package/dist/model/UpdateTemplateRequest.js +450 -0
- package/dist/model/UpdateWebhookRequest.js +209 -0
- package/dist/model/UploadMethod.js +54 -0
- package/dist/model/{UploadPresignResponse.js → UploadPresign.js} +52 -57
- package/dist/model/UrlSourcePdf.js +130 -0
- package/dist/model/Webhook.js +57 -72
- 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/CombinedSubmission.js +0 -308
- package/dist/model/CombinedSubmissionAction.js +0 -268
- package/dist/model/CreateCustomFileResponse.js +0 -155
- package/dist/model/CreateHtmlTemplate.js +0 -108
- package/dist/model/CreatePdfTemplate.js +0 -108
- package/dist/model/CreateSubmissionDataRequestData.js +0 -314
- package/dist/model/CreateSubmissionDataRequestEventResponse.js +0 -155
- package/dist/model/CreateSubmissionDataRequestResponse.js +0 -155
- package/dist/model/CreateSubmissionDataRequestTokenResponse.js +0 -155
- package/dist/model/CreateWebhookData.js +0 -108
- 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 -504
- package/dist/model/TemplateAddFieldsResponse.js +0 -156
- package/dist/model/TemplateDeleteResponse.js +0 -168
- package/dist/model/TemplatePreview.js +0 -796
- package/dist/model/TemplatePublishVersionResponse.js +0 -154
- 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,55 +5,53 @@ 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 _CreateSubmissionResponse = _interopRequireDefault(require("../model/CreateSubmissionResponse"));
|
|
25
|
-
var _CreateWebhookData = _interopRequireDefault(require("../model/CreateWebhookData"));
|
|
26
|
-
var _ErrorOrMultipleErrorsResponse = _interopRequireDefault(require("../model/ErrorOrMultipleErrorsResponse"));
|
|
8
|
+
var _AiFieldNamingLanguage = _interopRequireDefault(require("../model/AiFieldNamingLanguage"));
|
|
9
|
+
var _AuthenticationCheck = _interopRequireDefault(require("../model/AuthenticationCheck"));
|
|
10
|
+
var _CombinedPdf = _interopRequireDefault(require("../model/CombinedPdf"));
|
|
11
|
+
var _CombinedPdfList = _interopRequireDefault(require("../model/CombinedPdfList"));
|
|
12
|
+
var _CopyTemplateRequest = _interopRequireDefault(require("../model/CopyTemplateRequest"));
|
|
13
|
+
var _CreateCombinedPdfRequest = _interopRequireDefault(require("../model/CreateCombinedPdfRequest"));
|
|
14
|
+
var _CreateCustomFileFromUploadRequest = _interopRequireDefault(require("../model/CreateCustomFileFromUploadRequest"));
|
|
15
|
+
var _CreateFolderRequest = _interopRequireDefault(require("../model/CreateFolderRequest"));
|
|
16
|
+
var _CreateSignatureRequestEventRequest = _interopRequireDefault(require("../model/CreateSignatureRequestEventRequest"));
|
|
17
|
+
var _CreateSignatureRequestTokenRequest = _interopRequireDefault(require("../model/CreateSignatureRequestTokenRequest"));
|
|
18
|
+
var _CreateSubmissionBatchRequest = _interopRequireDefault(require("../model/CreateSubmissionBatchRequest"));
|
|
19
|
+
var _CreateSubmissionRequest = _interopRequireDefault(require("../model/CreateSubmissionRequest"));
|
|
20
|
+
var _CreateTemplateRequest = _interopRequireDefault(require("../model/CreateTemplateRequest"));
|
|
21
|
+
var _CreateWebhookRequest = _interopRequireDefault(require("../model/CreateWebhookRequest"));
|
|
22
|
+
var _CustomFile = _interopRequireDefault(require("../model/CustomFile"));
|
|
23
|
+
var _CustomFileList = _interopRequireDefault(require("../model/CustomFileList"));
|
|
27
24
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
25
|
+
var _FieldSetupLogic = _interopRequireDefault(require("../model/FieldSetupLogic"));
|
|
26
|
+
var _FieldSetupNaming = _interopRequireDefault(require("../model/FieldSetupNaming"));
|
|
27
|
+
var _FieldSetupSource = _interopRequireDefault(require("../model/FieldSetupSource"));
|
|
28
28
|
var _Folder = _interopRequireDefault(require("../model/Folder"));
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
29
|
+
var _FolderList = _interopRequireDefault(require("../model/FolderList"));
|
|
30
|
+
var _ModelCodeLanguage = _interopRequireDefault(require("../model/ModelCodeLanguage"));
|
|
31
|
+
var _MoveFolderRequest = _interopRequireDefault(require("../model/MoveFolderRequest"));
|
|
32
|
+
var _MoveTemplateRequest = _interopRequireDefault(require("../model/MoveTemplateRequest"));
|
|
33
|
+
var _PublishTemplateVersionRequest = _interopRequireDefault(require("../model/PublishTemplateVersionRequest"));
|
|
34
|
+
var _RenameFolderRequest = _interopRequireDefault(require("../model/RenameFolderRequest"));
|
|
35
|
+
var _RestoreTemplateVersionRequest = _interopRequireDefault(require("../model/RestoreTemplateVersionRequest"));
|
|
36
|
+
var _SignatureRequest = _interopRequireDefault(require("../model/SignatureRequest"));
|
|
37
|
+
var _SignatureRequestEvent = _interopRequireDefault(require("../model/SignatureRequestEvent"));
|
|
38
|
+
var _SignatureRequestToken = _interopRequireDefault(require("../model/SignatureRequestToken"));
|
|
37
39
|
var _Submission = _interopRequireDefault(require("../model/Submission"));
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var _SubmissionBatchWithSubmissions = _interopRequireDefault(require("../model/SubmissionBatchWithSubmissions"));
|
|
41
|
-
var _SubmissionDataRequestShow = _interopRequireDefault(require("../model/SubmissionDataRequestShow"));
|
|
42
|
-
var _SubmissionPreview = _interopRequireDefault(require("../model/SubmissionPreview"));
|
|
43
|
-
var _SuccessErrorResponse = _interopRequireDefault(require("../model/SuccessErrorResponse"));
|
|
44
|
-
var _SuccessMultipleErrorsResponse = _interopRequireDefault(require("../model/SuccessMultipleErrorsResponse"));
|
|
40
|
+
var _SubmissionBatch = _interopRequireDefault(require("../model/SubmissionBatch"));
|
|
41
|
+
var _SubmissionList = _interopRequireDefault(require("../model/SubmissionList"));
|
|
45
42
|
var _Template = _interopRequireDefault(require("../model/Template"));
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var _UpdateWebhookData = _interopRequireDefault(require("../model/UpdateWebhookData"));
|
|
55
|
-
var _UploadPresignResponse = _interopRequireDefault(require("../model/UploadPresignResponse"));
|
|
43
|
+
var _TemplateModelCode = _interopRequireDefault(require("../model/TemplateModelCode"));
|
|
44
|
+
var _TemplateSummaryList = _interopRequireDefault(require("../model/TemplateSummaryList"));
|
|
45
|
+
var _TemplateVersion = _interopRequireDefault(require("../model/TemplateVersion"));
|
|
46
|
+
var _UpdateSignatureRequestRequest = _interopRequireDefault(require("../model/UpdateSignatureRequestRequest"));
|
|
47
|
+
var _UpdateTemplateDocumentRequest = _interopRequireDefault(require("../model/UpdateTemplateDocumentRequest"));
|
|
48
|
+
var _UpdateTemplateRequest = _interopRequireDefault(require("../model/UpdateTemplateRequest"));
|
|
49
|
+
var _UpdateWebhookRequest = _interopRequireDefault(require("../model/UpdateWebhookRequest"));
|
|
50
|
+
var _UploadPresign = _interopRequireDefault(require("../model/UploadPresign"));
|
|
56
51
|
var _Webhook = _interopRequireDefault(require("../model/Webhook"));
|
|
52
|
+
var _WebhookEventType = _interopRequireDefault(require("../model/WebhookEventType"));
|
|
53
|
+
var _WebhookList = _interopRequireDefault(require("../model/WebhookList"));
|
|
54
|
+
var _WebhookMode = _interopRequireDefault(require("../model/WebhookMode"));
|
|
57
55
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
58
56
|
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); }
|
|
59
57
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -64,7 +62,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
64
62
|
* DocSpring API
|
|
65
63
|
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
66
64
|
*
|
|
67
|
-
* The version of the OpenAPI document:
|
|
65
|
+
* The version of the OpenAPI document: v2
|
|
68
66
|
*
|
|
69
67
|
*
|
|
70
68
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -75,7 +73,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
75
73
|
/**
|
|
76
74
|
* Client service.
|
|
77
75
|
* @module api/Client
|
|
78
|
-
* @version
|
|
76
|
+
* @version 4.0.0
|
|
79
77
|
*/
|
|
80
78
|
var Client = exports["default"] = /*#__PURE__*/function () {
|
|
81
79
|
/**
|
|
@@ -92,13 +90,23 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
92
90
|
if (options && options.constructor && options.constructor.name === 'ApiClient') {
|
|
93
91
|
this.apiClient = options;
|
|
94
92
|
} else {
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
// A client given credentials, a host or a region gets its own ApiClient, so two clients don't change each
|
|
94
|
+
// other's. Without them it uses the shared ApiClient.instance.
|
|
95
|
+
var ownApiClient = ['apiTokenId', 'apiTokenSecret', 'host', 'region'].some(function (key) {
|
|
96
|
+
return options[key] !== undefined;
|
|
97
|
+
});
|
|
98
|
+
var apiClient = options.apiClient || (ownApiClient ? new _ApiClient["default"]() : _ApiClient["default"].instance);
|
|
97
99
|
var env = typeof process !== 'undefined' && process.env ? process.env : {};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
|
|
101
|
+
// Use the credentials passed in, or the environment variables. An empty string counts as not set.
|
|
102
|
+
var apiTokenId = options.apiTokenId || env.DOCSPRING_TOKEN_ID || null;
|
|
103
|
+
var apiTokenSecret = options.apiTokenSecret || env.DOCSPRING_TOKEN_SECRET || null;
|
|
104
|
+
|
|
105
|
+
// Without credentials the client is still created, and the API's 401 response says what's missing
|
|
106
|
+
if (apiTokenId != null) {
|
|
101
107
|
apiClient.authentications['api_token_basic'].username = apiTokenId;
|
|
108
|
+
}
|
|
109
|
+
if (apiTokenSecret != null) {
|
|
102
110
|
apiClient.authentications['api_token_basic'].password = apiTokenSecret;
|
|
103
111
|
}
|
|
104
112
|
|
|
@@ -113,7 +121,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
113
121
|
var url = String(host).trim();
|
|
114
122
|
if (!/^https?:\/\//i.test(url)) url = "https://".concat(url);
|
|
115
123
|
url = url.replace(/\/+$/, '');
|
|
116
|
-
|
|
124
|
+
// Any API version's path (such as /api/v1 from a 3.x setup) becomes /api/v2
|
|
125
|
+
url = "".concat(url.replace(/\/api\/v\d+$/i, ''), "/api/v2");
|
|
117
126
|
apiClient.basePath = url;
|
|
118
127
|
}
|
|
119
128
|
this.apiClient = apiClient;
|
|
@@ -121,32 +130,21 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
121
130
|
}
|
|
122
131
|
|
|
123
132
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* @param {String}
|
|
127
|
-
* @param {
|
|
128
|
-
* @param {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Add new fields to a Template
|
|
133
|
-
* Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.
|
|
134
|
-
* @param {String} template_id
|
|
135
|
-
* @param {module:model/AddFieldsData} data
|
|
136
|
-
* @param {module:api/Client~addFieldsToTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
137
|
-
* data is of type: {@link module:model/TemplateAddFieldsResponse}
|
|
133
|
+
* Copy a template
|
|
134
|
+
* Copies a template (its draft, or a published version) into a new template.
|
|
135
|
+
* @param {String} template_id The template's ID.
|
|
136
|
+
* @param {Object} opts Optional parameters
|
|
137
|
+
* @param {module:model/CopyTemplateRequest} [body] Settings for the copy.
|
|
138
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
138
139
|
*/
|
|
139
140
|
return _createClass(Client, [{
|
|
140
|
-
key: "
|
|
141
|
-
value: function
|
|
142
|
-
|
|
141
|
+
key: "copyTemplateWithHttpInfo",
|
|
142
|
+
value: function copyTemplateWithHttpInfo(template_id, opts) {
|
|
143
|
+
opts = opts || {};
|
|
144
|
+
var postBody = opts['body'];
|
|
143
145
|
// verify the required parameter 'template_id' is set
|
|
144
146
|
if (template_id === undefined || template_id === null) {
|
|
145
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
146
|
-
}
|
|
147
|
-
// verify the required parameter 'data' is set
|
|
148
|
-
if (data === undefined || data === null) {
|
|
149
|
-
throw new Error("Missing the required parameter 'data' when calling addFieldsToTemplate");
|
|
147
|
+
throw new Error("Missing the required parameter 'template_id' when calling copyTemplate");
|
|
150
148
|
}
|
|
151
149
|
var pathParams = {
|
|
152
150
|
'template_id': template_id
|
|
@@ -157,35 +155,42 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
157
155
|
var authNames = ['api_token_basic'];
|
|
158
156
|
var contentTypes = ['application/json'];
|
|
159
157
|
var accepts = ['application/json'];
|
|
160
|
-
var returnType =
|
|
161
|
-
return this.apiClient.callApi('/templates/{template_id}/
|
|
158
|
+
var returnType = _Template["default"];
|
|
159
|
+
return this.apiClient.callApi('/templates/{template_id}/copy', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
162
160
|
}
|
|
163
161
|
|
|
164
162
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* @param {String}
|
|
168
|
-
* @param {
|
|
169
|
-
* @param {
|
|
163
|
+
* Copy a template
|
|
164
|
+
* Copies a template (its draft, or a published version) into a new template.
|
|
165
|
+
* @param {String} template_id The template's ID.
|
|
166
|
+
* @param {Object} opts Optional parameters
|
|
167
|
+
* @param {module:model/CopyTemplateRequest} opts.body Settings for the copy.
|
|
168
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
170
169
|
*/
|
|
170
|
+
}, {
|
|
171
|
+
key: "copyTemplate",
|
|
172
|
+
value: function copyTemplate(template_id, opts) {
|
|
173
|
+
return this.copyTemplateWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
174
|
+
return response_and_data.data;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
171
177
|
|
|
172
178
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* @param {module:model/
|
|
179
|
+
* Combine PDFs
|
|
180
|
+
* 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.
|
|
181
|
+
* @param {module:model/CreateCombinedPdfRequest} body The PDFs to merge, and the combined PDF's settings.
|
|
176
182
|
* @param {Object} opts Optional parameters
|
|
177
|
-
* @param {Boolean} [wait
|
|
178
|
-
* @
|
|
179
|
-
* data is of type: {@link module:model/BatchGeneratePdfs201Response}
|
|
183
|
+
* @param {Boolean} [wait] Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
184
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
180
185
|
*/
|
|
181
186
|
}, {
|
|
182
|
-
key: "
|
|
183
|
-
value: function
|
|
187
|
+
key: "createCombinedPdfWithHttpInfo",
|
|
188
|
+
value: function createCombinedPdfWithHttpInfo(body, opts) {
|
|
184
189
|
opts = opts || {};
|
|
185
|
-
var postBody =
|
|
186
|
-
// verify the required parameter '
|
|
187
|
-
if (
|
|
188
|
-
throw new Error("Missing the required parameter '
|
|
190
|
+
var postBody = body;
|
|
191
|
+
// verify the required parameter 'body' is set
|
|
192
|
+
if (body === undefined || body === null) {
|
|
193
|
+
throw new Error("Missing the required parameter 'body' when calling createCombinedPdf");
|
|
189
194
|
}
|
|
190
195
|
var pathParams = {};
|
|
191
196
|
var queryParams = {
|
|
@@ -196,32 +201,39 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
196
201
|
var authNames = ['api_token_basic'];
|
|
197
202
|
var contentTypes = ['application/json'];
|
|
198
203
|
var accepts = ['application/json'];
|
|
199
|
-
var returnType =
|
|
200
|
-
return this.apiClient.callApi('/
|
|
204
|
+
var returnType = _CombinedPdf["default"];
|
|
205
|
+
return this.apiClient.callApi('/combined_pdfs', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
201
206
|
}
|
|
202
207
|
|
|
203
208
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* @param {
|
|
207
|
-
* @param {
|
|
208
|
-
* @param {
|
|
209
|
+
* Combine PDFs
|
|
210
|
+
* 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.
|
|
211
|
+
* @param {module:model/CreateCombinedPdfRequest} body The PDFs to merge, and the combined PDF's settings.
|
|
212
|
+
* @param {Object} opts Optional parameters
|
|
213
|
+
* @param {Boolean} opts.wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
214
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
209
215
|
*/
|
|
216
|
+
}, {
|
|
217
|
+
key: "createCombinedPdf",
|
|
218
|
+
value: function createCombinedPdf(body, opts) {
|
|
219
|
+
return this.createCombinedPdfWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
220
|
+
return response_and_data.data;
|
|
221
|
+
});
|
|
222
|
+
}
|
|
210
223
|
|
|
211
224
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* @param {module:model/
|
|
215
|
-
* @
|
|
216
|
-
* data is of type: {@link module:model/CreateCombinedSubmissionResponse}
|
|
225
|
+
* Create a custom file from an upload
|
|
226
|
+
* 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`.
|
|
227
|
+
* @param {module:model/CreateCustomFileFromUploadRequest} body The uploaded file to create the custom file from.
|
|
228
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
217
229
|
*/
|
|
218
230
|
}, {
|
|
219
|
-
key: "
|
|
220
|
-
value: function
|
|
221
|
-
var postBody =
|
|
222
|
-
// verify the required parameter '
|
|
223
|
-
if (
|
|
224
|
-
throw new Error("Missing the required parameter '
|
|
231
|
+
key: "createCustomFileFromUploadWithHttpInfo",
|
|
232
|
+
value: function createCustomFileFromUploadWithHttpInfo(body) {
|
|
233
|
+
var postBody = body;
|
|
234
|
+
// verify the required parameter 'body' is set
|
|
235
|
+
if (body === undefined || body === null) {
|
|
236
|
+
throw new Error("Missing the required parameter 'body' when calling createCustomFileFromUpload");
|
|
225
237
|
}
|
|
226
238
|
var pathParams = {};
|
|
227
239
|
var queryParams = {};
|
|
@@ -230,113 +242,129 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
230
242
|
var authNames = ['api_token_basic'];
|
|
231
243
|
var contentTypes = ['application/json'];
|
|
232
244
|
var accepts = ['application/json'];
|
|
233
|
-
var returnType =
|
|
234
|
-
return this.apiClient.callApi('/
|
|
245
|
+
var returnType = _CustomFile["default"];
|
|
246
|
+
return this.apiClient.callApi('/custom_files', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
235
247
|
}
|
|
236
248
|
|
|
237
249
|
/**
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
* @param {
|
|
241
|
-
* @
|
|
242
|
-
* @param {String} response The complete HTTP response.
|
|
250
|
+
* Create a custom file from an upload
|
|
251
|
+
* 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`.
|
|
252
|
+
* @param {module:model/CreateCustomFileFromUploadRequest} body The uploaded file to create the custom file from.
|
|
253
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
243
254
|
*/
|
|
255
|
+
}, {
|
|
256
|
+
key: "createCustomFileFromUpload",
|
|
257
|
+
value: function createCustomFileFromUpload(body) {
|
|
258
|
+
return this.createCustomFileFromUploadWithHttpInfo(body).then(function (response_and_data) {
|
|
259
|
+
return response_and_data.data;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
244
262
|
|
|
245
263
|
/**
|
|
246
|
-
*
|
|
247
|
-
* Creates a
|
|
248
|
-
* @param {
|
|
249
|
-
* @
|
|
250
|
-
* @param {module:model/CopyTemplateOptions} [options]
|
|
251
|
-
* @param {module:api/Client~copyTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
252
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
264
|
+
* Create a folder
|
|
265
|
+
* Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
266
|
+
* @param {module:model/CreateFolderRequest} body The folder to create.
|
|
267
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
253
268
|
*/
|
|
254
269
|
}, {
|
|
255
|
-
key: "
|
|
256
|
-
value: function
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
throw new Error("Missing the required parameter 'template_id' when calling copyTemplate");
|
|
270
|
+
key: "createFolderWithHttpInfo",
|
|
271
|
+
value: function createFolderWithHttpInfo(body) {
|
|
272
|
+
var postBody = body;
|
|
273
|
+
// verify the required parameter 'body' is set
|
|
274
|
+
if (body === undefined || body === null) {
|
|
275
|
+
throw new Error("Missing the required parameter 'body' when calling createFolder");
|
|
262
276
|
}
|
|
263
|
-
var pathParams = {
|
|
264
|
-
'template_id': template_id
|
|
265
|
-
};
|
|
277
|
+
var pathParams = {};
|
|
266
278
|
var queryParams = {};
|
|
267
279
|
var headerParams = {};
|
|
268
280
|
var formParams = {};
|
|
269
281
|
var authNames = ['api_token_basic'];
|
|
270
282
|
var contentTypes = ['application/json'];
|
|
271
283
|
var accepts = ['application/json'];
|
|
272
|
-
var returnType =
|
|
273
|
-
return this.apiClient.callApi('/
|
|
284
|
+
var returnType = _Folder["default"];
|
|
285
|
+
return this.apiClient.callApi('/folders', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
274
286
|
}
|
|
275
287
|
|
|
276
288
|
/**
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
* @param {
|
|
280
|
-
* @
|
|
281
|
-
* @param {String} response The complete HTTP response.
|
|
289
|
+
* Create a folder
|
|
290
|
+
* Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
291
|
+
* @param {module:model/CreateFolderRequest} body The folder to create.
|
|
292
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
282
293
|
*/
|
|
294
|
+
}, {
|
|
295
|
+
key: "createFolder",
|
|
296
|
+
value: function createFolder(body) {
|
|
297
|
+
return this.createFolderWithHttpInfo(body).then(function (response_and_data) {
|
|
298
|
+
return response_and_data.data;
|
|
299
|
+
});
|
|
300
|
+
}
|
|
283
301
|
|
|
284
302
|
/**
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
* @param {
|
|
288
|
-
* @param {module:
|
|
289
|
-
* data
|
|
303
|
+
* Record a signature request event
|
|
304
|
+
* 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.
|
|
305
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
306
|
+
* @param {module:model/CreateSignatureRequestEventRequest} body The event to record.
|
|
307
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequestEvent} and HTTP response
|
|
290
308
|
*/
|
|
291
309
|
}, {
|
|
292
|
-
key: "
|
|
293
|
-
value: function
|
|
294
|
-
var postBody =
|
|
295
|
-
// verify the required parameter '
|
|
296
|
-
if (
|
|
297
|
-
throw new Error("Missing the required parameter '
|
|
310
|
+
key: "createSignatureRequestEventWithHttpInfo",
|
|
311
|
+
value: function createSignatureRequestEventWithHttpInfo(signature_request_id, body) {
|
|
312
|
+
var postBody = body;
|
|
313
|
+
// verify the required parameter 'signature_request_id' is set
|
|
314
|
+
if (signature_request_id === undefined || signature_request_id === null) {
|
|
315
|
+
throw new Error("Missing the required parameter 'signature_request_id' when calling createSignatureRequestEvent");
|
|
298
316
|
}
|
|
299
|
-
|
|
317
|
+
// verify the required parameter 'body' is set
|
|
318
|
+
if (body === undefined || body === null) {
|
|
319
|
+
throw new Error("Missing the required parameter 'body' when calling createSignatureRequestEvent");
|
|
320
|
+
}
|
|
321
|
+
var pathParams = {
|
|
322
|
+
'signature_request_id': signature_request_id
|
|
323
|
+
};
|
|
300
324
|
var queryParams = {};
|
|
301
325
|
var headerParams = {};
|
|
302
326
|
var formParams = {};
|
|
303
327
|
var authNames = ['api_token_basic'];
|
|
304
328
|
var contentTypes = ['application/json'];
|
|
305
329
|
var accepts = ['application/json'];
|
|
306
|
-
var returnType =
|
|
307
|
-
return this.apiClient.callApi('/
|
|
330
|
+
var returnType = _SignatureRequestEvent["default"];
|
|
331
|
+
return this.apiClient.callApi('/signature_requests/{signature_request_id}/events', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
308
332
|
}
|
|
309
333
|
|
|
310
334
|
/**
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
* @param {String}
|
|
314
|
-
* @param {module:model/
|
|
315
|
-
* @
|
|
335
|
+
* Record a signature request event
|
|
336
|
+
* 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.
|
|
337
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
338
|
+
* @param {module:model/CreateSignatureRequestEventRequest} body The event to record.
|
|
339
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequestEvent}
|
|
316
340
|
*/
|
|
341
|
+
}, {
|
|
342
|
+
key: "createSignatureRequestEvent",
|
|
343
|
+
value: function createSignatureRequestEvent(signature_request_id, body) {
|
|
344
|
+
return this.createSignatureRequestEventWithHttpInfo(signature_request_id, body).then(function (response_and_data) {
|
|
345
|
+
return response_and_data.data;
|
|
346
|
+
});
|
|
347
|
+
}
|
|
317
348
|
|
|
318
349
|
/**
|
|
319
|
-
* Create a
|
|
320
|
-
*
|
|
321
|
-
* @param {String}
|
|
322
|
-
* @param {
|
|
323
|
-
* @param {module:
|
|
324
|
-
* data
|
|
350
|
+
* Create a signature request token
|
|
351
|
+
* 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.
|
|
352
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
353
|
+
* @param {Object} opts Optional parameters
|
|
354
|
+
* @param {module:model/CreateSignatureRequestTokenRequest} [body] The kind of link to make. Send no body for an `api` token.
|
|
355
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequestToken} and HTTP response
|
|
325
356
|
*/
|
|
326
357
|
}, {
|
|
327
|
-
key: "
|
|
328
|
-
value: function
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
// verify the required parameter 'event' is set
|
|
335
|
-
if (event === undefined || event === null) {
|
|
336
|
-
throw new Error("Missing the required parameter 'event' when calling createDataRequestEvent");
|
|
358
|
+
key: "createSignatureRequestTokenWithHttpInfo",
|
|
359
|
+
value: function createSignatureRequestTokenWithHttpInfo(signature_request_id, opts) {
|
|
360
|
+
opts = opts || {};
|
|
361
|
+
var postBody = opts['body'];
|
|
362
|
+
// verify the required parameter 'signature_request_id' is set
|
|
363
|
+
if (signature_request_id === undefined || signature_request_id === null) {
|
|
364
|
+
throw new Error("Missing the required parameter 'signature_request_id' when calling createSignatureRequestToken");
|
|
337
365
|
}
|
|
338
366
|
var pathParams = {
|
|
339
|
-
'
|
|
367
|
+
'signature_request_id': signature_request_id
|
|
340
368
|
};
|
|
341
369
|
var queryParams = {};
|
|
342
370
|
var headerParams = {};
|
|
@@ -344,192 +372,188 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
344
372
|
var authNames = ['api_token_basic'];
|
|
345
373
|
var contentTypes = ['application/json'];
|
|
346
374
|
var accepts = ['application/json'];
|
|
347
|
-
var returnType =
|
|
348
|
-
return this.apiClient.callApi('/
|
|
375
|
+
var returnType = _SignatureRequestToken["default"];
|
|
376
|
+
return this.apiClient.callApi('/signature_requests/{signature_request_id}/tokens', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
349
377
|
}
|
|
350
378
|
|
|
351
379
|
/**
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
* @param {String}
|
|
355
|
-
* @param {
|
|
356
|
-
* @param {
|
|
380
|
+
* Create a signature request token
|
|
381
|
+
* 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.
|
|
382
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
383
|
+
* @param {Object} opts Optional parameters
|
|
384
|
+
* @param {module:model/CreateSignatureRequestTokenRequest} opts.body The kind of link to make. Send no body for an `api` token.
|
|
385
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequestToken}
|
|
357
386
|
*/
|
|
387
|
+
}, {
|
|
388
|
+
key: "createSignatureRequestToken",
|
|
389
|
+
value: function createSignatureRequestToken(signature_request_id, opts) {
|
|
390
|
+
return this.createSignatureRequestTokenWithHttpInfo(signature_request_id, opts).then(function (response_and_data) {
|
|
391
|
+
return response_and_data.data;
|
|
392
|
+
});
|
|
393
|
+
}
|
|
358
394
|
|
|
359
395
|
/**
|
|
360
|
-
*
|
|
361
|
-
* Creates
|
|
362
|
-
* @param {String}
|
|
396
|
+
* Generate a PDF
|
|
397
|
+
* 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.
|
|
398
|
+
* @param {String} template_id The template's ID.
|
|
399
|
+
* @param {module:model/CreateSubmissionRequest} body The submission's data and settings.
|
|
363
400
|
* @param {Object} opts Optional parameters
|
|
364
|
-
* @param {
|
|
365
|
-
* @param {
|
|
366
|
-
* data
|
|
401
|
+
* @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).
|
|
402
|
+
* @param {Boolean} [wait] Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
403
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
367
404
|
*/
|
|
368
405
|
}, {
|
|
369
|
-
key: "
|
|
370
|
-
value: function
|
|
406
|
+
key: "createSubmissionWithHttpInfo",
|
|
407
|
+
value: function createSubmissionWithHttpInfo(template_id, body, opts) {
|
|
371
408
|
opts = opts || {};
|
|
372
|
-
var postBody =
|
|
373
|
-
// verify the required parameter '
|
|
374
|
-
if (
|
|
375
|
-
throw new Error("Missing the required parameter '
|
|
409
|
+
var postBody = body;
|
|
410
|
+
// verify the required parameter 'template_id' is set
|
|
411
|
+
if (template_id === undefined || template_id === null) {
|
|
412
|
+
throw new Error("Missing the required parameter 'template_id' when calling createSubmission");
|
|
413
|
+
}
|
|
414
|
+
// verify the required parameter 'body' is set
|
|
415
|
+
if (body === undefined || body === null) {
|
|
416
|
+
throw new Error("Missing the required parameter 'body' when calling createSubmission");
|
|
376
417
|
}
|
|
377
418
|
var pathParams = {
|
|
378
|
-
'
|
|
419
|
+
'template_id': template_id
|
|
379
420
|
};
|
|
380
421
|
var queryParams = {
|
|
381
|
-
'
|
|
422
|
+
'version': opts['version'],
|
|
423
|
+
'wait': opts['wait']
|
|
382
424
|
};
|
|
383
425
|
var headerParams = {};
|
|
384
426
|
var formParams = {};
|
|
385
427
|
var authNames = ['api_token_basic'];
|
|
386
|
-
var contentTypes = [];
|
|
428
|
+
var contentTypes = ['application/json'];
|
|
387
429
|
var accepts = ['application/json'];
|
|
388
|
-
var returnType =
|
|
389
|
-
return this.apiClient.callApi('/
|
|
430
|
+
var returnType = _Submission["default"];
|
|
431
|
+
return this.apiClient.callApi('/templates/{template_id}/submissions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
390
432
|
}
|
|
391
433
|
|
|
392
434
|
/**
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
* @param {String}
|
|
396
|
-
* @param {module:model/
|
|
397
|
-
* @param {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
* Create a folder
|
|
402
|
-
* Creates a new folder for organizing templates. Folders can be nested within other folders by providing a `parent_folder_id`. Folder names must be unique within the same parent.
|
|
403
|
-
* @param {module:model/CreateFolderData} data
|
|
404
|
-
* @param {module:api/Client~createFolderCallback} callback The callback function, accepting three arguments: error, data, response
|
|
405
|
-
* data is of type: {@link module:model/Folder}
|
|
435
|
+
* Generate a PDF
|
|
436
|
+
* 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.
|
|
437
|
+
* @param {String} template_id The template's ID.
|
|
438
|
+
* @param {module:model/CreateSubmissionRequest} body The submission's data and settings.
|
|
439
|
+
* @param {Object} opts Optional parameters
|
|
440
|
+
* @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).
|
|
441
|
+
* @param {Boolean} opts.wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
442
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
406
443
|
*/
|
|
407
444
|
}, {
|
|
408
|
-
key: "
|
|
409
|
-
value: function
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
throw new Error("Missing the required parameter 'data' when calling createFolder");
|
|
414
|
-
}
|
|
415
|
-
var pathParams = {};
|
|
416
|
-
var queryParams = {};
|
|
417
|
-
var headerParams = {};
|
|
418
|
-
var formParams = {};
|
|
419
|
-
var authNames = ['api_token_basic'];
|
|
420
|
-
var contentTypes = ['application/json'];
|
|
421
|
-
var accepts = ['application/json'];
|
|
422
|
-
var returnType = _Folder["default"];
|
|
423
|
-
return this.apiClient.callApi('/folders/', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
445
|
+
key: "createSubmission",
|
|
446
|
+
value: function createSubmission(template_id, body, opts) {
|
|
447
|
+
return this.createSubmissionWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
448
|
+
return response_and_data.data;
|
|
449
|
+
});
|
|
424
450
|
}
|
|
425
451
|
|
|
426
452
|
/**
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
* @param {
|
|
430
|
-
* @param {
|
|
431
|
-
* @param {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Create a new HTML template
|
|
436
|
-
* Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating. Allows complete control over PDF layout and styling. Supports headers, footers, and dynamic content using Liquid syntax for field values, conditions, loops, and filters.
|
|
437
|
-
* @param {module:model/CreateHtmlTemplate} data
|
|
438
|
-
* @param {module:api/Client~createHtmlTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
439
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
453
|
+
* Generate PDFs in a batch
|
|
454
|
+
* 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.
|
|
455
|
+
* @param {module:model/CreateSubmissionBatchRequest} body The submissions to create, and the settings they share.
|
|
456
|
+
* @param {Object} opts Optional parameters
|
|
457
|
+
* @param {Boolean} [wait] Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
458
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionBatch} and HTTP response
|
|
440
459
|
*/
|
|
441
460
|
}, {
|
|
442
|
-
key: "
|
|
443
|
-
value: function
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
461
|
+
key: "createSubmissionBatchWithHttpInfo",
|
|
462
|
+
value: function createSubmissionBatchWithHttpInfo(body, opts) {
|
|
463
|
+
opts = opts || {};
|
|
464
|
+
var postBody = body;
|
|
465
|
+
// verify the required parameter 'body' is set
|
|
466
|
+
if (body === undefined || body === null) {
|
|
467
|
+
throw new Error("Missing the required parameter 'body' when calling createSubmissionBatch");
|
|
448
468
|
}
|
|
449
469
|
var pathParams = {};
|
|
450
|
-
var queryParams = {
|
|
470
|
+
var queryParams = {
|
|
471
|
+
'wait': opts['wait']
|
|
472
|
+
};
|
|
451
473
|
var headerParams = {};
|
|
452
474
|
var formParams = {};
|
|
453
475
|
var authNames = ['api_token_basic'];
|
|
454
476
|
var contentTypes = ['application/json'];
|
|
455
477
|
var accepts = ['application/json'];
|
|
456
|
-
var returnType =
|
|
457
|
-
return this.apiClient.callApi('/
|
|
478
|
+
var returnType = _SubmissionBatch["default"];
|
|
479
|
+
return this.apiClient.callApi('/submissions/batches', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
458
480
|
}
|
|
459
481
|
|
|
460
482
|
/**
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
* @param {
|
|
464
|
-
* @param {
|
|
465
|
-
* @param {
|
|
483
|
+
* Generate PDFs in a batch
|
|
484
|
+
* 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.
|
|
485
|
+
* @param {module:model/CreateSubmissionBatchRequest} body The submissions to create, and the settings they share.
|
|
486
|
+
* @param {Object} opts Optional parameters
|
|
487
|
+
* @param {Boolean} opts.wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
488
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionBatch}
|
|
466
489
|
*/
|
|
490
|
+
}, {
|
|
491
|
+
key: "createSubmissionBatch",
|
|
492
|
+
value: function createSubmissionBatch(body, opts) {
|
|
493
|
+
return this.createSubmissionBatchWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
494
|
+
return response_and_data.data;
|
|
495
|
+
});
|
|
496
|
+
}
|
|
467
497
|
|
|
468
498
|
/**
|
|
469
|
-
* Create a
|
|
470
|
-
* Creates a
|
|
471
|
-
* @param {
|
|
472
|
-
* @param {String} template_name
|
|
499
|
+
* Create a template
|
|
500
|
+
* 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`.
|
|
501
|
+
* @param {module:model/CreateTemplateRequest} body The template to create.
|
|
473
502
|
* @param {Object} opts Optional parameters
|
|
474
|
-
* @param {Boolean} [wait
|
|
475
|
-
* @
|
|
476
|
-
* @param {String} [template_parent_folder_id]
|
|
477
|
-
* @param {module:api/Client~createPdfTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
478
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
503
|
+
* @param {Boolean} [wait] Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
504
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
479
505
|
*/
|
|
480
506
|
}, {
|
|
481
|
-
key: "
|
|
482
|
-
value: function
|
|
507
|
+
key: "createTemplateWithHttpInfo",
|
|
508
|
+
value: function createTemplateWithHttpInfo(body, opts) {
|
|
483
509
|
opts = opts || {};
|
|
484
|
-
var postBody =
|
|
485
|
-
// verify the required parameter '
|
|
486
|
-
if (
|
|
487
|
-
throw new Error("Missing the required parameter '
|
|
488
|
-
}
|
|
489
|
-
// verify the required parameter 'template_name' is set
|
|
490
|
-
if (template_name === undefined || template_name === null) {
|
|
491
|
-
throw new Error("Missing the required parameter 'template_name' when calling createPdfTemplate");
|
|
510
|
+
var postBody = body;
|
|
511
|
+
// verify the required parameter 'body' is set
|
|
512
|
+
if (body === undefined || body === null) {
|
|
513
|
+
throw new Error("Missing the required parameter 'body' when calling createTemplate");
|
|
492
514
|
}
|
|
493
515
|
var pathParams = {};
|
|
494
516
|
var queryParams = {
|
|
495
517
|
'wait': opts['wait']
|
|
496
518
|
};
|
|
497
519
|
var headerParams = {};
|
|
498
|
-
var formParams = {
|
|
499
|
-
'template[document]': template_document,
|
|
500
|
-
'template[name]': template_name,
|
|
501
|
-
'template[description]': opts['template_description'],
|
|
502
|
-
'template[parent_folder_id]': opts['template_parent_folder_id']
|
|
503
|
-
};
|
|
520
|
+
var formParams = {};
|
|
504
521
|
var authNames = ['api_token_basic'];
|
|
505
|
-
var contentTypes = ['
|
|
522
|
+
var contentTypes = ['application/json'];
|
|
506
523
|
var accepts = ['application/json'];
|
|
507
|
-
var returnType =
|
|
508
|
-
return this.apiClient.callApi('/templates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
524
|
+
var returnType = _Template["default"];
|
|
525
|
+
return this.apiClient.callApi('/templates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
509
526
|
}
|
|
510
527
|
|
|
511
528
|
/**
|
|
512
|
-
*
|
|
513
|
-
*
|
|
514
|
-
* @param {
|
|
515
|
-
* @param {
|
|
516
|
-
* @param {
|
|
529
|
+
* Create a template
|
|
530
|
+
* 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`.
|
|
531
|
+
* @param {module:model/CreateTemplateRequest} body The template to create.
|
|
532
|
+
* @param {Object} opts Optional parameters
|
|
533
|
+
* @param {Boolean} opts.wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
534
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
517
535
|
*/
|
|
536
|
+
}, {
|
|
537
|
+
key: "createTemplate",
|
|
538
|
+
value: function createTemplate(body, opts) {
|
|
539
|
+
return this.createTemplateWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
540
|
+
return response_and_data.data;
|
|
541
|
+
});
|
|
542
|
+
}
|
|
518
543
|
|
|
519
544
|
/**
|
|
520
|
-
* Create a
|
|
521
|
-
* Creates a
|
|
522
|
-
* @param {module:model/
|
|
523
|
-
* @
|
|
524
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
545
|
+
* Create a webhook
|
|
546
|
+
* 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.
|
|
547
|
+
* @param {module:model/CreateWebhookRequest} body The webhook to create.
|
|
548
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
525
549
|
*/
|
|
526
550
|
}, {
|
|
527
|
-
key: "
|
|
528
|
-
value: function
|
|
529
|
-
var postBody =
|
|
530
|
-
// verify the required parameter '
|
|
531
|
-
if (
|
|
532
|
-
throw new Error("Missing the required parameter '
|
|
551
|
+
key: "createWebhookWithHttpInfo",
|
|
552
|
+
value: function createWebhookWithHttpInfo(body) {
|
|
553
|
+
var postBody = body;
|
|
554
|
+
// verify the required parameter 'body' is set
|
|
555
|
+
if (body === undefined || body === null) {
|
|
556
|
+
throw new Error("Missing the required parameter 'body' when calling createWebhook");
|
|
533
557
|
}
|
|
534
558
|
var pathParams = {};
|
|
535
559
|
var queryParams = {};
|
|
@@ -538,62 +562,74 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
538
562
|
var authNames = ['api_token_basic'];
|
|
539
563
|
var contentTypes = ['application/json'];
|
|
540
564
|
var accepts = ['application/json'];
|
|
541
|
-
var returnType =
|
|
542
|
-
return this.apiClient.callApi('/
|
|
565
|
+
var returnType = _Webhook["default"];
|
|
566
|
+
return this.apiClient.callApi('/webhooks', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
543
567
|
}
|
|
544
568
|
|
|
545
569
|
/**
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
* @param {
|
|
549
|
-
* @
|
|
550
|
-
* @param {String} response The complete HTTP response.
|
|
570
|
+
* Create a webhook
|
|
571
|
+
* 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.
|
|
572
|
+
* @param {module:model/CreateWebhookRequest} body The webhook to create.
|
|
573
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
551
574
|
*/
|
|
575
|
+
}, {
|
|
576
|
+
key: "createWebhook",
|
|
577
|
+
value: function createWebhook(body) {
|
|
578
|
+
return this.createWebhookWithHttpInfo(body).then(function (response_and_data) {
|
|
579
|
+
return response_and_data.data;
|
|
580
|
+
});
|
|
581
|
+
}
|
|
552
582
|
|
|
553
583
|
/**
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
* @param {
|
|
557
|
-
* @
|
|
558
|
-
* data is of type: {@link module:model/Webhook}
|
|
584
|
+
* Delete a custom file
|
|
585
|
+
* Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
586
|
+
* @param {String} custom_file_id The custom file's ID.
|
|
587
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
559
588
|
*/
|
|
560
589
|
}, {
|
|
561
|
-
key: "
|
|
562
|
-
value: function
|
|
563
|
-
var postBody =
|
|
564
|
-
// verify the required parameter '
|
|
565
|
-
if (
|
|
566
|
-
throw new Error("Missing the required parameter '
|
|
590
|
+
key: "deleteCustomFileWithHttpInfo",
|
|
591
|
+
value: function deleteCustomFileWithHttpInfo(custom_file_id) {
|
|
592
|
+
var postBody = null;
|
|
593
|
+
// verify the required parameter 'custom_file_id' is set
|
|
594
|
+
if (custom_file_id === undefined || custom_file_id === null) {
|
|
595
|
+
throw new Error("Missing the required parameter 'custom_file_id' when calling deleteCustomFile");
|
|
567
596
|
}
|
|
568
|
-
var pathParams = {
|
|
597
|
+
var pathParams = {
|
|
598
|
+
'custom_file_id': custom_file_id
|
|
599
|
+
};
|
|
569
600
|
var queryParams = {};
|
|
570
601
|
var headerParams = {};
|
|
571
602
|
var formParams = {};
|
|
572
603
|
var authNames = ['api_token_basic'];
|
|
573
|
-
var contentTypes = [
|
|
604
|
+
var contentTypes = [];
|
|
574
605
|
var accepts = ['application/json'];
|
|
575
|
-
var returnType =
|
|
576
|
-
return this.apiClient.callApi('/
|
|
606
|
+
var returnType = _CustomFile["default"];
|
|
607
|
+
return this.apiClient.callApi('/custom_files/{custom_file_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
577
608
|
}
|
|
578
609
|
|
|
579
610
|
/**
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
* @param {String}
|
|
583
|
-
* @
|
|
584
|
-
* @param {String} response The complete HTTP response.
|
|
611
|
+
* Delete a custom file
|
|
612
|
+
* Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
613
|
+
* @param {String} custom_file_id The custom file's ID.
|
|
614
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
585
615
|
*/
|
|
616
|
+
}, {
|
|
617
|
+
key: "deleteCustomFile",
|
|
618
|
+
value: function deleteCustomFile(custom_file_id) {
|
|
619
|
+
return this.deleteCustomFileWithHttpInfo(custom_file_id).then(function (response_and_data) {
|
|
620
|
+
return response_and_data.data;
|
|
621
|
+
});
|
|
622
|
+
}
|
|
586
623
|
|
|
587
624
|
/**
|
|
588
625
|
* Delete a folder
|
|
589
|
-
* Deletes an empty folder.
|
|
590
|
-
* @param {String} folder_id
|
|
591
|
-
* @
|
|
592
|
-
* data is of type: {@link module:model/Folder}
|
|
626
|
+
* Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
627
|
+
* @param {String} folder_id The folder's ID.
|
|
628
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
593
629
|
*/
|
|
594
630
|
}, {
|
|
595
|
-
key: "
|
|
596
|
-
value: function
|
|
631
|
+
key: "deleteFolderWithHttpInfo",
|
|
632
|
+
value: function deleteFolderWithHttpInfo(folder_id) {
|
|
597
633
|
var postBody = null;
|
|
598
634
|
// verify the required parameter 'folder_id' is set
|
|
599
635
|
if (folder_id === undefined || folder_id === null) {
|
|
@@ -609,29 +645,34 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
609
645
|
var contentTypes = [];
|
|
610
646
|
var accepts = ['application/json'];
|
|
611
647
|
var returnType = _Folder["default"];
|
|
612
|
-
return this.apiClient.callApi('/folders/{folder_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
648
|
+
return this.apiClient.callApi('/folders/{folder_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
613
649
|
}
|
|
614
650
|
|
|
615
651
|
/**
|
|
616
|
-
*
|
|
617
|
-
*
|
|
618
|
-
* @param {String}
|
|
619
|
-
* @
|
|
620
|
-
* @param {String} response The complete HTTP response.
|
|
652
|
+
* Delete a folder
|
|
653
|
+
* Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
654
|
+
* @param {String} folder_id The folder's ID.
|
|
655
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
621
656
|
*/
|
|
657
|
+
}, {
|
|
658
|
+
key: "deleteFolder",
|
|
659
|
+
value: function deleteFolder(folder_id) {
|
|
660
|
+
return this.deleteFolderWithHttpInfo(folder_id).then(function (response_and_data) {
|
|
661
|
+
return response_and_data.data;
|
|
662
|
+
});
|
|
663
|
+
}
|
|
622
664
|
|
|
623
665
|
/**
|
|
624
666
|
* Delete a template
|
|
625
|
-
* Deletes a template
|
|
626
|
-
* @param {String} template_id
|
|
667
|
+
* 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.
|
|
668
|
+
* @param {String} template_id The template's ID.
|
|
627
669
|
* @param {Object} opts Optional parameters
|
|
628
|
-
* @param {String} [version]
|
|
629
|
-
* @
|
|
630
|
-
* data is of type: {@link module:model/TemplateDeleteResponse}
|
|
670
|
+
* @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.
|
|
671
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
631
672
|
*/
|
|
632
673
|
}, {
|
|
633
|
-
key: "
|
|
634
|
-
value: function
|
|
674
|
+
key: "deleteTemplateWithHttpInfo",
|
|
675
|
+
value: function deleteTemplateWithHttpInfo(template_id, opts) {
|
|
635
676
|
opts = opts || {};
|
|
636
677
|
var postBody = null;
|
|
637
678
|
// verify the required parameter 'template_id' is set
|
|
@@ -649,28 +690,35 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
649
690
|
var authNames = ['api_token_basic'];
|
|
650
691
|
var contentTypes = [];
|
|
651
692
|
var accepts = ['application/json'];
|
|
652
|
-
var returnType =
|
|
653
|
-
return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
693
|
+
var returnType = _Template["default"];
|
|
694
|
+
return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
654
695
|
}
|
|
655
696
|
|
|
656
697
|
/**
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
* @param {String}
|
|
660
|
-
* @param {
|
|
661
|
-
* @param {String}
|
|
698
|
+
* Delete a template
|
|
699
|
+
* 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.
|
|
700
|
+
* @param {String} template_id The template's ID.
|
|
701
|
+
* @param {Object} opts Optional parameters
|
|
702
|
+
* @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.
|
|
703
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
662
704
|
*/
|
|
705
|
+
}, {
|
|
706
|
+
key: "deleteTemplate",
|
|
707
|
+
value: function deleteTemplate(template_id, opts) {
|
|
708
|
+
return this.deleteTemplateWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
709
|
+
return response_and_data.data;
|
|
710
|
+
});
|
|
711
|
+
}
|
|
663
712
|
|
|
664
713
|
/**
|
|
665
714
|
* Delete a webhook
|
|
666
|
-
*
|
|
667
|
-
* @param {String} webhook_id
|
|
668
|
-
* @
|
|
669
|
-
* data is of type: {@link module:model/Webhook}
|
|
715
|
+
* Deletes a webhook so it stops receiving events, and returns it.
|
|
716
|
+
* @param {String} webhook_id The webhook's ID.
|
|
717
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
670
718
|
*/
|
|
671
719
|
}, {
|
|
672
|
-
key: "
|
|
673
|
-
value: function
|
|
720
|
+
key: "deleteWebhookWithHttpInfo",
|
|
721
|
+
value: function deleteWebhookWithHttpInfo(webhook_id) {
|
|
674
722
|
var postBody = null;
|
|
675
723
|
// verify the required parameter 'webhook_id' is set
|
|
676
724
|
if (webhook_id === undefined || webhook_id === null) {
|
|
@@ -686,34 +734,39 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
686
734
|
var contentTypes = [];
|
|
687
735
|
var accepts = ['application/json'];
|
|
688
736
|
var returnType = _Webhook["default"];
|
|
689
|
-
return this.apiClient.callApi('/webhooks/{webhook_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
737
|
+
return this.apiClient.callApi('/webhooks/{webhook_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
690
738
|
}
|
|
691
739
|
|
|
692
740
|
/**
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
* @param {String}
|
|
696
|
-
* @
|
|
697
|
-
* @param {String} response The complete HTTP response.
|
|
741
|
+
* Delete a webhook
|
|
742
|
+
* Deletes a webhook so it stops receiving events, and returns it.
|
|
743
|
+
* @param {String} webhook_id The webhook's ID.
|
|
744
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
698
745
|
*/
|
|
746
|
+
}, {
|
|
747
|
+
key: "deleteWebhook",
|
|
748
|
+
value: function deleteWebhook(webhook_id) {
|
|
749
|
+
return this.deleteWebhookWithHttpInfo(webhook_id).then(function (response_and_data) {
|
|
750
|
+
return response_and_data.data;
|
|
751
|
+
});
|
|
752
|
+
}
|
|
699
753
|
|
|
700
754
|
/**
|
|
701
|
-
* Expire a combined
|
|
702
|
-
*
|
|
703
|
-
* @param {String}
|
|
704
|
-
* @
|
|
705
|
-
* data is of type: {@link module:model/CombinedSubmission}
|
|
755
|
+
* Expire a combined PDF
|
|
756
|
+
* Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
757
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
758
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
706
759
|
*/
|
|
707
760
|
}, {
|
|
708
|
-
key: "
|
|
709
|
-
value: function
|
|
761
|
+
key: "expireCombinedPdfWithHttpInfo",
|
|
762
|
+
value: function expireCombinedPdfWithHttpInfo(combined_pdf_id) {
|
|
710
763
|
var postBody = null;
|
|
711
|
-
// verify the required parameter '
|
|
712
|
-
if (
|
|
713
|
-
throw new Error("Missing the required parameter '
|
|
764
|
+
// verify the required parameter 'combined_pdf_id' is set
|
|
765
|
+
if (combined_pdf_id === undefined || combined_pdf_id === null) {
|
|
766
|
+
throw new Error("Missing the required parameter 'combined_pdf_id' when calling expireCombinedPdf");
|
|
714
767
|
}
|
|
715
768
|
var pathParams = {
|
|
716
|
-
'
|
|
769
|
+
'combined_pdf_id': combined_pdf_id
|
|
717
770
|
};
|
|
718
771
|
var queryParams = {};
|
|
719
772
|
var headerParams = {};
|
|
@@ -721,28 +774,33 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
721
774
|
var authNames = ['api_token_basic'];
|
|
722
775
|
var contentTypes = [];
|
|
723
776
|
var accepts = ['application/json'];
|
|
724
|
-
var returnType =
|
|
725
|
-
return this.apiClient.callApi('/
|
|
777
|
+
var returnType = _CombinedPdf["default"];
|
|
778
|
+
return this.apiClient.callApi('/combined_pdfs/{combined_pdf_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
726
779
|
}
|
|
727
780
|
|
|
728
781
|
/**
|
|
729
|
-
*
|
|
730
|
-
*
|
|
731
|
-
* @param {String}
|
|
732
|
-
* @
|
|
733
|
-
* @param {String} response The complete HTTP response.
|
|
782
|
+
* Expire a combined PDF
|
|
783
|
+
* Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
784
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
785
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
734
786
|
*/
|
|
787
|
+
}, {
|
|
788
|
+
key: "expireCombinedPdf",
|
|
789
|
+
value: function expireCombinedPdf(combined_pdf_id) {
|
|
790
|
+
return this.expireCombinedPdfWithHttpInfo(combined_pdf_id).then(function (response_and_data) {
|
|
791
|
+
return response_and_data.data;
|
|
792
|
+
});
|
|
793
|
+
}
|
|
735
794
|
|
|
736
795
|
/**
|
|
737
|
-
* Expire a
|
|
738
|
-
*
|
|
739
|
-
* @param {String} submission_id
|
|
740
|
-
* @
|
|
741
|
-
* data is of type: {@link module:model/SubmissionPreview}
|
|
796
|
+
* Expire a submission
|
|
797
|
+
* Deletes a submission's data and PDF now, and returns the expired submission.
|
|
798
|
+
* @param {String} submission_id The submission's ID.
|
|
799
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
742
800
|
*/
|
|
743
801
|
}, {
|
|
744
|
-
key: "
|
|
745
|
-
value: function
|
|
802
|
+
key: "expireSubmissionWithHttpInfo",
|
|
803
|
+
value: function expireSubmissionWithHttpInfo(submission_id) {
|
|
746
804
|
var postBody = null;
|
|
747
805
|
// verify the required parameter 'submission_id' is set
|
|
748
806
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -757,81 +815,81 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
757
815
|
var authNames = ['api_token_basic'];
|
|
758
816
|
var contentTypes = [];
|
|
759
817
|
var accepts = ['application/json'];
|
|
760
|
-
var returnType =
|
|
761
|
-
return this.apiClient.callApi('/submissions/{submission_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
818
|
+
var returnType = _Submission["default"];
|
|
819
|
+
return this.apiClient.callApi('/submissions/{submission_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
762
820
|
}
|
|
763
821
|
|
|
764
822
|
/**
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
* @param {String}
|
|
768
|
-
* @
|
|
769
|
-
* @param {String} response The complete HTTP response.
|
|
823
|
+
* Expire a submission
|
|
824
|
+
* Deletes a submission's data and PDF now, and returns the expired submission.
|
|
825
|
+
* @param {String} submission_id The submission's ID.
|
|
826
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
770
827
|
*/
|
|
828
|
+
}, {
|
|
829
|
+
key: "expireSubmission",
|
|
830
|
+
value: function expireSubmission(submission_id) {
|
|
831
|
+
return this.expireSubmissionWithHttpInfo(submission_id).then(function (response_and_data) {
|
|
832
|
+
return response_and_data.data;
|
|
833
|
+
});
|
|
834
|
+
}
|
|
771
835
|
|
|
772
836
|
/**
|
|
773
|
-
* Generate a PDF
|
|
774
|
-
*
|
|
775
|
-
* @param {String}
|
|
776
|
-
* @
|
|
777
|
-
* @param {Object} opts Optional parameters
|
|
778
|
-
* @param {Boolean} [wait = true)] Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
|
|
779
|
-
* @param {module:api/Client~generatePdfCallback} callback The callback function, accepting three arguments: error, data, response
|
|
780
|
-
* data is of type: {@link module:model/CreateSubmissionResponse}
|
|
837
|
+
* Generate a preview PDF
|
|
838
|
+
* 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.
|
|
839
|
+
* @param {String} submission_id The submission's ID.
|
|
840
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
781
841
|
*/
|
|
782
842
|
}, {
|
|
783
|
-
key: "
|
|
784
|
-
value: function
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
throw new Error("Missing the required parameter 'template_id' when calling generatePdf");
|
|
790
|
-
}
|
|
791
|
-
// verify the required parameter 'submission' is set
|
|
792
|
-
if (submission === undefined || submission === null) {
|
|
793
|
-
throw new Error("Missing the required parameter 'submission' when calling generatePdf");
|
|
843
|
+
key: "generateSubmissionPreviewWithHttpInfo",
|
|
844
|
+
value: function generateSubmissionPreviewWithHttpInfo(submission_id) {
|
|
845
|
+
var postBody = null;
|
|
846
|
+
// verify the required parameter 'submission_id' is set
|
|
847
|
+
if (submission_id === undefined || submission_id === null) {
|
|
848
|
+
throw new Error("Missing the required parameter 'submission_id' when calling generateSubmissionPreview");
|
|
794
849
|
}
|
|
795
850
|
var pathParams = {
|
|
796
|
-
'
|
|
797
|
-
};
|
|
798
|
-
var queryParams = {
|
|
799
|
-
'wait': opts['wait']
|
|
851
|
+
'submission_id': submission_id
|
|
800
852
|
};
|
|
853
|
+
var queryParams = {};
|
|
801
854
|
var headerParams = {};
|
|
802
855
|
var formParams = {};
|
|
803
856
|
var authNames = ['api_token_basic'];
|
|
804
|
-
var contentTypes = [
|
|
857
|
+
var contentTypes = [];
|
|
805
858
|
var accepts = ['application/json'];
|
|
806
|
-
var returnType =
|
|
807
|
-
return this.apiClient.callApi('/
|
|
859
|
+
var returnType = _Submission["default"];
|
|
860
|
+
return this.apiClient.callApi('/submissions/{submission_id}/generate_preview', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
808
861
|
}
|
|
809
862
|
|
|
810
863
|
/**
|
|
811
|
-
*
|
|
812
|
-
*
|
|
813
|
-
* @param {String}
|
|
814
|
-
* @
|
|
815
|
-
* @param {String} response The complete HTTP response.
|
|
864
|
+
* Generate a preview PDF
|
|
865
|
+
* 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.
|
|
866
|
+
* @param {String} submission_id The submission's ID.
|
|
867
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
816
868
|
*/
|
|
869
|
+
}, {
|
|
870
|
+
key: "generateSubmissionPreview",
|
|
871
|
+
value: function generateSubmissionPreview(submission_id) {
|
|
872
|
+
return this.generateSubmissionPreviewWithHttpInfo(submission_id).then(function (response_and_data) {
|
|
873
|
+
return response_and_data.data;
|
|
874
|
+
});
|
|
875
|
+
}
|
|
817
876
|
|
|
818
877
|
/**
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
* @param {String}
|
|
822
|
-
* @
|
|
823
|
-
* data is of type: {@link module:model/SuccessErrorResponse}
|
|
878
|
+
* Get a combined PDF
|
|
879
|
+
* Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
880
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
881
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
824
882
|
*/
|
|
825
883
|
}, {
|
|
826
|
-
key: "
|
|
827
|
-
value: function
|
|
884
|
+
key: "getCombinedPdfWithHttpInfo",
|
|
885
|
+
value: function getCombinedPdfWithHttpInfo(combined_pdf_id) {
|
|
828
886
|
var postBody = null;
|
|
829
|
-
// verify the required parameter '
|
|
830
|
-
if (
|
|
831
|
-
throw new Error("Missing the required parameter '
|
|
887
|
+
// verify the required parameter 'combined_pdf_id' is set
|
|
888
|
+
if (combined_pdf_id === undefined || combined_pdf_id === null) {
|
|
889
|
+
throw new Error("Missing the required parameter 'combined_pdf_id' when calling getCombinedPdf");
|
|
832
890
|
}
|
|
833
891
|
var pathParams = {
|
|
834
|
-
'
|
|
892
|
+
'combined_pdf_id': combined_pdf_id
|
|
835
893
|
};
|
|
836
894
|
var queryParams = {};
|
|
837
895
|
var headerParams = {};
|
|
@@ -839,35 +897,40 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
839
897
|
var authNames = ['api_token_basic'];
|
|
840
898
|
var contentTypes = [];
|
|
841
899
|
var accepts = ['application/json'];
|
|
842
|
-
var returnType =
|
|
843
|
-
return this.apiClient.callApi('/
|
|
900
|
+
var returnType = _CombinedPdf["default"];
|
|
901
|
+
return this.apiClient.callApi('/combined_pdfs/{combined_pdf_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
844
902
|
}
|
|
845
903
|
|
|
846
904
|
/**
|
|
847
|
-
*
|
|
848
|
-
*
|
|
849
|
-
* @param {String}
|
|
850
|
-
* @
|
|
851
|
-
* @param {String} response The complete HTTP response.
|
|
905
|
+
* Get a combined PDF
|
|
906
|
+
* Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
907
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
908
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
852
909
|
*/
|
|
910
|
+
}, {
|
|
911
|
+
key: "getCombinedPdf",
|
|
912
|
+
value: function getCombinedPdf(combined_pdf_id) {
|
|
913
|
+
return this.getCombinedPdfWithHttpInfo(combined_pdf_id).then(function (response_and_data) {
|
|
914
|
+
return response_and_data.data;
|
|
915
|
+
});
|
|
916
|
+
}
|
|
853
917
|
|
|
854
918
|
/**
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
* @param {String}
|
|
858
|
-
* @
|
|
859
|
-
* data is of type: {@link module:model/CombinedSubmission}
|
|
919
|
+
* Get a custom file
|
|
920
|
+
* Returns a custom file, with a temporary URL to download it.
|
|
921
|
+
* @param {String} custom_file_id The custom file's ID.
|
|
922
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
860
923
|
*/
|
|
861
924
|
}, {
|
|
862
|
-
key: "
|
|
863
|
-
value: function
|
|
925
|
+
key: "getCustomFileWithHttpInfo",
|
|
926
|
+
value: function getCustomFileWithHttpInfo(custom_file_id) {
|
|
864
927
|
var postBody = null;
|
|
865
|
-
// verify the required parameter '
|
|
866
|
-
if (
|
|
867
|
-
throw new Error("Missing the required parameter '
|
|
928
|
+
// verify the required parameter 'custom_file_id' is set
|
|
929
|
+
if (custom_file_id === undefined || custom_file_id === null) {
|
|
930
|
+
throw new Error("Missing the required parameter 'custom_file_id' when calling getCustomFile");
|
|
868
931
|
}
|
|
869
932
|
var pathParams = {
|
|
870
|
-
'
|
|
933
|
+
'custom_file_id': custom_file_id
|
|
871
934
|
};
|
|
872
935
|
var queryParams = {};
|
|
873
936
|
var headerParams = {};
|
|
@@ -875,35 +938,40 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
875
938
|
var authNames = ['api_token_basic'];
|
|
876
939
|
var contentTypes = [];
|
|
877
940
|
var accepts = ['application/json'];
|
|
878
|
-
var returnType =
|
|
879
|
-
return this.apiClient.callApi('/
|
|
941
|
+
var returnType = _CustomFile["default"];
|
|
942
|
+
return this.apiClient.callApi('/custom_files/{custom_file_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
880
943
|
}
|
|
881
944
|
|
|
882
945
|
/**
|
|
883
|
-
*
|
|
884
|
-
*
|
|
885
|
-
* @param {String}
|
|
886
|
-
* @
|
|
887
|
-
* @param {String} response The complete HTTP response.
|
|
946
|
+
* Get a custom file
|
|
947
|
+
* Returns a custom file, with a temporary URL to download it.
|
|
948
|
+
* @param {String} custom_file_id The custom file's ID.
|
|
949
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
888
950
|
*/
|
|
951
|
+
}, {
|
|
952
|
+
key: "getCustomFile",
|
|
953
|
+
value: function getCustomFile(custom_file_id) {
|
|
954
|
+
return this.getCustomFileWithHttpInfo(custom_file_id).then(function (response_and_data) {
|
|
955
|
+
return response_and_data.data;
|
|
956
|
+
});
|
|
957
|
+
}
|
|
889
958
|
|
|
890
959
|
/**
|
|
891
|
-
*
|
|
892
|
-
*
|
|
893
|
-
* @param {String}
|
|
894
|
-
* @
|
|
895
|
-
* data is of type: {@link module:model/SubmissionDataRequestShow}
|
|
960
|
+
* Get a folder
|
|
961
|
+
* Returns a folder.
|
|
962
|
+
* @param {String} folder_id The folder's ID.
|
|
963
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
896
964
|
*/
|
|
897
965
|
}, {
|
|
898
|
-
key: "
|
|
899
|
-
value: function
|
|
966
|
+
key: "getFolderWithHttpInfo",
|
|
967
|
+
value: function getFolderWithHttpInfo(folder_id) {
|
|
900
968
|
var postBody = null;
|
|
901
|
-
// verify the required parameter '
|
|
902
|
-
if (
|
|
903
|
-
throw new Error("Missing the required parameter '
|
|
969
|
+
// verify the required parameter 'folder_id' is set
|
|
970
|
+
if (folder_id === undefined || folder_id === null) {
|
|
971
|
+
throw new Error("Missing the required parameter 'folder_id' when calling getFolder");
|
|
904
972
|
}
|
|
905
973
|
var pathParams = {
|
|
906
|
-
'
|
|
974
|
+
'folder_id': folder_id
|
|
907
975
|
};
|
|
908
976
|
var queryParams = {};
|
|
909
977
|
var headerParams = {};
|
|
@@ -911,96 +979,107 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
911
979
|
var authNames = ['api_token_basic'];
|
|
912
980
|
var contentTypes = [];
|
|
913
981
|
var accepts = ['application/json'];
|
|
914
|
-
var returnType =
|
|
915
|
-
return this.apiClient.callApi('/
|
|
982
|
+
var returnType = _Folder["default"];
|
|
983
|
+
return this.apiClient.callApi('/folders/{folder_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
916
984
|
}
|
|
917
985
|
|
|
918
986
|
/**
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
* @param {String}
|
|
922
|
-
* @
|
|
923
|
-
* @param {String} response The complete HTTP response.
|
|
987
|
+
* Get a folder
|
|
988
|
+
* Returns a folder.
|
|
989
|
+
* @param {String} folder_id The folder's ID.
|
|
990
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
924
991
|
*/
|
|
992
|
+
}, {
|
|
993
|
+
key: "getFolder",
|
|
994
|
+
value: function getFolder(folder_id) {
|
|
995
|
+
return this.getFolderWithHttpInfo(folder_id).then(function (response_and_data) {
|
|
996
|
+
return response_and_data.data;
|
|
997
|
+
});
|
|
998
|
+
}
|
|
925
999
|
|
|
926
1000
|
/**
|
|
927
|
-
*
|
|
928
|
-
*
|
|
929
|
-
* @
|
|
930
|
-
* @param {module:api/Client~getFullTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
931
|
-
* data is of type: {@link module:model/Template}
|
|
1001
|
+
* Get a presigned URL to upload a file
|
|
1002
|
+
* 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.
|
|
1003
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UploadPresign} and HTTP response
|
|
932
1004
|
*/
|
|
933
1005
|
}, {
|
|
934
|
-
key: "
|
|
935
|
-
value: function
|
|
1006
|
+
key: "getPresignUrlWithHttpInfo",
|
|
1007
|
+
value: function getPresignUrlWithHttpInfo() {
|
|
936
1008
|
var postBody = null;
|
|
937
|
-
|
|
938
|
-
if (template_id === undefined || template_id === null) {
|
|
939
|
-
throw new Error("Missing the required parameter 'template_id' when calling getFullTemplate");
|
|
940
|
-
}
|
|
941
|
-
var pathParams = {
|
|
942
|
-
'template_id': template_id
|
|
943
|
-
};
|
|
1009
|
+
var pathParams = {};
|
|
944
1010
|
var queryParams = {};
|
|
945
1011
|
var headerParams = {};
|
|
946
1012
|
var formParams = {};
|
|
947
1013
|
var authNames = ['api_token_basic'];
|
|
948
1014
|
var contentTypes = [];
|
|
949
1015
|
var accepts = ['application/json'];
|
|
950
|
-
var returnType =
|
|
951
|
-
return this.apiClient.callApi('/
|
|
1016
|
+
var returnType = _UploadPresign["default"];
|
|
1017
|
+
return this.apiClient.callApi('/uploads/presign', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
952
1018
|
}
|
|
953
1019
|
|
|
954
1020
|
/**
|
|
955
|
-
*
|
|
956
|
-
*
|
|
957
|
-
* @
|
|
958
|
-
* @param {module:model/UploadPresignResponse} data The data returned by the service call.
|
|
959
|
-
* @param {String} response The complete HTTP response.
|
|
1021
|
+
* Get a presigned URL to upload a file
|
|
1022
|
+
* 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.
|
|
1023
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UploadPresign}
|
|
960
1024
|
*/
|
|
1025
|
+
}, {
|
|
1026
|
+
key: "getPresignUrl",
|
|
1027
|
+
value: function getPresignUrl() {
|
|
1028
|
+
return this.getPresignUrlWithHttpInfo().then(function (response_and_data) {
|
|
1029
|
+
return response_and_data.data;
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
961
1032
|
|
|
962
1033
|
/**
|
|
963
|
-
* Get a
|
|
964
|
-
* Returns a
|
|
965
|
-
* @param {
|
|
966
|
-
* data
|
|
1034
|
+
* Get a signature request
|
|
1035
|
+
* Returns a signature request, with the values the person has entered so far.
|
|
1036
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
1037
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequest} and HTTP response
|
|
967
1038
|
*/
|
|
968
1039
|
}, {
|
|
969
|
-
key: "
|
|
970
|
-
value: function
|
|
1040
|
+
key: "getSignatureRequestWithHttpInfo",
|
|
1041
|
+
value: function getSignatureRequestWithHttpInfo(signature_request_id) {
|
|
971
1042
|
var postBody = null;
|
|
972
|
-
|
|
1043
|
+
// verify the required parameter 'signature_request_id' is set
|
|
1044
|
+
if (signature_request_id === undefined || signature_request_id === null) {
|
|
1045
|
+
throw new Error("Missing the required parameter 'signature_request_id' when calling getSignatureRequest");
|
|
1046
|
+
}
|
|
1047
|
+
var pathParams = {
|
|
1048
|
+
'signature_request_id': signature_request_id
|
|
1049
|
+
};
|
|
973
1050
|
var queryParams = {};
|
|
974
1051
|
var headerParams = {};
|
|
975
1052
|
var formParams = {};
|
|
976
1053
|
var authNames = ['api_token_basic'];
|
|
977
1054
|
var contentTypes = [];
|
|
978
1055
|
var accepts = ['application/json'];
|
|
979
|
-
var returnType =
|
|
980
|
-
return this.apiClient.callApi('/
|
|
1056
|
+
var returnType = _SignatureRequest["default"];
|
|
1057
|
+
return this.apiClient.callApi('/signature_requests/{signature_request_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
981
1058
|
}
|
|
982
1059
|
|
|
983
1060
|
/**
|
|
984
|
-
*
|
|
985
|
-
*
|
|
986
|
-
* @param {String}
|
|
987
|
-
* @
|
|
988
|
-
* @param {String} response The complete HTTP response.
|
|
1061
|
+
* Get a signature request
|
|
1062
|
+
* Returns a signature request, with the values the person has entered so far.
|
|
1063
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
1064
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequest}
|
|
989
1065
|
*/
|
|
1066
|
+
}, {
|
|
1067
|
+
key: "getSignatureRequest",
|
|
1068
|
+
value: function getSignatureRequest(signature_request_id) {
|
|
1069
|
+
return this.getSignatureRequestWithHttpInfo(signature_request_id).then(function (response_and_data) {
|
|
1070
|
+
return response_and_data.data;
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
990
1073
|
|
|
991
1074
|
/**
|
|
992
|
-
*
|
|
993
|
-
*
|
|
994
|
-
* @param {String} submission_id
|
|
995
|
-
* @
|
|
996
|
-
* @param {Boolean} [include_data]
|
|
997
|
-
* @param {module:api/Client~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
|
|
998
|
-
* data is of type: {@link module:model/Submission}
|
|
1075
|
+
* Get a submission
|
|
1076
|
+
* Returns a submission, with its data and links to download its PDF.
|
|
1077
|
+
* @param {String} submission_id The submission's ID.
|
|
1078
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
999
1079
|
*/
|
|
1000
1080
|
}, {
|
|
1001
|
-
key: "
|
|
1002
|
-
value: function
|
|
1003
|
-
opts = opts || {};
|
|
1081
|
+
key: "getSubmissionWithHttpInfo",
|
|
1082
|
+
value: function getSubmissionWithHttpInfo(submission_id) {
|
|
1004
1083
|
var postBody = null;
|
|
1005
1084
|
// verify the required parameter 'submission_id' is set
|
|
1006
1085
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -1009,38 +1088,41 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1009
1088
|
var pathParams = {
|
|
1010
1089
|
'submission_id': submission_id
|
|
1011
1090
|
};
|
|
1012
|
-
var queryParams = {
|
|
1013
|
-
'include_data': opts['include_data']
|
|
1014
|
-
};
|
|
1091
|
+
var queryParams = {};
|
|
1015
1092
|
var headerParams = {};
|
|
1016
1093
|
var formParams = {};
|
|
1017
1094
|
var authNames = ['api_token_basic'];
|
|
1018
1095
|
var contentTypes = [];
|
|
1019
1096
|
var accepts = ['application/json'];
|
|
1020
1097
|
var returnType = _Submission["default"];
|
|
1021
|
-
return this.apiClient.callApi('/submissions/{submission_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1098
|
+
return this.apiClient.callApi('/submissions/{submission_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1022
1099
|
}
|
|
1023
1100
|
|
|
1024
1101
|
/**
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1027
|
-
* @param {String}
|
|
1028
|
-
* @
|
|
1029
|
-
* @param {String} response The complete HTTP response.
|
|
1102
|
+
* Get a submission
|
|
1103
|
+
* Returns a submission, with its data and links to download its PDF.
|
|
1104
|
+
* @param {String} submission_id The submission's ID.
|
|
1105
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
1030
1106
|
*/
|
|
1107
|
+
}, {
|
|
1108
|
+
key: "getSubmission",
|
|
1109
|
+
value: function getSubmission(submission_id) {
|
|
1110
|
+
return this.getSubmissionWithHttpInfo(submission_id).then(function (response_and_data) {
|
|
1111
|
+
return response_and_data.data;
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1031
1114
|
|
|
1032
1115
|
/**
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1035
|
-
* @param {String} submission_batch_id
|
|
1116
|
+
* Get a batch
|
|
1117
|
+
* 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.
|
|
1118
|
+
* @param {String} submission_batch_id The batch's ID.
|
|
1036
1119
|
* @param {Object} opts Optional parameters
|
|
1037
|
-
* @param {Boolean} [
|
|
1038
|
-
* @
|
|
1039
|
-
* data is of type: {@link module:model/SubmissionBatchWithSubmissions}
|
|
1120
|
+
* @param {Boolean} [include_data] Include each submission's `data` (null without it).
|
|
1121
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionBatch} and HTTP response
|
|
1040
1122
|
*/
|
|
1041
1123
|
}, {
|
|
1042
|
-
key: "
|
|
1043
|
-
value: function
|
|
1124
|
+
key: "getSubmissionBatchWithHttpInfo",
|
|
1125
|
+
value: function getSubmissionBatchWithHttpInfo(submission_batch_id, opts) {
|
|
1044
1126
|
opts = opts || {};
|
|
1045
1127
|
var postBody = null;
|
|
1046
1128
|
// verify the required parameter 'submission_batch_id' is set
|
|
@@ -1051,35 +1133,45 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1051
1133
|
'submission_batch_id': submission_batch_id
|
|
1052
1134
|
};
|
|
1053
1135
|
var queryParams = {
|
|
1054
|
-
'
|
|
1136
|
+
'include_data': opts['include_data']
|
|
1055
1137
|
};
|
|
1056
1138
|
var headerParams = {};
|
|
1057
1139
|
var formParams = {};
|
|
1058
1140
|
var authNames = ['api_token_basic'];
|
|
1059
1141
|
var contentTypes = [];
|
|
1060
1142
|
var accepts = ['application/json'];
|
|
1061
|
-
var returnType =
|
|
1062
|
-
return this.apiClient.callApi('/submissions/batches/{submission_batch_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1143
|
+
var returnType = _SubmissionBatch["default"];
|
|
1144
|
+
return this.apiClient.callApi('/submissions/batches/{submission_batch_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1063
1145
|
}
|
|
1064
1146
|
|
|
1065
1147
|
/**
|
|
1066
|
-
*
|
|
1067
|
-
*
|
|
1068
|
-
* @param {String}
|
|
1069
|
-
* @param {
|
|
1070
|
-
* @param {
|
|
1148
|
+
* Get a batch
|
|
1149
|
+
* 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.
|
|
1150
|
+
* @param {String} submission_batch_id The batch's ID.
|
|
1151
|
+
* @param {Object} opts Optional parameters
|
|
1152
|
+
* @param {Boolean} opts.include_data Include each submission's `data` (null without it).
|
|
1153
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionBatch}
|
|
1071
1154
|
*/
|
|
1155
|
+
}, {
|
|
1156
|
+
key: "getSubmissionBatch",
|
|
1157
|
+
value: function getSubmissionBatch(submission_batch_id, opts) {
|
|
1158
|
+
return this.getSubmissionBatchWithHttpInfo(submission_batch_id, opts).then(function (response_and_data) {
|
|
1159
|
+
return response_and_data.data;
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1072
1162
|
|
|
1073
1163
|
/**
|
|
1074
|
-
*
|
|
1075
|
-
*
|
|
1076
|
-
* @param {String} template_id
|
|
1077
|
-
* @param {
|
|
1078
|
-
*
|
|
1164
|
+
* Get a template
|
|
1165
|
+
* Returns a template: its draft, or one of its published versions.
|
|
1166
|
+
* @param {String} template_id The template's ID.
|
|
1167
|
+
* @param {Object} opts Optional parameters
|
|
1168
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1169
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1079
1170
|
*/
|
|
1080
1171
|
}, {
|
|
1081
|
-
key: "
|
|
1082
|
-
value: function
|
|
1172
|
+
key: "getTemplateWithHttpInfo",
|
|
1173
|
+
value: function getTemplateWithHttpInfo(template_id, opts) {
|
|
1174
|
+
opts = opts || {};
|
|
1083
1175
|
var postBody = null;
|
|
1084
1176
|
// verify the required parameter 'template_id' is set
|
|
1085
1177
|
if (template_id === undefined || template_id === null) {
|
|
@@ -1088,35 +1180,47 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1088
1180
|
var pathParams = {
|
|
1089
1181
|
'template_id': template_id
|
|
1090
1182
|
};
|
|
1091
|
-
var queryParams = {
|
|
1183
|
+
var queryParams = {
|
|
1184
|
+
'version': opts['version']
|
|
1185
|
+
};
|
|
1092
1186
|
var headerParams = {};
|
|
1093
1187
|
var formParams = {};
|
|
1094
1188
|
var authNames = ['api_token_basic'];
|
|
1095
1189
|
var contentTypes = [];
|
|
1096
1190
|
var accepts = ['application/json'];
|
|
1097
|
-
var returnType =
|
|
1098
|
-
return this.apiClient.callApi('/templates/{template_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1191
|
+
var returnType = _Template["default"];
|
|
1192
|
+
return this.apiClient.callApi('/templates/{template_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1099
1193
|
}
|
|
1100
1194
|
|
|
1101
1195
|
/**
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1104
|
-
* @param {String}
|
|
1105
|
-
* @param {
|
|
1106
|
-
* @param {String}
|
|
1196
|
+
* Get a template
|
|
1197
|
+
* Returns a template: its draft, or one of its published versions.
|
|
1198
|
+
* @param {String} template_id The template's ID.
|
|
1199
|
+
* @param {Object} opts Optional parameters
|
|
1200
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1201
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1107
1202
|
*/
|
|
1203
|
+
}, {
|
|
1204
|
+
key: "getTemplate",
|
|
1205
|
+
value: function getTemplate(template_id, opts) {
|
|
1206
|
+
return this.getTemplateWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1207
|
+
return response_and_data.data;
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1108
1210
|
|
|
1109
1211
|
/**
|
|
1110
|
-
* Generate typed
|
|
1111
|
-
* Generates
|
|
1112
|
-
* @param {String} template_id
|
|
1113
|
-
* @param {module:model/
|
|
1114
|
-
* @param {
|
|
1115
|
-
*
|
|
1212
|
+
* Generate typed code for a template's submission data
|
|
1213
|
+
* 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.
|
|
1214
|
+
* @param {String} template_id The template's ID.
|
|
1215
|
+
* @param {module:model/ModelCodeLanguage} lang The language to generate the code in.
|
|
1216
|
+
* @param {Object} opts Optional parameters
|
|
1217
|
+
* @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.
|
|
1218
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateModelCode} and HTTP response
|
|
1116
1219
|
*/
|
|
1117
1220
|
}, {
|
|
1118
|
-
key: "
|
|
1119
|
-
value: function
|
|
1221
|
+
key: "getTemplateModelCodeWithHttpInfo",
|
|
1222
|
+
value: function getTemplateModelCodeWithHttpInfo(template_id, lang, opts) {
|
|
1223
|
+
opts = opts || {};
|
|
1120
1224
|
var postBody = null;
|
|
1121
1225
|
// verify the required parameter 'template_id' is set
|
|
1122
1226
|
if (template_id === undefined || template_id === null) {
|
|
@@ -1130,6 +1234,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1130
1234
|
'template_id': template_id
|
|
1131
1235
|
};
|
|
1132
1236
|
var queryParams = {
|
|
1237
|
+
'version': opts['version'],
|
|
1133
1238
|
'lang': lang
|
|
1134
1239
|
};
|
|
1135
1240
|
var headerParams = {};
|
|
@@ -1137,28 +1242,39 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1137
1242
|
var authNames = ['api_token_basic'];
|
|
1138
1243
|
var contentTypes = [];
|
|
1139
1244
|
var accepts = ['application/json'];
|
|
1140
|
-
var returnType =
|
|
1141
|
-
return this.apiClient.callApi('/templates/{template_id}/model_code', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1245
|
+
var returnType = _TemplateModelCode["default"];
|
|
1246
|
+
return this.apiClient.callApi('/templates/{template_id}/model_code', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1142
1247
|
}
|
|
1143
1248
|
|
|
1144
1249
|
/**
|
|
1145
|
-
*
|
|
1146
|
-
*
|
|
1147
|
-
* @param {String}
|
|
1148
|
-
* @param {module:model/
|
|
1149
|
-
* @param {
|
|
1250
|
+
* Generate typed code for a template's submission data
|
|
1251
|
+
* 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.
|
|
1252
|
+
* @param {String} template_id The template's ID.
|
|
1253
|
+
* @param {module:model/ModelCodeLanguage} lang The language to generate the code in.
|
|
1254
|
+
* @param {Object} opts Optional parameters
|
|
1255
|
+
* @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.
|
|
1256
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateModelCode}
|
|
1150
1257
|
*/
|
|
1258
|
+
}, {
|
|
1259
|
+
key: "getTemplateModelCode",
|
|
1260
|
+
value: function getTemplateModelCode(template_id, lang, opts) {
|
|
1261
|
+
return this.getTemplateModelCodeWithHttpInfo(template_id, lang, opts).then(function (response_and_data) {
|
|
1262
|
+
return response_and_data.data;
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1151
1265
|
|
|
1152
1266
|
/**
|
|
1153
|
-
*
|
|
1154
|
-
*
|
|
1155
|
-
* @param {String} template_id
|
|
1156
|
-
* @param {
|
|
1157
|
-
*
|
|
1267
|
+
* Get the JSON Schema of a template's submission data
|
|
1268
|
+
* 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.
|
|
1269
|
+
* @param {String} template_id The template's ID.
|
|
1270
|
+
* @param {Object} opts Optional parameters
|
|
1271
|
+
* @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.
|
|
1272
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object.<String, {String: Object}>} and HTTP response
|
|
1158
1273
|
*/
|
|
1159
1274
|
}, {
|
|
1160
|
-
key: "
|
|
1161
|
-
value: function
|
|
1275
|
+
key: "getTemplateSchemaWithHttpInfo",
|
|
1276
|
+
value: function getTemplateSchemaWithHttpInfo(template_id, opts) {
|
|
1277
|
+
opts = opts || {};
|
|
1162
1278
|
var postBody = null;
|
|
1163
1279
|
// verify the required parameter 'template_id' is set
|
|
1164
1280
|
if (template_id === undefined || template_id === null) {
|
|
@@ -1167,34 +1283,45 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1167
1283
|
var pathParams = {
|
|
1168
1284
|
'template_id': template_id
|
|
1169
1285
|
};
|
|
1170
|
-
var queryParams = {
|
|
1286
|
+
var queryParams = {
|
|
1287
|
+
'version': opts['version']
|
|
1288
|
+
};
|
|
1171
1289
|
var headerParams = {};
|
|
1172
1290
|
var formParams = {};
|
|
1173
1291
|
var authNames = ['api_token_basic'];
|
|
1174
1292
|
var contentTypes = [];
|
|
1175
1293
|
var accepts = ['application/json'];
|
|
1176
|
-
var returnType =
|
|
1177
|
-
|
|
1294
|
+
var returnType = {
|
|
1295
|
+
'String': Object
|
|
1296
|
+
};
|
|
1297
|
+
return this.apiClient.callApi('/templates/{template_id}/schema', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1178
1298
|
}
|
|
1179
1299
|
|
|
1180
1300
|
/**
|
|
1181
|
-
*
|
|
1182
|
-
*
|
|
1183
|
-
* @param {String}
|
|
1184
|
-
* @param {
|
|
1185
|
-
* @param {String}
|
|
1301
|
+
* Get the JSON Schema of a template's submission data
|
|
1302
|
+
* 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.
|
|
1303
|
+
* @param {String} template_id The template's ID.
|
|
1304
|
+
* @param {Object} opts Optional parameters
|
|
1305
|
+
* @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.
|
|
1306
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object.<String, {String: Object}>}
|
|
1186
1307
|
*/
|
|
1308
|
+
}, {
|
|
1309
|
+
key: "getTemplateSchema",
|
|
1310
|
+
value: function getTemplateSchema(template_id, opts) {
|
|
1311
|
+
return this.getTemplateSchemaWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1312
|
+
return response_and_data.data;
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1187
1315
|
|
|
1188
1316
|
/**
|
|
1189
1317
|
* Get a webhook
|
|
1190
|
-
*
|
|
1191
|
-
* @param {String} webhook_id
|
|
1192
|
-
* @
|
|
1193
|
-
* data is of type: {@link module:model/Webhook}
|
|
1318
|
+
* Returns a webhook.
|
|
1319
|
+
* @param {String} webhook_id The webhook's ID.
|
|
1320
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
1194
1321
|
*/
|
|
1195
1322
|
}, {
|
|
1196
|
-
key: "
|
|
1197
|
-
value: function
|
|
1323
|
+
key: "getWebhookWithHttpInfo",
|
|
1324
|
+
value: function getWebhookWithHttpInfo(webhook_id) {
|
|
1198
1325
|
var postBody = null;
|
|
1199
1326
|
// verify the required parameter 'webhook_id' is set
|
|
1200
1327
|
if (webhook_id === undefined || webhook_id === null) {
|
|
@@ -1210,148 +1337,229 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1210
1337
|
var contentTypes = [];
|
|
1211
1338
|
var accepts = ['application/json'];
|
|
1212
1339
|
var returnType = _Webhook["default"];
|
|
1213
|
-
return this.apiClient.callApi('/webhooks/{webhook_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1340
|
+
return this.apiClient.callApi('/webhooks/{webhook_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1214
1341
|
}
|
|
1215
1342
|
|
|
1216
1343
|
/**
|
|
1217
|
-
*
|
|
1218
|
-
*
|
|
1219
|
-
* @param {String}
|
|
1220
|
-
* @
|
|
1221
|
-
* @param {String} response The complete HTTP response.
|
|
1344
|
+
* Get a webhook
|
|
1345
|
+
* Returns a webhook.
|
|
1346
|
+
* @param {String} webhook_id The webhook's ID.
|
|
1347
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
1222
1348
|
*/
|
|
1349
|
+
}, {
|
|
1350
|
+
key: "getWebhook",
|
|
1351
|
+
value: function getWebhook(webhook_id) {
|
|
1352
|
+
return this.getWebhookWithHttpInfo(webhook_id).then(function (response_and_data) {
|
|
1353
|
+
return response_and_data.data;
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1223
1356
|
|
|
1224
1357
|
/**
|
|
1225
|
-
*
|
|
1226
|
-
* Returns
|
|
1358
|
+
* List combined PDFs
|
|
1359
|
+
* Returns the combined PDFs in your account, newest first, one page at a time.
|
|
1227
1360
|
* @param {Object} opts Optional parameters
|
|
1228
|
-
* @param {Number} [
|
|
1229
|
-
* @param {
|
|
1230
|
-
* @
|
|
1231
|
-
* data is of type: {@link Array.<module:model/CombinedSubmission>}
|
|
1361
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1362
|
+
* @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.
|
|
1363
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdfList} and HTTP response
|
|
1232
1364
|
*/
|
|
1233
1365
|
}, {
|
|
1234
|
-
key: "
|
|
1235
|
-
value: function
|
|
1366
|
+
key: "listCombinedPdfsWithHttpInfo",
|
|
1367
|
+
value: function listCombinedPdfsWithHttpInfo(opts) {
|
|
1236
1368
|
opts = opts || {};
|
|
1237
1369
|
var postBody = null;
|
|
1238
1370
|
var pathParams = {};
|
|
1239
1371
|
var queryParams = {
|
|
1240
|
-
'
|
|
1241
|
-
'
|
|
1372
|
+
'limit': opts['limit'],
|
|
1373
|
+
'cursor': opts['cursor']
|
|
1242
1374
|
};
|
|
1243
1375
|
var headerParams = {};
|
|
1244
1376
|
var formParams = {};
|
|
1245
1377
|
var authNames = ['api_token_basic'];
|
|
1246
1378
|
var contentTypes = [];
|
|
1247
1379
|
var accepts = ['application/json'];
|
|
1248
|
-
var returnType = [
|
|
1249
|
-
return this.apiClient.callApi('/
|
|
1380
|
+
var returnType = _CombinedPdfList["default"];
|
|
1381
|
+
return this.apiClient.callApi('/combined_pdfs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1250
1382
|
}
|
|
1251
1383
|
|
|
1252
1384
|
/**
|
|
1253
|
-
*
|
|
1254
|
-
*
|
|
1255
|
-
* @param {
|
|
1256
|
-
* @param {
|
|
1257
|
-
* @param {String}
|
|
1385
|
+
* List combined PDFs
|
|
1386
|
+
* Returns the combined PDFs in your account, newest first, one page at a time.
|
|
1387
|
+
* @param {Object} opts Optional parameters
|
|
1388
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1389
|
+
* @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.
|
|
1390
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdfList}
|
|
1258
1391
|
*/
|
|
1392
|
+
}, {
|
|
1393
|
+
key: "listCombinedPdfs",
|
|
1394
|
+
value: function listCombinedPdfs(opts) {
|
|
1395
|
+
return this.listCombinedPdfsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1396
|
+
return response_and_data.data;
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1259
1399
|
|
|
1260
1400
|
/**
|
|
1261
|
-
*
|
|
1262
|
-
* Returns
|
|
1401
|
+
* List custom files
|
|
1402
|
+
* Returns the custom files in your account, newest first, one page at a time.
|
|
1263
1403
|
* @param {Object} opts Optional parameters
|
|
1264
|
-
* @param {
|
|
1265
|
-
* @param {
|
|
1266
|
-
* data
|
|
1404
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1405
|
+
* @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.
|
|
1406
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFileList} and HTTP response
|
|
1267
1407
|
*/
|
|
1268
1408
|
}, {
|
|
1269
|
-
key: "
|
|
1270
|
-
value: function
|
|
1409
|
+
key: "listCustomFilesWithHttpInfo",
|
|
1410
|
+
value: function listCustomFilesWithHttpInfo(opts) {
|
|
1271
1411
|
opts = opts || {};
|
|
1272
1412
|
var postBody = null;
|
|
1273
1413
|
var pathParams = {};
|
|
1274
1414
|
var queryParams = {
|
|
1275
|
-
'
|
|
1415
|
+
'limit': opts['limit'],
|
|
1416
|
+
'cursor': opts['cursor']
|
|
1276
1417
|
};
|
|
1277
1418
|
var headerParams = {};
|
|
1278
1419
|
var formParams = {};
|
|
1279
1420
|
var authNames = ['api_token_basic'];
|
|
1280
1421
|
var contentTypes = [];
|
|
1281
1422
|
var accepts = ['application/json'];
|
|
1282
|
-
var returnType = [
|
|
1283
|
-
return this.apiClient.callApi('/
|
|
1423
|
+
var returnType = _CustomFileList["default"];
|
|
1424
|
+
return this.apiClient.callApi('/custom_files', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1284
1425
|
}
|
|
1285
1426
|
|
|
1286
1427
|
/**
|
|
1287
|
-
*
|
|
1288
|
-
*
|
|
1289
|
-
* @param {
|
|
1290
|
-
* @param {
|
|
1291
|
-
* @param {String}
|
|
1428
|
+
* List custom files
|
|
1429
|
+
* Returns the custom files in your account, newest first, one page at a time.
|
|
1430
|
+
* @param {Object} opts Optional parameters
|
|
1431
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1432
|
+
* @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.
|
|
1433
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFileList}
|
|
1292
1434
|
*/
|
|
1435
|
+
}, {
|
|
1436
|
+
key: "listCustomFiles",
|
|
1437
|
+
value: function listCustomFiles(opts) {
|
|
1438
|
+
return this.listCustomFilesWithHttpInfo(opts).then(function (response_and_data) {
|
|
1439
|
+
return response_and_data.data;
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1293
1442
|
|
|
1294
1443
|
/**
|
|
1295
|
-
* List
|
|
1296
|
-
* Returns
|
|
1444
|
+
* List folders
|
|
1445
|
+
* Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
1297
1446
|
* @param {Object} opts Optional parameters
|
|
1298
|
-
* @param {String} [
|
|
1299
|
-
* @param {Number} [limit]
|
|
1300
|
-
* @param {String} [
|
|
1301
|
-
* @
|
|
1302
|
-
* @param {String} [type]
|
|
1303
|
-
* @param {Boolean} [include_data]
|
|
1304
|
-
* @param {module:api/Client~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
|
|
1305
|
-
* data is of type: {@link module:model/ListSubmissionsResponse}
|
|
1447
|
+
* @param {String} [parent_folder_id] Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
1448
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1449
|
+
* @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.
|
|
1450
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FolderList} and HTTP response
|
|
1306
1451
|
*/
|
|
1307
1452
|
}, {
|
|
1308
|
-
key: "
|
|
1309
|
-
value: function
|
|
1453
|
+
key: "listFoldersWithHttpInfo",
|
|
1454
|
+
value: function listFoldersWithHttpInfo(opts) {
|
|
1310
1455
|
opts = opts || {};
|
|
1311
1456
|
var postBody = null;
|
|
1312
1457
|
var pathParams = {};
|
|
1313
1458
|
var queryParams = {
|
|
1314
|
-
'
|
|
1459
|
+
'parent_folder_id': opts['parent_folder_id'],
|
|
1315
1460
|
'limit': opts['limit'],
|
|
1461
|
+
'cursor': opts['cursor']
|
|
1462
|
+
};
|
|
1463
|
+
var headerParams = {};
|
|
1464
|
+
var formParams = {};
|
|
1465
|
+
var authNames = ['api_token_basic'];
|
|
1466
|
+
var contentTypes = [];
|
|
1467
|
+
var accepts = ['application/json'];
|
|
1468
|
+
var returnType = _FolderList["default"];
|
|
1469
|
+
return this.apiClient.callApi('/folders', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* List folders
|
|
1474
|
+
* Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
1475
|
+
* @param {Object} opts Optional parameters
|
|
1476
|
+
* @param {String} opts.parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
1477
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1478
|
+
* @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.
|
|
1479
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FolderList}
|
|
1480
|
+
*/
|
|
1481
|
+
}, {
|
|
1482
|
+
key: "listFolders",
|
|
1483
|
+
value: function listFolders(opts) {
|
|
1484
|
+
return this.listFoldersWithHttpInfo(opts).then(function (response_and_data) {
|
|
1485
|
+
return response_and_data.data;
|
|
1486
|
+
});
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* List submissions
|
|
1491
|
+
* 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`.
|
|
1492
|
+
* @param {Object} opts Optional parameters
|
|
1493
|
+
* @param {String} [template_id] Only list this template's submissions.
|
|
1494
|
+
* @param {Boolean} [test] Only list test submissions (true) or live submissions (false).
|
|
1495
|
+
* @param {Date} [created_after] Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
1496
|
+
* @param {Date} [created_before] Only list submissions created before this time.
|
|
1497
|
+
* @param {Boolean} [include_data] Include each submission's `data` (null without it).
|
|
1498
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1499
|
+
* @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.
|
|
1500
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionList} and HTTP response
|
|
1501
|
+
*/
|
|
1502
|
+
}, {
|
|
1503
|
+
key: "listSubmissionsWithHttpInfo",
|
|
1504
|
+
value: function listSubmissionsWithHttpInfo(opts) {
|
|
1505
|
+
opts = opts || {};
|
|
1506
|
+
var postBody = null;
|
|
1507
|
+
var pathParams = {};
|
|
1508
|
+
var queryParams = {
|
|
1509
|
+
'template_id': opts['template_id'],
|
|
1510
|
+
'test': opts['test'],
|
|
1316
1511
|
'created_after': opts['created_after'],
|
|
1317
1512
|
'created_before': opts['created_before'],
|
|
1318
|
-
'
|
|
1319
|
-
'
|
|
1513
|
+
'include_data': opts['include_data'],
|
|
1514
|
+
'limit': opts['limit'],
|
|
1515
|
+
'cursor': opts['cursor']
|
|
1320
1516
|
};
|
|
1321
1517
|
var headerParams = {};
|
|
1322
1518
|
var formParams = {};
|
|
1323
1519
|
var authNames = ['api_token_basic'];
|
|
1324
1520
|
var contentTypes = [];
|
|
1325
1521
|
var accepts = ['application/json'];
|
|
1326
|
-
var returnType =
|
|
1327
|
-
return this.apiClient.callApi('/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1522
|
+
var returnType = _SubmissionList["default"];
|
|
1523
|
+
return this.apiClient.callApi('/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1328
1524
|
}
|
|
1329
1525
|
|
|
1330
1526
|
/**
|
|
1331
|
-
*
|
|
1332
|
-
*
|
|
1333
|
-
* @param {
|
|
1334
|
-
* @param {
|
|
1335
|
-
* @param {
|
|
1527
|
+
* List submissions
|
|
1528
|
+
* 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`.
|
|
1529
|
+
* @param {Object} opts Optional parameters
|
|
1530
|
+
* @param {String} opts.template_id Only list this template's submissions.
|
|
1531
|
+
* @param {Boolean} opts.test Only list test submissions (true) or live submissions (false).
|
|
1532
|
+
* @param {Date} opts.created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
1533
|
+
* @param {Date} opts.created_before Only list submissions created before this time.
|
|
1534
|
+
* @param {Boolean} opts.include_data Include each submission's `data` (null without it).
|
|
1535
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1536
|
+
* @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.
|
|
1537
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionList}
|
|
1336
1538
|
*/
|
|
1539
|
+
}, {
|
|
1540
|
+
key: "listSubmissions",
|
|
1541
|
+
value: function listSubmissions(opts) {
|
|
1542
|
+
return this.listSubmissionsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1543
|
+
return response_and_data.data;
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1337
1546
|
|
|
1338
1547
|
/**
|
|
1339
|
-
* List
|
|
1340
|
-
* Returns a
|
|
1341
|
-
* @param {String} template_id
|
|
1548
|
+
* List a template's submissions
|
|
1549
|
+
* Returns a template's submissions (from every version of the template), newest first.
|
|
1550
|
+
* @param {String} template_id The template's ID.
|
|
1342
1551
|
* @param {Object} opts Optional parameters
|
|
1343
|
-
* @param {
|
|
1344
|
-
* @param {
|
|
1345
|
-
* @param {
|
|
1346
|
-
* @param {
|
|
1347
|
-
* @param {
|
|
1348
|
-
* @param {
|
|
1349
|
-
* @
|
|
1350
|
-
* data is of type: {@link module:model/ListSubmissionsResponse}
|
|
1552
|
+
* @param {Boolean} [test] Only list test submissions (true) or live submissions (false).
|
|
1553
|
+
* @param {Date} [created_after] Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
1554
|
+
* @param {Date} [created_before] Only list submissions created before this time.
|
|
1555
|
+
* @param {Boolean} [include_data] Include each submission's `data` (null without it).
|
|
1556
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1557
|
+
* @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.
|
|
1558
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionList} and HTTP response
|
|
1351
1559
|
*/
|
|
1352
1560
|
}, {
|
|
1353
|
-
key: "
|
|
1354
|
-
value: function
|
|
1561
|
+
key: "listTemplateSubmissionsWithHttpInfo",
|
|
1562
|
+
value: function listTemplateSubmissionsWithHttpInfo(template_id, opts) {
|
|
1355
1563
|
opts = opts || {};
|
|
1356
1564
|
var postBody = null;
|
|
1357
1565
|
// verify the required parameter 'template_id' is set
|
|
@@ -1362,135 +1570,168 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1362
1570
|
'template_id': template_id
|
|
1363
1571
|
};
|
|
1364
1572
|
var queryParams = {
|
|
1365
|
-
'
|
|
1366
|
-
'limit': opts['limit'],
|
|
1573
|
+
'test': opts['test'],
|
|
1367
1574
|
'created_after': opts['created_after'],
|
|
1368
1575
|
'created_before': opts['created_before'],
|
|
1369
|
-
'
|
|
1370
|
-
'
|
|
1576
|
+
'include_data': opts['include_data'],
|
|
1577
|
+
'limit': opts['limit'],
|
|
1578
|
+
'cursor': opts['cursor']
|
|
1371
1579
|
};
|
|
1372
1580
|
var headerParams = {};
|
|
1373
1581
|
var formParams = {};
|
|
1374
1582
|
var authNames = ['api_token_basic'];
|
|
1375
1583
|
var contentTypes = [];
|
|
1376
1584
|
var accepts = ['application/json'];
|
|
1377
|
-
var returnType =
|
|
1378
|
-
return this.apiClient.callApi('/templates/{template_id}/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1585
|
+
var returnType = _SubmissionList["default"];
|
|
1586
|
+
return this.apiClient.callApi('/templates/{template_id}/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1379
1587
|
}
|
|
1380
1588
|
|
|
1381
1589
|
/**
|
|
1382
|
-
*
|
|
1383
|
-
*
|
|
1384
|
-
* @param {String}
|
|
1385
|
-
* @param {
|
|
1386
|
-
* @param {
|
|
1590
|
+
* List a template's submissions
|
|
1591
|
+
* Returns a template's submissions (from every version of the template), newest first.
|
|
1592
|
+
* @param {String} template_id The template's ID.
|
|
1593
|
+
* @param {Object} opts Optional parameters
|
|
1594
|
+
* @param {Boolean} opts.test Only list test submissions (true) or live submissions (false).
|
|
1595
|
+
* @param {Date} opts.created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
1596
|
+
* @param {Date} opts.created_before Only list submissions created before this time.
|
|
1597
|
+
* @param {Boolean} opts.include_data Include each submission's `data` (null without it).
|
|
1598
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1599
|
+
* @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.
|
|
1600
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionList}
|
|
1387
1601
|
*/
|
|
1602
|
+
}, {
|
|
1603
|
+
key: "listTemplateSubmissions",
|
|
1604
|
+
value: function listTemplateSubmissions(template_id, opts) {
|
|
1605
|
+
return this.listTemplateSubmissionsWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1606
|
+
return response_and_data.data;
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1388
1609
|
|
|
1389
1610
|
/**
|
|
1390
|
-
*
|
|
1391
|
-
*
|
|
1611
|
+
* List templates
|
|
1612
|
+
* 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.
|
|
1392
1613
|
* @param {Object} opts Optional parameters
|
|
1393
|
-
* @param {String} [query]
|
|
1394
|
-
* @param {String} [parent_folder_id]
|
|
1395
|
-
* @param {Number} [
|
|
1396
|
-
* @param {
|
|
1397
|
-
* @
|
|
1398
|
-
* data is of type: {@link Array.<module:model/TemplatePreview>}
|
|
1614
|
+
* @param {String} [query] Only list templates whose name contains this text (ignoring case).
|
|
1615
|
+
* @param {String} [parent_folder_id] Only list the templates in this folder (not in its subfolders).
|
|
1616
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1617
|
+
* @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.
|
|
1618
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateSummaryList} and HTTP response
|
|
1399
1619
|
*/
|
|
1400
1620
|
}, {
|
|
1401
|
-
key: "
|
|
1402
|
-
value: function
|
|
1621
|
+
key: "listTemplatesWithHttpInfo",
|
|
1622
|
+
value: function listTemplatesWithHttpInfo(opts) {
|
|
1403
1623
|
opts = opts || {};
|
|
1404
1624
|
var postBody = null;
|
|
1405
1625
|
var pathParams = {};
|
|
1406
1626
|
var queryParams = {
|
|
1407
1627
|
'query': opts['query'],
|
|
1408
1628
|
'parent_folder_id': opts['parent_folder_id'],
|
|
1409
|
-
'
|
|
1410
|
-
'
|
|
1629
|
+
'limit': opts['limit'],
|
|
1630
|
+
'cursor': opts['cursor']
|
|
1411
1631
|
};
|
|
1412
1632
|
var headerParams = {};
|
|
1413
1633
|
var formParams = {};
|
|
1414
1634
|
var authNames = ['api_token_basic'];
|
|
1415
1635
|
var contentTypes = [];
|
|
1416
1636
|
var accepts = ['application/json'];
|
|
1417
|
-
var returnType = [
|
|
1418
|
-
return this.apiClient.callApi('/templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1637
|
+
var returnType = _TemplateSummaryList["default"];
|
|
1638
|
+
return this.apiClient.callApi('/templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1419
1639
|
}
|
|
1420
1640
|
|
|
1421
1641
|
/**
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1424
|
-
* @param {
|
|
1425
|
-
* @param {
|
|
1426
|
-
* @param {String}
|
|
1642
|
+
* List templates
|
|
1643
|
+
* 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.
|
|
1644
|
+
* @param {Object} opts Optional parameters
|
|
1645
|
+
* @param {String} opts.query Only list templates whose name contains this text (ignoring case).
|
|
1646
|
+
* @param {String} opts.parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
1647
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1648
|
+
* @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.
|
|
1649
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateSummaryList}
|
|
1427
1650
|
*/
|
|
1651
|
+
}, {
|
|
1652
|
+
key: "listTemplates",
|
|
1653
|
+
value: function listTemplates(opts) {
|
|
1654
|
+
return this.listTemplatesWithHttpInfo(opts).then(function (response_and_data) {
|
|
1655
|
+
return response_and_data.data;
|
|
1656
|
+
});
|
|
1657
|
+
}
|
|
1428
1658
|
|
|
1429
1659
|
/**
|
|
1430
|
-
*
|
|
1431
|
-
* Returns
|
|
1660
|
+
* List webhooks
|
|
1661
|
+
* 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.
|
|
1432
1662
|
* @param {Object} opts Optional parameters
|
|
1433
|
-
* @param {
|
|
1434
|
-
* @param {
|
|
1435
|
-
* @param {String} [
|
|
1436
|
-
* @param {String} [
|
|
1437
|
-
* @param {String} [
|
|
1438
|
-
* @param {
|
|
1439
|
-
* @param {String} [
|
|
1440
|
-
* @
|
|
1441
|
-
* data is of type: {@link Array.<module:model/Webhook>}
|
|
1663
|
+
* @param {module:model/WebhookEventType} [event_type] Only list webhooks that subscribe to this event.
|
|
1664
|
+
* @param {module:model/WebhookMode} [mode] Only list webhooks set to this mode.
|
|
1665
|
+
* @param {String} [template_id] Only list webhooks scoped to this template.
|
|
1666
|
+
* @param {String} [folder_id] Only list webhooks scoped to this folder.
|
|
1667
|
+
* @param {String} [api_token_id] Only list webhooks scoped to this API token.
|
|
1668
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1669
|
+
* @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.
|
|
1670
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WebhookList} and HTTP response
|
|
1442
1671
|
*/
|
|
1443
1672
|
}, {
|
|
1444
|
-
key: "
|
|
1445
|
-
value: function
|
|
1673
|
+
key: "listWebhooksWithHttpInfo",
|
|
1674
|
+
value: function listWebhooksWithHttpInfo(opts) {
|
|
1446
1675
|
opts = opts || {};
|
|
1447
1676
|
var postBody = null;
|
|
1448
1677
|
var pathParams = {};
|
|
1449
1678
|
var queryParams = {
|
|
1450
|
-
'page': opts['page'],
|
|
1451
|
-
'per_page': opts['per_page'],
|
|
1452
1679
|
'event_type': opts['event_type'],
|
|
1453
1680
|
'mode': opts['mode'],
|
|
1454
1681
|
'template_id': opts['template_id'],
|
|
1455
1682
|
'folder_id': opts['folder_id'],
|
|
1456
|
-
'api_token_id': opts['api_token_id']
|
|
1683
|
+
'api_token_id': opts['api_token_id'],
|
|
1684
|
+
'limit': opts['limit'],
|
|
1685
|
+
'cursor': opts['cursor']
|
|
1457
1686
|
};
|
|
1458
1687
|
var headerParams = {};
|
|
1459
1688
|
var formParams = {};
|
|
1460
1689
|
var authNames = ['api_token_basic'];
|
|
1461
1690
|
var contentTypes = [];
|
|
1462
1691
|
var accepts = ['application/json'];
|
|
1463
|
-
var returnType = [
|
|
1464
|
-
return this.apiClient.callApi('/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1692
|
+
var returnType = _WebhookList["default"];
|
|
1693
|
+
return this.apiClient.callApi('/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1465
1694
|
}
|
|
1466
1695
|
|
|
1467
1696
|
/**
|
|
1468
|
-
*
|
|
1469
|
-
*
|
|
1470
|
-
* @param {
|
|
1471
|
-
* @param {module:model/
|
|
1472
|
-
* @param {
|
|
1697
|
+
* List webhooks
|
|
1698
|
+
* 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.
|
|
1699
|
+
* @param {Object} opts Optional parameters
|
|
1700
|
+
* @param {module:model/WebhookEventType} opts.event_type Only list webhooks that subscribe to this event.
|
|
1701
|
+
* @param {module:model/WebhookMode} opts.mode Only list webhooks set to this mode.
|
|
1702
|
+
* @param {String} opts.template_id Only list webhooks scoped to this template.
|
|
1703
|
+
* @param {String} opts.folder_id Only list webhooks scoped to this folder.
|
|
1704
|
+
* @param {String} opts.api_token_id Only list webhooks scoped to this API token.
|
|
1705
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1706
|
+
* @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.
|
|
1707
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookList}
|
|
1473
1708
|
*/
|
|
1709
|
+
}, {
|
|
1710
|
+
key: "listWebhooks",
|
|
1711
|
+
value: function listWebhooks(opts) {
|
|
1712
|
+
return this.listWebhooksWithHttpInfo(opts).then(function (response_and_data) {
|
|
1713
|
+
return response_and_data.data;
|
|
1714
|
+
});
|
|
1715
|
+
}
|
|
1474
1716
|
|
|
1475
1717
|
/**
|
|
1476
1718
|
* Move a folder
|
|
1477
|
-
* Moves a folder
|
|
1478
|
-
* @param {String} folder_id
|
|
1479
|
-
* @param {module:model/
|
|
1480
|
-
* @
|
|
1481
|
-
* data is of type: {@link module:model/Folder}
|
|
1719
|
+
* 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.
|
|
1720
|
+
* @param {String} folder_id The folder's ID.
|
|
1721
|
+
* @param {module:model/MoveFolderRequest} body Where to move the folder.
|
|
1722
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
1482
1723
|
*/
|
|
1483
1724
|
}, {
|
|
1484
|
-
key: "
|
|
1485
|
-
value: function
|
|
1486
|
-
var postBody =
|
|
1725
|
+
key: "moveFolderWithHttpInfo",
|
|
1726
|
+
value: function moveFolderWithHttpInfo(folder_id, body) {
|
|
1727
|
+
var postBody = body;
|
|
1487
1728
|
// verify the required parameter 'folder_id' is set
|
|
1488
1729
|
if (folder_id === undefined || folder_id === null) {
|
|
1489
|
-
throw new Error("Missing the required parameter 'folder_id' when calling
|
|
1730
|
+
throw new Error("Missing the required parameter 'folder_id' when calling moveFolder");
|
|
1490
1731
|
}
|
|
1491
|
-
// verify the required parameter '
|
|
1492
|
-
if (
|
|
1493
|
-
throw new Error("Missing the required parameter '
|
|
1732
|
+
// verify the required parameter 'body' is set
|
|
1733
|
+
if (body === undefined || body === null) {
|
|
1734
|
+
throw new Error("Missing the required parameter 'body' when calling moveFolder");
|
|
1494
1735
|
}
|
|
1495
1736
|
var pathParams = {
|
|
1496
1737
|
'folder_id': folder_id
|
|
@@ -1502,36 +1743,42 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1502
1743
|
var contentTypes = ['application/json'];
|
|
1503
1744
|
var accepts = ['application/json'];
|
|
1504
1745
|
var returnType = _Folder["default"];
|
|
1505
|
-
return this.apiClient.callApi('/folders/{folder_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1746
|
+
return this.apiClient.callApi('/folders/{folder_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1506
1747
|
}
|
|
1507
1748
|
|
|
1508
1749
|
/**
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1511
|
-
* @param {String}
|
|
1512
|
-
* @param {module:model/
|
|
1513
|
-
* @
|
|
1750
|
+
* Move a folder
|
|
1751
|
+
* 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.
|
|
1752
|
+
* @param {String} folder_id The folder's ID.
|
|
1753
|
+
* @param {module:model/MoveFolderRequest} body Where to move the folder.
|
|
1754
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
1514
1755
|
*/
|
|
1756
|
+
}, {
|
|
1757
|
+
key: "moveFolder",
|
|
1758
|
+
value: function moveFolder(folder_id, body) {
|
|
1759
|
+
return this.moveFolderWithHttpInfo(folder_id, body).then(function (response_and_data) {
|
|
1760
|
+
return response_and_data.data;
|
|
1761
|
+
});
|
|
1762
|
+
}
|
|
1515
1763
|
|
|
1516
1764
|
/**
|
|
1517
|
-
* Move
|
|
1518
|
-
* Moves a template
|
|
1519
|
-
* @param {String} template_id
|
|
1520
|
-
* @param {module:model/
|
|
1521
|
-
* @
|
|
1522
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
1765
|
+
* Move a template to a folder
|
|
1766
|
+
* Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
1767
|
+
* @param {String} template_id The template's ID.
|
|
1768
|
+
* @param {module:model/MoveTemplateRequest} body Where to move the template.
|
|
1769
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1523
1770
|
*/
|
|
1524
1771
|
}, {
|
|
1525
|
-
key: "
|
|
1526
|
-
value: function
|
|
1527
|
-
var postBody =
|
|
1772
|
+
key: "moveTemplateWithHttpInfo",
|
|
1773
|
+
value: function moveTemplateWithHttpInfo(template_id, body) {
|
|
1774
|
+
var postBody = body;
|
|
1528
1775
|
// verify the required parameter 'template_id' is set
|
|
1529
1776
|
if (template_id === undefined || template_id === null) {
|
|
1530
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
1777
|
+
throw new Error("Missing the required parameter 'template_id' when calling moveTemplate");
|
|
1531
1778
|
}
|
|
1532
|
-
// verify the required parameter '
|
|
1533
|
-
if (
|
|
1534
|
-
throw new Error("Missing the required parameter '
|
|
1779
|
+
// verify the required parameter 'body' is set
|
|
1780
|
+
if (body === undefined || body === null) {
|
|
1781
|
+
throw new Error("Missing the required parameter 'body' when calling moveTemplate");
|
|
1535
1782
|
}
|
|
1536
1783
|
var pathParams = {
|
|
1537
1784
|
'template_id': template_id
|
|
@@ -1542,37 +1789,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1542
1789
|
var authNames = ['api_token_basic'];
|
|
1543
1790
|
var contentTypes = ['application/json'];
|
|
1544
1791
|
var accepts = ['application/json'];
|
|
1545
|
-
var returnType =
|
|
1546
|
-
return this.apiClient.callApi('/templates/{template_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1792
|
+
var returnType = _Template["default"];
|
|
1793
|
+
return this.apiClient.callApi('/templates/{template_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1547
1794
|
}
|
|
1548
1795
|
|
|
1549
1796
|
/**
|
|
1550
|
-
*
|
|
1551
|
-
*
|
|
1552
|
-
* @param {String}
|
|
1553
|
-
* @param {module:model/
|
|
1554
|
-
* @
|
|
1797
|
+
* Move a template to a folder
|
|
1798
|
+
* Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
1799
|
+
* @param {String} template_id The template's ID.
|
|
1800
|
+
* @param {module:model/MoveTemplateRequest} body Where to move the template.
|
|
1801
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1555
1802
|
*/
|
|
1803
|
+
}, {
|
|
1804
|
+
key: "moveTemplate",
|
|
1805
|
+
value: function moveTemplate(template_id, body) {
|
|
1806
|
+
return this.moveTemplateWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
1807
|
+
return response_and_data.data;
|
|
1808
|
+
});
|
|
1809
|
+
}
|
|
1556
1810
|
|
|
1557
1811
|
/**
|
|
1558
1812
|
* Publish a template version
|
|
1559
|
-
* Publishes the
|
|
1560
|
-
* @param {String} template_id
|
|
1561
|
-
* @param {module:model/
|
|
1562
|
-
* @
|
|
1563
|
-
* data is of type: {@link module:model/TemplatePublishVersionResponse}
|
|
1813
|
+
* 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.
|
|
1814
|
+
* @param {String} template_id The template's ID.
|
|
1815
|
+
* @param {module:model/PublishTemplateVersionRequest} body The version to publish.
|
|
1816
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateVersion} and HTTP response
|
|
1564
1817
|
*/
|
|
1565
1818
|
}, {
|
|
1566
|
-
key: "
|
|
1567
|
-
value: function
|
|
1568
|
-
var postBody =
|
|
1819
|
+
key: "publishTemplateVersionWithHttpInfo",
|
|
1820
|
+
value: function publishTemplateVersionWithHttpInfo(template_id, body) {
|
|
1821
|
+
var postBody = body;
|
|
1569
1822
|
// verify the required parameter 'template_id' is set
|
|
1570
1823
|
if (template_id === undefined || template_id === null) {
|
|
1571
1824
|
throw new Error("Missing the required parameter 'template_id' when calling publishTemplateVersion");
|
|
1572
1825
|
}
|
|
1573
|
-
// verify the required parameter '
|
|
1574
|
-
if (
|
|
1575
|
-
throw new Error("Missing the required parameter '
|
|
1826
|
+
// verify the required parameter 'body' is set
|
|
1827
|
+
if (body === undefined || body === null) {
|
|
1828
|
+
throw new Error("Missing the required parameter 'body' when calling publishTemplateVersion");
|
|
1576
1829
|
}
|
|
1577
1830
|
var pathParams = {
|
|
1578
1831
|
'template_id': template_id
|
|
@@ -1583,37 +1836,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1583
1836
|
var authNames = ['api_token_basic'];
|
|
1584
1837
|
var contentTypes = ['application/json'];
|
|
1585
1838
|
var accepts = ['application/json'];
|
|
1586
|
-
var returnType =
|
|
1587
|
-
return this.apiClient.callApi('/templates/{template_id}/publish_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1839
|
+
var returnType = _TemplateVersion["default"];
|
|
1840
|
+
return this.apiClient.callApi('/templates/{template_id}/publish_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1588
1841
|
}
|
|
1589
1842
|
|
|
1590
1843
|
/**
|
|
1591
|
-
*
|
|
1592
|
-
*
|
|
1593
|
-
* @param {String}
|
|
1594
|
-
* @param {module:model/
|
|
1595
|
-
* @
|
|
1844
|
+
* Publish a template version
|
|
1845
|
+
* 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.
|
|
1846
|
+
* @param {String} template_id The template's ID.
|
|
1847
|
+
* @param {module:model/PublishTemplateVersionRequest} body The version to publish.
|
|
1848
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateVersion}
|
|
1596
1849
|
*/
|
|
1850
|
+
}, {
|
|
1851
|
+
key: "publishTemplateVersion",
|
|
1852
|
+
value: function publishTemplateVersion(template_id, body) {
|
|
1853
|
+
return this.publishTemplateVersionWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
1854
|
+
return response_and_data.data;
|
|
1855
|
+
});
|
|
1856
|
+
}
|
|
1597
1857
|
|
|
1598
1858
|
/**
|
|
1599
1859
|
* Rename a folder
|
|
1600
|
-
* Renames
|
|
1601
|
-
* @param {String} folder_id
|
|
1602
|
-
* @param {module:model/
|
|
1603
|
-
* @
|
|
1604
|
-
* data is of type: {@link module:model/Folder}
|
|
1860
|
+
* Renames a folder. The name must be unique within its parent folder.
|
|
1861
|
+
* @param {String} folder_id The folder's ID.
|
|
1862
|
+
* @param {module:model/RenameFolderRequest} body The folder's new name.
|
|
1863
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
1605
1864
|
*/
|
|
1606
1865
|
}, {
|
|
1607
|
-
key: "
|
|
1608
|
-
value: function
|
|
1609
|
-
var postBody =
|
|
1866
|
+
key: "renameFolderWithHttpInfo",
|
|
1867
|
+
value: function renameFolderWithHttpInfo(folder_id, body) {
|
|
1868
|
+
var postBody = body;
|
|
1610
1869
|
// verify the required parameter 'folder_id' is set
|
|
1611
1870
|
if (folder_id === undefined || folder_id === null) {
|
|
1612
1871
|
throw new Error("Missing the required parameter 'folder_id' when calling renameFolder");
|
|
1613
1872
|
}
|
|
1614
|
-
// verify the required parameter '
|
|
1615
|
-
if (
|
|
1616
|
-
throw new Error("Missing the required parameter '
|
|
1873
|
+
// verify the required parameter 'body' is set
|
|
1874
|
+
if (body === undefined || body === null) {
|
|
1875
|
+
throw new Error("Missing the required parameter 'body' when calling renameFolder");
|
|
1617
1876
|
}
|
|
1618
1877
|
var pathParams = {
|
|
1619
1878
|
'folder_id': folder_id
|
|
@@ -1625,36 +1884,42 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1625
1884
|
var contentTypes = ['application/json'];
|
|
1626
1885
|
var accepts = ['application/json'];
|
|
1627
1886
|
var returnType = _Folder["default"];
|
|
1628
|
-
return this.apiClient.callApi('/folders/{folder_id}/rename', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1887
|
+
return this.apiClient.callApi('/folders/{folder_id}/rename', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1629
1888
|
}
|
|
1630
1889
|
|
|
1631
1890
|
/**
|
|
1632
|
-
*
|
|
1633
|
-
*
|
|
1634
|
-
* @param {String}
|
|
1635
|
-
* @param {module:model/
|
|
1636
|
-
* @
|
|
1891
|
+
* Rename a folder
|
|
1892
|
+
* Renames a folder. The name must be unique within its parent folder.
|
|
1893
|
+
* @param {String} folder_id The folder's ID.
|
|
1894
|
+
* @param {module:model/RenameFolderRequest} body The folder's new name.
|
|
1895
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
1637
1896
|
*/
|
|
1897
|
+
}, {
|
|
1898
|
+
key: "renameFolder",
|
|
1899
|
+
value: function renameFolder(folder_id, body) {
|
|
1900
|
+
return this.renameFolderWithHttpInfo(folder_id, body).then(function (response_and_data) {
|
|
1901
|
+
return response_and_data.data;
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1638
1904
|
|
|
1639
1905
|
/**
|
|
1640
1906
|
* Restore a template version
|
|
1641
|
-
*
|
|
1642
|
-
* @param {String} template_id
|
|
1643
|
-
* @param {module:model/
|
|
1644
|
-
* @
|
|
1645
|
-
* data is of type: {@link module:model/SuccessErrorResponse}
|
|
1907
|
+
* Replaces the template's draft with a copy of one of its published versions.
|
|
1908
|
+
* @param {String} template_id The template's ID.
|
|
1909
|
+
* @param {module:model/RestoreTemplateVersionRequest} body The version to restore.
|
|
1910
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1646
1911
|
*/
|
|
1647
1912
|
}, {
|
|
1648
|
-
key: "
|
|
1649
|
-
value: function
|
|
1650
|
-
var postBody =
|
|
1913
|
+
key: "restoreTemplateVersionWithHttpInfo",
|
|
1914
|
+
value: function restoreTemplateVersionWithHttpInfo(template_id, body) {
|
|
1915
|
+
var postBody = body;
|
|
1651
1916
|
// verify the required parameter 'template_id' is set
|
|
1652
1917
|
if (template_id === undefined || template_id === null) {
|
|
1653
1918
|
throw new Error("Missing the required parameter 'template_id' when calling restoreTemplateVersion");
|
|
1654
1919
|
}
|
|
1655
|
-
// verify the required parameter '
|
|
1656
|
-
if (
|
|
1657
|
-
throw new Error("Missing the required parameter '
|
|
1920
|
+
// verify the required parameter 'body' is set
|
|
1921
|
+
if (body === undefined || body === null) {
|
|
1922
|
+
throw new Error("Missing the required parameter 'body' when calling restoreTemplateVersion");
|
|
1658
1923
|
}
|
|
1659
1924
|
var pathParams = {
|
|
1660
1925
|
'template_id': template_id
|
|
@@ -1665,27 +1930,33 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1665
1930
|
var authNames = ['api_token_basic'];
|
|
1666
1931
|
var contentTypes = ['application/json'];
|
|
1667
1932
|
var accepts = ['application/json'];
|
|
1668
|
-
var returnType =
|
|
1669
|
-
return this.apiClient.callApi('/templates/{template_id}/restore_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1933
|
+
var returnType = _Template["default"];
|
|
1934
|
+
return this.apiClient.callApi('/templates/{template_id}/restore_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1670
1935
|
}
|
|
1671
1936
|
|
|
1672
1937
|
/**
|
|
1673
|
-
*
|
|
1674
|
-
*
|
|
1675
|
-
* @param {String}
|
|
1676
|
-
* @param {module:model/
|
|
1677
|
-
* @
|
|
1938
|
+
* Restore a template version
|
|
1939
|
+
* Replaces the template's draft with a copy of one of its published versions.
|
|
1940
|
+
* @param {String} template_id The template's ID.
|
|
1941
|
+
* @param {module:model/RestoreTemplateVersionRequest} body The version to restore.
|
|
1942
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1678
1943
|
*/
|
|
1944
|
+
}, {
|
|
1945
|
+
key: "restoreTemplateVersion",
|
|
1946
|
+
value: function restoreTemplateVersion(template_id, body) {
|
|
1947
|
+
return this.restoreTemplateVersionWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
1948
|
+
return response_and_data.data;
|
|
1949
|
+
});
|
|
1950
|
+
}
|
|
1679
1951
|
|
|
1680
1952
|
/**
|
|
1681
1953
|
* Test authentication
|
|
1682
|
-
* Checks whether your API token is valid by making an authenticated request.
|
|
1683
|
-
* @
|
|
1684
|
-
* data is of type: {@link module:model/SuccessErrorResponse}
|
|
1954
|
+
* Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
1955
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AuthenticationCheck} and HTTP response
|
|
1685
1956
|
*/
|
|
1686
1957
|
}, {
|
|
1687
|
-
key: "
|
|
1688
|
-
value: function
|
|
1958
|
+
key: "testAuthenticationWithHttpInfo",
|
|
1959
|
+
value: function testAuthenticationWithHttpInfo() {
|
|
1689
1960
|
var postBody = null;
|
|
1690
1961
|
var pathParams = {};
|
|
1691
1962
|
var queryParams = {};
|
|
@@ -1694,40 +1965,44 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1694
1965
|
var authNames = ['api_token_basic'];
|
|
1695
1966
|
var contentTypes = [];
|
|
1696
1967
|
var accepts = ['application/json'];
|
|
1697
|
-
var returnType =
|
|
1698
|
-
return this.apiClient.callApi('/authentication', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1968
|
+
var returnType = _AuthenticationCheck["default"];
|
|
1969
|
+
return this.apiClient.callApi('/authentication', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1699
1970
|
}
|
|
1700
1971
|
|
|
1701
1972
|
/**
|
|
1702
|
-
*
|
|
1703
|
-
*
|
|
1704
|
-
* @
|
|
1705
|
-
* @param {module:model/CreateSubmissionDataRequestResponse} data The data returned by the service call.
|
|
1706
|
-
* @param {String} response The complete HTTP response.
|
|
1973
|
+
* Test authentication
|
|
1974
|
+
* Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
1975
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AuthenticationCheck}
|
|
1707
1976
|
*/
|
|
1977
|
+
}, {
|
|
1978
|
+
key: "testAuthentication",
|
|
1979
|
+
value: function testAuthentication() {
|
|
1980
|
+
return this.testAuthenticationWithHttpInfo().then(function (response_and_data) {
|
|
1981
|
+
return response_and_data.data;
|
|
1982
|
+
});
|
|
1983
|
+
}
|
|
1708
1984
|
|
|
1709
1985
|
/**
|
|
1710
|
-
* Update a
|
|
1711
|
-
*
|
|
1712
|
-
* @param {String}
|
|
1713
|
-
* @param {module:model/
|
|
1714
|
-
* @
|
|
1715
|
-
* data is of type: {@link module:model/CreateSubmissionDataRequestResponse}
|
|
1986
|
+
* Update a signature request
|
|
1987
|
+
* 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.
|
|
1988
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
1989
|
+
* @param {module:model/UpdateSignatureRequestRequest} body The settings to change. Properties left out keep their values.
|
|
1990
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequest} and HTTP response
|
|
1716
1991
|
*/
|
|
1717
1992
|
}, {
|
|
1718
|
-
key: "
|
|
1719
|
-
value: function
|
|
1720
|
-
var postBody =
|
|
1721
|
-
// verify the required parameter '
|
|
1722
|
-
if (
|
|
1723
|
-
throw new Error("Missing the required parameter '
|
|
1993
|
+
key: "updateSignatureRequestWithHttpInfo",
|
|
1994
|
+
value: function updateSignatureRequestWithHttpInfo(signature_request_id, body) {
|
|
1995
|
+
var postBody = body;
|
|
1996
|
+
// verify the required parameter 'signature_request_id' is set
|
|
1997
|
+
if (signature_request_id === undefined || signature_request_id === null) {
|
|
1998
|
+
throw new Error("Missing the required parameter 'signature_request_id' when calling updateSignatureRequest");
|
|
1724
1999
|
}
|
|
1725
|
-
// verify the required parameter '
|
|
1726
|
-
if (
|
|
1727
|
-
throw new Error("Missing the required parameter '
|
|
2000
|
+
// verify the required parameter 'body' is set
|
|
2001
|
+
if (body === undefined || body === null) {
|
|
2002
|
+
throw new Error("Missing the required parameter 'body' when calling updateSignatureRequest");
|
|
1728
2003
|
}
|
|
1729
2004
|
var pathParams = {
|
|
1730
|
-
'
|
|
2005
|
+
'signature_request_id': signature_request_id
|
|
1731
2006
|
};
|
|
1732
2007
|
var queryParams = {};
|
|
1733
2008
|
var headerParams = {};
|
|
@@ -1735,37 +2010,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1735
2010
|
var authNames = ['api_token_basic'];
|
|
1736
2011
|
var contentTypes = ['application/json'];
|
|
1737
2012
|
var accepts = ['application/json'];
|
|
1738
|
-
var returnType =
|
|
1739
|
-
return this.apiClient.callApi('/
|
|
2013
|
+
var returnType = _SignatureRequest["default"];
|
|
2014
|
+
return this.apiClient.callApi('/signature_requests/{signature_request_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1740
2015
|
}
|
|
1741
2016
|
|
|
1742
2017
|
/**
|
|
1743
|
-
*
|
|
1744
|
-
*
|
|
1745
|
-
* @param {String}
|
|
1746
|
-
* @param {module:model/
|
|
1747
|
-
* @
|
|
2018
|
+
* Update a signature request
|
|
2019
|
+
* 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.
|
|
2020
|
+
* @param {String} signature_request_id The signature request's ID.
|
|
2021
|
+
* @param {module:model/UpdateSignatureRequestRequest} body The settings to change. Properties left out keep their values.
|
|
2022
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequest}
|
|
1748
2023
|
*/
|
|
2024
|
+
}, {
|
|
2025
|
+
key: "updateSignatureRequest",
|
|
2026
|
+
value: function updateSignatureRequest(signature_request_id, body) {
|
|
2027
|
+
return this.updateSignatureRequestWithHttpInfo(signature_request_id, body).then(function (response_and_data) {
|
|
2028
|
+
return response_and_data.data;
|
|
2029
|
+
});
|
|
2030
|
+
}
|
|
1749
2031
|
|
|
1750
2032
|
/**
|
|
1751
|
-
* Update a
|
|
1752
|
-
*
|
|
1753
|
-
* @param {String} template_id
|
|
1754
|
-
* @param {module:model/
|
|
1755
|
-
* @
|
|
1756
|
-
* data is of type: {@link module:model/SuccessMultipleErrorsResponse}
|
|
2033
|
+
* Update a template
|
|
2034
|
+
* Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object. Setting `parent_folder_id` moves the template and all of its published versions.
|
|
2035
|
+
* @param {String} template_id The template's ID.
|
|
2036
|
+
* @param {module:model/UpdateTemplateRequest} body The settings to change. Properties left out keep their values.
|
|
2037
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1757
2038
|
*/
|
|
1758
2039
|
}, {
|
|
1759
|
-
key: "
|
|
1760
|
-
value: function
|
|
1761
|
-
var postBody =
|
|
2040
|
+
key: "updateTemplateWithHttpInfo",
|
|
2041
|
+
value: function updateTemplateWithHttpInfo(template_id, body) {
|
|
2042
|
+
var postBody = body;
|
|
1762
2043
|
// verify the required parameter 'template_id' is set
|
|
1763
2044
|
if (template_id === undefined || template_id === null) {
|
|
1764
2045
|
throw new Error("Missing the required parameter 'template_id' when calling updateTemplate");
|
|
1765
2046
|
}
|
|
1766
|
-
// verify the required parameter '
|
|
1767
|
-
if (
|
|
1768
|
-
throw new Error("Missing the required parameter '
|
|
2047
|
+
// verify the required parameter 'body' is set
|
|
2048
|
+
if (body === undefined || body === null) {
|
|
2049
|
+
throw new Error("Missing the required parameter 'body' when calling updateTemplate");
|
|
1769
2050
|
}
|
|
1770
2051
|
var pathParams = {
|
|
1771
2052
|
'template_id': template_id
|
|
@@ -1776,87 +2057,100 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1776
2057
|
var authNames = ['api_token_basic'];
|
|
1777
2058
|
var contentTypes = ['application/json'];
|
|
1778
2059
|
var accepts = ['application/json'];
|
|
1779
|
-
var returnType =
|
|
1780
|
-
return this.apiClient.callApi('/templates/{template_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2060
|
+
var returnType = _Template["default"];
|
|
2061
|
+
return this.apiClient.callApi('/templates/{template_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1781
2062
|
}
|
|
1782
2063
|
|
|
1783
2064
|
/**
|
|
1784
|
-
*
|
|
1785
|
-
*
|
|
1786
|
-
* @param {String}
|
|
1787
|
-
* @param {module:model/
|
|
1788
|
-
* @
|
|
2065
|
+
* Update a template
|
|
2066
|
+
* Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object. Setting `parent_folder_id` moves the template and all of its published versions.
|
|
2067
|
+
* @param {String} template_id The template's ID.
|
|
2068
|
+
* @param {module:model/UpdateTemplateRequest} body The settings to change. Properties left out keep their values.
|
|
2069
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1789
2070
|
*/
|
|
2071
|
+
}, {
|
|
2072
|
+
key: "updateTemplate",
|
|
2073
|
+
value: function updateTemplate(template_id, body) {
|
|
2074
|
+
return this.updateTemplateWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2075
|
+
return response_and_data.data;
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
1790
2078
|
|
|
1791
2079
|
/**
|
|
1792
|
-
*
|
|
1793
|
-
*
|
|
1794
|
-
* @param {String} template_id
|
|
1795
|
-
* @param {
|
|
2080
|
+
* Replace a template's PDF
|
|
2081
|
+
* Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF with the request instead, use PUT /templates/{template_id}/document/upload.
|
|
2082
|
+
* @param {String} template_id The template's ID.
|
|
2083
|
+
* @param {module:model/UpdateTemplateDocumentRequest} body The new PDF.
|
|
1796
2084
|
* @param {Object} opts Optional parameters
|
|
1797
|
-
* @param {
|
|
1798
|
-
* @
|
|
1799
|
-
* data is of type: {@link module:model/SuccessMultipleErrorsResponse}
|
|
2085
|
+
* @param {Boolean} [wait] Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
2086
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1800
2087
|
*/
|
|
1801
2088
|
}, {
|
|
1802
|
-
key: "
|
|
1803
|
-
value: function
|
|
2089
|
+
key: "updateTemplateDocumentWithHttpInfo",
|
|
2090
|
+
value: function updateTemplateDocumentWithHttpInfo(template_id, body, opts) {
|
|
1804
2091
|
opts = opts || {};
|
|
1805
|
-
var postBody =
|
|
2092
|
+
var postBody = body;
|
|
1806
2093
|
// verify the required parameter 'template_id' is set
|
|
1807
2094
|
if (template_id === undefined || template_id === null) {
|
|
1808
2095
|
throw new Error("Missing the required parameter 'template_id' when calling updateTemplateDocument");
|
|
1809
2096
|
}
|
|
1810
|
-
// verify the required parameter '
|
|
1811
|
-
if (
|
|
1812
|
-
throw new Error("Missing the required parameter '
|
|
2097
|
+
// verify the required parameter 'body' is set
|
|
2098
|
+
if (body === undefined || body === null) {
|
|
2099
|
+
throw new Error("Missing the required parameter 'body' when calling updateTemplateDocument");
|
|
1813
2100
|
}
|
|
1814
2101
|
var pathParams = {
|
|
1815
2102
|
'template_id': template_id
|
|
1816
2103
|
};
|
|
1817
|
-
var queryParams = {
|
|
1818
|
-
|
|
1819
|
-
var formParams = {
|
|
1820
|
-
'template[document]': template_document,
|
|
1821
|
-
'template[name]': opts['template_name']
|
|
2104
|
+
var queryParams = {
|
|
2105
|
+
'wait': opts['wait']
|
|
1822
2106
|
};
|
|
2107
|
+
var headerParams = {};
|
|
2108
|
+
var formParams = {};
|
|
1823
2109
|
var authNames = ['api_token_basic'];
|
|
1824
|
-
var contentTypes = ['
|
|
2110
|
+
var contentTypes = ['application/json'];
|
|
1825
2111
|
var accepts = ['application/json'];
|
|
1826
|
-
var returnType =
|
|
1827
|
-
return this.apiClient.callApi('/templates/{template_id}
|
|
2112
|
+
var returnType = _Template["default"];
|
|
2113
|
+
return this.apiClient.callApi('/templates/{template_id}/document', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1828
2114
|
}
|
|
1829
2115
|
|
|
1830
2116
|
/**
|
|
1831
|
-
*
|
|
1832
|
-
*
|
|
1833
|
-
* @param {String}
|
|
1834
|
-
* @param {module:model/
|
|
1835
|
-
* @param {
|
|
2117
|
+
* Replace a template's PDF
|
|
2118
|
+
* Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF with the request instead, use PUT /templates/{template_id}/document/upload.
|
|
2119
|
+
* @param {String} template_id The template's ID.
|
|
2120
|
+
* @param {module:model/UpdateTemplateDocumentRequest} body The new PDF.
|
|
2121
|
+
* @param {Object} opts Optional parameters
|
|
2122
|
+
* @param {Boolean} opts.wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
2123
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1836
2124
|
*/
|
|
2125
|
+
}, {
|
|
2126
|
+
key: "updateTemplateDocument",
|
|
2127
|
+
value: function updateTemplateDocument(template_id, body, opts) {
|
|
2128
|
+
return this.updateTemplateDocumentWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2129
|
+
return response_and_data.data;
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
1837
2132
|
|
|
1838
2133
|
/**
|
|
1839
|
-
* Update a
|
|
1840
|
-
* Updates a
|
|
1841
|
-
* @param {String}
|
|
1842
|
-
* @param {module:model/
|
|
1843
|
-
* @
|
|
1844
|
-
* data is of type: {@link module:model/SuccessMultipleErrorsResponse}
|
|
2134
|
+
* Update a webhook
|
|
2135
|
+
* Updates a webhook. Only the properties you send change.
|
|
2136
|
+
* @param {String} webhook_id The webhook's ID.
|
|
2137
|
+
* @param {module:model/UpdateWebhookRequest} body The settings to change. Properties left out keep their values.
|
|
2138
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
1845
2139
|
*/
|
|
1846
2140
|
}, {
|
|
1847
|
-
key: "
|
|
1848
|
-
value: function
|
|
1849
|
-
var postBody =
|
|
1850
|
-
// verify the required parameter '
|
|
1851
|
-
if (
|
|
1852
|
-
throw new Error("Missing the required parameter '
|
|
2141
|
+
key: "updateWebhookWithHttpInfo",
|
|
2142
|
+
value: function updateWebhookWithHttpInfo(webhook_id, body) {
|
|
2143
|
+
var postBody = body;
|
|
2144
|
+
// verify the required parameter 'webhook_id' is set
|
|
2145
|
+
if (webhook_id === undefined || webhook_id === null) {
|
|
2146
|
+
throw new Error("Missing the required parameter 'webhook_id' when calling updateWebhook");
|
|
1853
2147
|
}
|
|
1854
|
-
// verify the required parameter '
|
|
1855
|
-
if (
|
|
1856
|
-
throw new Error("Missing the required parameter '
|
|
2148
|
+
// verify the required parameter 'body' is set
|
|
2149
|
+
if (body === undefined || body === null) {
|
|
2150
|
+
throw new Error("Missing the required parameter 'body' when calling updateWebhook");
|
|
1857
2151
|
}
|
|
1858
2152
|
var pathParams = {
|
|
1859
|
-
'
|
|
2153
|
+
'webhook_id': webhook_id
|
|
1860
2154
|
};
|
|
1861
2155
|
var queryParams = {};
|
|
1862
2156
|
var headerParams = {};
|
|
@@ -1864,49 +2158,154 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1864
2158
|
var authNames = ['api_token_basic'];
|
|
1865
2159
|
var contentTypes = ['application/json'];
|
|
1866
2160
|
var accepts = ['application/json'];
|
|
1867
|
-
var returnType =
|
|
1868
|
-
return this.apiClient.callApi('/
|
|
2161
|
+
var returnType = _Webhook["default"];
|
|
2162
|
+
return this.apiClient.callApi('/webhooks/{webhook_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1869
2163
|
}
|
|
1870
2164
|
|
|
1871
2165
|
/**
|
|
1872
|
-
*
|
|
1873
|
-
*
|
|
1874
|
-
* @param {String}
|
|
1875
|
-
* @param {module:model/
|
|
1876
|
-
* @
|
|
2166
|
+
* Update a webhook
|
|
2167
|
+
* Updates a webhook. Only the properties you send change.
|
|
2168
|
+
* @param {String} webhook_id The webhook's ID.
|
|
2169
|
+
* @param {module:model/UpdateWebhookRequest} body The settings to change. Properties left out keep their values.
|
|
2170
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
1877
2171
|
*/
|
|
2172
|
+
}, {
|
|
2173
|
+
key: "updateWebhook",
|
|
2174
|
+
value: function updateWebhook(webhook_id, body) {
|
|
2175
|
+
return this.updateWebhookWithHttpInfo(webhook_id, body).then(function (response_and_data) {
|
|
2176
|
+
return response_and_data.data;
|
|
2177
|
+
});
|
|
2178
|
+
}
|
|
1878
2179
|
|
|
1879
2180
|
/**
|
|
1880
|
-
*
|
|
1881
|
-
*
|
|
1882
|
-
* @param {
|
|
1883
|
-
* @param {
|
|
1884
|
-
* @param {
|
|
1885
|
-
*
|
|
2181
|
+
* Create a PDF template from an uploaded PDF
|
|
2182
|
+
* 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.
|
|
2183
|
+
* @param {File} document The PDF.
|
|
2184
|
+
* @param {Object} opts Optional parameters
|
|
2185
|
+
* @param {Boolean} [wait] Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
2186
|
+
* @param {String} [name] The template's name.
|
|
2187
|
+
* @param {String} [description] The template's description.
|
|
2188
|
+
* @param {String} [parent_folder_id] The folder to put the template in. Left out, it's created at the root.
|
|
2189
|
+
* @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.
|
|
2190
|
+
* @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.
|
|
2191
|
+
* @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.
|
|
2192
|
+
* @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`.
|
|
2193
|
+
* @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.
|
|
2194
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1886
2195
|
*/
|
|
1887
2196
|
}, {
|
|
1888
|
-
key: "
|
|
1889
|
-
value: function
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
2197
|
+
key: "uploadTemplateWithHttpInfo",
|
|
2198
|
+
value: function uploadTemplateWithHttpInfo(document, opts) {
|
|
2199
|
+
opts = opts || {};
|
|
2200
|
+
var postBody = null;
|
|
2201
|
+
// verify the required parameter 'document' is set
|
|
2202
|
+
if (document === undefined || document === null) {
|
|
2203
|
+
throw new Error("Missing the required parameter 'document' when calling uploadTemplate");
|
|
1894
2204
|
}
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
2205
|
+
var pathParams = {};
|
|
2206
|
+
var queryParams = {
|
|
2207
|
+
'wait': opts['wait']
|
|
2208
|
+
};
|
|
2209
|
+
var headerParams = {};
|
|
2210
|
+
var formParams = {
|
|
2211
|
+
'document': document,
|
|
2212
|
+
'name': opts['name'],
|
|
2213
|
+
'description': opts['description'],
|
|
2214
|
+
'parent_folder_id': opts['parent_folder_id'],
|
|
2215
|
+
'ai_field_naming_language': opts['ai_field_naming_language'],
|
|
2216
|
+
'detect_fields': opts['detect_fields'],
|
|
2217
|
+
'field_source': opts['field_source'],
|
|
2218
|
+
'field_naming': opts['field_naming'],
|
|
2219
|
+
'field_logic': opts['field_logic']
|
|
2220
|
+
};
|
|
2221
|
+
var authNames = ['api_token_basic'];
|
|
2222
|
+
var contentTypes = ['multipart/form-data'];
|
|
2223
|
+
var accepts = ['application/json'];
|
|
2224
|
+
var returnType = _Template["default"];
|
|
2225
|
+
return this.apiClient.callApi('/templates/upload', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
/**
|
|
2229
|
+
* Create a PDF template from an uploaded PDF
|
|
2230
|
+
* 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.
|
|
2231
|
+
* @param {File} document The PDF.
|
|
2232
|
+
* @param {Object} opts Optional parameters
|
|
2233
|
+
* @param {Boolean} opts.wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
2234
|
+
* @param {String} opts.name The template's name.
|
|
2235
|
+
* @param {String} opts.description The template's description.
|
|
2236
|
+
* @param {String} opts.parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
2237
|
+
* @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.
|
|
2238
|
+
* @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.
|
|
2239
|
+
* @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.
|
|
2240
|
+
* @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`.
|
|
2241
|
+
* @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.
|
|
2242
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2243
|
+
*/
|
|
2244
|
+
}, {
|
|
2245
|
+
key: "uploadTemplate",
|
|
2246
|
+
value: function uploadTemplate(document, opts) {
|
|
2247
|
+
return this.uploadTemplateWithHttpInfo(document, opts).then(function (response_and_data) {
|
|
2248
|
+
return response_and_data.data;
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
/**
|
|
2253
|
+
* Replace a template's PDF with an uploaded PDF
|
|
2254
|
+
* 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.
|
|
2255
|
+
* @param {String} template_id The template's ID.
|
|
2256
|
+
* @param {File} document The new PDF.
|
|
2257
|
+
* @param {Object} opts Optional parameters
|
|
2258
|
+
* @param {Boolean} [wait] Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
2259
|
+
* @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.
|
|
2260
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2261
|
+
*/
|
|
2262
|
+
}, {
|
|
2263
|
+
key: "uploadTemplateDocumentWithHttpInfo",
|
|
2264
|
+
value: function uploadTemplateDocumentWithHttpInfo(template_id, document, opts) {
|
|
2265
|
+
opts = opts || {};
|
|
2266
|
+
var postBody = null;
|
|
2267
|
+
// verify the required parameter 'template_id' is set
|
|
2268
|
+
if (template_id === undefined || template_id === null) {
|
|
2269
|
+
throw new Error("Missing the required parameter 'template_id' when calling uploadTemplateDocument");
|
|
2270
|
+
}
|
|
2271
|
+
// verify the required parameter 'document' is set
|
|
2272
|
+
if (document === undefined || document === null) {
|
|
2273
|
+
throw new Error("Missing the required parameter 'document' when calling uploadTemplateDocument");
|
|
1898
2274
|
}
|
|
1899
2275
|
var pathParams = {
|
|
1900
|
-
'
|
|
2276
|
+
'template_id': template_id
|
|
2277
|
+
};
|
|
2278
|
+
var queryParams = {
|
|
2279
|
+
'wait': opts['wait']
|
|
1901
2280
|
};
|
|
1902
|
-
var queryParams = {};
|
|
1903
2281
|
var headerParams = {};
|
|
1904
|
-
var formParams = {
|
|
2282
|
+
var formParams = {
|
|
2283
|
+
'document': document,
|
|
2284
|
+
'reimport_fields': opts['reimport_fields']
|
|
2285
|
+
};
|
|
1905
2286
|
var authNames = ['api_token_basic'];
|
|
1906
|
-
var contentTypes = ['
|
|
2287
|
+
var contentTypes = ['multipart/form-data'];
|
|
1907
2288
|
var accepts = ['application/json'];
|
|
1908
|
-
var returnType =
|
|
1909
|
-
return this.apiClient.callApi('/
|
|
2289
|
+
var returnType = _Template["default"];
|
|
2290
|
+
return this.apiClient.callApi('/templates/{template_id}/document/upload', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
/**
|
|
2294
|
+
* Replace a template's PDF with an uploaded PDF
|
|
2295
|
+
* 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.
|
|
2296
|
+
* @param {String} template_id The template's ID.
|
|
2297
|
+
* @param {File} document The new PDF.
|
|
2298
|
+
* @param {Object} opts Optional parameters
|
|
2299
|
+
* @param {Boolean} opts.wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
2300
|
+
* @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.
|
|
2301
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2302
|
+
*/
|
|
2303
|
+
}, {
|
|
2304
|
+
key: "uploadTemplateDocument",
|
|
2305
|
+
value: function uploadTemplateDocument(template_id, document, opts) {
|
|
2306
|
+
return this.uploadTemplateDocumentWithHttpInfo(template_id, document, opts).then(function (response_and_data) {
|
|
2307
|
+
return response_and_data.data;
|
|
2308
|
+
});
|
|
1910
2309
|
}
|
|
1911
2310
|
}]);
|
|
1912
2311
|
}();
|