docspring 3.3.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +79 -19
- package/README.md +65 -63
- package/dist/ApiClient.js +63 -28
- package/dist/RequestSchemas.js +2297 -0
- package/dist/RequestValidator.js +494 -0
- package/dist/api/Client.js +1346 -948
- package/dist/index.js +651 -154
- package/dist/model/AiFieldNamingLanguage.js +64 -0
- package/dist/model/{CreateWebhookData.js → AuthenticationCheck.js} +32 -28
- package/dist/model/BarcodeSymbology.js +89 -0
- package/dist/model/CheckCharacter.js +74 -0
- package/dist/model/CombinedFieldType.js +59 -0
- package/dist/model/CombinedPdf.js +294 -0
- package/dist/model/{MoveFolderData.js → CombinedPdfFiles.js} +27 -27
- package/dist/model/CombinedPdfList.js +132 -0
- package/dist/model/{ForbiddenErrorResponse.js → CombinedPdfSource.js} +59 -73
- package/dist/model/CombinedPdfSourceInput.js +270 -0
- package/dist/model/CombinedPdfSourcePdf.js +130 -0
- package/dist/model/CombinedPdfSourceType.js +74 -0
- package/dist/model/CombinedPdfState.js +74 -0
- package/dist/model/{CopyTemplateOptions.js → CopyTemplateRequest.js} +26 -22
- package/dist/model/{CombinePdfsData.js → CreateCombinedPdfRequest.js} +69 -53
- package/dist/model/{CreateCustomFileData.js → CreateCustomFileFromUploadRequest.js} +25 -23
- package/dist/model/{CreateFolderData.js → CreateFolderRequest.js} +47 -28
- package/dist/model/{TemplateDeleteResponse.js → CreateSignatureRequestEventRequest.js} +49 -74
- package/dist/model/CreateSignatureRequestTokenRequest.js +88 -0
- package/dist/model/{SubmissionBatchData.js → CreateSubmissionBatchRequest.js} +67 -42
- package/dist/model/CreateSubmissionRequest.js +212 -0
- package/dist/model/CreateTemplateRequest.js +545 -0
- package/dist/model/CreateWebhookRequest.js +234 -0
- package/dist/model/CustomFile.js +67 -16
- package/dist/model/CustomFileList.js +132 -0
- package/dist/model/CustomFileSourcePdf.js +130 -0
- package/dist/model/ErrorCode.js +154 -0
- package/dist/model/{CreateSubmissionResponse.js → ErrorDetail.js} +65 -75
- package/dist/model/ErrorInfo.js +211 -0
- package/dist/model/ErrorResponse.js +12 -41
- package/dist/model/ExpirationInterval.js +64 -0
- package/dist/model/FieldComparisonCondition.js +137 -0
- package/dist/model/FieldComparisonOperator.js +69 -0
- package/dist/model/FieldDisplayType.js +79 -0
- package/dist/model/{MultipleErrorsResponse.js → FieldEqualsCondition.js} +48 -52
- package/dist/model/FieldEqualsOperator.js +59 -0
- package/dist/model/{SuccessMultipleErrorsResponse.js → FieldInCondition.js} +54 -53
- package/dist/model/FieldOverride.js +722 -0
- package/dist/model/FieldPresenceCondition.js +126 -0
- package/dist/model/FieldPresenceOperator.js +59 -0
- package/dist/model/FieldRangeCondition.js +148 -0
- package/dist/model/FieldReimportState.js +69 -0
- package/dist/model/FieldSetupLogic.js +59 -0
- package/dist/model/FieldSetupNaming.js +59 -0
- package/dist/model/FieldSetupSource.js +64 -0
- package/dist/model/Folder.js +38 -11
- package/dist/model/FolderList.js +132 -0
- package/dist/model/GeneratedFile.js +214 -0
- package/dist/model/GeneratedFileState.js +64 -0
- package/dist/model/HtmlEngineOptions.js +230 -0
- package/dist/model/HtmlEngineOptionsInput.js +193 -0
- package/dist/model/ImageGravity.js +94 -0
- package/dist/model/ImageScaleType.js +64 -0
- package/dist/model/ModelCodeLanguage.js +94 -0
- package/dist/model/{UpdatePdfTemplate.js → MoveFolderRequest.js} +34 -28
- package/dist/model/{MoveTemplateData.js → MoveTemplateRequest.js} +25 -35
- package/dist/model/NumberConditionType.js +79 -0
- package/dist/model/PageFormat.js +114 -0
- package/dist/model/{PublishVersionData.js → PublishTemplateVersionRequest.js} +33 -33
- package/dist/model/{RenameFolderData.js → RenameFolderRequest.js} +25 -23
- package/dist/model/{RestoreVersionData.js → RestoreTemplateVersionRequest.js} +25 -23
- package/dist/model/ShapeType.js +79 -0
- package/dist/model/{SubmissionDataRequestShow.js → SignatureRequest.js} +165 -240
- package/dist/model/SignatureRequestAuthSecondFactorType.js +79 -0
- package/dist/model/SignatureRequestAuthType.js +84 -0
- package/dist/model/{SubmissionDataRequestEvent.js → SignatureRequestEvent.js} +67 -149
- package/dist/model/SignatureRequestEventType.js +79 -0
- package/dist/model/SignatureRequestInput.js +278 -0
- package/dist/model/SignatureRequestMessageType.js +94 -0
- package/dist/model/SignatureRequestState.js +64 -0
- package/dist/model/SignatureRequestToken.js +195 -0
- package/dist/model/SignatureRequestTokenType.js +59 -0
- package/dist/model/StringConditionType.js +74 -0
- package/dist/model/Submission.js +186 -345
- package/dist/model/SubmissionAction.js +30 -115
- package/dist/model/SubmissionActionState.js +69 -0
- package/dist/model/SubmissionActionType.js +84 -0
- package/dist/model/SubmissionBatch.js +74 -55
- package/dist/model/SubmissionBatchState.js +64 -0
- package/dist/model/SubmissionFiles.js +108 -0
- package/dist/model/SubmissionInput.js +204 -0
- package/dist/model/{ListSubmissionsResponse.js → SubmissionList.js} +35 -42
- package/dist/model/SubmissionSource.js +69 -0
- package/dist/model/SubmissionSourcePdf.js +130 -0
- package/dist/model/SubmissionState.js +114 -0
- package/dist/model/Template.js +310 -573
- package/dist/model/TemplateActor.js +171 -0
- package/dist/model/TemplateActorType.js +64 -0
- package/dist/model/TemplateDefaults.js +307 -0
- package/dist/model/TemplateDefaultsInput.js +305 -0
- package/dist/model/TemplateDocument.js +280 -0
- package/dist/model/TemplateDocumentState.js +74 -0
- package/dist/model/{CreatePdfSubmissionData.js → TemplateFieldDependency.js} +70 -89
- package/dist/model/TemplateFieldDependencyAction.js +64 -0
- package/dist/model/{TemplatePublishVersionResponse.js → TemplateFieldDependencyCondition.js} +51 -61
- package/dist/model/TemplateFieldDependencyConditionInput.js +304 -0
- package/dist/model/TemplateFieldDependencyInput.js +182 -0
- package/dist/model/TemplateFieldDependencyMatch.js +59 -0
- package/dist/model/TemplateFieldDependencyOperator.js +99 -0
- package/dist/model/TemplateFieldLogicStatus.js +74 -0
- package/dist/model/TemplateFormMode.js +64 -0
- package/dist/model/{TemplateModelCodeResponse.js → TemplateModelCode.js} +34 -86
- package/dist/model/TemplatePageAiError.js +69 -0
- package/dist/model/TemplatePageAiNamingStatus.js +59 -0
- package/dist/model/TemplatePageFieldsStatus.js +74 -0
- package/dist/model/TemplatePageImageStatus.js +59 -0
- package/dist/model/TemplatePageProcessingStatus.js +162 -0
- package/dist/model/{SubmissionDataRequestToken.js → TemplateSourcePdf.js} +52 -56
- package/dist/model/TemplateSummary.js +560 -0
- package/dist/model/{SuccessErrorResponse.js → TemplateSummaryList.js} +43 -55
- package/dist/model/TemplateType.js +59 -0
- package/dist/model/{Submission422Response.js → TemplateVersion.js} +60 -63
- package/dist/model/TemplateVersionType.js +64 -0
- package/dist/model/TextAlignment.js +69 -0
- package/dist/model/TextOverflow.js +59 -0
- package/dist/model/TextVerticalAlignment.js +64 -0
- package/dist/model/Typeface.js +134 -0
- package/dist/model/UpdateSignatureRequestRequest.js +183 -0
- package/dist/model/UpdateTemplateDocumentRequest.js +136 -0
- package/dist/model/UpdateTemplateRequest.js +450 -0
- package/dist/model/UpdateWebhookRequest.js +209 -0
- package/dist/model/UploadMethod.js +54 -0
- package/dist/model/{UploadPresignResponse.js → UploadPresign.js} +53 -58
- package/dist/model/{AddFieldsData.js → UrlSourcePdf.js} +49 -31
- package/dist/model/Webhook.js +58 -73
- package/dist/model/WebhookEventType.js +174 -0
- package/dist/model/WebhookList.js +132 -0
- package/dist/model/WebhookMode.js +59 -0
- package/package.json +1 -1
- package/dist/model/BatchGeneratePdfs201Response.js +0 -194
- package/dist/model/CombinedSubmission.js +0 -313
- package/dist/model/CombinedSubmissionAction.js +0 -268
- package/dist/model/CreateCombinedSubmissionResponse.js +0 -180
- package/dist/model/CreateCustomFileResponse.js +0 -167
- package/dist/model/CreateHtmlTemplate.js +0 -108
- package/dist/model/CreatePdfTemplate.js +0 -108
- package/dist/model/CreateSubmissionDataRequestData.js +0 -314
- package/dist/model/CreateSubmissionDataRequestEventRequest.js +0 -239
- package/dist/model/CreateSubmissionDataRequestEventResponse.js +0 -167
- package/dist/model/CreateSubmissionDataRequestResponse.js +0 -167
- package/dist/model/CreateSubmissionDataRequestTokenResponse.js +0 -167
- package/dist/model/ErrorOrMultipleErrorsResponse.js +0 -153
- package/dist/model/JsonSchema.js +0 -205
- package/dist/model/SubmissionBatchWithSubmissions.js +0 -228
- package/dist/model/SubmissionDataRequest.js +0 -496
- package/dist/model/SubmissionPreview.js +0 -509
- package/dist/model/TemplateAddFieldsResponse.js +0 -156
- package/dist/model/TemplatePreview.js +0 -796
- package/dist/model/UpdateHtmlTemplate.js +0 -108
- package/dist/model/UpdateSubmissionDataRequestData.js +0 -311
- package/dist/model/UpdateWebhookData.js +0 -108
package/dist/api/Client.js
CHANGED
|
@@ -5,56 +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
|
|
37
|
-
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"));
|
|
38
39
|
var _Submission = _interopRequireDefault(require("../model/Submission"));
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var _SubmissionBatchWithSubmissions = _interopRequireDefault(require("../model/SubmissionBatchWithSubmissions"));
|
|
42
|
-
var _SubmissionDataRequestShow = _interopRequireDefault(require("../model/SubmissionDataRequestShow"));
|
|
43
|
-
var _SubmissionPreview = _interopRequireDefault(require("../model/SubmissionPreview"));
|
|
44
|
-
var _SuccessErrorResponse = _interopRequireDefault(require("../model/SuccessErrorResponse"));
|
|
45
|
-
var _SuccessMultipleErrorsResponse = _interopRequireDefault(require("../model/SuccessMultipleErrorsResponse"));
|
|
40
|
+
var _SubmissionBatch = _interopRequireDefault(require("../model/SubmissionBatch"));
|
|
41
|
+
var _SubmissionList = _interopRequireDefault(require("../model/SubmissionList"));
|
|
46
42
|
var _Template = _interopRequireDefault(require("../model/Template"));
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var _UpdateWebhookData = _interopRequireDefault(require("../model/UpdateWebhookData"));
|
|
56
|
-
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"));
|
|
57
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"));
|
|
58
55
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
59
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); }
|
|
60
57
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -63,9 +60,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
63
60
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
64
61
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
65
62
|
* DocSpring API
|
|
66
|
-
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
63
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
67
64
|
*
|
|
68
|
-
* The version of the OpenAPI document:
|
|
65
|
+
* The version of the OpenAPI document: v2
|
|
69
66
|
*
|
|
70
67
|
*
|
|
71
68
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -76,7 +73,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
76
73
|
/**
|
|
77
74
|
* Client service.
|
|
78
75
|
* @module api/Client
|
|
79
|
-
* @version
|
|
76
|
+
* @version 4.0.0
|
|
80
77
|
*/
|
|
81
78
|
var Client = exports["default"] = /*#__PURE__*/function () {
|
|
82
79
|
/**
|
|
@@ -93,13 +90,23 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
93
90
|
if (options && options.constructor && options.constructor.name === 'ApiClient') {
|
|
94
91
|
this.apiClient = options;
|
|
95
92
|
} else {
|
|
96
|
-
|
|
97
|
-
|
|
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);
|
|
98
99
|
var env = typeof process !== 'undefined' && process.env ? process.env : {};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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) {
|
|
102
107
|
apiClient.authentications['api_token_basic'].username = apiTokenId;
|
|
108
|
+
}
|
|
109
|
+
if (apiTokenSecret != null) {
|
|
103
110
|
apiClient.authentications['api_token_basic'].password = apiTokenSecret;
|
|
104
111
|
}
|
|
105
112
|
|
|
@@ -114,7 +121,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
114
121
|
var url = String(host).trim();
|
|
115
122
|
if (!/^https?:\/\//i.test(url)) url = "https://".concat(url);
|
|
116
123
|
url = url.replace(/\/+$/, '');
|
|
117
|
-
|
|
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");
|
|
118
126
|
apiClient.basePath = url;
|
|
119
127
|
}
|
|
120
128
|
this.apiClient = apiClient;
|
|
@@ -122,32 +130,21 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* @param {String}
|
|
128
|
-
* @param {
|
|
129
|
-
* @param {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Add new fields to a Template
|
|
134
|
-
* Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.
|
|
135
|
-
* @param {String} template_id
|
|
136
|
-
* @param {module:model/AddFieldsData} data
|
|
137
|
-
* @param {module:api/Client~addFieldsToTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
138
|
-
* data is of type: {@link module:model/TemplateAddFieldsResponse}
|
|
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
|
|
139
139
|
*/
|
|
140
140
|
return _createClass(Client, [{
|
|
141
|
-
key: "
|
|
142
|
-
value: function
|
|
143
|
-
|
|
141
|
+
key: "copyTemplateWithHttpInfo",
|
|
142
|
+
value: function copyTemplateWithHttpInfo(template_id, opts) {
|
|
143
|
+
opts = opts || {};
|
|
144
|
+
var postBody = opts['body'];
|
|
144
145
|
// verify the required parameter 'template_id' is set
|
|
145
146
|
if (template_id === undefined || template_id === null) {
|
|
146
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
147
|
-
}
|
|
148
|
-
// verify the required parameter 'data' is set
|
|
149
|
-
if (data === undefined || data === null) {
|
|
150
|
-
throw new Error("Missing the required parameter 'data' when calling addFieldsToTemplate");
|
|
147
|
+
throw new Error("Missing the required parameter 'template_id' when calling copyTemplate");
|
|
151
148
|
}
|
|
152
149
|
var pathParams = {
|
|
153
150
|
'template_id': template_id
|
|
@@ -158,35 +155,42 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
158
155
|
var authNames = ['api_token_basic'];
|
|
159
156
|
var contentTypes = ['application/json'];
|
|
160
157
|
var accepts = ['application/json'];
|
|
161
|
-
var returnType =
|
|
162
|
-
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);
|
|
163
160
|
}
|
|
164
161
|
|
|
165
162
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* @param {String}
|
|
169
|
-
* @param {
|
|
170
|
-
* @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}
|
|
171
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
|
+
}
|
|
172
177
|
|
|
173
178
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* @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.
|
|
177
182
|
* @param {Object} opts Optional parameters
|
|
178
|
-
* @param {Boolean} [wait
|
|
179
|
-
* @
|
|
180
|
-
* 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
|
|
181
185
|
*/
|
|
182
186
|
}, {
|
|
183
|
-
key: "
|
|
184
|
-
value: function
|
|
187
|
+
key: "createCombinedPdfWithHttpInfo",
|
|
188
|
+
value: function createCombinedPdfWithHttpInfo(body, opts) {
|
|
185
189
|
opts = opts || {};
|
|
186
|
-
var postBody =
|
|
187
|
-
// verify the required parameter '
|
|
188
|
-
if (
|
|
189
|
-
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");
|
|
190
194
|
}
|
|
191
195
|
var pathParams = {};
|
|
192
196
|
var queryParams = {
|
|
@@ -197,32 +201,39 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
197
201
|
var authNames = ['api_token_basic'];
|
|
198
202
|
var contentTypes = ['application/json'];
|
|
199
203
|
var accepts = ['application/json'];
|
|
200
|
-
var returnType =
|
|
201
|
-
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);
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* @param {
|
|
208
|
-
* @param {
|
|
209
|
-
* @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}
|
|
210
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
|
+
}
|
|
211
223
|
|
|
212
224
|
/**
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* @param {module:model/
|
|
216
|
-
* @
|
|
217
|
-
* 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
|
|
218
229
|
*/
|
|
219
230
|
}, {
|
|
220
|
-
key: "
|
|
221
|
-
value: function
|
|
222
|
-
var postBody =
|
|
223
|
-
// verify the required parameter '
|
|
224
|
-
if (
|
|
225
|
-
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");
|
|
226
237
|
}
|
|
227
238
|
var pathParams = {};
|
|
228
239
|
var queryParams = {};
|
|
@@ -231,113 +242,129 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
231
242
|
var authNames = ['api_token_basic'];
|
|
232
243
|
var contentTypes = ['application/json'];
|
|
233
244
|
var accepts = ['application/json'];
|
|
234
|
-
var returnType =
|
|
235
|
-
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);
|
|
236
247
|
}
|
|
237
248
|
|
|
238
249
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* @param {
|
|
242
|
-
* @
|
|
243
|
-
* @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}
|
|
244
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
|
+
}
|
|
245
262
|
|
|
246
263
|
/**
|
|
247
|
-
*
|
|
248
|
-
* Creates a
|
|
249
|
-
* @param {
|
|
250
|
-
* @
|
|
251
|
-
* @param {module:model/CopyTemplateOptions} [options]
|
|
252
|
-
* @param {module:api/Client~copyTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
253
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
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
|
|
254
268
|
*/
|
|
255
269
|
}, {
|
|
256
|
-
key: "
|
|
257
|
-
value: function
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
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");
|
|
263
276
|
}
|
|
264
|
-
var pathParams = {
|
|
265
|
-
'template_id': template_id
|
|
266
|
-
};
|
|
277
|
+
var pathParams = {};
|
|
267
278
|
var queryParams = {};
|
|
268
279
|
var headerParams = {};
|
|
269
280
|
var formParams = {};
|
|
270
281
|
var authNames = ['api_token_basic'];
|
|
271
282
|
var contentTypes = ['application/json'];
|
|
272
283
|
var accepts = ['application/json'];
|
|
273
|
-
var returnType =
|
|
274
|
-
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);
|
|
275
286
|
}
|
|
276
287
|
|
|
277
288
|
/**
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* @param {
|
|
281
|
-
* @
|
|
282
|
-
* @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}
|
|
283
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
|
+
}
|
|
284
301
|
|
|
285
302
|
/**
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
* @param {
|
|
289
|
-
* @param {module:
|
|
290
|
-
* 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
|
|
291
308
|
*/
|
|
292
309
|
}, {
|
|
293
|
-
key: "
|
|
294
|
-
value: function
|
|
295
|
-
var postBody =
|
|
296
|
-
// verify the required parameter '
|
|
297
|
-
if (
|
|
298
|
-
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");
|
|
299
316
|
}
|
|
300
|
-
|
|
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
|
+
};
|
|
301
324
|
var queryParams = {};
|
|
302
325
|
var headerParams = {};
|
|
303
326
|
var formParams = {};
|
|
304
327
|
var authNames = ['api_token_basic'];
|
|
305
328
|
var contentTypes = ['application/json'];
|
|
306
329
|
var accepts = ['application/json'];
|
|
307
|
-
var returnType =
|
|
308
|
-
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);
|
|
309
332
|
}
|
|
310
333
|
|
|
311
334
|
/**
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* @param {String}
|
|
315
|
-
* @param {module:model/
|
|
316
|
-
* @
|
|
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}
|
|
317
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
|
+
}
|
|
318
348
|
|
|
319
349
|
/**
|
|
320
|
-
* Create a
|
|
321
|
-
*
|
|
322
|
-
* @param {String}
|
|
323
|
-
* @param {
|
|
324
|
-
* @param {module:
|
|
325
|
-
* 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
|
|
326
356
|
*/
|
|
327
357
|
}, {
|
|
328
|
-
key: "
|
|
329
|
-
value: function
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
// verify the required parameter 'event' is set
|
|
336
|
-
if (event === undefined || event === null) {
|
|
337
|
-
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");
|
|
338
365
|
}
|
|
339
366
|
var pathParams = {
|
|
340
|
-
'
|
|
367
|
+
'signature_request_id': signature_request_id
|
|
341
368
|
};
|
|
342
369
|
var queryParams = {};
|
|
343
370
|
var headerParams = {};
|
|
@@ -345,192 +372,188 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
345
372
|
var authNames = ['api_token_basic'];
|
|
346
373
|
var contentTypes = ['application/json'];
|
|
347
374
|
var accepts = ['application/json'];
|
|
348
|
-
var returnType =
|
|
349
|
-
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);
|
|
350
377
|
}
|
|
351
378
|
|
|
352
379
|
/**
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
* @param {String}
|
|
356
|
-
* @param {
|
|
357
|
-
* @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}
|
|
358
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
|
+
}
|
|
359
394
|
|
|
360
395
|
/**
|
|
361
|
-
*
|
|
362
|
-
* Creates
|
|
363
|
-
* @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.
|
|
364
400
|
* @param {Object} opts Optional parameters
|
|
365
|
-
* @param {
|
|
366
|
-
* @param {
|
|
367
|
-
* 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
|
|
368
404
|
*/
|
|
369
405
|
}, {
|
|
370
|
-
key: "
|
|
371
|
-
value: function
|
|
406
|
+
key: "createSubmissionWithHttpInfo",
|
|
407
|
+
value: function createSubmissionWithHttpInfo(template_id, body, opts) {
|
|
372
408
|
opts = opts || {};
|
|
373
|
-
var postBody =
|
|
374
|
-
// verify the required parameter '
|
|
375
|
-
if (
|
|
376
|
-
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");
|
|
377
417
|
}
|
|
378
418
|
var pathParams = {
|
|
379
|
-
'
|
|
419
|
+
'template_id': template_id
|
|
380
420
|
};
|
|
381
421
|
var queryParams = {
|
|
382
|
-
'
|
|
422
|
+
'version': opts['version'],
|
|
423
|
+
'wait': opts['wait']
|
|
383
424
|
};
|
|
384
425
|
var headerParams = {};
|
|
385
426
|
var formParams = {};
|
|
386
427
|
var authNames = ['api_token_basic'];
|
|
387
|
-
var contentTypes = [];
|
|
428
|
+
var contentTypes = ['application/json'];
|
|
388
429
|
var accepts = ['application/json'];
|
|
389
|
-
var returnType =
|
|
390
|
-
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);
|
|
391
432
|
}
|
|
392
433
|
|
|
393
434
|
/**
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
* @param {String}
|
|
397
|
-
* @param {module:model/
|
|
398
|
-
* @param {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
* Create a folder
|
|
403
|
-
* 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.
|
|
404
|
-
* @param {module:model/CreateFolderData} data
|
|
405
|
-
* @param {module:api/Client~createFolderCallback} callback The callback function, accepting three arguments: error, data, response
|
|
406
|
-
* 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}
|
|
407
443
|
*/
|
|
408
444
|
}, {
|
|
409
|
-
key: "
|
|
410
|
-
value: function
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
throw new Error("Missing the required parameter 'data' when calling createFolder");
|
|
415
|
-
}
|
|
416
|
-
var pathParams = {};
|
|
417
|
-
var queryParams = {};
|
|
418
|
-
var headerParams = {};
|
|
419
|
-
var formParams = {};
|
|
420
|
-
var authNames = ['api_token_basic'];
|
|
421
|
-
var contentTypes = ['application/json'];
|
|
422
|
-
var accepts = ['application/json'];
|
|
423
|
-
var returnType = _Folder["default"];
|
|
424
|
-
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
|
+
});
|
|
425
450
|
}
|
|
426
451
|
|
|
427
452
|
/**
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
* @param {
|
|
431
|
-
* @param {
|
|
432
|
-
* @param {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Create a new HTML template
|
|
437
|
-
* 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.
|
|
438
|
-
* @param {module:model/CreateHtmlTemplate} data
|
|
439
|
-
* @param {module:api/Client~createHtmlTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
440
|
-
* 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
|
|
441
459
|
*/
|
|
442
460
|
}, {
|
|
443
|
-
key: "
|
|
444
|
-
value: function
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
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");
|
|
449
468
|
}
|
|
450
469
|
var pathParams = {};
|
|
451
|
-
var queryParams = {
|
|
470
|
+
var queryParams = {
|
|
471
|
+
'wait': opts['wait']
|
|
472
|
+
};
|
|
452
473
|
var headerParams = {};
|
|
453
474
|
var formParams = {};
|
|
454
475
|
var authNames = ['api_token_basic'];
|
|
455
476
|
var contentTypes = ['application/json'];
|
|
456
477
|
var accepts = ['application/json'];
|
|
457
|
-
var returnType =
|
|
458
|
-
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);
|
|
459
480
|
}
|
|
460
481
|
|
|
461
482
|
/**
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* @param {
|
|
465
|
-
* @param {
|
|
466
|
-
* @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}
|
|
467
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
|
+
}
|
|
468
497
|
|
|
469
498
|
/**
|
|
470
|
-
* Create a
|
|
471
|
-
* Creates a
|
|
472
|
-
* @param {
|
|
473
|
-
* @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.
|
|
474
502
|
* @param {Object} opts Optional parameters
|
|
475
|
-
* @param {Boolean} [wait
|
|
476
|
-
* @
|
|
477
|
-
* @param {String} [template_parent_folder_id]
|
|
478
|
-
* @param {module:api/Client~createPdfTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
479
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
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
|
|
480
505
|
*/
|
|
481
506
|
}, {
|
|
482
|
-
key: "
|
|
483
|
-
value: function
|
|
507
|
+
key: "createTemplateWithHttpInfo",
|
|
508
|
+
value: function createTemplateWithHttpInfo(body, opts) {
|
|
484
509
|
opts = opts || {};
|
|
485
|
-
var postBody =
|
|
486
|
-
// verify the required parameter '
|
|
487
|
-
if (
|
|
488
|
-
throw new Error("Missing the required parameter '
|
|
489
|
-
}
|
|
490
|
-
// verify the required parameter 'template_name' is set
|
|
491
|
-
if (template_name === undefined || template_name === null) {
|
|
492
|
-
throw new Error("Missing the required parameter 'template_name' when calling createPdfTemplate");
|
|
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");
|
|
493
514
|
}
|
|
494
515
|
var pathParams = {};
|
|
495
516
|
var queryParams = {
|
|
496
517
|
'wait': opts['wait']
|
|
497
518
|
};
|
|
498
519
|
var headerParams = {};
|
|
499
|
-
var formParams = {
|
|
500
|
-
'template[document]': template_document,
|
|
501
|
-
'template[name]': template_name,
|
|
502
|
-
'template[description]': opts['template_description'],
|
|
503
|
-
'template[parent_folder_id]': opts['template_parent_folder_id']
|
|
504
|
-
};
|
|
520
|
+
var formParams = {};
|
|
505
521
|
var authNames = ['api_token_basic'];
|
|
506
|
-
var contentTypes = ['
|
|
522
|
+
var contentTypes = ['application/json'];
|
|
507
523
|
var accepts = ['application/json'];
|
|
508
|
-
var returnType =
|
|
509
|
-
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);
|
|
510
526
|
}
|
|
511
527
|
|
|
512
528
|
/**
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
* @param {
|
|
516
|
-
* @param {
|
|
517
|
-
* @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}
|
|
518
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
|
+
}
|
|
519
543
|
|
|
520
544
|
/**
|
|
521
|
-
* Create a
|
|
522
|
-
* Creates a
|
|
523
|
-
* @param {module:model/
|
|
524
|
-
* @
|
|
525
|
-
* 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
|
|
526
549
|
*/
|
|
527
550
|
}, {
|
|
528
|
-
key: "
|
|
529
|
-
value: function
|
|
530
|
-
var postBody =
|
|
531
|
-
// verify the required parameter '
|
|
532
|
-
if (
|
|
533
|
-
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");
|
|
534
557
|
}
|
|
535
558
|
var pathParams = {};
|
|
536
559
|
var queryParams = {};
|
|
@@ -539,62 +562,74 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
539
562
|
var authNames = ['api_token_basic'];
|
|
540
563
|
var contentTypes = ['application/json'];
|
|
541
564
|
var accepts = ['application/json'];
|
|
542
|
-
var returnType =
|
|
543
|
-
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);
|
|
544
567
|
}
|
|
545
568
|
|
|
546
569
|
/**
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
* @param {
|
|
550
|
-
* @
|
|
551
|
-
* @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}
|
|
552
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
|
+
}
|
|
553
582
|
|
|
554
583
|
/**
|
|
555
|
-
*
|
|
556
|
-
*
|
|
557
|
-
* @param {
|
|
558
|
-
* @
|
|
559
|
-
* 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
|
|
560
588
|
*/
|
|
561
589
|
}, {
|
|
562
|
-
key: "
|
|
563
|
-
value: function
|
|
564
|
-
var postBody =
|
|
565
|
-
// verify the required parameter '
|
|
566
|
-
if (
|
|
567
|
-
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");
|
|
568
596
|
}
|
|
569
|
-
var pathParams = {
|
|
597
|
+
var pathParams = {
|
|
598
|
+
'custom_file_id': custom_file_id
|
|
599
|
+
};
|
|
570
600
|
var queryParams = {};
|
|
571
601
|
var headerParams = {};
|
|
572
602
|
var formParams = {};
|
|
573
603
|
var authNames = ['api_token_basic'];
|
|
574
|
-
var contentTypes = [
|
|
604
|
+
var contentTypes = [];
|
|
575
605
|
var accepts = ['application/json'];
|
|
576
|
-
var returnType =
|
|
577
|
-
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);
|
|
578
608
|
}
|
|
579
609
|
|
|
580
610
|
/**
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* @param {String}
|
|
584
|
-
* @
|
|
585
|
-
* @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}
|
|
586
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
|
+
}
|
|
587
623
|
|
|
588
624
|
/**
|
|
589
625
|
* Delete a folder
|
|
590
|
-
* Deletes an empty folder.
|
|
591
|
-
* @param {String} folder_id
|
|
592
|
-
* @
|
|
593
|
-
* 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
|
|
594
629
|
*/
|
|
595
630
|
}, {
|
|
596
|
-
key: "
|
|
597
|
-
value: function
|
|
631
|
+
key: "deleteFolderWithHttpInfo",
|
|
632
|
+
value: function deleteFolderWithHttpInfo(folder_id) {
|
|
598
633
|
var postBody = null;
|
|
599
634
|
// verify the required parameter 'folder_id' is set
|
|
600
635
|
if (folder_id === undefined || folder_id === null) {
|
|
@@ -610,29 +645,34 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
610
645
|
var contentTypes = [];
|
|
611
646
|
var accepts = ['application/json'];
|
|
612
647
|
var returnType = _Folder["default"];
|
|
613
|
-
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);
|
|
614
649
|
}
|
|
615
650
|
|
|
616
651
|
/**
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
* @param {String}
|
|
620
|
-
* @
|
|
621
|
-
* @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}
|
|
622
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
|
+
}
|
|
623
664
|
|
|
624
665
|
/**
|
|
625
666
|
* Delete a template
|
|
626
|
-
* Deletes a template
|
|
627
|
-
* @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.
|
|
628
669
|
* @param {Object} opts Optional parameters
|
|
629
|
-
* @param {String} [version]
|
|
630
|
-
* @
|
|
631
|
-
* 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
|
|
632
672
|
*/
|
|
633
673
|
}, {
|
|
634
|
-
key: "
|
|
635
|
-
value: function
|
|
674
|
+
key: "deleteTemplateWithHttpInfo",
|
|
675
|
+
value: function deleteTemplateWithHttpInfo(template_id, opts) {
|
|
636
676
|
opts = opts || {};
|
|
637
677
|
var postBody = null;
|
|
638
678
|
// verify the required parameter 'template_id' is set
|
|
@@ -650,28 +690,35 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
650
690
|
var authNames = ['api_token_basic'];
|
|
651
691
|
var contentTypes = [];
|
|
652
692
|
var accepts = ['application/json'];
|
|
653
|
-
var returnType =
|
|
654
|
-
return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
693
|
+
var returnType = _Template["default"];
|
|
694
|
+
return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
655
695
|
}
|
|
656
696
|
|
|
657
697
|
/**
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
* @param {String}
|
|
661
|
-
* @param {
|
|
662
|
-
* @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}
|
|
663
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
|
+
}
|
|
664
712
|
|
|
665
713
|
/**
|
|
666
714
|
* Delete a webhook
|
|
667
|
-
*
|
|
668
|
-
* @param {String} webhook_id
|
|
669
|
-
* @
|
|
670
|
-
* 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
|
|
671
718
|
*/
|
|
672
719
|
}, {
|
|
673
|
-
key: "
|
|
674
|
-
value: function
|
|
720
|
+
key: "deleteWebhookWithHttpInfo",
|
|
721
|
+
value: function deleteWebhookWithHttpInfo(webhook_id) {
|
|
675
722
|
var postBody = null;
|
|
676
723
|
// verify the required parameter 'webhook_id' is set
|
|
677
724
|
if (webhook_id === undefined || webhook_id === null) {
|
|
@@ -687,34 +734,39 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
687
734
|
var contentTypes = [];
|
|
688
735
|
var accepts = ['application/json'];
|
|
689
736
|
var returnType = _Webhook["default"];
|
|
690
|
-
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);
|
|
691
738
|
}
|
|
692
739
|
|
|
693
740
|
/**
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
* @param {String}
|
|
697
|
-
* @
|
|
698
|
-
* @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}
|
|
699
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
|
+
}
|
|
700
753
|
|
|
701
754
|
/**
|
|
702
|
-
* Expire a combined
|
|
703
|
-
*
|
|
704
|
-
* @param {String}
|
|
705
|
-
* @
|
|
706
|
-
* 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
|
|
707
759
|
*/
|
|
708
760
|
}, {
|
|
709
|
-
key: "
|
|
710
|
-
value: function
|
|
761
|
+
key: "expireCombinedPdfWithHttpInfo",
|
|
762
|
+
value: function expireCombinedPdfWithHttpInfo(combined_pdf_id) {
|
|
711
763
|
var postBody = null;
|
|
712
|
-
// verify the required parameter '
|
|
713
|
-
if (
|
|
714
|
-
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");
|
|
715
767
|
}
|
|
716
768
|
var pathParams = {
|
|
717
|
-
'
|
|
769
|
+
'combined_pdf_id': combined_pdf_id
|
|
718
770
|
};
|
|
719
771
|
var queryParams = {};
|
|
720
772
|
var headerParams = {};
|
|
@@ -722,28 +774,33 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
722
774
|
var authNames = ['api_token_basic'];
|
|
723
775
|
var contentTypes = [];
|
|
724
776
|
var accepts = ['application/json'];
|
|
725
|
-
var returnType =
|
|
726
|
-
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);
|
|
727
779
|
}
|
|
728
780
|
|
|
729
781
|
/**
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
* @param {String}
|
|
733
|
-
* @
|
|
734
|
-
* @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}
|
|
735
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
|
+
}
|
|
736
794
|
|
|
737
795
|
/**
|
|
738
|
-
* Expire a
|
|
739
|
-
*
|
|
740
|
-
* @param {String} submission_id
|
|
741
|
-
* @
|
|
742
|
-
* 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
|
|
743
800
|
*/
|
|
744
801
|
}, {
|
|
745
|
-
key: "
|
|
746
|
-
value: function
|
|
802
|
+
key: "expireSubmissionWithHttpInfo",
|
|
803
|
+
value: function expireSubmissionWithHttpInfo(submission_id) {
|
|
747
804
|
var postBody = null;
|
|
748
805
|
// verify the required parameter 'submission_id' is set
|
|
749
806
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -758,81 +815,81 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
758
815
|
var authNames = ['api_token_basic'];
|
|
759
816
|
var contentTypes = [];
|
|
760
817
|
var accepts = ['application/json'];
|
|
761
|
-
var returnType =
|
|
762
|
-
return this.apiClient.callApi('/submissions/{submission_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
818
|
+
var returnType = _Submission["default"];
|
|
819
|
+
return this.apiClient.callApi('/submissions/{submission_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
763
820
|
}
|
|
764
821
|
|
|
765
822
|
/**
|
|
766
|
-
*
|
|
767
|
-
*
|
|
768
|
-
* @param {String}
|
|
769
|
-
* @
|
|
770
|
-
* @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}
|
|
771
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
|
+
}
|
|
772
835
|
|
|
773
836
|
/**
|
|
774
|
-
* Generate a PDF
|
|
775
|
-
*
|
|
776
|
-
* @param {String}
|
|
777
|
-
* @
|
|
778
|
-
* @param {Object} opts Optional parameters
|
|
779
|
-
* @param {Boolean} [wait = true)] Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
|
|
780
|
-
* @param {module:api/Client~generatePdfCallback} callback The callback function, accepting three arguments: error, data, response
|
|
781
|
-
* 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
|
|
782
841
|
*/
|
|
783
842
|
}, {
|
|
784
|
-
key: "
|
|
785
|
-
value: function
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
throw new Error("Missing the required parameter 'template_id' when calling generatePdf");
|
|
791
|
-
}
|
|
792
|
-
// verify the required parameter 'submission' is set
|
|
793
|
-
if (submission === undefined || submission === null) {
|
|
794
|
-
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");
|
|
795
849
|
}
|
|
796
850
|
var pathParams = {
|
|
797
|
-
'
|
|
798
|
-
};
|
|
799
|
-
var queryParams = {
|
|
800
|
-
'wait': opts['wait']
|
|
851
|
+
'submission_id': submission_id
|
|
801
852
|
};
|
|
853
|
+
var queryParams = {};
|
|
802
854
|
var headerParams = {};
|
|
803
855
|
var formParams = {};
|
|
804
856
|
var authNames = ['api_token_basic'];
|
|
805
|
-
var contentTypes = [
|
|
857
|
+
var contentTypes = [];
|
|
806
858
|
var accepts = ['application/json'];
|
|
807
|
-
var returnType =
|
|
808
|
-
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);
|
|
809
861
|
}
|
|
810
862
|
|
|
811
863
|
/**
|
|
812
|
-
*
|
|
813
|
-
*
|
|
814
|
-
* @param {String}
|
|
815
|
-
* @
|
|
816
|
-
* @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}
|
|
817
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
|
+
}
|
|
818
876
|
|
|
819
877
|
/**
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
* @param {String}
|
|
823
|
-
* @
|
|
824
|
-
* 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
|
|
825
882
|
*/
|
|
826
883
|
}, {
|
|
827
|
-
key: "
|
|
828
|
-
value: function
|
|
884
|
+
key: "getCombinedPdfWithHttpInfo",
|
|
885
|
+
value: function getCombinedPdfWithHttpInfo(combined_pdf_id) {
|
|
829
886
|
var postBody = null;
|
|
830
|
-
// verify the required parameter '
|
|
831
|
-
if (
|
|
832
|
-
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");
|
|
833
890
|
}
|
|
834
891
|
var pathParams = {
|
|
835
|
-
'
|
|
892
|
+
'combined_pdf_id': combined_pdf_id
|
|
836
893
|
};
|
|
837
894
|
var queryParams = {};
|
|
838
895
|
var headerParams = {};
|
|
@@ -840,35 +897,40 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
840
897
|
var authNames = ['api_token_basic'];
|
|
841
898
|
var contentTypes = [];
|
|
842
899
|
var accepts = ['application/json'];
|
|
843
|
-
var returnType =
|
|
844
|
-
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);
|
|
845
902
|
}
|
|
846
903
|
|
|
847
904
|
/**
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
* @param {String}
|
|
851
|
-
* @
|
|
852
|
-
* @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}
|
|
853
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
|
+
}
|
|
854
917
|
|
|
855
918
|
/**
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
* @param {String}
|
|
859
|
-
* @
|
|
860
|
-
* 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
|
|
861
923
|
*/
|
|
862
924
|
}, {
|
|
863
|
-
key: "
|
|
864
|
-
value: function
|
|
925
|
+
key: "getCustomFileWithHttpInfo",
|
|
926
|
+
value: function getCustomFileWithHttpInfo(custom_file_id) {
|
|
865
927
|
var postBody = null;
|
|
866
|
-
// verify the required parameter '
|
|
867
|
-
if (
|
|
868
|
-
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");
|
|
869
931
|
}
|
|
870
932
|
var pathParams = {
|
|
871
|
-
'
|
|
933
|
+
'custom_file_id': custom_file_id
|
|
872
934
|
};
|
|
873
935
|
var queryParams = {};
|
|
874
936
|
var headerParams = {};
|
|
@@ -876,35 +938,40 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
876
938
|
var authNames = ['api_token_basic'];
|
|
877
939
|
var contentTypes = [];
|
|
878
940
|
var accepts = ['application/json'];
|
|
879
|
-
var returnType =
|
|
880
|
-
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);
|
|
881
943
|
}
|
|
882
944
|
|
|
883
945
|
/**
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
* @param {String}
|
|
887
|
-
* @
|
|
888
|
-
* @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}
|
|
889
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
|
+
}
|
|
890
958
|
|
|
891
959
|
/**
|
|
892
|
-
*
|
|
893
|
-
*
|
|
894
|
-
* @param {String}
|
|
895
|
-
* @
|
|
896
|
-
* 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
|
|
897
964
|
*/
|
|
898
965
|
}, {
|
|
899
|
-
key: "
|
|
900
|
-
value: function
|
|
966
|
+
key: "getFolderWithHttpInfo",
|
|
967
|
+
value: function getFolderWithHttpInfo(folder_id) {
|
|
901
968
|
var postBody = null;
|
|
902
|
-
// verify the required parameter '
|
|
903
|
-
if (
|
|
904
|
-
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");
|
|
905
972
|
}
|
|
906
973
|
var pathParams = {
|
|
907
|
-
'
|
|
974
|
+
'folder_id': folder_id
|
|
908
975
|
};
|
|
909
976
|
var queryParams = {};
|
|
910
977
|
var headerParams = {};
|
|
@@ -912,96 +979,107 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
912
979
|
var authNames = ['api_token_basic'];
|
|
913
980
|
var contentTypes = [];
|
|
914
981
|
var accepts = ['application/json'];
|
|
915
|
-
var returnType =
|
|
916
|
-
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);
|
|
917
984
|
}
|
|
918
985
|
|
|
919
986
|
/**
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
* @param {String}
|
|
923
|
-
* @
|
|
924
|
-
* @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}
|
|
925
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
|
+
}
|
|
926
999
|
|
|
927
1000
|
/**
|
|
928
|
-
*
|
|
929
|
-
*
|
|
930
|
-
* @
|
|
931
|
-
* @param {module:api/Client~getFullTemplateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
932
|
-
* 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
|
|
933
1004
|
*/
|
|
934
1005
|
}, {
|
|
935
|
-
key: "
|
|
936
|
-
value: function
|
|
1006
|
+
key: "getPresignUrlWithHttpInfo",
|
|
1007
|
+
value: function getPresignUrlWithHttpInfo() {
|
|
937
1008
|
var postBody = null;
|
|
938
|
-
|
|
939
|
-
if (template_id === undefined || template_id === null) {
|
|
940
|
-
throw new Error("Missing the required parameter 'template_id' when calling getFullTemplate");
|
|
941
|
-
}
|
|
942
|
-
var pathParams = {
|
|
943
|
-
'template_id': template_id
|
|
944
|
-
};
|
|
1009
|
+
var pathParams = {};
|
|
945
1010
|
var queryParams = {};
|
|
946
1011
|
var headerParams = {};
|
|
947
1012
|
var formParams = {};
|
|
948
1013
|
var authNames = ['api_token_basic'];
|
|
949
1014
|
var contentTypes = [];
|
|
950
1015
|
var accepts = ['application/json'];
|
|
951
|
-
var returnType =
|
|
952
|
-
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);
|
|
953
1018
|
}
|
|
954
1019
|
|
|
955
1020
|
/**
|
|
956
|
-
*
|
|
957
|
-
*
|
|
958
|
-
* @
|
|
959
|
-
* @param {module:model/UploadPresignResponse} data The data returned by the service call.
|
|
960
|
-
* @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}
|
|
961
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
|
+
}
|
|
962
1032
|
|
|
963
1033
|
/**
|
|
964
|
-
* Get a
|
|
965
|
-
* Returns a
|
|
966
|
-
* @param {
|
|
967
|
-
* 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
|
|
968
1038
|
*/
|
|
969
1039
|
}, {
|
|
970
|
-
key: "
|
|
971
|
-
value: function
|
|
1040
|
+
key: "getSignatureRequestWithHttpInfo",
|
|
1041
|
+
value: function getSignatureRequestWithHttpInfo(signature_request_id) {
|
|
972
1042
|
var postBody = null;
|
|
973
|
-
|
|
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
|
+
};
|
|
974
1050
|
var queryParams = {};
|
|
975
1051
|
var headerParams = {};
|
|
976
1052
|
var formParams = {};
|
|
977
1053
|
var authNames = ['api_token_basic'];
|
|
978
1054
|
var contentTypes = [];
|
|
979
1055
|
var accepts = ['application/json'];
|
|
980
|
-
var returnType =
|
|
981
|
-
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);
|
|
982
1058
|
}
|
|
983
1059
|
|
|
984
1060
|
/**
|
|
985
|
-
*
|
|
986
|
-
*
|
|
987
|
-
* @param {String}
|
|
988
|
-
* @
|
|
989
|
-
* @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}
|
|
990
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
|
+
}
|
|
991
1073
|
|
|
992
1074
|
/**
|
|
993
|
-
*
|
|
994
|
-
*
|
|
995
|
-
* @param {String} submission_id
|
|
996
|
-
* @
|
|
997
|
-
* @param {Boolean} [include_data]
|
|
998
|
-
* @param {module:api/Client~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
|
|
999
|
-
* data is of type: {@link module:model/Submission}
|
|
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
|
|
1000
1079
|
*/
|
|
1001
1080
|
}, {
|
|
1002
|
-
key: "
|
|
1003
|
-
value: function
|
|
1004
|
-
opts = opts || {};
|
|
1081
|
+
key: "getSubmissionWithHttpInfo",
|
|
1082
|
+
value: function getSubmissionWithHttpInfo(submission_id) {
|
|
1005
1083
|
var postBody = null;
|
|
1006
1084
|
// verify the required parameter 'submission_id' is set
|
|
1007
1085
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -1010,38 +1088,41 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1010
1088
|
var pathParams = {
|
|
1011
1089
|
'submission_id': submission_id
|
|
1012
1090
|
};
|
|
1013
|
-
var queryParams = {
|
|
1014
|
-
'include_data': opts['include_data']
|
|
1015
|
-
};
|
|
1091
|
+
var queryParams = {};
|
|
1016
1092
|
var headerParams = {};
|
|
1017
1093
|
var formParams = {};
|
|
1018
1094
|
var authNames = ['api_token_basic'];
|
|
1019
1095
|
var contentTypes = [];
|
|
1020
1096
|
var accepts = ['application/json'];
|
|
1021
1097
|
var returnType = _Submission["default"];
|
|
1022
|
-
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);
|
|
1023
1099
|
}
|
|
1024
1100
|
|
|
1025
1101
|
/**
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
* @param {String}
|
|
1029
|
-
* @
|
|
1030
|
-
* @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}
|
|
1031
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
|
+
}
|
|
1032
1114
|
|
|
1033
1115
|
/**
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
* @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.
|
|
1037
1119
|
* @param {Object} opts Optional parameters
|
|
1038
|
-
* @param {Boolean} [
|
|
1039
|
-
* @
|
|
1040
|
-
* 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
|
|
1041
1122
|
*/
|
|
1042
1123
|
}, {
|
|
1043
|
-
key: "
|
|
1044
|
-
value: function
|
|
1124
|
+
key: "getSubmissionBatchWithHttpInfo",
|
|
1125
|
+
value: function getSubmissionBatchWithHttpInfo(submission_batch_id, opts) {
|
|
1045
1126
|
opts = opts || {};
|
|
1046
1127
|
var postBody = null;
|
|
1047
1128
|
// verify the required parameter 'submission_batch_id' is set
|
|
@@ -1052,35 +1133,45 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1052
1133
|
'submission_batch_id': submission_batch_id
|
|
1053
1134
|
};
|
|
1054
1135
|
var queryParams = {
|
|
1055
|
-
'
|
|
1136
|
+
'include_data': opts['include_data']
|
|
1056
1137
|
};
|
|
1057
1138
|
var headerParams = {};
|
|
1058
1139
|
var formParams = {};
|
|
1059
1140
|
var authNames = ['api_token_basic'];
|
|
1060
1141
|
var contentTypes = [];
|
|
1061
1142
|
var accepts = ['application/json'];
|
|
1062
|
-
var returnType =
|
|
1063
|
-
return this.apiClient.callApi('/submissions/batches/{submission_batch_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
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);
|
|
1064
1145
|
}
|
|
1065
1146
|
|
|
1066
1147
|
/**
|
|
1067
|
-
*
|
|
1068
|
-
*
|
|
1069
|
-
* @param {String}
|
|
1070
|
-
* @param {
|
|
1071
|
-
* @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}
|
|
1072
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
|
+
}
|
|
1073
1162
|
|
|
1074
1163
|
/**
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
* @param {String} template_id
|
|
1078
|
-
* @param {
|
|
1079
|
-
*
|
|
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
|
|
1080
1170
|
*/
|
|
1081
1171
|
}, {
|
|
1082
|
-
key: "
|
|
1083
|
-
value: function
|
|
1172
|
+
key: "getTemplateWithHttpInfo",
|
|
1173
|
+
value: function getTemplateWithHttpInfo(template_id, opts) {
|
|
1174
|
+
opts = opts || {};
|
|
1084
1175
|
var postBody = null;
|
|
1085
1176
|
// verify the required parameter 'template_id' is set
|
|
1086
1177
|
if (template_id === undefined || template_id === null) {
|
|
@@ -1089,35 +1180,47 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1089
1180
|
var pathParams = {
|
|
1090
1181
|
'template_id': template_id
|
|
1091
1182
|
};
|
|
1092
|
-
var queryParams = {
|
|
1183
|
+
var queryParams = {
|
|
1184
|
+
'version': opts['version']
|
|
1185
|
+
};
|
|
1093
1186
|
var headerParams = {};
|
|
1094
1187
|
var formParams = {};
|
|
1095
1188
|
var authNames = ['api_token_basic'];
|
|
1096
1189
|
var contentTypes = [];
|
|
1097
1190
|
var accepts = ['application/json'];
|
|
1098
|
-
var returnType =
|
|
1099
|
-
return this.apiClient.callApi('/templates/{template_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
1191
|
+
var returnType = _Template["default"];
|
|
1192
|
+
return this.apiClient.callApi('/templates/{template_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1100
1193
|
}
|
|
1101
1194
|
|
|
1102
1195
|
/**
|
|
1103
|
-
*
|
|
1104
|
-
*
|
|
1105
|
-
* @param {String}
|
|
1106
|
-
* @param {
|
|
1107
|
-
* @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}
|
|
1108
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
|
+
}
|
|
1109
1210
|
|
|
1110
1211
|
/**
|
|
1111
|
-
* Generate typed
|
|
1112
|
-
* Generates
|
|
1113
|
-
* @param {String} template_id
|
|
1114
|
-
* @param {module:model/
|
|
1115
|
-
* @param {
|
|
1116
|
-
*
|
|
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
|
|
1117
1219
|
*/
|
|
1118
1220
|
}, {
|
|
1119
|
-
key: "
|
|
1120
|
-
value: function
|
|
1221
|
+
key: "getTemplateModelCodeWithHttpInfo",
|
|
1222
|
+
value: function getTemplateModelCodeWithHttpInfo(template_id, lang, opts) {
|
|
1223
|
+
opts = opts || {};
|
|
1121
1224
|
var postBody = null;
|
|
1122
1225
|
// verify the required parameter 'template_id' is set
|
|
1123
1226
|
if (template_id === undefined || template_id === null) {
|
|
@@ -1131,6 +1234,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1131
1234
|
'template_id': template_id
|
|
1132
1235
|
};
|
|
1133
1236
|
var queryParams = {
|
|
1237
|
+
'version': opts['version'],
|
|
1134
1238
|
'lang': lang
|
|
1135
1239
|
};
|
|
1136
1240
|
var headerParams = {};
|
|
@@ -1138,28 +1242,39 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1138
1242
|
var authNames = ['api_token_basic'];
|
|
1139
1243
|
var contentTypes = [];
|
|
1140
1244
|
var accepts = ['application/json'];
|
|
1141
|
-
var returnType =
|
|
1142
|
-
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);
|
|
1143
1247
|
}
|
|
1144
1248
|
|
|
1145
1249
|
/**
|
|
1146
|
-
*
|
|
1147
|
-
*
|
|
1148
|
-
* @param {String}
|
|
1149
|
-
* @param {module:model/
|
|
1150
|
-
* @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}
|
|
1151
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
|
+
}
|
|
1152
1265
|
|
|
1153
1266
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
* @param {String} template_id
|
|
1157
|
-
* @param {
|
|
1158
|
-
*
|
|
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
|
|
1159
1273
|
*/
|
|
1160
1274
|
}, {
|
|
1161
|
-
key: "
|
|
1162
|
-
value: function
|
|
1275
|
+
key: "getTemplateSchemaWithHttpInfo",
|
|
1276
|
+
value: function getTemplateSchemaWithHttpInfo(template_id, opts) {
|
|
1277
|
+
opts = opts || {};
|
|
1163
1278
|
var postBody = null;
|
|
1164
1279
|
// verify the required parameter 'template_id' is set
|
|
1165
1280
|
if (template_id === undefined || template_id === null) {
|
|
@@ -1168,34 +1283,45 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1168
1283
|
var pathParams = {
|
|
1169
1284
|
'template_id': template_id
|
|
1170
1285
|
};
|
|
1171
|
-
var queryParams = {
|
|
1286
|
+
var queryParams = {
|
|
1287
|
+
'version': opts['version']
|
|
1288
|
+
};
|
|
1172
1289
|
var headerParams = {};
|
|
1173
1290
|
var formParams = {};
|
|
1174
1291
|
var authNames = ['api_token_basic'];
|
|
1175
1292
|
var contentTypes = [];
|
|
1176
1293
|
var accepts = ['application/json'];
|
|
1177
|
-
var returnType =
|
|
1178
|
-
|
|
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);
|
|
1179
1298
|
}
|
|
1180
1299
|
|
|
1181
1300
|
/**
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1184
|
-
* @param {String}
|
|
1185
|
-
* @param {
|
|
1186
|
-
* @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}>}
|
|
1187
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
|
+
}
|
|
1188
1315
|
|
|
1189
1316
|
/**
|
|
1190
1317
|
* Get a webhook
|
|
1191
|
-
*
|
|
1192
|
-
* @param {String} webhook_id
|
|
1193
|
-
* @
|
|
1194
|
-
* 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
|
|
1195
1321
|
*/
|
|
1196
1322
|
}, {
|
|
1197
|
-
key: "
|
|
1198
|
-
value: function
|
|
1323
|
+
key: "getWebhookWithHttpInfo",
|
|
1324
|
+
value: function getWebhookWithHttpInfo(webhook_id) {
|
|
1199
1325
|
var postBody = null;
|
|
1200
1326
|
// verify the required parameter 'webhook_id' is set
|
|
1201
1327
|
if (webhook_id === undefined || webhook_id === null) {
|
|
@@ -1211,148 +1337,229 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1211
1337
|
var contentTypes = [];
|
|
1212
1338
|
var accepts = ['application/json'];
|
|
1213
1339
|
var returnType = _Webhook["default"];
|
|
1214
|
-
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);
|
|
1215
1341
|
}
|
|
1216
1342
|
|
|
1217
1343
|
/**
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1220
|
-
* @param {String}
|
|
1221
|
-
* @
|
|
1222
|
-
* @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}
|
|
1223
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
|
+
}
|
|
1224
1356
|
|
|
1225
1357
|
/**
|
|
1226
|
-
*
|
|
1227
|
-
* Returns
|
|
1358
|
+
* List combined PDFs
|
|
1359
|
+
* Returns the combined PDFs in your account, newest first, one page at a time.
|
|
1228
1360
|
* @param {Object} opts Optional parameters
|
|
1229
|
-
* @param {Number} [
|
|
1230
|
-
* @param {
|
|
1231
|
-
* @
|
|
1232
|
-
* 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
|
|
1233
1364
|
*/
|
|
1234
1365
|
}, {
|
|
1235
|
-
key: "
|
|
1236
|
-
value: function
|
|
1366
|
+
key: "listCombinedPdfsWithHttpInfo",
|
|
1367
|
+
value: function listCombinedPdfsWithHttpInfo(opts) {
|
|
1237
1368
|
opts = opts || {};
|
|
1238
1369
|
var postBody = null;
|
|
1239
1370
|
var pathParams = {};
|
|
1240
1371
|
var queryParams = {
|
|
1241
|
-
'
|
|
1242
|
-
'
|
|
1372
|
+
'limit': opts['limit'],
|
|
1373
|
+
'cursor': opts['cursor']
|
|
1243
1374
|
};
|
|
1244
1375
|
var headerParams = {};
|
|
1245
1376
|
var formParams = {};
|
|
1246
1377
|
var authNames = ['api_token_basic'];
|
|
1247
1378
|
var contentTypes = [];
|
|
1248
1379
|
var accepts = ['application/json'];
|
|
1249
|
-
var returnType = [
|
|
1250
|
-
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);
|
|
1251
1382
|
}
|
|
1252
1383
|
|
|
1253
1384
|
/**
|
|
1254
|
-
*
|
|
1255
|
-
*
|
|
1256
|
-
* @param {
|
|
1257
|
-
* @param {
|
|
1258
|
-
* @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}
|
|
1259
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
|
+
}
|
|
1260
1399
|
|
|
1261
1400
|
/**
|
|
1262
|
-
*
|
|
1263
|
-
* Returns
|
|
1401
|
+
* List custom files
|
|
1402
|
+
* Returns the custom files in your account, newest first, one page at a time.
|
|
1264
1403
|
* @param {Object} opts Optional parameters
|
|
1265
|
-
* @param {
|
|
1266
|
-
* @param {
|
|
1267
|
-
* 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
|
|
1268
1407
|
*/
|
|
1269
1408
|
}, {
|
|
1270
|
-
key: "
|
|
1271
|
-
value: function
|
|
1409
|
+
key: "listCustomFilesWithHttpInfo",
|
|
1410
|
+
value: function listCustomFilesWithHttpInfo(opts) {
|
|
1272
1411
|
opts = opts || {};
|
|
1273
1412
|
var postBody = null;
|
|
1274
1413
|
var pathParams = {};
|
|
1275
1414
|
var queryParams = {
|
|
1276
|
-
'
|
|
1415
|
+
'limit': opts['limit'],
|
|
1416
|
+
'cursor': opts['cursor']
|
|
1277
1417
|
};
|
|
1278
1418
|
var headerParams = {};
|
|
1279
1419
|
var formParams = {};
|
|
1280
1420
|
var authNames = ['api_token_basic'];
|
|
1281
1421
|
var contentTypes = [];
|
|
1282
1422
|
var accepts = ['application/json'];
|
|
1283
|
-
var returnType = [
|
|
1284
|
-
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);
|
|
1285
1425
|
}
|
|
1286
1426
|
|
|
1287
1427
|
/**
|
|
1288
|
-
*
|
|
1289
|
-
*
|
|
1290
|
-
* @param {
|
|
1291
|
-
* @param {
|
|
1292
|
-
* @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}
|
|
1293
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
|
+
}
|
|
1294
1442
|
|
|
1295
1443
|
/**
|
|
1296
|
-
* List
|
|
1297
|
-
* 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.
|
|
1298
1446
|
* @param {Object} opts Optional parameters
|
|
1299
|
-
* @param {String} [
|
|
1300
|
-
* @param {Number} [limit]
|
|
1301
|
-
* @param {String} [
|
|
1302
|
-
* @
|
|
1303
|
-
* @param {String} [type]
|
|
1304
|
-
* @param {Boolean} [include_data]
|
|
1305
|
-
* @param {module:api/Client~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
|
|
1306
|
-
* data is of type: {@link module:model/ListSubmissionsResponse}
|
|
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
|
|
1307
1451
|
*/
|
|
1308
1452
|
}, {
|
|
1309
|
-
key: "
|
|
1310
|
-
value: function
|
|
1453
|
+
key: "listFoldersWithHttpInfo",
|
|
1454
|
+
value: function listFoldersWithHttpInfo(opts) {
|
|
1311
1455
|
opts = opts || {};
|
|
1312
1456
|
var postBody = null;
|
|
1313
1457
|
var pathParams = {};
|
|
1314
1458
|
var queryParams = {
|
|
1315
|
-
'
|
|
1459
|
+
'parent_folder_id': opts['parent_folder_id'],
|
|
1316
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'],
|
|
1317
1511
|
'created_after': opts['created_after'],
|
|
1318
1512
|
'created_before': opts['created_before'],
|
|
1319
|
-
'
|
|
1320
|
-
'
|
|
1513
|
+
'include_data': opts['include_data'],
|
|
1514
|
+
'limit': opts['limit'],
|
|
1515
|
+
'cursor': opts['cursor']
|
|
1321
1516
|
};
|
|
1322
1517
|
var headerParams = {};
|
|
1323
1518
|
var formParams = {};
|
|
1324
1519
|
var authNames = ['api_token_basic'];
|
|
1325
1520
|
var contentTypes = [];
|
|
1326
1521
|
var accepts = ['application/json'];
|
|
1327
|
-
var returnType =
|
|
1328
|
-
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);
|
|
1329
1524
|
}
|
|
1330
1525
|
|
|
1331
1526
|
/**
|
|
1332
|
-
*
|
|
1333
|
-
*
|
|
1334
|
-
* @param {
|
|
1335
|
-
* @param {
|
|
1336
|
-
* @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}
|
|
1337
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
|
+
}
|
|
1338
1546
|
|
|
1339
1547
|
/**
|
|
1340
|
-
* List
|
|
1341
|
-
* Returns a
|
|
1342
|
-
* @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.
|
|
1343
1551
|
* @param {Object} opts Optional parameters
|
|
1344
|
-
* @param {
|
|
1345
|
-
* @param {
|
|
1346
|
-
* @param {
|
|
1347
|
-
* @param {
|
|
1348
|
-
* @param {
|
|
1349
|
-
* @param {
|
|
1350
|
-
* @
|
|
1351
|
-
* 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
|
|
1352
1559
|
*/
|
|
1353
1560
|
}, {
|
|
1354
|
-
key: "
|
|
1355
|
-
value: function
|
|
1561
|
+
key: "listTemplateSubmissionsWithHttpInfo",
|
|
1562
|
+
value: function listTemplateSubmissionsWithHttpInfo(template_id, opts) {
|
|
1356
1563
|
opts = opts || {};
|
|
1357
1564
|
var postBody = null;
|
|
1358
1565
|
// verify the required parameter 'template_id' is set
|
|
@@ -1363,135 +1570,168 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1363
1570
|
'template_id': template_id
|
|
1364
1571
|
};
|
|
1365
1572
|
var queryParams = {
|
|
1366
|
-
'
|
|
1367
|
-
'limit': opts['limit'],
|
|
1573
|
+
'test': opts['test'],
|
|
1368
1574
|
'created_after': opts['created_after'],
|
|
1369
1575
|
'created_before': opts['created_before'],
|
|
1370
|
-
'
|
|
1371
|
-
'
|
|
1576
|
+
'include_data': opts['include_data'],
|
|
1577
|
+
'limit': opts['limit'],
|
|
1578
|
+
'cursor': opts['cursor']
|
|
1372
1579
|
};
|
|
1373
1580
|
var headerParams = {};
|
|
1374
1581
|
var formParams = {};
|
|
1375
1582
|
var authNames = ['api_token_basic'];
|
|
1376
1583
|
var contentTypes = [];
|
|
1377
1584
|
var accepts = ['application/json'];
|
|
1378
|
-
var returnType =
|
|
1379
|
-
return this.apiClient.callApi('/templates/{template_id}/submissions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
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);
|
|
1380
1587
|
}
|
|
1381
1588
|
|
|
1382
1589
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
*
|
|
1385
|
-
* @param {String}
|
|
1386
|
-
* @param {
|
|
1387
|
-
* @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}
|
|
1388
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
|
+
}
|
|
1389
1609
|
|
|
1390
1610
|
/**
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
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.
|
|
1393
1613
|
* @param {Object} opts Optional parameters
|
|
1394
|
-
* @param {String} [query]
|
|
1395
|
-
* @param {String} [parent_folder_id]
|
|
1396
|
-
* @param {Number} [
|
|
1397
|
-
* @param {
|
|
1398
|
-
* @
|
|
1399
|
-
* data is of type: {@link Array.<module:model/TemplatePreview>}
|
|
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
|
|
1400
1619
|
*/
|
|
1401
1620
|
}, {
|
|
1402
|
-
key: "
|
|
1403
|
-
value: function
|
|
1621
|
+
key: "listTemplatesWithHttpInfo",
|
|
1622
|
+
value: function listTemplatesWithHttpInfo(opts) {
|
|
1404
1623
|
opts = opts || {};
|
|
1405
1624
|
var postBody = null;
|
|
1406
1625
|
var pathParams = {};
|
|
1407
1626
|
var queryParams = {
|
|
1408
1627
|
'query': opts['query'],
|
|
1409
1628
|
'parent_folder_id': opts['parent_folder_id'],
|
|
1410
|
-
'
|
|
1411
|
-
'
|
|
1629
|
+
'limit': opts['limit'],
|
|
1630
|
+
'cursor': opts['cursor']
|
|
1412
1631
|
};
|
|
1413
1632
|
var headerParams = {};
|
|
1414
1633
|
var formParams = {};
|
|
1415
1634
|
var authNames = ['api_token_basic'];
|
|
1416
1635
|
var contentTypes = [];
|
|
1417
1636
|
var accepts = ['application/json'];
|
|
1418
|
-
var returnType = [
|
|
1419
|
-
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);
|
|
1420
1639
|
}
|
|
1421
1640
|
|
|
1422
1641
|
/**
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1425
|
-
* @param {
|
|
1426
|
-
* @param {
|
|
1427
|
-
* @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}
|
|
1428
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
|
+
}
|
|
1429
1658
|
|
|
1430
1659
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
* 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.
|
|
1433
1662
|
* @param {Object} opts Optional parameters
|
|
1434
|
-
* @param {
|
|
1435
|
-
* @param {
|
|
1436
|
-
* @param {String} [
|
|
1437
|
-
* @param {String} [
|
|
1438
|
-
* @param {String} [
|
|
1439
|
-
* @param {
|
|
1440
|
-
* @param {String} [
|
|
1441
|
-
* @
|
|
1442
|
-
* data is of type: {@link Array.<module:model/Webhook>}
|
|
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
|
|
1443
1671
|
*/
|
|
1444
1672
|
}, {
|
|
1445
|
-
key: "
|
|
1446
|
-
value: function
|
|
1673
|
+
key: "listWebhooksWithHttpInfo",
|
|
1674
|
+
value: function listWebhooksWithHttpInfo(opts) {
|
|
1447
1675
|
opts = opts || {};
|
|
1448
1676
|
var postBody = null;
|
|
1449
1677
|
var pathParams = {};
|
|
1450
1678
|
var queryParams = {
|
|
1451
|
-
'page': opts['page'],
|
|
1452
|
-
'per_page': opts['per_page'],
|
|
1453
1679
|
'event_type': opts['event_type'],
|
|
1454
1680
|
'mode': opts['mode'],
|
|
1455
1681
|
'template_id': opts['template_id'],
|
|
1456
1682
|
'folder_id': opts['folder_id'],
|
|
1457
|
-
'api_token_id': opts['api_token_id']
|
|
1683
|
+
'api_token_id': opts['api_token_id'],
|
|
1684
|
+
'limit': opts['limit'],
|
|
1685
|
+
'cursor': opts['cursor']
|
|
1458
1686
|
};
|
|
1459
1687
|
var headerParams = {};
|
|
1460
1688
|
var formParams = {};
|
|
1461
1689
|
var authNames = ['api_token_basic'];
|
|
1462
1690
|
var contentTypes = [];
|
|
1463
1691
|
var accepts = ['application/json'];
|
|
1464
|
-
var returnType = [
|
|
1465
|
-
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);
|
|
1466
1694
|
}
|
|
1467
1695
|
|
|
1468
1696
|
/**
|
|
1469
|
-
*
|
|
1470
|
-
*
|
|
1471
|
-
* @param {
|
|
1472
|
-
* @param {module:model/
|
|
1473
|
-
* @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}
|
|
1474
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
|
+
}
|
|
1475
1716
|
|
|
1476
1717
|
/**
|
|
1477
1718
|
* Move a folder
|
|
1478
|
-
* Moves a folder
|
|
1479
|
-
* @param {String} folder_id
|
|
1480
|
-
* @param {module:model/
|
|
1481
|
-
* @
|
|
1482
|
-
* data is of type: {@link module:model/Folder}
|
|
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
|
|
1483
1723
|
*/
|
|
1484
1724
|
}, {
|
|
1485
|
-
key: "
|
|
1486
|
-
value: function
|
|
1487
|
-
var postBody =
|
|
1725
|
+
key: "moveFolderWithHttpInfo",
|
|
1726
|
+
value: function moveFolderWithHttpInfo(folder_id, body) {
|
|
1727
|
+
var postBody = body;
|
|
1488
1728
|
// verify the required parameter 'folder_id' is set
|
|
1489
1729
|
if (folder_id === undefined || folder_id === null) {
|
|
1490
|
-
throw new Error("Missing the required parameter 'folder_id' when calling
|
|
1730
|
+
throw new Error("Missing the required parameter 'folder_id' when calling moveFolder");
|
|
1491
1731
|
}
|
|
1492
|
-
// verify the required parameter '
|
|
1493
|
-
if (
|
|
1494
|
-
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");
|
|
1495
1735
|
}
|
|
1496
1736
|
var pathParams = {
|
|
1497
1737
|
'folder_id': folder_id
|
|
@@ -1503,36 +1743,42 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1503
1743
|
var contentTypes = ['application/json'];
|
|
1504
1744
|
var accepts = ['application/json'];
|
|
1505
1745
|
var returnType = _Folder["default"];
|
|
1506
|
-
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);
|
|
1507
1747
|
}
|
|
1508
1748
|
|
|
1509
1749
|
/**
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1512
|
-
* @param {String}
|
|
1513
|
-
* @param {module:model/
|
|
1514
|
-
* @
|
|
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}
|
|
1515
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
|
+
}
|
|
1516
1763
|
|
|
1517
1764
|
/**
|
|
1518
|
-
* Move
|
|
1519
|
-
* Moves a template
|
|
1520
|
-
* @param {String} template_id
|
|
1521
|
-
* @param {module:model/
|
|
1522
|
-
* @
|
|
1523
|
-
* data is of type: {@link module:model/TemplatePreview}
|
|
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
|
|
1524
1770
|
*/
|
|
1525
1771
|
}, {
|
|
1526
|
-
key: "
|
|
1527
|
-
value: function
|
|
1528
|
-
var postBody =
|
|
1772
|
+
key: "moveTemplateWithHttpInfo",
|
|
1773
|
+
value: function moveTemplateWithHttpInfo(template_id, body) {
|
|
1774
|
+
var postBody = body;
|
|
1529
1775
|
// verify the required parameter 'template_id' is set
|
|
1530
1776
|
if (template_id === undefined || template_id === null) {
|
|
1531
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
1777
|
+
throw new Error("Missing the required parameter 'template_id' when calling moveTemplate");
|
|
1532
1778
|
}
|
|
1533
|
-
// verify the required parameter '
|
|
1534
|
-
if (
|
|
1535
|
-
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");
|
|
1536
1782
|
}
|
|
1537
1783
|
var pathParams = {
|
|
1538
1784
|
'template_id': template_id
|
|
@@ -1543,37 +1789,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1543
1789
|
var authNames = ['api_token_basic'];
|
|
1544
1790
|
var contentTypes = ['application/json'];
|
|
1545
1791
|
var accepts = ['application/json'];
|
|
1546
|
-
var returnType =
|
|
1547
|
-
return this.apiClient.callApi('/templates/{template_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
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);
|
|
1548
1794
|
}
|
|
1549
1795
|
|
|
1550
1796
|
/**
|
|
1551
|
-
*
|
|
1552
|
-
*
|
|
1553
|
-
* @param {String}
|
|
1554
|
-
* @param {module:model/
|
|
1555
|
-
* @
|
|
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}
|
|
1556
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
|
+
}
|
|
1557
1810
|
|
|
1558
1811
|
/**
|
|
1559
1812
|
* Publish a template version
|
|
1560
|
-
* Publishes the
|
|
1561
|
-
* @param {String} template_id
|
|
1562
|
-
* @param {module:model/
|
|
1563
|
-
* @
|
|
1564
|
-
* data is of type: {@link module:model/TemplatePublishVersionResponse}
|
|
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
|
|
1565
1817
|
*/
|
|
1566
1818
|
}, {
|
|
1567
|
-
key: "
|
|
1568
|
-
value: function
|
|
1569
|
-
var postBody =
|
|
1819
|
+
key: "publishTemplateVersionWithHttpInfo",
|
|
1820
|
+
value: function publishTemplateVersionWithHttpInfo(template_id, body) {
|
|
1821
|
+
var postBody = body;
|
|
1570
1822
|
// verify the required parameter 'template_id' is set
|
|
1571
1823
|
if (template_id === undefined || template_id === null) {
|
|
1572
1824
|
throw new Error("Missing the required parameter 'template_id' when calling publishTemplateVersion");
|
|
1573
1825
|
}
|
|
1574
|
-
// verify the required parameter '
|
|
1575
|
-
if (
|
|
1576
|
-
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");
|
|
1577
1829
|
}
|
|
1578
1830
|
var pathParams = {
|
|
1579
1831
|
'template_id': template_id
|
|
@@ -1584,37 +1836,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1584
1836
|
var authNames = ['api_token_basic'];
|
|
1585
1837
|
var contentTypes = ['application/json'];
|
|
1586
1838
|
var accepts = ['application/json'];
|
|
1587
|
-
var returnType =
|
|
1588
|
-
return this.apiClient.callApi('/templates/{template_id}/publish_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
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);
|
|
1589
1841
|
}
|
|
1590
1842
|
|
|
1591
1843
|
/**
|
|
1592
|
-
*
|
|
1593
|
-
*
|
|
1594
|
-
* @param {String}
|
|
1595
|
-
* @param {module:model/
|
|
1596
|
-
* @
|
|
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}
|
|
1597
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
|
+
}
|
|
1598
1857
|
|
|
1599
1858
|
/**
|
|
1600
1859
|
* Rename a folder
|
|
1601
|
-
* Renames
|
|
1602
|
-
* @param {String} folder_id
|
|
1603
|
-
* @param {module:model/
|
|
1604
|
-
* @
|
|
1605
|
-
* 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
|
|
1606
1864
|
*/
|
|
1607
1865
|
}, {
|
|
1608
|
-
key: "
|
|
1609
|
-
value: function
|
|
1610
|
-
var postBody =
|
|
1866
|
+
key: "renameFolderWithHttpInfo",
|
|
1867
|
+
value: function renameFolderWithHttpInfo(folder_id, body) {
|
|
1868
|
+
var postBody = body;
|
|
1611
1869
|
// verify the required parameter 'folder_id' is set
|
|
1612
1870
|
if (folder_id === undefined || folder_id === null) {
|
|
1613
1871
|
throw new Error("Missing the required parameter 'folder_id' when calling renameFolder");
|
|
1614
1872
|
}
|
|
1615
|
-
// verify the required parameter '
|
|
1616
|
-
if (
|
|
1617
|
-
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");
|
|
1618
1876
|
}
|
|
1619
1877
|
var pathParams = {
|
|
1620
1878
|
'folder_id': folder_id
|
|
@@ -1626,36 +1884,42 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1626
1884
|
var contentTypes = ['application/json'];
|
|
1627
1885
|
var accepts = ['application/json'];
|
|
1628
1886
|
var returnType = _Folder["default"];
|
|
1629
|
-
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);
|
|
1630
1888
|
}
|
|
1631
1889
|
|
|
1632
1890
|
/**
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
* @param {String}
|
|
1636
|
-
* @param {module:model/
|
|
1637
|
-
* @
|
|
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}
|
|
1638
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
|
+
}
|
|
1639
1904
|
|
|
1640
1905
|
/**
|
|
1641
1906
|
* Restore a template version
|
|
1642
|
-
*
|
|
1643
|
-
* @param {String} template_id
|
|
1644
|
-
* @param {module:model/
|
|
1645
|
-
* @
|
|
1646
|
-
* 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
|
|
1647
1911
|
*/
|
|
1648
1912
|
}, {
|
|
1649
|
-
key: "
|
|
1650
|
-
value: function
|
|
1651
|
-
var postBody =
|
|
1913
|
+
key: "restoreTemplateVersionWithHttpInfo",
|
|
1914
|
+
value: function restoreTemplateVersionWithHttpInfo(template_id, body) {
|
|
1915
|
+
var postBody = body;
|
|
1652
1916
|
// verify the required parameter 'template_id' is set
|
|
1653
1917
|
if (template_id === undefined || template_id === null) {
|
|
1654
1918
|
throw new Error("Missing the required parameter 'template_id' when calling restoreTemplateVersion");
|
|
1655
1919
|
}
|
|
1656
|
-
// verify the required parameter '
|
|
1657
|
-
if (
|
|
1658
|
-
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");
|
|
1659
1923
|
}
|
|
1660
1924
|
var pathParams = {
|
|
1661
1925
|
'template_id': template_id
|
|
@@ -1666,27 +1930,33 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1666
1930
|
var authNames = ['api_token_basic'];
|
|
1667
1931
|
var contentTypes = ['application/json'];
|
|
1668
1932
|
var accepts = ['application/json'];
|
|
1669
|
-
var returnType =
|
|
1670
|
-
return this.apiClient.callApi('/templates/{template_id}/restore_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
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);
|
|
1671
1935
|
}
|
|
1672
1936
|
|
|
1673
1937
|
/**
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1676
|
-
* @param {String}
|
|
1677
|
-
* @param {module:model/
|
|
1678
|
-
* @
|
|
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}
|
|
1679
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
|
+
}
|
|
1680
1951
|
|
|
1681
1952
|
/**
|
|
1682
1953
|
* Test authentication
|
|
1683
|
-
* Checks whether your API token is valid by making an authenticated request.
|
|
1684
|
-
* @
|
|
1685
|
-
* data is of type: {@link module:model/SuccessErrorResponse}
|
|
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
|
|
1686
1956
|
*/
|
|
1687
1957
|
}, {
|
|
1688
|
-
key: "
|
|
1689
|
-
value: function
|
|
1958
|
+
key: "testAuthenticationWithHttpInfo",
|
|
1959
|
+
value: function testAuthenticationWithHttpInfo() {
|
|
1690
1960
|
var postBody = null;
|
|
1691
1961
|
var pathParams = {};
|
|
1692
1962
|
var queryParams = {};
|
|
@@ -1695,40 +1965,44 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1695
1965
|
var authNames = ['api_token_basic'];
|
|
1696
1966
|
var contentTypes = [];
|
|
1697
1967
|
var accepts = ['application/json'];
|
|
1698
|
-
var returnType =
|
|
1699
|
-
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);
|
|
1700
1970
|
}
|
|
1701
1971
|
|
|
1702
1972
|
/**
|
|
1703
|
-
*
|
|
1704
|
-
*
|
|
1705
|
-
* @
|
|
1706
|
-
* @param {module:model/CreateSubmissionDataRequestResponse} data The data returned by the service call.
|
|
1707
|
-
* @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}
|
|
1708
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
|
+
}
|
|
1709
1984
|
|
|
1710
1985
|
/**
|
|
1711
|
-
* Update a
|
|
1712
|
-
*
|
|
1713
|
-
* @param {String}
|
|
1714
|
-
* @param {module:model/
|
|
1715
|
-
* @
|
|
1716
|
-
* 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
|
|
1717
1991
|
*/
|
|
1718
1992
|
}, {
|
|
1719
|
-
key: "
|
|
1720
|
-
value: function
|
|
1721
|
-
var postBody =
|
|
1722
|
-
// verify the required parameter '
|
|
1723
|
-
if (
|
|
1724
|
-
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");
|
|
1725
1999
|
}
|
|
1726
|
-
// verify the required parameter '
|
|
1727
|
-
if (
|
|
1728
|
-
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");
|
|
1729
2003
|
}
|
|
1730
2004
|
var pathParams = {
|
|
1731
|
-
'
|
|
2005
|
+
'signature_request_id': signature_request_id
|
|
1732
2006
|
};
|
|
1733
2007
|
var queryParams = {};
|
|
1734
2008
|
var headerParams = {};
|
|
@@ -1736,37 +2010,43 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1736
2010
|
var authNames = ['api_token_basic'];
|
|
1737
2011
|
var contentTypes = ['application/json'];
|
|
1738
2012
|
var accepts = ['application/json'];
|
|
1739
|
-
var returnType =
|
|
1740
|
-
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);
|
|
1741
2015
|
}
|
|
1742
2016
|
|
|
1743
2017
|
/**
|
|
1744
|
-
*
|
|
1745
|
-
*
|
|
1746
|
-
* @param {String}
|
|
1747
|
-
* @param {module:model/
|
|
1748
|
-
* @
|
|
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}
|
|
1749
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
|
+
}
|
|
1750
2031
|
|
|
1751
2032
|
/**
|
|
1752
|
-
* Update a
|
|
1753
|
-
*
|
|
1754
|
-
* @param {String} template_id
|
|
1755
|
-
* @param {module:model/
|
|
1756
|
-
* @
|
|
1757
|
-
* 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
|
|
1758
2038
|
*/
|
|
1759
2039
|
}, {
|
|
1760
|
-
key: "
|
|
1761
|
-
value: function
|
|
1762
|
-
var postBody =
|
|
2040
|
+
key: "updateTemplateWithHttpInfo",
|
|
2041
|
+
value: function updateTemplateWithHttpInfo(template_id, body) {
|
|
2042
|
+
var postBody = body;
|
|
1763
2043
|
// verify the required parameter 'template_id' is set
|
|
1764
2044
|
if (template_id === undefined || template_id === null) {
|
|
1765
2045
|
throw new Error("Missing the required parameter 'template_id' when calling updateTemplate");
|
|
1766
2046
|
}
|
|
1767
|
-
// verify the required parameter '
|
|
1768
|
-
if (
|
|
1769
|
-
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");
|
|
1770
2050
|
}
|
|
1771
2051
|
var pathParams = {
|
|
1772
2052
|
'template_id': template_id
|
|
@@ -1777,87 +2057,100 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1777
2057
|
var authNames = ['api_token_basic'];
|
|
1778
2058
|
var contentTypes = ['application/json'];
|
|
1779
2059
|
var accepts = ['application/json'];
|
|
1780
|
-
var returnType =
|
|
1781
|
-
return this.apiClient.callApi('/templates/{template_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null
|
|
2060
|
+
var returnType = _Template["default"];
|
|
2061
|
+
return this.apiClient.callApi('/templates/{template_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1782
2062
|
}
|
|
1783
2063
|
|
|
1784
2064
|
/**
|
|
1785
|
-
*
|
|
1786
|
-
*
|
|
1787
|
-
* @param {String}
|
|
1788
|
-
* @param {module:model/
|
|
1789
|
-
* @
|
|
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}
|
|
1790
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
|
+
}
|
|
1791
2078
|
|
|
1792
2079
|
/**
|
|
1793
|
-
*
|
|
1794
|
-
*
|
|
1795
|
-
* @param {String} template_id
|
|
1796
|
-
* @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.
|
|
1797
2084
|
* @param {Object} opts Optional parameters
|
|
1798
|
-
* @param {
|
|
1799
|
-
* @
|
|
1800
|
-
* 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
|
|
1801
2087
|
*/
|
|
1802
2088
|
}, {
|
|
1803
|
-
key: "
|
|
1804
|
-
value: function
|
|
2089
|
+
key: "updateTemplateDocumentWithHttpInfo",
|
|
2090
|
+
value: function updateTemplateDocumentWithHttpInfo(template_id, body, opts) {
|
|
1805
2091
|
opts = opts || {};
|
|
1806
|
-
var postBody =
|
|
2092
|
+
var postBody = body;
|
|
1807
2093
|
// verify the required parameter 'template_id' is set
|
|
1808
2094
|
if (template_id === undefined || template_id === null) {
|
|
1809
2095
|
throw new Error("Missing the required parameter 'template_id' when calling updateTemplateDocument");
|
|
1810
2096
|
}
|
|
1811
|
-
// verify the required parameter '
|
|
1812
|
-
if (
|
|
1813
|
-
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");
|
|
1814
2100
|
}
|
|
1815
2101
|
var pathParams = {
|
|
1816
2102
|
'template_id': template_id
|
|
1817
2103
|
};
|
|
1818
|
-
var queryParams = {
|
|
1819
|
-
|
|
1820
|
-
var formParams = {
|
|
1821
|
-
'template[document]': template_document,
|
|
1822
|
-
'template[name]': opts['template_name']
|
|
2104
|
+
var queryParams = {
|
|
2105
|
+
'wait': opts['wait']
|
|
1823
2106
|
};
|
|
2107
|
+
var headerParams = {};
|
|
2108
|
+
var formParams = {};
|
|
1824
2109
|
var authNames = ['api_token_basic'];
|
|
1825
|
-
var contentTypes = ['
|
|
2110
|
+
var contentTypes = ['application/json'];
|
|
1826
2111
|
var accepts = ['application/json'];
|
|
1827
|
-
var returnType =
|
|
1828
|
-
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);
|
|
1829
2114
|
}
|
|
1830
2115
|
|
|
1831
2116
|
/**
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1834
|
-
* @param {String}
|
|
1835
|
-
* @param {module:model/
|
|
1836
|
-
* @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}
|
|
1837
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
|
+
}
|
|
1838
2132
|
|
|
1839
2133
|
/**
|
|
1840
|
-
* Update a
|
|
1841
|
-
* Updates a
|
|
1842
|
-
* @param {String}
|
|
1843
|
-
* @param {module:model/
|
|
1844
|
-
* @
|
|
1845
|
-
* 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
|
|
1846
2139
|
*/
|
|
1847
2140
|
}, {
|
|
1848
|
-
key: "
|
|
1849
|
-
value: function
|
|
1850
|
-
var postBody =
|
|
1851
|
-
// verify the required parameter '
|
|
1852
|
-
if (
|
|
1853
|
-
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");
|
|
1854
2147
|
}
|
|
1855
|
-
// verify the required parameter '
|
|
1856
|
-
if (
|
|
1857
|
-
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");
|
|
1858
2151
|
}
|
|
1859
2152
|
var pathParams = {
|
|
1860
|
-
'
|
|
2153
|
+
'webhook_id': webhook_id
|
|
1861
2154
|
};
|
|
1862
2155
|
var queryParams = {};
|
|
1863
2156
|
var headerParams = {};
|
|
@@ -1865,49 +2158,154 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1865
2158
|
var authNames = ['api_token_basic'];
|
|
1866
2159
|
var contentTypes = ['application/json'];
|
|
1867
2160
|
var accepts = ['application/json'];
|
|
1868
|
-
var returnType =
|
|
1869
|
-
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);
|
|
1870
2163
|
}
|
|
1871
2164
|
|
|
1872
2165
|
/**
|
|
1873
|
-
*
|
|
1874
|
-
*
|
|
1875
|
-
* @param {String}
|
|
1876
|
-
* @param {module:model/
|
|
1877
|
-
* @
|
|
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}
|
|
1878
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
|
+
}
|
|
1879
2179
|
|
|
1880
2180
|
/**
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1883
|
-
* @param {
|
|
1884
|
-
* @param {
|
|
1885
|
-
* @param {
|
|
1886
|
-
*
|
|
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
|
|
1887
2195
|
*/
|
|
1888
2196
|
}, {
|
|
1889
|
-
key: "
|
|
1890
|
-
value: function
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
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");
|
|
1895
2204
|
}
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
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");
|
|
1899
2274
|
}
|
|
1900
2275
|
var pathParams = {
|
|
1901
|
-
'
|
|
2276
|
+
'template_id': template_id
|
|
2277
|
+
};
|
|
2278
|
+
var queryParams = {
|
|
2279
|
+
'wait': opts['wait']
|
|
1902
2280
|
};
|
|
1903
|
-
var queryParams = {};
|
|
1904
2281
|
var headerParams = {};
|
|
1905
|
-
var formParams = {
|
|
2282
|
+
var formParams = {
|
|
2283
|
+
'document': document,
|
|
2284
|
+
'reimport_fields': opts['reimport_fields']
|
|
2285
|
+
};
|
|
1906
2286
|
var authNames = ['api_token_basic'];
|
|
1907
|
-
var contentTypes = ['
|
|
2287
|
+
var contentTypes = ['multipart/form-data'];
|
|
1908
2288
|
var accepts = ['application/json'];
|
|
1909
|
-
var returnType =
|
|
1910
|
-
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
|
+
});
|
|
1911
2309
|
}
|
|
1912
2310
|
}]);
|
|
1913
2311
|
}();
|