docspring 2.1.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +59 -48
  2. package/dist/ApiClient.js +4 -4
  3. package/dist/api/{PDFApi.js → Client.js} +698 -384
  4. package/dist/index.js +56 -21
  5. package/dist/model/AddFieldsData.js +3 -3
  6. package/dist/model/BatchGeneratePdfs201Response.js +8 -8
  7. package/dist/model/CombinePdfsData.js +10 -8
  8. package/dist/model/CombinedSubmission.js +22 -22
  9. package/dist/model/CombinedSubmissionAction.js +29 -15
  10. package/dist/model/CopyTemplateOptions.js +19 -30
  11. package/dist/model/CreateCombinedSubmissionResponse.js +8 -8
  12. package/dist/model/CreateCustomFileData.js +8 -8
  13. package/dist/model/CreateCustomFileResponse.js +8 -8
  14. package/dist/model/CreateFolderData.js +3 -3
  15. package/dist/model/CreateHtmlTemplate.js +3 -3
  16. package/dist/model/CreatePdfSubmissionData.js +3 -3
  17. package/dist/model/CreatePdfTemplate.js +3 -3
  18. package/dist/model/CreateSubmissionDataRequestData.js +107 -3
  19. package/dist/model/CreateSubmissionDataRequestEventRequest.js +32 -8
  20. package/dist/model/CreateSubmissionDataRequestEventResponse.js +3 -3
  21. package/dist/model/CreateSubmissionDataRequestResponse.js +8 -8
  22. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +3 -3
  23. package/dist/model/CreateSubmissionResponse.js +3 -3
  24. package/dist/model/{CombinedSubmissionData.js → CreateWebhookData.js} +28 -68
  25. package/dist/model/CustomFile.js +3 -3
  26. package/dist/model/ErrorOrMultipleErrorsResponse.js +151 -0
  27. package/dist/model/ErrorResponse.js +3 -3
  28. package/dist/model/Folder.js +8 -8
  29. package/dist/model/JsonSchema.js +35 -3
  30. package/dist/model/ListSubmissionsResponse.js +8 -8
  31. package/dist/model/MoveFolderData.js +3 -3
  32. package/dist/model/MoveTemplateData.js +20 -8
  33. package/dist/model/MultipleErrorsResponse.js +3 -3
  34. package/dist/model/PublishVersionData.js +8 -8
  35. package/dist/model/RenameFolderData.js +3 -3
  36. package/dist/model/RestoreVersionData.js +3 -3
  37. package/dist/model/Submission.js +57 -44
  38. package/dist/model/Submission422Response.js +165 -0
  39. package/dist/model/SubmissionAction.js +29 -15
  40. package/dist/model/SubmissionBatch.js +16 -16
  41. package/dist/model/SubmissionBatchData.js +27 -3
  42. package/dist/model/SubmissionBatchWithSubmissions.js +16 -16
  43. package/dist/model/SubmissionDataRequest.js +53 -34
  44. package/dist/model/SubmissionDataRequestEvent.js +18 -18
  45. package/dist/model/SubmissionDataRequestShow.js +55 -36
  46. package/dist/model/SubmissionDataRequestToken.js +10 -10
  47. package/dist/model/SubmissionPreview.js +57 -38
  48. package/dist/model/SuccessErrorResponse.js +3 -3
  49. package/dist/model/SuccessMultipleErrorsResponse.js +3 -3
  50. package/dist/model/Template.js +203 -90
  51. package/dist/model/TemplateAddFieldsResponse.js +3 -3
  52. package/dist/model/TemplateDeleteResponse.js +3 -3
  53. package/dist/model/TemplateModelCodeResponse.js +193 -0
  54. package/dist/model/TemplatePreview.js +167 -78
  55. package/dist/model/TemplatePublishVersionResponse.js +3 -3
  56. package/dist/model/UpdateHtmlTemplate.js +3 -3
  57. package/dist/model/UpdatePdfTemplate.js +108 -0
  58. package/dist/model/UpdateSubmissionDataRequestData.js +154 -3
  59. package/dist/model/UpdateWebhookData.js +108 -0
  60. package/dist/model/UploadPresignResponse.js +3 -3
  61. package/dist/model/Webhook.js +378 -0
  62. package/package.json +2 -2
  63. package/dist/model/CreateHtmlSubmissionData.js +0 -173
@@ -9,13 +9,11 @@ var _AddFieldsData = _interopRequireDefault(require("../model/AddFieldsData"));
9
9
  var _BatchGeneratePdfs201Response = _interopRequireDefault(require("../model/BatchGeneratePdfs201Response"));
10
10
  var _CombinePdfsData = _interopRequireDefault(require("../model/CombinePdfsData"));
11
11
  var _CombinedSubmission = _interopRequireDefault(require("../model/CombinedSubmission"));
12
- var _CombinedSubmissionData = _interopRequireDefault(require("../model/CombinedSubmissionData"));
13
12
  var _CopyTemplateOptions = _interopRequireDefault(require("../model/CopyTemplateOptions"));
14
13
  var _CreateCombinedSubmissionResponse = _interopRequireDefault(require("../model/CreateCombinedSubmissionResponse"));
15
14
  var _CreateCustomFileData = _interopRequireDefault(require("../model/CreateCustomFileData"));
16
15
  var _CreateCustomFileResponse = _interopRequireDefault(require("../model/CreateCustomFileResponse"));
17
16
  var _CreateFolderData = _interopRequireDefault(require("../model/CreateFolderData"));
18
- var _CreateHtmlSubmissionData = _interopRequireDefault(require("../model/CreateHtmlSubmissionData"));
19
17
  var _CreateHtmlTemplate = _interopRequireDefault(require("../model/CreateHtmlTemplate"));
20
18
  var _CreatePdfSubmissionData = _interopRequireDefault(require("../model/CreatePdfSubmissionData"));
21
19
  var _CreatePdfTemplate = _interopRequireDefault(require("../model/CreatePdfTemplate"));
