docspring 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +53 -46
  2. package/dist/ApiClient.js +3 -3
  3. package/dist/api/{PDFApi.js → Client.js} +534 -372
  4. package/dist/index.js +52 -17
  5. package/dist/model/AddFieldsData.js +2 -2
  6. package/dist/model/BatchGeneratePdfs201Response.js +7 -7
  7. package/dist/model/CombinePdfsData.js +7 -7
  8. package/dist/model/CombinedSubmission.js +21 -21
  9. package/dist/model/CombinedSubmissionAction.js +13 -13
  10. package/dist/model/CopyTemplateOptions.js +7 -7
  11. package/dist/model/CreateCombinedSubmissionResponse.js +7 -7
  12. package/dist/model/CreateCustomFileData.js +7 -7
  13. package/dist/model/CreateCustomFileResponse.js +7 -7
  14. package/dist/model/CreateFolderData.js +2 -2
  15. package/dist/model/CreateHtmlTemplate.js +2 -2
  16. package/dist/model/CreatePdfSubmissionData.js +14 -2
  17. package/dist/model/CreatePdfTemplate.js +2 -2
  18. package/dist/model/CreateSubmissionDataRequestData.js +106 -2
  19. package/dist/model/CreateSubmissionDataRequestEventRequest.js +31 -7
  20. package/dist/model/CreateSubmissionDataRequestEventResponse.js +2 -2
  21. package/dist/model/CreateSubmissionDataRequestResponse.js +7 -7
  22. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +2 -2
  23. package/dist/model/CreateSubmissionResponse.js +2 -2
  24. package/dist/model/CustomFile.js +2 -2
  25. package/dist/model/ErrorOrMultipleErrorsResponse.js +151 -0
  26. package/dist/model/ErrorResponse.js +2 -2
  27. package/dist/model/Folder.js +7 -7
  28. package/dist/model/JsonSchema.js +2 -2
  29. package/dist/model/ListSubmissionsResponse.js +7 -7
  30. package/dist/model/MoveFolderData.js +2 -2
  31. package/dist/model/MoveTemplateData.js +7 -7
  32. package/dist/model/MultipleErrorsResponse.js +2 -2
  33. package/dist/model/PublishVersionData.js +124 -0
  34. package/dist/model/RenameFolderData.js +2 -2
  35. package/dist/model/RestoreVersionData.js +112 -0
  36. package/dist/model/Submission.js +78 -32
  37. package/dist/model/Submission422Response.js +165 -0
  38. package/dist/model/SubmissionAction.js +13 -13
  39. package/dist/model/SubmissionBatch.js +15 -15
  40. package/dist/model/SubmissionBatchData.js +26 -2
  41. package/dist/model/SubmissionBatchWithSubmissions.js +15 -15
  42. package/dist/model/SubmissionDataRequest.js +31 -31
  43. package/dist/model/SubmissionDataRequestEvent.js +17 -17
  44. package/dist/model/SubmissionDataRequestShow.js +33 -33
  45. package/dist/model/SubmissionDataRequestToken.js +9 -9
  46. package/dist/model/SubmissionPreview.js +78 -32
  47. package/dist/model/SuccessErrorResponse.js +2 -2
  48. package/dist/model/SuccessMultipleErrorsResponse.js +2 -2
  49. package/dist/model/Template.js +194 -78
  50. package/dist/model/TemplateAddFieldsResponse.js +2 -2
  51. package/dist/model/TemplateDeleteResponse.js +166 -0
  52. package/dist/model/TemplatePreview.js +168 -66
  53. package/dist/model/{CombinedSubmissionData.js → TemplatePublishVersionResponse.js} +56 -52
  54. package/dist/model/UpdateHtmlTemplate.js +2 -2
  55. package/dist/model/UpdatePdfTemplate.js +108 -0
  56. package/dist/model/UpdateSubmissionDataRequestData.js +153 -2
  57. package/dist/model/UploadPresignResponse.js +2 -2
  58. package/package.json +1 -1
  59. package/dist/model/CreateHtmlSubmissionData.js +0 -161
@@ -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,7 @@ 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 _ErrorOrMultipleErrorsResponse = _interopRequireDefault(require("../model/ErrorOrMultipleErrorsResponse"));
27
26
  var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
28
27
  var _Folder = _interopRequireDefault(require("../model/Folder"));
29
28
  var _JsonSchema = _interopRequireDefault(require("../model/JsonSchema"));
