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