docspring 4.2.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/AGENTS.md +2 -2
- package/README.md +26 -6
- package/dist/ApiClient.js +3 -3
- package/dist/RequestSchemas.js +1171 -134
- package/dist/RequestValidator.js +4 -0
- package/dist/api/Client.js +1406 -248
- package/dist/index.js +196 -0
- package/dist/model/AddTemplateFieldsRequest.js +4 -4
- package/dist/model/AiFieldNamingLanguage.js +1 -1
- package/dist/model/AuthenticationCheck.js +2 -2
- package/dist/model/BarcodeSymbology.js +1 -1
- package/dist/model/CheckCharacter.js +1 -1
- package/dist/model/CombinedFieldType.js +1 -1
- package/dist/model/CombinedPdf.js +2 -2
- package/dist/model/CombinedPdfFiles.js +2 -2
- package/dist/model/CombinedPdfList.js +2 -2
- package/dist/model/CombinedPdfSource.js +3 -3
- package/dist/model/CombinedPdfSourceInput.js +3 -3
- package/dist/model/CombinedPdfSourcePdf.js +2 -2
- package/dist/model/CombinedPdfSourceType.js +1 -1
- package/dist/model/CombinedPdfState.js +1 -1
- package/dist/model/CopyTemplateRequest.js +2 -2
- package/dist/model/CreateAccountEmailActionRequest.js +306 -0
- package/dist/model/CreateCombinedPdfRequest.js +2 -2
- package/dist/model/CreateCustomFileFromUploadRequest.js +2 -2
- package/dist/model/CreateEmailActionRequest.js +280 -0
- package/dist/model/CreateEmailDomainRequest.js +114 -0
- package/dist/model/CreateFolderRequest.js +2 -2
- package/dist/model/CreateSignatureRequestEventRequest.js +2 -2
- package/dist/model/CreateSignatureRequestTokenRequest.js +2 -2
- package/dist/model/CreateSubmissionBatchRequest.js +5 -5
- package/dist/model/CreateSubmissionRequest.js +115 -7
- package/dist/model/CreateTemplatePreviewRequest.js +2 -2
- package/dist/model/CreateTemplateRequest.js +119 -14
- package/dist/model/CreateWebhookRequest.js +2 -2
- package/dist/model/CustomFile.js +2 -2
- package/dist/model/CustomFileList.js +2 -2
- package/dist/model/CustomFileSourcePdf.js +2 -2
- 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 +11 -1
- package/dist/model/ErrorDetail.js +2 -2
- package/dist/model/ErrorInfo.js +47 -8
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/ExpirationInterval.js +1 -1
- package/dist/model/Field.js +5 -5
- package/dist/model/FieldComparisonCondition.js +2 -2
- package/dist/model/FieldComparisonOperator.js +1 -1
- package/dist/model/FieldDependency.js +2 -2
- package/dist/model/FieldDependencyInput.js +2 -2
- package/dist/model/FieldDisplayType.js +1 -1
- package/dist/model/FieldEqualsCondition.js +2 -2
- package/dist/model/FieldEqualsOperator.js +1 -1
- package/dist/model/FieldGroup.js +6 -6
- package/dist/model/FieldGroupInput.js +3 -3
- package/dist/model/FieldGroupType.js +1 -1
- package/dist/model/FieldInCondition.js +2 -2
- package/dist/model/FieldInput.js +4 -4
- package/dist/model/FieldOverride.js +2 -2
- package/dist/model/FieldPresenceCondition.js +2 -2
- package/dist/model/FieldPresenceOperator.js +1 -1
- package/dist/model/FieldRangeCondition.js +2 -2
- package/dist/model/FieldReimportState.js +1 -1
- package/dist/model/FieldSetupLogic.js +1 -1
- package/dist/model/FieldSetupNaming.js +1 -1
- package/dist/model/FieldSetupSource.js +1 -1
- package/dist/model/FieldType.js +1 -1
- package/dist/model/Folder.js +2 -2
- package/dist/model/FolderList.js +2 -2
- package/dist/model/GenerateFilesFormat.js +16 -1
- package/dist/model/GenerateSubmissionFilesRequest.js +4 -4
- package/dist/model/GeneratedFile.js +7 -7
- package/dist/model/GeneratedFileState.js +1 -1
- package/dist/model/HtmlEngineOptions.js +4 -4
- package/dist/model/HtmlEngineOptionsInput.js +3 -3
- package/dist/model/ImageGravity.js +1 -1
- package/dist/model/ImageScaleType.js +1 -1
- package/dist/model/ModelCodeLanguage.js +7 -2
- package/dist/model/MoveFolderRequest.js +2 -2
- package/dist/model/MoveTemplateRequest.js +2 -2
- package/dist/model/NumberConditionType.js +1 -1
- package/dist/model/OutputFormat.js +11 -1
- package/dist/model/PageFormat.js +1 -1
- package/dist/model/PageImage.js +2 -2
- package/dist/model/PageImages.js +2 -2
- package/dist/model/PredefinedField.js +2 -2
- package/dist/model/PredefinedFieldInput.js +2 -2
- package/dist/model/PublishTemplateVersionRequest.js +2 -2
- package/dist/model/RemoveTemplateFieldsRequest.js +2 -2
- package/dist/model/RenameFolderRequest.js +2 -2
- package/dist/model/ReorderTemplateFieldsRequest.js +2 -2
- package/dist/model/RestoreTemplateVersionRequest.js +2 -2
- package/dist/model/SendAccountEmailActionTestEmailRequest.js +91 -0
- package/dist/model/ShapeType.js +1 -1
- package/dist/model/SignatureRequest.js +53 -8
- package/dist/model/SignatureRequestAuthSecondFactorType.js +1 -1
- package/dist/model/SignatureRequestAuthType.js +1 -1
- package/dist/model/SignatureRequestEmailAttachments.js +59 -0
- package/dist/model/SignatureRequestEmailStatus.js +89 -0
- package/dist/model/SignatureRequestEvent.js +2 -2
- package/dist/model/SignatureRequestEventType.js +12 -2
- package/dist/model/SignatureRequestInput.js +25 -9
- package/dist/model/SignatureRequestMessageType.js +1 -1
- package/dist/model/SignatureRequestReminders.js +121 -0
- package/dist/model/SignatureRequestState.js +1 -1
- package/dist/model/SignatureRequestToken.js +2 -2
- package/dist/model/SignatureRequestTokenType.js +1 -1
- package/dist/model/SigningOrder.js +59 -0
- package/dist/model/StringConditionType.js +37 -2
- package/dist/model/Submission.js +31 -19
- package/dist/model/SubmissionAction.js +28 -13
- package/dist/model/SubmissionActionState.js +1 -1
- package/dist/model/SubmissionActionType.js +1 -1
- package/dist/model/SubmissionBatch.js +9 -9
- package/dist/model/SubmissionBatchState.js +1 -1
- package/dist/model/SubmissionFiles.js +20 -2
- package/dist/model/SubmissionInput.js +7 -7
- package/dist/model/SubmissionList.js +2 -2
- package/dist/model/SubmissionSource.js +1 -1
- package/dist/model/SubmissionSourcePdf.js +2 -2
- package/dist/model/SubmissionState.js +1 -1
- package/dist/model/SubmissionSummary.js +8 -8
- package/dist/model/SubmissionValidation.js +2 -2
- package/dist/model/Template.js +149 -26
- package/dist/model/TemplateActor.js +2 -2
- package/dist/model/TemplateActorType.js +1 -1
- package/dist/model/TemplateDefaults.js +2 -2
- package/dist/model/TemplateDefaultsInput.js +2 -2
- package/dist/model/TemplateDiff.js +6 -6
- package/dist/model/TemplateDiffSummary.js +2 -2
- package/dist/model/TemplateDocument.js +23 -23
- package/dist/model/TemplateDocumentState.js +12 -2
- package/dist/model/TemplateDocumentSummary.js +11 -11
- package/dist/model/TemplateFieldChange.js +2 -2
- package/dist/model/TemplateFieldChanges.js +2 -2
- package/dist/model/TemplateFieldDependency.js +2 -2
- package/dist/model/TemplateFieldDependencyAction.js +1 -1
- package/dist/model/TemplateFieldDependencyCondition.js +2 -2
- package/dist/model/TemplateFieldDependencyConditionInput.js +2 -2
- package/dist/model/TemplateFieldDependencyInput.js +2 -2
- package/dist/model/TemplateFieldDependencyMatch.js +1 -1
- package/dist/model/TemplateFieldDependencyOperator.js +1 -1
- package/dist/model/TemplateFieldLogicStatus.js +1 -1
- package/dist/model/TemplateFieldMove.js +2 -2
- package/dist/model/TemplateFields.js +2 -2
- package/dist/model/TemplateFormMode.js +1 -1
- package/dist/model/TemplateModelCode.js +2 -2
- package/dist/model/TemplatePageAiError.js +1 -1
- package/dist/model/TemplatePageAiNamingStatus.js +1 -1
- package/dist/model/TemplatePageFieldsStatus.js +1 -1
- package/dist/model/TemplatePageImageStatus.js +1 -1
- package/dist/model/TemplatePageImages.js +2 -2
- package/dist/model/TemplatePageProcessingStatus.js +2 -2
- package/dist/model/TemplatePreview.js +5 -5
- package/dist/model/TemplatePreviewState.js +1 -1
- package/dist/model/TemplateSourcePdf.js +3 -3
- package/dist/model/TemplateSummary.js +24 -12
- package/dist/model/TemplateSummaryList.js +2 -2
- package/dist/model/TemplateType.js +12 -2
- package/dist/model/TemplateVersion.js +2 -2
- package/dist/model/TemplateVersionType.js +1 -1
- package/dist/model/TextAlignment.js +1 -1
- package/dist/model/TextOverflow.js +1 -1
- package/dist/model/TextVerticalAlignment.js +1 -1
- package/dist/model/Typeface.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 +2 -2
- package/dist/model/UpdateTemplateDocumentRequest.js +8 -8
- package/dist/model/UpdateTemplateFieldsRequest.js +2 -2
- package/dist/model/UpdateTemplateRequest.js +113 -8
- package/dist/model/UpdateWebhookRequest.js +2 -2
- package/dist/model/UploadMethod.js +1 -1
- package/dist/model/UploadPresign.js +2 -2
- package/dist/model/UrlSourcePdf.js +2 -2
- package/dist/model/ValidateSubmissionRequest.js +115 -7
- package/dist/model/Webhook.js +2 -2
- package/dist/model/WebhookEventType.js +11 -1
- package/dist/model/WebhookList.js +2 -2
- package/dist/model/WebhookMode.js +1 -1
- package/package.json +2 -2
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"));
|
|
@@ -33,11 +41,13 @@ var _GenerateSubmissionFilesRequest = _interopRequireDefault(require("../model/G
|
|
|
33
41
|
var _ModelCodeLanguage = _interopRequireDefault(require("../model/ModelCodeLanguage"));
|
|
34
42
|
var _MoveFolderRequest = _interopRequireDefault(require("../model/MoveFolderRequest"));
|
|
35
43
|
var _MoveTemplateRequest = _interopRequireDefault(require("../model/MoveTemplateRequest"));
|
|
44
|
+
var _OutputFormat = _interopRequireDefault(require("../model/OutputFormat"));
|
|
36
45
|
var _PublishTemplateVersionRequest = _interopRequireDefault(require("../model/PublishTemplateVersionRequest"));
|
|
37
46
|
var _RemoveTemplateFieldsRequest = _interopRequireDefault(require("../model/RemoveTemplateFieldsRequest"));
|
|
38
47
|
var _RenameFolderRequest = _interopRequireDefault(require("../model/RenameFolderRequest"));
|
|
39
48
|
var _ReorderTemplateFieldsRequest = _interopRequireDefault(require("../model/ReorderTemplateFieldsRequest"));
|
|
40
49
|
var _RestoreTemplateVersionRequest = _interopRequireDefault(require("../model/RestoreTemplateVersionRequest"));
|
|
50
|
+
var _SendAccountEmailActionTestEmailRequest = _interopRequireDefault(require("../model/SendAccountEmailActionTestEmailRequest"));
|
|
41
51
|
var _SignatureRequest = _interopRequireDefault(require("../model/SignatureRequest"));
|
|
42
52
|
var _SignatureRequestEvent = _interopRequireDefault(require("../model/SignatureRequestEvent"));
|
|
43
53
|
var _SignatureRequestToken = _interopRequireDefault(require("../model/SignatureRequestToken"));
|
|
@@ -54,6 +64,9 @@ var _TemplatePageImages = _interopRequireDefault(require("../model/TemplatePageI
|
|
|
54
64
|
var _TemplatePreview = _interopRequireDefault(require("../model/TemplatePreview"));
|
|
55
65
|
var _TemplateSummaryList = _interopRequireDefault(require("../model/TemplateSummaryList"));
|
|
56
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"));
|
|
57
70
|
var _UpdateSignatureRequestRequest = _interopRequireDefault(require("../model/UpdateSignatureRequestRequest"));
|
|
58
71
|
var _UpdateTemplateDocumentRequest = _interopRequireDefault(require("../model/UpdateTemplateDocumentRequest"));
|
|
59
72
|
var _UpdateTemplateFieldsRequest = _interopRequireDefault(require("../model/UpdateTemplateFieldsRequest"));
|
|
@@ -73,7 +86,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
73
86
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
74
87
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
75
88
|
* DocSpring API
|
|
76
|
-
* Use DocSpring's API to
|
|
89
|
+
* Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
77
90
|
*
|
|
78
91
|
* The version of the OpenAPI document: v2
|
|
79
92
|
*
|
|
@@ -86,7 +99,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
86
99
|
/**
|
|
87
100
|
* Client service.
|
|
88
101
|
* @module api/Client
|
|
89
|
-
* @version 4.
|
|
102
|
+
* @version 4.4.0
|
|
90
103
|
*/
|
|
91
104
|
var Client = exports["default"] = /*#__PURE__*/function () {
|
|
92
105
|
/**
|
|
@@ -144,14 +157,17 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
144
157
|
|
|
145
158
|
/**
|
|
146
159
|
* Add fields to a template
|
|
147
|
-
* 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.
|
|
148
161
|
* @param {String} template_id The template's ID.
|
|
149
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.
|
|
150
165
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
151
166
|
*/
|
|
152
167
|
return _createClass(Client, [{
|
|
153
168
|
key: "addTemplateFieldsWithHttpInfo",
|
|
154
|
-
value: function addTemplateFieldsWithHttpInfo(template_id, body) {
|
|
169
|
+
value: function addTemplateFieldsWithHttpInfo(template_id, body, opts) {
|
|
170
|
+
opts = opts || {};
|
|
155
171
|
var postBody = body;
|
|
156
172
|
// verify the required parameter 'template_id' is set
|
|
157
173
|
if (template_id === undefined || template_id === null) {
|
|
@@ -165,7 +181,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
165
181
|
'template_id': template_id
|
|
166
182
|
};
|
|
167
183
|
var queryParams = {};
|
|
168
|
-
var headerParams = {
|
|
184
|
+
var headerParams = {
|
|
185
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
186
|
+
};
|
|
169
187
|
var formParams = {};
|
|
170
188
|
var authNames = ['api_token_basic'];
|
|
171
189
|
var contentTypes = ['application/json'];
|
|
@@ -176,15 +194,17 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
176
194
|
|
|
177
195
|
/**
|
|
178
196
|
* Add fields to a template
|
|
179
|
-
* 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.
|
|
180
198
|
* @param {String} template_id The template's ID.
|
|
181
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.
|
|
182
202
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
183
203
|
*/
|
|
184
204
|
}, {
|
|
185
205
|
key: "addTemplateFields",
|
|
186
|
-
value: function addTemplateFields(template_id, body) {
|
|
187
|
-
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) {
|
|
188
208
|
return response_and_data.data;
|
|
189
209
|
});
|
|
190
210
|
}
|
|
@@ -195,6 +215,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
195
215
|
* @param {String} template_id The template's ID.
|
|
196
216
|
* @param {Object} opts Optional parameters
|
|
197
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.
|
|
198
219
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
199
220
|
*/
|
|
200
221
|
}, {
|
|
@@ -210,7 +231,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
210
231
|
'template_id': template_id
|
|
211
232
|
};
|
|
212
233
|
var queryParams = {};
|
|
213
|
-
var headerParams = {
|
|
234
|
+
var headerParams = {
|
|
235
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
236
|
+
};
|
|
214
237
|
var formParams = {};
|
|
215
238
|
var authNames = ['api_token_basic'];
|
|
216
239
|
var contentTypes = ['application/json'];
|
|
@@ -225,6 +248,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
225
248
|
* @param {String} template_id The template's ID.
|
|
226
249
|
* @param {Object} opts Optional parameters
|
|
227
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.
|
|
228
252
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
229
253
|
*/
|
|
230
254
|
}, {
|
|
@@ -235,13 +259,59 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
235
259
|
});
|
|
236
260
|
}
|
|
237
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
|
+
|
|
238
308
|
/**
|
|
239
309
|
* Combine PDFs
|
|
240
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.
|
|
241
311
|
* @param {module:model/CreateCombinedPdfRequest} body The PDFs to merge, and the combined PDF's settings.
|
|
242
312
|
* @param {Object} opts Optional parameters
|
|
243
313
|
* @param {Boolean} [wait] Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
244
|
-
* @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.
|
|
245
315
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CombinedPdf} and HTTP response
|
|
246
316
|
*/
|
|
247
317
|
}, {
|
|
@@ -274,7 +344,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
274
344
|
* @param {module:model/CreateCombinedPdfRequest} body The PDFs to merge, and the combined PDF's settings.
|
|
275
345
|
* @param {Object} opts Optional parameters
|
|
276
346
|
* @param {Boolean} opts.wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
277
|
-
* @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.
|
|
278
348
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
279
349
|
*/
|
|
280
350
|
}, {
|
|
@@ -289,11 +359,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
289
359
|
* Create a custom file from an upload
|
|
290
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`.
|
|
291
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.
|
|
292
364
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
293
365
|
*/
|
|
294
366
|
}, {
|
|
295
367
|
key: "createCustomFileFromUploadWithHttpInfo",
|
|
296
|
-
value: function createCustomFileFromUploadWithHttpInfo(body) {
|
|
368
|
+
value: function createCustomFileFromUploadWithHttpInfo(body, opts) {
|
|
369
|
+
opts = opts || {};
|
|
297
370
|
var postBody = body;
|
|
298
371
|
// verify the required parameter 'body' is set
|
|
299
372
|
if (body === undefined || body === null) {
|
|
@@ -301,7 +374,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
301
374
|
}
|
|
302
375
|
var pathParams = {};
|
|
303
376
|
var queryParams = {};
|
|
304
|
-
var headerParams = {
|
|
377
|
+
var headerParams = {
|
|
378
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
379
|
+
};
|
|
305
380
|
var formParams = {};
|
|
306
381
|
var authNames = ['api_token_basic'];
|
|
307
382
|
var contentTypes = ['application/json'];
|
|
@@ -314,12 +389,114 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
314
389
|
* Create a custom file from an upload
|
|
315
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`.
|
|
316
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.
|
|
317
394
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
318
395
|
*/
|
|
319
396
|
}, {
|
|
320
397
|
key: "createCustomFileFromUpload",
|
|
321
|
-
value: function createCustomFileFromUpload(body) {
|
|
322
|
-
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) {
|
|
323
500
|
return response_and_data.data;
|
|
324
501
|
});
|
|
325
502
|
}
|
|
@@ -328,11 +505,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
328
505
|
* Create a folder
|
|
329
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.
|
|
330
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.
|
|
331
510
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
332
511
|
*/
|
|
333
512
|
}, {
|
|
334
513
|
key: "createFolderWithHttpInfo",
|
|
335
|
-
value: function createFolderWithHttpInfo(body) {
|
|
514
|
+
value: function createFolderWithHttpInfo(body, opts) {
|
|
515
|
+
opts = opts || {};
|
|
336
516
|
var postBody = body;
|
|
337
517
|
// verify the required parameter 'body' is set
|
|
338
518
|
if (body === undefined || body === null) {
|
|
@@ -340,7 +520,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
340
520
|
}
|
|
341
521
|
var pathParams = {};
|
|
342
522
|
var queryParams = {};
|
|
343
|
-
var headerParams = {
|
|
523
|
+
var headerParams = {
|
|
524
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
525
|
+
};
|
|
344
526
|
var formParams = {};
|
|
345
527
|
var authNames = ['api_token_basic'];
|
|
346
528
|
var contentTypes = ['application/json'];
|
|
@@ -353,12 +535,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
353
535
|
* Create a folder
|
|
354
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.
|
|
355
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.
|
|
356
540
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
357
541
|
*/
|
|
358
542
|
}, {
|
|
359
543
|
key: "createFolder",
|
|
360
|
-
value: function createFolder(body) {
|
|
361
|
-
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) {
|
|
362
546
|
return response_and_data.data;
|
|
363
547
|
});
|
|
364
548
|
}
|
|
@@ -368,11 +552,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
368
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.
|
|
369
553
|
* @param {String} signature_request_id The signature request's ID.
|
|
370
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.
|
|
371
557
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequestEvent} and HTTP response
|
|
372
558
|
*/
|
|
373
559
|
}, {
|
|
374
560
|
key: "createSignatureRequestEventWithHttpInfo",
|
|
375
|
-
value: function createSignatureRequestEventWithHttpInfo(signature_request_id, body) {
|
|
561
|
+
value: function createSignatureRequestEventWithHttpInfo(signature_request_id, body, opts) {
|
|
562
|
+
opts = opts || {};
|
|
376
563
|
var postBody = body;
|
|
377
564
|
// verify the required parameter 'signature_request_id' is set
|
|
378
565
|
if (signature_request_id === undefined || signature_request_id === null) {
|
|
@@ -386,7 +573,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
386
573
|
'signature_request_id': signature_request_id
|
|
387
574
|
};
|
|
388
575
|
var queryParams = {};
|
|
389
|
-
var headerParams = {
|
|
576
|
+
var headerParams = {
|
|
577
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
578
|
+
};
|
|
390
579
|
var formParams = {};
|
|
391
580
|
var authNames = ['api_token_basic'];
|
|
392
581
|
var contentTypes = ['application/json'];
|
|
@@ -400,12 +589,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
400
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.
|
|
401
590
|
* @param {String} signature_request_id The signature request's ID.
|
|
402
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.
|
|
403
594
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequestEvent}
|
|
404
595
|
*/
|
|
405
596
|
}, {
|
|
406
597
|
key: "createSignatureRequestEvent",
|
|
407
|
-
value: function createSignatureRequestEvent(signature_request_id, body) {
|
|
408
|
-
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) {
|
|
409
600
|
return response_and_data.data;
|
|
410
601
|
});
|
|
411
602
|
}
|
|
@@ -416,6 +607,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
416
607
|
* @param {String} signature_request_id The signature request's ID.
|
|
417
608
|
* @param {Object} opts Optional parameters
|
|
418
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.
|
|
419
611
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequestToken} and HTTP response
|
|
420
612
|
*/
|
|
421
613
|
}, {
|
|
@@ -431,7 +623,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
431
623
|
'signature_request_id': signature_request_id
|
|
432
624
|
};
|
|
433
625
|
var queryParams = {};
|
|
434
|
-
var headerParams = {
|
|
626
|
+
var headerParams = {
|
|
627
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
628
|
+
};
|
|
435
629
|
var formParams = {};
|
|
436
630
|
var authNames = ['api_token_basic'];
|
|
437
631
|
var contentTypes = ['application/json'];
|
|
@@ -446,6 +640,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
446
640
|
* @param {String} signature_request_id The signature request's ID.
|
|
447
641
|
* @param {Object} opts Optional parameters
|
|
448
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.
|
|
449
644
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequestToken}
|
|
450
645
|
*/
|
|
451
646
|
}, {
|
|
@@ -458,13 +653,13 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
458
653
|
|
|
459
654
|
/**
|
|
460
655
|
* Generate a PDF
|
|
461
|
-
* 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.
|
|
462
657
|
* @param {String} template_id The template's ID.
|
|
463
658
|
* @param {module:model/CreateSubmissionRequest} body The submission's data and settings.
|
|
464
659
|
* @param {Object} opts Optional parameters
|
|
465
|
-
* @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`.
|
|
466
661
|
* @param {Boolean} [wait] Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
467
|
-
* @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.
|
|
468
663
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
469
664
|
*/
|
|
470
665
|
}, {
|
|
@@ -500,13 +695,13 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
500
695
|
|
|
501
696
|
/**
|
|
502
697
|
* Generate a PDF
|
|
503
|
-
* 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.
|
|
504
699
|
* @param {String} template_id The template's ID.
|
|
505
700
|
* @param {module:model/CreateSubmissionRequest} body The submission's data and settings.
|
|
506
701
|
* @param {Object} opts Optional parameters
|
|
507
|
-
* @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`.
|
|
508
703
|
* @param {Boolean} opts.wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
509
|
-
* @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.
|
|
510
705
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
511
706
|
*/
|
|
512
707
|
}, {
|
|
@@ -522,8 +717,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
522
717
|
* Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
|
|
523
718
|
* @param {module:model/CreateSubmissionBatchRequest} body The submissions to create, and the settings they share.
|
|
524
719
|
* @param {Object} opts Optional parameters
|
|
525
|
-
* @param {Boolean} [wait] Wait until every
|
|
526
|
-
* @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
|
|
720
|
+
* @param {Boolean} [wait] Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
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.
|
|
527
722
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionBatch} and HTTP response
|
|
528
723
|
*/
|
|
529
724
|
}, {
|
|
@@ -555,8 +750,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
555
750
|
* Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
|
|
556
751
|
* @param {module:model/CreateSubmissionBatchRequest} body The submissions to create, and the settings they share.
|
|
557
752
|
* @param {Object} opts Optional parameters
|
|
558
|
-
* @param {Boolean} opts.wait Wait until every
|
|
559
|
-
* @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
|
|
753
|
+
* @param {Boolean} opts.wait Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
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.
|
|
560
755
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionBatch}
|
|
561
756
|
*/
|
|
562
757
|
}, {
|
|
@@ -569,10 +764,11 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
569
764
|
|
|
570
765
|
/**
|
|
571
766
|
* Create a template
|
|
572
|
-
* Creates an HTML template, or a PDF template from a
|
|
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`.
|
|
573
768
|
* @param {module:model/CreateTemplateRequest} body The template to create.
|
|
574
769
|
* @param {Object} opts Optional parameters
|
|
575
|
-
* @param {Boolean} [wait] Wait until the PDF has been processed,
|
|
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.
|
|
576
772
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
577
773
|
*/
|
|
578
774
|
}, {
|
|
@@ -588,7 +784,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
588
784
|
var queryParams = {
|
|
589
785
|
'wait': opts['wait']
|
|
590
786
|
};
|
|
591
|
-
var headerParams = {
|
|
787
|
+
var headerParams = {
|
|
788
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
789
|
+
};
|
|
592
790
|
var formParams = {};
|
|
593
791
|
var authNames = ['api_token_basic'];
|
|
594
792
|
var contentTypes = ['application/json'];
|
|
@@ -599,10 +797,11 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
599
797
|
|
|
600
798
|
/**
|
|
601
799
|
* Create a template
|
|
602
|
-
* Creates an HTML template, or a PDF template from a
|
|
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`.
|
|
603
801
|
* @param {module:model/CreateTemplateRequest} body The template to create.
|
|
604
802
|
* @param {Object} opts Optional parameters
|
|
605
|
-
* @param {Boolean} opts.wait Wait until the PDF has been processed,
|
|
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.
|
|
606
805
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
607
806
|
*/
|
|
608
807
|
}, {
|
|
@@ -615,11 +814,12 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
615
814
|
|
|
616
815
|
/**
|
|
617
816
|
* Preview a template with data
|
|
618
|
-
* 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 or
|
|
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`.
|
|
619
818
|
* @param {String} template_id The template's ID.
|
|
620
819
|
* @param {module:model/CreateTemplatePreviewRequest} body The data to render the template with.
|
|
621
820
|
* @param {Object} opts Optional parameters
|
|
622
|
-
* @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.
|
|
623
823
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplatePreview} and HTTP response
|
|
624
824
|
*/
|
|
625
825
|
}, {
|
|
@@ -641,7 +841,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
641
841
|
var queryParams = {
|
|
642
842
|
'version': opts['version']
|
|
643
843
|
};
|
|
644
|
-
var headerParams = {
|
|
844
|
+
var headerParams = {
|
|
845
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
846
|
+
};
|
|
645
847
|
var formParams = {};
|
|
646
848
|
var authNames = ['api_token_basic'];
|
|
647
849
|
var contentTypes = ['application/json'];
|
|
@@ -652,11 +854,12 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
652
854
|
|
|
653
855
|
/**
|
|
654
856
|
* Preview a template with data
|
|
655
|
-
* 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 or
|
|
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`.
|
|
656
858
|
* @param {String} template_id The template's ID.
|
|
657
859
|
* @param {module:model/CreateTemplatePreviewRequest} body The data to render the template with.
|
|
658
860
|
* @param {Object} opts Optional parameters
|
|
659
|
-
* @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.
|
|
660
863
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplatePreview}
|
|
661
864
|
*/
|
|
662
865
|
}, {
|
|
@@ -671,11 +874,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
671
874
|
* Create a webhook
|
|
672
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.
|
|
673
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.
|
|
674
879
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
675
880
|
*/
|
|
676
881
|
}, {
|
|
677
882
|
key: "createWebhookWithHttpInfo",
|
|
678
|
-
value: function createWebhookWithHttpInfo(body) {
|
|
883
|
+
value: function createWebhookWithHttpInfo(body, opts) {
|
|
884
|
+
opts = opts || {};
|
|
679
885
|
var postBody = body;
|
|
680
886
|
// verify the required parameter 'body' is set
|
|
681
887
|
if (body === undefined || body === null) {
|
|
@@ -683,7 +889,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
683
889
|
}
|
|
684
890
|
var pathParams = {};
|
|
685
891
|
var queryParams = {};
|
|
686
|
-
var headerParams = {
|
|
892
|
+
var headerParams = {
|
|
893
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
894
|
+
};
|
|
687
895
|
var formParams = {};
|
|
688
896
|
var authNames = ['api_token_basic'];
|
|
689
897
|
var contentTypes = ['application/json'];
|
|
@@ -696,12 +904,62 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
696
904
|
* Create a webhook
|
|
697
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.
|
|
698
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.
|
|
699
909
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
700
910
|
*/
|
|
701
911
|
}, {
|
|
702
912
|
key: "createWebhook",
|
|
703
|
-
value: function createWebhook(body) {
|
|
704
|
-
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) {
|
|
705
963
|
return response_and_data.data;
|
|
706
964
|
});
|
|
707
965
|
}
|
|
@@ -710,11 +968,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
710
968
|
* Delete a custom file
|
|
711
969
|
* Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
712
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.
|
|
713
973
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CustomFile} and HTTP response
|
|
714
974
|
*/
|
|
715
975
|
}, {
|
|
716
976
|
key: "deleteCustomFileWithHttpInfo",
|
|
717
|
-
value: function deleteCustomFileWithHttpInfo(custom_file_id) {
|
|
977
|
+
value: function deleteCustomFileWithHttpInfo(custom_file_id, opts) {
|
|
978
|
+
opts = opts || {};
|
|
718
979
|
var postBody = null;
|
|
719
980
|
// verify the required parameter 'custom_file_id' is set
|
|
720
981
|
if (custom_file_id === undefined || custom_file_id === null) {
|
|
@@ -724,7 +985,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
724
985
|
'custom_file_id': custom_file_id
|
|
725
986
|
};
|
|
726
987
|
var queryParams = {};
|
|
727
|
-
var headerParams = {
|
|
988
|
+
var headerParams = {
|
|
989
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
990
|
+
};
|
|
728
991
|
var formParams = {};
|
|
729
992
|
var authNames = ['api_token_basic'];
|
|
730
993
|
var contentTypes = [];
|
|
@@ -737,155 +1000,336 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
737
1000
|
* Delete a custom file
|
|
738
1001
|
* Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
739
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.
|
|
740
1005
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFile}
|
|
741
1006
|
*/
|
|
742
1007
|
}, {
|
|
743
1008
|
key: "deleteCustomFile",
|
|
744
|
-
value: function deleteCustomFile(custom_file_id) {
|
|
745
|
-
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) {
|
|
746
1011
|
return response_and_data.data;
|
|
747
1012
|
});
|
|
748
1013
|
}
|
|
749
1014
|
|
|
750
1015
|
/**
|
|
751
|
-
* Delete
|
|
752
|
-
* Deletes an
|
|
753
|
-
* @param {String}
|
|
754
|
-
* @
|
|
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
|
|
755
1023
|
*/
|
|
756
1024
|
}, {
|
|
757
|
-
key: "
|
|
758
|
-
value: function
|
|
1025
|
+
key: "deleteEmailActionWithHttpInfo",
|
|
1026
|
+
value: function deleteEmailActionWithHttpInfo(template_id, email_action_id, opts) {
|
|
1027
|
+
opts = opts || {};
|
|
759
1028
|
var postBody = null;
|
|
760
|
-
// verify the required parameter '
|
|
761
|
-
if (
|
|
762
|
-
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");
|
|
763
1036
|
}
|
|
764
1037
|
var pathParams = {
|
|
765
|
-
'
|
|
1038
|
+
'template_id': template_id,
|
|
1039
|
+
'email_action_id': email_action_id
|
|
766
1040
|
};
|
|
767
1041
|
var queryParams = {};
|
|
768
|
-
var headerParams = {
|
|
1042
|
+
var headerParams = {
|
|
1043
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1044
|
+
};
|
|
769
1045
|
var formParams = {};
|
|
770
1046
|
var authNames = ['api_token_basic'];
|
|
771
1047
|
var contentTypes = [];
|
|
772
1048
|
var accepts = ['application/json'];
|
|
773
|
-
var returnType =
|
|
774
|
-
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);
|
|
775
1051
|
}
|
|
776
1052
|
|
|
777
1053
|
/**
|
|
778
|
-
* Delete
|
|
779
|
-
* Deletes an
|
|
780
|
-
* @param {String}
|
|
781
|
-
* @
|
|
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}
|
|
782
1061
|
*/
|
|
783
1062
|
}, {
|
|
784
|
-
key: "
|
|
785
|
-
value: function
|
|
786
|
-
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) {
|
|
787
1066
|
return response_and_data.data;
|
|
788
1067
|
});
|
|
789
1068
|
}
|
|
790
1069
|
|
|
791
1070
|
/**
|
|
792
|
-
*
|
|
793
|
-
*
|
|
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.
|
|
794
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.
|
|
795
1075
|
* @param {Object} opts Optional parameters
|
|
796
|
-
* @param {String} [
|
|
797
|
-
* @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
|
|
798
1078
|
*/
|
|
799
1079
|
}, {
|
|
800
|
-
key: "
|
|
801
|
-
value: function
|
|
1080
|
+
key: "deleteEmailActionCustomizationWithHttpInfo",
|
|
1081
|
+
value: function deleteEmailActionCustomizationWithHttpInfo(template_id, email_action_id, opts) {
|
|
802
1082
|
opts = opts || {};
|
|
803
1083
|
var postBody = null;
|
|
804
1084
|
// verify the required parameter 'template_id' is set
|
|
805
1085
|
if (template_id === undefined || template_id === null) {
|
|
806
|
-
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");
|
|
807
1091
|
}
|
|
808
1092
|
var pathParams = {
|
|
809
|
-
'template_id': template_id
|
|
1093
|
+
'template_id': template_id,
|
|
1094
|
+
'email_action_id': email_action_id
|
|
810
1095
|
};
|
|
811
|
-
var queryParams = {
|
|
812
|
-
|
|
1096
|
+
var queryParams = {};
|
|
1097
|
+
var headerParams = {
|
|
1098
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
813
1099
|
};
|
|
814
|
-
var headerParams = {};
|
|
815
1100
|
var formParams = {};
|
|
816
1101
|
var authNames = ['api_token_basic'];
|
|
817
1102
|
var contentTypes = [];
|
|
818
1103
|
var accepts = ['application/json'];
|
|
819
|
-
var returnType =
|
|
820
|
-
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);
|
|
821
1106
|
}
|
|
822
1107
|
|
|
823
1108
|
/**
|
|
824
|
-
*
|
|
825
|
-
*
|
|
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.
|
|
826
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.
|
|
827
1113
|
* @param {Object} opts Optional parameters
|
|
828
|
-
* @param {String} opts.
|
|
829
|
-
* @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}
|
|
830
1116
|
*/
|
|
831
1117
|
}, {
|
|
832
|
-
key: "
|
|
833
|
-
value: function
|
|
834
|
-
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) {
|
|
835
1121
|
return response_and_data.data;
|
|
836
1122
|
});
|
|
837
1123
|
}
|
|
838
1124
|
|
|
839
1125
|
/**
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
* @param {String}
|
|
843
|
-
* @
|
|
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
|
|
844
1132
|
*/
|
|
845
1133
|
}, {
|
|
846
|
-
key: "
|
|
847
|
-
value: function
|
|
1134
|
+
key: "deleteEmailDomainWithHttpInfo",
|
|
1135
|
+
value: function deleteEmailDomainWithHttpInfo(email_domain_id, opts) {
|
|
1136
|
+
opts = opts || {};
|
|
848
1137
|
var postBody = null;
|
|
849
|
-
// verify the required parameter '
|
|
850
|
-
if (
|
|
851
|
-
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");
|
|
852
1141
|
}
|
|
853
1142
|
var pathParams = {
|
|
854
|
-
'
|
|
1143
|
+
'email_domain_id': email_domain_id
|
|
855
1144
|
};
|
|
856
1145
|
var queryParams = {};
|
|
857
|
-
var headerParams = {
|
|
1146
|
+
var headerParams = {
|
|
1147
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1148
|
+
};
|
|
858
1149
|
var formParams = {};
|
|
859
1150
|
var authNames = ['api_token_basic'];
|
|
860
1151
|
var contentTypes = [];
|
|
861
1152
|
var accepts = ['application/json'];
|
|
862
|
-
var returnType =
|
|
863
|
-
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);
|
|
864
1155
|
}
|
|
865
1156
|
|
|
866
1157
|
/**
|
|
867
|
-
*
|
|
868
|
-
*
|
|
869
|
-
* @param {String}
|
|
870
|
-
* @
|
|
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}
|
|
871
1164
|
*/
|
|
872
1165
|
}, {
|
|
873
|
-
key: "
|
|
874
|
-
value: function
|
|
875
|
-
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) {
|
|
876
1169
|
return response_and_data.data;
|
|
877
1170
|
});
|
|
878
1171
|
}
|
|
879
1172
|
|
|
880
1173
|
/**
|
|
881
|
-
*
|
|
882
|
-
* Deletes
|
|
883
|
-
* @param {String}
|
|
884
|
-
* @
|
|
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
|
|
885
1328
|
*/
|
|
886
1329
|
}, {
|
|
887
1330
|
key: "expireCombinedPdfWithHttpInfo",
|
|
888
|
-
value: function expireCombinedPdfWithHttpInfo(combined_pdf_id) {
|
|
1331
|
+
value: function expireCombinedPdfWithHttpInfo(combined_pdf_id, opts) {
|
|
1332
|
+
opts = opts || {};
|
|
889
1333
|
var postBody = null;
|
|
890
1334
|
// verify the required parameter 'combined_pdf_id' is set
|
|
891
1335
|
if (combined_pdf_id === undefined || combined_pdf_id === null) {
|
|
@@ -895,7 +1339,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
895
1339
|
'combined_pdf_id': combined_pdf_id
|
|
896
1340
|
};
|
|
897
1341
|
var queryParams = {};
|
|
898
|
-
var headerParams = {
|
|
1342
|
+
var headerParams = {
|
|
1343
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1344
|
+
};
|
|
899
1345
|
var formParams = {};
|
|
900
1346
|
var authNames = ['api_token_basic'];
|
|
901
1347
|
var contentTypes = [];
|
|
@@ -908,12 +1354,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
908
1354
|
* Expire a combined PDF
|
|
909
1355
|
* Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
910
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.
|
|
911
1359
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CombinedPdf}
|
|
912
1360
|
*/
|
|
913
1361
|
}, {
|
|
914
1362
|
key: "expireCombinedPdf",
|
|
915
|
-
value: function expireCombinedPdf(combined_pdf_id) {
|
|
916
|
-
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) {
|
|
917
1365
|
return response_and_data.data;
|
|
918
1366
|
});
|
|
919
1367
|
}
|
|
@@ -922,11 +1370,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
922
1370
|
* Expire a submission
|
|
923
1371
|
* Deletes a submission's data and PDF now, and returns the expired submission.
|
|
924
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.
|
|
925
1375
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
926
1376
|
*/
|
|
927
1377
|
}, {
|
|
928
1378
|
key: "expireSubmissionWithHttpInfo",
|
|
929
|
-
value: function expireSubmissionWithHttpInfo(submission_id) {
|
|
1379
|
+
value: function expireSubmissionWithHttpInfo(submission_id, opts) {
|
|
1380
|
+
opts = opts || {};
|
|
930
1381
|
var postBody = null;
|
|
931
1382
|
// verify the required parameter 'submission_id' is set
|
|
932
1383
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -936,7 +1387,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
936
1387
|
'submission_id': submission_id
|
|
937
1388
|
};
|
|
938
1389
|
var queryParams = {};
|
|
939
|
-
var headerParams = {
|
|
1390
|
+
var headerParams = {
|
|
1391
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1392
|
+
};
|
|
940
1393
|
var formParams = {};
|
|
941
1394
|
var authNames = ['api_token_basic'];
|
|
942
1395
|
var contentTypes = [];
|
|
@@ -949,23 +1402,26 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
949
1402
|
* Expire a submission
|
|
950
1403
|
* Deletes a submission's data and PDF now, and returns the expired submission.
|
|
951
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.
|
|
952
1407
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
953
1408
|
*/
|
|
954
1409
|
}, {
|
|
955
1410
|
key: "expireSubmission",
|
|
956
|
-
value: function expireSubmission(submission_id) {
|
|
957
|
-
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) {
|
|
958
1413
|
return response_and_data.data;
|
|
959
1414
|
});
|
|
960
1415
|
}
|
|
961
1416
|
|
|
962
1417
|
/**
|
|
963
1418
|
* Generate more files
|
|
964
|
-
* Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1419
|
+
* Adds formats to a processed submission's files, in the background, without using credits again: `pdf`, the PDF of a Word template's submission that made only its Word document (converted from that document), `docx`, the Word document of a Word template's submission that made only its PDF (made again from its data and the template version it used), `odt`, a Word template's submission's OpenDocument file (converted from its Word document, or from one made again when it didn't keep one), and `png`, a PNG image of each page of the PDF (up to 100 pages), which makes the PDF first when the submission doesn't have one. To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
965
1420
|
* @param {String} submission_id The submission's ID.
|
|
966
1421
|
* @param {module:model/GenerateSubmissionFilesRequest} body The formats to make.
|
|
967
1422
|
* @param {Object} opts Optional parameters
|
|
968
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.
|
|
969
1425
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
970
1426
|
*/
|
|
971
1427
|
}, {
|
|
@@ -987,7 +1443,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
987
1443
|
var queryParams = {
|
|
988
1444
|
'wait': opts['wait']
|
|
989
1445
|
};
|
|
990
|
-
var headerParams = {
|
|
1446
|
+
var headerParams = {
|
|
1447
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1448
|
+
};
|
|
991
1449
|
var formParams = {};
|
|
992
1450
|
var authNames = ['api_token_basic'];
|
|
993
1451
|
var contentTypes = ['application/json'];
|
|
@@ -998,11 +1456,12 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
998
1456
|
|
|
999
1457
|
/**
|
|
1000
1458
|
* Generate more files
|
|
1001
|
-
* Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1459
|
+
* Adds formats to a processed submission's files, in the background, without using credits again: `pdf`, the PDF of a Word template's submission that made only its Word document (converted from that document), `docx`, the Word document of a Word template's submission that made only its PDF (made again from its data and the template version it used), `odt`, a Word template's submission's OpenDocument file (converted from its Word document, or from one made again when it didn't keep one), and `png`, a PNG image of each page of the PDF (up to 100 pages), which makes the PDF first when the submission doesn't have one. To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1002
1460
|
* @param {String} submission_id The submission's ID.
|
|
1003
1461
|
* @param {module:model/GenerateSubmissionFilesRequest} body The formats to make.
|
|
1004
1462
|
* @param {Object} opts Optional parameters
|
|
1005
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.
|
|
1006
1465
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
1007
1466
|
*/
|
|
1008
1467
|
}, {
|
|
@@ -1017,11 +1476,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1017
1476
|
* Generate a preview PDF
|
|
1018
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.
|
|
1019
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.
|
|
1020
1481
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Submission} and HTTP response
|
|
1021
1482
|
*/
|
|
1022
1483
|
}, {
|
|
1023
1484
|
key: "generateSubmissionPreviewWithHttpInfo",
|
|
1024
|
-
value: function generateSubmissionPreviewWithHttpInfo(submission_id) {
|
|
1485
|
+
value: function generateSubmissionPreviewWithHttpInfo(submission_id, opts) {
|
|
1486
|
+
opts = opts || {};
|
|
1025
1487
|
var postBody = null;
|
|
1026
1488
|
// verify the required parameter 'submission_id' is set
|
|
1027
1489
|
if (submission_id === undefined || submission_id === null) {
|
|
@@ -1031,7 +1493,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1031
1493
|
'submission_id': submission_id
|
|
1032
1494
|
};
|
|
1033
1495
|
var queryParams = {};
|
|
1034
|
-
var headerParams = {
|
|
1496
|
+
var headerParams = {
|
|
1497
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
1498
|
+
};
|
|
1035
1499
|
var formParams = {};
|
|
1036
1500
|
var authNames = ['api_token_basic'];
|
|
1037
1501
|
var contentTypes = [];
|
|
@@ -1044,12 +1508,55 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1044
1508
|
* Generate a preview PDF
|
|
1045
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.
|
|
1046
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.
|
|
1047
1513
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Submission}
|
|
1048
1514
|
*/
|
|
1049
1515
|
}, {
|
|
1050
1516
|
key: "generateSubmissionPreview",
|
|
1051
|
-
value: function generateSubmissionPreview(submission_id) {
|
|
1052
|
-
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) {
|
|
1053
1560
|
return response_and_data.data;
|
|
1054
1561
|
});
|
|
1055
1562
|
}
|
|
@@ -1136,6 +1643,95 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1136
1643
|
});
|
|
1137
1644
|
}
|
|
1138
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
|
+
|
|
1139
1735
|
/**
|
|
1140
1736
|
* Get a folder
|
|
1141
1737
|
* Returns a folder.
|
|
@@ -1345,7 +1941,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1345
1941
|
* Returns a template: its draft, or one of its published versions.
|
|
1346
1942
|
* @param {String} template_id The template's ID.
|
|
1347
1943
|
* @param {Object} opts Optional parameters
|
|
1348
|
-
* @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`.
|
|
1349
1945
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
1350
1946
|
*/
|
|
1351
1947
|
}, {
|
|
@@ -1377,7 +1973,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1377
1973
|
* Returns a template: its draft, or one of its published versions.
|
|
1378
1974
|
* @param {String} template_id The template's ID.
|
|
1379
1975
|
* @param {Object} opts Optional parameters
|
|
1380
|
-
* @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`.
|
|
1381
1977
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
1382
1978
|
*/
|
|
1383
1979
|
}, {
|
|
@@ -1393,7 +1989,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1393
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.
|
|
1394
1990
|
* @param {String} template_id The template's ID.
|
|
1395
1991
|
* @param {Object} opts Optional parameters
|
|
1396
|
-
* @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`.
|
|
1397
1993
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateDiff} and HTTP response
|
|
1398
1994
|
*/
|
|
1399
1995
|
}, {
|
|
@@ -1425,7 +2021,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1425
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.
|
|
1426
2022
|
* @param {String} template_id The template's ID.
|
|
1427
2023
|
* @param {Object} opts Optional parameters
|
|
1428
|
-
* @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`.
|
|
1429
2025
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateDiff}
|
|
1430
2026
|
*/
|
|
1431
2027
|
}, {
|
|
@@ -1438,12 +2034,12 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1438
2034
|
|
|
1439
2035
|
/**
|
|
1440
2036
|
* Generate typed code for a template's submission data
|
|
1441
|
-
* Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or
|
|
2037
|
+
* Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir, Go or Rust, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object, and `just_types=true` leaves out the code that converts JSON to and from the types. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
|
|
1442
2038
|
* @param {String} template_id The template's ID.
|
|
1443
2039
|
* @param {module:model/ModelCodeLanguage} lang The language to generate the code in.
|
|
1444
2040
|
* @param {Object} opts Optional parameters
|
|
1445
|
-
* @param {String} [version] The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
1446
|
-
* @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
|
|
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.
|
|
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.
|
|
1447
2043
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateModelCode} and HTTP response
|
|
1448
2044
|
*/
|
|
1449
2045
|
}, {
|
|
@@ -1478,12 +2074,12 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1478
2074
|
|
|
1479
2075
|
/**
|
|
1480
2076
|
* Generate typed code for a template's submission data
|
|
1481
|
-
* Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or
|
|
2077
|
+
* Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir, Go or Rust, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object, and `just_types=true` leaves out the code that converts JSON to and from the types. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
|
|
1482
2078
|
* @param {String} template_id The template's ID.
|
|
1483
2079
|
* @param {module:model/ModelCodeLanguage} lang The language to generate the code in.
|
|
1484
2080
|
* @param {Object} opts Optional parameters
|
|
1485
|
-
* @param {String} opts.version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
1486
|
-
* @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
|
|
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.
|
|
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.
|
|
1487
2083
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateModelCode}
|
|
1488
2084
|
*/
|
|
1489
2085
|
}, {
|
|
@@ -1499,7 +2095,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1499
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.
|
|
1500
2096
|
* @param {String} template_id The template's ID.
|
|
1501
2097
|
* @param {Object} opts Optional parameters
|
|
1502
|
-
* @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`.
|
|
1503
2099
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplatePageImages} and HTTP response
|
|
1504
2100
|
*/
|
|
1505
2101
|
}, {
|
|
@@ -1531,7 +2127,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1531
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.
|
|
1532
2128
|
* @param {String} template_id The template's ID.
|
|
1533
2129
|
* @param {Object} opts Optional parameters
|
|
1534
|
-
* @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`.
|
|
1535
2131
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplatePageImages}
|
|
1536
2132
|
*/
|
|
1537
2133
|
}, {
|
|
@@ -1595,7 +2191,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1595
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.
|
|
1596
2192
|
* @param {String} template_id The template's ID.
|
|
1597
2193
|
* @param {Object} opts Optional parameters
|
|
1598
|
-
* @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.
|
|
1599
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
|
|
1600
2196
|
*/
|
|
1601
2197
|
}, {
|
|
@@ -1629,7 +2225,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1629
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.
|
|
1630
2226
|
* @param {String} template_id The template's ID.
|
|
1631
2227
|
* @param {Object} opts Optional parameters
|
|
1632
|
-
* @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.
|
|
1633
2229
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object.<String, {String: Object}>}
|
|
1634
2230
|
*/
|
|
1635
2231
|
}, {
|
|
@@ -1682,16 +2278,16 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1682
2278
|
}
|
|
1683
2279
|
|
|
1684
2280
|
/**
|
|
1685
|
-
* List
|
|
1686
|
-
* 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`).
|
|
1687
2283
|
* @param {Object} opts Optional parameters
|
|
1688
2284
|
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1689
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.
|
|
1690
|
-
* @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
|
|
1691
2287
|
*/
|
|
1692
2288
|
}, {
|
|
1693
|
-
key: "
|
|
1694
|
-
value: function
|
|
2289
|
+
key: "listAccountEmailActionsWithHttpInfo",
|
|
2290
|
+
value: function listAccountEmailActionsWithHttpInfo(opts) {
|
|
1695
2291
|
opts = opts || {};
|
|
1696
2292
|
var postBody = null;
|
|
1697
2293
|
var pathParams = {};
|
|
@@ -1704,33 +2300,76 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1704
2300
|
var authNames = ['api_token_basic'];
|
|
1705
2301
|
var contentTypes = [];
|
|
1706
2302
|
var accepts = ['application/json'];
|
|
1707
|
-
var returnType =
|
|
1708
|
-
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);
|
|
1709
2305
|
}
|
|
1710
2306
|
|
|
1711
2307
|
/**
|
|
1712
|
-
* List
|
|
1713
|
-
* 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`).
|
|
1714
2310
|
* @param {Object} opts Optional parameters
|
|
1715
2311
|
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
1716
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.
|
|
1717
|
-
* @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}
|
|
1718
2314
|
*/
|
|
1719
2315
|
}, {
|
|
1720
|
-
key: "
|
|
1721
|
-
value: function
|
|
1722
|
-
return this.
|
|
2316
|
+
key: "listAccountEmailActions",
|
|
2317
|
+
value: function listAccountEmailActions(opts) {
|
|
2318
|
+
return this.listAccountEmailActionsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1723
2319
|
return response_and_data.data;
|
|
1724
2320
|
});
|
|
1725
2321
|
}
|
|
1726
2322
|
|
|
1727
2323
|
/**
|
|
1728
|
-
* List
|
|
1729
|
-
* Returns the
|
|
2324
|
+
* List combined PDFs
|
|
2325
|
+
* Returns the combined PDFs in your account, newest first, one page at a time.
|
|
1730
2326
|
* @param {Object} opts Optional parameters
|
|
1731
2327
|
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
1732
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.
|
|
1733
|
-
* @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
|
|
1734
2373
|
*/
|
|
1735
2374
|
}, {
|
|
1736
2375
|
key: "listCustomFilesWithHttpInfo",
|
|
@@ -1767,6 +2406,100 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1767
2406
|
});
|
|
1768
2407
|
}
|
|
1769
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
|
+
|
|
1770
2503
|
/**
|
|
1771
2504
|
* List folders
|
|
1772
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.
|
|
@@ -1882,7 +2615,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1882
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.
|
|
1883
2616
|
* @param {String} template_id The template's ID.
|
|
1884
2617
|
* @param {Object} opts Optional parameters
|
|
1885
|
-
* @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`.
|
|
1886
2619
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
1887
2620
|
*/
|
|
1888
2621
|
}, {
|
|
@@ -1914,7 +2647,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1914
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.
|
|
1915
2648
|
* @param {String} template_id The template's ID.
|
|
1916
2649
|
* @param {Object} opts Optional parameters
|
|
1917
|
-
* @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`.
|
|
1918
2651
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
1919
2652
|
*/
|
|
1920
2653
|
}, {
|
|
@@ -1998,7 +2731,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
1998
2731
|
* List templates
|
|
1999
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.
|
|
2000
2733
|
* @param {Object} opts Optional parameters
|
|
2001
|
-
* @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.
|
|
2002
2735
|
* @param {String} [parent_folder_id] Only list the templates in this folder (not in its subfolders).
|
|
2003
2736
|
* @param {Number} [limit = 50)] How many items to return (1-100, default 50).
|
|
2004
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.
|
|
@@ -2029,7 +2762,7 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2029
2762
|
* List templates
|
|
2030
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.
|
|
2031
2764
|
* @param {Object} opts Optional parameters
|
|
2032
|
-
* @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.
|
|
2033
2766
|
* @param {String} opts.parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
2034
2767
|
* @param {Number} opts.limit How many items to return (1-100, default 50). (default to 50)
|
|
2035
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.
|
|
@@ -2106,11 +2839,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2106
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.
|
|
2107
2840
|
* @param {String} folder_id The folder's ID.
|
|
2108
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.
|
|
2109
2844
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
2110
2845
|
*/
|
|
2111
2846
|
}, {
|
|
2112
2847
|
key: "moveFolderWithHttpInfo",
|
|
2113
|
-
value: function moveFolderWithHttpInfo(folder_id, body) {
|
|
2848
|
+
value: function moveFolderWithHttpInfo(folder_id, body, opts) {
|
|
2849
|
+
opts = opts || {};
|
|
2114
2850
|
var postBody = body;
|
|
2115
2851
|
// verify the required parameter 'folder_id' is set
|
|
2116
2852
|
if (folder_id === undefined || folder_id === null) {
|
|
@@ -2124,7 +2860,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2124
2860
|
'folder_id': folder_id
|
|
2125
2861
|
};
|
|
2126
2862
|
var queryParams = {};
|
|
2127
|
-
var headerParams = {
|
|
2863
|
+
var headerParams = {
|
|
2864
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
2865
|
+
};
|
|
2128
2866
|
var formParams = {};
|
|
2129
2867
|
var authNames = ['api_token_basic'];
|
|
2130
2868
|
var contentTypes = ['application/json'];
|
|
@@ -2138,12 +2876,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2138
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.
|
|
2139
2877
|
* @param {String} folder_id The folder's ID.
|
|
2140
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.
|
|
2141
2881
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
2142
2882
|
*/
|
|
2143
2883
|
}, {
|
|
2144
2884
|
key: "moveFolder",
|
|
2145
|
-
value: function moveFolder(folder_id, body) {
|
|
2146
|
-
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) {
|
|
2147
2887
|
return response_and_data.data;
|
|
2148
2888
|
});
|
|
2149
2889
|
}
|
|
@@ -2153,11 +2893,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2153
2893
|
* Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2154
2894
|
* @param {String} template_id The template's ID.
|
|
2155
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.
|
|
2156
2898
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2157
2899
|
*/
|
|
2158
2900
|
}, {
|
|
2159
2901
|
key: "moveTemplateWithHttpInfo",
|
|
2160
|
-
value: function moveTemplateWithHttpInfo(template_id, body) {
|
|
2902
|
+
value: function moveTemplateWithHttpInfo(template_id, body, opts) {
|
|
2903
|
+
opts = opts || {};
|
|
2161
2904
|
var postBody = body;
|
|
2162
2905
|
// verify the required parameter 'template_id' is set
|
|
2163
2906
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2171,7 +2914,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2171
2914
|
'template_id': template_id
|
|
2172
2915
|
};
|
|
2173
2916
|
var queryParams = {};
|
|
2174
|
-
var headerParams = {
|
|
2917
|
+
var headerParams = {
|
|
2918
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
2919
|
+
};
|
|
2175
2920
|
var formParams = {};
|
|
2176
2921
|
var authNames = ['api_token_basic'];
|
|
2177
2922
|
var contentTypes = ['application/json'];
|
|
@@ -2185,26 +2930,31 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2185
2930
|
* Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2186
2931
|
* @param {String} template_id The template's ID.
|
|
2187
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.
|
|
2188
2935
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2189
2936
|
*/
|
|
2190
2937
|
}, {
|
|
2191
2938
|
key: "moveTemplate",
|
|
2192
|
-
value: function moveTemplate(template_id, body) {
|
|
2193
|
-
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) {
|
|
2194
2941
|
return response_and_data.data;
|
|
2195
2942
|
});
|
|
2196
2943
|
}
|
|
2197
2944
|
|
|
2198
2945
|
/**
|
|
2199
2946
|
* Publish a template version
|
|
2200
|
-
* Publishes the template's draft as a new version
|
|
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.
|
|
2201
2948
|
* @param {String} template_id The template's ID.
|
|
2202
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.
|
|
2203
2952
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateVersion} and HTTP response
|
|
2204
2953
|
*/
|
|
2205
2954
|
}, {
|
|
2206
2955
|
key: "publishTemplateVersionWithHttpInfo",
|
|
2207
|
-
value: function publishTemplateVersionWithHttpInfo(template_id, body) {
|
|
2956
|
+
value: function publishTemplateVersionWithHttpInfo(template_id, body, opts) {
|
|
2957
|
+
opts = opts || {};
|
|
2208
2958
|
var postBody = body;
|
|
2209
2959
|
// verify the required parameter 'template_id' is set
|
|
2210
2960
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2218,7 +2968,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2218
2968
|
'template_id': template_id
|
|
2219
2969
|
};
|
|
2220
2970
|
var queryParams = {};
|
|
2221
|
-
var headerParams = {
|
|
2971
|
+
var headerParams = {
|
|
2972
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
2973
|
+
};
|
|
2222
2974
|
var formParams = {};
|
|
2223
2975
|
var authNames = ['api_token_basic'];
|
|
2224
2976
|
var contentTypes = ['application/json'];
|
|
@@ -2229,15 +2981,17 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2229
2981
|
|
|
2230
2982
|
/**
|
|
2231
2983
|
* Publish a template version
|
|
2232
|
-
* Publishes the template's draft as a new version
|
|
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.
|
|
2233
2985
|
* @param {String} template_id The template's ID.
|
|
2234
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.
|
|
2235
2989
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateVersion}
|
|
2236
2990
|
*/
|
|
2237
2991
|
}, {
|
|
2238
2992
|
key: "publishTemplateVersion",
|
|
2239
|
-
value: function publishTemplateVersion(template_id, body) {
|
|
2240
|
-
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) {
|
|
2241
2995
|
return response_and_data.data;
|
|
2242
2996
|
});
|
|
2243
2997
|
}
|
|
@@ -2247,11 +3001,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2247
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.
|
|
2248
3002
|
* @param {String} template_id The template's ID.
|
|
2249
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.
|
|
2250
3006
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
2251
3007
|
*/
|
|
2252
3008
|
}, {
|
|
2253
3009
|
key: "removeTemplateFieldsWithHttpInfo",
|
|
2254
|
-
value: function removeTemplateFieldsWithHttpInfo(template_id, body) {
|
|
3010
|
+
value: function removeTemplateFieldsWithHttpInfo(template_id, body, opts) {
|
|
3011
|
+
opts = opts || {};
|
|
2255
3012
|
var postBody = body;
|
|
2256
3013
|
// verify the required parameter 'template_id' is set
|
|
2257
3014
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2265,7 +3022,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2265
3022
|
'template_id': template_id
|
|
2266
3023
|
};
|
|
2267
3024
|
var queryParams = {};
|
|
2268
|
-
var headerParams = {
|
|
3025
|
+
var headerParams = {
|
|
3026
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3027
|
+
};
|
|
2269
3028
|
var formParams = {};
|
|
2270
3029
|
var authNames = ['api_token_basic'];
|
|
2271
3030
|
var contentTypes = ['application/json'];
|
|
@@ -2279,12 +3038,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2279
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.
|
|
2280
3039
|
* @param {String} template_id The template's ID.
|
|
2281
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.
|
|
2282
3043
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
2283
3044
|
*/
|
|
2284
3045
|
}, {
|
|
2285
3046
|
key: "removeTemplateFields",
|
|
2286
|
-
value: function removeTemplateFields(template_id, body) {
|
|
2287
|
-
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) {
|
|
2288
3049
|
return response_and_data.data;
|
|
2289
3050
|
});
|
|
2290
3051
|
}
|
|
@@ -2294,11 +3055,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2294
3055
|
* Renames a folder. The name must be unique within its parent folder.
|
|
2295
3056
|
* @param {String} folder_id The folder's ID.
|
|
2296
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.
|
|
2297
3060
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Folder} and HTTP response
|
|
2298
3061
|
*/
|
|
2299
3062
|
}, {
|
|
2300
3063
|
key: "renameFolderWithHttpInfo",
|
|
2301
|
-
value: function renameFolderWithHttpInfo(folder_id, body) {
|
|
3064
|
+
value: function renameFolderWithHttpInfo(folder_id, body, opts) {
|
|
3065
|
+
opts = opts || {};
|
|
2302
3066
|
var postBody = body;
|
|
2303
3067
|
// verify the required parameter 'folder_id' is set
|
|
2304
3068
|
if (folder_id === undefined || folder_id === null) {
|
|
@@ -2312,7 +3076,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2312
3076
|
'folder_id': folder_id
|
|
2313
3077
|
};
|
|
2314
3078
|
var queryParams = {};
|
|
2315
|
-
var headerParams = {
|
|
3079
|
+
var headerParams = {
|
|
3080
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3081
|
+
};
|
|
2316
3082
|
var formParams = {};
|
|
2317
3083
|
var authNames = ['api_token_basic'];
|
|
2318
3084
|
var contentTypes = ['application/json'];
|
|
@@ -2326,12 +3092,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2326
3092
|
* Renames a folder. The name must be unique within its parent folder.
|
|
2327
3093
|
* @param {String} folder_id The folder's ID.
|
|
2328
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.
|
|
2329
3097
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Folder}
|
|
2330
3098
|
*/
|
|
2331
3099
|
}, {
|
|
2332
3100
|
key: "renameFolder",
|
|
2333
|
-
value: function renameFolder(folder_id, body) {
|
|
2334
|
-
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) {
|
|
2335
3103
|
return response_and_data.data;
|
|
2336
3104
|
});
|
|
2337
3105
|
}
|
|
@@ -2341,11 +3109,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2341
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.
|
|
2342
3110
|
* @param {String} template_id The template's ID.
|
|
2343
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.
|
|
2344
3114
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
2345
3115
|
*/
|
|
2346
3116
|
}, {
|
|
2347
3117
|
key: "reorderTemplateFieldsWithHttpInfo",
|
|
2348
|
-
value: function reorderTemplateFieldsWithHttpInfo(template_id, body) {
|
|
3118
|
+
value: function reorderTemplateFieldsWithHttpInfo(template_id, body, opts) {
|
|
3119
|
+
opts = opts || {};
|
|
2349
3120
|
var postBody = body;
|
|
2350
3121
|
// verify the required parameter 'template_id' is set
|
|
2351
3122
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2359,7 +3130,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2359
3130
|
'template_id': template_id
|
|
2360
3131
|
};
|
|
2361
3132
|
var queryParams = {};
|
|
2362
|
-
var headerParams = {
|
|
3133
|
+
var headerParams = {
|
|
3134
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3135
|
+
};
|
|
2363
3136
|
var formParams = {};
|
|
2364
3137
|
var authNames = ['api_token_basic'];
|
|
2365
3138
|
var contentTypes = ['application/json'];
|
|
@@ -2373,26 +3146,31 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2373
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.
|
|
2374
3147
|
* @param {String} template_id The template's ID.
|
|
2375
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.
|
|
2376
3151
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
2377
3152
|
*/
|
|
2378
3153
|
}, {
|
|
2379
3154
|
key: "reorderTemplateFields",
|
|
2380
|
-
value: function reorderTemplateFields(template_id, body) {
|
|
2381
|
-
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) {
|
|
2382
3157
|
return response_and_data.data;
|
|
2383
3158
|
});
|
|
2384
3159
|
}
|
|
2385
3160
|
|
|
2386
3161
|
/**
|
|
2387
3162
|
* Restore a template version
|
|
2388
|
-
* Replaces the template's draft with a copy of one of its published versions.
|
|
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`.
|
|
2389
3164
|
* @param {String} template_id The template's ID.
|
|
2390
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.
|
|
2391
3168
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2392
3169
|
*/
|
|
2393
3170
|
}, {
|
|
2394
3171
|
key: "restoreTemplateVersionWithHttpInfo",
|
|
2395
|
-
value: function restoreTemplateVersionWithHttpInfo(template_id, body) {
|
|
3172
|
+
value: function restoreTemplateVersionWithHttpInfo(template_id, body, opts) {
|
|
3173
|
+
opts = opts || {};
|
|
2396
3174
|
var postBody = body;
|
|
2397
3175
|
// verify the required parameter 'template_id' is set
|
|
2398
3176
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2406,7 +3184,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2406
3184
|
'template_id': template_id
|
|
2407
3185
|
};
|
|
2408
3186
|
var queryParams = {};
|
|
2409
|
-
var headerParams = {
|
|
3187
|
+
var headerParams = {
|
|
3188
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3189
|
+
};
|
|
2410
3190
|
var formParams = {};
|
|
2411
3191
|
var authNames = ['api_token_basic'];
|
|
2412
3192
|
var contentTypes = ['application/json'];
|
|
@@ -2417,15 +3197,122 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2417
3197
|
|
|
2418
3198
|
/**
|
|
2419
3199
|
* Restore a template version
|
|
2420
|
-
* Replaces the template's draft with a copy of one of its published versions.
|
|
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`.
|
|
2421
3201
|
* @param {String} template_id The template's ID.
|
|
2422
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.
|
|
2423
3205
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2424
3206
|
*/
|
|
2425
3207
|
}, {
|
|
2426
3208
|
key: "restoreTemplateVersion",
|
|
2427
|
-
value: function restoreTemplateVersion(template_id, body) {
|
|
2428
|
-
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) {
|
|
2429
3316
|
return response_and_data.data;
|
|
2430
3317
|
});
|
|
2431
3318
|
}
|
|
@@ -2463,16 +3350,195 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2463
3350
|
});
|
|
2464
3351
|
}
|
|
2465
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
|
+
|
|
2466
3529
|
/**
|
|
2467
3530
|
* Update a signature request
|
|
2468
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.
|
|
2469
3532
|
* @param {String} signature_request_id The signature request's ID.
|
|
2470
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.
|
|
2471
3536
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignatureRequest} and HTTP response
|
|
2472
3537
|
*/
|
|
2473
3538
|
}, {
|
|
2474
3539
|
key: "updateSignatureRequestWithHttpInfo",
|
|
2475
|
-
value: function updateSignatureRequestWithHttpInfo(signature_request_id, body) {
|
|
3540
|
+
value: function updateSignatureRequestWithHttpInfo(signature_request_id, body, opts) {
|
|
3541
|
+
opts = opts || {};
|
|
2476
3542
|
var postBody = body;
|
|
2477
3543
|
// verify the required parameter 'signature_request_id' is set
|
|
2478
3544
|
if (signature_request_id === undefined || signature_request_id === null) {
|
|
@@ -2486,7 +3552,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2486
3552
|
'signature_request_id': signature_request_id
|
|
2487
3553
|
};
|
|
2488
3554
|
var queryParams = {};
|
|
2489
|
-
var headerParams = {
|
|
3555
|
+
var headerParams = {
|
|
3556
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3557
|
+
};
|
|
2490
3558
|
var formParams = {};
|
|
2491
3559
|
var authNames = ['api_token_basic'];
|
|
2492
3560
|
var contentTypes = ['application/json'];
|
|
@@ -2500,26 +3568,31 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2500
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.
|
|
2501
3569
|
* @param {String} signature_request_id The signature request's ID.
|
|
2502
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.
|
|
2503
3573
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignatureRequest}
|
|
2504
3574
|
*/
|
|
2505
3575
|
}, {
|
|
2506
3576
|
key: "updateSignatureRequest",
|
|
2507
|
-
value: function updateSignatureRequest(signature_request_id, body) {
|
|
2508
|
-
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) {
|
|
2509
3579
|
return response_and_data.data;
|
|
2510
3580
|
});
|
|
2511
3581
|
}
|
|
2512
3582
|
|
|
2513
3583
|
/**
|
|
2514
3584
|
* Update a template
|
|
2515
|
-
* 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.
|
|
2516
3586
|
* @param {String} template_id The template's ID.
|
|
2517
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.
|
|
2518
3590
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2519
3591
|
*/
|
|
2520
3592
|
}, {
|
|
2521
3593
|
key: "updateTemplateWithHttpInfo",
|
|
2522
|
-
value: function updateTemplateWithHttpInfo(template_id, body) {
|
|
3594
|
+
value: function updateTemplateWithHttpInfo(template_id, body, opts) {
|
|
3595
|
+
opts = opts || {};
|
|
2523
3596
|
var postBody = body;
|
|
2524
3597
|
// verify the required parameter 'template_id' is set
|
|
2525
3598
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2533,7 +3606,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2533
3606
|
'template_id': template_id
|
|
2534
3607
|
};
|
|
2535
3608
|
var queryParams = {};
|
|
2536
|
-
var headerParams = {
|
|
3609
|
+
var headerParams = {
|
|
3610
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3611
|
+
};
|
|
2537
3612
|
var formParams = {};
|
|
2538
3613
|
var authNames = ['api_token_basic'];
|
|
2539
3614
|
var contentTypes = ['application/json'];
|
|
@@ -2544,26 +3619,29 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2544
3619
|
|
|
2545
3620
|
/**
|
|
2546
3621
|
* Update a template
|
|
2547
|
-
* 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.
|
|
2548
3623
|
* @param {String} template_id The template's ID.
|
|
2549
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.
|
|
2550
3627
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2551
3628
|
*/
|
|
2552
3629
|
}, {
|
|
2553
3630
|
key: "updateTemplate",
|
|
2554
|
-
value: function updateTemplate(template_id, body) {
|
|
2555
|
-
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) {
|
|
2556
3633
|
return response_and_data.data;
|
|
2557
3634
|
});
|
|
2558
3635
|
}
|
|
2559
3636
|
|
|
2560
3637
|
/**
|
|
2561
|
-
* Replace a template's
|
|
2562
|
-
* Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`).
|
|
3638
|
+
* Replace a template's document
|
|
3639
|
+
* Replaces a PDF template's PDF, or a Word template's Word document (from a .docx or an .odt), with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag. To send the file as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
2563
3640
|
* @param {String} template_id The template's ID.
|
|
2564
|
-
* @param {module:model/UpdateTemplateDocumentRequest} body The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
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`.
|
|
2565
3642
|
* @param {Object} opts Optional parameters
|
|
2566
|
-
* @param {Boolean} [wait] Wait until the PDF has been processed,
|
|
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.
|
|
2567
3645
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2568
3646
|
*/
|
|
2569
3647
|
}, {
|
|
@@ -2585,7 +3663,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2585
3663
|
var queryParams = {
|
|
2586
3664
|
'wait': opts['wait']
|
|
2587
3665
|
};
|
|
2588
|
-
var headerParams = {
|
|
3666
|
+
var headerParams = {
|
|
3667
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3668
|
+
};
|
|
2589
3669
|
var formParams = {};
|
|
2590
3670
|
var authNames = ['api_token_basic'];
|
|
2591
3671
|
var contentTypes = ['application/json'];
|
|
@@ -2595,12 +3675,13 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2595
3675
|
}
|
|
2596
3676
|
|
|
2597
3677
|
/**
|
|
2598
|
-
* Replace a template's
|
|
2599
|
-
* Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`).
|
|
3678
|
+
* Replace a template's document
|
|
3679
|
+
* Replaces a PDF template's PDF, or a Word template's Word document (from a .docx or an .odt), with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag. To send the file as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
2600
3680
|
* @param {String} template_id The template's ID.
|
|
2601
|
-
* @param {module:model/UpdateTemplateDocumentRequest} body The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
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`.
|
|
2602
3682
|
* @param {Object} opts Optional parameters
|
|
2603
|
-
* @param {Boolean} opts.wait Wait until the PDF has been processed,
|
|
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.
|
|
2604
3685
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2605
3686
|
*/
|
|
2606
3687
|
}, {
|
|
@@ -2616,11 +3697,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2616
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.
|
|
2617
3698
|
* @param {String} template_id The template's ID.
|
|
2618
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.
|
|
2619
3702
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFields} and HTTP response
|
|
2620
3703
|
*/
|
|
2621
3704
|
}, {
|
|
2622
3705
|
key: "updateTemplateFieldsWithHttpInfo",
|
|
2623
|
-
value: function updateTemplateFieldsWithHttpInfo(template_id, body) {
|
|
3706
|
+
value: function updateTemplateFieldsWithHttpInfo(template_id, body, opts) {
|
|
3707
|
+
opts = opts || {};
|
|
2624
3708
|
var postBody = body;
|
|
2625
3709
|
// verify the required parameter 'template_id' is set
|
|
2626
3710
|
if (template_id === undefined || template_id === null) {
|
|
@@ -2634,7 +3718,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2634
3718
|
'template_id': template_id
|
|
2635
3719
|
};
|
|
2636
3720
|
var queryParams = {};
|
|
2637
|
-
var headerParams = {
|
|
3721
|
+
var headerParams = {
|
|
3722
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3723
|
+
};
|
|
2638
3724
|
var formParams = {};
|
|
2639
3725
|
var authNames = ['api_token_basic'];
|
|
2640
3726
|
var contentTypes = ['application/json'];
|
|
@@ -2648,12 +3734,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2648
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.
|
|
2649
3735
|
* @param {String} template_id The template's ID.
|
|
2650
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.
|
|
2651
3739
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFields}
|
|
2652
3740
|
*/
|
|
2653
3741
|
}, {
|
|
2654
3742
|
key: "updateTemplateFields",
|
|
2655
|
-
value: function updateTemplateFields(template_id, body) {
|
|
2656
|
-
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) {
|
|
2657
3745
|
return response_and_data.data;
|
|
2658
3746
|
});
|
|
2659
3747
|
}
|
|
@@ -2663,11 +3751,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2663
3751
|
* Updates a webhook. Only the properties you send change.
|
|
2664
3752
|
* @param {String} webhook_id The webhook's ID.
|
|
2665
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.
|
|
2666
3756
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Webhook} and HTTP response
|
|
2667
3757
|
*/
|
|
2668
3758
|
}, {
|
|
2669
3759
|
key: "updateWebhookWithHttpInfo",
|
|
2670
|
-
value: function updateWebhookWithHttpInfo(webhook_id, body) {
|
|
3760
|
+
value: function updateWebhookWithHttpInfo(webhook_id, body, opts) {
|
|
3761
|
+
opts = opts || {};
|
|
2671
3762
|
var postBody = body;
|
|
2672
3763
|
// verify the required parameter 'webhook_id' is set
|
|
2673
3764
|
if (webhook_id === undefined || webhook_id === null) {
|
|
@@ -2681,7 +3772,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2681
3772
|
'webhook_id': webhook_id
|
|
2682
3773
|
};
|
|
2683
3774
|
var queryParams = {};
|
|
2684
|
-
var headerParams = {
|
|
3775
|
+
var headerParams = {
|
|
3776
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3777
|
+
};
|
|
2685
3778
|
var formParams = {};
|
|
2686
3779
|
var authNames = ['api_token_basic'];
|
|
2687
3780
|
var contentTypes = ['application/json'];
|
|
@@ -2695,22 +3788,24 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2695
3788
|
* Updates a webhook. Only the properties you send change.
|
|
2696
3789
|
* @param {String} webhook_id The webhook's ID.
|
|
2697
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.
|
|
2698
3793
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook}
|
|
2699
3794
|
*/
|
|
2700
3795
|
}, {
|
|
2701
3796
|
key: "updateWebhook",
|
|
2702
|
-
value: function updateWebhook(webhook_id, body) {
|
|
2703
|
-
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) {
|
|
2704
3799
|
return response_and_data.data;
|
|
2705
3800
|
});
|
|
2706
3801
|
}
|
|
2707
3802
|
|
|
2708
3803
|
/**
|
|
2709
|
-
* Create a
|
|
2710
|
-
* Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the
|
|
2711
|
-
* @param {File} document
|
|
3804
|
+
* Create a template from an uploaded PDF or Word document
|
|
3805
|
+
* Creates a PDF template from a PDF, or a Word template from a Word document (.docx) or an OpenDocument text file (.odt), sent with the request (`multipart/form-data`). A Word template needs its `output_format`. For large files, upload the file with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
|
|
3806
|
+
* @param {File} document A PDF (for a PDF template) or a Word document (.docx or .odt, for a Word template). DocSpring converts an OpenDocument text file (.odt) to a Word document after responding: the template's `document.state` is `converting` until then (sync.api hosts wait for it).
|
|
2712
3807
|
* @param {Object} opts Optional parameters
|
|
2713
|
-
* @param {Boolean} [wait] Wait until the PDF has been processed,
|
|
3808
|
+
* @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.
|
|
2714
3809
|
* @param {String} [name] The template's name.
|
|
2715
3810
|
* @param {String} [description] The template's description.
|
|
2716
3811
|
* @param {String} [parent_folder_id] The folder to put the template in. Left out, it's created at the root.
|
|
@@ -2719,6 +3814,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2719
3814
|
* @param {module:model/FieldSetupSource} [field_source] With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
2720
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`.
|
|
2721
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.
|
|
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.
|
|
2722
3819
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2723
3820
|
*/
|
|
2724
3821
|
}, {
|
|
@@ -2734,7 +3831,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2734
3831
|
var queryParams = {
|
|
2735
3832
|
'wait': opts['wait']
|
|
2736
3833
|
};
|
|
2737
|
-
var headerParams = {
|
|
3834
|
+
var headerParams = {
|
|
3835
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3836
|
+
};
|
|
2738
3837
|
var formParams = {
|
|
2739
3838
|
'document': document,
|
|
2740
3839
|
'name': opts['name'],
|
|
@@ -2744,7 +3843,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2744
3843
|
'detect_fields': opts['detect_fields'],
|
|
2745
3844
|
'field_source': opts['field_source'],
|
|
2746
3845
|
'field_naming': opts['field_naming'],
|
|
2747
|
-
'field_logic': opts['field_logic']
|
|
3846
|
+
'field_logic': opts['field_logic'],
|
|
3847
|
+
'output_format': opts['output_format']
|
|
2748
3848
|
};
|
|
2749
3849
|
var authNames = ['api_token_basic'];
|
|
2750
3850
|
var contentTypes = ['multipart/form-data'];
|
|
@@ -2754,11 +3854,11 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2754
3854
|
}
|
|
2755
3855
|
|
|
2756
3856
|
/**
|
|
2757
|
-
* Create a
|
|
2758
|
-
* Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the
|
|
2759
|
-
* @param {File} document
|
|
3857
|
+
* Create a template from an uploaded PDF or Word document
|
|
3858
|
+
* Creates a PDF template from a PDF, or a Word template from a Word document (.docx) or an OpenDocument text file (.odt), sent with the request (`multipart/form-data`). A Word template needs its `output_format`. For large files, upload the file with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
|
|
3859
|
+
* @param {File} document A PDF (for a PDF template) or a Word document (.docx or .odt, for a Word template). DocSpring converts an OpenDocument text file (.odt) to a Word document after responding: the template's `document.state` is `converting` until then (sync.api hosts wait for it).
|
|
2760
3860
|
* @param {Object} opts Optional parameters
|
|
2761
|
-
* @param {Boolean} opts.wait Wait until the PDF has been processed,
|
|
3861
|
+
* @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.
|
|
2762
3862
|
* @param {String} opts.name The template's name.
|
|
2763
3863
|
* @param {String} opts.description The template's description.
|
|
2764
3864
|
* @param {String} opts.parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
@@ -2767,6 +3867,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2767
3867
|
* @param {module:model/FieldSetupSource} opts.field_source With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
2768
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`.
|
|
2769
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.
|
|
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.
|
|
2770
3872
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2771
3873
|
*/
|
|
2772
3874
|
}, {
|
|
@@ -2778,13 +3880,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2778
3880
|
}
|
|
2779
3881
|
|
|
2780
3882
|
/**
|
|
2781
|
-
* Replace a template's
|
|
2782
|
-
* Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`).
|
|
3883
|
+
* Replace a template's document with an uploaded file
|
|
3884
|
+
* Replaces a PDF template's PDF, or a Word template's Word document, with one sent with the request (`multipart/form-data`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag.
|
|
2783
3885
|
* @param {String} template_id The template's ID.
|
|
2784
|
-
* @param {File} document The new PDF.
|
|
3886
|
+
* @param {File} document The new PDF, or the new Word document (.docx or .odt) of a Word template.
|
|
2785
3887
|
* @param {Object} opts Optional parameters
|
|
2786
|
-
* @param {Boolean} [wait] Wait until the PDF has been processed,
|
|
2787
|
-
* @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.
|
|
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.
|
|
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.
|
|
2788
3891
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Template} and HTTP response
|
|
2789
3892
|
*/
|
|
2790
3893
|
}, {
|
|
@@ -2806,7 +3909,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2806
3909
|
var queryParams = {
|
|
2807
3910
|
'wait': opts['wait']
|
|
2808
3911
|
};
|
|
2809
|
-
var headerParams = {
|
|
3912
|
+
var headerParams = {
|
|
3913
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3914
|
+
};
|
|
2810
3915
|
var formParams = {
|
|
2811
3916
|
'document': document,
|
|
2812
3917
|
'reimport_fields': opts['reimport_fields']
|
|
@@ -2819,13 +3924,14 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2819
3924
|
}
|
|
2820
3925
|
|
|
2821
3926
|
/**
|
|
2822
|
-
* Replace a template's
|
|
2823
|
-
* Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`).
|
|
3927
|
+
* Replace a template's document with an uploaded file
|
|
3928
|
+
* Replaces a PDF template's PDF, or a Word template's Word document, with one sent with the request (`multipart/form-data`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag.
|
|
2824
3929
|
* @param {String} template_id The template's ID.
|
|
2825
|
-
* @param {File} document The new PDF.
|
|
3930
|
+
* @param {File} document The new PDF, or the new Word document (.docx or .odt) of a Word template.
|
|
2826
3931
|
* @param {Object} opts Optional parameters
|
|
2827
|
-
* @param {Boolean} opts.wait Wait until the PDF has been processed,
|
|
2828
|
-
* @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.
|
|
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.
|
|
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.
|
|
2829
3935
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Template}
|
|
2830
3936
|
*/
|
|
2831
3937
|
}, {
|
|
@@ -2842,7 +3948,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2842
3948
|
* @param {String} template_id The template's ID.
|
|
2843
3949
|
* @param {module:model/ValidateSubmissionRequest} body The submission's data and settings.
|
|
2844
3950
|
* @param {Object} opts Optional parameters
|
|
2845
|
-
* @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.
|
|
2846
3953
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubmissionValidation} and HTTP response
|
|
2847
3954
|
*/
|
|
2848
3955
|
}, {
|
|
@@ -2864,7 +3971,9 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2864
3971
|
var queryParams = {
|
|
2865
3972
|
'version': opts['version']
|
|
2866
3973
|
};
|
|
2867
|
-
var headerParams = {
|
|
3974
|
+
var headerParams = {
|
|
3975
|
+
'Idempotency-Key': opts['idempotencyKey']
|
|
3976
|
+
};
|
|
2868
3977
|
var formParams = {};
|
|
2869
3978
|
var authNames = ['api_token_basic'];
|
|
2870
3979
|
var contentTypes = ['application/json'];
|
|
@@ -2879,7 +3988,8 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2879
3988
|
* @param {String} template_id The template's ID.
|
|
2880
3989
|
* @param {module:model/ValidateSubmissionRequest} body The submission's data and settings.
|
|
2881
3990
|
* @param {Object} opts Optional parameters
|
|
2882
|
-
* @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.
|
|
2883
3993
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubmissionValidation}
|
|
2884
3994
|
*/
|
|
2885
3995
|
}, {
|
|
@@ -2889,5 +3999,53 @@ var Client = exports["default"] = /*#__PURE__*/function () {
|
|
|
2889
3999
|
return response_and_data.data;
|
|
2890
4000
|
});
|
|
2891
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
|
+
}
|
|
2892
4050
|
}]);
|
|
2893
4051
|
}();
|