docspring 4.3.0 → 4.4.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/README.md +20 -1
- package/dist/ApiClient.js +2 -2
- package/dist/RequestSchemas.js +1118 -93
- package/dist/RequestValidator.js +4 -0
- package/dist/api/Client.js +1360 -206
- package/dist/index.js +196 -0
- package/dist/model/AddTemplateFieldsRequest.js +3 -3
- package/dist/model/AuthenticationCheck.js +1 -1
- package/dist/model/CombinedPdf.js +1 -1
- package/dist/model/CombinedPdfFiles.js +1 -1
- package/dist/model/CombinedPdfList.js +1 -1
- package/dist/model/CombinedPdfSource.js +2 -2
- package/dist/model/CombinedPdfSourceInput.js +2 -2
- package/dist/model/CombinedPdfSourcePdf.js +1 -1
- package/dist/model/CopyTemplateRequest.js +1 -1
- package/dist/model/CreateAccountEmailActionRequest.js +306 -0
- package/dist/model/CreateCombinedPdfRequest.js +1 -1
- package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
- package/dist/model/CreateEmailActionRequest.js +280 -0
- package/dist/model/CreateEmailDomainRequest.js +114 -0
- package/dist/model/CreateFolderRequest.js +1 -1
- package/dist/model/CreateSignatureRequestEventRequest.js +1 -1
- package/dist/model/CreateSignatureRequestTokenRequest.js +1 -1
- package/dist/model/CreateSubmissionBatchRequest.js +4 -4
- package/dist/model/CreateSubmissionRequest.js +112 -4
- package/dist/model/CreateTemplatePreviewRequest.js +1 -1
- package/dist/model/CreateTemplateRequest.js +103 -8
- package/dist/model/CreateWebhookRequest.js +1 -1
- package/dist/model/CustomFile.js +1 -1
- package/dist/model/CustomFileList.js +1 -1
- package/dist/model/CustomFileSourcePdf.js +1 -1
- package/dist/model/DnsRecordType.js +64 -0
- package/dist/model/EmailAction.js +510 -0
- package/dist/model/EmailActionConditions.js +142 -0
- package/dist/model/EmailActionConditionsInput.js +142 -0
- package/dist/model/EmailActionCustomization.js +222 -0
- package/dist/model/EmailActionDelivery.js +59 -0
- package/dist/model/EmailActionFileFormats.js +69 -0
- package/dist/model/EmailActionList.js +132 -0
- package/dist/model/EmailActionSetting.js +119 -0
- package/dist/model/EmailActionSubmissionType.js +64 -0
- package/dist/model/EmailActionTestEmail.js +116 -0
- package/dist/model/EmailDomain.js +245 -0
- package/dist/model/EmailDomainDnsRecord.js +155 -0
- package/dist/model/EmailDomainDnsRecordPurpose.js +64 -0
- package/dist/model/EmailDomainList.js +132 -0
- package/dist/model/EmailDomainRecordState.js +64 -0
- package/dist/model/EmailDomainState.js +64 -0
- package/dist/model/ErrorCode.js +10 -0
- package/dist/model/ErrorDetail.js +1 -1
- package/dist/model/ErrorInfo.js +46 -7
- package/dist/model/ErrorResponse.js +1 -1
- package/dist/model/Field.js +3 -3
- package/dist/model/FieldComparisonCondition.js +1 -1
- package/dist/model/FieldDependency.js +1 -1
- package/dist/model/FieldDependencyInput.js +1 -1
- package/dist/model/FieldEqualsCondition.js +1 -1
- package/dist/model/FieldGroup.js +1 -1
- package/dist/model/FieldGroupInput.js +1 -1
- package/dist/model/FieldInCondition.js +1 -1
- package/dist/model/FieldInput.js +2 -2
- package/dist/model/FieldOverride.js +1 -1
- package/dist/model/FieldPresenceCondition.js +1 -1
- package/dist/model/FieldRangeCondition.js +1 -1
- package/dist/model/Folder.js +1 -1
- package/dist/model/FolderList.js +1 -1
- package/dist/model/GenerateSubmissionFilesRequest.js +1 -1
- package/dist/model/GeneratedFile.js +1 -1
- package/dist/model/HtmlEngineOptions.js +3 -3
- package/dist/model/HtmlEngineOptionsInput.js +2 -2
- package/dist/model/MoveFolderRequest.js +1 -1
- package/dist/model/MoveTemplateRequest.js +1 -1
- package/dist/model/PageImage.js +1 -1
- package/dist/model/PageImages.js +1 -1
- package/dist/model/PredefinedField.js +1 -1
- package/dist/model/PredefinedFieldInput.js +1 -1
- package/dist/model/PublishTemplateVersionRequest.js +1 -1
- package/dist/model/RemoveTemplateFieldsRequest.js +1 -1
- package/dist/model/RenameFolderRequest.js +1 -1
- package/dist/model/ReorderTemplateFieldsRequest.js +1 -1
- package/dist/model/RestoreTemplateVersionRequest.js +1 -1
- package/dist/model/SendAccountEmailActionTestEmailRequest.js +91 -0
- package/dist/model/SignatureRequest.js +52 -7
- package/dist/model/SignatureRequestEmailAttachments.js +59 -0
- package/dist/model/SignatureRequestEmailStatus.js +89 -0
- package/dist/model/SignatureRequestEvent.js +1 -1
- package/dist/model/SignatureRequestEventType.js +11 -1
- package/dist/model/SignatureRequestInput.js +24 -8
- package/dist/model/SignatureRequestReminders.js +121 -0
- package/dist/model/SignatureRequestToken.js +1 -1
- package/dist/model/SigningOrder.js +59 -0
- package/dist/model/StringConditionType.js +36 -1
- package/dist/model/Submission.js +21 -9
- package/dist/model/SubmissionAction.js +27 -12
- package/dist/model/SubmissionBatch.js +1 -1
- package/dist/model/SubmissionFiles.js +1 -1
- package/dist/model/SubmissionInput.js +4 -4
- package/dist/model/SubmissionList.js +1 -1
- package/dist/model/SubmissionSourcePdf.js +1 -1
- package/dist/model/SubmissionSummary.js +3 -3
- package/dist/model/SubmissionValidation.js +1 -1
- package/dist/model/Template.js +130 -19
- package/dist/model/TemplateActor.js +1 -1
- package/dist/model/TemplateDefaults.js +1 -1
- package/dist/model/TemplateDefaultsInput.js +1 -1
- package/dist/model/TemplateDiff.js +1 -1
- package/dist/model/TemplateDiffSummary.js +1 -1
- package/dist/model/TemplateDocument.js +1 -1
- package/dist/model/TemplateDocumentSummary.js +1 -1
- package/dist/model/TemplateFieldChange.js +1 -1
- package/dist/model/TemplateFieldChanges.js +1 -1
- package/dist/model/TemplateFieldDependency.js +1 -1
- package/dist/model/TemplateFieldDependencyCondition.js +1 -1
- package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
- package/dist/model/TemplateFieldDependencyInput.js +1 -1
- package/dist/model/TemplateFieldMove.js +1 -1
- package/dist/model/TemplateFields.js +1 -1
- package/dist/model/TemplateModelCode.js +1 -1
- package/dist/model/TemplatePageImages.js +1 -1
- package/dist/model/TemplatePageProcessingStatus.js +1 -1
- package/dist/model/TemplatePreview.js +1 -1
- package/dist/model/TemplateSourcePdf.js +2 -2
- package/dist/model/TemplateSummary.js +9 -9
- package/dist/model/TemplateSummaryList.js +1 -1
- package/dist/model/TemplateType.js +6 -1
- package/dist/model/TemplateVersion.js +1 -1
- package/dist/model/UpdateAccountEmailActionRequest.js +306 -0
- package/dist/model/UpdateEmailActionCustomizationRequest.js +258 -0
- package/dist/model/UpdateEmailActionRequest.js +280 -0
- package/dist/model/UpdateSignatureRequestRequest.js +1 -1
- package/dist/model/UpdateTemplateDocumentRequest.js +2 -2
- package/dist/model/UpdateTemplateFieldsRequest.js +1 -1
- package/dist/model/UpdateTemplateRequest.js +100 -5
- package/dist/model/UpdateWebhookRequest.js +1 -1
- package/dist/model/UploadPresign.js +1 -1
- package/dist/model/UrlSourcePdf.js +1 -1
- package/dist/model/ValidateSubmissionRequest.js +112 -4
- package/dist/model/Webhook.js +1 -1
- package/dist/model/WebhookEventType.js +10 -0
- package/dist/model/WebhookList.js +1 -1
- package/package.json +1 -1
package/dist/api/Client.js
CHANGED
|
@@ -11,8 +11,11 @@ var _AuthenticationCheck = _interopRequireDefault(require("../model/Authenticati
|
|
|
11
11
|
var _CombinedPdf = _interopRequireDefault(require("../model/CombinedPdf"));
|
|
12
12
|
var _CombinedPdfList = _interopRequireDefault(require("../model/CombinedPdfList"));
|
|
13
13
|
var _CopyTemplateRequest = _interopRequireDefault(require("../model/CopyTemplateRequest"));
|
|
14
|
+
var _CreateAccountEmailActionRequest = _interopRequireDefault(require("../model/CreateAccountEmailActionRequest"));
|
|
14
15
|
var _CreateCombinedPdfRequest = _interopRequireDefault(require("../model/CreateCombinedPdfRequest"));
|
|
15
16
|
var _CreateCustomFileFromUploadRequest = _interopRequireDefault(require("../model/CreateCustomFileFromUploadRequest"));
|
|
17
|
+
var _CreateEmailActionRequest = _interopRequireDefault(require("../model/CreateEmailActionRequest"));
|
|
18
|
+
var _CreateEmailDomainRequest = _interopRequireDefault(require("../model/CreateEmailDomainRequest"));
|
|
16
19
|
var _CreateFolderRequest = _interopRequireDefault(require("../model/CreateFolderRequest"));
|
|
17
20
|
var _CreateSignatureRequestEventRequest = _interopRequireDefault(require("../model/CreateSignatureRequestEventRequest"));
|
|
18
21
|
var _CreateSignatureRequestTokenRequest = _interopRequireDefault(require("../model/CreateSignatureRequestTokenRequest"));
|
|
@@ -23,6 +26,11 @@ var _CreateTemplateRequest = _interopRequireDefault(require("../model/CreateTemp
|
|
|
23
26
|
var _CreateWebhookRequest = _interopRequireDefault(require("../model/CreateWebhookRequest"));
|
|
24
27
|
var _CustomFile = _interopRequireDefault(require("../model/CustomFile"));
|
|
25
28
|
var _CustomFileList = _interopRequireDefault(require("../model/CustomFileList"));
|
|
29
|
+
var _EmailAction = _interopRequireDefault(require("../model/EmailAction"));
|
|
30
|
+
var _EmailActionList = _interopRequireDefault(require("../model/EmailActionList"));
|
|
31
|
+
var _EmailActionTestEmail = _interopRequireDefault(require("../model/EmailActionTestEmail"));
|
|
32
|
+
var _EmailDomain = _interopRequireDefault(require("../model/EmailDomain"));
|
|
33
|
+
var _EmailDomainList = _interopRequireDefault(require("../model/EmailDomainList"));
|
|
26
34
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
27
35
|
var _FieldSetupLogic = _interopRequireDefault(require("../model/FieldSetupLogic"));
|
|
28
36
|
var _FieldSetupNaming = _interopRequireDefault(require("../model/FieldSetupNaming"));
|
|
@@ -39,6 +47,7 @@ var _RemoveTemplateFieldsRequest = _interopRequireDefault(require("../model/Remo
|
|
|
39
47
|
var _RenameFolderRequest = _interopRequireDefault(require("../model/RenameFolderRequest"));
|
|
40
48
|
var _ReorderTemplateFieldsRequest = _interopRequireDefault(require("../model/ReorderTemplateFieldsRequest"));
|
|
41
49
|
var _RestoreTemplateVersionRequest = _interopRequireDefault(require("../model/RestoreTemplateVersionRequest"));
|
|
50
|
+
var _SendAccountEmailActionTestEmailRequest = _interopRequireDefault(require("../model/SendAccountEmailActionTestEmailRequest"));
|
|
42
51
|
var _SignatureRequest = _interopRequireDefault(require("../model/SignatureRequest"));
|
|
43
52
|
var _SignatureRequestEvent = _interopRequireDefault(require("../model/SignatureRequestEvent"));
|
|
44
53
|
var _SignatureRequestToken = _interopRequireDefault(require("../model/SignatureRequestToken"));
|
|
@@ -55,6 +64,9 @@ var _TemplatePageImages = _interopRequireDefault(require("../model/TemplatePageI
|
|
|
55
64
|
var _TemplatePreview = _interopRequireDefault(require("../model/TemplatePreview"));
|
|
56
65
|
var _TemplateSummaryList = _interopRequireDefault(require("../model/TemplateSummaryList"));
|
|
57
66
|
var _TemplateVersion = _interopRequireDefault(require("../model/TemplateVersion"));
|
|
67
|
+
var _UpdateAccountEmailActionRequest = _interopRequireDefault(require("../model/UpdateAccountEmailActionRequest"));
|
|
68
|
+
var _UpdateEmailActionCustomizationRequest = _interopRequireDefault(require("../model/UpdateEmailActionCustomizationRequest"));
|
|
69
|
+
var _UpdateEmailActionRequest = _interopRequireDefault(require("../model/UpdateEmailActionRequest"));
|
|
58
70
|
var _UpdateSignatureRequestRequest = _interopRequireDefault(require("../model/UpdateSignatureRequestRequest"));
|
|
59
71
|
var _UpdateTemplateDocumentRequest = _interopRequireDefault(require("../model/UpdateTemplateDocumentRequest"));
|
|
60
72
|
var _UpdateTemplateFieldsRequest = _interopRequireDefault(require("../model/UpdateTemplateFieldsRequest"));
|
|
@@ -87,7 +99,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
87
99
|
/**
|
|
88
100
|
* Client service.
|
|
89
101
|
* @module api/Client
|
|
90
|
-
* @version 4.
|
|
102
|
+
* @version 4.4.0
|
|
91
103
|
*/
|
|
92
104
|
var Client = exports["default"] = /*#__PURE__*/function () {
|
|
93
105
|
/**
|
|
@@ -145,14 +157,17 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
145
157
|
|
|
146
158
|
/**
|
|
147
159
|
* Add fields to a template
|
|
148
|
-
* Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
160
|
+
* Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them. A field with the name of one of the template's fields shares its settings (`type`, `required`, `default`, ...), so a field that sets one to another value is refused: PUT /templates/{template_id}/fields changes them for every field with the name.
|
|
149
161
|
* @param {String} template_id The template's ID.
|
|
150
162
|
* @param {module:model/AddTemplateFieldsRequest} body The fields to add to the template's draft.
|
|
163
|
+
* @param {Object} opts Optional parameters
|
|
164
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
151
165
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
152
166
|
*/
|
|
153
167
|
return _createClass(Client, [{
|
|
154
168
|
key: "addTemplateFieldsWithHttpInfo",
|
|
155
|
-
value: function addTemplateFieldsWithHttpInfo(template_id, body) {
|
|
169
|
+
value: function addTemplateFieldsWithHttpInfo(template_id, body, opts) {
|
|
170
|
+
opts = opts || {};
|
|
156
171
|
var postBody = body;
|
|
157
172
|
// verify the required parameter 'template_id' is set
|
|
158
173
|
if (template_id === undefined || template_id === null) {
|
|
@@ -166,7 +181,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
166
181
|
'template_id': template_id
|
|
167
182
|
};
|
|
168
183
|
var queryParams = {};
|
|
169
|
-
var headerParams = {
|
|
184
|
+
var headerParams = {
|
|
185
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
186
|
+
};
|
|
170
187
|
var formParams = {};
|
|
171
188
|
var authNames = ['api_token_basic'];
|
|
172
189
|
var contentTypes = ['application/json'];
|
|
@@ -177,15 +194,17 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
177
194
|
|
|
178
195
|
/**
|
|
179
196
|
* Add fields to a template
|
|
180
|
-
* Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
197
|
+
* Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them. A field with the name of one of the template's fields shares its settings (`type`, `required`, `default`, ...), so a field that sets one to another value is refused: PUT /templates/{template_id}/fields changes them for every field with the name.
|
|
181
198
|
* @param {String} template_id The template's ID.
|
|
182
199
|
* @param {module:model/AddTemplateFieldsRequest} body The fields to add to the template's draft.
|
|
200
|
+
* @param {Object} opts Optional parameters
|
|
201
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
183
202
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
184
203
|
*/
|
|
185
204
|
}, {
|
|
186
205
|
key: "addTemplateFields",
|
|
187
|
-
value: function addTemplateFields(template_id, body) {
|
|
188
|
-
return this.addTemplateFieldsWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
206
|
+
value: function addTemplateFields(template_id, body, opts) {
|
|
207
|
+
return this.addTemplateFieldsWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
189
208
|
return response_and_data.data;
|
|
190
209
|
});
|
|
191
210
|
}
|
|
@@ -196,6 +215,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
196
215
|
* @param {String} template_id The template's ID.
|
|
197
216
|
* @param {Object} opts Optional parameters
|
|
198
217
|
* @param {module:model/CopyTemplateRequest} [body] Settings for the copy.
|
|
218
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
199
219
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
200
220
|
*/
|
|
201
221
|
}, {
|
|
@@ -211,7 +231,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
211
231
|
'template_id': template_id
|
|
212
232
|
};
|
|
213
233
|
var queryParams = {};
|
|
214
|
-
var headerParams = {
|
|
234
|
+
var headerParams = {
|
|
235
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
236
|
+
};
|
|
215
237
|
var formParams = {};
|
|
216
238
|
var authNames = ['api_token_basic'];
|
|
217
239
|
var contentTypes = ['application/json'];
|
|
@@ -226,6 +248,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
226
248
|
* @param {String} template_id The template's ID.
|
|
227
249
|
* @param {Object} opts Optional parameters
|
|
228
250
|
* @param {module:model/CopyTemplateRequest} opts.body Settings for the copy.
|
|
251
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
229
252
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
230
253
|
*/
|
|
231
254
|
}, {
|
|
@@ -236,13 +259,59 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
236
259
|
});
|
|
237
260
|
}
|
|
238
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Create an account email action
|
|
264
|
+
* Adds an email action to your account. It sends for every template, or only for the templates in `template_ids` and the templates in the folders in `folder_ids` (and the folders inside them). Each template can turn it off or change its settings for that template only (`PUT /templates/{template_id}/email_actions/{email_action_id}/customization`). Without a paid plan (Starter or higher), email actions only email your team: test submissions' emails go to your account's users, and live submissions' emails aren't sent.
|
|
265
|
+
* @param {module:model/CreateAccountEmailActionRequest} body The account email action to create. Properties left out get their defaults, and it sends for every template unless it lists `template_ids` or `folder_ids`.
|
|
266
|
+
* @param {Object} opts Optional parameters
|
|
267
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
268
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
269
|
+
*/
|
|
270
|
+
}, {
|
|
271
|
+
key: "createAccountEmailActionWithHttpInfo",
|
|
272
|
+
value: function createAccountEmailActionWithHttpInfo(body, opts) {
|
|
273
|
+
opts = opts || {};
|
|
274
|
+
var postBody = body;
|
|
275
|
+
// verify the required parameter 'body' is set
|
|
276
|
+
if (body === undefined || body === null) {
|
|
277
|
+
throw new Error("Missing the required parameter 'body' when calling createAccountEmailAction");
|
|
278
|
+
}
|
|
279
|
+
var pathParams = {};
|
|
280
|
+
var queryParams = {};
|
|
281
|
+
var headerParams = {
|
|
282
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
283
|
+
};
|
|
284
|
+
var formParams = {};
|
|
285
|
+
var authNames = ['api_token_basic'];
|
|
286
|
+
var contentTypes = ['application/json'];
|
|
287
|
+
var accepts = ['application/json'];
|
|
288
|
+
var returnType = _EmailAction["default"];
|
|
289
|
+
return this.apiClient.callApi('/email_actions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Create an account email action
|
|
294
|
+
* Adds an email action to your account. It sends for every template, or only for the templates in `template_ids` and the templates in the folders in `folder_ids` (and the folders inside them). Each template can turn it off or change its settings for that template only (`PUT /templates/{template_id}/email_actions/{email_action_id}/customization`). Without a paid plan (Starter or higher), email actions only email your team: test submissions' emails go to your account's users, and live submissions' emails aren't sent.
|
|
295
|
+
* @param {module:model/CreateAccountEmailActionRequest} body The account email action to create. Properties left out get their defaults, and it sends for every template unless it lists `template_ids` or `folder_ids`.
|
|
296
|
+
* @param {Object} opts Optional parameters
|
|
297
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
298
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
299
|
+
*/
|
|
300
|
+
}, {
|
|
301
|
+
key: "createAccountEmailAction",
|
|
302
|
+
value: function createAccountEmailAction(body, opts) {
|
|
303
|
+
return this.createAccountEmailActionWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
304
|
+
return response_and_data.data;
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
|
|
239
308
|
/**
|
|
240
309
|
* Combine PDFs
|
|
241
310
|
* 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.
|
|
242
311
|
* @param {module:model/CreateCombinedPdfRequest} body The PDFs to merge, and the combined PDF's settings.
|
|
243
312
|
* @param {Object} opts Optional parameters
|
|
244
313
|
* @param {Boolean} [wait] Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
245
|
-
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
314
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
246
315
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
247
316
|
*/
|
|
248
317
|
}, {
|
|
@@ -275,7 +344,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
275
344
|
* @param {module:model/CreateCombinedPdfRequest} body The PDFs to merge, and the combined PDF's settings.
|
|
276
345
|
* @param {Object} opts Optional parameters
|
|
277
346
|
* @param {Boolean} opts.wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
278
|
-
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
347
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
279
348
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
280
349
|
*/
|
|
281
350
|
}, {
|
|
@@ -290,11 +359,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
290
359
|
* Create a custom file from an upload
|
|
291
360
|
* 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`.
|
|
292
361
|
* @param {module:model/CreateCustomFileFromUploadRequest} body The uploaded file to create the custom file from.
|
|
362
|
+
* @param {Object} opts Optional parameters
|
|
363
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
293
364
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
294
365
|
*/
|
|
295
366
|
}, {
|
|
296
367
|
key: "createCustomFileFromUploadWithHttpInfo",
|
|
297
|
-
value: function createCustomFileFromUploadWithHttpInfo(body) {
|
|
368
|
+
value: function createCustomFileFromUploadWithHttpInfo(body, opts) {
|
|
369
|
+
opts = opts || {};
|
|
298
370
|
var postBody = body;
|
|
299
371
|
// verify the required parameter 'body' is set
|
|
300
372
|
if (body === undefined || body === null) {
|
|
@@ -302,7 +374,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
302
374
|
}
|
|
303
375
|
var pathParams = {};
|
|
304
376
|
var queryParams = {};
|
|
305
|
-
var headerParams = {
|
|
377
|
+
var headerParams = {
|
|
378
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
379
|
+
};
|
|
306
380
|
var formParams = {};
|
|
307
381
|
var authNames = ['api_token_basic'];
|
|
308
382
|
var contentTypes = ['application/json'];
|
|
@@ -315,12 +389,114 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
315
389
|
* Create a custom file from an upload
|
|
316
390
|
* 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`.
|
|
317
391
|
* @param {module:model/CreateCustomFileFromUploadRequest} body The uploaded file to create the custom file from.
|
|
392
|
+
* @param {Object} opts Optional parameters
|
|
393
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
318
394
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
319
395
|
*/
|
|
320
396
|
}, {
|
|
321
397
|
key: "createCustomFileFromUpload",
|
|
322
|
-
value: function createCustomFileFromUpload(body) {
|
|
323
|
-
return this.createCustomFileFromUploadWithHttpInfo(body).then(function (response_and_data) {
|
|
398
|
+
value: function createCustomFileFromUpload(body, opts) {
|
|
399
|
+
return this.createCustomFileFromUploadWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
400
|
+
return response_and_data.data;
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Create an email action
|
|
406
|
+
* Adds an email action to a template's draft. From then on, each processed submission emails its PDF to the recipients in `to`, `cc` and `bcc`: addresses, and tags for the address in one of the submission's fields (`{{ data.tenant_email }}`) or in its metadata (`{{ metadata.agent_email }}`). With `send_when`, only the submissions whose values meet its conditions send one. Without a paid plan (Starter or higher), email actions only email your team: test submissions' emails go to your account's users, and live submissions' emails aren't sent.
|
|
407
|
+
* @param {String} template_id The template's ID.
|
|
408
|
+
* @param {module:model/CreateEmailActionRequest} body The email action to create. Properties left out get their defaults.
|
|
409
|
+
* @param {Object} opts Optional parameters
|
|
410
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
411
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
412
|
+
*/
|
|
413
|
+
}, {
|
|
414
|
+
key: "createEmailActionWithHttpInfo",
|
|
415
|
+
value: function createEmailActionWithHttpInfo(template_id, body, opts) {
|
|
416
|
+
opts = opts || {};
|
|
417
|
+
var postBody = body;
|
|
418
|
+
// verify the required parameter 'template_id' is set
|
|
419
|
+
if (template_id === undefined || template_id === null) {
|
|
420
|
+
throw new Error("Missing the required parameter 'template_id' when calling createEmailAction");
|
|
421
|
+
}
|
|
422
|
+
// verify the required parameter 'body' is set
|
|
423
|
+
if (body === undefined || body === null) {
|
|
424
|
+
throw new Error("Missing the required parameter 'body' when calling createEmailAction");
|
|
425
|
+
}
|
|
426
|
+
var pathParams = {
|
|
427
|
+
'template_id': template_id
|
|
428
|
+
};
|
|
429
|
+
var queryParams = {};
|
|
430
|
+
var headerParams = {
|
|
431
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
432
|
+
};
|
|
433
|
+
var formParams = {};
|
|
434
|
+
var authNames = ['api_token_basic'];
|
|
435
|
+
var contentTypes = ['application/json'];
|
|
436
|
+
var accepts = ['application/json'];
|
|
437
|
+
var returnType = _EmailAction["default"];
|
|
438
|
+
return this.apiClient.callApi('/templates/{template_id}/email_actions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Create an email action
|
|
443
|
+
* Adds an email action to a template's draft. From then on, each processed submission emails its PDF to the recipients in `to`, `cc` and `bcc`: addresses, and tags for the address in one of the submission's fields (`{{ data.tenant_email }}`) or in its metadata (`{{ metadata.agent_email }}`). With `send_when`, only the submissions whose values meet its conditions send one. Without a paid plan (Starter or higher), email actions only email your team: test submissions' emails go to your account's users, and live submissions' emails aren't sent.
|
|
444
|
+
* @param {String} template_id The template's ID.
|
|
445
|
+
* @param {module:model/CreateEmailActionRequest} body The email action to create. Properties left out get their defaults.
|
|
446
|
+
* @param {Object} opts Optional parameters
|
|
447
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
448
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
449
|
+
*/
|
|
450
|
+
}, {
|
|
451
|
+
key: "createEmailAction",
|
|
452
|
+
value: function createEmailAction(template_id, body, opts) {
|
|
453
|
+
return this.createEmailActionWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
454
|
+
return response_and_data.data;
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Add an email domain
|
|
460
|
+
* Adds a domain for email actions to send from, and returns the DNS records to add to it. DocSpring checks for them every few minutes, and the domain is verified once its DKIM and DMARC records are found. Needs a paid monthly plan.
|
|
461
|
+
* @param {module:model/CreateEmailDomainRequest} body The domain to add.
|
|
462
|
+
* @param {Object} opts Optional parameters
|
|
463
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
464
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailDomain} and HTTP response
|
|
465
|
+
*/
|
|
466
|
+
}, {
|
|
467
|
+
key: "createEmailDomainWithHttpInfo",
|
|
468
|
+
value: function createEmailDomainWithHttpInfo(body, opts) {
|
|
469
|
+
opts = opts || {};
|
|
470
|
+
var postBody = body;
|
|
471
|
+
// verify the required parameter 'body' is set
|
|
472
|
+
if (body === undefined || body === null) {
|
|
473
|
+
throw new Error("Missing the required parameter 'body' when calling createEmailDomain");
|
|
474
|
+
}
|
|
475
|
+
var pathParams = {};
|
|
476
|
+
var queryParams = {};
|
|
477
|
+
var headerParams = {
|
|
478
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
479
|
+
};
|
|
480
|
+
var formParams = {};
|
|
481
|
+
var authNames = ['api_token_basic'];
|
|
482
|
+
var contentTypes = ['application/json'];
|
|
483
|
+
var accepts = ['application/json'];
|
|
484
|
+
var returnType = _EmailDomain["default"];
|
|
485
|
+
return this.apiClient.callApi('/email_domains', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Add an email domain
|
|
490
|
+
* Adds a domain for email actions to send from, and returns the DNS records to add to it. DocSpring checks for them every few minutes, and the domain is verified once its DKIM and DMARC records are found. Needs a paid monthly plan.
|
|
491
|
+
* @param {module:model/CreateEmailDomainRequest} body The domain to add.
|
|
492
|
+
* @param {Object} opts Optional parameters
|
|
493
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
494
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailDomain}
|
|
495
|
+
*/
|
|
496
|
+
}, {
|
|
497
|
+
key: "createEmailDomain",
|
|
498
|
+
value: function createEmailDomain(body, opts) {
|
|
499
|
+
return this.createEmailDomainWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
324
500
|
return response_and_data.data;
|
|
325
501
|
});
|
|
326
502
|
}
|
|
@@ -329,11 +505,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
329
505
|
* Create a folder
|
|
330
506
|
* Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
331
507
|
* @param {module:model/CreateFolderRequest} body The folder to create.
|
|
508
|
+
* @param {Object} opts Optional parameters
|
|
509
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
332
510
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
333
511
|
*/
|
|
334
512
|
}, {
|
|
335
513
|
key: "createFolderWithHttpInfo",
|
|
336
|
-
value: function createFolderWithHttpInfo(body) {
|
|
514
|
+
value: function createFolderWithHttpInfo(body, opts) {
|
|
515
|
+
opts = opts || {};
|
|
337
516
|
var postBody = body;
|
|
338
517
|
// verify the required parameter 'body' is set
|
|
339
518
|
if (body === undefined || body === null) {
|
|
@@ -341,7 +520,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
341
520
|
}
|
|
342
521
|
var pathParams = {};
|
|
343
522
|
var queryParams = {};
|
|
344
|
-
var headerParams = {
|
|
523
|
+
var headerParams = {
|
|
524
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
525
|
+
};
|
|
345
526
|
var formParams = {};
|
|
346
527
|
var authNames = ['api_token_basic'];
|
|
347
528
|
var contentTypes = ['application/json'];
|
|
@@ -354,12 +535,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
354
535
|
* Create a folder
|
|
355
536
|
* Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
356
537
|
* @param {module:model/CreateFolderRequest} body The folder to create.
|
|
538
|
+
* @param {Object} opts Optional parameters
|
|
539
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
357
540
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
358
541
|
*/
|
|
359
542
|
}, {
|
|
360
543
|
key: "createFolder",
|
|
361
|
-
value: function createFolder(body) {
|
|
362
|
-
return this.createFolderWithHttpInfo(body).then(function (response_and_data) {
|
|
544
|
+
value: function createFolder(body, opts) {
|
|
545
|
+
return this.createFolderWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
363
546
|
return response_and_data.data;
|
|
364
547
|
});
|
|
365
548
|
}
|
|
@@ -369,11 +552,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
369
552
|
* 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. A finished (completed, declined or expired) signature request's audit trail takes no more events, and a test API token can't record one for a live signature request.
|
|
370
553
|
* @param {String} signature_request_id The signature request's ID.
|
|
371
554
|
* @param {module:model/CreateSignatureRequestEventRequest} body The event to record.
|
|
555
|
+
* @param {Object} opts Optional parameters
|
|
556
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
372
557
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequestEvent} and HTTP response
|
|
373
558
|
*/
|
|
374
559
|
}, {
|
|
375
560
|
key: "createSignatureRequestEventWithHttpInfo",
|
|
376
|
-
value: function createSignatureRequestEventWithHttpInfo(signature_request_id, body) {
|
|
561
|
+
value: function createSignatureRequestEventWithHttpInfo(signature_request_id, body, opts) {
|
|
562
|
+
opts = opts || {};
|
|
377
563
|
var postBody = body;
|
|
378
564
|
// verify the required parameter 'signature_request_id' is set
|
|
379
565
|
if (signature_request_id === undefined || signature_request_id === null) {
|
|
@@ -387,7 +573,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
387
573
|
'signature_request_id': signature_request_id
|
|
388
574
|
};
|
|
389
575
|
var queryParams = {};
|
|
390
|
-
var headerParams = {
|
|
576
|
+
var headerParams = {
|
|
577
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
578
|
+
};
|
|
391
579
|
var formParams = {};
|
|
392
580
|
var authNames = ['api_token_basic'];
|
|
393
581
|
var contentTypes = ['application/json'];
|
|
@@ -401,12 +589,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
401
589
|
* 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. A finished (completed, declined or expired) signature request's audit trail takes no more events, and a test API token can't record one for a live signature request.
|
|
402
590
|
* @param {String} signature_request_id The signature request's ID.
|
|
403
591
|
* @param {module:model/CreateSignatureRequestEventRequest} body The event to record.
|
|
592
|
+
* @param {Object} opts Optional parameters
|
|
593
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
404
594
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequestEvent}
|
|
405
595
|
*/
|
|
406
596
|
}, {
|
|
407
597
|
key: "createSignatureRequestEvent",
|
|
408
|
-
value: function createSignatureRequestEvent(signature_request_id, body) {
|
|
409
|
-
return this.createSignatureRequestEventWithHttpInfo(signature_request_id, body).then(function (response_and_data) {
|
|
598
|
+
value: function createSignatureRequestEvent(signature_request_id, body, opts) {
|
|
599
|
+
return this.createSignatureRequestEventWithHttpInfo(signature_request_id, body, opts).then(function (response_and_data) {
|
|
410
600
|
return response_and_data.data;
|
|
411
601
|
});
|
|
412
602
|
}
|
|
@@ -417,6 +607,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
417
607
|
* @param {String} signature_request_id The signature request's ID.
|
|
418
608
|
* @param {Object} opts Optional parameters
|
|
419
609
|
* @param {module:model/CreateSignatureRequestTokenRequest} [body] The kind of link to make. Send no body for an `api` token.
|
|
610
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
420
611
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequestToken} and HTTP response
|
|
421
612
|
*/
|
|
422
613
|
}, {
|
|
@@ -432,7 +623,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
432
623
|
'signature_request_id': signature_request_id
|
|
433
624
|
};
|
|
434
625
|
var queryParams = {};
|
|
435
|
-
var headerParams = {
|
|
626
|
+
var headerParams = {
|
|
627
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
628
|
+
};
|
|
436
629
|
var formParams = {};
|
|
437
630
|
var authNames = ['api_token_basic'];
|
|
438
631
|
var contentTypes = ['application/json'];
|
|
@@ -447,6 +640,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
447
640
|
* @param {String} signature_request_id The signature request's ID.
|
|
448
641
|
* @param {Object} opts Optional parameters
|
|
449
642
|
* @param {module:model/CreateSignatureRequestTokenRequest} opts.body The kind of link to make. Send no body for an `api` token.
|
|
643
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
450
644
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequestToken}
|
|
451
645
|
*/
|
|
452
646
|
}, {
|
|
@@ -459,13 +653,13 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
459
653
|
|
|
460
654
|
/**
|
|
461
655
|
* Generate a PDF
|
|
462
|
-
* 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.
|
|
656
|
+
* 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. With `signature_requests`, the PDF is generated once everyone has signed. DocSpring emails each signer a link to sign, unless `send_email` is false, and can send reminders and the completed document.
|
|
463
657
|
* @param {String} template_id The template's ID.
|
|
464
658
|
* @param {module:model/CreateSubmissionRequest} body The submission's data and settings.
|
|
465
659
|
* @param {Object} opts Optional parameters
|
|
466
|
-
* @param {String} [version] The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
660
|
+
* @param {String} [version] The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
|
|
467
661
|
* @param {Boolean} [wait] Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
468
|
-
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
662
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
469
663
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
470
664
|
*/
|
|
471
665
|
}, {
|
|
@@ -501,13 +695,13 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
501
695
|
|
|
502
696
|
/**
|
|
503
697
|
* Generate a PDF
|
|
504
|
-
* 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.
|
|
698
|
+
* 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. With `signature_requests`, the PDF is generated once everyone has signed. DocSpring emails each signer a link to sign, unless `send_email` is false, and can send reminders and the completed document.
|
|
505
699
|
* @param {String} template_id The template's ID.
|
|
506
700
|
* @param {module:model/CreateSubmissionRequest} body The submission's data and settings.
|
|
507
701
|
* @param {Object} opts Optional parameters
|
|
508
|
-
* @param {String} opts.version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
702
|
+
* @param {String} opts.version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
|
|
509
703
|
* @param {Boolean} opts.wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
510
|
-
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
704
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
511
705
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
512
706
|
*/
|
|
513
707
|
}, {
|
|
@@ -524,7 +718,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
524
718
|
* @param {module:model/CreateSubmissionBatchRequest} body The submissions to create, and the settings they share.
|
|
525
719
|
* @param {Object} opts Optional parameters
|
|
526
720
|
* @param {Boolean} [wait] Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
527
|
-
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
721
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
528
722
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionBatch} and HTTP response
|
|
529
723
|
*/
|
|
530
724
|
}, {
|
|
@@ -557,7 +751,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
557
751
|
* @param {module:model/CreateSubmissionBatchRequest} body The submissions to create, and the settings they share.
|
|
558
752
|
* @param {Object} opts Optional parameters
|
|
559
753
|
* @param {Boolean} opts.wait Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
560
|
-
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
754
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
561
755
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionBatch}
|
|
562
756
|
*/
|
|
563
757
|
}, {
|
|
@@ -570,10 +764,11 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
570
764
|
|
|
571
765
|
/**
|
|
572
766
|
* Create a template
|
|
573
|
-
* Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
767
|
+
* Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A page design (`page_designer`) takes its `layout` in the Page Designer layout format, or starts with an empty page without one. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
574
768
|
* @param {module:model/CreateTemplateRequest} body The template to create.
|
|
575
769
|
* @param {Object} opts Optional parameters
|
|
576
770
|
* @param {Boolean} [wait] Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
771
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
577
772
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
578
773
|
*/
|
|
579
774
|
}, {
|
|
@@ -589,7 +784,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
589
784
|
var queryParams = {
|
|
590
785
|
'wait': opts['wait']
|
|
591
786
|
};
|
|
592
|
-
var headerParams = {
|
|
787
|
+
var headerParams = {
|
|
788
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
789
|
+
};
|
|
593
790
|
var formParams = {};
|
|
594
791
|
var authNames = ['api_token_basic'];
|
|
595
792
|
var contentTypes = ['application/json'];
|
|
@@ -600,10 +797,11 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
600
797
|
|
|
601
798
|
/**
|
|
602
799
|
* Create a template
|
|
603
|
-
* Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
800
|
+
* Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A page design (`page_designer`) takes its `layout` in the Page Designer layout format, or starts with an empty page without one. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
604
801
|
* @param {module:model/CreateTemplateRequest} body The template to create.
|
|
605
802
|
* @param {Object} opts Optional parameters
|
|
606
803
|
* @param {Boolean} opts.wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
804
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
607
805
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
608
806
|
*/
|
|
609
807
|
}, {
|
|
@@ -616,11 +814,12 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
616
814
|
|
|
617
815
|
/**
|
|
618
816
|
* Preview a template with data
|
|
619
|
-
* Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
|
|
817
|
+
* Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template or a page design prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
|
|
620
818
|
* @param {String} template_id The template's ID.
|
|
621
819
|
* @param {module:model/CreateTemplatePreviewRequest} body The data to render the template with.
|
|
622
820
|
* @param {Object} opts Optional parameters
|
|
623
|
-
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
821
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
822
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
624
823
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplatePreview} and HTTP response
|
|
625
824
|
*/
|
|
626
825
|
}, {
|
|
@@ -642,7 +841,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
642
841
|
var queryParams = {
|
|
643
842
|
'version': opts['version']
|
|
644
843
|
};
|
|
645
|
-
var headerParams = {
|
|
844
|
+
var headerParams = {
|
|
845
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
846
|
+
};
|
|
646
847
|
var formParams = {};
|
|
647
848
|
var authNames = ['api_token_basic'];
|
|
648
849
|
var contentTypes = ['application/json'];
|
|
@@ -653,11 +854,12 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
653
854
|
|
|
654
855
|
/**
|
|
655
856
|
* Preview a template with data
|
|
656
|
-
* Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
|
|
857
|
+
* Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template or a page design prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
|
|
657
858
|
* @param {String} template_id The template's ID.
|
|
658
859
|
* @param {module:model/CreateTemplatePreviewRequest} body The data to render the template with.
|
|
659
860
|
* @param {Object} opts Optional parameters
|
|
660
|
-
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
861
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
862
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
661
863
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplatePreview}
|
|
662
864
|
*/
|
|
663
865
|
}, {
|
|
@@ -672,11 +874,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
672
874
|
* Create a webhook
|
|
673
875
|
* 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.
|
|
674
876
|
* @param {module:model/CreateWebhookRequest} body The webhook to create.
|
|
877
|
+
* @param {Object} opts Optional parameters
|
|
878
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
675
879
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
676
880
|
*/
|
|
677
881
|
}, {
|
|
678
882
|
key: "createWebhookWithHttpInfo",
|
|
679
|
-
value: function createWebhookWithHttpInfo(body) {
|
|
883
|
+
value: function createWebhookWithHttpInfo(body, opts) {
|
|
884
|
+
opts = opts || {};
|
|
680
885
|
var postBody = body;
|
|
681
886
|
// verify the required parameter 'body' is set
|
|
682
887
|
if (body === undefined || body === null) {
|
|
@@ -684,7 +889,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
684
889
|
}
|
|
685
890
|
var pathParams = {};
|
|
686
891
|
var queryParams = {};
|
|
687
|
-
var headerParams = {
|
|
892
|
+
var headerParams = {
|
|
893
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
894
|
+
};
|
|
688
895
|
var formParams = {};
|
|
689
896
|
var authNames = ['api_token_basic'];
|
|
690
897
|
var contentTypes = ['application/json'];
|
|
@@ -697,12 +904,62 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
697
904
|
* Create a webhook
|
|
698
905
|
* 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.
|
|
699
906
|
* @param {module:model/CreateWebhookRequest} body The webhook to create.
|
|
907
|
+
* @param {Object} opts Optional parameters
|
|
908
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
700
909
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
701
910
|
*/
|
|
702
911
|
}, {
|
|
703
912
|
key: "createWebhook",
|
|
704
|
-
value: function createWebhook(body) {
|
|
705
|
-
return this.createWebhookWithHttpInfo(body).then(function (response_and_data) {
|
|
913
|
+
value: function createWebhook(body, opts) {
|
|
914
|
+
return this.createWebhookWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
915
|
+
return response_and_data.data;
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Delete an account email action
|
|
921
|
+
* Deletes one of your account's email actions, with every template's customization of it. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
|
|
922
|
+
* @param {String} email_action_id The account email action's ID.
|
|
923
|
+
* @param {Object} opts Optional parameters
|
|
924
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
925
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
926
|
+
*/
|
|
927
|
+
}, {
|
|
928
|
+
key: "deleteAccountEmailActionWithHttpInfo",
|
|
929
|
+
value: function deleteAccountEmailActionWithHttpInfo(email_action_id, opts) {
|
|
930
|
+
opts = opts || {};
|
|
931
|
+
var postBody = null;
|
|
932
|
+
// verify the required parameter 'email_action_id' is set
|
|
933
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
934
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling deleteAccountEmailAction");
|
|
935
|
+
}
|
|
936
|
+
var pathParams = {
|
|
937
|
+
'email_action_id': email_action_id
|
|
938
|
+
};
|
|
939
|
+
var queryParams = {};
|
|
940
|
+
var headerParams = {
|
|
941
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
942
|
+
};
|
|
943
|
+
var formParams = {};
|
|
944
|
+
var authNames = ['api_token_basic'];
|
|
945
|
+
var contentTypes = [];
|
|
946
|
+
var accepts = ['application/json'];
|
|
947
|
+
var returnType = _EmailAction["default"];
|
|
948
|
+
return this.apiClient.callApi('/email_actions/{email_action_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Delete an account email action
|
|
953
|
+
* Deletes one of your account's email actions, with every template's customization of it. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
|
|
954
|
+
* @param {String} email_action_id The account email action's ID.
|
|
955
|
+
* @param {Object} opts Optional parameters
|
|
956
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
957
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
958
|
+
*/
|
|
959
|
+
}, {
|
|
960
|
+
key: "deleteAccountEmailAction",
|
|
961
|
+
value: function deleteAccountEmailAction(email_action_id, opts) {
|
|
962
|
+
return this.deleteAccountEmailActionWithHttpInfo(email_action_id, opts).then(function (response_and_data) {
|
|
706
963
|
return response_and_data.data;
|
|
707
964
|
});
|
|
708
965
|
}
|
|
@@ -711,11 +968,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
711
968
|
* Delete a custom file
|
|
712
969
|
* Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
713
970
|
* @param {String} custom_file_id The custom file's ID.
|
|
971
|
+
* @param {Object} opts Optional parameters
|
|
972
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
714
973
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
715
974
|
*/
|
|
716
975
|
}, {
|
|
717
976
|
key: "deleteCustomFileWithHttpInfo",
|
|
718
|
-
value: function deleteCustomFileWithHttpInfo(custom_file_id) {
|
|
977
|
+
value: function deleteCustomFileWithHttpInfo(custom_file_id, opts) {
|
|
978
|
+
opts = opts || {};
|
|
719
979
|
var postBody = null;
|
|
720
980
|
// verify the required parameter 'custom_file_id' is set
|
|
721
981
|
if (custom_file_id === undefined || custom_file_id === null) {
|
|
@@ -725,7 +985,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
725
985
|
'custom_file_id': custom_file_id
|
|
726
986
|
};
|
|
727
987
|
var queryParams = {};
|
|
728
|
-
var headerParams = {
|
|
988
|
+
var headerParams = {
|
|
989
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
990
|
+
};
|
|
729
991
|
var formParams = {};
|
|
730
992
|
var authNames = ['api_token_basic'];
|
|
731
993
|
var contentTypes = [];
|
|
@@ -738,155 +1000,336 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
738
1000
|
* Delete a custom file
|
|
739
1001
|
* Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
740
1002
|
* @param {String} custom_file_id The custom file's ID.
|
|
1003
|
+
* @param {Object} opts Optional parameters
|
|
1004
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
741
1005
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
742
1006
|
*/
|
|
743
1007
|
}, {
|
|
744
1008
|
key: "deleteCustomFile",
|
|
745
|
-
value: function deleteCustomFile(custom_file_id) {
|
|
746
|
-
return this.deleteCustomFileWithHttpInfo(custom_file_id).then(function (response_and_data) {
|
|
1009
|
+
value: function deleteCustomFile(custom_file_id, opts) {
|
|
1010
|
+
return this.deleteCustomFileWithHttpInfo(custom_file_id, opts).then(function (response_and_data) {
|
|
747
1011
|
return response_and_data.data;
|
|
748
1012
|
});
|
|
749
1013
|
}
|
|
750
1014
|
|
|
751
1015
|
/**
|
|
752
|
-
* Delete
|
|
753
|
-
* Deletes an
|
|
754
|
-
* @param {String}
|
|
755
|
-
* @
|
|
1016
|
+
* Delete an email action
|
|
1017
|
+
* Deletes an email action. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
|
|
1018
|
+
* @param {String} template_id The template's ID.
|
|
1019
|
+
* @param {String} email_action_id The email action's ID.
|
|
1020
|
+
* @param {Object} opts Optional parameters
|
|
1021
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1022
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
756
1023
|
*/
|
|
757
1024
|
}, {
|
|
758
|
-
key: "
|
|
759
|
-
value: function
|
|
1025
|
+
key: "deleteEmailActionWithHttpInfo",
|
|
1026
|
+
value: function deleteEmailActionWithHttpInfo(template_id, email_action_id, opts) {
|
|
1027
|
+
opts = opts || {};
|
|
760
1028
|
var postBody = null;
|
|
761
|
-
// verify the required parameter '
|
|
762
|
-
if (
|
|
763
|
-
throw new Error("Missing the required parameter '
|
|
1029
|
+
// verify the required parameter 'template_id' is set
|
|
1030
|
+
if (template_id === undefined || template_id === null) {
|
|
1031
|
+
throw new Error("Missing the required parameter 'template_id' when calling deleteEmailAction");
|
|
1032
|
+
}
|
|
1033
|
+
// verify the required parameter 'email_action_id' is set
|
|
1034
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
1035
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling deleteEmailAction");
|
|
764
1036
|
}
|
|
765
1037
|
var pathParams = {
|
|
766
|
-
'
|
|
1038
|
+
'template_id': template_id,
|
|
1039
|
+
'email_action_id': email_action_id
|
|
767
1040
|
};
|
|
768
1041
|
var queryParams = {};
|
|
769
|
-
var headerParams = {
|
|
1042
|
+
var headerParams = {
|
|
1043
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1044
|
+
};
|
|
770
1045
|
var formParams = {};
|
|
771
1046
|
var authNames = ['api_token_basic'];
|
|
772
1047
|
var contentTypes = [];
|
|
773
1048
|
var accepts = ['application/json'];
|
|
774
|
-
var returnType =
|
|
775
|
-
return this.apiClient.callApi('/
|
|
1049
|
+
var returnType = _EmailAction["default"];
|
|
1050
|
+
return this.apiClient.callApi('/templates/{template_id}/email_actions/{email_action_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
776
1051
|
}
|
|
777
1052
|
|
|
778
1053
|
/**
|
|
779
|
-
* Delete
|
|
780
|
-
* Deletes an
|
|
781
|
-
* @param {String}
|
|
782
|
-
* @
|
|
1054
|
+
* Delete an email action
|
|
1055
|
+
* Deletes an email action. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
|
|
1056
|
+
* @param {String} template_id The template's ID.
|
|
1057
|
+
* @param {String} email_action_id The email action's ID.
|
|
1058
|
+
* @param {Object} opts Optional parameters
|
|
1059
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1060
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
783
1061
|
*/
|
|
784
1062
|
}, {
|
|
785
|
-
key: "
|
|
786
|
-
value: function
|
|
787
|
-
return this.
|
|
1063
|
+
key: "deleteEmailAction",
|
|
1064
|
+
value: function deleteEmailAction(template_id, email_action_id, opts) {
|
|
1065
|
+
return this.deleteEmailActionWithHttpInfo(template_id, email_action_id, opts).then(function (response_and_data) {
|
|
788
1066
|
return response_and_data.data;
|
|
789
1067
|
});
|
|
790
1068
|
}
|
|
791
1069
|
|
|
792
1070
|
/**
|
|
793
|
-
*
|
|
794
|
-
*
|
|
1071
|
+
* Reset an account email action's customization
|
|
1072
|
+
* Removes the template's changes to one of your account's email actions: it sends for this template as it is, and again if the template had turned it off.
|
|
795
1073
|
* @param {String} template_id The template's ID.
|
|
1074
|
+
* @param {String} email_action_id The ID of one of your account's email actions that sends for the template.
|
|
796
1075
|
* @param {Object} opts Optional parameters
|
|
797
|
-
* @param {String} [
|
|
798
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
1076
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1077
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
799
1078
|
*/
|
|
800
1079
|
}, {
|
|
801
|
-
key: "
|
|
802
|
-
value: function
|
|
1080
|
+
key: "deleteEmailActionCustomizationWithHttpInfo",
|
|
1081
|
+
value: function deleteEmailActionCustomizationWithHttpInfo(template_id, email_action_id, opts) {
|
|
803
1082
|
opts = opts || {};
|
|
804
1083
|
var postBody = null;
|
|
805
1084
|
// verify the required parameter 'template_id' is set
|
|
806
1085
|
if (template_id === undefined || template_id === null) {
|
|
807
|
-
throw new Error("Missing the required parameter 'template_id' when calling
|
|
1086
|
+
throw new Error("Missing the required parameter 'template_id' when calling deleteEmailActionCustomization");
|
|
1087
|
+
}
|
|
1088
|
+
// verify the required parameter 'email_action_id' is set
|
|
1089
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
1090
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling deleteEmailActionCustomization");
|
|
808
1091
|
}
|
|
809
1092
|
var pathParams = {
|
|
810
|
-
'template_id': template_id
|
|
1093
|
+
'template_id': template_id,
|
|
1094
|
+
'email_action_id': email_action_id
|
|
811
1095
|
};
|
|
812
|
-
var queryParams = {
|
|
813
|
-
|
|
1096
|
+
var queryParams = {};
|
|
1097
|
+
var headerParams = {
|
|
1098
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
814
1099
|
};
|
|
815
|
-
var headerParams = {};
|
|
816
1100
|
var formParams = {};
|
|
817
1101
|
var authNames = ['api_token_basic'];
|
|
818
1102
|
var contentTypes = [];
|
|
819
1103
|
var accepts = ['application/json'];
|
|
820
|
-
var returnType =
|
|
821
|
-
return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1104
|
+
var returnType = _EmailAction["default"];
|
|
1105
|
+
return this.apiClient.callApi('/templates/{template_id}/email_actions/{email_action_id}/customization', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
822
1106
|
}
|
|
823
1107
|
|
|
824
1108
|
/**
|
|
825
|
-
*
|
|
826
|
-
*
|
|
1109
|
+
* Reset an account email action's customization
|
|
1110
|
+
* Removes the template's changes to one of your account's email actions: it sends for this template as it is, and again if the template had turned it off.
|
|
827
1111
|
* @param {String} template_id The template's ID.
|
|
1112
|
+
* @param {String} email_action_id The ID of one of your account's email actions that sends for the template.
|
|
828
1113
|
* @param {Object} opts Optional parameters
|
|
829
|
-
* @param {String} opts.
|
|
830
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
1114
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1115
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
831
1116
|
*/
|
|
832
1117
|
}, {
|
|
833
|
-
key: "
|
|
834
|
-
value: function
|
|
835
|
-
return this.
|
|
1118
|
+
key: "deleteEmailActionCustomization",
|
|
1119
|
+
value: function deleteEmailActionCustomization(template_id, email_action_id, opts) {
|
|
1120
|
+
return this.deleteEmailActionCustomizationWithHttpInfo(template_id, email_action_id, opts).then(function (response_and_data) {
|
|
836
1121
|
return response_and_data.data;
|
|
837
1122
|
});
|
|
838
1123
|
}
|
|
839
1124
|
|
|
840
1125
|
/**
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
* @param {String}
|
|
844
|
-
* @
|
|
1126
|
+
* Remove an email domain
|
|
1127
|
+
* Removes an email domain. Email actions that send from an address at it fail until you add and verify it again, or change their `from_address`. You can then remove its DNS records.
|
|
1128
|
+
* @param {String} email_domain_id The email domain's ID.
|
|
1129
|
+
* @param {Object} opts Optional parameters
|
|
1130
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1131
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailDomain} and HTTP response
|
|
845
1132
|
*/
|
|
846
1133
|
}, {
|
|
847
|
-
key: "
|
|
848
|
-
value: function
|
|
1134
|
+
key: "deleteEmailDomainWithHttpInfo",
|
|
1135
|
+
value: function deleteEmailDomainWithHttpInfo(email_domain_id, opts) {
|
|
1136
|
+
opts = opts || {};
|
|
849
1137
|
var postBody = null;
|
|
850
|
-
// verify the required parameter '
|
|
851
|
-
if (
|
|
852
|
-
throw new Error("Missing the required parameter '
|
|
1138
|
+
// verify the required parameter 'email_domain_id' is set
|
|
1139
|
+
if (email_domain_id === undefined || email_domain_id === null) {
|
|
1140
|
+
throw new Error("Missing the required parameter 'email_domain_id' when calling deleteEmailDomain");
|
|
853
1141
|
}
|
|
854
1142
|
var pathParams = {
|
|
855
|
-
'
|
|
1143
|
+
'email_domain_id': email_domain_id
|
|
856
1144
|
};
|
|
857
1145
|
var queryParams = {};
|
|
858
|
-
var headerParams = {
|
|
1146
|
+
var headerParams = {
|
|
1147
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1148
|
+
};
|
|
859
1149
|
var formParams = {};
|
|
860
1150
|
var authNames = ['api_token_basic'];
|
|
861
1151
|
var contentTypes = [];
|
|
862
1152
|
var accepts = ['application/json'];
|
|
863
|
-
var returnType =
|
|
864
|
-
return this.apiClient.callApi('/
|
|
1153
|
+
var returnType = _EmailDomain["default"];
|
|
1154
|
+
return this.apiClient.callApi('/email_domains/{email_domain_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
865
1155
|
}
|
|
866
1156
|
|
|
867
1157
|
/**
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
* @param {String}
|
|
871
|
-
* @
|
|
1158
|
+
* Remove an email domain
|
|
1159
|
+
* Removes an email domain. Email actions that send from an address at it fail until you add and verify it again, or change their `from_address`. You can then remove its DNS records.
|
|
1160
|
+
* @param {String} email_domain_id The email domain's ID.
|
|
1161
|
+
* @param {Object} opts Optional parameters
|
|
1162
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1163
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailDomain}
|
|
872
1164
|
*/
|
|
873
1165
|
}, {
|
|
874
|
-
key: "
|
|
875
|
-
value: function
|
|
876
|
-
return this.
|
|
1166
|
+
key: "deleteEmailDomain",
|
|
1167
|
+
value: function deleteEmailDomain(email_domain_id, opts) {
|
|
1168
|
+
return this.deleteEmailDomainWithHttpInfo(email_domain_id, opts).then(function (response_and_data) {
|
|
877
1169
|
return response_and_data.data;
|
|
878
1170
|
});
|
|
879
1171
|
}
|
|
880
1172
|
|
|
881
1173
|
/**
|
|
882
|
-
*
|
|
883
|
-
* Deletes
|
|
884
|
-
* @param {String}
|
|
885
|
-
* @
|
|
1174
|
+
* Delete a folder
|
|
1175
|
+
* Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
1176
|
+
* @param {String} folder_id The folder's ID.
|
|
1177
|
+
* @param {Object} opts Optional parameters
|
|
1178
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1179
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
1180
|
+
*/
|
|
1181
|
+
}, {
|
|
1182
|
+
key: "deleteFolderWithHttpInfo",
|
|
1183
|
+
value: function deleteFolderWithHttpInfo(folder_id, opts) {
|
|
1184
|
+
opts = opts || {};
|
|
1185
|
+
var postBody = null;
|
|
1186
|
+
// verify the required parameter 'folder_id' is set
|
|
1187
|
+
if (folder_id === undefined || folder_id === null) {
|
|
1188
|
+
throw new Error("Missing the required parameter 'folder_id' when calling deleteFolder");
|
|
1189
|
+
}
|
|
1190
|
+
var pathParams = {
|
|
1191
|
+
'folder_id': folder_id
|
|
1192
|
+
};
|
|
1193
|
+
var queryParams = {};
|
|
1194
|
+
var headerParams = {
|
|
1195
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1196
|
+
};
|
|
1197
|
+
var formParams = {};
|
|
1198
|
+
var authNames = ['api_token_basic'];
|
|
1199
|
+
var contentTypes = [];
|
|
1200
|
+
var accepts = ['application/json'];
|
|
1201
|
+
var returnType = _Folder["default"];
|
|
1202
|
+
return this.apiClient.callApi('/folders/{folder_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* Delete a folder
|
|
1207
|
+
* Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
1208
|
+
* @param {String} folder_id The folder's ID.
|
|
1209
|
+
* @param {Object} opts Optional parameters
|
|
1210
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1211
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
1212
|
+
*/
|
|
1213
|
+
}, {
|
|
1214
|
+
key: "deleteFolder",
|
|
1215
|
+
value: function deleteFolder(folder_id, opts) {
|
|
1216
|
+
return this.deleteFolderWithHttpInfo(folder_id, opts).then(function (response_and_data) {
|
|
1217
|
+
return response_and_data.data;
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* Delete a template
|
|
1223
|
+
* 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.
|
|
1224
|
+
* @param {String} template_id The template's ID.
|
|
1225
|
+
* @param {Object} opts Optional parameters
|
|
1226
|
+
* @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.
|
|
1227
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1228
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1229
|
+
*/
|
|
1230
|
+
}, {
|
|
1231
|
+
key: "deleteTemplateWithHttpInfo",
|
|
1232
|
+
value: function deleteTemplateWithHttpInfo(template_id, opts) {
|
|
1233
|
+
opts = opts || {};
|
|
1234
|
+
var postBody = null;
|
|
1235
|
+
// verify the required parameter 'template_id' is set
|
|
1236
|
+
if (template_id === undefined || template_id === null) {
|
|
1237
|
+
throw new Error("Missing the required parameter 'template_id' when calling deleteTemplate");
|
|
1238
|
+
}
|
|
1239
|
+
var pathParams = {
|
|
1240
|
+
'template_id': template_id
|
|
1241
|
+
};
|
|
1242
|
+
var queryParams = {
|
|
1243
|
+
'version': opts['version']
|
|
1244
|
+
};
|
|
1245
|
+
var headerParams = {
|
|
1246
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1247
|
+
};
|
|
1248
|
+
var formParams = {};
|
|
1249
|
+
var authNames = ['api_token_basic'];
|
|
1250
|
+
var contentTypes = [];
|
|
1251
|
+
var accepts = ['application/json'];
|
|
1252
|
+
var returnType = _Template["default"];
|
|
1253
|
+
return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Delete a template
|
|
1258
|
+
* 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.
|
|
1259
|
+
* @param {String} template_id The template's ID.
|
|
1260
|
+
* @param {Object} opts Optional parameters
|
|
1261
|
+
* @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.
|
|
1262
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1263
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1264
|
+
*/
|
|
1265
|
+
}, {
|
|
1266
|
+
key: "deleteTemplate",
|
|
1267
|
+
value: function deleteTemplate(template_id, opts) {
|
|
1268
|
+
return this.deleteTemplateWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
1269
|
+
return response_and_data.data;
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* Delete a webhook
|
|
1275
|
+
* Deletes a webhook so it stops receiving events, and returns it.
|
|
1276
|
+
* @param {String} webhook_id The webhook's ID.
|
|
1277
|
+
* @param {Object} opts Optional parameters
|
|
1278
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1279
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
1280
|
+
*/
|
|
1281
|
+
}, {
|
|
1282
|
+
key: "deleteWebhookWithHttpInfo",
|
|
1283
|
+
value: function deleteWebhookWithHttpInfo(webhook_id, opts) {
|
|
1284
|
+
opts = opts || {};
|
|
1285
|
+
var postBody = null;
|
|
1286
|
+
// verify the required parameter 'webhook_id' is set
|
|
1287
|
+
if (webhook_id === undefined || webhook_id === null) {
|
|
1288
|
+
throw new Error("Missing the required parameter 'webhook_id' when calling deleteWebhook");
|
|
1289
|
+
}
|
|
1290
|
+
var pathParams = {
|
|
1291
|
+
'webhook_id': webhook_id
|
|
1292
|
+
};
|
|
1293
|
+
var queryParams = {};
|
|
1294
|
+
var headerParams = {
|
|
1295
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1296
|
+
};
|
|
1297
|
+
var formParams = {};
|
|
1298
|
+
var authNames = ['api_token_basic'];
|
|
1299
|
+
var contentTypes = [];
|
|
1300
|
+
var accepts = ['application/json'];
|
|
1301
|
+
var returnType = _Webhook["default"];
|
|
1302
|
+
return this.apiClient.callApi('/webhooks/{webhook_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Delete a webhook
|
|
1307
|
+
* Deletes a webhook so it stops receiving events, and returns it.
|
|
1308
|
+
* @param {String} webhook_id The webhook's ID.
|
|
1309
|
+
* @param {Object} opts Optional parameters
|
|
1310
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1311
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
1312
|
+
*/
|
|
1313
|
+
}, {
|
|
1314
|
+
key: "deleteWebhook",
|
|
1315
|
+
value: function deleteWebhook(webhook_id, opts) {
|
|
1316
|
+
return this.deleteWebhookWithHttpInfo(webhook_id, opts).then(function (response_and_data) {
|
|
1317
|
+
return response_and_data.data;
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* Expire a combined PDF
|
|
1323
|
+
* Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
1324
|
+
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
1325
|
+
* @param {Object} opts Optional parameters
|
|
1326
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1327
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
886
1328
|
*/
|
|
887
1329
|
}, {
|
|
888
1330
|
key: "expireCombinedPdfWithHttpInfo",
|
|
889
|
-
value: function expireCombinedPdfWithHttpInfo(combined_pdf_id) {
|
|
1331
|
+
value: function expireCombinedPdfWithHttpInfo(combined_pdf_id, opts) {
|
|
1332
|
+
opts = opts || {};
|
|
890
1333
|
var postBody = null;
|
|
891
1334
|
// verify the required parameter 'combined_pdf_id' is set
|
|
892
1335
|
if (combined_pdf_id === undefined || combined_pdf_id === null) {
|
|
@@ -896,7 +1339,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
896
1339
|
'combined_pdf_id': combined_pdf_id
|
|
897
1340
|
};
|
|
898
1341
|
var queryParams = {};
|
|
899
|
-
var headerParams = {
|
|
1342
|
+
var headerParams = {
|
|
1343
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1344
|
+
};
|
|
900
1345
|
var formParams = {};
|
|
901
1346
|
var authNames = ['api_token_basic'];
|
|
902
1347
|
var contentTypes = [];
|
|
@@ -909,12 +1354,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
909
1354
|
* Expire a combined PDF
|
|
910
1355
|
* Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
911
1356
|
* @param {String} combined_pdf_id The combined PDF's ID.
|
|
1357
|
+
* @param {Object} opts Optional parameters
|
|
1358
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
912
1359
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
913
1360
|
*/
|
|
914
1361
|
}, {
|
|
915
1362
|
key: "expireCombinedPdf",
|
|
916
|
-
value: function expireCombinedPdf(combined_pdf_id) {
|
|
917
|
-
return this.expireCombinedPdfWithHttpInfo(combined_pdf_id).then(function (response_and_data) {
|
|
1363
|
+
value: function expireCombinedPdf(combined_pdf_id, opts) {
|
|
1364
|
+
return this.expireCombinedPdfWithHttpInfo(combined_pdf_id, opts).then(function (response_and_data) {
|
|
918
1365
|
return response_and_data.data;
|
|
919
1366
|
});
|
|
920
1367
|
}
|
|
@@ -923,11 +1370,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
923
1370
|
* Expire a submission
|
|
924
1371
|
* Deletes a submission's data and PDF now, and returns the expired submission.
|
|
925
1372
|
* @param {String} submission_id The submission's ID.
|
|
1373
|
+
* @param {Object} opts Optional parameters
|
|
1374
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
926
1375
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
927
1376
|
*/
|
|
928
1377
|
}, {
|
|
929
1378
|
key: "expireSubmissionWithHttpInfo",
|
|
930
|
-
value: function expireSubmissionWithHttpInfo(submission_id) {
|
|
1379
|
+
value: function expireSubmissionWithHttpInfo(submission_id, opts) {
|
|
1380
|
+
opts = opts || {};
|
|
931
1381
|
var postBody = null;
|
|
932
1382
|
// verify the required parameter 'submission_id' is set
|
|
933
1383
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -937,7 +1387,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
937
1387
|
'submission_id': submission_id
|
|
938
1388
|
};
|
|
939
1389
|
var queryParams = {};
|
|
940
|
-
var headerParams = {
|
|
1390
|
+
var headerParams = {
|
|
1391
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1392
|
+
};
|
|
941
1393
|
var formParams = {};
|
|
942
1394
|
var authNames = ['api_token_basic'];
|
|
943
1395
|
var contentTypes = [];
|
|
@@ -950,12 +1402,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
950
1402
|
* Expire a submission
|
|
951
1403
|
* Deletes a submission's data and PDF now, and returns the expired submission.
|
|
952
1404
|
* @param {String} submission_id The submission's ID.
|
|
1405
|
+
* @param {Object} opts Optional parameters
|
|
1406
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
953
1407
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
954
1408
|
*/
|
|
955
1409
|
}, {
|
|
956
1410
|
key: "expireSubmission",
|
|
957
|
-
value: function expireSubmission(submission_id) {
|
|
958
|
-
return this.expireSubmissionWithHttpInfo(submission_id).then(function (response_and_data) {
|
|
1411
|
+
value: function expireSubmission(submission_id, opts) {
|
|
1412
|
+
return this.expireSubmissionWithHttpInfo(submission_id, opts).then(function (response_and_data) {
|
|
959
1413
|
return response_and_data.data;
|
|
960
1414
|
});
|
|
961
1415
|
}
|
|
@@ -967,6 +1421,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
967
1421
|
* @param {module:model/GenerateSubmissionFilesRequest} body The formats to make.
|
|
968
1422
|
* @param {Object} opts Optional parameters
|
|
969
1423
|
* @param {Boolean} [wait] Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
1424
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
970
1425
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
971
1426
|
*/
|
|
972
1427
|
}, {
|
|
@@ -988,7 +1443,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
988
1443
|
var queryParams = {
|
|
989
1444
|
'wait': opts['wait']
|
|
990
1445
|
};
|
|
991
|
-
var headerParams = {
|
|
1446
|
+
var headerParams = {
|
|
1447
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1448
|
+
};
|
|
992
1449
|
var formParams = {};
|
|
993
1450
|
var authNames = ['api_token_basic'];
|
|
994
1451
|
var contentTypes = ['application/json'];
|
|
@@ -1004,6 +1461,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1004
1461
|
* @param {module:model/GenerateSubmissionFilesRequest} body The formats to make.
|
|
1005
1462
|
* @param {Object} opts Optional parameters
|
|
1006
1463
|
* @param {Boolean} opts.wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
1464
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1007
1465
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
1008
1466
|
*/
|
|
1009
1467
|
}, {
|
|
@@ -1018,11 +1476,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1018
1476
|
* Generate a preview PDF
|
|
1019
1477
|
* 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.
|
|
1020
1478
|
* @param {String} submission_id The submission's ID.
|
|
1479
|
+
* @param {Object} opts Optional parameters
|
|
1480
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1021
1481
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
1022
1482
|
*/
|
|
1023
1483
|
}, {
|
|
1024
1484
|
key: "generateSubmissionPreviewWithHttpInfo",
|
|
1025
|
-
value: function generateSubmissionPreviewWithHttpInfo(submission_id) {
|
|
1485
|
+
value: function generateSubmissionPreviewWithHttpInfo(submission_id, opts) {
|
|
1486
|
+
opts = opts || {};
|
|
1026
1487
|
var postBody = null;
|
|
1027
1488
|
// verify the required parameter 'submission_id' is set
|
|
1028
1489
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -1032,7 +1493,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1032
1493
|
'submission_id': submission_id
|
|
1033
1494
|
};
|
|
1034
1495
|
var queryParams = {};
|
|
1035
|
-
var headerParams = {
|
|
1496
|
+
var headerParams = {
|
|
1497
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1498
|
+
};
|
|
1036
1499
|
var formParams = {};
|
|
1037
1500
|
var authNames = ['api_token_basic'];
|
|
1038
1501
|
var contentTypes = [];
|
|
@@ -1045,12 +1508,55 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1045
1508
|
* Generate a preview PDF
|
|
1046
1509
|
* 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.
|
|
1047
1510
|
* @param {String} submission_id The submission's ID.
|
|
1511
|
+
* @param {Object} opts Optional parameters
|
|
1512
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1048
1513
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
1049
1514
|
*/
|
|
1050
1515
|
}, {
|
|
1051
1516
|
key: "generateSubmissionPreview",
|
|
1052
|
-
value: function generateSubmissionPreview(submission_id) {
|
|
1053
|
-
return this.generateSubmissionPreviewWithHttpInfo(submission_id).then(function (response_and_data) {
|
|
1517
|
+
value: function generateSubmissionPreview(submission_id, opts) {
|
|
1518
|
+
return this.generateSubmissionPreviewWithHttpInfo(submission_id, opts).then(function (response_and_data) {
|
|
1519
|
+
return response_and_data.data;
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* Get an account email action
|
|
1525
|
+
* Returns one of your account's email actions, with its settings and whether its emails are failing.
|
|
1526
|
+
* @param {String} email_action_id The account email action's ID.
|
|
1527
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
1528
|
+
*/
|
|
1529
|
+
}, {
|
|
1530
|
+
key: "getAccountEmailActionWithHttpInfo",
|
|
1531
|
+
value: function getAccountEmailActionWithHttpInfo(email_action_id) {
|
|
1532
|
+
var postBody = null;
|
|
1533
|
+
// verify the required parameter 'email_action_id' is set
|
|
1534
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
1535
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling getAccountEmailAction");
|
|
1536
|
+
}
|
|
1537
|
+
var pathParams = {
|
|
1538
|
+
'email_action_id': email_action_id
|
|
1539
|
+
};
|
|
1540
|
+
var queryParams = {};
|
|
1541
|
+
var headerParams = {};
|
|
1542
|
+
var formParams = {};
|
|
1543
|
+
var authNames = ['api_token_basic'];
|
|
1544
|
+
var contentTypes = [];
|
|
1545
|
+
var accepts = ['application/json'];
|
|
1546
|
+
var returnType = _EmailAction["default"];
|
|
1547
|
+
return this.apiClient.callApi('/email_actions/{email_action_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* Get an account email action
|
|
1552
|
+
* Returns one of your account's email actions, with its settings and whether its emails are failing.
|
|
1553
|
+
* @param {String} email_action_id The account email action's ID.
|
|
1554
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
1555
|
+
*/
|
|
1556
|
+
}, {
|
|
1557
|
+
key: "getAccountEmailAction",
|
|
1558
|
+
value: function getAccountEmailAction(email_action_id) {
|
|
1559
|
+
return this.getAccountEmailActionWithHttpInfo(email_action_id).then(function (response_and_data) {
|
|
1054
1560
|
return response_and_data.data;
|
|
1055
1561
|
});
|
|
1056
1562
|
}
|
|
@@ -1137,6 +1643,95 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1137
1643
|
});
|
|
1138
1644
|
}
|
|
1139
1645
|
|
|
1646
|
+
/**
|
|
1647
|
+
* Get an email action
|
|
1648
|
+
* Returns one of a template's email actions, with its settings and whether its emails are failing.
|
|
1649
|
+
* @param {String} template_id The template's ID.
|
|
1650
|
+
* @param {String} email_action_id The email action's ID.
|
|
1651
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
1652
|
+
*/
|
|
1653
|
+
}, {
|
|
1654
|
+
key: "getEmailActionWithHttpInfo",
|
|
1655
|
+
value: function getEmailActionWithHttpInfo(template_id, email_action_id) {
|
|
1656
|
+
var postBody = null;
|
|
1657
|
+
// verify the required parameter 'template_id' is set
|
|
1658
|
+
if (template_id === undefined || template_id === null) {
|
|
1659
|
+
throw new Error("Missing the required parameter 'template_id' when calling getEmailAction");
|
|
1660
|
+
}
|
|
1661
|
+
// verify the required parameter 'email_action_id' is set
|
|
1662
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
1663
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling getEmailAction");
|
|
1664
|
+
}
|
|
1665
|
+
var pathParams = {
|
|
1666
|
+
'template_id': template_id,
|
|
1667
|
+
'email_action_id': email_action_id
|
|
1668
|
+
};
|
|
1669
|
+
var queryParams = {};
|
|
1670
|
+
var headerParams = {};
|
|
1671
|
+
var formParams = {};
|
|
1672
|
+
var authNames = ['api_token_basic'];
|
|
1673
|
+
var contentTypes = [];
|
|
1674
|
+
var accepts = ['application/json'];
|
|
1675
|
+
var returnType = _EmailAction["default"];
|
|
1676
|
+
return this.apiClient.callApi('/templates/{template_id}/email_actions/{email_action_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* Get an email action
|
|
1681
|
+
* Returns one of a template's email actions, with its settings and whether its emails are failing.
|
|
1682
|
+
* @param {String} template_id The template's ID.
|
|
1683
|
+
* @param {String} email_action_id The email action's ID.
|
|
1684
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
1685
|
+
*/
|
|
1686
|
+
}, {
|
|
1687
|
+
key: "getEmailAction",
|
|
1688
|
+
value: function getEmailAction(template_id, email_action_id) {
|
|
1689
|
+
return this.getEmailActionWithHttpInfo(template_id, email_action_id).then(function (response_and_data) {
|
|
1690
|
+
return response_and_data.data;
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
/**
|
|
1695
|
+
* Get an email domain
|
|
1696
|
+
* Returns an email domain, whether it's verified, and the DNS records to add to it.
|
|
1697
|
+
* @param {String} email_domain_id The email domain's ID.
|
|
1698
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailDomain} and HTTP response
|
|
1699
|
+
*/
|
|
1700
|
+
}, {
|
|
1701
|
+
key: "getEmailDomainWithHttpInfo",
|
|
1702
|
+
value: function getEmailDomainWithHttpInfo(email_domain_id) {
|
|
1703
|
+
var postBody = null;
|
|
1704
|
+
// verify the required parameter 'email_domain_id' is set
|
|
1705
|
+
if (email_domain_id === undefined || email_domain_id === null) {
|
|
1706
|
+
throw new Error("Missing the required parameter 'email_domain_id' when calling getEmailDomain");
|
|
1707
|
+
}
|
|
1708
|
+
var pathParams = {
|
|
1709
|
+
'email_domain_id': email_domain_id
|
|
1710
|
+
};
|
|
1711
|
+
var queryParams = {};
|
|
1712
|
+
var headerParams = {};
|
|
1713
|
+
var formParams = {};
|
|
1714
|
+
var authNames = ['api_token_basic'];
|
|
1715
|
+
var contentTypes = [];
|
|
1716
|
+
var accepts = ['application/json'];
|
|
1717
|
+
var returnType = _EmailDomain["default"];
|
|
1718
|
+
return this.apiClient.callApi('/email_domains/{email_domain_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* Get an email domain
|
|
1723
|
+
* Returns an email domain, whether it's verified, and the DNS records to add to it.
|
|
1724
|
+
* @param {String} email_domain_id The email domain's ID.
|
|
1725
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailDomain}
|
|
1726
|
+
*/
|
|
1727
|
+
}, {
|
|
1728
|
+
key: "getEmailDomain",
|
|
1729
|
+
value: function getEmailDomain(email_domain_id) {
|
|
1730
|
+
return this.getEmailDomainWithHttpInfo(email_domain_id).then(function (response_and_data) {
|
|
1731
|
+
return response_and_data.data;
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1140
1735
|
/**
|
|
1141
1736
|
* Get a folder
|
|
1142
1737
|
* Returns a folder.
|
|
@@ -1346,7 +1941,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1346
1941
|
* Returns a template: its draft, or one of its published versions.
|
|
1347
1942
|
* @param {String} template_id The template's ID.
|
|
1348
1943
|
* @param {Object} opts Optional parameters
|
|
1349
|
-
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1944
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
1350
1945
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1351
1946
|
*/
|
|
1352
1947
|
}, {
|
|
@@ -1378,7 +1973,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1378
1973
|
* Returns a template: its draft, or one of its published versions.
|
|
1379
1974
|
* @param {String} template_id The template's ID.
|
|
1380
1975
|
* @param {Object} opts Optional parameters
|
|
1381
|
-
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1976
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
1382
1977
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1383
1978
|
*/
|
|
1384
1979
|
}, {
|
|
@@ -1394,7 +1989,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1394
1989
|
* Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
|
|
1395
1990
|
* @param {String} template_id The template's ID.
|
|
1396
1991
|
* @param {Object} opts Optional parameters
|
|
1397
|
-
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1992
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
1398
1993
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateDiff} and HTTP response
|
|
1399
1994
|
*/
|
|
1400
1995
|
}, {
|
|
@@ -1426,7 +2021,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1426
2021
|
* Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
|
|
1427
2022
|
* @param {String} template_id The template's ID.
|
|
1428
2023
|
* @param {Object} opts Optional parameters
|
|
1429
|
-
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2024
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
1430
2025
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateDiff}
|
|
1431
2026
|
*/
|
|
1432
2027
|
}, {
|
|
@@ -1443,7 +2038,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1443
2038
|
* @param {String} template_id The template's ID.
|
|
1444
2039
|
* @param {module:model/ModelCodeLanguage} lang The language to generate the code in.
|
|
1445
2040
|
* @param {Object} opts Optional parameters
|
|
1446
|
-
* @param {String} [version] The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
2041
|
+
* @param {String} [version] The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`, the version a submission uses by default.
|
|
1447
2042
|
* @param {Boolean} [just_types] Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types, PHP has no types-only code, and Rust's code is only types (serde converts the JSON), so theirs is the same either way.
|
|
1448
2043
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateModelCode} and HTTP response
|
|
1449
2044
|
*/
|
|
@@ -1483,7 +2078,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1483
2078
|
* @param {String} template_id The template's ID.
|
|
1484
2079
|
* @param {module:model/ModelCodeLanguage} lang The language to generate the code in.
|
|
1485
2080
|
* @param {Object} opts Optional parameters
|
|
1486
|
-
* @param {String} opts.version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
2081
|
+
* @param {String} opts.version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`, the version a submission uses by default.
|
|
1487
2082
|
* @param {Boolean} opts.just_types Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types, PHP has no types-only code, and Rust's code is only types (serde converts the JSON), so theirs is the same either way.
|
|
1488
2083
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateModelCode}
|
|
1489
2084
|
*/
|
|
@@ -1500,7 +2095,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1500
2095
|
* Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
|
|
1501
2096
|
* @param {String} template_id The template's ID.
|
|
1502
2097
|
* @param {Object} opts Optional parameters
|
|
1503
|
-
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2098
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
1504
2099
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplatePageImages} and HTTP response
|
|
1505
2100
|
*/
|
|
1506
2101
|
}, {
|
|
@@ -1532,7 +2127,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1532
2127
|
* Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
|
|
1533
2128
|
* @param {String} template_id The template's ID.
|
|
1534
2129
|
* @param {Object} opts Optional parameters
|
|
1535
|
-
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2130
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
1536
2131
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplatePageImages}
|
|
1537
2132
|
*/
|
|
1538
2133
|
}, {
|
|
@@ -1596,7 +2191,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1596
2191
|
* 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.
|
|
1597
2192
|
* @param {String} template_id The template's ID.
|
|
1598
2193
|
* @param {Object} opts Optional parameters
|
|
1599
|
-
* @param {String} [version] The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
2194
|
+
* @param {String} [version] The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`, the version a submission uses by default.
|
|
1600
2195
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object.<String, {String: Object}>} and HTTP response
|
|
1601
2196
|
*/
|
|
1602
2197
|
}, {
|
|
@@ -1630,7 +2225,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1630
2225
|
* 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.
|
|
1631
2226
|
* @param {String} template_id The template's ID.
|
|
1632
2227
|
* @param {Object} opts Optional parameters
|
|
1633
|
-
* @param {String} opts.version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
2228
|
+
* @param {String} opts.version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`, the version a submission uses by default.
|
|
1634
2229
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object.<String, {String: Object}>}
|
|
1635
2230
|
*/
|
|
1636
2231
|
}, {
|
|
@@ -1683,16 +2278,16 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1683
2278
|
}
|
|
1684
2279
|
|
|
1685
2280
|
/**
|
|
1686
|
-
* List
|
|
1687
|
-
* Returns
|
|
2281
|
+
* List account email actions
|
|
2282
|
+
* Returns your account's email actions, newest first, one page at a time. Each one emails the files of every template's processed submissions, or of the templates and folders it lists. A template's own email actions are listed with the template (`GET /templates/{template_id}/email_actions`).
|
|
1688
2283
|
* @param {Object} opts Optional parameters
|
|
1689
2284
|
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1690
2285
|
* @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.
|
|
1691
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
2286
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailActionList} and HTTP response
|
|
1692
2287
|
*/
|
|
1693
2288
|
}, {
|
|
1694
|
-
key: "
|
|
1695
|
-
value: function
|
|
2289
|
+
key: "listAccountEmailActionsWithHttpInfo",
|
|
2290
|
+
value: function listAccountEmailActionsWithHttpInfo(opts) {
|
|
1696
2291
|
opts = opts || {};
|
|
1697
2292
|
var postBody = null;
|
|
1698
2293
|
var pathParams = {};
|
|
@@ -1705,33 +2300,76 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1705
2300
|
var authNames = ['api_token_basic'];
|
|
1706
2301
|
var contentTypes = [];
|
|
1707
2302
|
var accepts = ['application/json'];
|
|
1708
|
-
var returnType =
|
|
1709
|
-
return this.apiClient.callApi('/
|
|
2303
|
+
var returnType = _EmailActionList["default"];
|
|
2304
|
+
return this.apiClient.callApi('/email_actions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1710
2305
|
}
|
|
1711
2306
|
|
|
1712
2307
|
/**
|
|
1713
|
-
* List
|
|
1714
|
-
* Returns
|
|
2308
|
+
* List account email actions
|
|
2309
|
+
* Returns your account's email actions, newest first, one page at a time. Each one emails the files of every template's processed submissions, or of the templates and folders it lists. A template's own email actions are listed with the template (`GET /templates/{template_id}/email_actions`).
|
|
1715
2310
|
* @param {Object} opts Optional parameters
|
|
1716
2311
|
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1717
2312
|
* @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.
|
|
1718
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
2313
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailActionList}
|
|
1719
2314
|
*/
|
|
1720
2315
|
}, {
|
|
1721
|
-
key: "
|
|
1722
|
-
value: function
|
|
1723
|
-
return this.
|
|
2316
|
+
key: "listAccountEmailActions",
|
|
2317
|
+
value: function listAccountEmailActions(opts) {
|
|
2318
|
+
return this.listAccountEmailActionsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1724
2319
|
return response_and_data.data;
|
|
1725
2320
|
});
|
|
1726
2321
|
}
|
|
1727
2322
|
|
|
1728
2323
|
/**
|
|
1729
|
-
* List
|
|
1730
|
-
* Returns the
|
|
2324
|
+
* List combined PDFs
|
|
2325
|
+
* Returns the combined PDFs in your account, newest first, one page at a time.
|
|
1731
2326
|
* @param {Object} opts Optional parameters
|
|
1732
2327
|
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1733
2328
|
* @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.
|
|
1734
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
2329
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdfList} and HTTP response
|
|
2330
|
+
*/
|
|
2331
|
+
}, {
|
|
2332
|
+
key: "listCombinedPdfsWithHttpInfo",
|
|
2333
|
+
value: function listCombinedPdfsWithHttpInfo(opts) {
|
|
2334
|
+
opts = opts || {};
|
|
2335
|
+
var postBody = null;
|
|
2336
|
+
var pathParams = {};
|
|
2337
|
+
var queryParams = {
|
|
2338
|
+
'limit': opts['limit'],
|
|
2339
|
+
'cursor': opts['cursor']
|
|
2340
|
+
};
|
|
2341
|
+
var headerParams = {};
|
|
2342
|
+
var formParams = {};
|
|
2343
|
+
var authNames = ['api_token_basic'];
|
|
2344
|
+
var contentTypes = [];
|
|
2345
|
+
var accepts = ['application/json'];
|
|
2346
|
+
var returnType = _CombinedPdfList["default"];
|
|
2347
|
+
return this.apiClient.callApi('/combined_pdfs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
/**
|
|
2351
|
+
* List combined PDFs
|
|
2352
|
+
* Returns the combined PDFs in your account, newest first, one page at a time.
|
|
2353
|
+
* @param {Object} opts Optional parameters
|
|
2354
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
2355
|
+
* @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.
|
|
2356
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdfList}
|
|
2357
|
+
*/
|
|
2358
|
+
}, {
|
|
2359
|
+
key: "listCombinedPdfs",
|
|
2360
|
+
value: function listCombinedPdfs(opts) {
|
|
2361
|
+
return this.listCombinedPdfsWithHttpInfo(opts).then(function (response_and_data) {
|
|
2362
|
+
return response_and_data.data;
|
|
2363
|
+
});
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
/**
|
|
2367
|
+
* List custom files
|
|
2368
|
+
* Returns the custom files in your account, newest first, one page at a time.
|
|
2369
|
+
* @param {Object} opts Optional parameters
|
|
2370
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
2371
|
+
* @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.
|
|
2372
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFileList} and HTTP response
|
|
1735
2373
|
*/
|
|
1736
2374
|
}, {
|
|
1737
2375
|
key: "listCustomFilesWithHttpInfo",
|
|
@@ -1768,6 +2406,100 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1768
2406
|
});
|
|
1769
2407
|
}
|
|
1770
2408
|
|
|
2409
|
+
/**
|
|
2410
|
+
* List email actions
|
|
2411
|
+
* Returns the email actions of a template's draft, and your account's email actions that send for it, newest first, one page at a time. Each one emails every processed submission's files to the people it lists. An account email action (`template_id` null) shows the settings it sends for this template, with the template's changes in `customization`.
|
|
2412
|
+
* @param {String} template_id The template's ID.
|
|
2413
|
+
* @param {Object} opts Optional parameters
|
|
2414
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
2415
|
+
* @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.
|
|
2416
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailActionList} and HTTP response
|
|
2417
|
+
*/
|
|
2418
|
+
}, {
|
|
2419
|
+
key: "listEmailActionsWithHttpInfo",
|
|
2420
|
+
value: function listEmailActionsWithHttpInfo(template_id, opts) {
|
|
2421
|
+
opts = opts || {};
|
|
2422
|
+
var postBody = null;
|
|
2423
|
+
// verify the required parameter 'template_id' is set
|
|
2424
|
+
if (template_id === undefined || template_id === null) {
|
|
2425
|
+
throw new Error("Missing the required parameter 'template_id' when calling listEmailActions");
|
|
2426
|
+
}
|
|
2427
|
+
var pathParams = {
|
|
2428
|
+
'template_id': template_id
|
|
2429
|
+
};
|
|
2430
|
+
var queryParams = {
|
|
2431
|
+
'limit': opts['limit'],
|
|
2432
|
+
'cursor': opts['cursor']
|
|
2433
|
+
};
|
|
2434
|
+
var headerParams = {};
|
|
2435
|
+
var formParams = {};
|
|
2436
|
+
var authNames = ['api_token_basic'];
|
|
2437
|
+
var contentTypes = [];
|
|
2438
|
+
var accepts = ['application/json'];
|
|
2439
|
+
var returnType = _EmailActionList["default"];
|
|
2440
|
+
return this.apiClient.callApi('/templates/{template_id}/email_actions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
/**
|
|
2444
|
+
* List email actions
|
|
2445
|
+
* Returns the email actions of a template's draft, and your account's email actions that send for it, newest first, one page at a time. Each one emails every processed submission's files to the people it lists. An account email action (`template_id` null) shows the settings it sends for this template, with the template's changes in `customization`.
|
|
2446
|
+
* @param {String} template_id The template's ID.
|
|
2447
|
+
* @param {Object} opts Optional parameters
|
|
2448
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
2449
|
+
* @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.
|
|
2450
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailActionList}
|
|
2451
|
+
*/
|
|
2452
|
+
}, {
|
|
2453
|
+
key: "listEmailActions",
|
|
2454
|
+
value: function listEmailActions(template_id, opts) {
|
|
2455
|
+
return this.listEmailActionsWithHttpInfo(template_id, opts).then(function (response_and_data) {
|
|
2456
|
+
return response_and_data.data;
|
|
2457
|
+
});
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
/**
|
|
2461
|
+
* List email domains
|
|
2462
|
+
* Returns the domains in your account that email actions can send from once they're verified, newest first, one page at a time.
|
|
2463
|
+
* @param {Object} opts Optional parameters
|
|
2464
|
+
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
2465
|
+
* @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.
|
|
2466
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailDomainList} and HTTP response
|
|
2467
|
+
*/
|
|
2468
|
+
}, {
|
|
2469
|
+
key: "listEmailDomainsWithHttpInfo",
|
|
2470
|
+
value: function listEmailDomainsWithHttpInfo(opts) {
|
|
2471
|
+
opts = opts || {};
|
|
2472
|
+
var postBody = null;
|
|
2473
|
+
var pathParams = {};
|
|
2474
|
+
var queryParams = {
|
|
2475
|
+
'limit': opts['limit'],
|
|
2476
|
+
'cursor': opts['cursor']
|
|
2477
|
+
};
|
|
2478
|
+
var headerParams = {};
|
|
2479
|
+
var formParams = {};
|
|
2480
|
+
var authNames = ['api_token_basic'];
|
|
2481
|
+
var contentTypes = [];
|
|
2482
|
+
var accepts = ['application/json'];
|
|
2483
|
+
var returnType = _EmailDomainList["default"];
|
|
2484
|
+
return this.apiClient.callApi('/email_domains', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
/**
|
|
2488
|
+
* List email domains
|
|
2489
|
+
* Returns the domains in your account that email actions can send from once they're verified, newest first, one page at a time.
|
|
2490
|
+
* @param {Object} opts Optional parameters
|
|
2491
|
+
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
2492
|
+
* @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.
|
|
2493
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailDomainList}
|
|
2494
|
+
*/
|
|
2495
|
+
}, {
|
|
2496
|
+
key: "listEmailDomains",
|
|
2497
|
+
value: function listEmailDomains(opts) {
|
|
2498
|
+
return this.listEmailDomainsWithHttpInfo(opts).then(function (response_and_data) {
|
|
2499
|
+
return response_and_data.data;
|
|
2500
|
+
});
|
|
2501
|
+
}
|
|
2502
|
+
|
|
1771
2503
|
/**
|
|
1772
2504
|
* List folders
|
|
1773
2505
|
* Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
@@ -1883,7 +2615,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1883
2615
|
* Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
|
|
1884
2616
|
* @param {String} template_id The template's ID.
|
|
1885
2617
|
* @param {Object} opts Optional parameters
|
|
1886
|
-
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2618
|
+
* @param {String} [version] A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
1887
2619
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
1888
2620
|
*/
|
|
1889
2621
|
}, {
|
|
@@ -1915,7 +2647,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1915
2647
|
* Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
|
|
1916
2648
|
* @param {String} template_id The template's ID.
|
|
1917
2649
|
* @param {Object} opts Optional parameters
|
|
1918
|
-
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2650
|
+
* @param {String} opts.version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
1919
2651
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
1920
2652
|
*/
|
|
1921
2653
|
}, {
|
|
@@ -1999,7 +2731,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1999
2731
|
* List templates
|
|
2000
2732
|
* Returns the templates in your account (their drafts), newest first, one page at a time. Each one is a summary: get a template by its ID for its settings, its PDF in full, its HTML, defaults and published versions.
|
|
2001
2733
|
* @param {Object} opts Optional parameters
|
|
2002
|
-
* @param {String} [query] Only list templates whose name contains this text (ignoring case).
|
|
2734
|
+
* @param {String} [query] Only list templates whose name contains this text (ignoring case). `%` and `_` match themselves.
|
|
2003
2735
|
* @param {String} [parent_folder_id] Only list the templates in this folder (not in its subfolders).
|
|
2004
2736
|
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
2005
2737
|
* @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.
|
|
@@ -2030,7 +2762,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2030
2762
|
* List templates
|
|
2031
2763
|
* Returns the templates in your account (their drafts), newest first, one page at a time. Each one is a summary: get a template by its ID for its settings, its PDF in full, its HTML, defaults and published versions.
|
|
2032
2764
|
* @param {Object} opts Optional parameters
|
|
2033
|
-
* @param {String} opts.query Only list templates whose name contains this text (ignoring case).
|
|
2765
|
+
* @param {String} opts.query Only list templates whose name contains this text (ignoring case). `%` and `_` match themselves.
|
|
2034
2766
|
* @param {String} opts.parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
2035
2767
|
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
2036
2768
|
* @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.
|
|
@@ -2107,11 +2839,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2107
2839
|
* 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.
|
|
2108
2840
|
* @param {String} folder_id The folder's ID.
|
|
2109
2841
|
* @param {module:model/MoveFolderRequest} body Where to move the folder.
|
|
2842
|
+
* @param {Object} opts Optional parameters
|
|
2843
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2110
2844
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
2111
2845
|
*/
|
|
2112
2846
|
}, {
|
|
2113
2847
|
key: "moveFolderWithHttpInfo",
|
|
2114
|
-
value: function moveFolderWithHttpInfo(folder_id, body) {
|
|
2848
|
+
value: function moveFolderWithHttpInfo(folder_id, body, opts) {
|
|
2849
|
+
opts = opts || {};
|
|
2115
2850
|
var postBody = body;
|
|
2116
2851
|
// verify the required parameter 'folder_id' is set
|
|
2117
2852
|
if (folder_id === undefined || folder_id === null) {
|
|
@@ -2125,7 +2860,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2125
2860
|
'folder_id': folder_id
|
|
2126
2861
|
};
|
|
2127
2862
|
var queryParams = {};
|
|
2128
|
-
var headerParams = {
|
|
2863
|
+
var headerParams = {
|
|
2864
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
2865
|
+
};
|
|
2129
2866
|
var formParams = {};
|
|
2130
2867
|
var authNames = ['api_token_basic'];
|
|
2131
2868
|
var contentTypes = ['application/json'];
|
|
@@ -2139,12 +2876,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2139
2876
|
* 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.
|
|
2140
2877
|
* @param {String} folder_id The folder's ID.
|
|
2141
2878
|
* @param {module:model/MoveFolderRequest} body Where to move the folder.
|
|
2879
|
+
* @param {Object} opts Optional parameters
|
|
2880
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2142
2881
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
2143
2882
|
*/
|
|
2144
2883
|
}, {
|
|
2145
2884
|
key: "moveFolder",
|
|
2146
|
-
value: function moveFolder(folder_id, body) {
|
|
2147
|
-
return this.moveFolderWithHttpInfo(folder_id, body).then(function (response_and_data) {
|
|
2885
|
+
value: function moveFolder(folder_id, body, opts) {
|
|
2886
|
+
return this.moveFolderWithHttpInfo(folder_id, body, opts).then(function (response_and_data) {
|
|
2148
2887
|
return response_and_data.data;
|
|
2149
2888
|
});
|
|
2150
2889
|
}
|
|
@@ -2154,11 +2893,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2154
2893
|
* Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2155
2894
|
* @param {String} template_id The template's ID.
|
|
2156
2895
|
* @param {module:model/MoveTemplateRequest} body Where to move the template.
|
|
2896
|
+
* @param {Object} opts Optional parameters
|
|
2897
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2157
2898
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2158
2899
|
*/
|
|
2159
2900
|
}, {
|
|
2160
2901
|
key: "moveTemplateWithHttpInfo",
|
|
2161
|
-
value: function moveTemplateWithHttpInfo(template_id, body) {
|
|
2902
|
+
value: function moveTemplateWithHttpInfo(template_id, body, opts) {
|
|
2903
|
+
opts = opts || {};
|
|
2162
2904
|
var postBody = body;
|
|
2163
2905
|
// verify the required parameter 'template_id' is set
|
|
2164
2906
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2172,7 +2914,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2172
2914
|
'template_id': template_id
|
|
2173
2915
|
};
|
|
2174
2916
|
var queryParams = {};
|
|
2175
|
-
var headerParams = {
|
|
2917
|
+
var headerParams = {
|
|
2918
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
2919
|
+
};
|
|
2176
2920
|
var formParams = {};
|
|
2177
2921
|
var authNames = ['api_token_basic'];
|
|
2178
2922
|
var contentTypes = ['application/json'];
|
|
@@ -2186,12 +2930,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2186
2930
|
* Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2187
2931
|
* @param {String} template_id The template's ID.
|
|
2188
2932
|
* @param {module:model/MoveTemplateRequest} body Where to move the template.
|
|
2933
|
+
* @param {Object} opts Optional parameters
|
|
2934
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2189
2935
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2190
2936
|
*/
|
|
2191
2937
|
}, {
|
|
2192
2938
|
key: "moveTemplate",
|
|
2193
|
-
value: function moveTemplate(template_id, body) {
|
|
2194
|
-
return this.moveTemplateWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2939
|
+
value: function moveTemplate(template_id, body, opts) {
|
|
2940
|
+
return this.moveTemplateWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2195
2941
|
return response_and_data.data;
|
|
2196
2942
|
});
|
|
2197
2943
|
}
|
|
@@ -2201,11 +2947,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2201
2947
|
* Publishes the template's draft as a new version. Its content (the PDF or HTML, fields, name and description) never changes, while settings such as `webhook_url` and `public_submissions` keep following the draft. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
2202
2948
|
* @param {String} template_id The template's ID.
|
|
2203
2949
|
* @param {module:model/PublishTemplateVersionRequest} body The version to publish.
|
|
2950
|
+
* @param {Object} opts Optional parameters
|
|
2951
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2204
2952
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateVersion} and HTTP response
|
|
2205
2953
|
*/
|
|
2206
2954
|
}, {
|
|
2207
2955
|
key: "publishTemplateVersionWithHttpInfo",
|
|
2208
|
-
value: function publishTemplateVersionWithHttpInfo(template_id, body) {
|
|
2956
|
+
value: function publishTemplateVersionWithHttpInfo(template_id, body, opts) {
|
|
2957
|
+
opts = opts || {};
|
|
2209
2958
|
var postBody = body;
|
|
2210
2959
|
// verify the required parameter 'template_id' is set
|
|
2211
2960
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2219,7 +2968,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2219
2968
|
'template_id': template_id
|
|
2220
2969
|
};
|
|
2221
2970
|
var queryParams = {};
|
|
2222
|
-
var headerParams = {
|
|
2971
|
+
var headerParams = {
|
|
2972
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
2973
|
+
};
|
|
2223
2974
|
var formParams = {};
|
|
2224
2975
|
var authNames = ['api_token_basic'];
|
|
2225
2976
|
var contentTypes = ['application/json'];
|
|
@@ -2233,12 +2984,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2233
2984
|
* Publishes the template's draft as a new version. Its content (the PDF or HTML, fields, name and description) never changes, while settings such as `webhook_url` and `public_submissions` keep following the draft. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
2234
2985
|
* @param {String} template_id The template's ID.
|
|
2235
2986
|
* @param {module:model/PublishTemplateVersionRequest} body The version to publish.
|
|
2987
|
+
* @param {Object} opts Optional parameters
|
|
2988
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2236
2989
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateVersion}
|
|
2237
2990
|
*/
|
|
2238
2991
|
}, {
|
|
2239
2992
|
key: "publishTemplateVersion",
|
|
2240
|
-
value: function publishTemplateVersion(template_id, body) {
|
|
2241
|
-
return this.publishTemplateVersionWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
2993
|
+
value: function publishTemplateVersion(template_id, body, opts) {
|
|
2994
|
+
return this.publishTemplateVersionWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2242
2995
|
return response_and_data.data;
|
|
2243
2996
|
});
|
|
2244
2997
|
}
|
|
@@ -2248,11 +3001,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2248
3001
|
* Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
2249
3002
|
* @param {String} template_id The template's ID.
|
|
2250
3003
|
* @param {module:model/RemoveTemplateFieldsRequest} body The fields to remove from the template's draft.
|
|
3004
|
+
* @param {Object} opts Optional parameters
|
|
3005
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2251
3006
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
2252
3007
|
*/
|
|
2253
3008
|
}, {
|
|
2254
3009
|
key: "removeTemplateFieldsWithHttpInfo",
|
|
2255
|
-
value: function removeTemplateFieldsWithHttpInfo(template_id, body) {
|
|
3010
|
+
value: function removeTemplateFieldsWithHttpInfo(template_id, body, opts) {
|
|
3011
|
+
opts = opts || {};
|
|
2256
3012
|
var postBody = body;
|
|
2257
3013
|
// verify the required parameter 'template_id' is set
|
|
2258
3014
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2266,7 +3022,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2266
3022
|
'template_id': template_id
|
|
2267
3023
|
};
|
|
2268
3024
|
var queryParams = {};
|
|
2269
|
-
var headerParams = {
|
|
3025
|
+
var headerParams = {
|
|
3026
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3027
|
+
};
|
|
2270
3028
|
var formParams = {};
|
|
2271
3029
|
var authNames = ['api_token_basic'];
|
|
2272
3030
|
var contentTypes = ['application/json'];
|
|
@@ -2280,12 +3038,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2280
3038
|
* Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
2281
3039
|
* @param {String} template_id The template's ID.
|
|
2282
3040
|
* @param {module:model/RemoveTemplateFieldsRequest} body The fields to remove from the template's draft.
|
|
3041
|
+
* @param {Object} opts Optional parameters
|
|
3042
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2283
3043
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
2284
3044
|
*/
|
|
2285
3045
|
}, {
|
|
2286
3046
|
key: "removeTemplateFields",
|
|
2287
|
-
value: function removeTemplateFields(template_id, body) {
|
|
2288
|
-
return this.removeTemplateFieldsWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
3047
|
+
value: function removeTemplateFields(template_id, body, opts) {
|
|
3048
|
+
return this.removeTemplateFieldsWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2289
3049
|
return response_and_data.data;
|
|
2290
3050
|
});
|
|
2291
3051
|
}
|
|
@@ -2295,11 +3055,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2295
3055
|
* Renames a folder. The name must be unique within its parent folder.
|
|
2296
3056
|
* @param {String} folder_id The folder's ID.
|
|
2297
3057
|
* @param {module:model/RenameFolderRequest} body The folder's new name.
|
|
3058
|
+
* @param {Object} opts Optional parameters
|
|
3059
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2298
3060
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
2299
3061
|
*/
|
|
2300
3062
|
}, {
|
|
2301
3063
|
key: "renameFolderWithHttpInfo",
|
|
2302
|
-
value: function renameFolderWithHttpInfo(folder_id, body) {
|
|
3064
|
+
value: function renameFolderWithHttpInfo(folder_id, body, opts) {
|
|
3065
|
+
opts = opts || {};
|
|
2303
3066
|
var postBody = body;
|
|
2304
3067
|
// verify the required parameter 'folder_id' is set
|
|
2305
3068
|
if (folder_id === undefined || folder_id === null) {
|
|
@@ -2313,7 +3076,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2313
3076
|
'folder_id': folder_id
|
|
2314
3077
|
};
|
|
2315
3078
|
var queryParams = {};
|
|
2316
|
-
var headerParams = {
|
|
3079
|
+
var headerParams = {
|
|
3080
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3081
|
+
};
|
|
2317
3082
|
var formParams = {};
|
|
2318
3083
|
var authNames = ['api_token_basic'];
|
|
2319
3084
|
var contentTypes = ['application/json'];
|
|
@@ -2327,12 +3092,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2327
3092
|
* Renames a folder. The name must be unique within its parent folder.
|
|
2328
3093
|
* @param {String} folder_id The folder's ID.
|
|
2329
3094
|
* @param {module:model/RenameFolderRequest} body The folder's new name.
|
|
3095
|
+
* @param {Object} opts Optional parameters
|
|
3096
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2330
3097
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
2331
3098
|
*/
|
|
2332
3099
|
}, {
|
|
2333
3100
|
key: "renameFolder",
|
|
2334
|
-
value: function renameFolder(folder_id, body) {
|
|
2335
|
-
return this.renameFolderWithHttpInfo(folder_id, body).then(function (response_and_data) {
|
|
3101
|
+
value: function renameFolder(folder_id, body, opts) {
|
|
3102
|
+
return this.renameFolderWithHttpInfo(folder_id, body, opts).then(function (response_and_data) {
|
|
2336
3103
|
return response_and_data.data;
|
|
2337
3104
|
});
|
|
2338
3105
|
}
|
|
@@ -2342,11 +3109,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2342
3109
|
* Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
2343
3110
|
* @param {String} template_id The template's ID.
|
|
2344
3111
|
* @param {module:model/ReorderTemplateFieldsRequest} body The new order of the fields in the template's draft.
|
|
3112
|
+
* @param {Object} opts Optional parameters
|
|
3113
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2345
3114
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
2346
3115
|
*/
|
|
2347
3116
|
}, {
|
|
2348
3117
|
key: "reorderTemplateFieldsWithHttpInfo",
|
|
2349
|
-
value: function reorderTemplateFieldsWithHttpInfo(template_id, body) {
|
|
3118
|
+
value: function reorderTemplateFieldsWithHttpInfo(template_id, body, opts) {
|
|
3119
|
+
opts = opts || {};
|
|
2350
3120
|
var postBody = body;
|
|
2351
3121
|
// verify the required parameter 'template_id' is set
|
|
2352
3122
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2360,7 +3130,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2360
3130
|
'template_id': template_id
|
|
2361
3131
|
};
|
|
2362
3132
|
var queryParams = {};
|
|
2363
|
-
var headerParams = {
|
|
3133
|
+
var headerParams = {
|
|
3134
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3135
|
+
};
|
|
2364
3136
|
var formParams = {};
|
|
2365
3137
|
var authNames = ['api_token_basic'];
|
|
2366
3138
|
var contentTypes = ['application/json'];
|
|
@@ -2374,12 +3146,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2374
3146
|
* Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
2375
3147
|
* @param {String} template_id The template's ID.
|
|
2376
3148
|
* @param {module:model/ReorderTemplateFieldsRequest} body The new order of the fields in the template's draft.
|
|
3149
|
+
* @param {Object} opts Optional parameters
|
|
3150
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2377
3151
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
2378
3152
|
*/
|
|
2379
3153
|
}, {
|
|
2380
3154
|
key: "reorderTemplateFields",
|
|
2381
|
-
value: function reorderTemplateFields(template_id, body) {
|
|
2382
|
-
return this.reorderTemplateFieldsWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
3155
|
+
value: function reorderTemplateFields(template_id, body, opts) {
|
|
3156
|
+
return this.reorderTemplateFieldsWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2383
3157
|
return response_and_data.data;
|
|
2384
3158
|
});
|
|
2385
3159
|
}
|
|
@@ -2389,11 +3163,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2389
3163
|
* Replaces the template's draft with a copy of one of its published versions. The draft keeps its settings that apply to every version, such as `webhook_url`.
|
|
2390
3164
|
* @param {String} template_id The template's ID.
|
|
2391
3165
|
* @param {module:model/RestoreTemplateVersionRequest} body The version to restore.
|
|
3166
|
+
* @param {Object} opts Optional parameters
|
|
3167
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2392
3168
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2393
3169
|
*/
|
|
2394
3170
|
}, {
|
|
2395
3171
|
key: "restoreTemplateVersionWithHttpInfo",
|
|
2396
|
-
value: function restoreTemplateVersionWithHttpInfo(template_id, body) {
|
|
3172
|
+
value: function restoreTemplateVersionWithHttpInfo(template_id, body, opts) {
|
|
3173
|
+
opts = opts || {};
|
|
2397
3174
|
var postBody = body;
|
|
2398
3175
|
// verify the required parameter 'template_id' is set
|
|
2399
3176
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2407,7 +3184,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2407
3184
|
'template_id': template_id
|
|
2408
3185
|
};
|
|
2409
3186
|
var queryParams = {};
|
|
2410
|
-
var headerParams = {
|
|
3187
|
+
var headerParams = {
|
|
3188
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3189
|
+
};
|
|
2411
3190
|
var formParams = {};
|
|
2412
3191
|
var authNames = ['api_token_basic'];
|
|
2413
3192
|
var contentTypes = ['application/json'];
|
|
@@ -2421,12 +3200,119 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2421
3200
|
* Replaces the template's draft with a copy of one of its published versions. The draft keeps its settings that apply to every version, such as `webhook_url`.
|
|
2422
3201
|
* @param {String} template_id The template's ID.
|
|
2423
3202
|
* @param {module:model/RestoreTemplateVersionRequest} body The version to restore.
|
|
3203
|
+
* @param {Object} opts Optional parameters
|
|
3204
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2424
3205
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2425
3206
|
*/
|
|
2426
3207
|
}, {
|
|
2427
3208
|
key: "restoreTemplateVersion",
|
|
2428
|
-
value: function restoreTemplateVersion(template_id, body) {
|
|
2429
|
-
return this.restoreTemplateVersionWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
3209
|
+
value: function restoreTemplateVersion(template_id, body, opts) {
|
|
3210
|
+
return this.restoreTemplateVersionWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
3211
|
+
return response_and_data.data;
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
/**
|
|
3216
|
+
* Send a test email for an account email action
|
|
3217
|
+
* Sends the account email action's email to the API token's user only, as it would go for one template it sends for, with each field shown as its name in brackets, so you can check how it looks. When the email action attaches its files and that template is a PDF template, the test attaches the template's blank PDF. It isn't recorded on any submission.
|
|
3218
|
+
* @param {String} email_action_id The account email action's ID.
|
|
3219
|
+
* @param {Object} opts Optional parameters
|
|
3220
|
+
* @param {module:model/SendAccountEmailActionTestEmailRequest} [body] Which template the test email is for.
|
|
3221
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3222
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailActionTestEmail} and HTTP response
|
|
3223
|
+
*/
|
|
3224
|
+
}, {
|
|
3225
|
+
key: "sendAccountEmailActionTestEmailWithHttpInfo",
|
|
3226
|
+
value: function sendAccountEmailActionTestEmailWithHttpInfo(email_action_id, opts) {
|
|
3227
|
+
opts = opts || {};
|
|
3228
|
+
var postBody = opts['body'];
|
|
3229
|
+
// verify the required parameter 'email_action_id' is set
|
|
3230
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
3231
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling sendAccountEmailActionTestEmail");
|
|
3232
|
+
}
|
|
3233
|
+
var pathParams = {
|
|
3234
|
+
'email_action_id': email_action_id
|
|
3235
|
+
};
|
|
3236
|
+
var queryParams = {};
|
|
3237
|
+
var headerParams = {
|
|
3238
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3239
|
+
};
|
|
3240
|
+
var formParams = {};
|
|
3241
|
+
var authNames = ['api_token_basic'];
|
|
3242
|
+
var contentTypes = ['application/json'];
|
|
3243
|
+
var accepts = ['application/json'];
|
|
3244
|
+
var returnType = _EmailActionTestEmail["default"];
|
|
3245
|
+
return this.apiClient.callApi('/email_actions/{email_action_id}/test_email', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
/**
|
|
3249
|
+
* Send a test email for an account email action
|
|
3250
|
+
* Sends the account email action's email to the API token's user only, as it would go for one template it sends for, with each field shown as its name in brackets, so you can check how it looks. When the email action attaches its files and that template is a PDF template, the test attaches the template's blank PDF. It isn't recorded on any submission.
|
|
3251
|
+
* @param {String} email_action_id The account email action's ID.
|
|
3252
|
+
* @param {Object} opts Optional parameters
|
|
3253
|
+
* @param {module:model/SendAccountEmailActionTestEmailRequest} opts.body Which template the test email is for.
|
|
3254
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3255
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailActionTestEmail}
|
|
3256
|
+
*/
|
|
3257
|
+
}, {
|
|
3258
|
+
key: "sendAccountEmailActionTestEmail",
|
|
3259
|
+
value: function sendAccountEmailActionTestEmail(email_action_id, opts) {
|
|
3260
|
+
return this.sendAccountEmailActionTestEmailWithHttpInfo(email_action_id, opts).then(function (response_and_data) {
|
|
3261
|
+
return response_and_data.data;
|
|
3262
|
+
});
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
/**
|
|
3266
|
+
* Send a test email
|
|
3267
|
+
* Sends the email action's email to the API token's user only, with each field and metadata value shown as its name in brackets, so you can check how it looks. When the email action attaches its files and the template is a PDF template, the test attaches the template's blank PDF. It isn't recorded on any submission. Without a paid plan, the user needs a confirmed email address.
|
|
3268
|
+
* @param {String} template_id The template's ID.
|
|
3269
|
+
* @param {String} email_action_id The email action's ID.
|
|
3270
|
+
* @param {Object} opts Optional parameters
|
|
3271
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3272
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailActionTestEmail} and HTTP response
|
|
3273
|
+
*/
|
|
3274
|
+
}, {
|
|
3275
|
+
key: "sendEmailActionTestEmailWithHttpInfo",
|
|
3276
|
+
value: function sendEmailActionTestEmailWithHttpInfo(template_id, email_action_id, opts) {
|
|
3277
|
+
opts = opts || {};
|
|
3278
|
+
var postBody = null;
|
|
3279
|
+
// verify the required parameter 'template_id' is set
|
|
3280
|
+
if (template_id === undefined || template_id === null) {
|
|
3281
|
+
throw new Error("Missing the required parameter 'template_id' when calling sendEmailActionTestEmail");
|
|
3282
|
+
}
|
|
3283
|
+
// verify the required parameter 'email_action_id' is set
|
|
3284
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
3285
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling sendEmailActionTestEmail");
|
|
3286
|
+
}
|
|
3287
|
+
var pathParams = {
|
|
3288
|
+
'template_id': template_id,
|
|
3289
|
+
'email_action_id': email_action_id
|
|
3290
|
+
};
|
|
3291
|
+
var queryParams = {};
|
|
3292
|
+
var headerParams = {
|
|
3293
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3294
|
+
};
|
|
3295
|
+
var formParams = {};
|
|
3296
|
+
var authNames = ['api_token_basic'];
|
|
3297
|
+
var contentTypes = [];
|
|
3298
|
+
var accepts = ['application/json'];
|
|
3299
|
+
var returnType = _EmailActionTestEmail["default"];
|
|
3300
|
+
return this.apiClient.callApi('/templates/{template_id}/email_actions/{email_action_id}/test_email', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3303
|
+
/**
|
|
3304
|
+
* Send a test email
|
|
3305
|
+
* Sends the email action's email to the API token's user only, with each field and metadata value shown as its name in brackets, so you can check how it looks. When the email action attaches its files and the template is a PDF template, the test attaches the template's blank PDF. It isn't recorded on any submission. Without a paid plan, the user needs a confirmed email address.
|
|
3306
|
+
* @param {String} template_id The template's ID.
|
|
3307
|
+
* @param {String} email_action_id The email action's ID.
|
|
3308
|
+
* @param {Object} opts Optional parameters
|
|
3309
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3310
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailActionTestEmail}
|
|
3311
|
+
*/
|
|
3312
|
+
}, {
|
|
3313
|
+
key: "sendEmailActionTestEmail",
|
|
3314
|
+
value: function sendEmailActionTestEmail(template_id, email_action_id, opts) {
|
|
3315
|
+
return this.sendEmailActionTestEmailWithHttpInfo(template_id, email_action_id, opts).then(function (response_and_data) {
|
|
2430
3316
|
return response_and_data.data;
|
|
2431
3317
|
});
|
|
2432
3318
|
}
|
|
@@ -2464,16 +3350,195 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2464
3350
|
});
|
|
2465
3351
|
}
|
|
2466
3352
|
|
|
3353
|
+
/**
|
|
3354
|
+
* Update an account email action
|
|
3355
|
+
* Changes one of your account's email actions. Properties left out keep their values. Its templates' customizations keep their own changes, and follow the rest. Set `enabled` to false to stop its emails for every template.
|
|
3356
|
+
* @param {String} email_action_id The account email action's ID.
|
|
3357
|
+
* @param {module:model/UpdateAccountEmailActionRequest} body The settings to change. Properties left out keep their values.
|
|
3358
|
+
* @param {Object} opts Optional parameters
|
|
3359
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3360
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
3361
|
+
*/
|
|
3362
|
+
}, {
|
|
3363
|
+
key: "updateAccountEmailActionWithHttpInfo",
|
|
3364
|
+
value: function updateAccountEmailActionWithHttpInfo(email_action_id, body, opts) {
|
|
3365
|
+
opts = opts || {};
|
|
3366
|
+
var postBody = body;
|
|
3367
|
+
// verify the required parameter 'email_action_id' is set
|
|
3368
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
3369
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling updateAccountEmailAction");
|
|
3370
|
+
}
|
|
3371
|
+
// verify the required parameter 'body' is set
|
|
3372
|
+
if (body === undefined || body === null) {
|
|
3373
|
+
throw new Error("Missing the required parameter 'body' when calling updateAccountEmailAction");
|
|
3374
|
+
}
|
|
3375
|
+
var pathParams = {
|
|
3376
|
+
'email_action_id': email_action_id
|
|
3377
|
+
};
|
|
3378
|
+
var queryParams = {};
|
|
3379
|
+
var headerParams = {
|
|
3380
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3381
|
+
};
|
|
3382
|
+
var formParams = {};
|
|
3383
|
+
var authNames = ['api_token_basic'];
|
|
3384
|
+
var contentTypes = ['application/json'];
|
|
3385
|
+
var accepts = ['application/json'];
|
|
3386
|
+
var returnType = _EmailAction["default"];
|
|
3387
|
+
return this.apiClient.callApi('/email_actions/{email_action_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
/**
|
|
3391
|
+
* Update an account email action
|
|
3392
|
+
* Changes one of your account's email actions. Properties left out keep their values. Its templates' customizations keep their own changes, and follow the rest. Set `enabled` to false to stop its emails for every template.
|
|
3393
|
+
* @param {String} email_action_id The account email action's ID.
|
|
3394
|
+
* @param {module:model/UpdateAccountEmailActionRequest} body The settings to change. Properties left out keep their values.
|
|
3395
|
+
* @param {Object} opts Optional parameters
|
|
3396
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3397
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
3398
|
+
*/
|
|
3399
|
+
}, {
|
|
3400
|
+
key: "updateAccountEmailAction",
|
|
3401
|
+
value: function updateAccountEmailAction(email_action_id, body, opts) {
|
|
3402
|
+
return this.updateAccountEmailActionWithHttpInfo(email_action_id, body, opts).then(function (response_and_data) {
|
|
3403
|
+
return response_and_data.data;
|
|
3404
|
+
});
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
/**
|
|
3408
|
+
* Update an email action
|
|
3409
|
+
* Changes an email action's settings. Properties left out keep their values. Set `enabled` to false to stop its emails, or to true to turn it back on after DocSpring turned it off.
|
|
3410
|
+
* @param {String} template_id The template's ID.
|
|
3411
|
+
* @param {String} email_action_id The email action's ID.
|
|
3412
|
+
* @param {module:model/UpdateEmailActionRequest} body The settings to change. Properties left out keep their values.
|
|
3413
|
+
* @param {Object} opts Optional parameters
|
|
3414
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3415
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
3416
|
+
*/
|
|
3417
|
+
}, {
|
|
3418
|
+
key: "updateEmailActionWithHttpInfo",
|
|
3419
|
+
value: function updateEmailActionWithHttpInfo(template_id, email_action_id, body, opts) {
|
|
3420
|
+
opts = opts || {};
|
|
3421
|
+
var postBody = body;
|
|
3422
|
+
// verify the required parameter 'template_id' is set
|
|
3423
|
+
if (template_id === undefined || template_id === null) {
|
|
3424
|
+
throw new Error("Missing the required parameter 'template_id' when calling updateEmailAction");
|
|
3425
|
+
}
|
|
3426
|
+
// verify the required parameter 'email_action_id' is set
|
|
3427
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
3428
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling updateEmailAction");
|
|
3429
|
+
}
|
|
3430
|
+
// verify the required parameter 'body' is set
|
|
3431
|
+
if (body === undefined || body === null) {
|
|
3432
|
+
throw new Error("Missing the required parameter 'body' when calling updateEmailAction");
|
|
3433
|
+
}
|
|
3434
|
+
var pathParams = {
|
|
3435
|
+
'template_id': template_id,
|
|
3436
|
+
'email_action_id': email_action_id
|
|
3437
|
+
};
|
|
3438
|
+
var queryParams = {};
|
|
3439
|
+
var headerParams = {
|
|
3440
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3441
|
+
};
|
|
3442
|
+
var formParams = {};
|
|
3443
|
+
var authNames = ['api_token_basic'];
|
|
3444
|
+
var contentTypes = ['application/json'];
|
|
3445
|
+
var accepts = ['application/json'];
|
|
3446
|
+
var returnType = _EmailAction["default"];
|
|
3447
|
+
return this.apiClient.callApi('/templates/{template_id}/email_actions/{email_action_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
/**
|
|
3451
|
+
* Update an email action
|
|
3452
|
+
* Changes an email action's settings. Properties left out keep their values. Set `enabled` to false to stop its emails, or to true to turn it back on after DocSpring turned it off.
|
|
3453
|
+
* @param {String} template_id The template's ID.
|
|
3454
|
+
* @param {String} email_action_id The email action's ID.
|
|
3455
|
+
* @param {module:model/UpdateEmailActionRequest} body The settings to change. Properties left out keep their values.
|
|
3456
|
+
* @param {Object} opts Optional parameters
|
|
3457
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3458
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
3459
|
+
*/
|
|
3460
|
+
}, {
|
|
3461
|
+
key: "updateEmailAction",
|
|
3462
|
+
value: function updateEmailAction(template_id, email_action_id, body, opts) {
|
|
3463
|
+
return this.updateEmailActionWithHttpInfo(template_id, email_action_id, body, opts).then(function (response_and_data) {
|
|
3464
|
+
return response_and_data.data;
|
|
3465
|
+
});
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
/**
|
|
3469
|
+
* Customize an account email action for a template
|
|
3470
|
+
* Changes one of your account's email actions for this template only, replacing any changes the template had. Each setting you send is changed for this template, and the ones you leave out follow the account email action, including later changes to it. Set `enabled` to false to stop it sending for this template.
|
|
3471
|
+
* @param {String} template_id The template's ID.
|
|
3472
|
+
* @param {String} email_action_id The ID of one of your account's email actions that sends for the template.
|
|
3473
|
+
* @param {module:model/UpdateEmailActionCustomizationRequest} body The template's changes to the account email action, replacing any it had. Each setting you send is changed for this template, and the ones you leave out follow the account email action. `enabled: false` stops it sending for this template; left out, it sends.
|
|
3474
|
+
* @param {Object} opts Optional parameters
|
|
3475
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3476
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailAction} and HTTP response
|
|
3477
|
+
*/
|
|
3478
|
+
}, {
|
|
3479
|
+
key: "updateEmailActionCustomizationWithHttpInfo",
|
|
3480
|
+
value: function updateEmailActionCustomizationWithHttpInfo(template_id, email_action_id, body, opts) {
|
|
3481
|
+
opts = opts || {};
|
|
3482
|
+
var postBody = body;
|
|
3483
|
+
// verify the required parameter 'template_id' is set
|
|
3484
|
+
if (template_id === undefined || template_id === null) {
|
|
3485
|
+
throw new Error("Missing the required parameter 'template_id' when calling updateEmailActionCustomization");
|
|
3486
|
+
}
|
|
3487
|
+
// verify the required parameter 'email_action_id' is set
|
|
3488
|
+
if (email_action_id === undefined || email_action_id === null) {
|
|
3489
|
+
throw new Error("Missing the required parameter 'email_action_id' when calling updateEmailActionCustomization");
|
|
3490
|
+
}
|
|
3491
|
+
// verify the required parameter 'body' is set
|
|
3492
|
+
if (body === undefined || body === null) {
|
|
3493
|
+
throw new Error("Missing the required parameter 'body' when calling updateEmailActionCustomization");
|
|
3494
|
+
}
|
|
3495
|
+
var pathParams = {
|
|
3496
|
+
'template_id': template_id,
|
|
3497
|
+
'email_action_id': email_action_id
|
|
3498
|
+
};
|
|
3499
|
+
var queryParams = {};
|
|
3500
|
+
var headerParams = {
|
|
3501
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3502
|
+
};
|
|
3503
|
+
var formParams = {};
|
|
3504
|
+
var authNames = ['api_token_basic'];
|
|
3505
|
+
var contentTypes = ['application/json'];
|
|
3506
|
+
var accepts = ['application/json'];
|
|
3507
|
+
var returnType = _EmailAction["default"];
|
|
3508
|
+
return this.apiClient.callApi('/templates/{template_id}/email_actions/{email_action_id}/customization', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3511
|
+
/**
|
|
3512
|
+
* Customize an account email action for a template
|
|
3513
|
+
* Changes one of your account's email actions for this template only, replacing any changes the template had. Each setting you send is changed for this template, and the ones you leave out follow the account email action, including later changes to it. Set `enabled` to false to stop it sending for this template.
|
|
3514
|
+
* @param {String} template_id The template's ID.
|
|
3515
|
+
* @param {String} email_action_id The ID of one of your account's email actions that sends for the template.
|
|
3516
|
+
* @param {module:model/UpdateEmailActionCustomizationRequest} body The template's changes to the account email action, replacing any it had. Each setting you send is changed for this template, and the ones you leave out follow the account email action. `enabled: false` stops it sending for this template; left out, it sends.
|
|
3517
|
+
* @param {Object} opts Optional parameters
|
|
3518
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
3519
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailAction}
|
|
3520
|
+
*/
|
|
3521
|
+
}, {
|
|
3522
|
+
key: "updateEmailActionCustomization",
|
|
3523
|
+
value: function updateEmailActionCustomization(template_id, email_action_id, body, opts) {
|
|
3524
|
+
return this.updateEmailActionCustomizationWithHttpInfo(template_id, email_action_id, body, opts).then(function (response_and_data) {
|
|
3525
|
+
return response_and_data.data;
|
|
3526
|
+
});
|
|
3527
|
+
}
|
|
3528
|
+
|
|
2467
3529
|
/**
|
|
2468
3530
|
* Update a signature request
|
|
2469
3531
|
* 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.
|
|
2470
3532
|
* @param {String} signature_request_id The signature request's ID.
|
|
2471
3533
|
* @param {module:model/UpdateSignatureRequestRequest} body The settings to change. Properties left out keep their values.
|
|
3534
|
+
* @param {Object} opts Optional parameters
|
|
3535
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2472
3536
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequest} and HTTP response
|
|
2473
3537
|
*/
|
|
2474
3538
|
}, {
|
|
2475
3539
|
key: "updateSignatureRequestWithHttpInfo",
|
|
2476
|
-
value: function updateSignatureRequestWithHttpInfo(signature_request_id, body) {
|
|
3540
|
+
value: function updateSignatureRequestWithHttpInfo(signature_request_id, body, opts) {
|
|
3541
|
+
opts = opts || {};
|
|
2477
3542
|
var postBody = body;
|
|
2478
3543
|
// verify the required parameter 'signature_request_id' is set
|
|
2479
3544
|
if (signature_request_id === undefined || signature_request_id === null) {
|
|
@@ -2487,7 +3552,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2487
3552
|
'signature_request_id': signature_request_id
|
|
2488
3553
|
};
|
|
2489
3554
|
var queryParams = {};
|
|
2490
|
-
var headerParams = {
|
|
3555
|
+
var headerParams = {
|
|
3556
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3557
|
+
};
|
|
2491
3558
|
var formParams = {};
|
|
2492
3559
|
var authNames = ['api_token_basic'];
|
|
2493
3560
|
var contentTypes = ['application/json'];
|
|
@@ -2501,26 +3568,31 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2501
3568
|
* 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.
|
|
2502
3569
|
* @param {String} signature_request_id The signature request's ID.
|
|
2503
3570
|
* @param {module:model/UpdateSignatureRequestRequest} body The settings to change. Properties left out keep their values.
|
|
3571
|
+
* @param {Object} opts Optional parameters
|
|
3572
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2504
3573
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequest}
|
|
2505
3574
|
*/
|
|
2506
3575
|
}, {
|
|
2507
3576
|
key: "updateSignatureRequest",
|
|
2508
|
-
value: function updateSignatureRequest(signature_request_id, body) {
|
|
2509
|
-
return this.updateSignatureRequestWithHttpInfo(signature_request_id, body).then(function (response_and_data) {
|
|
3577
|
+
value: function updateSignatureRequest(signature_request_id, body, opts) {
|
|
3578
|
+
return this.updateSignatureRequestWithHttpInfo(signature_request_id, body, opts).then(function (response_and_data) {
|
|
2510
3579
|
return response_and_data.data;
|
|
2511
3580
|
});
|
|
2512
3581
|
}
|
|
2513
3582
|
|
|
2514
3583
|
/**
|
|
2515
3584
|
* Update a template
|
|
2516
|
-
* Changes a template's draft. Properties left out keep their values. `defaults` and `
|
|
3585
|
+
* Changes a template's draft. Properties left out keep their values. `defaults`, `html_engine_options` and a page design's `layout` replace the whole object, and `field_groups` changes only the groups it lists. A new layout adds a field for each new value it reads. Settings such as `webhook_url`, `public_submissions` and `expire_after` apply to every published version too, and setting `parent_folder_id` moves the template and all of its published versions.
|
|
2517
3586
|
* @param {String} template_id The template's ID.
|
|
2518
3587
|
* @param {module:model/UpdateTemplateRequest} body The settings to change. Properties left out keep their values.
|
|
3588
|
+
* @param {Object} opts Optional parameters
|
|
3589
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2519
3590
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2520
3591
|
*/
|
|
2521
3592
|
}, {
|
|
2522
3593
|
key: "updateTemplateWithHttpInfo",
|
|
2523
|
-
value: function updateTemplateWithHttpInfo(template_id, body) {
|
|
3594
|
+
value: function updateTemplateWithHttpInfo(template_id, body, opts) {
|
|
3595
|
+
opts = opts || {};
|
|
2524
3596
|
var postBody = body;
|
|
2525
3597
|
// verify the required parameter 'template_id' is set
|
|
2526
3598
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2534,7 +3606,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2534
3606
|
'template_id': template_id
|
|
2535
3607
|
};
|
|
2536
3608
|
var queryParams = {};
|
|
2537
|
-
var headerParams = {
|
|
3609
|
+
var headerParams = {
|
|
3610
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3611
|
+
};
|
|
2538
3612
|
var formParams = {};
|
|
2539
3613
|
var authNames = ['api_token_basic'];
|
|
2540
3614
|
var contentTypes = ['application/json'];
|
|
@@ -2545,15 +3619,17 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2545
3619
|
|
|
2546
3620
|
/**
|
|
2547
3621
|
* Update a template
|
|
2548
|
-
* Changes a template's draft. Properties left out keep their values. `defaults` and `
|
|
3622
|
+
* Changes a template's draft. Properties left out keep their values. `defaults`, `html_engine_options` and a page design's `layout` replace the whole object, and `field_groups` changes only the groups it lists. A new layout adds a field for each new value it reads. Settings such as `webhook_url`, `public_submissions` and `expire_after` apply to every published version too, and setting `parent_folder_id` moves the template and all of its published versions.
|
|
2549
3623
|
* @param {String} template_id The template's ID.
|
|
2550
3624
|
* @param {module:model/UpdateTemplateRequest} body The settings to change. Properties left out keep their values.
|
|
3625
|
+
* @param {Object} opts Optional parameters
|
|
3626
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2551
3627
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2552
3628
|
*/
|
|
2553
3629
|
}, {
|
|
2554
3630
|
key: "updateTemplate",
|
|
2555
|
-
value: function updateTemplate(template_id, body) {
|
|
2556
|
-
return this.updateTemplateWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
3631
|
+
value: function updateTemplate(template_id, body, opts) {
|
|
3632
|
+
return this.updateTemplateWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2557
3633
|
return response_and_data.data;
|
|
2558
3634
|
});
|
|
2559
3635
|
}
|
|
@@ -2565,6 +3641,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2565
3641
|
* @param {module:model/UpdateTemplateDocumentRequest} body The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
|
|
2566
3642
|
* @param {Object} opts Optional parameters
|
|
2567
3643
|
* @param {Boolean} [wait] Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
3644
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2568
3645
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2569
3646
|
*/
|
|
2570
3647
|
}, {
|
|
@@ -2586,7 +3663,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2586
3663
|
var queryParams = {
|
|
2587
3664
|
'wait': opts['wait']
|
|
2588
3665
|
};
|
|
2589
|
-
var headerParams = {
|
|
3666
|
+
var headerParams = {
|
|
3667
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3668
|
+
};
|
|
2590
3669
|
var formParams = {};
|
|
2591
3670
|
var authNames = ['api_token_basic'];
|
|
2592
3671
|
var contentTypes = ['application/json'];
|
|
@@ -2602,6 +3681,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2602
3681
|
* @param {module:model/UpdateTemplateDocumentRequest} body The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
|
|
2603
3682
|
* @param {Object} opts Optional parameters
|
|
2604
3683
|
* @param {Boolean} opts.wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
3684
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2605
3685
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2606
3686
|
*/
|
|
2607
3687
|
}, {
|
|
@@ -2617,11 +3697,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2617
3697
|
* Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
|
|
2618
3698
|
* @param {String} template_id The template's ID.
|
|
2619
3699
|
* @param {module:model/UpdateTemplateFieldsRequest} body The fields to change in the template's draft.
|
|
3700
|
+
* @param {Object} opts Optional parameters
|
|
3701
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2620
3702
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
2621
3703
|
*/
|
|
2622
3704
|
}, {
|
|
2623
3705
|
key: "updateTemplateFieldsWithHttpInfo",
|
|
2624
|
-
value: function updateTemplateFieldsWithHttpInfo(template_id, body) {
|
|
3706
|
+
value: function updateTemplateFieldsWithHttpInfo(template_id, body, opts) {
|
|
3707
|
+
opts = opts || {};
|
|
2625
3708
|
var postBody = body;
|
|
2626
3709
|
// verify the required parameter 'template_id' is set
|
|
2627
3710
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2635,7 +3718,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2635
3718
|
'template_id': template_id
|
|
2636
3719
|
};
|
|
2637
3720
|
var queryParams = {};
|
|
2638
|
-
var headerParams = {
|
|
3721
|
+
var headerParams = {
|
|
3722
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3723
|
+
};
|
|
2639
3724
|
var formParams = {};
|
|
2640
3725
|
var authNames = ['api_token_basic'];
|
|
2641
3726
|
var contentTypes = ['application/json'];
|
|
@@ -2649,12 +3734,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2649
3734
|
* Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
|
|
2650
3735
|
* @param {String} template_id The template's ID.
|
|
2651
3736
|
* @param {module:model/UpdateTemplateFieldsRequest} body The fields to change in the template's draft.
|
|
3737
|
+
* @param {Object} opts Optional parameters
|
|
3738
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2652
3739
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
2653
3740
|
*/
|
|
2654
3741
|
}, {
|
|
2655
3742
|
key: "updateTemplateFields",
|
|
2656
|
-
value: function updateTemplateFields(template_id, body) {
|
|
2657
|
-
return this.updateTemplateFieldsWithHttpInfo(template_id, body).then(function (response_and_data) {
|
|
3743
|
+
value: function updateTemplateFields(template_id, body, opts) {
|
|
3744
|
+
return this.updateTemplateFieldsWithHttpInfo(template_id, body, opts).then(function (response_and_data) {
|
|
2658
3745
|
return response_and_data.data;
|
|
2659
3746
|
});
|
|
2660
3747
|
}
|
|
@@ -2664,11 +3751,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2664
3751
|
* Updates a webhook. Only the properties you send change.
|
|
2665
3752
|
* @param {String} webhook_id The webhook's ID.
|
|
2666
3753
|
* @param {module:model/UpdateWebhookRequest} body The settings to change. Properties left out keep their values.
|
|
3754
|
+
* @param {Object} opts Optional parameters
|
|
3755
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2667
3756
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
2668
3757
|
*/
|
|
2669
3758
|
}, {
|
|
2670
3759
|
key: "updateWebhookWithHttpInfo",
|
|
2671
|
-
value: function updateWebhookWithHttpInfo(webhook_id, body) {
|
|
3760
|
+
value: function updateWebhookWithHttpInfo(webhook_id, body, opts) {
|
|
3761
|
+
opts = opts || {};
|
|
2672
3762
|
var postBody = body;
|
|
2673
3763
|
// verify the required parameter 'webhook_id' is set
|
|
2674
3764
|
if (webhook_id === undefined || webhook_id === null) {
|
|
@@ -2682,7 +3772,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2682
3772
|
'webhook_id': webhook_id
|
|
2683
3773
|
};
|
|
2684
3774
|
var queryParams = {};
|
|
2685
|
-
var headerParams = {
|
|
3775
|
+
var headerParams = {
|
|
3776
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3777
|
+
};
|
|
2686
3778
|
var formParams = {};
|
|
2687
3779
|
var authNames = ['api_token_basic'];
|
|
2688
3780
|
var contentTypes = ['application/json'];
|
|
@@ -2696,12 +3788,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2696
3788
|
* Updates a webhook. Only the properties you send change.
|
|
2697
3789
|
* @param {String} webhook_id The webhook's ID.
|
|
2698
3790
|
* @param {module:model/UpdateWebhookRequest} body The settings to change. Properties left out keep their values.
|
|
3791
|
+
* @param {Object} opts Optional parameters
|
|
3792
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2699
3793
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
2700
3794
|
*/
|
|
2701
3795
|
}, {
|
|
2702
3796
|
key: "updateWebhook",
|
|
2703
|
-
value: function updateWebhook(webhook_id, body) {
|
|
2704
|
-
return this.updateWebhookWithHttpInfo(webhook_id, body).then(function (response_and_data) {
|
|
3797
|
+
value: function updateWebhook(webhook_id, body, opts) {
|
|
3798
|
+
return this.updateWebhookWithHttpInfo(webhook_id, body, opts).then(function (response_and_data) {
|
|
2705
3799
|
return response_and_data.data;
|
|
2706
3800
|
});
|
|
2707
3801
|
}
|
|
@@ -2721,6 +3815,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2721
3815
|
* @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`.
|
|
2722
3816
|
* @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.
|
|
2723
3817
|
* @param {module:model/OutputFormat} [output_format] What each submission of a Word template makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. Required when `document` is a Word document.
|
|
3818
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2724
3819
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2725
3820
|
*/
|
|
2726
3821
|
}, {
|
|
@@ -2736,7 +3831,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2736
3831
|
var queryParams = {
|
|
2737
3832
|
'wait': opts['wait']
|
|
2738
3833
|
};
|
|
2739
|
-
var headerParams = {
|
|
3834
|
+
var headerParams = {
|
|
3835
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3836
|
+
};
|
|
2740
3837
|
var formParams = {
|
|
2741
3838
|
'document': document,
|
|
2742
3839
|
'name': opts['name'],
|
|
@@ -2771,6 +3868,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2771
3868
|
* @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`.
|
|
2772
3869
|
* @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.
|
|
2773
3870
|
* @param {module:model/OutputFormat} opts.output_format What each submission of a Word template makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. Required when `document` is a Word document.
|
|
3871
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2774
3872
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2775
3873
|
*/
|
|
2776
3874
|
}, {
|
|
@@ -2789,6 +3887,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2789
3887
|
* @param {Object} opts Optional parameters
|
|
2790
3888
|
* @param {Boolean} [wait] Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
2791
3889
|
* @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. Only for PDF templates: a Word template adds a field for each new tag.
|
|
3890
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2792
3891
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2793
3892
|
*/
|
|
2794
3893
|
}, {
|
|
@@ -2810,7 +3909,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2810
3909
|
var queryParams = {
|
|
2811
3910
|
'wait': opts['wait']
|
|
2812
3911
|
};
|
|
2813
|
-
var headerParams = {
|
|
3912
|
+
var headerParams = {
|
|
3913
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3914
|
+
};
|
|
2814
3915
|
var formParams = {
|
|
2815
3916
|
'document': document,
|
|
2816
3917
|
'reimport_fields': opts['reimport_fields']
|
|
@@ -2830,6 +3931,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2830
3931
|
* @param {Object} opts Optional parameters
|
|
2831
3932
|
* @param {Boolean} opts.wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
2832
3933
|
* @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. Only for PDF templates: a Word template adds a field for each new tag.
|
|
3934
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2833
3935
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2834
3936
|
*/
|
|
2835
3937
|
}, {
|
|
@@ -2846,7 +3948,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2846
3948
|
* @param {String} template_id The template's ID.
|
|
2847
3949
|
* @param {module:model/ValidateSubmissionRequest} body The submission's data and settings.
|
|
2848
3950
|
* @param {Object} opts Optional parameters
|
|
2849
|
-
* @param {String} [version] The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
3951
|
+
* @param {String} [version] The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
|
|
3952
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2850
3953
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionValidation} and HTTP response
|
|
2851
3954
|
*/
|
|
2852
3955
|
}, {
|
|
@@ -2868,7 +3971,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2868
3971
|
var queryParams = {
|
|
2869
3972
|
'version': opts['version']
|
|
2870
3973
|
};
|
|
2871
|
-
var headerParams = {
|
|
3974
|
+
var headerParams = {
|
|
3975
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3976
|
+
};
|
|
2872
3977
|
var formParams = {};
|
|
2873
3978
|
var authNames = ['api_token_basic'];
|
|
2874
3979
|
var contentTypes = ['application/json'];
|
|
@@ -2883,7 +3988,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2883
3988
|
* @param {String} template_id The template's ID.
|
|
2884
3989
|
* @param {module:model/ValidateSubmissionRequest} body The submission's data and settings.
|
|
2885
3990
|
* @param {Object} opts Optional parameters
|
|
2886
|
-
* @param {String} opts.version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
3991
|
+
* @param {String} opts.version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
|
|
3992
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
2887
3993
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionValidation}
|
|
2888
3994
|
*/
|
|
2889
3995
|
}, {
|
|
@@ -2893,5 +3999,53 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2893
3999
|
return response_and_data.data;
|
|
2894
4000
|
});
|
|
2895
4001
|
}
|
|
4002
|
+
|
|
4003
|
+
/**
|
|
4004
|
+
* Verify an email domain
|
|
4005
|
+
* Checks the email domain's DNS records now, instead of waiting for the next check. If DocSpring has stopped looking for its DKIM records (3 days after they were created), it starts again with new ones: replace the CNAME records with them.
|
|
4006
|
+
* @param {String} email_domain_id The email domain's ID.
|
|
4007
|
+
* @param {Object} opts Optional parameters
|
|
4008
|
+
* @param {String} [idempotencyKey] A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
4009
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailDomain} and HTTP response
|
|
4010
|
+
*/
|
|
4011
|
+
}, {
|
|
4012
|
+
key: "verifyEmailDomainWithHttpInfo",
|
|
4013
|
+
value: function verifyEmailDomainWithHttpInfo(email_domain_id, opts) {
|
|
4014
|
+
opts = opts || {};
|
|
4015
|
+
var postBody = null;
|
|
4016
|
+
// verify the required parameter 'email_domain_id' is set
|
|
4017
|
+
if (email_domain_id === undefined || email_domain_id === null) {
|
|
4018
|
+
throw new Error("Missing the required parameter 'email_domain_id' when calling verifyEmailDomain");
|
|
4019
|
+
}
|
|
4020
|
+
var pathParams = {
|
|
4021
|
+
'email_domain_id': email_domain_id
|
|
4022
|
+
};
|
|
4023
|
+
var queryParams = {};
|
|
4024
|
+
var headerParams = {
|
|
4025
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
4026
|
+
};
|
|
4027
|
+
var formParams = {};
|
|
4028
|
+
var authNames = ['api_token_basic'];
|
|
4029
|
+
var contentTypes = [];
|
|
4030
|
+
var accepts = ['application/json'];
|
|
4031
|
+
var returnType = _EmailDomain["default"];
|
|
4032
|
+
return this.apiClient.callApi('/email_domains/{email_domain_id}/verify', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
4033
|
+
}
|
|
4034
|
+
|
|
4035
|
+
/**
|
|
4036
|
+
* Verify an email domain
|
|
4037
|
+
* Checks the email domain's DNS records now, instead of waiting for the next check. If DocSpring has stopped looking for its DKIM records (3 days after they were created), it starts again with new ones: replace the CNAME records with them.
|
|
4038
|
+
* @param {String} email_domain_id The email domain's ID.
|
|
4039
|
+
* @param {Object} opts Optional parameters
|
|
4040
|
+
* @param {String} opts.idempotencyKey A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
4041
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailDomain}
|
|
4042
|
+
*/
|
|
4043
|
+
}, {
|
|
4044
|
+
key: "verifyEmailDomain",
|
|
4045
|
+
value: function verifyEmailDomain(email_domain_id, opts) {
|
|
4046
|
+
return this.verifyEmailDomainWithHttpInfo(email_domain_id, opts).then(function (response_and_data) {
|
|
4047
|
+
return response_and_data.data;
|
|
4048
|
+
});
|
|
4049
|
+
}
|
|
2896
4050
|
}]);
|
|
2897
4051
|
}();
|