@@ -24,6 +22,8 @@ var _CreateSubmissionDataRequestEventResponse = _interopRequireDefault(require("
24
22
  var _CreateSubmissionDataRequestResponse = _interopRequireDefault(require("../model/CreateSubmissionDataRequestResponse"));
25
23
  var _CreateSubmissionDataRequestTokenResponse = _interopRequireDefault(require("../model/CreateSubmissionDataRequestTokenResponse"));
26
24
  var _CreateSubmissionResponse = _interopRequireDefault(require("../model/CreateSubmissionResponse"));
25
+ var _CreateWebhookData = _interopRequireDefault(require("../model/CreateWebhookData"));
26
+ var _ErrorOrMultipleErrorsResponse = _interopRequireDefault(require("../model/ErrorOrMultipleErrorsResponse"));
27
27
  var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
28
28
  var _Folder = _interopRequireDefault(require("../model/Folder"));
29
29
  var _JsonSchema = _interopRequireDefault(require("../model/JsonSchema"));
@@ -35,6 +35,7 @@ var _PublishVersionData = _interopRequireDefault(require("../model/PublishVersio
35
35
  var _RenameFolderData = _interopRequireDefault(require("../model/RenameFolderData"));
36
36
  var _RestoreVersionData = _interopRequireDefault(require("../model/RestoreVersionData"));
37
37
  var _Submission = _interopRequireDefault(require("../model/Submission"));
38
+ var _Submission422Response = _interopRequireDefault(require("../model/Submission422Response"));
38
39
  var _SubmissionBatchData = _interopRequireDefault(require("../model/SubmissionBatchData"));
39
40
  var _SubmissionBatchWithSubmissions = _interopRequireDefault(require("../model/SubmissionBatchWithSubmissions"));
40
41
  var _SubmissionDataRequestShow = _interopRequireDefault(require("../model/SubmissionDataRequestShow"));
@@ -44,20 +45,24 @@ var _SuccessMultipleErrorsResponse = _interopRequireDefault(require("../model/Su
44
45
  var _Template = _interopRequireDefault(require("../model/Template"));
45
46
  var _TemplateAddFieldsResponse = _interopRequireDefault(require("../model/TemplateAddFieldsResponse"));
46
47
  var _TemplateDeleteResponse = _interopRequireDefault(require("../model/TemplateDeleteResponse"));
48
+ var _TemplateModelCodeResponse = _interopRequireDefault(require("../model/TemplateModelCodeResponse"));
47
49
  var _TemplatePreview = _interopRequireDefault(require("../model/TemplatePreview"));
48
50
  var _TemplatePublishVersionResponse = _interopRequireDefault(require("../model/TemplatePublishVersionResponse"));
49
51
  var _UpdateHtmlTemplate = _interopRequireDefault(require("../model/UpdateHtmlTemplate"));
52
+ var _UpdatePdfTemplate = _interopRequireDefault(require("../model/UpdatePdfTemplate"));
50
53
  var _UpdateSubmissionDataRequestData = _interopRequireDefault(require("../model/UpdateSubmissionDataRequestData"));
54
+ var _UpdateWebhookData = _interopRequireDefault(require("../model/UpdateWebhookData"));
51
55
  var _UploadPresignResponse = _interopRequireDefault(require("../model/UploadPresignResponse"));
56
+ var _Webhook = _interopRequireDefault(require("../model/Webhook"));
52
57
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
53
58
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
54
59
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
55
60
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
56
61
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
57
62
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
58
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
63
+ 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); } /**
59
64
  * DocSpring API
60
- * DocSpring provides an API that helps you fill out and sign PDF templates.
65
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
61
66
  *
62
67
  * The version of the OpenAPI document: v1
63
68
  *
@@ -68,26 +73,56 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
68
73
  *
69
74
  */
70
75
  /**
71
- * PDF service.
72
- * @module api/PDFApi
73
- * @version 2.1.0
76
+ * Client service.
77
+ * @module api/Client
78
+ * @version 3.1.0
74
79
  */
75
- var PDFApi = exports["default"] = /*#__PURE__*/function () {
80
+ var Client = exports["default"] = /*#__PURE__*/function () {
76
81
  /**
77
- * Constructs a new PDFApi.
78
- * @alias module:api/PDFApi
82
+ * Constructs a new Client.
83
+ * @alias module:api/Client
79
84
  * @class
80
85
  * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
81
86
  * default to {@link module:ApiClient#instance} if unspecified.
82
87
  */
83
- function PDFApi(apiClient) {
84
- _classCallCheck(this, PDFApi);
85
- this.apiClient = apiClient || _ApiClient["default"].instance;
88
+ function Client() {
89
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
90
+ _classCallCheck(this, Client);
91
+ // Support both old style (apiClient) and new style (options object)
92
+ if (options && options.constructor && options.constructor.name === 'ApiClient') {
93
+ this.apiClient = options;
94
+ } else {
95
+ var _env$DOCSPRING_TOKEN_, _env$DOCSPRING_TOKEN_2;
96
+ var apiClient = options.apiClient || _ApiClient["default"].instance;
97
+ var env = typeof process !== 'undefined' && process.env ? process.env : {};
98
+ var apiTokenId = options.apiTokenId !== undefined ? options.apiTokenId : (_env$DOCSPRING_TOKEN_ = env.DOCSPRING_TOKEN_ID) !== null && _env$DOCSPRING_TOKEN_ !== void 0 ? _env$DOCSPRING_TOKEN_ : null;
99
+ var apiTokenSecret = options.apiTokenSecret !== undefined ? options.apiTokenSecret : (_env$DOCSPRING_TOKEN_2 = env.DOCSPRING_TOKEN_SECRET) !== null && _env$DOCSPRING_TOKEN_2 !== void 0 ? _env$DOCSPRING_TOKEN_2 : null;
100
+ if (apiTokenId != null && apiTokenSecret != null) {
101
+ apiClient.authentications['api_token_basic'].username = apiTokenId;
102
+ apiClient.authentications['api_token_basic'].password = apiTokenSecret;
103
+ }
104
+
105
+ // Resolve host from options.host, DOCSPRING_HOST, or region (options.region/DOCSPRING_REGION)
106
+ var host = options.host || env.DOCSPRING_HOST || null;
107
+ var region = options.region || env.DOCSPRING_REGION || null;
108
+ if (!host && region) {
109
+ var r = String(region).trim().toUpperCase();
110
+ if (r === 'US') host = 'sync.api.docspring.com';else if (r === 'EU') host = 'sync.api-eu.docspring.com';else throw new Error("".concat(region, " is not a valid region. Valid regions: US, EU"));
111
+ }
112
+ if (host) {
113
+ var url = String(host).trim();
114
+ if (!/^https?:\/\//i.test(url)) url = "https://".concat(url);
115
+ url = url.replace(/\/+$/, '');
116
+ if (!/\/api\/v1$/i.test(url)) url = "".concat(url, "/api/v1");
117
+ apiClient.basePath = url;
118
+ }
119
+ this.apiClient = apiClient;
120
+ }
86
121
  }
87
122
 
88
123
  /**
89
124
  * Callback function to receive the result of the addFieldsToTemplate operation.
90
- * @callback module:api/PDFApi~addFieldsToTemplateCallback
125
+ * @callback module:api/Client~addFieldsToTemplateCallback
91
126
  * @param {String} error Error message, if any.
92
127
  * @param {module:model/TemplateAddFieldsResponse} data The data returned by the service call.
93
128
  * @param {String} response The complete HTTP response.
@@ -95,25 +130,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
95
130
 
96
131
  /**
97
132
  * Add new fields to a Template
98
- * @param {String} templateId
133
+ * Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.
134
+ * @param {String} template_id
99
135
  * @param {module:model/AddFieldsData} data
100
- * @param {module:api/PDFApi~addFieldsToTemplateCallback} callback The callback function, accepting three arguments: error, data, response
136
+ * @param {module:api/Client~addFieldsToTemplateCallback} callback The callback function, accepting three arguments: error, data, response
101
137
  * data is of type: {@link module:model/TemplateAddFieldsResponse}
102
138
  */
103
- return _createClass(PDFApi, [{
139
+ return _createClass(Client, [{
104
140
  key: "addFieldsToTemplate",
105
- value: function addFieldsToTemplate(templateId, data, callback) {
141
+ value: function addFieldsToTemplate(template_id, data, callback) {
106
142
  var postBody = data;
107
- // verify the required parameter 'templateId' is set
108
- if (templateId === undefined || templateId === null) {
109
- throw new Error("Missing the required parameter 'templateId' when calling addFieldsToTemplate");
143
+ // verify the required parameter 'template_id' is set
144
+ if (template_id === undefined || template_id === null) {
145
+ throw new Error("Missing the required parameter 'template_id' when calling addFieldsToTemplate");
110
146
  }
111
147
  // verify the required parameter 'data' is set
112
148
  if (data === undefined || data === null) {
113
149
  throw new Error("Missing the required parameter 'data' when calling addFieldsToTemplate");
114
150
  }
115
151
  var pathParams = {
116
- 'template_id': templateId
152
+ 'template_id': template_id
117
153
  };
118
154
  var queryParams = {};
119
155
  var headerParams = {};
@@ -127,18 +163,19 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
127
163
 
128
164
  /**
129
165
  * Callback function to receive the result of the batchGeneratePdfs operation.
130
- * @callback module:api/PDFApi~batchGeneratePdfsCallback
166
+ * @callback module:api/Client~batchGeneratePdfsCallback
131
167
  * @param {String} error Error message, if any.
132
168
  * @param {module:model/BatchGeneratePdfs201Response} data The data returned by the service call.
133
169
  * @param {String} response The complete HTTP response.
134
170
  */
135
171
 
136
172
  /**
137
- * Generates multiple PDFs
173
+ * Generate multiple PDFs
174
+ * Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
138
175
  * @param {module:model/SubmissionBatchData} data
139
176
  * @param {Object} opts Optional parameters
140
177
  * @param {Boolean} [wait = true)] Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
141
- * @param {module:api/PDFApi~batchGeneratePdfsCallback} callback The callback function, accepting three arguments: error, data, response
178
+ * @param {module:api/Client~batchGeneratePdfsCallback} callback The callback function, accepting three arguments: error, data, response
142
179
  * data is of type: {@link module:model/BatchGeneratePdfs201Response}
143
180
  */
144
181
  }, {
@@ -165,7 +202,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
165
202
 
166
203
  /**
167
204
  * Callback function to receive the result of the combinePdfs operation.
168
- * @callback module:api/PDFApi~combinePdfsCallback
205
+ * @callback module:api/Client~combinePdfsCallback
169
206
  * @param {String} error Error message, if any.
170
207
  * @param {module:model/CreateCombinedSubmissionResponse} data The data returned by the service call.
171
208
  * @param {String} response The complete HTTP response.
@@ -173,8 +210,9 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
173
210
 
174
211
  /**
175
212
  * Merge submission PDFs, template PDFs, or custom files
213
+ * Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided.
176
214
  * @param {module:model/CombinePdfsData} data
177
- * @param {module:api/PDFApi~combinePdfsCallback} callback The callback function, accepting three arguments: error, data, response
215
+ * @param {module:api/Client~combinePdfsCallback} callback The callback function, accepting three arguments: error, data, response
178
216
  * data is of type: {@link module:model/CreateCombinedSubmissionResponse}
179
217
  */
180
218
  }, {
@@ -193,74 +231,37 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
193
231
  var contentTypes = ['application/json'];
194
232
  var accepts = ['application/json'];
195
233
  var returnType = _CreateCombinedSubmissionResponse["default"];
196
- return this.apiClient.callApi('/combined_submissions?v=2', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
197
- }
198
-
199
- /**
200
- * Callback function to receive the result of the combineSubmissions operation.
201
- * @callback module:api/PDFApi~combineSubmissionsCallback
202
- * @param {String} error Error message, if any.
203
- * @param {module:model/CreateCombinedSubmissionResponse} data The data returned by the service call.
204
- * @param {String} response The complete HTTP response.
205
- */
206
-
207
- /**
208
- * Merge generated PDFs together
209
- * @param {module:model/CombinedSubmissionData} data
210
- * @param {Object} opts Optional parameters
211
- * @param {Boolean} [wait = true)] Wait for combined submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
212
- * @param {module:api/PDFApi~combineSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
213
- * data is of type: {@link module:model/CreateCombinedSubmissionResponse}
214
- */
215
- }, {
216
- key: "combineSubmissions",
217
- value: function combineSubmissions(data, opts, callback) {
218
- opts = opts || {};
219
- var postBody = data;
220
- // verify the required parameter 'data' is set
221
- if (data === undefined || data === null) {
222
- throw new Error("Missing the required parameter 'data' when calling combineSubmissions");
223
- }
224
- var pathParams = {};
225
- var queryParams = {
226
- 'wait': opts['wait']
227
- };
228
- var headerParams = {};
229
- var formParams = {};
230
- var authNames = ['api_token_basic'];
231
- var contentTypes = ['application/json'];
232
- var accepts = ['application/json'];
233
- var returnType = _CreateCombinedSubmissionResponse["default"];
234
234
  return this.apiClient.callApi('/combined_submissions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
235
235
  }
236
236
 
237
237
  /**
238
238
  * Callback function to receive the result of the copyTemplate operation.
239
- * @callback module:api/PDFApi~copyTemplateCallback
239
+ * @callback module:api/Client~copyTemplateCallback
240
240
  * @param {String} error Error message, if any.
241
241
  * @param {module:model/TemplatePreview} data The data returned by the service call.
242
242
  * @param {String} response The complete HTTP response.
243
243
  */
244
244
 
245
245
  /**
246
- * Copy a Template
247
- * @param {String} templateId
246
+ * Copy a template
247
+ * Creates a copy of an existing template with all its fields and configuration. Optionally specify a new name and target folder. The copied template starts as a new draft that can be modified independently of the original.
248
+ * @param {String} template_id
248
249
  * @param {Object} opts Optional parameters
249
250
  * @param {module:model/CopyTemplateOptions} [options]
250
- * @param {module:api/PDFApi~copyTemplateCallback} callback The callback function, accepting three arguments: error, data, response
251
+ * @param {module:api/Client~copyTemplateCallback} callback The callback function, accepting three arguments: error, data, response
251
252
  * data is of type: {@link module:model/TemplatePreview}
252
253
  */
253
254
  }, {
254
255
  key: "copyTemplate",
255
- value: function copyTemplate(templateId, opts, callback) {
256
+ value: function copyTemplate(template_id, opts, callback) {
256
257
  opts = opts || {};
257
258
  var postBody = opts['options'];
258
- // verify the required parameter 'templateId' is set
259
- if (templateId === undefined || templateId === null) {
260
- throw new Error("Missing the required parameter 'templateId' when calling copyTemplate");
259
+ // verify the required parameter 'template_id' is set
260
+ if (template_id === undefined || template_id === null) {
261
+ throw new Error("Missing the required parameter 'template_id' when calling copyTemplate");
261
262
  }
262
263
  var pathParams = {
263
- 'template_id': templateId
264
+ 'template_id': template_id
264
265
  };
265
266
  var queryParams = {};
266
267
  var headerParams = {};
@@ -274,16 +275,17 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
274
275
 
275
276
  /**
276
277
  * Callback function to receive the result of the createCustomFileFromUpload operation.
277
- * @callback module:api/PDFApi~createCustomFileFromUploadCallback
278
+ * @callback module:api/Client~createCustomFileFromUploadCallback
278
279
  * @param {String} error Error message, if any.
279
280
  * @param {module:model/CreateCustomFileResponse} data The data returned by the service call.
280
281
  * @param {String} response The complete HTTP response.
281
282
  */
282
283
 
283
284
  /**
284
- * Create a new custom file from a cached presign upload
285
+ * Create a new custom file from a cached S3 upload
286
+ * The Custom Files API endpoint allows you to upload PDFs to DocSpring and then merge them with other PDFs. First upload your file using the presigned URL endpoint, then use the returned cache_id to create the custom file.
285
287
  * @param {module:model/CreateCustomFileData} data
286
- * @param {module:api/PDFApi~createCustomFileFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
288
+ * @param {module:api/Client~createCustomFileFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
287
289
  * data is of type: {@link module:model/CreateCustomFileResponse}
288
290
  */
289
291
  }, {
@@ -307,33 +309,34 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
307
309
 
308
310
  /**
309
311
  * Callback function to receive the result of the createDataRequestEvent operation.
310
- * @callback module:api/PDFApi~createDataRequestEventCallback
312
+ * @callback module:api/Client~createDataRequestEventCallback
311
313
  * @param {String} error Error message, if any.
312
314
  * @param {module:model/CreateSubmissionDataRequestEventResponse} data The data returned by the service call.
313
315
  * @param {String} response The complete HTTP response.
314
316
  */
315
317
 
316
318
  /**
317
- * Creates a new event for emailing a signee a request for signature
318
- * @param {String} dataRequestId
319
+ * Create a new event for emailing a signee a request for signature
320
+ * Records user notification events for data requests. Use this to create an audit trail showing when and how users were notified about data request forms. Supports email, SMS, and other notification types. Records the notification time for compliance tracking. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - User notification workflow
321
+ * @param {String} data_request_id
319
322
  * @param {module:model/CreateSubmissionDataRequestEventRequest} event
320
- * @param {module:api/PDFApi~createDataRequestEventCallback} callback The callback function, accepting three arguments: error, data, response
323
+ * @param {module:api/Client~createDataRequestEventCallback} callback The callback function, accepting three arguments: error, data, response
321
324
  * data is of type: {@link module:model/CreateSubmissionDataRequestEventResponse}
322
325
  */
323
326
  }, {
324
327
  key: "createDataRequestEvent",
325
- value: function createDataRequestEvent(dataRequestId, event, callback) {
328
+ value: function createDataRequestEvent(data_request_id, event, callback) {
326
329
  var postBody = event;
327
- // verify the required parameter 'dataRequestId' is set
328
- if (dataRequestId === undefined || dataRequestId === null) {
329
- throw new Error("Missing the required parameter 'dataRequestId' when calling createDataRequestEvent");
330
+ // verify the required parameter 'data_request_id' is set
331
+ if (data_request_id === undefined || data_request_id === null) {
332
+ throw new Error("Missing the required parameter 'data_request_id' when calling createDataRequestEvent");
330
333
  }
331
334
  // verify the required parameter 'event' is set
332
335
  if (event === undefined || event === null) {
333
336
  throw new Error("Missing the required parameter 'event' when calling createDataRequestEvent");
334
337
  }
335
338
  var pathParams = {
336
- 'data_request_id': dataRequestId
339
+ 'data_request_id': data_request_id
337
340
  };
338
341
  var queryParams = {};
339
342
  var headerParams = {};
@@ -347,31 +350,32 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
347
350
 
348
351
  /**
349
352
  * Callback function to receive the result of the createDataRequestToken operation.
350
- * @callback module:api/PDFApi~createDataRequestTokenCallback
353
+ * @callback module:api/Client~createDataRequestTokenCallback
351
354
  * @param {String} error Error message, if any.
352
355
  * @param {module:model/CreateSubmissionDataRequestTokenResponse} data The data returned by the service call.
353
356
  * @param {String} response The complete HTTP response.
354
357
  */
355
358
 
356
359
  /**
357
- * Creates a new data request token for form authentication
358
- * @param {String} dataRequestId
360
+ * Create a new data request token for form authentication
361
+ * Creates an authentication token for accessing a data request form. Returns a token and a pre-authenticated URL for the data request form. The token remains valid until the data request is completed. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/)
362
+ * @param {String} data_request_id
359
363
  * @param {Object} opts Optional parameters
360
364
  * @param {module:model/String} [type]
361
- * @param {module:api/PDFApi~createDataRequestTokenCallback} callback The callback function, accepting three arguments: error, data, response
365
+ * @param {module:api/Client~createDataRequestTokenCallback} callback The callback function, accepting three arguments: error, data, response
362
366
  * data is of type: {@link module:model/CreateSubmissionDataRequestTokenResponse}
363
367
  */
364
368
  }, {
365
369
  key: "createDataRequestToken",
366
- value: function createDataRequestToken(dataRequestId, opts, callback) {
370
+ value: function createDataRequestToken(data_request_id, opts, callback) {
367
371
  opts = opts || {};
368
372
  var postBody = null;
369
- // verify the required parameter 'dataRequestId' is set
370
- if (dataRequestId === undefined || dataRequestId === null) {
371
- throw new Error("Missing the required parameter 'dataRequestId' when calling createDataRequestToken");
373
+ // verify the required parameter 'data_request_id' is set
374
+ if (data_request_id === undefined || data_request_id === null) {
375
+ throw new Error("Missing the required parameter 'data_request_id' when calling createDataRequestToken");
372
376
  }
373
377
  var pathParams = {
374
- 'data_request_id': dataRequestId
378
+ 'data_request_id': data_request_id
375
379
  };
376
380
  var queryParams = {
377
381
  'type': opts['type']
@@ -387,7 +391,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
387
391
 
388
392
  /**
389
393
  * Callback function to receive the result of the createFolder operation.
390
- * @callback module:api/PDFApi~createFolderCallback
394
+ * @callback module:api/Client~createFolderCallback
391
395
  * @param {String} error Error message, if any.
392
396
  * @param {module:model/Folder} data The data returned by the service call.
393
397
  * @param {String} response The complete HTTP response.
@@ -395,8 +399,9 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
395
399
 
396
400
  /**
397
401
  * Create a folder
402
+ * Creates a new folder for organizing templates. Folders can be nested within other folders by providing a `parent_folder_id`. Folder names must be unique within the same parent.
398
403
  * @param {module:model/CreateFolderData} data
399
- * @param {module:api/PDFApi~createFolderCallback} callback The callback function, accepting three arguments: error, data, response
404
+ * @param {module:api/Client~createFolderCallback} callback The callback function, accepting three arguments: error, data, response
400
405
  * data is of type: {@link module:model/Folder}
401
406
  */
402
407
  }, {
@@ -419,8 +424,8 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
419
424
  }
420
425
 
421
426
  /**
422
- * Callback function to receive the result of the createHTMLTemplate operation.
423
- * @callback module:api/PDFApi~createHTMLTemplateCallback
427
+ * Callback function to receive the result of the createHtmlTemplate operation.
428
+ * @callback module:api/Client~createHtmlTemplateCallback
424
429
  * @param {String} error Error message, if any.
425
430
  * @param {module:model/TemplatePreview} data The data returned by the service call.
426
431
  * @param {String} response The complete HTTP response.
@@ -428,17 +433,18 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
428
433
 
429
434
  /**
430
435
  * Create a new HTML template
436
+ * Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating. Allows complete control over PDF layout and styling. Supports headers, footers, and dynamic content using Liquid syntax for field values, conditions, loops, and filters.
431
437
  * @param {module:model/CreateHtmlTemplate} data
432
- * @param {module:api/PDFApi~createHTMLTemplateCallback} callback The callback function, accepting three arguments: error, data, response
438
+ * @param {module:api/Client~createHtmlTemplateCallback} callback The callback function, accepting three arguments: error, data, response
433
439
  * data is of type: {@link module:model/TemplatePreview}
434
440
  */
435
441
  }, {
436
- key: "createHTMLTemplate",
437
- value: function createHTMLTemplate(data, callback) {
442
+ key: "createHtmlTemplate",
443
+ value: function createHtmlTemplate(data, callback) {
438
444
  var postBody = data;
439
445
  // verify the required parameter 'data' is set
440
446
  if (data === undefined || data === null) {
441
- throw new Error("Missing the required parameter 'data' when calling createHTMLTemplate");
447
+ throw new Error("Missing the required parameter 'data' when calling createHtmlTemplate");
442
448
  }
443
449
  var pathParams = {};
444
450
  var queryParams = {};
@@ -448,12 +454,12 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
448
454
  var contentTypes = ['application/json'];
449
455
  var accepts = ['application/json'];
450
456
  var returnType = _TemplatePreview["default"];
451
- return this.apiClient.callApi('/templates?endpoint_description=html', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
457
+ return this.apiClient.callApi('/templates?endpoint_variant=create_html_template', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
452
458
  }
453
459
 
454
460
  /**
455
- * Callback function to receive the result of the createPDFTemplate operation.
456
- * @callback module:api/PDFApi~createPDFTemplateCallback
461
+ * Callback function to receive the result of the createPdfTemplate operation.
462
+ * @callback module:api/Client~createPdfTemplateCallback
457
463
  * @param {String} error Error message, if any.
458
464
  * @param {module:model/TemplatePreview} data The data returned by the service call.
459
465
  * @param {String} response The complete HTTP response.
@@ -461,27 +467,28 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
461
467
 
462
468
  /**
463
469
  * Create a new PDF template with a form POST file upload
464
- * @param {File} templateDocument
465
- * @param {String} templateName
470
+ * Creates a new PDF template by uploading a PDF file. The uploaded PDF becomes the foundation for your template, and you can then add fillable fields using the template editor. Use the wait parameter to control whether the request waits for document processing to complete.
471
+ * @param {File} template_document
472
+ * @param {String} template_name
466
473
  * @param {Object} opts Optional parameters
467
474
  * @param {Boolean} [wait = true)] Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
468
- * @param {String} [templateDescription]
469
- * @param {String} [templateParentFolderId]
470
- * @param {module:api/PDFApi~createPDFTemplateCallback} callback The callback function, accepting three arguments: error, data, response
475
+ * @param {String} [template_description]
476
+ * @param {String} [template_parent_folder_id]
477
+ * @param {module:api/Client~createPdfTemplateCallback} callback The callback function, accepting three arguments: error, data, response
471
478
  * data is of type: {@link module:model/TemplatePreview}
472
479
  */
473
480
  }, {
474
- key: "createPDFTemplate",
475
- value: function createPDFTemplate(templateDocument, templateName, opts, callback) {
481
+ key: "createPdfTemplate",
482
+ value: function createPdfTemplate(template_document, template_name, opts, callback) {
476
483
  opts = opts || {};
477
484
  var postBody = null;
478
- // verify the required parameter 'templateDocument' is set
479
- if (templateDocument === undefined || templateDocument === null) {
480
- throw new Error("Missing the required parameter 'templateDocument' when calling createPDFTemplate");
485
+ // verify the required parameter 'template_document' is set
486
+ if (template_document === undefined || template_document === null) {
487
+ throw new Error("Missing the required parameter 'template_document' when calling createPdfTemplate");
481
488
  }
482
- // verify the required parameter 'templateName' is set
483
- if (templateName === undefined || templateName === null) {
484
- throw new Error("Missing the required parameter 'templateName' when calling createPDFTemplate");
489
+ // verify the required parameter 'template_name' is set
490
+ if (template_name === undefined || template_name === null) {
491
+ throw new Error("Missing the required parameter 'template_name' when calling createPdfTemplate");
485
492
  }
486
493
  var pathParams = {};
487
494
  var queryParams = {
@@ -489,10 +496,10 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
489
496
  };
490
497
  var headerParams = {};
491
498
  var formParams = {
492
- 'template[document]': templateDocument,
493
- 'template[name]': templateName,
494
- 'template[description]': opts['templateDescription'],
495
- 'template[parent_folder_id]': opts['templateParentFolderId']
499
+ 'template[document]': template_document,
500
+ 'template[name]': template_name,
501
+ 'template[description]': opts['template_description'],
502
+ 'template[parent_folder_id]': opts['template_parent_folder_id']
496
503
  };
497
504
  var authNames = ['api_token_basic'];
498
505
  var contentTypes = ['multipart/form-data'];
@@ -502,26 +509,27 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
502
509
  }
503
510
 
504
511
  /**
505
- * Callback function to receive the result of the createPDFTemplateFromUpload operation.
506
- * @callback module:api/PDFApi~createPDFTemplateFromUploadCallback
512
+ * Callback function to receive the result of the createPdfTemplateFromUpload operation.
513
+ * @callback module:api/Client~createPdfTemplateFromUploadCallback
507
514
  * @param {String} error Error message, if any.
508
515
  * @param {module:model/TemplatePreview} data The data returned by the service call.
509
516
  * @param {String} response The complete HTTP response.
510
517
  */
511
518
 
512
519
  /**
513
- * Create a new PDF template from a cached presign upload
520
+ * Create a new PDF template from a cached S3 file upload
521
+ * Creates a new PDF template from a file previously uploaded to S3 using a presigned URL. This two-step process allows for more reliable large file uploads by first uploading the file to S3, then creating the template using the cached upload ID.
514
522
  * @param {module:model/CreatePdfTemplate} data
515
- * @param {module:api/PDFApi~createPDFTemplateFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
523
+ * @param {module:api/Client~createPdfTemplateFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
516
524
  * data is of type: {@link module:model/TemplatePreview}
517
525
  */
518
526
  }, {
519
- key: "createPDFTemplateFromUpload",
520
- value: function createPDFTemplateFromUpload(data, callback) {
527
+ key: "createPdfTemplateFromUpload",
528
+ value: function createPdfTemplateFromUpload(data, callback) {
521
529
  var postBody = data;
522
530
  // verify the required parameter 'data' is set
523
531
  if (data === undefined || data === null) {
524
- throw new Error("Missing the required parameter 'data' when calling createPDFTemplateFromUpload");
532
+ throw new Error("Missing the required parameter 'data' when calling createPdfTemplateFromUpload");
525
533
  }
526
534
  var pathParams = {};
527
535
  var queryParams = {};
@@ -531,12 +539,46 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
531
539
  var contentTypes = ['application/json'];
532
540
  var accepts = ['application/json'];
533
541
  var returnType = _TemplatePreview["default"];
534
- return this.apiClient.callApi('/templates?endpoint_description=cached_upload', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
542
+ return this.apiClient.callApi('/templates?endpoint_variant=create_template_from_cached_upload', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
543
+ }
544
+
545
+ /**
546
+ * Callback function to receive the result of the createWebhook operation.
547
+ * @callback module:api/Client~createWebhookCallback
548
+ * @param {String} error Error message, if any.
549
+ * @param {module:model/Webhook} data The data returned by the service call.
550
+ * @param {String} response The complete HTTP response.
551
+ */
552
+
553
+ /**
554
+ * Create a webhook
555
+ * Creates a webhook that delivers a POST request to your endpoint whenever a subscribed event occurs. Optionally scope the webhook to specific API tokens, templates, or folders.
556
+ * @param {module:model/CreateWebhookData} data
557
+ * @param {module:api/Client~createWebhookCallback} callback The callback function, accepting three arguments: error, data, response
558
+ * data is of type: {@link module:model/Webhook}
559
+ */
560
+ }, {
561
+ key: "createWebhook",
562
+ value: function createWebhook(data, callback) {
563
+ var postBody = data;
564
+ // verify the required parameter 'data' is set
565
+ if (data === undefined || data === null) {
566
+ throw new Error("Missing the required parameter 'data' when calling createWebhook");
567
+ }
568
+ var pathParams = {};
569
+ var queryParams = {};
570
+ var headerParams = {};
571
+ var formParams = {};
572
+ var authNames = ['api_token_basic'];
573
+ var contentTypes = ['application/json'];
574
+ var accepts = ['application/json'];
575
+ var returnType = _Webhook["default"];
576
+ return this.apiClient.callApi('/webhooks', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
535
577
  }
536
578
 
537
579
  /**
538
580
  * Callback function to receive the result of the deleteFolder operation.
539
- * @callback module:api/PDFApi~deleteFolderCallback
581
+ * @callback module:api/Client~deleteFolderCallback
540
582
  * @param {String} error Error message, if any.
541
583
  * @param {module:model/Folder} data The data returned by the service call.
542
584
  * @param {String} response The complete HTTP response.
@@ -544,20 +586,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
544
586
 
545
587
  /**
546
588
  * Delete a folder
547
- * @param {String} folderId
548
- * @param {module:api/PDFApi~deleteFolderCallback} callback The callback function, accepting three arguments: error, data, response
589
+ * Deletes an empty folder. The folder must not contain any templates or subfolders. Move or delete all contents before attempting to delete the folder.
590
+ * @param {String} folder_id
591
+ * @param {module:api/Client~deleteFolderCallback} callback The callback function, accepting three arguments: error, data, response
549
592
  * data is of type: {@link module:model/Folder}
550
593
  */
551
594
  }, {
552
595
  key: "deleteFolder",
553
- value: function deleteFolder(folderId, callback) {
596
+ value: function deleteFolder(folder_id, callback) {
554
597
  var postBody = null;
555
- // verify the required parameter 'folderId' is set
556
- if (folderId === undefined || folderId === null) {
557
- throw new Error("Missing the required parameter 'folderId' when calling deleteFolder");
598
+ // verify the required parameter 'folder_id' is set
599
+ if (folder_id === undefined || folder_id === null) {
600
+ throw new Error("Missing the required parameter 'folder_id' when calling deleteFolder");
558
601
  }
559
602
  var pathParams = {
560
- 'folder_id': folderId
603
+ 'folder_id': folder_id
561
604
  };
562
605
  var queryParams = {};
563
606
  var headerParams = {};
@@ -571,7 +614,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
571
614
 
572
615
  /**
573
616
  * Callback function to receive the result of the deleteTemplate operation.
574
- * @callback module:api/PDFApi~deleteTemplateCallback
617
+ * @callback module:api/Client~deleteTemplateCallback
575
618
  * @param {String} error Error message, if any.
576
619
  * @param {module:model/TemplateDeleteResponse} data The data returned by the service call.
577
620
  * @param {String} response The complete HTTP response.
@@ -579,23 +622,24 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
579
622
 
580
623
  /**
581
624
  * Delete a template
582
- * @param {String} templateId
625
+ * Deletes a template or a specific template version. When no version is specified, deletes the entire template including all versions. When a version is specified, deletes only that version while preserving others. Returns remaining version information.
626
+ * @param {String} template_id
583
627
  * @param {Object} opts Optional parameters
584
628
  * @param {String} [version]
585
- * @param {module:api/PDFApi~deleteTemplateCallback} callback The callback function, accepting three arguments: error, data, response
629
+ * @param {module:api/Client~deleteTemplateCallback} callback The callback function, accepting three arguments: error, data, response
586
630
  * data is of type: {@link module:model/TemplateDeleteResponse}
587
631
  */
588
632
  }, {
589
633
  key: "deleteTemplate",
590
- value: function deleteTemplate(templateId, opts, callback) {
634
+ value: function deleteTemplate(template_id, opts, callback) {
591
635
  opts = opts || {};
592
636
  var postBody = null;
593
- // verify the required parameter 'templateId' is set
594
- if (templateId === undefined || templateId === null) {
595
- throw new Error("Missing the required parameter 'templateId' when calling deleteTemplate");
637
+ // verify the required parameter 'template_id' is set
638
+ if (template_id === undefined || template_id === null) {
639
+ throw new Error("Missing the required parameter 'template_id' when calling deleteTemplate");
596
640
  }
597
641
  var pathParams = {
598
- 'template_id': templateId
642
+ 'template_id': template_id
599
643
  };
600
644
  var queryParams = {
601
645
  'version': opts['version']
@@ -609,9 +653,45 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
609
653
  return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
610
654
  }
611
655
 
656
+ /**
657
+ * Callback function to receive the result of the deleteWebhook operation.
658
+ * @callback module:api/Client~deleteWebhookCallback
659
+ * @param {String} error Error message, if any.
660
+ * @param {module:model/Webhook} data The data returned by the service call.
661
+ * @param {String} response The complete HTTP response.
662
+ */
663
+
664
+ /**
665
+ * Delete a webhook
666
+ * Permanently deletes a webhook so it stops receiving events, and returns the deleted webhook.
667
+ * @param {String} webhook_id
668
+ * @param {module:api/Client~deleteWebhookCallback} callback The callback function, accepting three arguments: error, data, response
669
+ * data is of type: {@link module:model/Webhook}
670
+ */
671
+ }, {
672
+ key: "deleteWebhook",
673
+ value: function deleteWebhook(webhook_id, callback) {
674
+ var postBody = null;
675
+ // verify the required parameter 'webhook_id' is set
676
+ if (webhook_id === undefined || webhook_id === null) {
677
+ throw new Error("Missing the required parameter 'webhook_id' when calling deleteWebhook");
678
+ }
679
+ var pathParams = {
680
+ 'webhook_id': webhook_id
681
+ };
682
+ var queryParams = {};
683
+ var headerParams = {};
684
+ var formParams = {};
685
+ var authNames = ['api_token_basic'];
686
+ var contentTypes = [];
687
+ var accepts = ['application/json'];
688
+ var returnType = _Webhook["default"];
689
+ return this.apiClient.callApi('/webhooks/{webhook_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
690
+ }
691
+
612
692
  /**
613
693
  * Callback function to receive the result of the expireCombinedSubmission operation.
614
- * @callback module:api/PDFApi~expireCombinedSubmissionCallback
694
+ * @callback module:api/Client~expireCombinedSubmissionCallback
615
695
  * @param {String} error Error message, if any.
616
696
  * @param {module:model/CombinedSubmission} data The data returned by the service call.
617
697
  * @param {String} response The complete HTTP response.
@@ -619,20 +699,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
619
699
 
620
700
  /**
621
701
  * Expire a combined submission
622
- * @param {String} combinedSubmissionId
623
- * @param {module:api/PDFApi~expireCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
702
+ * Expiring a combined submission deletes the PDF from our system. This is useful for invalidating sensitive documents.
703
+ * @param {String} combined_submission_id
704
+ * @param {module:api/Client~expireCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
624
705
  * data is of type: {@link module:model/CombinedSubmission}
625
706
  */
626
707
  }, {
627
708
  key: "expireCombinedSubmission",
628
- value: function expireCombinedSubmission(combinedSubmissionId, callback) {
709
+ value: function expireCombinedSubmission(combined_submission_id, callback) {
629
710
  var postBody = null;
630
- // verify the required parameter 'combinedSubmissionId' is set
631
- if (combinedSubmissionId === undefined || combinedSubmissionId === null) {
632
- throw new Error("Missing the required parameter 'combinedSubmissionId' when calling expireCombinedSubmission");
711
+ // verify the required parameter 'combined_submission_id' is set
712
+ if (combined_submission_id === undefined || combined_submission_id === null) {
713
+ throw new Error("Missing the required parameter 'combined_submission_id' when calling expireCombinedSubmission");
633
714
  }
634
715
  var pathParams = {
635
- 'combined_submission_id': combinedSubmissionId
716
+ 'combined_submission_id': combined_submission_id
636
717
  };
637
718
  var queryParams = {};
638
719
  var headerParams = {};
@@ -646,7 +727,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
646
727
 
647
728
  /**
648
729
  * Callback function to receive the result of the expireSubmission operation.
649
- * @callback module:api/PDFApi~expireSubmissionCallback
730
+ * @callback module:api/Client~expireSubmissionCallback
650
731
  * @param {String} error Error message, if any.
651
732
  * @param {module:model/SubmissionPreview} data The data returned by the service call.
652
733
  * @param {String} response The complete HTTP response.
@@ -654,20 +735,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
654
735
 
655
736
  /**
656
737
  * Expire a PDF submission
657
- * @param {String} submissionId
658
- * @param {module:api/PDFApi~expireSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
738
+ * Expiring a PDF submission deletes the PDF and removes the data from our database. This is useful for invalidating sensitive documents after they've been downloaded. You can also [configure a data retention policy for your submissions](https://docspring.com/docs/template-editor/settings/#expire-submissions) so that they automatically expire.
739
+ * @param {String} submission_id
740
+ * @param {module:api/Client~expireSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
659
741
  * data is of type: {@link module:model/SubmissionPreview}
660
742
  */
661
743
  }, {
662
744
  key: "expireSubmission",
663
- value: function expireSubmission(submissionId, callback) {
745
+ value: function expireSubmission(submission_id, callback) {
664
746
  var postBody = null;
665
- // verify the required parameter 'submissionId' is set
666
- if (submissionId === undefined || submissionId === null) {
667
- throw new Error("Missing the required parameter 'submissionId' when calling expireSubmission");
747
+ // verify the required parameter 'submission_id' is set
748
+ if (submission_id === undefined || submission_id === null) {
749
+ throw new Error("Missing the required parameter 'submission_id' when calling expireSubmission");
668
750
  }
669
751
  var pathParams = {
670
- 'submission_id': submissionId
752
+ 'submission_id': submission_id
671
753
  };
672
754
  var queryParams = {};
673
755
  var headerParams = {};
@@ -681,36 +763,37 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
681
763
 
682
764
  /**
683
765
  * Callback function to receive the result of the generatePdf operation.
684
- * @callback module:api/PDFApi~generatePdfCallback
766
+ * @callback module:api/Client~generatePdfCallback
685
767
  * @param {String} error Error message, if any.
686
768
  * @param {module:model/CreateSubmissionResponse} data The data returned by the service call.
687
769
  * @param {String} response The complete HTTP response.
688
770
  */
689
771
 
690
772
  /**
691
- * Generates a new PDF
692
- * @param {String} templateId
773
+ * Generate a PDF
774
+ * Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
775
+ * @param {String} template_id
693
776
  * @param {module:model/CreatePdfSubmissionData} submission
694
777
  * @param {Object} opts Optional parameters
695
778
  * @param {Boolean} [wait = true)] Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
696
- * @param {module:api/PDFApi~generatePdfCallback} callback The callback function, accepting three arguments: error, data, response
779
+ * @param {module:api/Client~generatePdfCallback} callback The callback function, accepting three arguments: error, data, response
697
780
  * data is of type: {@link module:model/CreateSubmissionResponse}
698
781
  */
699
782
  }, {
700
783
  key: "generatePdf",
701
- value: function generatePdf(templateId, submission, opts, callback) {
784
+ value: function generatePdf(template_id, submission, opts, callback) {
702
785
  opts = opts || {};
703
786
  var postBody = submission;
704
- // verify the required parameter 'templateId' is set
705
- if (templateId === undefined || templateId === null) {
706
- throw new Error("Missing the required parameter 'templateId' when calling generatePdf");
787
+ // verify the required parameter 'template_id' is set
788
+ if (template_id === undefined || template_id === null) {
789
+ throw new Error("Missing the required parameter 'template_id' when calling generatePdf");
707
790
  }
708
791
  // verify the required parameter 'submission' is set
709
792
  if (submission === undefined || submission === null) {
710
793
  throw new Error("Missing the required parameter 'submission' when calling generatePdf");
711
794
  }
712
795
  var pathParams = {
713
- 'template_id': templateId
796
+ 'template_id': template_id
714
797
  };
715
798
  var queryParams = {
716
799
  'wait': opts['wait']
@@ -724,75 +807,31 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
724
807
  return this.apiClient.callApi('/templates/{template_id}/submissions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
725
808
  }
726
809
 
727
- /**
728
- * Callback function to receive the result of the generatePdfForHtmlTemplate operation.
729
- * @callback module:api/PDFApi~generatePdfForHtmlTemplateCallback
730
- * @param {String} error Error message, if any.
731
- * @param {module:model/CreateSubmissionResponse} data The data returned by the service call.
732
- * @param {String} response The complete HTTP response.
733
- */
734
-
735
- /**
736
- * Generates a new PDF for an HTML template
737
- * @param {String} templateId
738
- * @param {module:model/CreateHtmlSubmissionData} submission
739
- * @param {Object} opts Optional parameters
740
- * @param {Boolean} [wait = true)] Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
741
- * @param {module:api/PDFApi~generatePdfForHtmlTemplateCallback} callback The callback function, accepting three arguments: error, data, response
742
- * data is of type: {@link module:model/CreateSubmissionResponse}
743
- */
744
- }, {
745
- key: "generatePdfForHtmlTemplate",
746
- value: function generatePdfForHtmlTemplate(templateId, submission, opts, callback) {
747
- opts = opts || {};
748
- var postBody = submission;
749
- // verify the required parameter 'templateId' is set
750
- if (templateId === undefined || templateId === null) {
751
- throw new Error("Missing the required parameter 'templateId' when calling generatePdfForHtmlTemplate");
752
- }
753
- // verify the required parameter 'submission' is set
754
- if (submission === undefined || submission === null) {
755
- throw new Error("Missing the required parameter 'submission' when calling generatePdfForHtmlTemplate");
756
- }
757
- var pathParams = {
758
- 'template_id': templateId
759
- };
760
- var queryParams = {
761
- 'wait': opts['wait']
762
- };
763
- var headerParams = {};
764
- var formParams = {};
765
- var authNames = ['api_token_basic'];
766
- var contentTypes = ['application/json'];
767
- var accepts = ['application/json'];
768
- var returnType = _CreateSubmissionResponse["default"];
769
- return this.apiClient.callApi('/templates/{template_id}/submissions?endpoint_description=html_templates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
770
- }
771
-
772
810
  /**
773
811
  * Callback function to receive the result of the generatePreview operation.
774
- * @callback module:api/PDFApi~generatePreviewCallback
812
+ * @callback module:api/Client~generatePreviewCallback
775
813
  * @param {String} error Error message, if any.
776
814
  * @param {module:model/SuccessErrorResponse} data The data returned by the service call.
777
815
  * @param {String} response The complete HTTP response.
778
816
  */
779
817
 
780
818
  /**
781
- * Generated a preview PDF for partially completed data requests
782
- * @param {String} submissionId
783
- * @param {module:api/PDFApi~generatePreviewCallback} callback The callback function, accepting three arguments: error, data, response
819
+ * Generate a preview PDF for partially completed data requests
820
+ * Generates a preview PDF for a submission with partially completed data requests. Useful for showing users what the final document will look like before all signatures or data have been collected. The preview includes any data collected so far.
821
+ * @param {String} submission_id
822
+ * @param {module:api/Client~generatePreviewCallback} callback The callback function, accepting three arguments: error, data, response
784
823
  * data is of type: {@link module:model/SuccessErrorResponse}
785
824
  */
786
825
  }, {
787
826
  key: "generatePreview",
788
- value: function generatePreview(submissionId, callback) {
827
+ value: function generatePreview(submission_id, callback) {
789
828
  var postBody = null;
790
- // verify the required parameter 'submissionId' is set
791
- if (submissionId === undefined || submissionId === null) {
792
- throw new Error("Missing the required parameter 'submissionId' when calling generatePreview");
829
+ // verify the required parameter 'submission_id' is set
830
+ if (submission_id === undefined || submission_id === null) {
831
+ throw new Error("Missing the required parameter 'submission_id' when calling generatePreview");
793
832
  }
794
833
  var pathParams = {
795
- 'submission_id': submissionId
834
+ 'submission_id': submission_id
796
835
  };
797
836
  var queryParams = {};
798
837
  var headerParams = {};
@@ -806,7 +845,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
806
845
 
807
846
  /**
808
847
  * Callback function to receive the result of the getCombinedSubmission operation.
809
- * @callback module:api/PDFApi~getCombinedSubmissionCallback
848
+ * @callback module:api/Client~getCombinedSubmissionCallback
810
849
  * @param {String} error Error message, if any.
811
850
  * @param {module:model/CombinedSubmission} data The data returned by the service call.
812
851
  * @param {String} response The complete HTTP response.
@@ -814,20 +853,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
814
853
 
815
854
  /**
816
855
  * Check the status of a combined submission (merged PDFs)
817
- * @param {String} combinedSubmissionId
818
- * @param {module:api/PDFApi~getCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
856
+ * Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads).
857
+ * @param {String} combined_submission_id
858
+ * @param {module:api/Client~getCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
819
859
  * data is of type: {@link module:model/CombinedSubmission}
820
860
  */
821
861
  }, {
822
862
  key: "getCombinedSubmission",
823
- value: function getCombinedSubmission(combinedSubmissionId, callback) {
863
+ value: function getCombinedSubmission(combined_submission_id, callback) {
824
864
  var postBody = null;
825
- // verify the required parameter 'combinedSubmissionId' is set
826
- if (combinedSubmissionId === undefined || combinedSubmissionId === null) {
827
- throw new Error("Missing the required parameter 'combinedSubmissionId' when calling getCombinedSubmission");
865
+ // verify the required parameter 'combined_submission_id' is set
866
+ if (combined_submission_id === undefined || combined_submission_id === null) {
867
+ throw new Error("Missing the required parameter 'combined_submission_id' when calling getCombinedSubmission");
828
868
  }
829
869
  var pathParams = {
830
- 'combined_submission_id': combinedSubmissionId
870
+ 'combined_submission_id': combined_submission_id
831
871
  };
832
872
  var queryParams = {};
833
873
  var headerParams = {};
@@ -841,7 +881,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
841
881
 
842
882
  /**
843
883
  * Callback function to receive the result of the getDataRequest operation.
844
- * @callback module:api/PDFApi~getDataRequestCallback
884
+ * @callback module:api/Client~getDataRequestCallback
845
885
  * @param {String} error Error message, if any.
846
886
  * @param {module:model/SubmissionDataRequestShow} data The data returned by the service call.
847
887
  * @param {String} response The complete HTTP response.
@@ -849,20 +889,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
849
889
 
850
890
  /**
851
891
  * Look up a submission data request
852
- * @param {String} dataRequestId
853
- * @param {module:api/PDFApi~getDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
892
+ * Retrieves the details and status of a data request. Returns information about the request state (pending, viewed, completed), authentication details, and metadata. Includes audit information like IP address, browseruser agent, and timestamps. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - Complete guide to data request workflow
893
+ * @param {String} data_request_id
894
+ * @param {module:api/Client~getDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
854
895
  * data is of type: {@link module:model/SubmissionDataRequestShow}
855
896
  */
856
897
  }, {
857
898
  key: "getDataRequest",
858
- value: function getDataRequest(dataRequestId, callback) {
899
+ value: function getDataRequest(data_request_id, callback) {
859
900
  var postBody = null;
860
- // verify the required parameter 'dataRequestId' is set
861
- if (dataRequestId === undefined || dataRequestId === null) {
862
- throw new Error("Missing the required parameter 'dataRequestId' when calling getDataRequest");
901
+ // verify the required parameter 'data_request_id' is set
902
+ if (data_request_id === undefined || data_request_id === null) {
903
+ throw new Error("Missing the required parameter 'data_request_id' when calling getDataRequest");
863
904
  }
864
905
  var pathParams = {
865
- 'data_request_id': dataRequestId
906
+ 'data_request_id': data_request_id
866
907
  };
867
908
  var queryParams = {};
868
909
  var headerParams = {};
@@ -876,7 +917,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
876
917
 
877
918
  /**
878
919
  * Callback function to receive the result of the getFullTemplate operation.
879
- * @callback module:api/PDFApi~getFullTemplateCallback
920
+ * @callback module:api/Client~getFullTemplateCallback
880
921
  * @param {String} error Error message, if any.
881
922
  * @param {module:model/Template} data The data returned by the service call.
882
923
  * @param {String} response The complete HTTP response.
@@ -884,20 +925,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
884
925
 
885
926
  /**
886
927
  * Fetch the full attributes for a PDF template
887
- * @param {String} templateId
888
- * @param {module:api/PDFApi~getFullTemplateCallback} callback The callback function, accepting three arguments: error, data, response
928
+ * Retrieves complete template information including fields, defaults, settings, and HTML/SCSS content. Use this to get all template data needed for automated updates or analysis. Returns more detailed information than the basic `getTemplate` endpoint.
929
+ * @param {String} template_id
930
+ * @param {module:api/Client~getFullTemplateCallback} callback The callback function, accepting three arguments: error, data, response
889
931
  * data is of type: {@link module:model/Template}
890
932
  */
891
933
  }, {
892
934
  key: "getFullTemplate",
893
- value: function getFullTemplate(templateId, callback) {
935
+ value: function getFullTemplate(template_id, callback) {
894
936
  var postBody = null;
895
- // verify the required parameter 'templateId' is set
896
- if (templateId === undefined || templateId === null) {
897
- throw new Error("Missing the required parameter 'templateId' when calling getFullTemplate");
937
+ // verify the required parameter 'template_id' is set
938
+ if (template_id === undefined || template_id === null) {
939
+ throw new Error("Missing the required parameter 'template_id' when calling getFullTemplate");
898
940
  }
899
941
  var pathParams = {
900
- 'template_id': templateId
942
+ 'template_id': template_id
901
943
  };
902
944
  var queryParams = {};
903
945
  var headerParams = {};
@@ -911,15 +953,16 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
911
953
 
912
954
  /**
913
955
  * Callback function to receive the result of the getPresignUrl operation.
914
- * @callback module:api/PDFApi~getPresignUrlCallback
956
+ * @callback module:api/Client~getPresignUrlCallback
915
957
  * @param {String} error Error message, if any.
916
958
  * @param {module:model/UploadPresignResponse} data The data returned by the service call.
917
959
  * @param {String} response The complete HTTP response.
918
960
  */
919
961
 
920
962
  /**
921
- * Get a presigned URL so that you can upload a file to our AWS S3 bucket
922
- * @param {module:api/PDFApi~getPresignUrlCallback} callback The callback function, accepting three arguments: error, data, response
963
+ * Get a presigned S3 URL for direct file upload
964
+ * Returns a presigned S3 URL for uploading files directly to our S3 bucket. Use this endpoint to upload large files before creating templates or custom files. S3 will respond with a JSON object that you can include in your DocSpring API request. Uploaded files can be used to: - [Create templates](https://docspring.com/docs/api/#tag/templates/post/templates?endpoint_variant=create_template_from_cached_upload) - [Update templates](https://docspring.com/docs/api/#tag/templates/put/templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload) - [Create custom files](https://docspring.com/docs/api/#tag/custom-files/post/custom_files) and then [merge them with other PDFs](https://docspring.com/docs/api/#tag/combine-pdfs/post/combined_submissions)
965
+ * @param {module:api/Client~getPresignUrlCallback} callback The callback function, accepting three arguments: error, data, response
923
966
  * data is of type: {@link module:model/UploadPresignResponse}
924
967
  */
925
968
  }, {
@@ -939,7 +982,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
939
982
 
940
983
  /**
941
984
  * Callback function to receive the result of the getSubmission operation.
942
- * @callback module:api/PDFApi~getSubmissionCallback
985
+ * @callback module:api/Client~getSubmissionCallback
943
986
  * @param {String} error Error message, if any.
944
987
  * @param {module:model/Submission} data The data returned by the service call.
945
988
  * @param {String} response The complete HTTP response.
@@ -947,26 +990,27 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
947
990
 
948
991
  /**
949
992
  * Check the status of a PDF
950
- * @param {String} submissionId
993
+ * Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing.
994
+ * @param {String} submission_id
951
995
  * @param {Object} opts Optional parameters
952
- * @param {Boolean} [includeData]
953
- * @param {module:api/PDFApi~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
996
+ * @param {Boolean} [include_data]
997
+ * @param {module:api/Client~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
954
998
  * data is of type: {@link module:model/Submission}
955
999
  */
956
1000
  }, {
957
1001
  key: "getSubmission",
958
- value: function getSubmission(submissionId, opts, callback) {
1002
+ value: function getSubmission(submission_id, opts, callback) {
959
1003
  opts = opts || {};
960
1004
  var postBody = null;
961
- // verify the required parameter 'submissionId' is set
962
- if (submissionId === undefined || submissionId === null) {
963
- throw new Error("Missing the required parameter 'submissionId' when calling getSubmission");
1005
+ // verify the required parameter 'submission_id' is set
1006
+ if (submission_id === undefined || submission_id === null) {
1007
+ throw new Error("Missing the required parameter 'submission_id' when calling getSubmission");
964
1008
  }
965
1009
  var pathParams = {
966
- 'submission_id': submissionId
1010
+ 'submission_id': submission_id
967
1011
  };
968
1012
  var queryParams = {
969
- 'include_data': opts['includeData']
1013
+ 'include_data': opts['include_data']
970
1014
  };
971
1015
  var headerParams = {};
972
1016
  var formParams = {};
@@ -979,7 +1023,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
979
1023
 
980
1024
  /**
981
1025
  * Callback function to receive the result of the getSubmissionBatch operation.
982
- * @callback module:api/PDFApi~getSubmissionBatchCallback
1026
+ * @callback module:api/Client~getSubmissionBatchCallback
983
1027
  * @param {String} error Error message, if any.
984
1028
  * @param {module:model/SubmissionBatchWithSubmissions} data The data returned by the service call.
985
1029
  * @param {String} response The complete HTTP response.
@@ -987,26 +1031,27 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
987
1031
 
988
1032
  /**
989
1033
  * Check the status of a submission batch job
990
- * @param {String} submissionBatchId
1034
+ * Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing.
1035
+ * @param {String} submission_batch_id
991
1036
  * @param {Object} opts Optional parameters
992
- * @param {Boolean} [includeSubmissions]
993
- * @param {module:api/PDFApi~getSubmissionBatchCallback} callback The callback function, accepting three arguments: error, data, response
1037
+ * @param {Boolean} [include_submissions]
1038
+ * @param {module:api/Client~getSubmissionBatchCallback} callback The callback function, accepting three arguments: error, data, response
994
1039
  * data is of type: {@link module:model/SubmissionBatchWithSubmissions}
995
1040
  */
996
1041
  }, {
997
1042
  key: "getSubmissionBatch",
998
- value: function getSubmissionBatch(submissionBatchId, opts, callback) {
1043
+ value: function getSubmissionBatch(submission_batch_id, opts, callback) {
999
1044
  opts = opts || {};
1000
1045
  var postBody = null;
1001
- // verify the required parameter 'submissionBatchId' is set
1002
- if (submissionBatchId === undefined || submissionBatchId === null) {
1003
- throw new Error("Missing the required parameter 'submissionBatchId' when calling getSubmissionBatch");
1046
+ // verify the required parameter 'submission_batch_id' is set
1047
+ if (submission_batch_id === undefined || submission_batch_id === null) {
1048
+ throw new Error("Missing the required parameter 'submission_batch_id' when calling getSubmissionBatch");
1004
1049
  }
1005
1050
  var pathParams = {
1006
- 'submission_batch_id': submissionBatchId
1051
+ 'submission_batch_id': submission_batch_id
1007
1052
  };
1008
1053
  var queryParams = {
1009
- 'include_submissions': opts['includeSubmissions']
1054
+ 'include_submissions': opts['include_submissions']
1010
1055
  };
1011
1056
  var headerParams = {};
1012
1057
  var formParams = {};
@@ -1019,7 +1064,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1019
1064
 
1020
1065
  /**
1021
1066
  * Callback function to receive the result of the getTemplate operation.
1022
- * @callback module:api/PDFApi~getTemplateCallback
1067
+ * @callback module:api/Client~getTemplateCallback
1023
1068
  * @param {String} error Error message, if any.
1024
1069
  * @param {module:model/TemplatePreview} data The data returned by the service call.
1025
1070
  * @param {String} response The complete HTTP response.
@@ -1027,20 +1072,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1027
1072
 
1028
1073
  /**
1029
1074
  * Check the status of an uploaded template
1030
- * @param {String} templateId
1031
- * @param {module:api/PDFApi~getTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1075
+ * Retrieves information about a template including processing status and document URL. Use this to check if template is ready to view in the template editor or generate PDFs.
1076
+ * @param {String} template_id
1077
+ * @param {module:api/Client~getTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1032
1078
  * data is of type: {@link module:model/TemplatePreview}
1033
1079
  */
1034
1080
  }, {
1035
1081
  key: "getTemplate",
1036
- value: function getTemplate(templateId, callback) {
1082
+ value: function getTemplate(template_id, callback) {
1037
1083
  var postBody = null;
1038
- // verify the required parameter 'templateId' is set
1039
- if (templateId === undefined || templateId === null) {
1040
- throw new Error("Missing the required parameter 'templateId' when calling getTemplate");
1084
+ // verify the required parameter 'template_id' is set
1085
+ if (template_id === undefined || template_id === null) {
1086
+ throw new Error("Missing the required parameter 'template_id' when calling getTemplate");
1041
1087
  }
1042
1088
  var pathParams = {
1043
- 'template_id': templateId
1089
+ 'template_id': template_id
1044
1090
  };
1045
1091
  var queryParams = {};
1046
1092
  var headerParams = {};
@@ -1052,9 +1098,52 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1052
1098
  return this.apiClient.callApi('/templates/{template_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1053
1099
  }
1054
1100
 
1101
+ /**
1102
+ * Callback function to receive the result of the getTemplateModelCode operation.
1103
+ * @callback module:api/Client~getTemplateModelCodeCallback
1104
+ * @param {String} error Error message, if any.
1105
+ * @param {module:model/TemplateModelCodeResponse} data The data returned by the service call.
1106
+ * @param {String} response The complete HTTP response.
1107
+ */
1108
+
1109
+ /**
1110
+ * Generate typed model code for a template
1111
+ * Generates typed model code for a template's submission data from its JSON schema, in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go. Build your submission data with the generated types so your app catches mistakes before it calls the API. `root_type_name` is the type that describes the whole submission data object, qualified with its namespace or package where there is one. Java returns every class in `code`, each under a `// ClassName.java` comment: split them into one file per class. A template with no named fields returns 422, since there are no types to generate. See also: - [Generate Model Code](https://docspring.com/docs/template-editor/generate-model-code/) - Use the generated types
1112
+ * @param {String} template_id
1113
+ * @param {module:model/String} lang The language to generate code for
1114
+ * @param {module:api/Client~getTemplateModelCodeCallback} callback The callback function, accepting three arguments: error, data, response
1115
+ * data is of type: {@link module:model/TemplateModelCodeResponse}
1116
+ */
1117
+ }, {
1118
+ key: "getTemplateModelCode",
1119
+ value: function getTemplateModelCode(template_id, lang, callback) {
1120
+ var postBody = null;
1121
+ // verify the required parameter 'template_id' is set
1122
+ if (template_id === undefined || template_id === null) {
1123
+ throw new Error("Missing the required parameter 'template_id' when calling getTemplateModelCode");
1124
+ }
1125
+ // verify the required parameter 'lang' is set
1126
+ if (lang === undefined || lang === null) {
1127
+ throw new Error("Missing the required parameter 'lang' when calling getTemplateModelCode");
1128
+ }
1129
+ var pathParams = {
1130
+ 'template_id': template_id
1131
+ };
1132
+ var queryParams = {
1133
+ 'lang': lang
1134
+ };
1135
+ var headerParams = {};
1136
+ var formParams = {};
1137
+ var authNames = ['api_token_basic'];
1138
+ var contentTypes = [];
1139
+ var accepts = ['application/json'];
1140
+ var returnType = _TemplateModelCodeResponse["default"];
1141
+ return this.apiClient.callApi('/templates/{template_id}/model_code', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1142
+ }
1143
+
1055
1144
  /**
1056
1145
  * Callback function to receive the result of the getTemplateSchema operation.
1057
- * @callback module:api/PDFApi~getTemplateSchemaCallback
1146
+ * @callback module:api/Client~getTemplateSchemaCallback
1058
1147
  * @param {String} error Error message, if any.
1059
1148
  * @param {module:model/JsonSchema} data The data returned by the service call.
1060
1149
  * @param {String} response The complete HTTP response.
@@ -1062,20 +1151,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1062
1151
 
1063
1152
  /**
1064
1153
  * Fetch the JSON schema for a template
1065
- * @param {String} templateId
1066
- * @param {module:api/PDFApi~getTemplateSchemaCallback} callback The callback function, accepting three arguments: error, data, response
1154
+ * Retrieves the JSON Schema definition for a template's fields. Use this to validate data before submitting it for PDF generation, or to build dynamic forms that match the template's field structure and validation requirements. See also: - [Generate PDFs Guide](https://docspring.com/docs/api-guide/generate-pdfs/generate-pdfs-via-api/) - Use schema to validate submission data
1155
+ * @param {String} template_id
1156
+ * @param {module:api/Client~getTemplateSchemaCallback} callback The callback function, accepting three arguments: error, data, response
1067
1157
  * data is of type: {@link module:model/JsonSchema}
1068
1158
  */
1069
1159
  }, {
1070
1160
  key: "getTemplateSchema",
1071
- value: function getTemplateSchema(templateId, callback) {
1161
+ value: function getTemplateSchema(template_id, callback) {
1072
1162
  var postBody = null;
1073
- // verify the required parameter 'templateId' is set
1074
- if (templateId === undefined || templateId === null) {
1075
- throw new Error("Missing the required parameter 'templateId' when calling getTemplateSchema");
1163
+ // verify the required parameter 'template_id' is set
1164
+ if (template_id === undefined || template_id === null) {
1165
+ throw new Error("Missing the required parameter 'template_id' when calling getTemplateSchema");
1076
1166
  }
1077
1167
  var pathParams = {
1078
- 'template_id': templateId
1168
+ 'template_id': template_id
1079
1169
  };
1080
1170
  var queryParams = {};
1081
1171
  var headerParams = {};
@@ -1087,9 +1177,45 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1087
1177
  return this.apiClient.callApi('/templates/{template_id}/schema', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1088
1178
  }
1089
1179
 
1180
+ /**
1181
+ * Callback function to receive the result of the getWebhook operation.
1182
+ * @callback module:api/Client~getWebhookCallback
1183
+ * @param {String} error Error message, if any.
1184
+ * @param {module:model/Webhook} data The data returned by the service call.
1185
+ * @param {String} response The complete HTTP response.
1186
+ */
1187
+
1188
+ /**
1189
+ * Get a webhook
1190
+ * Retrieves a single webhook by its ID.
1191
+ * @param {String} webhook_id
1192
+ * @param {module:api/Client~getWebhookCallback} callback The callback function, accepting three arguments: error, data, response
1193
+ * data is of type: {@link module:model/Webhook}
1194
+ */
1195
+ }, {
1196
+ key: "getWebhook",
1197
+ value: function getWebhook(webhook_id, callback) {
1198
+ var postBody = null;
1199
+ // verify the required parameter 'webhook_id' is set
1200
+ if (webhook_id === undefined || webhook_id === null) {
1201
+ throw new Error("Missing the required parameter 'webhook_id' when calling getWebhook");
1202
+ }
1203
+ var pathParams = {
1204
+ 'webhook_id': webhook_id
1205
+ };
1206
+ var queryParams = {};
1207
+ var headerParams = {};
1208
+ var formParams = {};
1209
+ var authNames = ['api_token_basic'];
1210
+ var contentTypes = [];
1211
+ var accepts = ['application/json'];
1212
+ var returnType = _Webhook["default"];
1213
+ return this.apiClient.callApi('/webhooks/{webhook_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1214
+ }
1215
+
1090
1216
  /**
1091
1217
  * Callback function to receive the result of the listCombinedSubmissions operation.
1092
- * @callback module:api/PDFApi~listCombinedSubmissionsCallback
1218
+ * @callback module:api/Client~listCombinedSubmissionsCallback
1093
1219
  * @param {String} error Error message, if any.
1094
1220
  * @param {Array.<module:model/CombinedSubmission>} data The data returned by the service call.
1095
1221
  * @param {String} response The complete HTTP response.
@@ -1097,10 +1223,11 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1097
1223
 
1098
1224
  /**
1099
1225
  * Get a list of all combined submissions
1226
+ * Returns a paginated list of combined submissions (merged PDFs) for your account. Includes processing status, expiration details, and download URLs for processed PDFs.
1100
1227
  * @param {Object} opts Optional parameters
1101
1228
  * @param {Number} [page] Default: 1
1102
- * @param {Number} [perPage] Default: 50
1103
- * @param {module:api/PDFApi~listCombinedSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1229
+ * @param {Number} [per_page] Default: 50
1230
+ * @param {module:api/Client~listCombinedSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1104
1231
  * data is of type: {@link Array.<module:model/CombinedSubmission>}
1105
1232
  */
1106
1233
  }, {
@@ -1111,7 +1238,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1111
1238
  var pathParams = {};
1112
1239
  var queryParams = {
1113
1240
  'page': opts['page'],
1114
- 'per_page': opts['perPage']
1241
+ 'per_page': opts['per_page']
1115
1242
  };
1116
1243
  var headerParams = {};
1117
1244
  var formParams = {};
@@ -1124,7 +1251,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1124
1251
 
1125
1252
  /**
1126
1253
  * Callback function to receive the result of the listFolders operation.
1127
- * @callback module:api/PDFApi~listFoldersCallback
1254
+ * @callback module:api/Client~listFoldersCallback
1128
1255
  * @param {String} error Error message, if any.
1129
1256
  * @param {Array.<module:model/Folder>} data The data returned by the service call.
1130
1257
  * @param {String} response The complete HTTP response.
@@ -1132,9 +1259,10 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1132
1259
 
1133
1260
  /**
1134
1261
  * Get a list of all folders
1262
+ * Returns a list of folders in your account. Can be filtered by parent folder ID to retrieve subfolders. Folders help organize templates and maintain a hierarchical structure.
1135
1263
  * @param {Object} opts Optional parameters
1136
- * @param {String} [parentFolderId] Filter By Folder Id
1137
- * @param {module:api/PDFApi~listFoldersCallback} callback The callback function, accepting three arguments: error, data, response
1264
+ * @param {String} [parent_folder_id] Filter By Folder Id
1265
+ * @param {module:api/Client~listFoldersCallback} callback The callback function, accepting three arguments: error, data, response
1138
1266
  * data is of type: {@link Array.<module:model/Folder>}
1139
1267
  */
1140
1268
  }, {
@@ -1144,7 +1272,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1144
1272
  var postBody = null;
1145
1273
  var pathParams = {};
1146
1274
  var queryParams = {
1147
- 'parent_folder_id': opts['parentFolderId']
1275
+ 'parent_folder_id': opts['parent_folder_id']
1148
1276
  };
1149
1277
  var headerParams = {};
1150
1278
  var formParams = {};
@@ -1157,7 +1285,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1157
1285
 
1158
1286
  /**
1159
1287
  * Callback function to receive the result of the listSubmissions operation.
1160
- * @callback module:api/PDFApi~listSubmissionsCallback
1288
+ * @callback module:api/Client~listSubmissionsCallback
1161
1289
  * @param {String} error Error message, if any.
1162
1290
  * @param {module:model/ListSubmissionsResponse} data The data returned by the service call.
1163
1291
  * @param {String} response The complete HTTP response.
@@ -1165,14 +1293,15 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1165
1293
 
1166
1294
  /**
1167
1295
  * List all submissions
1296
+ * Returns a paginated list of all PDF submissions across all templates in your account. Can be filtered by date range and submission type (test/live). Supports cursor-based pagination and optionally includes submission data for each result.
1168
1297
  * @param {Object} opts Optional parameters
1169
1298
  * @param {String} [cursor]
1170
1299
  * @param {Number} [limit]
1171
- * @param {String} [createdAfter]
1172
- * @param {String} [createdBefore]
1300
+ * @param {String} [created_after]
1301
+ * @param {String} [created_before]
1173
1302
  * @param {String} [type]
1174
- * @param {Boolean} [includeData]
1175
- * @param {module:api/PDFApi~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1303
+ * @param {Boolean} [include_data]
1304
+ * @param {module:api/Client~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1176
1305
  * data is of type: {@link module:model/ListSubmissionsResponse}
1177
1306
  */
1178
1307
  }, {
@@ -1184,10 +1313,10 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1184
1313
  var queryParams = {
1185
1314
  'cursor': opts['cursor'],
1186
1315
  'limit': opts['limit'],
1187
- 'created_after': opts['createdAfter'],
1188
- 'created_before': opts['createdBefore'],
1316
+ 'created_after': opts['created_after'],
1317
+ 'created_before': opts['created_before'],
1189
1318
  'type': opts['type'],
1190
- 'include_data': opts['includeData']
1319
+ 'include_data': opts['include_data']
1191
1320
  };
1192
1321
  var headerParams = {};
1193
1322
  var formParams = {};
@@ -1200,7 +1329,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1200
1329
 
1201
1330
  /**
1202
1331
  * Callback function to receive the result of the listTemplateSubmissions operation.
1203
- * @callback module:api/PDFApi~listTemplateSubmissionsCallback
1332
+ * @callback module:api/Client~listTemplateSubmissionsCallback
1204
1333
  * @param {String} error Error message, if any.
1205
1334
  * @param {module:model/ListSubmissionsResponse} data The data returned by the service call.
1206
1335
  * @param {String} response The complete HTTP response.
@@ -1208,36 +1337,37 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1208
1337
 
1209
1338
  /**
1210
1339
  * List all submissions for a given template
1211
- * @param {String} templateId
1340
+ * Returns a paginated list of all submissions for a specific template. Can be filtered by date range, submission type (test/live), and optionally include submission data. Supports cursor-based pagination for efficient retrieval of large result sets.
1341
+ * @param {String} template_id
1212
1342
  * @param {Object} opts Optional parameters
1213
1343
  * @param {String} [cursor]
1214
1344
  * @param {Number} [limit]
1215
- * @param {String} [createdAfter]
1216
- * @param {String} [createdBefore]
1345
+ * @param {String} [created_after]
1346
+ * @param {String} [created_before]
1217
1347
  * @param {String} [type]
1218
- * @param {Boolean} [includeData]
1219
- * @param {module:api/PDFApi~listTemplateSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1348
+ * @param {Boolean} [include_data]
1349
+ * @param {module:api/Client~listTemplateSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1220
1350
  * data is of type: {@link module:model/ListSubmissionsResponse}
1221
1351
  */
1222
1352
  }, {
1223
1353
  key: "listTemplateSubmissions",
1224
- value: function listTemplateSubmissions(templateId, opts, callback) {
1354
+ value: function listTemplateSubmissions(template_id, opts, callback) {
1225
1355
  opts = opts || {};
1226
1356
  var postBody = null;
1227
- // verify the required parameter 'templateId' is set
1228
- if (templateId === undefined || templateId === null) {
1229
- throw new Error("Missing the required parameter 'templateId' when calling listTemplateSubmissions");
1357
+ // verify the required parameter 'template_id' is set
1358
+ if (template_id === undefined || template_id === null) {
1359
+ throw new Error("Missing the required parameter 'template_id' when calling listTemplateSubmissions");
1230
1360
  }
1231
1361
  var pathParams = {
1232
- 'template_id': templateId
1362
+ 'template_id': template_id
1233
1363
  };
1234
1364
  var queryParams = {
1235
1365
  'cursor': opts['cursor'],
1236
1366
  'limit': opts['limit'],
1237
- 'created_after': opts['createdAfter'],
1238
- 'created_before': opts['createdBefore'],
1367
+ 'created_after': opts['created_after'],
1368
+ 'created_before': opts['created_before'],
1239
1369
  'type': opts['type'],
1240
- 'include_data': opts['includeData']
1370
+ 'include_data': opts['include_data']
1241
1371
  };
1242
1372
  var headerParams = {};
1243
1373
  var formParams = {};
@@ -1250,7 +1380,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1250
1380
 
1251
1381
  /**
1252
1382
  * Callback function to receive the result of the listTemplates operation.
1253
- * @callback module:api/PDFApi~listTemplatesCallback
1383
+ * @callback module:api/Client~listTemplatesCallback
1254
1384
  * @param {String} error Error message, if any.
1255
1385
  * @param {Array.<module:model/TemplatePreview>} data The data returned by the service call.
1256
1386
  * @param {String} response The complete HTTP response.
@@ -1258,12 +1388,13 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1258
1388
 
1259
1389
  /**
1260
1390
  * Get a list of all templates
1391
+ * Retrieves a list of your templates with search, filtering, and pagination options. Returns basic template information including ID, name, type (PDF or HTML), and folder location. Supports text search by name and filtering by parent folder.
1261
1392
  * @param {Object} opts Optional parameters
1262
1393
  * @param {String} [query] Search By Name
1263
- * @param {String} [parentFolderId] Filter By Folder Id
1394
+ * @param {String} [parent_folder_id] Filter By Folder Id
1264
1395
  * @param {Number} [page] Default: 1
1265
- * @param {Number} [perPage] Default: 50
1266
- * @param {module:api/PDFApi~listTemplatesCallback} callback The callback function, accepting three arguments: error, data, response
1396
+ * @param {Number} [per_page] Default: 50
1397
+ * @param {module:api/Client~listTemplatesCallback} callback The callback function, accepting three arguments: error, data, response
1267
1398
  * data is of type: {@link Array.<module:model/TemplatePreview>}
1268
1399
  */
1269
1400
  }, {
@@ -1274,9 +1405,9 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1274
1405
  var pathParams = {};
1275
1406
  var queryParams = {
1276
1407
  'query': opts['query'],
1277
- 'parent_folder_id': opts['parentFolderId'],
1408
+ 'parent_folder_id': opts['parent_folder_id'],
1278
1409
  'page': opts['page'],
1279
- 'per_page': opts['perPage']
1410
+ 'per_page': opts['per_page']
1280
1411
  };
1281
1412
  var headerParams = {};
1282
1413
  var formParams = {};
@@ -1287,9 +1418,55 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1287
1418
  return this.apiClient.callApi('/templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1288
1419
  }
1289
1420
 
1421
+ /**
1422
+ * Callback function to receive the result of the listWebhooks operation.
1423
+ * @callback module:api/Client~listWebhooksCallback
1424
+ * @param {String} error Error message, if any.
1425
+ * @param {Array.<module:model/Webhook>} data The data returned by the service call.
1426
+ * @param {String} response The complete HTTP response.
1427
+ */
1428
+
1429
+ /**
1430
+ * Get a list of all webhooks
1431
+ * Returns a list of the webhooks configured for your account. Supports pagination and filtering by event type, mode, and the API token, template, or folder a webhook is scoped to.
1432
+ * @param {Object} opts Optional parameters
1433
+ * @param {Number} [page] Default: 1
1434
+ * @param {Number} [per_page] Default: 50
1435
+ * @param {String} [event_type] Filter by a subscribed event type
1436
+ * @param {String} [mode] Filter by mode (test or live)
1437
+ * @param {String} [template_id] Filter by a scoped template ID
1438
+ * @param {String} [folder_id] Filter by a scoped folder ID
1439
+ * @param {String} [api_token_id] Filter by a scoped API token ID
1440
+ * @param {module:api/Client~listWebhooksCallback} callback The callback function, accepting three arguments: error, data, response
1441
+ * data is of type: {@link Array.<module:model/Webhook>}
1442
+ */
1443
+ }, {
1444
+ key: "listWebhooks",
1445
+ value: function listWebhooks(opts, callback) {
1446
+ opts = opts || {};
1447
+ var postBody = null;
1448
+ var pathParams = {};
1449
+ var queryParams = {
1450
+ 'page': opts['page'],
1451
+ 'per_page': opts['per_page'],
1452
+ 'event_type': opts['event_type'],
1453
+ 'mode': opts['mode'],
1454
+ 'template_id': opts['template_id'],
1455
+ 'folder_id': opts['folder_id'],
1456
+ 'api_token_id': opts['api_token_id']
1457
+ };
1458
+ var headerParams = {};
1459
+ var formParams = {};
1460
+ var authNames = ['api_token_basic'];
1461
+ var contentTypes = [];
1462
+ var accepts = ['application/json'];
1463
+ var returnType = [_Webhook["default"]];
1464
+ return this.apiClient.callApi('/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1465
+ }
1466
+
1290
1467
  /**
1291
1468
  * Callback function to receive the result of the moveFolderToFolder operation.
1292
- * @callback module:api/PDFApi~moveFolderToFolderCallback
1469
+ * @callback module:api/Client~moveFolderToFolderCallback
1293
1470
  * @param {String} error Error message, if any.
1294
1471
  * @param {module:model/Folder} data The data returned by the service call.
1295
1472
  * @param {String} response The complete HTTP response.
@@ -1297,25 +1474,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1297
1474
 
1298
1475
  /**
1299
1476
  * Move a folder
1300
- * @param {String} folderId
1477
+ * Moves a folder to a new parent folder or to the root level. All templates and subfolders within the folder are moved together. Cannot move a folder into one of its own subfolders.
1478
+ * @param {String} folder_id
1301
1479
  * @param {module:model/MoveFolderData} data
1302
- * @param {module:api/PDFApi~moveFolderToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1480
+ * @param {module:api/Client~moveFolderToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1303
1481
  * data is of type: {@link module:model/Folder}
1304
1482
  */
1305
1483
  }, {
1306
1484
  key: "moveFolderToFolder",
1307
- value: function moveFolderToFolder(folderId, data, callback) {
1485
+ value: function moveFolderToFolder(folder_id, data, callback) {
1308
1486
  var postBody = data;
1309
- // verify the required parameter 'folderId' is set
1310
- if (folderId === undefined || folderId === null) {
1311
- throw new Error("Missing the required parameter 'folderId' when calling moveFolderToFolder");
1487
+ // verify the required parameter 'folder_id' is set
1488
+ if (folder_id === undefined || folder_id === null) {
1489
+ throw new Error("Missing the required parameter 'folder_id' when calling moveFolderToFolder");
1312
1490
  }
1313
1491
  // verify the required parameter 'data' is set
1314
1492
  if (data === undefined || data === null) {
1315
1493
  throw new Error("Missing the required parameter 'data' when calling moveFolderToFolder");
1316
1494
  }
1317
1495
  var pathParams = {
1318
- 'folder_id': folderId
1496
+ 'folder_id': folder_id
1319
1497
  };
1320
1498
  var queryParams = {};
1321
1499
  var headerParams = {};
@@ -1329,7 +1507,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1329
1507
 
1330
1508
  /**
1331
1509
  * Callback function to receive the result of the moveTemplateToFolder operation.
1332
- * @callback module:api/PDFApi~moveTemplateToFolderCallback
1510
+ * @callback module:api/Client~moveTemplateToFolderCallback
1333
1511
  * @param {String} error Error message, if any.
1334
1512
  * @param {module:model/TemplatePreview} data The data returned by the service call.
1335
1513
  * @param {String} response The complete HTTP response.
@@ -1337,25 +1515,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1337
1515
 
1338
1516
  /**
1339
1517
  * Move Template to folder
1340
- * @param {String} templateId
1518
+ * Moves a template to a different folder or to the root level. Use this to organize templates within your folders. Provide a folder ID to move to a specific folder, or `null` to move to the root level.
1519
+ * @param {String} template_id
1341
1520
  * @param {module:model/MoveTemplateData} data
1342
- * @param {module:api/PDFApi~moveTemplateToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1521
+ * @param {module:api/Client~moveTemplateToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1343
1522
  * data is of type: {@link module:model/TemplatePreview}
1344
1523
  */
1345
1524
  }, {
1346
1525
  key: "moveTemplateToFolder",
1347
- value: function moveTemplateToFolder(templateId, data, callback) {
1526
+ value: function moveTemplateToFolder(template_id, data, callback) {
1348
1527
  var postBody = data;
1349
- // verify the required parameter 'templateId' is set
1350
- if (templateId === undefined || templateId === null) {
1351
- throw new Error("Missing the required parameter 'templateId' when calling moveTemplateToFolder");
1528
+ // verify the required parameter 'template_id' is set
1529
+ if (template_id === undefined || template_id === null) {
1530
+ throw new Error("Missing the required parameter 'template_id' when calling moveTemplateToFolder");
1352
1531
  }
1353
1532
  // verify the required parameter 'data' is set
1354
1533
  if (data === undefined || data === null) {
1355
1534
  throw new Error("Missing the required parameter 'data' when calling moveTemplateToFolder");
1356
1535
  }
1357
1536
  var pathParams = {
1358
- 'template_id': templateId
1537
+ 'template_id': template_id
1359
1538
  };
1360
1539
  var queryParams = {};
1361
1540
  var headerParams = {};
@@ -1369,7 +1548,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1369
1548
 
1370
1549
  /**
1371
1550
  * Callback function to receive the result of the publishTemplateVersion operation.
1372
- * @callback module:api/PDFApi~publishTemplateVersionCallback
1551
+ * @callback module:api/Client~publishTemplateVersionCallback
1373
1552
  * @param {String} error Error message, if any.
1374
1553
  * @param {module:model/TemplatePublishVersionResponse} data The data returned by the service call.
1375
1554
  * @param {String} response The complete HTTP response.
@@ -1377,25 +1556,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1377
1556
 
1378
1557
  /**
1379
1558
  * Publish a template version
1380
- * @param {String} templateId
1559
+ * Publishes the current draft version of a template and creates a new immutable version with semantic versioning (major.minor.patch).
1560
+ * @param {String} template_id
1381
1561
  * @param {module:model/PublishVersionData} data
1382
- * @param {module:api/PDFApi~publishTemplateVersionCallback} callback The callback function, accepting three arguments: error, data, response
1562
+ * @param {module:api/Client~publishTemplateVersionCallback} callback The callback function, accepting three arguments: error, data, response
1383
1563
  * data is of type: {@link module:model/TemplatePublishVersionResponse}
1384
1564
  */
1385
1565
  }, {
1386
1566
  key: "publishTemplateVersion",
1387
- value: function publishTemplateVersion(templateId, data, callback) {
1567
+ value: function publishTemplateVersion(template_id, data, callback) {
1388
1568
  var postBody = data;
1389
- // verify the required parameter 'templateId' is set
1390
- if (templateId === undefined || templateId === null) {
1391
- throw new Error("Missing the required parameter 'templateId' when calling publishTemplateVersion");
1569
+ // verify the required parameter 'template_id' is set
1570
+ if (template_id === undefined || template_id === null) {
1571
+ throw new Error("Missing the required parameter 'template_id' when calling publishTemplateVersion");
1392
1572
  }
1393
1573
  // verify the required parameter 'data' is set
1394
1574
  if (data === undefined || data === null) {
1395
1575
  throw new Error("Missing the required parameter 'data' when calling publishTemplateVersion");
1396
1576
  }
1397
1577
  var pathParams = {
1398
- 'template_id': templateId
1578
+ 'template_id': template_id
1399
1579
  };
1400
1580
  var queryParams = {};
1401
1581
  var headerParams = {};
@@ -1409,7 +1589,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1409
1589
 
1410
1590
  /**
1411
1591
  * Callback function to receive the result of the renameFolder operation.
1412
- * @callback module:api/PDFApi~renameFolderCallback
1592
+ * @callback module:api/Client~renameFolderCallback
1413
1593
  * @param {String} error Error message, if any.
1414
1594
  * @param {module:model/Folder} data The data returned by the service call.
1415
1595
  * @param {String} response The complete HTTP response.
@@ -1417,25 +1597,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1417
1597
 
1418
1598
  /**
1419
1599
  * Rename a folder
1420
- * @param {String} folderId
1600
+ * Renames an existing folder. The new name must be unique within the same parent folder. This operation only changes the folder name, not its location or contents.
1601
+ * @param {String} folder_id
1421
1602
  * @param {module:model/RenameFolderData} data
1422
- * @param {module:api/PDFApi~renameFolderCallback} callback The callback function, accepting three arguments: error, data, response
1603
+ * @param {module:api/Client~renameFolderCallback} callback The callback function, accepting three arguments: error, data, response
1423
1604
  * data is of type: {@link module:model/Folder}
1424
1605
  */
1425
1606
  }, {
1426
1607
  key: "renameFolder",
1427
- value: function renameFolder(folderId, data, callback) {
1608
+ value: function renameFolder(folder_id, data, callback) {
1428
1609
  var postBody = data;
1429
- // verify the required parameter 'folderId' is set
1430
- if (folderId === undefined || folderId === null) {
1431
- throw new Error("Missing the required parameter 'folderId' when calling renameFolder");
1610
+ // verify the required parameter 'folder_id' is set
1611
+ if (folder_id === undefined || folder_id === null) {
1612
+ throw new Error("Missing the required parameter 'folder_id' when calling renameFolder");
1432
1613
  }
1433
1614
  // verify the required parameter 'data' is set
1434
1615
  if (data === undefined || data === null) {
1435
1616
  throw new Error("Missing the required parameter 'data' when calling renameFolder");
1436
1617
  }
1437
1618
  var pathParams = {
1438
- 'folder_id': folderId
1619
+ 'folder_id': folder_id
1439
1620
  };
1440
1621
  var queryParams = {};
1441
1622
  var headerParams = {};
@@ -1449,7 +1630,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1449
1630
 
1450
1631
  /**
1451
1632
  * Callback function to receive the result of the restoreTemplateVersion operation.
1452
- * @callback module:api/PDFApi~restoreTemplateVersionCallback
1633
+ * @callback module:api/Client~restoreTemplateVersionCallback
1453
1634
  * @param {String} error Error message, if any.
1454
1635
  * @param {module:model/SuccessErrorResponse} data The data returned by the service call.
1455
1636
  * @param {String} response The complete HTTP response.
@@ -1457,25 +1638,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1457
1638
 
1458
1639
  /**
1459
1640
  * Restore a template version
1460
- * @param {String} templateId
1641
+ * Restores your template to a previously published version, copying that version's content and configuration to the current draft. Use this to revert changes or recover from an unwanted modification.
1642
+ * @param {String} template_id
1461
1643
  * @param {module:model/RestoreVersionData} data
1462
- * @param {module:api/PDFApi~restoreTemplateVersionCallback} callback The callback function, accepting three arguments: error, data, response
1644
+ * @param {module:api/Client~restoreTemplateVersionCallback} callback The callback function, accepting three arguments: error, data, response
1463
1645
  * data is of type: {@link module:model/SuccessErrorResponse}
1464
1646
  */
1465
1647
  }, {
1466
1648
  key: "restoreTemplateVersion",
1467
- value: function restoreTemplateVersion(templateId, data, callback) {
1649
+ value: function restoreTemplateVersion(template_id, data, callback) {
1468
1650
  var postBody = data;
1469
- // verify the required parameter 'templateId' is set
1470
- if (templateId === undefined || templateId === null) {
1471
- throw new Error("Missing the required parameter 'templateId' when calling restoreTemplateVersion");
1651
+ // verify the required parameter 'template_id' is set
1652
+ if (template_id === undefined || template_id === null) {
1653
+ throw new Error("Missing the required parameter 'template_id' when calling restoreTemplateVersion");
1472
1654
  }
1473
1655
  // verify the required parameter 'data' is set
1474
1656
  if (data === undefined || data === null) {
1475
1657
  throw new Error("Missing the required parameter 'data' when calling restoreTemplateVersion");
1476
1658
  }
1477
1659
  var pathParams = {
1478
- 'template_id': templateId
1660
+ 'template_id': template_id
1479
1661
  };
1480
1662
  var queryParams = {};
1481
1663
  var headerParams = {};
@@ -1489,15 +1671,16 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1489
1671
 
1490
1672
  /**
1491
1673
  * Callback function to receive the result of the testAuthentication operation.
1492
- * @callback module:api/PDFApi~testAuthenticationCallback
1674
+ * @callback module:api/Client~testAuthenticationCallback
1493
1675
  * @param {String} error Error message, if any.
1494
1676
  * @param {module:model/SuccessErrorResponse} data The data returned by the service call.
1495
1677
  * @param {String} response The complete HTTP response.
1496
1678
  */
1497
1679
 
1498
1680
  /**
1499
- * Test Authentication
1500
- * @param {module:api/PDFApi~testAuthenticationCallback} callback The callback function, accepting three arguments: error, data, response
1681
+ * Test authentication
1682
+ * Checks whether your API token is valid by making an authenticated request. Returns a success response if authentication passes. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
1683
+ * @param {module:api/Client~testAuthenticationCallback} callback The callback function, accepting three arguments: error, data, response
1501
1684
  * data is of type: {@link module:model/SuccessErrorResponse}
1502
1685
  */
1503
1686
  }, {
@@ -1517,7 +1700,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1517
1700
 
1518
1701
  /**
1519
1702
  * Callback function to receive the result of the updateDataRequest operation.
1520
- * @callback module:api/PDFApi~updateDataRequestCallback
1703
+ * @callback module:api/Client~updateDataRequestCallback
1521
1704
  * @param {String} error Error message, if any.
1522
1705
  * @param {module:model/CreateSubmissionDataRequestResponse} data The data returned by the service call.
1523
1706
  * @param {String} response The complete HTTP response.
@@ -1525,25 +1708,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1525
1708
 
1526
1709
  /**
1527
1710
  * Update a submission data request
1528
- * @param {String} dataRequestId
1711
+ * Updates authentication details for a data request. Use this when a user logs in to record their authentication method, provider, session information, and hashed identifiers. Updates metadata and tracks authentication state changes for auditing and compliance.
1712
+ * @param {String} data_request_id
1529
1713
  * @param {module:model/UpdateSubmissionDataRequestData} data
1530
- * @param {module:api/PDFApi~updateDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
1714
+ * @param {module:api/Client~updateDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
1531
1715
  * data is of type: {@link module:model/CreateSubmissionDataRequestResponse}
1532
1716
  */
1533
1717
  }, {
1534
1718
  key: "updateDataRequest",
1535
- value: function updateDataRequest(dataRequestId, data, callback) {
1719
+ value: function updateDataRequest(data_request_id, data, callback) {
1536
1720
  var postBody = data;
1537
- // verify the required parameter 'dataRequestId' is set
1538
- if (dataRequestId === undefined || dataRequestId === null) {
1539
- throw new Error("Missing the required parameter 'dataRequestId' when calling updateDataRequest");
1721
+ // verify the required parameter 'data_request_id' is set
1722
+ if (data_request_id === undefined || data_request_id === null) {
1723
+ throw new Error("Missing the required parameter 'data_request_id' when calling updateDataRequest");
1540
1724
  }
1541
1725
  // verify the required parameter 'data' is set
1542
1726
  if (data === undefined || data === null) {
1543
1727
  throw new Error("Missing the required parameter 'data' when calling updateDataRequest");
1544
1728
  }
1545
1729
  var pathParams = {
1546
- 'data_request_id': dataRequestId
1730
+ 'data_request_id': data_request_id
1547
1731
  };
1548
1732
  var queryParams = {};
1549
1733
  var headerParams = {};
@@ -1557,7 +1741,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1557
1741
 
1558
1742
  /**
1559
1743
  * Callback function to receive the result of the updateTemplate operation.
1560
- * @callback module:api/PDFApi~updateTemplateCallback
1744
+ * @callback module:api/Client~updateTemplateCallback
1561
1745
  * @param {String} error Error message, if any.
1562
1746
  * @param {module:model/SuccessMultipleErrorsResponse} data The data returned by the service call.
1563
1747
  * @param {String} response The complete HTTP response.
@@ -1565,25 +1749,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1565
1749
 
1566
1750
  /**
1567
1751
  * Update a Template
1568
- * @param {String} templateId
1752
+ * Updates template content and properties. For HTML templates, you can modify the HTML, SCSS, headers, footers, name, and description. Changes are applied to your draft template and do not affect published template versions. The exception is `parent_folder_id`: moving the template to another folder moves its published versions too.
1753
+ * @param {String} template_id
1569
1754
  * @param {module:model/UpdateHtmlTemplate} data
1570
- * @param {module:api/PDFApi~updateTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1755
+ * @param {module:api/Client~updateTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1571
1756
  * data is of type: {@link module:model/SuccessMultipleErrorsResponse}
1572
1757
  */
1573
1758
  }, {
1574
1759
  key: "updateTemplate",
1575
- value: function updateTemplate(templateId, data, callback) {
1760
+ value: function updateTemplate(template_id, data, callback) {
1576
1761
  var postBody = data;
1577
- // verify the required parameter 'templateId' is set
1578
- if (templateId === undefined || templateId === null) {
1579
- throw new Error("Missing the required parameter 'templateId' when calling updateTemplate");
1762
+ // verify the required parameter 'template_id' is set
1763
+ if (template_id === undefined || template_id === null) {
1764
+ throw new Error("Missing the required parameter 'template_id' when calling updateTemplate");
1580
1765
  }
1581
1766
  // verify the required parameter 'data' is set
1582
1767
  if (data === undefined || data === null) {
1583
1768
  throw new Error("Missing the required parameter 'data' when calling updateTemplate");
1584
1769
  }
1585
1770
  var pathParams = {
1586
- 'template_id': templateId
1771
+ 'template_id': template_id
1587
1772
  };
1588
1773
  var queryParams = {};
1589
1774
  var headerParams = {};
@@ -1594,5 +1779,134 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1594
1779
  var returnType = _SuccessMultipleErrorsResponse["default"];
1595
1780
  return this.apiClient.callApi('/templates/{template_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1596
1781
  }
1782
+
1783
+ /**
1784
+ * Callback function to receive the result of the updateTemplateDocument operation.
1785
+ * @callback module:api/Client~updateTemplateDocumentCallback
1786
+ * @param {String} error Error message, if any.
1787
+ * @param {module:model/SuccessMultipleErrorsResponse} data The data returned by the service call.
1788
+ * @param {String} response The complete HTTP response.
1789
+ */
1790
+
1791
+ /**
1792
+ * Update a template's document with a form POST file upload
1793
+ * Upload a new PDF file to update a PDF template's document. This replaces the template's PDF while preserving all of the existing fields. If you upload a PDF with fewer pages than the current document, any fields on the removed pages will be deleted.
1794
+ * @param {String} template_id
1795
+ * @param {File} template_document
1796
+ * @param {Object} opts Optional parameters
1797
+ * @param {String} [template_name]
1798
+ * @param {module:api/Client~updateTemplateDocumentCallback} callback The callback function, accepting three arguments: error, data, response
1799
+ * data is of type: {@link module:model/SuccessMultipleErrorsResponse}
1800
+ */
1801
+ }, {
1802
+ key: "updateTemplateDocument",
1803
+ value: function updateTemplateDocument(template_id, template_document, opts, callback) {
1804
+ opts = opts || {};
1805
+ var postBody = null;
1806
+ // verify the required parameter 'template_id' is set
1807
+ if (template_id === undefined || template_id === null) {
1808
+ throw new Error("Missing the required parameter 'template_id' when calling updateTemplateDocument");
1809
+ }
1810
+ // verify the required parameter 'template_document' is set
1811
+ if (template_document === undefined || template_document === null) {
1812
+ throw new Error("Missing the required parameter 'template_document' when calling updateTemplateDocument");
1813
+ }
1814
+ var pathParams = {
1815
+ 'template_id': template_id
1816
+ };
1817
+ var queryParams = {};
1818
+ var headerParams = {};
1819
+ var formParams = {
1820
+ 'template[document]': template_document,
1821
+ 'template[name]': opts['template_name']
1822
+ };
1823
+ var authNames = ['api_token_basic'];
1824
+ var contentTypes = ['multipart/form-data'];
1825
+ var accepts = ['application/json'];
1826
+ var returnType = _SuccessMultipleErrorsResponse["default"];
1827
+ return this.apiClient.callApi('/templates/{template_id}?endpoint_variant=update_template_pdf_with_form_post', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1828
+ }
1829
+
1830
+ /**
1831
+ * Callback function to receive the result of the updateTemplateDocumentFromUpload operation.
1832
+ * @callback module:api/Client~updateTemplateDocumentFromUploadCallback
1833
+ * @param {String} error Error message, if any.
1834
+ * @param {module:model/SuccessMultipleErrorsResponse} data The data returned by the service call.
1835
+ * @param {String} response The complete HTTP response.
1836
+ */
1837
+
1838
+ /**
1839
+ * Update a template's document with a cached S3 file upload
1840
+ * Updates a PDF template's document using a cached file upload. This is a three-step process: First, request a presigned URL to upload your PDF file to our S3 bucket. Then, use that URL to upload your PDF file. Finally, submit the ID of the uploaded file to replace the template's document.
1841
+ * @param {String} template_id
1842
+ * @param {module:model/UpdatePdfTemplate} data
1843
+ * @param {module:api/Client~updateTemplateDocumentFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
1844
+ * data is of type: {@link module:model/SuccessMultipleErrorsResponse}
1845
+ */
1846
+ }, {
1847
+ key: "updateTemplateDocumentFromUpload",
1848
+ value: function updateTemplateDocumentFromUpload(template_id, data, callback) {
1849
+ var postBody = data;
1850
+ // verify the required parameter 'template_id' is set
1851
+ if (template_id === undefined || template_id === null) {
1852
+ throw new Error("Missing the required parameter 'template_id' when calling updateTemplateDocumentFromUpload");
1853
+ }
1854
+ // verify the required parameter 'data' is set
1855
+ if (data === undefined || data === null) {
1856
+ throw new Error("Missing the required parameter 'data' when calling updateTemplateDocumentFromUpload");
1857
+ }
1858
+ var pathParams = {
1859
+ 'template_id': template_id
1860
+ };
1861
+ var queryParams = {};
1862
+ var headerParams = {};
1863
+ var formParams = {};
1864
+ var authNames = ['api_token_basic'];
1865
+ var contentTypes = ['application/json'];
1866
+ var accepts = ['application/json'];
1867
+ var returnType = _SuccessMultipleErrorsResponse["default"];
1868
+ return this.apiClient.callApi('/templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1869
+ }
1870
+
1871
+ /**
1872
+ * Callback function to receive the result of the updateWebhook operation.
1873
+ * @callback module:api/Client~updateWebhookCallback
1874
+ * @param {String} error Error message, if any.
1875
+ * @param {module:model/Webhook} data The data returned by the service call.
1876
+ * @param {String} response The complete HTTP response.
1877
+ */
1878
+
1879
+ /**
1880
+ * Update a webhook
1881
+ * Updates the configuration of an existing webhook.
1882
+ * @param {String} webhook_id
1883
+ * @param {module:model/UpdateWebhookData} data
1884
+ * @param {module:api/Client~updateWebhookCallback} callback The callback function, accepting three arguments: error, data, response
1885
+ * data is of type: {@link module:model/Webhook}
1886
+ */
1887
+ }, {
1888
+ key: "updateWebhook",
1889
+ value: function updateWebhook(webhook_id, data, callback) {
1890
+ var postBody = data;
1891
+ // verify the required parameter 'webhook_id' is set
1892
+ if (webhook_id === undefined || webhook_id === null) {
1893
+ throw new Error("Missing the required parameter 'webhook_id' when calling updateWebhook");
1894
+ }
1895
+ // verify the required parameter 'data' is set
1896
+ if (data === undefined || data === null) {
1897
+ throw new Error("Missing the required parameter 'data' when calling updateWebhook");
1898
+ }
1899
+ var pathParams = {
1900
+ 'webhook_id': webhook_id
1901
+ };
1902
+ var queryParams = {};
1903
+ var headerParams = {};
1904
+ var formParams = {};
1905
+ var authNames = ['api_token_basic'];
1906
+ var contentTypes = ['application/json'];
1907
+ var accepts = ['application/json'];
1908
+ var returnType = _Webhook["default"];
1909
+ return this.apiClient.callApi('/webhooks/{webhook_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1910
+ }
1597
1911
  }]);
1598
1912
  }();