@@ -31,8 +30,11 @@ var _ListSubmissionsResponse = _interopRequireDefault(require("../model/ListSubm
31
30
  var _MoveFolderData = _interopRequireDefault(require("../model/MoveFolderData"));
32
31
  var _MoveTemplateData = _interopRequireDefault(require("../model/MoveTemplateData"));
33
32
  var _MultipleErrorsResponse = _interopRequireDefault(require("../model/MultipleErrorsResponse"));
33
+ var _PublishVersionData = _interopRequireDefault(require("../model/PublishVersionData"));
34
34
  var _RenameFolderData = _interopRequireDefault(require("../model/RenameFolderData"));
35
+ var _RestoreVersionData = _interopRequireDefault(require("../model/RestoreVersionData"));
35
36
  var _Submission = _interopRequireDefault(require("../model/Submission"));
37
+ var _Submission422Response = _interopRequireDefault(require("../model/Submission422Response"));
36
38
  var _SubmissionBatchData = _interopRequireDefault(require("../model/SubmissionBatchData"));
37
39
  var _SubmissionBatchWithSubmissions = _interopRequireDefault(require("../model/SubmissionBatchWithSubmissions"));
38
40
  var _SubmissionDataRequestShow = _interopRequireDefault(require("../model/SubmissionDataRequestShow"));
@@ -41,8 +43,11 @@ var _SuccessErrorResponse = _interopRequireDefault(require("../model/SuccessErro
41
43
  var _SuccessMultipleErrorsResponse = _interopRequireDefault(require("../model/SuccessMultipleErrorsResponse"));
42
44
  var _Template = _interopRequireDefault(require("../model/Template"));
43
45
  var _TemplateAddFieldsResponse = _interopRequireDefault(require("../model/TemplateAddFieldsResponse"));
46
+ var _TemplateDeleteResponse = _interopRequireDefault(require("../model/TemplateDeleteResponse"));
44
47
  var _TemplatePreview = _interopRequireDefault(require("../model/TemplatePreview"));
48
+ var _TemplatePublishVersionResponse = _interopRequireDefault(require("../model/TemplatePublishVersionResponse"));
45
49
  var _UpdateHtmlTemplate = _interopRequireDefault(require("../model/UpdateHtmlTemplate"));
50
+ var _UpdatePdfTemplate = _interopRequireDefault(require("../model/UpdatePdfTemplate"));
46
51
  var _UpdateSubmissionDataRequestData = _interopRequireDefault(require("../model/UpdateSubmissionDataRequestData"));
47
52
  var _UploadPresignResponse = _interopRequireDefault(require("../model/UploadPresignResponse"));
48
53
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -53,7 +58,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
53
58
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
54
59
  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); } /**
55
60
  * DocSpring API
56
- * DocSpring provides an API that helps you fill out and sign PDF templates.
61
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
57
62
  *
58
63
  * The version of the OpenAPI document: v1
59
64
  *
@@ -64,26 +69,55 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
64
69
  *
65
70
  */
66
71
  /**
67
- * PDF service.
68
- * @module api/PDFApi
69
- * @version 2.0.0
72
+ * Client service.
73
+ * @module api/Client
74
+ * @version 3.0.0
70
75
  */
71
- var PDFApi = exports["default"] = /*#__PURE__*/function () {
76
+ var Client = exports["default"] = /*#__PURE__*/function () {
72
77
  /**
73
- * Constructs a new PDFApi.
74
- * @alias module:api/PDFApi
78
+ * Constructs a new Client.
79
+ * @alias module:api/Client
75
80
  * @class
76
81
  * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
77
82
  * default to {@link module:ApiClient#instance} if unspecified.
78
83
  */
79
- function PDFApi(apiClient) {
80
- _classCallCheck(this, PDFApi);
81
- this.apiClient = apiClient || _ApiClient["default"].instance;
84
+ function Client() {
85
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
86
+ _classCallCheck(this, Client);
87
+ // Support both old style (apiClient) and new style (options object)
88
+ if (options && options.constructor && options.constructor.name === 'ApiClient') {
89
+ this.apiClient = options;
90
+ } else {
91
+ var _env$DOCSPRING_TOKEN_, _env$DOCSPRING_TOKEN_2;
92
+ var apiClient = options.apiClient || _ApiClient["default"].instance;
93
+ var env = typeof process !== 'undefined' && process.env ? process.env : {};
94
+ var apiTokenId = options.apiTokenId !== undefined ? options.apiTokenId : (_env$DOCSPRING_TOKEN_ = env.DOCSPRING_TOKEN_ID) !== null && _env$DOCSPRING_TOKEN_ !== void 0 ? _env$DOCSPRING_TOKEN_ : null;
95
+ 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;
96
+ if (apiTokenId != null && apiTokenSecret != null) {
97
+ apiClient.authentications['api_token_basic'].username = apiTokenId;
98
+ apiClient.authentications['api_token_basic'].password = apiTokenSecret;
99
+ }
100
+
101
+ // Resolve host from options.host, DOCSPRING_HOST, or region (options.region/DOCSPRING_REGION)
102
+ var host = options.host || env.DOCSPRING_HOST || null;
103
+ var region = options.region || env.DOCSPRING_REGION || null;
104
+ if (!host && region) {
105
+ var r = String(region).trim().toUpperCase();
106
+ 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"));
107
+ }
108
+ if (host) {
109
+ var url = host;
110
+ if (!/^https?:\/\//i.test(url)) url = "https://".concat(url);
111
+ if (!/\/api\/v1\/?$/i.test(url)) url = "".concat(url.replace(/\/$/, ''), "/api/v1");
112
+ apiClient.basePath = url;
113
+ }
114
+ this.apiClient = apiClient;
115
+ }
82
116
  }
83
117
 
84
118
  /**
85
119
  * Callback function to receive the result of the addFieldsToTemplate operation.
86
- * @callback module:api/PDFApi~addFieldsToTemplateCallback
120
+ * @callback module:api/Client~addFieldsToTemplateCallback
87
121
  * @param {String} error Error message, if any.
88
122
  * @param {module:model/TemplateAddFieldsResponse} data The data returned by the service call.
89
123
  * @param {String} response The complete HTTP response.
@@ -91,25 +125,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
91
125
 
92
126
  /**
93
127
  * Add new fields to a Template
94
- * @param {String} templateId
128
+ * Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.
129
+ * @param {String} template_id
95
130
  * @param {module:model/AddFieldsData} data
96
- * @param {module:api/PDFApi~addFieldsToTemplateCallback} callback The callback function, accepting three arguments: error, data, response
131
+ * @param {module:api/Client~addFieldsToTemplateCallback} callback The callback function, accepting three arguments: error, data, response
97
132
  * data is of type: {@link module:model/TemplateAddFieldsResponse}
98
133
  */
99
- return _createClass(PDFApi, [{
134
+ return _createClass(Client, [{
100
135
  key: "addFieldsToTemplate",
101
- value: function addFieldsToTemplate(templateId, data, callback) {
136
+ value: function addFieldsToTemplate(template_id, data, callback) {
102
137
  var postBody = data;
103
- // verify the required parameter 'templateId' is set
104
- if (templateId === undefined || templateId === null) {
105
- throw new Error("Missing the required parameter 'templateId' when calling addFieldsToTemplate");
138
+ // verify the required parameter 'template_id' is set
139
+ if (template_id === undefined || template_id === null) {
140
+ throw new Error("Missing the required parameter 'template_id' when calling addFieldsToTemplate");
106
141
  }
107
142
  // verify the required parameter 'data' is set
108
143
  if (data === undefined || data === null) {
109
144
  throw new Error("Missing the required parameter 'data' when calling addFieldsToTemplate");
110
145
  }
111
146
  var pathParams = {
112
- 'template_id': templateId
147
+ 'template_id': template_id
113
148
  };
114
149
  var queryParams = {};
115
150
  var headerParams = {};
@@ -123,18 +158,19 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
123
158
 
124
159
  /**
125
160
  * Callback function to receive the result of the batchGeneratePdfs operation.
126
- * @callback module:api/PDFApi~batchGeneratePdfsCallback
161
+ * @callback module:api/Client~batchGeneratePdfsCallback
127
162
  * @param {String} error Error message, if any.
128
163
  * @param {module:model/BatchGeneratePdfs201Response} data The data returned by the service call.
129
164
  * @param {String} response The complete HTTP response.
130
165
  */
131
166
 
132
167
  /**
133
- * Generates multiple PDFs
168
+ * Generate multiple PDFs
169
+ * 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 and Combine PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Generate and merge PDFs in one request
134
170
  * @param {module:model/SubmissionBatchData} data
135
171
  * @param {Object} opts Optional parameters
136
172
  * @param {Boolean} [wait = true)] Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
137
- * @param {module:api/PDFApi~batchGeneratePdfsCallback} callback The callback function, accepting three arguments: error, data, response
173
+ * @param {module:api/Client~batchGeneratePdfsCallback} callback The callback function, accepting three arguments: error, data, response
138
174
  * data is of type: {@link module:model/BatchGeneratePdfs201Response}
139
175
  */
140
176
  }, {
@@ -161,7 +197,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
161
197
 
162
198
  /**
163
199
  * Callback function to receive the result of the combinePdfs operation.
164
- * @callback module:api/PDFApi~combinePdfsCallback
200
+ * @callback module:api/Client~combinePdfsCallback
165
201
  * @param {String} error Error message, if any.
166
202
  * @param {module:model/CreateCombinedSubmissionResponse} data The data returned by the service call.
167
203
  * @param {String} response The complete HTTP response.
@@ -169,8 +205,9 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
169
205
 
170
206
  /**
171
207
  * Merge submission PDFs, template PDFs, or custom files
208
+ * 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.
172
209
  * @param {module:model/CombinePdfsData} data
173
- * @param {module:api/PDFApi~combinePdfsCallback} callback The callback function, accepting three arguments: error, data, response
210
+ * @param {module:api/Client~combinePdfsCallback} callback The callback function, accepting three arguments: error, data, response
174
211
  * data is of type: {@link module:model/CreateCombinedSubmissionResponse}
175
212
  */
176
213
  }, {
@@ -189,74 +226,37 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
189
226
  var contentTypes = ['application/json'];
190
227
  var accepts = ['application/json'];
191
228
  var returnType = _CreateCombinedSubmissionResponse["default"];
192
- return this.apiClient.callApi('/combined_submissions?v=2', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
193
- }
194
-
195
- /**
196
- * Callback function to receive the result of the combineSubmissions operation.
197
- * @callback module:api/PDFApi~combineSubmissionsCallback
198
- * @param {String} error Error message, if any.
199
- * @param {module:model/CreateCombinedSubmissionResponse} data The data returned by the service call.
200
- * @param {String} response The complete HTTP response.
201
- */
202
-
203
- /**
204
- * Merge generated PDFs together
205
- * @param {module:model/CombinedSubmissionData} data
206
- * @param {Object} opts Optional parameters
207
- * @param {Boolean} [wait = true)] Wait for combined submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
208
- * @param {module:api/PDFApi~combineSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
209
- * data is of type: {@link module:model/CreateCombinedSubmissionResponse}
210
- */
211
- }, {
212
- key: "combineSubmissions",
213
- value: function combineSubmissions(data, opts, callback) {
214
- opts = opts || {};
215
- var postBody = data;
216
- // verify the required parameter 'data' is set
217
- if (data === undefined || data === null) {
218
- throw new Error("Missing the required parameter 'data' when calling combineSubmissions");
219
- }
220
- var pathParams = {};
221
- var queryParams = {
222
- 'wait': opts['wait']
223
- };
224
- var headerParams = {};
225
- var formParams = {};
226
- var authNames = ['api_token_basic'];
227
- var contentTypes = ['application/json'];
228
- var accepts = ['application/json'];
229
- var returnType = _CreateCombinedSubmissionResponse["default"];
230
229
  return this.apiClient.callApi('/combined_submissions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
231
230
  }
232
231
 
233
232
  /**
234
233
  * Callback function to receive the result of the copyTemplate operation.
235
- * @callback module:api/PDFApi~copyTemplateCallback
234
+ * @callback module:api/Client~copyTemplateCallback
236
235
  * @param {String} error Error message, if any.
237
236
  * @param {module:model/TemplatePreview} data The data returned by the service call.
238
237
  * @param {String} response The complete HTTP response.
239
238
  */
240
239
 
241
240
  /**
242
- * Copy a Template
243
- * @param {String} templateId
241
+ * Copy a template
242
+ * 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.
243
+ * @param {String} template_id
244
244
  * @param {Object} opts Optional parameters
245
245
  * @param {module:model/CopyTemplateOptions} [options]
246
- * @param {module:api/PDFApi~copyTemplateCallback} callback The callback function, accepting three arguments: error, data, response
246
+ * @param {module:api/Client~copyTemplateCallback} callback The callback function, accepting three arguments: error, data, response
247
247
  * data is of type: {@link module:model/TemplatePreview}
248
248
  */
249
249
  }, {
250
250
  key: "copyTemplate",
251
- value: function copyTemplate(templateId, opts, callback) {
251
+ value: function copyTemplate(template_id, opts, callback) {
252
252
  opts = opts || {};
253
253
  var postBody = opts['options'];
254
- // verify the required parameter 'templateId' is set
255
- if (templateId === undefined || templateId === null) {
256
- throw new Error("Missing the required parameter 'templateId' when calling copyTemplate");
254
+ // verify the required parameter 'template_id' is set
255
+ if (template_id === undefined || template_id === null) {
256
+ throw new Error("Missing the required parameter 'template_id' when calling copyTemplate");
257
257
  }
258
258
  var pathParams = {
259
- 'template_id': templateId
259
+ 'template_id': template_id
260
260
  };
261
261
  var queryParams = {};
262
262
  var headerParams = {};
@@ -270,16 +270,17 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
270
270
 
271
271
  /**
272
272
  * Callback function to receive the result of the createCustomFileFromUpload operation.
273
- * @callback module:api/PDFApi~createCustomFileFromUploadCallback
273
+ * @callback module:api/Client~createCustomFileFromUploadCallback
274
274
  * @param {String} error Error message, if any.
275
275
  * @param {module:model/CreateCustomFileResponse} data The data returned by the service call.
276
276
  * @param {String} response The complete HTTP response.
277
277
  */
278
278
 
279
279
  /**
280
- * Create a new custom file from a cached presign upload
280
+ * Create a new custom file from a cached S3 upload
281
+ * 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.
281
282
  * @param {module:model/CreateCustomFileData} data
282
- * @param {module:api/PDFApi~createCustomFileFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
283
+ * @param {module:api/Client~createCustomFileFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
283
284
  * data is of type: {@link module:model/CreateCustomFileResponse}
284
285
  */
285
286
  }, {
@@ -303,33 +304,34 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
303
304
 
304
305
  /**
305
306
  * Callback function to receive the result of the createDataRequestEvent operation.
306
- * @callback module:api/PDFApi~createDataRequestEventCallback
307
+ * @callback module:api/Client~createDataRequestEventCallback
307
308
  * @param {String} error Error message, if any.
308
309
  * @param {module:model/CreateSubmissionDataRequestEventResponse} data The data returned by the service call.
309
310
  * @param {String} response The complete HTTP response.
310
311
  */
311
312
 
312
313
  /**
313
- * Creates a new event for emailing a signee a request for signature
314
- * @param {String} dataRequestId
314
+ * Create a new event for emailing a signee a request for signature
315
+ * 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
316
+ * @param {String} data_request_id
315
317
  * @param {module:model/CreateSubmissionDataRequestEventRequest} event
316
- * @param {module:api/PDFApi~createDataRequestEventCallback} callback The callback function, accepting three arguments: error, data, response
318
+ * @param {module:api/Client~createDataRequestEventCallback} callback The callback function, accepting three arguments: error, data, response
317
319
  * data is of type: {@link module:model/CreateSubmissionDataRequestEventResponse}
318
320
  */
319
321
  }, {
320
322
  key: "createDataRequestEvent",
321
- value: function createDataRequestEvent(dataRequestId, event, callback) {
323
+ value: function createDataRequestEvent(data_request_id, event, callback) {
322
324
  var postBody = event;
323
- // verify the required parameter 'dataRequestId' is set
324
- if (dataRequestId === undefined || dataRequestId === null) {
325
- throw new Error("Missing the required parameter 'dataRequestId' when calling createDataRequestEvent");
325
+ // verify the required parameter 'data_request_id' is set
326
+ if (data_request_id === undefined || data_request_id === null) {
327
+ throw new Error("Missing the required parameter 'data_request_id' when calling createDataRequestEvent");
326
328
  }
327
329
  // verify the required parameter 'event' is set
328
330
  if (event === undefined || event === null) {
329
331
  throw new Error("Missing the required parameter 'event' when calling createDataRequestEvent");
330
332
  }
331
333
  var pathParams = {
332
- 'data_request_id': dataRequestId
334
+ 'data_request_id': data_request_id
333
335
  };
334
336
  var queryParams = {};
335
337
  var headerParams = {};
@@ -343,31 +345,32 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
343
345
 
344
346
  /**
345
347
  * Callback function to receive the result of the createDataRequestToken operation.
346
- * @callback module:api/PDFApi~createDataRequestTokenCallback
348
+ * @callback module:api/Client~createDataRequestTokenCallback
347
349
  * @param {String} error Error message, if any.
348
350
  * @param {module:model/CreateSubmissionDataRequestTokenResponse} data The data returned by the service call.
349
351
  * @param {String} response The complete HTTP response.
350
352
  */
351
353
 
352
354
  /**
353
- * Creates a new data request token for form authentication
354
- * @param {String} dataRequestId
355
+ * Create a new data request token for form authentication
356
+ * Creates an authentication token for accessing a data request form. Tokens can be created for API access (1 hour expiration) or email links (30 day expiration). Returns a token and a pre-authenticated URL for the data request form. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/)
357
+ * @param {String} data_request_id
355
358
  * @param {Object} opts Optional parameters
356
359
  * @param {module:model/String} [type]
357
- * @param {module:api/PDFApi~createDataRequestTokenCallback} callback The callback function, accepting three arguments: error, data, response
360
+ * @param {module:api/Client~createDataRequestTokenCallback} callback The callback function, accepting three arguments: error, data, response
358
361
  * data is of type: {@link module:model/CreateSubmissionDataRequestTokenResponse}
359
362
  */
360
363
  }, {
361
364
  key: "createDataRequestToken",
362
- value: function createDataRequestToken(dataRequestId, opts, callback) {
365
+ value: function createDataRequestToken(data_request_id, opts, callback) {
363
366
  opts = opts || {};
364
367
  var postBody = null;
365
- // verify the required parameter 'dataRequestId' is set
366
- if (dataRequestId === undefined || dataRequestId === null) {
367
- throw new Error("Missing the required parameter 'dataRequestId' when calling createDataRequestToken");
368
+ // verify the required parameter 'data_request_id' is set
369
+ if (data_request_id === undefined || data_request_id === null) {
370
+ throw new Error("Missing the required parameter 'data_request_id' when calling createDataRequestToken");
368
371
  }
369
372
  var pathParams = {
370
- 'data_request_id': dataRequestId
373
+ 'data_request_id': data_request_id
371
374
  };
372
375
  var queryParams = {
373
376
  'type': opts['type']
@@ -383,7 +386,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
383
386
 
384
387
  /**
385
388
  * Callback function to receive the result of the createFolder operation.
386
- * @callback module:api/PDFApi~createFolderCallback
389
+ * @callback module:api/Client~createFolderCallback
387
390
  * @param {String} error Error message, if any.
388
391
  * @param {module:model/Folder} data The data returned by the service call.
389
392
  * @param {String} response The complete HTTP response.
@@ -391,8 +394,9 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
391
394
 
392
395
  /**
393
396
  * Create a folder
397
+ * 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.
394
398
  * @param {module:model/CreateFolderData} data
395
- * @param {module:api/PDFApi~createFolderCallback} callback The callback function, accepting three arguments: error, data, response
399
+ * @param {module:api/Client~createFolderCallback} callback The callback function, accepting three arguments: error, data, response
396
400
  * data is of type: {@link module:model/Folder}
397
401
  */
398
402
  }, {
@@ -415,8 +419,8 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
415
419
  }
416
420
 
417
421
  /**
418
- * Callback function to receive the result of the createHTMLTemplate operation.
419
- * @callback module:api/PDFApi~createHTMLTemplateCallback
422
+ * Callback function to receive the result of the createHtmlTemplate operation.
423
+ * @callback module:api/Client~createHtmlTemplateCallback
420
424
  * @param {String} error Error message, if any.
421
425
  * @param {module:model/TemplatePreview} data The data returned by the service call.
422
426
  * @param {String} response The complete HTTP response.
@@ -424,17 +428,18 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
424
428
 
425
429
  /**
426
430
  * Create a new HTML template
431
+ * 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.
427
432
  * @param {module:model/CreateHtmlTemplate} data
428
- * @param {module:api/PDFApi~createHTMLTemplateCallback} callback The callback function, accepting three arguments: error, data, response
433
+ * @param {module:api/Client~createHtmlTemplateCallback} callback The callback function, accepting three arguments: error, data, response
429
434
  * data is of type: {@link module:model/TemplatePreview}
430
435
  */
431
436
  }, {
432
- key: "createHTMLTemplate",
433
- value: function createHTMLTemplate(data, callback) {
437
+ key: "createHtmlTemplate",
438
+ value: function createHtmlTemplate(data, callback) {
434
439
  var postBody = data;
435
440
  // verify the required parameter 'data' is set
436
441
  if (data === undefined || data === null) {
437
- throw new Error("Missing the required parameter 'data' when calling createHTMLTemplate");
442
+ throw new Error("Missing the required parameter 'data' when calling createHtmlTemplate");
438
443
  }
439
444
  var pathParams = {};
440
445
  var queryParams = {};
@@ -444,12 +449,12 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
444
449
  var contentTypes = ['application/json'];
445
450
  var accepts = ['application/json'];
446
451
  var returnType = _TemplatePreview["default"];
447
- return this.apiClient.callApi('/templates?endpoint_description=html', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
452
+ return this.apiClient.callApi('/templates?endpoint_variant=create_html_template', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
448
453
  }
449
454
 
450
455
  /**
451
- * Callback function to receive the result of the createPDFTemplate operation.
452
- * @callback module:api/PDFApi~createPDFTemplateCallback
456
+ * Callback function to receive the result of the createPdfTemplate operation.
457
+ * @callback module:api/Client~createPdfTemplateCallback
453
458
  * @param {String} error Error message, if any.
454
459
  * @param {module:model/TemplatePreview} data The data returned by the service call.
455
460
  * @param {String} response The complete HTTP response.
@@ -457,27 +462,28 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
457
462
 
458
463
  /**
459
464
  * Create a new PDF template with a form POST file upload
460
- * @param {File} templateDocument
461
- * @param {String} templateName
465
+ * 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.
466
+ * @param {File} template_document
467
+ * @param {String} template_name
462
468
  * @param {Object} opts Optional parameters
463
469
  * @param {Boolean} [wait = true)] Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
464
- * @param {String} [templateDescription]
465
- * @param {String} [templateParentFolderId]
466
- * @param {module:api/PDFApi~createPDFTemplateCallback} callback The callback function, accepting three arguments: error, data, response
470
+ * @param {String} [template_description]
471
+ * @param {String} [template_parent_folder_id]
472
+ * @param {module:api/Client~createPdfTemplateCallback} callback The callback function, accepting three arguments: error, data, response
467
473
  * data is of type: {@link module:model/TemplatePreview}
468
474
  */
469
475
  }, {
470
- key: "createPDFTemplate",
471
- value: function createPDFTemplate(templateDocument, templateName, opts, callback) {
476
+ key: "createPdfTemplate",
477
+ value: function createPdfTemplate(template_document, template_name, opts, callback) {
472
478
  opts = opts || {};
473
479
  var postBody = null;
474
- // verify the required parameter 'templateDocument' is set
475
- if (templateDocument === undefined || templateDocument === null) {
476
- throw new Error("Missing the required parameter 'templateDocument' when calling createPDFTemplate");
480
+ // verify the required parameter 'template_document' is set
481
+ if (template_document === undefined || template_document === null) {
482
+ throw new Error("Missing the required parameter 'template_document' when calling createPdfTemplate");
477
483
  }
478
- // verify the required parameter 'templateName' is set
479
- if (templateName === undefined || templateName === null) {
480
- throw new Error("Missing the required parameter 'templateName' when calling createPDFTemplate");
484
+ // verify the required parameter 'template_name' is set
485
+ if (template_name === undefined || template_name === null) {
486
+ throw new Error("Missing the required parameter 'template_name' when calling createPdfTemplate");
481
487
  }
482
488
  var pathParams = {};
483
489
  var queryParams = {
@@ -485,10 +491,10 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
485
491
  };
486
492
  var headerParams = {};
487
493
  var formParams = {
488
- 'template[document]': templateDocument,
489
- 'template[name]': templateName,
490
- 'template[description]': opts['templateDescription'],
491
- 'template[parent_folder_id]': opts['templateParentFolderId']
494
+ 'template[document]': template_document,
495
+ 'template[name]': template_name,
496
+ 'template[description]': opts['template_description'],
497
+ 'template[parent_folder_id]': opts['template_parent_folder_id']
492
498
  };
493
499
  var authNames = ['api_token_basic'];
494
500
  var contentTypes = ['multipart/form-data'];
@@ -498,26 +504,27 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
498
504
  }
499
505
 
500
506
  /**
501
- * Callback function to receive the result of the createPDFTemplateFromUpload operation.
502
- * @callback module:api/PDFApi~createPDFTemplateFromUploadCallback
507
+ * Callback function to receive the result of the createPdfTemplateFromUpload operation.
508
+ * @callback module:api/Client~createPdfTemplateFromUploadCallback
503
509
  * @param {String} error Error message, if any.
504
510
  * @param {module:model/TemplatePreview} data The data returned by the service call.
505
511
  * @param {String} response The complete HTTP response.
506
512
  */
507
513
 
508
514
  /**
509
- * Create a new PDF template from a cached presign upload
515
+ * Create a new PDF template from a cached S3 file upload
516
+ * 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.
510
517
  * @param {module:model/CreatePdfTemplate} data
511
- * @param {module:api/PDFApi~createPDFTemplateFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
518
+ * @param {module:api/Client~createPdfTemplateFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
512
519
  * data is of type: {@link module:model/TemplatePreview}
513
520
  */
514
521
  }, {
515
- key: "createPDFTemplateFromUpload",
516
- value: function createPDFTemplateFromUpload(data, callback) {
522
+ key: "createPdfTemplateFromUpload",
523
+ value: function createPdfTemplateFromUpload(data, callback) {
517
524
  var postBody = data;
518
525
  // verify the required parameter 'data' is set
519
526
  if (data === undefined || data === null) {
520
- throw new Error("Missing the required parameter 'data' when calling createPDFTemplateFromUpload");
527
+ throw new Error("Missing the required parameter 'data' when calling createPdfTemplateFromUpload");
521
528
  }
522
529
  var pathParams = {};
523
530
  var queryParams = {};
@@ -527,12 +534,12 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
527
534
  var contentTypes = ['application/json'];
528
535
  var accepts = ['application/json'];
529
536
  var returnType = _TemplatePreview["default"];
530
- return this.apiClient.callApi('/templates?endpoint_description=cached_upload', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
537
+ return this.apiClient.callApi('/templates?endpoint_variant=create_template_from_cached_upload', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
531
538
  }
532
539
 
533
540
  /**
534
541
  * Callback function to receive the result of the deleteFolder operation.
535
- * @callback module:api/PDFApi~deleteFolderCallback
542
+ * @callback module:api/Client~deleteFolderCallback
536
543
  * @param {String} error Error message, if any.
537
544
  * @param {module:model/Folder} data The data returned by the service call.
538
545
  * @param {String} response The complete HTTP response.
@@ -540,20 +547,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
540
547
 
541
548
  /**
542
549
  * Delete a folder
543
- * @param {String} folderId
544
- * @param {module:api/PDFApi~deleteFolderCallback} callback The callback function, accepting three arguments: error, data, response
550
+ * Deletes an empty folder. The folder must not contain any templates or subfolders. Move or delete all contents before attempting to delete the folder.
551
+ * @param {String} folder_id
552
+ * @param {module:api/Client~deleteFolderCallback} callback The callback function, accepting three arguments: error, data, response
545
553
  * data is of type: {@link module:model/Folder}
546
554
  */
547
555
  }, {
548
556
  key: "deleteFolder",
549
- value: function deleteFolder(folderId, callback) {
557
+ value: function deleteFolder(folder_id, callback) {
550
558
  var postBody = null;
551
- // verify the required parameter 'folderId' is set
552
- if (folderId === undefined || folderId === null) {
553
- throw new Error("Missing the required parameter 'folderId' when calling deleteFolder");
559
+ // verify the required parameter 'folder_id' is set
560
+ if (folder_id === undefined || folder_id === null) {
561
+ throw new Error("Missing the required parameter 'folder_id' when calling deleteFolder");
554
562
  }
555
563
  var pathParams = {
556
- 'folder_id': folderId
564
+ 'folder_id': folder_id
557
565
  };
558
566
  var queryParams = {};
559
567
  var headerParams = {};
@@ -567,42 +575,48 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
567
575
 
568
576
  /**
569
577
  * Callback function to receive the result of the deleteTemplate operation.
570
- * @callback module:api/PDFApi~deleteTemplateCallback
578
+ * @callback module:api/Client~deleteTemplateCallback
571
579
  * @param {String} error Error message, if any.
572
- * @param {module:model/SuccessMultipleErrorsResponse} data The data returned by the service call.
580
+ * @param {module:model/TemplateDeleteResponse} data The data returned by the service call.
573
581
  * @param {String} response The complete HTTP response.
574
582
  */
575
583
 
576
584
  /**
577
585
  * Delete a template
578
- * @param {String} templateId
579
- * @param {module:api/PDFApi~deleteTemplateCallback} callback The callback function, accepting three arguments: error, data, response
580
- * data is of type: {@link module:model/SuccessMultipleErrorsResponse}
586
+ * 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.
587
+ * @param {String} template_id
588
+ * @param {Object} opts Optional parameters
589
+ * @param {String} [version]
590
+ * @param {module:api/Client~deleteTemplateCallback} callback The callback function, accepting three arguments: error, data, response
591
+ * data is of type: {@link module:model/TemplateDeleteResponse}
581
592
  */
582
593
  }, {
583
594
  key: "deleteTemplate",
584
- value: function deleteTemplate(templateId, callback) {
595
+ value: function deleteTemplate(template_id, opts, callback) {
596
+ opts = opts || {};
585
597
  var postBody = null;
586
- // verify the required parameter 'templateId' is set
587
- if (templateId === undefined || templateId === null) {
588
- throw new Error("Missing the required parameter 'templateId' when calling deleteTemplate");
598
+ // verify the required parameter 'template_id' is set
599
+ if (template_id === undefined || template_id === null) {
600
+ throw new Error("Missing the required parameter 'template_id' when calling deleteTemplate");
589
601
  }
590
602
  var pathParams = {
591
- 'template_id': templateId
603
+ 'template_id': template_id
604
+ };
605
+ var queryParams = {
606
+ 'version': opts['version']
592
607
  };
593
- var queryParams = {};
594
608
  var headerParams = {};
595
609
  var formParams = {};
596
610
  var authNames = ['api_token_basic'];
597
611
  var contentTypes = [];
598
612
  var accepts = ['application/json'];
599
- var returnType = _SuccessMultipleErrorsResponse["default"];
613
+ var returnType = _TemplateDeleteResponse["default"];
600
614
  return this.apiClient.callApi('/templates/{template_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
601
615
  }
602
616
 
603
617
  /**
604
618
  * Callback function to receive the result of the expireCombinedSubmission operation.
605
- * @callback module:api/PDFApi~expireCombinedSubmissionCallback
619
+ * @callback module:api/Client~expireCombinedSubmissionCallback
606
620
  * @param {String} error Error message, if any.
607
621
  * @param {module:model/CombinedSubmission} data The data returned by the service call.
608
622
  * @param {String} response The complete HTTP response.
@@ -610,20 +624,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
610
624
 
611
625
  /**
612
626
  * Expire a combined submission
613
- * @param {String} combinedSubmissionId
614
- * @param {module:api/PDFApi~expireCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
627
+ * Expiring a combined submission deletes the PDF from our system. This is useful for invalidating sensitive documents.
628
+ * @param {String} combined_submission_id
629
+ * @param {module:api/Client~expireCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
615
630
  * data is of type: {@link module:model/CombinedSubmission}
616
631
  */
617
632
  }, {
618
633
  key: "expireCombinedSubmission",
619
- value: function expireCombinedSubmission(combinedSubmissionId, callback) {
634
+ value: function expireCombinedSubmission(combined_submission_id, callback) {
620
635
  var postBody = null;
621
- // verify the required parameter 'combinedSubmissionId' is set
622
- if (combinedSubmissionId === undefined || combinedSubmissionId === null) {
623
- throw new Error("Missing the required parameter 'combinedSubmissionId' when calling expireCombinedSubmission");
636
+ // verify the required parameter 'combined_submission_id' is set
637
+ if (combined_submission_id === undefined || combined_submission_id === null) {
638
+ throw new Error("Missing the required parameter 'combined_submission_id' when calling expireCombinedSubmission");
624
639
  }
625
640
  var pathParams = {
626
- 'combined_submission_id': combinedSubmissionId
641
+ 'combined_submission_id': combined_submission_id
627
642
  };
628
643
  var queryParams = {};
629
644
  var headerParams = {};
@@ -637,7 +652,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
637
652
 
638
653
  /**
639
654
  * Callback function to receive the result of the expireSubmission operation.
640
- * @callback module:api/PDFApi~expireSubmissionCallback
655
+ * @callback module:api/Client~expireSubmissionCallback
641
656
  * @param {String} error Error message, if any.
642
657
  * @param {module:model/SubmissionPreview} data The data returned by the service call.
643
658
  * @param {String} response The complete HTTP response.
@@ -645,20 +660,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
645
660
 
646
661
  /**
647
662
  * Expire a PDF submission
648
- * @param {String} submissionId
649
- * @param {module:api/PDFApi~expireSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
663
+ * 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.
664
+ * @param {String} submission_id
665
+ * @param {module:api/Client~expireSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
650
666
  * data is of type: {@link module:model/SubmissionPreview}
651
667
  */
652
668
  }, {
653
669
  key: "expireSubmission",
654
- value: function expireSubmission(submissionId, callback) {
670
+ value: function expireSubmission(submission_id, callback) {
655
671
  var postBody = null;
656
- // verify the required parameter 'submissionId' is set
657
- if (submissionId === undefined || submissionId === null) {
658
- throw new Error("Missing the required parameter 'submissionId' when calling expireSubmission");
672
+ // verify the required parameter 'submission_id' is set
673
+ if (submission_id === undefined || submission_id === null) {
674
+ throw new Error("Missing the required parameter 'submission_id' when calling expireSubmission");
659
675
  }
660
676
  var pathParams = {
661
- 'submission_id': submissionId
677
+ 'submission_id': submission_id
662
678
  };
663
679
  var queryParams = {};
664
680
  var headerParams = {};
@@ -672,36 +688,37 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
672
688
 
673
689
  /**
674
690
  * Callback function to receive the result of the generatePdf operation.
675
- * @callback module:api/PDFApi~generatePdfCallback
691
+ * @callback module:api/Client~generatePdfCallback
676
692
  * @param {String} error Error message, if any.
677
693
  * @param {module:model/CreateSubmissionResponse} data The data returned by the service call.
678
694
  * @param {String} response The complete HTTP response.
679
695
  */
680
696
 
681
697
  /**
682
- * Generates a new PDF
683
- * @param {String} templateId
698
+ * Generate a PDF
699
+ * Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Set `wait: false` 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
700
+ * @param {String} template_id
684
701
  * @param {module:model/CreatePdfSubmissionData} submission
685
702
  * @param {Object} opts Optional parameters
686
703
  * @param {Boolean} [wait = true)] Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
687
- * @param {module:api/PDFApi~generatePdfCallback} callback The callback function, accepting three arguments: error, data, response
704
+ * @param {module:api/Client~generatePdfCallback} callback The callback function, accepting three arguments: error, data, response
688
705
  * data is of type: {@link module:model/CreateSubmissionResponse}
689
706
  */
690
707
  }, {
691
708
  key: "generatePdf",
692
- value: function generatePdf(templateId, submission, opts, callback) {
709
+ value: function generatePdf(template_id, submission, opts, callback) {
693
710
  opts = opts || {};
694
711
  var postBody = submission;
695
- // verify the required parameter 'templateId' is set
696
- if (templateId === undefined || templateId === null) {
697
- throw new Error("Missing the required parameter 'templateId' when calling generatePdf");
712
+ // verify the required parameter 'template_id' is set
713
+ if (template_id === undefined || template_id === null) {
714
+ throw new Error("Missing the required parameter 'template_id' when calling generatePdf");
698
715
  }
699
716
  // verify the required parameter 'submission' is set
700
717
  if (submission === undefined || submission === null) {
701
718
  throw new Error("Missing the required parameter 'submission' when calling generatePdf");
702
719
  }
703
720
  var pathParams = {
704
- 'template_id': templateId
721
+ 'template_id': template_id
705
722
  };
706
723
  var queryParams = {
707
724
  'wait': opts['wait']
@@ -715,75 +732,31 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
715
732
  return this.apiClient.callApi('/templates/{template_id}/submissions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
716
733
  }
717
734
 
718
- /**
719
- * Callback function to receive the result of the generatePdfForHtmlTemplate operation.
720
- * @callback module:api/PDFApi~generatePdfForHtmlTemplateCallback
721
- * @param {String} error Error message, if any.
722
- * @param {module:model/CreateSubmissionResponse} data The data returned by the service call.
723
- * @param {String} response The complete HTTP response.
724
- */
725
-
726
- /**
727
- * Generates a new PDF for an HTML template
728
- * @param {String} templateId
729
- * @param {module:model/CreateHtmlSubmissionData} submission
730
- * @param {Object} opts Optional parameters
731
- * @param {Boolean} [wait = true)] Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
732
- * @param {module:api/PDFApi~generatePdfForHtmlTemplateCallback} callback The callback function, accepting three arguments: error, data, response
733
- * data is of type: {@link module:model/CreateSubmissionResponse}
734
- */
735
- }, {
736
- key: "generatePdfForHtmlTemplate",
737
- value: function generatePdfForHtmlTemplate(templateId, submission, opts, callback) {
738
- opts = opts || {};
739
- var postBody = submission;
740
- // verify the required parameter 'templateId' is set
741
- if (templateId === undefined || templateId === null) {
742
- throw new Error("Missing the required parameter 'templateId' when calling generatePdfForHtmlTemplate");
743
- }
744
- // verify the required parameter 'submission' is set
745
- if (submission === undefined || submission === null) {
746
- throw new Error("Missing the required parameter 'submission' when calling generatePdfForHtmlTemplate");
747
- }
748
- var pathParams = {
749
- 'template_id': templateId
750
- };
751
- var queryParams = {
752
- 'wait': opts['wait']
753
- };
754
- var headerParams = {};
755
- var formParams = {};
756
- var authNames = ['api_token_basic'];
757
- var contentTypes = ['application/json'];
758
- var accepts = ['application/json'];
759
- var returnType = _CreateSubmissionResponse["default"];
760
- return this.apiClient.callApi('/templates/{template_id}/submissions?endpoint_description=html_templates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
761
- }
762
-
763
735
  /**
764
736
  * Callback function to receive the result of the generatePreview operation.
765
- * @callback module:api/PDFApi~generatePreviewCallback
737
+ * @callback module:api/Client~generatePreviewCallback
766
738
  * @param {String} error Error message, if any.
767
739
  * @param {module:model/SuccessErrorResponse} data The data returned by the service call.
768
740
  * @param {String} response The complete HTTP response.
769
741
  */
770
742
 
771
743
  /**
772
- * Generated a preview PDF for partially completed data requests
773
- * @param {String} submissionId
774
- * @param {module:api/PDFApi~generatePreviewCallback} callback The callback function, accepting three arguments: error, data, response
744
+ * Generate a preview PDF for partially completed data requests
745
+ * 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.
746
+ * @param {String} submission_id
747
+ * @param {module:api/Client~generatePreviewCallback} callback The callback function, accepting three arguments: error, data, response
775
748
  * data is of type: {@link module:model/SuccessErrorResponse}
776
749
  */
777
750
  }, {
778
751
  key: "generatePreview",
779
- value: function generatePreview(submissionId, callback) {
752
+ value: function generatePreview(submission_id, callback) {
780
753
  var postBody = null;
781
- // verify the required parameter 'submissionId' is set
782
- if (submissionId === undefined || submissionId === null) {
783
- throw new Error("Missing the required parameter 'submissionId' when calling generatePreview");
754
+ // verify the required parameter 'submission_id' is set
755
+ if (submission_id === undefined || submission_id === null) {
756
+ throw new Error("Missing the required parameter 'submission_id' when calling generatePreview");
784
757
  }
785
758
  var pathParams = {
786
- 'submission_id': submissionId
759
+ 'submission_id': submission_id
787
760
  };
788
761
  var queryParams = {};
789
762
  var headerParams = {};
@@ -797,7 +770,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
797
770
 
798
771
  /**
799
772
  * Callback function to receive the result of the getCombinedSubmission operation.
800
- * @callback module:api/PDFApi~getCombinedSubmissionCallback
773
+ * @callback module:api/Client~getCombinedSubmissionCallback
801
774
  * @param {String} error Error message, if any.
802
775
  * @param {module:model/CombinedSubmission} data The data returned by the service call.
803
776
  * @param {String} response The complete HTTP response.
@@ -805,20 +778,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
805
778
 
806
779
  /**
807
780
  * Check the status of a combined submission (merged PDFs)
808
- * @param {String} combinedSubmissionId
809
- * @param {module:api/PDFApi~getCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
781
+ * 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).
782
+ * @param {String} combined_submission_id
783
+ * @param {module:api/Client~getCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
810
784
  * data is of type: {@link module:model/CombinedSubmission}
811
785
  */
812
786
  }, {
813
787
  key: "getCombinedSubmission",
814
- value: function getCombinedSubmission(combinedSubmissionId, callback) {
788
+ value: function getCombinedSubmission(combined_submission_id, callback) {
815
789
  var postBody = null;
816
- // verify the required parameter 'combinedSubmissionId' is set
817
- if (combinedSubmissionId === undefined || combinedSubmissionId === null) {
818
- throw new Error("Missing the required parameter 'combinedSubmissionId' when calling getCombinedSubmission");
790
+ // verify the required parameter 'combined_submission_id' is set
791
+ if (combined_submission_id === undefined || combined_submission_id === null) {
792
+ throw new Error("Missing the required parameter 'combined_submission_id' when calling getCombinedSubmission");
819
793
  }
820
794
  var pathParams = {
821
- 'combined_submission_id': combinedSubmissionId
795
+ 'combined_submission_id': combined_submission_id
822
796
  };
823
797
  var queryParams = {};
824
798
  var headerParams = {};
@@ -832,7 +806,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
832
806
 
833
807
  /**
834
808
  * Callback function to receive the result of the getDataRequest operation.
835
- * @callback module:api/PDFApi~getDataRequestCallback
809
+ * @callback module:api/Client~getDataRequestCallback
836
810
  * @param {String} error Error message, if any.
837
811
  * @param {module:model/SubmissionDataRequestShow} data The data returned by the service call.
838
812
  * @param {String} response The complete HTTP response.
@@ -840,20 +814,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
840
814
 
841
815
  /**
842
816
  * Look up a submission data request
843
- * @param {String} dataRequestId
844
- * @param {module:api/PDFApi~getDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
817
+ * 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
818
+ * @param {String} data_request_id
819
+ * @param {module:api/Client~getDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
845
820
  * data is of type: {@link module:model/SubmissionDataRequestShow}
846
821
  */
847
822
  }, {
848
823
  key: "getDataRequest",
849
- value: function getDataRequest(dataRequestId, callback) {
824
+ value: function getDataRequest(data_request_id, callback) {
850
825
  var postBody = null;
851
- // verify the required parameter 'dataRequestId' is set
852
- if (dataRequestId === undefined || dataRequestId === null) {
853
- throw new Error("Missing the required parameter 'dataRequestId' when calling getDataRequest");
826
+ // verify the required parameter 'data_request_id' is set
827
+ if (data_request_id === undefined || data_request_id === null) {
828
+ throw new Error("Missing the required parameter 'data_request_id' when calling getDataRequest");
854
829
  }
855
830
  var pathParams = {
856
- 'data_request_id': dataRequestId
831
+ 'data_request_id': data_request_id
857
832
  };
858
833
  var queryParams = {};
859
834
  var headerParams = {};
@@ -867,28 +842,29 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
867
842
 
868
843
  /**
869
844
  * Callback function to receive the result of the getFullTemplate operation.
870
- * @callback module:api/PDFApi~getFullTemplateCallback
845
+ * @callback module:api/Client~getFullTemplateCallback
871
846
  * @param {String} error Error message, if any.
872
847
  * @param {module:model/Template} data The data returned by the service call.
873
848
  * @param {String} response The complete HTTP response.
874
849
  */
875
850
 
876
851
  /**
877
- * Fetch the full template attributes
878
- * @param {String} templateId
879
- * @param {module:api/PDFApi~getFullTemplateCallback} callback The callback function, accepting three arguments: error, data, response
852
+ * Fetch the full attributes for a PDF template
853
+ * 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.
854
+ * @param {String} template_id
855
+ * @param {module:api/Client~getFullTemplateCallback} callback The callback function, accepting three arguments: error, data, response
880
856
  * data is of type: {@link module:model/Template}
881
857
  */
882
858
  }, {
883
859
  key: "getFullTemplate",
884
- value: function getFullTemplate(templateId, callback) {
860
+ value: function getFullTemplate(template_id, callback) {
885
861
  var postBody = null;
886
- // verify the required parameter 'templateId' is set
887
- if (templateId === undefined || templateId === null) {
888
- throw new Error("Missing the required parameter 'templateId' when calling getFullTemplate");
862
+ // verify the required parameter 'template_id' is set
863
+ if (template_id === undefined || template_id === null) {
864
+ throw new Error("Missing the required parameter 'template_id' when calling getFullTemplate");
889
865
  }
890
866
  var pathParams = {
891
- 'template_id': templateId
867
+ 'template_id': template_id
892
868
  };
893
869
  var queryParams = {};
894
870
  var headerParams = {};
@@ -902,15 +878,16 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
902
878
 
903
879
  /**
904
880
  * Callback function to receive the result of the getPresignUrl operation.
905
- * @callback module:api/PDFApi~getPresignUrlCallback
881
+ * @callback module:api/Client~getPresignUrlCallback
906
882
  * @param {String} error Error message, if any.
907
883
  * @param {module:model/UploadPresignResponse} data The data returned by the service call.
908
884
  * @param {String} response The complete HTTP response.
909
885
  */
910
886
 
911
887
  /**
912
- * Get a presigned URL so that you can upload a file to our AWS S3 bucket
913
- * @param {module:api/PDFApi~getPresignUrlCallback} callback The callback function, accepting three arguments: error, data, response
888
+ * Get a presigned S3 URL for direct file upload
889
+ * 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)
890
+ * @param {module:api/Client~getPresignUrlCallback} callback The callback function, accepting three arguments: error, data, response
914
891
  * data is of type: {@link module:model/UploadPresignResponse}
915
892
  */
916
893
  }, {
@@ -930,7 +907,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
930
907
 
931
908
  /**
932
909
  * Callback function to receive the result of the getSubmission operation.
933
- * @callback module:api/PDFApi~getSubmissionCallback
910
+ * @callback module:api/Client~getSubmissionCallback
934
911
  * @param {String} error Error message, if any.
935
912
  * @param {module:model/Submission} data The data returned by the service call.
936
913
  * @param {String} response The complete HTTP response.
@@ -938,26 +915,27 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
938
915
 
939
916
  /**
940
917
  * Check the status of a PDF
941
- * @param {String} submissionId
918
+ * 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.
919
+ * @param {String} submission_id
942
920
  * @param {Object} opts Optional parameters
943
- * @param {Boolean} [includeData]
944
- * @param {module:api/PDFApi~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
921
+ * @param {Boolean} [include_data]
922
+ * @param {module:api/Client~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
945
923
  * data is of type: {@link module:model/Submission}
946
924
  */
947
925
  }, {
948
926
  key: "getSubmission",
949
- value: function getSubmission(submissionId, opts, callback) {
927
+ value: function getSubmission(submission_id, opts, callback) {
950
928
  opts = opts || {};
951
929
  var postBody = null;
952
- // verify the required parameter 'submissionId' is set
953
- if (submissionId === undefined || submissionId === null) {
954
- throw new Error("Missing the required parameter 'submissionId' when calling getSubmission");
930
+ // verify the required parameter 'submission_id' is set
931
+ if (submission_id === undefined || submission_id === null) {
932
+ throw new Error("Missing the required parameter 'submission_id' when calling getSubmission");
955
933
  }
956
934
  var pathParams = {
957
- 'submission_id': submissionId
935
+ 'submission_id': submission_id
958
936
  };
959
937
  var queryParams = {
960
- 'include_data': opts['includeData']
938
+ 'include_data': opts['include_data']
961
939
  };
962
940
  var headerParams = {};
963
941
  var formParams = {};
@@ -970,7 +948,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
970
948
 
971
949
  /**
972
950
  * Callback function to receive the result of the getSubmissionBatch operation.
973
- * @callback module:api/PDFApi~getSubmissionBatchCallback
951
+ * @callback module:api/Client~getSubmissionBatchCallback
974
952
  * @param {String} error Error message, if any.
975
953
  * @param {module:model/SubmissionBatchWithSubmissions} data The data returned by the service call.
976
954
  * @param {String} response The complete HTTP response.
@@ -978,26 +956,27 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
978
956
 
979
957
  /**
980
958
  * Check the status of a submission batch job
981
- * @param {String} submissionBatchId
959
+ * 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.
960
+ * @param {String} submission_batch_id
982
961
  * @param {Object} opts Optional parameters
983
- * @param {Boolean} [includeSubmissions]
984
- * @param {module:api/PDFApi~getSubmissionBatchCallback} callback The callback function, accepting three arguments: error, data, response
962
+ * @param {Boolean} [include_submissions]
963
+ * @param {module:api/Client~getSubmissionBatchCallback} callback The callback function, accepting three arguments: error, data, response
985
964
  * data is of type: {@link module:model/SubmissionBatchWithSubmissions}
986
965
  */
987
966
  }, {
988
967
  key: "getSubmissionBatch",
989
- value: function getSubmissionBatch(submissionBatchId, opts, callback) {
968
+ value: function getSubmissionBatch(submission_batch_id, opts, callback) {
990
969
  opts = opts || {};
991
970
  var postBody = null;
992
- // verify the required parameter 'submissionBatchId' is set
993
- if (submissionBatchId === undefined || submissionBatchId === null) {
994
- throw new Error("Missing the required parameter 'submissionBatchId' when calling getSubmissionBatch");
971
+ // verify the required parameter 'submission_batch_id' is set
972
+ if (submission_batch_id === undefined || submission_batch_id === null) {
973
+ throw new Error("Missing the required parameter 'submission_batch_id' when calling getSubmissionBatch");
995
974
  }
996
975
  var pathParams = {
997
- 'submission_batch_id': submissionBatchId
976
+ 'submission_batch_id': submission_batch_id
998
977
  };
999
978
  var queryParams = {
1000
- 'include_submissions': opts['includeSubmissions']
979
+ 'include_submissions': opts['include_submissions']
1001
980
  };
1002
981
  var headerParams = {};
1003
982
  var formParams = {};
@@ -1010,7 +989,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1010
989
 
1011
990
  /**
1012
991
  * Callback function to receive the result of the getTemplate operation.
1013
- * @callback module:api/PDFApi~getTemplateCallback
992
+ * @callback module:api/Client~getTemplateCallback
1014
993
  * @param {String} error Error message, if any.
1015
994
  * @param {module:model/TemplatePreview} data The data returned by the service call.
1016
995
  * @param {String} response The complete HTTP response.
@@ -1018,20 +997,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1018
997
 
1019
998
  /**
1020
999
  * Check the status of an uploaded template
1021
- * @param {String} templateId
1022
- * @param {module:api/PDFApi~getTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1000
+ * 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.
1001
+ * @param {String} template_id
1002
+ * @param {module:api/Client~getTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1023
1003
  * data is of type: {@link module:model/TemplatePreview}
1024
1004
  */
1025
1005
  }, {
1026
1006
  key: "getTemplate",
1027
- value: function getTemplate(templateId, callback) {
1007
+ value: function getTemplate(template_id, callback) {
1028
1008
  var postBody = null;
1029
- // verify the required parameter 'templateId' is set
1030
- if (templateId === undefined || templateId === null) {
1031
- throw new Error("Missing the required parameter 'templateId' when calling getTemplate");
1009
+ // verify the required parameter 'template_id' is set
1010
+ if (template_id === undefined || template_id === null) {
1011
+ throw new Error("Missing the required parameter 'template_id' when calling getTemplate");
1032
1012
  }
1033
1013
  var pathParams = {
1034
- 'template_id': templateId
1014
+ 'template_id': template_id
1035
1015
  };
1036
1016
  var queryParams = {};
1037
1017
  var headerParams = {};
@@ -1045,7 +1025,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1045
1025
 
1046
1026
  /**
1047
1027
  * Callback function to receive the result of the getTemplateSchema operation.
1048
- * @callback module:api/PDFApi~getTemplateSchemaCallback
1028
+ * @callback module:api/Client~getTemplateSchemaCallback
1049
1029
  * @param {String} error Error message, if any.
1050
1030
  * @param {module:model/JsonSchema} data The data returned by the service call.
1051
1031
  * @param {String} response The complete HTTP response.
@@ -1053,20 +1033,21 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1053
1033
 
1054
1034
  /**
1055
1035
  * Fetch the JSON schema for a template
1056
- * @param {String} templateId
1057
- * @param {module:api/PDFApi~getTemplateSchemaCallback} callback The callback function, accepting three arguments: error, data, response
1036
+ * 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
1037
+ * @param {String} template_id
1038
+ * @param {module:api/Client~getTemplateSchemaCallback} callback The callback function, accepting three arguments: error, data, response
1058
1039
  * data is of type: {@link module:model/JsonSchema}
1059
1040
  */
1060
1041
  }, {
1061
1042
  key: "getTemplateSchema",
1062
- value: function getTemplateSchema(templateId, callback) {
1043
+ value: function getTemplateSchema(template_id, callback) {
1063
1044
  var postBody = null;
1064
- // verify the required parameter 'templateId' is set
1065
- if (templateId === undefined || templateId === null) {
1066
- throw new Error("Missing the required parameter 'templateId' when calling getTemplateSchema");
1045
+ // verify the required parameter 'template_id' is set
1046
+ if (template_id === undefined || template_id === null) {
1047
+ throw new Error("Missing the required parameter 'template_id' when calling getTemplateSchema");
1067
1048
  }
1068
1049
  var pathParams = {
1069
- 'template_id': templateId
1050
+ 'template_id': template_id
1070
1051
  };
1071
1052
  var queryParams = {};
1072
1053
  var headerParams = {};
@@ -1080,7 +1061,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1080
1061
 
1081
1062
  /**
1082
1063
  * Callback function to receive the result of the listCombinedSubmissions operation.
1083
- * @callback module:api/PDFApi~listCombinedSubmissionsCallback
1064
+ * @callback module:api/Client~listCombinedSubmissionsCallback
1084
1065
  * @param {String} error Error message, if any.
1085
1066
  * @param {Array.<module:model/CombinedSubmission>} data The data returned by the service call.
1086
1067
  * @param {String} response The complete HTTP response.
@@ -1088,10 +1069,11 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1088
1069
 
1089
1070
  /**
1090
1071
  * Get a list of all combined submissions
1072
+ * Returns a paginated list of combined submissions (merged PDFs) for your account. Includes processing status, expiration details, and download URLs for processed PDFs.
1091
1073
  * @param {Object} opts Optional parameters
1092
1074
  * @param {Number} [page] Default: 1
1093
- * @param {Number} [perPage] Default: 50
1094
- * @param {module:api/PDFApi~listCombinedSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1075
+ * @param {Number} [per_page] Default: 50
1076
+ * @param {module:api/Client~listCombinedSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1095
1077
  * data is of type: {@link Array.<module:model/CombinedSubmission>}
1096
1078
  */
1097
1079
  }, {
@@ -1102,7 +1084,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1102
1084
  var pathParams = {};
1103
1085
  var queryParams = {
1104
1086
  'page': opts['page'],
1105
- 'per_page': opts['perPage']
1087
+ 'per_page': opts['per_page']
1106
1088
  };
1107
1089
  var headerParams = {};
1108
1090
  var formParams = {};
@@ -1115,7 +1097,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1115
1097
 
1116
1098
  /**
1117
1099
  * Callback function to receive the result of the listFolders operation.
1118
- * @callback module:api/PDFApi~listFoldersCallback
1100
+ * @callback module:api/Client~listFoldersCallback
1119
1101
  * @param {String} error Error message, if any.
1120
1102
  * @param {Array.<module:model/Folder>} data The data returned by the service call.
1121
1103
  * @param {String} response The complete HTTP response.
@@ -1123,9 +1105,10 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1123
1105
 
1124
1106
  /**
1125
1107
  * Get a list of all folders
1108
+ * 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.
1126
1109
  * @param {Object} opts Optional parameters
1127
- * @param {String} [parentFolderId] Filter By Folder Id
1128
- * @param {module:api/PDFApi~listFoldersCallback} callback The callback function, accepting three arguments: error, data, response
1110
+ * @param {String} [parent_folder_id] Filter By Folder Id
1111
+ * @param {module:api/Client~listFoldersCallback} callback The callback function, accepting three arguments: error, data, response
1129
1112
  * data is of type: {@link Array.<module:model/Folder>}
1130
1113
  */
1131
1114
  }, {
@@ -1135,7 +1118,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1135
1118
  var postBody = null;
1136
1119
  var pathParams = {};
1137
1120
  var queryParams = {
1138
- 'parent_folder_id': opts['parentFolderId']
1121
+ 'parent_folder_id': opts['parent_folder_id']
1139
1122
  };
1140
1123
  var headerParams = {};
1141
1124
  var formParams = {};
@@ -1148,7 +1131,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1148
1131
 
1149
1132
  /**
1150
1133
  * Callback function to receive the result of the listSubmissions operation.
1151
- * @callback module:api/PDFApi~listSubmissionsCallback
1134
+ * @callback module:api/Client~listSubmissionsCallback
1152
1135
  * @param {String} error Error message, if any.
1153
1136
  * @param {module:model/ListSubmissionsResponse} data The data returned by the service call.
1154
1137
  * @param {String} response The complete HTTP response.
@@ -1156,14 +1139,15 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1156
1139
 
1157
1140
  /**
1158
1141
  * List all submissions
1142
+ * 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.
1159
1143
  * @param {Object} opts Optional parameters
1160
1144
  * @param {String} [cursor]
1161
1145
  * @param {Number} [limit]
1162
- * @param {String} [createdAfter]
1163
- * @param {String} [createdBefore]
1146
+ * @param {String} [created_after]
1147
+ * @param {String} [created_before]
1164
1148
  * @param {String} [type]
1165
- * @param {Boolean} [includeData]
1166
- * @param {module:api/PDFApi~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1149
+ * @param {Boolean} [include_data]
1150
+ * @param {module:api/Client~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1167
1151
  * data is of type: {@link module:model/ListSubmissionsResponse}
1168
1152
  */
1169
1153
  }, {
@@ -1175,10 +1159,10 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1175
1159
  var queryParams = {
1176
1160
  'cursor': opts['cursor'],
1177
1161
  'limit': opts['limit'],
1178
- 'created_after': opts['createdAfter'],
1179
- 'created_before': opts['createdBefore'],
1162
+ 'created_after': opts['created_after'],
1163
+ 'created_before': opts['created_before'],
1180
1164
  'type': opts['type'],
1181
- 'include_data': opts['includeData']
1165
+ 'include_data': opts['include_data']
1182
1166
  };
1183
1167
  var headerParams = {};
1184
1168
  var formParams = {};
@@ -1191,7 +1175,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1191
1175
 
1192
1176
  /**
1193
1177
  * Callback function to receive the result of the listTemplateSubmissions operation.
1194
- * @callback module:api/PDFApi~listTemplateSubmissionsCallback
1178
+ * @callback module:api/Client~listTemplateSubmissionsCallback
1195
1179
  * @param {String} error Error message, if any.
1196
1180
  * @param {module:model/ListSubmissionsResponse} data The data returned by the service call.
1197
1181
  * @param {String} response The complete HTTP response.
@@ -1199,36 +1183,37 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1199
1183
 
1200
1184
  /**
1201
1185
  * List all submissions for a given template
1202
- * @param {String} templateId
1186
+ * 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.
1187
+ * @param {String} template_id
1203
1188
  * @param {Object} opts Optional parameters
1204
1189
  * @param {String} [cursor]
1205
1190
  * @param {Number} [limit]
1206
- * @param {String} [createdAfter]
1207
- * @param {String} [createdBefore]
1191
+ * @param {String} [created_after]
1192
+ * @param {String} [created_before]
1208
1193
  * @param {String} [type]
1209
- * @param {Boolean} [includeData]
1210
- * @param {module:api/PDFApi~listTemplateSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1194
+ * @param {Boolean} [include_data]
1195
+ * @param {module:api/Client~listTemplateSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1211
1196
  * data is of type: {@link module:model/ListSubmissionsResponse}
1212
1197
  */
1213
1198
  }, {
1214
1199
  key: "listTemplateSubmissions",
1215
- value: function listTemplateSubmissions(templateId, opts, callback) {
1200
+ value: function listTemplateSubmissions(template_id, opts, callback) {
1216
1201
  opts = opts || {};
1217
1202
  var postBody = null;
1218
- // verify the required parameter 'templateId' is set
1219
- if (templateId === undefined || templateId === null) {
1220
- throw new Error("Missing the required parameter 'templateId' when calling listTemplateSubmissions");
1203
+ // verify the required parameter 'template_id' is set
1204
+ if (template_id === undefined || template_id === null) {
1205
+ throw new Error("Missing the required parameter 'template_id' when calling listTemplateSubmissions");
1221
1206
  }
1222
1207
  var pathParams = {
1223
- 'template_id': templateId
1208
+ 'template_id': template_id
1224
1209
  };
1225
1210
  var queryParams = {
1226
1211
  'cursor': opts['cursor'],
1227
1212
  'limit': opts['limit'],
1228
- 'created_after': opts['createdAfter'],
1229
- 'created_before': opts['createdBefore'],
1213
+ 'created_after': opts['created_after'],
1214
+ 'created_before': opts['created_before'],
1230
1215
  'type': opts['type'],
1231
- 'include_data': opts['includeData']
1216
+ 'include_data': opts['include_data']
1232
1217
  };
1233
1218
  var headerParams = {};
1234
1219
  var formParams = {};
@@ -1241,7 +1226,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1241
1226
 
1242
1227
  /**
1243
1228
  * Callback function to receive the result of the listTemplates operation.
1244
- * @callback module:api/PDFApi~listTemplatesCallback
1229
+ * @callback module:api/Client~listTemplatesCallback
1245
1230
  * @param {String} error Error message, if any.
1246
1231
  * @param {Array.<module:model/TemplatePreview>} data The data returned by the service call.
1247
1232
  * @param {String} response The complete HTTP response.
@@ -1249,12 +1234,13 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1249
1234
 
1250
1235
  /**
1251
1236
  * Get a list of all templates
1237
+ * 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.
1252
1238
  * @param {Object} opts Optional parameters
1253
1239
  * @param {String} [query] Search By Name
1254
- * @param {String} [parentFolderId] Filter By Folder Id
1240
+ * @param {String} [parent_folder_id] Filter By Folder Id
1255
1241
  * @param {Number} [page] Default: 1
1256
- * @param {Number} [perPage] Default: 50
1257
- * @param {module:api/PDFApi~listTemplatesCallback} callback The callback function, accepting three arguments: error, data, response
1242
+ * @param {Number} [per_page] Default: 50
1243
+ * @param {module:api/Client~listTemplatesCallback} callback The callback function, accepting three arguments: error, data, response
1258
1244
  * data is of type: {@link Array.<module:model/TemplatePreview>}
1259
1245
  */
1260
1246
  }, {
@@ -1265,9 +1251,9 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1265
1251
  var pathParams = {};
1266
1252
  var queryParams = {
1267
1253
  'query': opts['query'],
1268
- 'parent_folder_id': opts['parentFolderId'],
1254
+ 'parent_folder_id': opts['parent_folder_id'],
1269
1255
  'page': opts['page'],
1270
- 'per_page': opts['perPage']
1256
+ 'per_page': opts['per_page']
1271
1257
  };
1272
1258
  var headerParams = {};
1273
1259
  var formParams = {};
@@ -1280,7 +1266,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1280
1266
 
1281
1267
  /**
1282
1268
  * Callback function to receive the result of the moveFolderToFolder operation.
1283
- * @callback module:api/PDFApi~moveFolderToFolderCallback
1269
+ * @callback module:api/Client~moveFolderToFolderCallback
1284
1270
  * @param {String} error Error message, if any.
1285
1271
  * @param {module:model/Folder} data The data returned by the service call.
1286
1272
  * @param {String} response The complete HTTP response.
@@ -1288,25 +1274,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1288
1274
 
1289
1275
  /**
1290
1276
  * Move a folder
1291
- * @param {String} folderId
1277
+ * 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.
1278
+ * @param {String} folder_id
1292
1279
  * @param {module:model/MoveFolderData} data
1293
- * @param {module:api/PDFApi~moveFolderToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1280
+ * @param {module:api/Client~moveFolderToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1294
1281
  * data is of type: {@link module:model/Folder}
1295
1282
  */
1296
1283
  }, {
1297
1284
  key: "moveFolderToFolder",
1298
- value: function moveFolderToFolder(folderId, data, callback) {
1285
+ value: function moveFolderToFolder(folder_id, data, callback) {
1299
1286
  var postBody = data;
1300
- // verify the required parameter 'folderId' is set
1301
- if (folderId === undefined || folderId === null) {
1302
- throw new Error("Missing the required parameter 'folderId' when calling moveFolderToFolder");
1287
+ // verify the required parameter 'folder_id' is set
1288
+ if (folder_id === undefined || folder_id === null) {
1289
+ throw new Error("Missing the required parameter 'folder_id' when calling moveFolderToFolder");
1303
1290
  }
1304
1291
  // verify the required parameter 'data' is set
1305
1292
  if (data === undefined || data === null) {
1306
1293
  throw new Error("Missing the required parameter 'data' when calling moveFolderToFolder");
1307
1294
  }
1308
1295
  var pathParams = {
1309
- 'folder_id': folderId
1296
+ 'folder_id': folder_id
1310
1297
  };
1311
1298
  var queryParams = {};
1312
1299
  var headerParams = {};
@@ -1320,7 +1307,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1320
1307
 
1321
1308
  /**
1322
1309
  * Callback function to receive the result of the moveTemplateToFolder operation.
1323
- * @callback module:api/PDFApi~moveTemplateToFolderCallback
1310
+ * @callback module:api/Client~moveTemplateToFolderCallback
1324
1311
  * @param {String} error Error message, if any.
1325
1312
  * @param {module:model/TemplatePreview} data The data returned by the service call.
1326
1313
  * @param {String} response The complete HTTP response.
@@ -1328,25 +1315,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1328
1315
 
1329
1316
  /**
1330
1317
  * Move Template to folder
1331
- * @param {String} templateId
1318
+ * 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.
1319
+ * @param {String} template_id
1332
1320
  * @param {module:model/MoveTemplateData} data
1333
- * @param {module:api/PDFApi~moveTemplateToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1321
+ * @param {module:api/Client~moveTemplateToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1334
1322
  * data is of type: {@link module:model/TemplatePreview}
1335
1323
  */
1336
1324
  }, {
1337
1325
  key: "moveTemplateToFolder",
1338
- value: function moveTemplateToFolder(templateId, data, callback) {
1326
+ value: function moveTemplateToFolder(template_id, data, callback) {
1339
1327
  var postBody = data;
1340
- // verify the required parameter 'templateId' is set
1341
- if (templateId === undefined || templateId === null) {
1342
- throw new Error("Missing the required parameter 'templateId' when calling moveTemplateToFolder");
1328
+ // verify the required parameter 'template_id' is set
1329
+ if (template_id === undefined || template_id === null) {
1330
+ throw new Error("Missing the required parameter 'template_id' when calling moveTemplateToFolder");
1343
1331
  }
1344
1332
  // verify the required parameter 'data' is set
1345
1333
  if (data === undefined || data === null) {
1346
1334
  throw new Error("Missing the required parameter 'data' when calling moveTemplateToFolder");
1347
1335
  }
1348
1336
  var pathParams = {
1349
- 'template_id': templateId
1337
+ 'template_id': template_id
1350
1338
  };
1351
1339
  var queryParams = {};
1352
1340
  var headerParams = {};
@@ -1358,9 +1346,50 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1358
1346
  return this.apiClient.callApi('/templates/{template_id}/move', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1359
1347
  }
1360
1348
 
1349
+ /**
1350
+ * Callback function to receive the result of the publishTemplateVersion operation.
1351
+ * @callback module:api/Client~publishTemplateVersionCallback
1352
+ * @param {String} error Error message, if any.
1353
+ * @param {module:model/TemplatePublishVersionResponse} data The data returned by the service call.
1354
+ * @param {String} response The complete HTTP response.
1355
+ */
1356
+
1357
+ /**
1358
+ * Publish a template version
1359
+ * Publishes the current draft version of a template and creates a new immutable version with semantic versioning (major.minor.patch).
1360
+ * @param {String} template_id
1361
+ * @param {module:model/PublishVersionData} data
1362
+ * @param {module:api/Client~publishTemplateVersionCallback} callback The callback function, accepting three arguments: error, data, response
1363
+ * data is of type: {@link module:model/TemplatePublishVersionResponse}
1364
+ */
1365
+ }, {
1366
+ key: "publishTemplateVersion",
1367
+ value: function publishTemplateVersion(template_id, data, callback) {
1368
+ var postBody = data;
1369
+ // verify the required parameter 'template_id' is set
1370
+ if (template_id === undefined || template_id === null) {
1371
+ throw new Error("Missing the required parameter 'template_id' when calling publishTemplateVersion");
1372
+ }
1373
+ // verify the required parameter 'data' is set
1374
+ if (data === undefined || data === null) {
1375
+ throw new Error("Missing the required parameter 'data' when calling publishTemplateVersion");
1376
+ }
1377
+ var pathParams = {
1378
+ 'template_id': template_id
1379
+ };
1380
+ var queryParams = {};
1381
+ var headerParams = {};
1382
+ var formParams = {};
1383
+ var authNames = ['api_token_basic'];
1384
+ var contentTypes = ['application/json'];
1385
+ var accepts = ['application/json'];
1386
+ var returnType = _TemplatePublishVersionResponse["default"];
1387
+ return this.apiClient.callApi('/templates/{template_id}/publish_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1388
+ }
1389
+
1361
1390
  /**
1362
1391
  * Callback function to receive the result of the renameFolder operation.
1363
- * @callback module:api/PDFApi~renameFolderCallback
1392
+ * @callback module:api/Client~renameFolderCallback
1364
1393
  * @param {String} error Error message, if any.
1365
1394
  * @param {module:model/Folder} data The data returned by the service call.
1366
1395
  * @param {String} response The complete HTTP response.
@@ -1368,25 +1397,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1368
1397
 
1369
1398
  /**
1370
1399
  * Rename a folder
1371
- * @param {String} folderId
1400
+ * 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.
1401
+ * @param {String} folder_id
1372
1402
  * @param {module:model/RenameFolderData} data
1373
- * @param {module:api/PDFApi~renameFolderCallback} callback The callback function, accepting three arguments: error, data, response
1403
+ * @param {module:api/Client~renameFolderCallback} callback The callback function, accepting three arguments: error, data, response
1374
1404
  * data is of type: {@link module:model/Folder}
1375
1405
  */
1376
1406
  }, {
1377
1407
  key: "renameFolder",
1378
- value: function renameFolder(folderId, data, callback) {
1408
+ value: function renameFolder(folder_id, data, callback) {
1379
1409
  var postBody = data;
1380
- // verify the required parameter 'folderId' is set
1381
- if (folderId === undefined || folderId === null) {
1382
- throw new Error("Missing the required parameter 'folderId' when calling renameFolder");
1410
+ // verify the required parameter 'folder_id' is set
1411
+ if (folder_id === undefined || folder_id === null) {
1412
+ throw new Error("Missing the required parameter 'folder_id' when calling renameFolder");
1383
1413
  }
1384
1414
  // verify the required parameter 'data' is set
1385
1415
  if (data === undefined || data === null) {
1386
1416
  throw new Error("Missing the required parameter 'data' when calling renameFolder");
1387
1417
  }
1388
1418
  var pathParams = {
1389
- 'folder_id': folderId
1419
+ 'folder_id': folder_id
1390
1420
  };
1391
1421
  var queryParams = {};
1392
1422
  var headerParams = {};
@@ -1398,17 +1428,59 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1398
1428
  return this.apiClient.callApi('/folders/{folder_id}/rename', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1399
1429
  }
1400
1430
 
1431
+ /**
1432
+ * Callback function to receive the result of the restoreTemplateVersion operation.
1433
+ * @callback module:api/Client~restoreTemplateVersionCallback
1434
+ * @param {String} error Error message, if any.
1435
+ * @param {module:model/SuccessErrorResponse} data The data returned by the service call.
1436
+ * @param {String} response The complete HTTP response.
1437
+ */
1438
+
1439
+ /**
1440
+ * Restore a template version
1441
+ * 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.
1442
+ * @param {String} template_id
1443
+ * @param {module:model/RestoreVersionData} data
1444
+ * @param {module:api/Client~restoreTemplateVersionCallback} callback The callback function, accepting three arguments: error, data, response
1445
+ * data is of type: {@link module:model/SuccessErrorResponse}
1446
+ */
1447
+ }, {
1448
+ key: "restoreTemplateVersion",
1449
+ value: function restoreTemplateVersion(template_id, data, callback) {
1450
+ var postBody = data;
1451
+ // verify the required parameter 'template_id' is set
1452
+ if (template_id === undefined || template_id === null) {
1453
+ throw new Error("Missing the required parameter 'template_id' when calling restoreTemplateVersion");
1454
+ }
1455
+ // verify the required parameter 'data' is set
1456
+ if (data === undefined || data === null) {
1457
+ throw new Error("Missing the required parameter 'data' when calling restoreTemplateVersion");
1458
+ }
1459
+ var pathParams = {
1460
+ 'template_id': template_id
1461
+ };
1462
+ var queryParams = {};
1463
+ var headerParams = {};
1464
+ var formParams = {};
1465
+ var authNames = ['api_token_basic'];
1466
+ var contentTypes = ['application/json'];
1467
+ var accepts = ['application/json'];
1468
+ var returnType = _SuccessErrorResponse["default"];
1469
+ return this.apiClient.callApi('/templates/{template_id}/restore_version', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1470
+ }
1471
+
1401
1472
  /**
1402
1473
  * Callback function to receive the result of the testAuthentication operation.
1403
- * @callback module:api/PDFApi~testAuthenticationCallback
1474
+ * @callback module:api/Client~testAuthenticationCallback
1404
1475
  * @param {String} error Error message, if any.
1405
1476
  * @param {module:model/SuccessErrorResponse} data The data returned by the service call.
1406
1477
  * @param {String} response The complete HTTP response.
1407
1478
  */
1408
1479
 
1409
1480
  /**
1410
- * Test Authentication
1411
- * @param {module:api/PDFApi~testAuthenticationCallback} callback The callback function, accepting three arguments: error, data, response
1481
+ * Test authentication
1482
+ * 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.
1483
+ * @param {module:api/Client~testAuthenticationCallback} callback The callback function, accepting three arguments: error, data, response
1412
1484
  * data is of type: {@link module:model/SuccessErrorResponse}
1413
1485
  */
1414
1486
  }, {
@@ -1428,7 +1500,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1428
1500
 
1429
1501
  /**
1430
1502
  * Callback function to receive the result of the updateDataRequest operation.
1431
- * @callback module:api/PDFApi~updateDataRequestCallback
1503
+ * @callback module:api/Client~updateDataRequestCallback
1432
1504
  * @param {String} error Error message, if any.
1433
1505
  * @param {module:model/CreateSubmissionDataRequestResponse} data The data returned by the service call.
1434
1506
  * @param {String} response The complete HTTP response.
@@ -1436,25 +1508,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1436
1508
 
1437
1509
  /**
1438
1510
  * Update a submission data request
1439
- * @param {String} dataRequestId
1511
+ * 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.
1512
+ * @param {String} data_request_id
1440
1513
  * @param {module:model/UpdateSubmissionDataRequestData} data
1441
- * @param {module:api/PDFApi~updateDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
1514
+ * @param {module:api/Client~updateDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
1442
1515
  * data is of type: {@link module:model/CreateSubmissionDataRequestResponse}
1443
1516
  */
1444
1517
  }, {
1445
1518
  key: "updateDataRequest",
1446
- value: function updateDataRequest(dataRequestId, data, callback) {
1519
+ value: function updateDataRequest(data_request_id, data, callback) {
1447
1520
  var postBody = data;
1448
- // verify the required parameter 'dataRequestId' is set
1449
- if (dataRequestId === undefined || dataRequestId === null) {
1450
- throw new Error("Missing the required parameter 'dataRequestId' when calling updateDataRequest");
1521
+ // verify the required parameter 'data_request_id' is set
1522
+ if (data_request_id === undefined || data_request_id === null) {
1523
+ throw new Error("Missing the required parameter 'data_request_id' when calling updateDataRequest");
1451
1524
  }
1452
1525
  // verify the required parameter 'data' is set
1453
1526
  if (data === undefined || data === null) {
1454
1527
  throw new Error("Missing the required parameter 'data' when calling updateDataRequest");
1455
1528
  }
1456
1529
  var pathParams = {
1457
- 'data_request_id': dataRequestId
1530
+ 'data_request_id': data_request_id
1458
1531
  };
1459
1532
  var queryParams = {};
1460
1533
  var headerParams = {};
@@ -1468,7 +1541,7 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1468
1541
 
1469
1542
  /**
1470
1543
  * Callback function to receive the result of the updateTemplate operation.
1471
- * @callback module:api/PDFApi~updateTemplateCallback
1544
+ * @callback module:api/Client~updateTemplateCallback
1472
1545
  * @param {String} error Error message, if any.
1473
1546
  * @param {module:model/SuccessMultipleErrorsResponse} data The data returned by the service call.
1474
1547
  * @param {String} response The complete HTTP response.
@@ -1476,25 +1549,26 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1476
1549
 
1477
1550
  /**
1478
1551
  * Update a Template
1479
- * @param {String} templateId
1552
+ * 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.
1553
+ * @param {String} template_id
1480
1554
  * @param {module:model/UpdateHtmlTemplate} data
1481
- * @param {module:api/PDFApi~updateTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1555
+ * @param {module:api/Client~updateTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1482
1556
  * data is of type: {@link module:model/SuccessMultipleErrorsResponse}
1483
1557
  */
1484
1558
  }, {
1485
1559
  key: "updateTemplate",
1486
- value: function updateTemplate(templateId, data, callback) {
1560
+ value: function updateTemplate(template_id, data, callback) {
1487
1561
  var postBody = data;
1488
- // verify the required parameter 'templateId' is set
1489
- if (templateId === undefined || templateId === null) {
1490
- throw new Error("Missing the required parameter 'templateId' when calling updateTemplate");
1562
+ // verify the required parameter 'template_id' is set
1563
+ if (template_id === undefined || template_id === null) {
1564
+ throw new Error("Missing the required parameter 'template_id' when calling updateTemplate");
1491
1565
  }
1492
1566
  // verify the required parameter 'data' is set
1493
1567
  if (data === undefined || data === null) {
1494
1568
  throw new Error("Missing the required parameter 'data' when calling updateTemplate");
1495
1569
  }
1496
1570
  var pathParams = {
1497
- 'template_id': templateId
1571
+ 'template_id': template_id
1498
1572
  };
1499
1573
  var queryParams = {};
1500
1574
  var headerParams = {};
@@ -1505,5 +1579,93 @@ var PDFApi = exports["default"] = /*#__PURE__*/function () {
1505
1579
  var returnType = _SuccessMultipleErrorsResponse["default"];
1506
1580
  return this.apiClient.callApi('/templates/{template_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
1507
1581
  }
1582
+
1583
+ /**
1584
+ * Callback function to receive the result of the updateTemplateDocument operation.
1585
+ * @callback module:api/Client~updateTemplateDocumentCallback
1586
+ * @param {String} error Error message, if any.
1587
+ * @param {module:model/SuccessMultipleErrorsResponse} data The data returned by the service call.
1588
+ * @param {String} response The complete HTTP response.
1589
+ */
1590
+
1591
+ /**
1592
+ * Update a template's document with a form POST file upload
1593
+ * 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.
1594
+ * @param {String} template_id
1595
+ * @param {File} template_document
1596
+ * @param {Object} opts Optional parameters
1597
+ * @param {String} [template_name]
1598
+ * @param {module:api/Client~updateTemplateDocumentCallback} callback The callback function, accepting three arguments: error, data, response
1599
+ * data is of type: {@link module:model/SuccessMultipleErrorsResponse}
1600
+ */
1601
+ }, {
1602
+ key: "updateTemplateDocument",
1603
+ value: function updateTemplateDocument(template_id, template_document, opts, callback) {
1604
+ opts = opts || {};
1605
+ var postBody = null;
1606
+ // verify the required parameter 'template_id' is set
1607
+ if (template_id === undefined || template_id === null) {
1608
+ throw new Error("Missing the required parameter 'template_id' when calling updateTemplateDocument");
1609
+ }
1610
+ // verify the required parameter 'template_document' is set
1611
+ if (template_document === undefined || template_document === null) {
1612
+ throw new Error("Missing the required parameter 'template_document' when calling updateTemplateDocument");
1613
+ }
1614
+ var pathParams = {
1615
+ 'template_id': template_id
1616
+ };
1617
+ var queryParams = {};
1618
+ var headerParams = {};
1619
+ var formParams = {
1620
+ 'template[document]': template_document,
1621
+ 'template[name]': opts['template_name']
1622
+ };
1623
+ var authNames = ['api_token_basic'];
1624
+ var contentTypes = ['multipart/form-data'];
1625
+ var accepts = ['application/json'];
1626
+ var returnType = _SuccessMultipleErrorsResponse["default"];
1627
+ 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);
1628
+ }
1629
+
1630
+ /**
1631
+ * Callback function to receive the result of the updateTemplateDocumentFromUpload operation.
1632
+ * @callback module:api/Client~updateTemplateDocumentFromUploadCallback
1633
+ * @param {String} error Error message, if any.
1634
+ * @param {module:model/SuccessMultipleErrorsResponse} data The data returned by the service call.
1635
+ * @param {String} response The complete HTTP response.
1636
+ */
1637
+
1638
+ /**
1639
+ * Update a template's document with a cached S3 file upload
1640
+ * 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.
1641
+ * @param {String} template_id
1642
+ * @param {module:model/UpdatePdfTemplate} data
1643
+ * @param {module:api/Client~updateTemplateDocumentFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
1644
+ * data is of type: {@link module:model/SuccessMultipleErrorsResponse}
1645
+ */
1646
+ }, {
1647
+ key: "updateTemplateDocumentFromUpload",
1648
+ value: function updateTemplateDocumentFromUpload(template_id, data, callback) {
1649
+ var postBody = data;
1650
+ // verify the required parameter 'template_id' is set
1651
+ if (template_id === undefined || template_id === null) {
1652
+ throw new Error("Missing the required parameter 'template_id' when calling updateTemplateDocumentFromUpload");
1653
+ }
1654
+ // verify the required parameter 'data' is set
1655
+ if (data === undefined || data === null) {
1656
+ throw new Error("Missing the required parameter 'data' when calling updateTemplateDocumentFromUpload");
1657
+ }
1658
+ var pathParams = {
1659
+ 'template_id': template_id
1660
+ };
1661
+ var queryParams = {};
1662
+ var headerParams = {};
1663
+ var formParams = {};
1664
+ var authNames = ['api_token_basic'];
1665
+ var contentTypes = ['application/json'];
1666
+ var accepts = ['application/json'];
1667
+ var returnType = _SuccessMultipleErrorsResponse["default"];
1668
+ 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);
1669
+ }
1508
1670
  }]);
1509
1671
  }();