docspring 1.4.0 → 1.5.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 (69) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +3 -1
  3. package/docs/CombinedSubmission.md +2 -0
  4. package/docs/PDFApi.md +101 -1
  5. package/docs/SubmissionData.md +1 -0
  6. package/docs/SubmissionDataRequest.md +1 -0
  7. package/package.json +1 -1
  8. package/src/ApiClient.js +1 -1
  9. package/src/api/Client.js +263 -250
  10. package/src/api/PDFApi.js +94 -1
  11. package/src/index.js +1 -1
  12. package/src/model/AddFieldsData.js +1 -1
  13. package/src/model/AddFieldsTemplateResponse.js +1 -1
  14. package/src/model/AuthenticationError.js +1 -1
  15. package/src/model/AuthenticationSuccessResponse.js +1 -1
  16. package/src/model/CombinePdfsData.js +1 -1
  17. package/src/model/CombinedSubmission.js +17 -1
  18. package/src/model/CombinedSubmissionAction.js +1 -1
  19. package/src/model/CombinedSubmissionData.js +1 -1
  20. package/src/model/CopyTemplateData.js +1 -1
  21. package/src/model/CreateCombinedSubmissionResponse.js +1 -1
  22. package/src/model/CreateCustomFileData.js +1 -1
  23. package/src/model/CreateCustomFileResponse.js +1 -1
  24. package/src/model/CreateFolderData.js +1 -1
  25. package/src/model/CreateHtmlTemplateData.js +1 -1
  26. package/src/model/CreateSubmissionBatchResponse.js +1 -1
  27. package/src/model/CreateSubmissionBatchSubmissionsResponse.js +1 -1
  28. package/src/model/CreateSubmissionDataRequestData.js +1 -1
  29. package/src/model/CreateSubmissionDataRequestTokenResponse.js +1 -1
  30. package/src/model/CreateSubmissionDataRequestTokenResponseToken.js +1 -1
  31. package/src/model/CreateSubmissionResponse.js +1 -1
  32. package/src/model/CreateTemplateFromUploadData.js +1 -1
  33. package/src/model/CustomFile.js +1 -1
  34. package/src/model/Error.js +1 -1
  35. package/src/model/Folder.js +1 -1
  36. package/src/model/FoldersFolder.js +1 -1
  37. package/src/model/FullTemplate.js +1 -1
  38. package/src/model/FullTemplateDefaults.js +1 -1
  39. package/src/model/HtmlTemplateData.js +1 -1
  40. package/src/model/InvalidRequest.js +1 -1
  41. package/src/model/ListSubmissionsResponse.js +1 -1
  42. package/src/model/MoveFolderData.js +1 -1
  43. package/src/model/MoveTemplateData.js +1 -1
  44. package/src/model/PendingTemplate.js +1 -1
  45. package/src/model/RenameFolderData.js +1 -1
  46. package/src/model/Submission.js +1 -1
  47. package/src/model/SubmissionAction.js +1 -1
  48. package/src/model/SubmissionBatch.js +1 -1
  49. package/src/model/SubmissionBatchData.js +1 -1
  50. package/src/model/SubmissionData.js +9 -1
  51. package/src/model/SubmissionDataBatchRequest.js +1 -1
  52. package/src/model/SubmissionDataRequest.js +9 -1
  53. package/src/model/Template.js +1 -1
  54. package/src/model/TemplateData.js +1 -1
  55. package/src/model/TemplatestemplateIdaddFieldsFields.js +1 -1
  56. package/src/model/UpdateDataRequestResponse.js +1 -1
  57. package/src/model/UpdateSubmissionDataRequestData.js +1 -1
  58. package/src/model/UpdateTemplateData.js +1 -1
  59. package/src/model/UpdateTemplateResponse.js +1 -1
  60. package/src/model/UploadTemplateData.js +1 -1
  61. package/src/model/UploadTemplateDataDocument.js +1 -1
  62. package/src/model/UploadTemplateDataDocumentMetadata.js +1 -1
  63. package/test/api/ClientIntegration.spec.js +64 -58
  64. package/test/api/PDFApi.spec.js.original +20 -0
  65. package/test/api/PDFApiIntegration.spec.js +99 -95
  66. package/test/model/CombinedSubmission.spec.js +12 -0
  67. package/test/model/SubmissionData.spec.js +6 -0
  68. package/test/model/SubmissionDataRequest.spec.js +6 -0
  69. package/yarn.lock +0 -263
package/src/api/Client.js CHANGED
@@ -105,291 +105,304 @@
105
105
  root.DocSpring.UpdateSubmissionDataRequestData
106
106
  )
107
107
  }
108
- })(this, function (
109
- PDFApi,
110
- ApiClient,
111
- AuthenticationError,
112
- AuthenticationSuccessResponse,
113
- CombinePdfsData,
114
- CombinedSubmission,
115
- CombinedSubmissionData,
116
- CreateCombinedSubmissionResponse,
117
- CreateCustomFileData,
118
- CreateCustomFileResponse,
119
- CreateSubmissionBatchResponse,
120
- CreateSubmissionDataRequestTokenResponse,
121
- CreateSubmissionResponse,
122
- CreateTemplateData,
123
- Error,
124
- InvalidRequest,
125
- PendingTemplate,
126
- Submission,
127
- SubmissionBatch,
128
- SubmissionBatchData,
129
- SubmissionData,
130
- SubmissionDataRequest,
131
- Template,
132
- UpdateDataRequestResponse,
133
- UpdateSubmissionDataRequestData
134
- ) {
135
- 'use strict'
108
+ })(
109
+ this,
110
+ function (
111
+ PDFApi,
112
+ ApiClient,
113
+ AuthenticationError,
114
+ AuthenticationSuccessResponse,
115
+ CombinePdfsData,
116
+ CombinedSubmission,
117
+ CombinedSubmissionData,
118
+ CreateCombinedSubmissionResponse,
119
+ CreateCustomFileData,
120
+ CreateCustomFileResponse,
121
+ CreateSubmissionBatchResponse,
122
+ CreateSubmissionDataRequestTokenResponse,
123
+ CreateSubmissionResponse,
124
+ CreateTemplateData,
125
+ Error,
126
+ InvalidRequest,
127
+ PendingTemplate,
128
+ Submission,
129
+ SubmissionBatch,
130
+ SubmissionBatchData,
131
+ SubmissionData,
132
+ SubmissionDataRequest,
133
+ Template,
134
+ UpdateDataRequestResponse,
135
+ UpdateSubmissionDataRequestData
136
+ ) {
137
+ 'use strict'
136
138
 
137
- /**
138
- * PDF service.
139
- * @module api/Client
140
- * @version 1.0.0
141
- */
139
+ /**
140
+ * PDF service.
141
+ * @module api/Client
142
+ * @version 1.0.0
143
+ */
142
144
 
143
- // Object.create polyfill for very old browsers
144
- if (typeof Object.create !== 'function') {
145
- Object.create = function (proto, propertiesObject) {
146
- if (typeof proto !== 'object' && typeof proto !== 'function') {
147
- throw new TypeError('Object prototype may only be an Object: ' + proto)
148
- } else if (proto === null) {
149
- throw new Error(
150
- "This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument."
151
- )
152
- }
145
+ // Object.create polyfill for very old browsers
146
+ if (typeof Object.create !== 'function') {
147
+ Object.create = function (proto, propertiesObject) {
148
+ if (typeof proto !== 'object' && typeof proto !== 'function') {
149
+ throw new TypeError(
150
+ 'Object prototype may only be an Object: ' + proto
151
+ )
152
+ } else if (proto === null) {
153
+ throw new Error(
154
+ "This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument."
155
+ )
156
+ }
153
157
 
154
- if (typeof propertiesObject != 'undefined') {
155
- throw new Error(
156
- "This browser's implementation of Object.create is a shim and doesn't support a second argument."
157
- )
158
- }
158
+ if (typeof propertiesObject != 'undefined') {
159
+ throw new Error(
160
+ "This browser's implementation of Object.create is a shim and doesn't support a second argument."
161
+ )
162
+ }
159
163
 
160
- function F() {}
161
- F.prototype = proto
164
+ function F() {}
165
+ F.prototype = proto
162
166
 
163
- return new F()
167
+ return new F()
168
+ }
164
169
  }
165
- }
166
170
 
167
- // Object.assign polyfill
168
- if (typeof Object.assign != 'function') {
169
- // Must be writable: true, enumerable: false, configurable: true
170
- Object.defineProperty(Object, 'assign', {
171
- value: function assign(target, varArgs) {
172
- // .length of function is 2
173
- 'use strict'
174
- if (target == null) {
175
- // TypeError if undefined or null
176
- throw new TypeError('Cannot convert undefined or null to object')
177
- }
171
+ // Object.assign polyfill
172
+ if (typeof Object.assign != 'function') {
173
+ // Must be writable: true, enumerable: false, configurable: true
174
+ Object.defineProperty(Object, 'assign', {
175
+ value: function assign(target, varArgs) {
176
+ // .length of function is 2
177
+ 'use strict'
178
+ if (target == null) {
179
+ // TypeError if undefined or null
180
+ throw new TypeError('Cannot convert undefined or null to object')
181
+ }
178
182
 
179
- var to = Object(target)
183
+ var to = Object(target)
180
184
 
181
- for (var index = 1; index < arguments.length; index++) {
182
- var nextSource = arguments[index]
185
+ for (var index = 1; index < arguments.length; index++) {
186
+ var nextSource = arguments[index]
183
187
 
184
- if (nextSource != null) {
185
- // Skip over if undefined or null
186
- for (var nextKey in nextSource) {
187
- // Avoid bugs when hasOwnProperty is shadowed
188
- if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
189
- to[nextKey] = nextSource[nextKey]
188
+ if (nextSource != null) {
189
+ // Skip over if undefined or null
190
+ for (var nextKey in nextSource) {
191
+ // Avoid bugs when hasOwnProperty is shadowed
192
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
193
+ to[nextKey] = nextSource[nextKey]
194
+ }
190
195
  }
191
196
  }
192
197
  }
193
- }
194
- return to
195
- },
196
- writable: true,
197
- configurable: true,
198
- })
199
- }
198
+ return to
199
+ },
200
+ writable: true,
201
+ configurable: true,
202
+ })
203
+ }
200
204
 
201
- /**
202
- * Constructs a new Client.
203
- * @alias module:api/Client
204
- * @class
205
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
206
- * default to {@link module:ApiClient#instance} if unspecified.
207
- */
208
- function Client(apiClient) {
209
- this.apiClient = apiClient || ApiClient.instance
210
- PDFApi.call(this, this.apiClient)
211
- var self = this
205
+ /**
206
+ * Constructs a new Client.
207
+ * @alias module:api/Client
208
+ * @class
209
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
210
+ * default to {@link module:ApiClient#instance} if unspecified.
211
+ */
212
+ function Client(apiClient) {
213
+ this.apiClient = apiClient || ApiClient.instance
214
+ PDFApi.call(this, this.apiClient)
215
+ var self = this
212
216
 
213
- var waitForPDFJob = function (options, startJob, updateRecord, callback) {
214
- var timeout = options.timeout != null ? options.timeout : 60
215
- var wait = options.wait == null ? true : !!options.wait
217
+ var waitForPDFJob = function (options, startJob, updateRecord, callback) {
218
+ var timeout = options.timeout != null ? options.timeout : 60
219
+ var wait = options.wait == null ? true : !!options.wait
216
220
 
217
- startJob(function (record) {
218
- if (!wait || record.state != 'pending') {
219
- callback(
220
- null,
221
- record,
222
- record.state == 'pending' || record.state == 'processed'
223
- )
224
- return
225
- }
226
- var startTime = Math.floor(new Date() / 1000)
221
+ startJob(function (record) {
222
+ if (!wait || record.state != 'pending') {
223
+ callback(
224
+ null,
225
+ record,
226
+ record.state == 'pending' || record.state == 'processed'
227
+ )
228
+ return
229
+ }
230
+ var startTime = Math.floor(new Date() / 1000)
227
231
 
228
- var waitForPDF = function () {
229
- updateRecord(record, function (updatedRecord) {
230
- record = updatedRecord
231
- if (record.state != 'pending') {
232
- callback(null, record, record.state === 'processed')
233
- return
234
- }
235
- var currentTime = Math.floor(new Date() / 1000)
236
- if (currentTime - startTime > timeout) {
237
- callback(
238
- new Error(
239
- 'PDF job was not finished after ' + timeout + ' seconds!'
240
- ),
241
- record,
242
- false
243
- )
244
- }
245
- setTimeout(waitForPDF, 1000)
246
- })
247
- }
248
- setTimeout(waitForPDF, 1000)
249
- })
250
- }
232
+ var waitForPDF = function () {
233
+ updateRecord(record, function (updatedRecord) {
234
+ record = updatedRecord
235
+ if (record.state != 'pending') {
236
+ callback(null, record, record.state === 'processed')
237
+ return
238
+ }
239
+ var currentTime = Math.floor(new Date() / 1000)
240
+ if (currentTime - startTime > timeout) {
241
+ callback(
242
+ new Error(
243
+ 'PDF job was not finished after ' + timeout + ' seconds!'
244
+ ),
245
+ record,
246
+ false
247
+ )
248
+ }
249
+ setTimeout(waitForPDF, 1000)
250
+ })
251
+ }
252
+ setTimeout(waitForPDF, 1000)
253
+ })
254
+ }
251
255
 
252
- this.originalCombineSubmissions = this.combineSubmissions.bind(this)
253
- this.combineSubmissions = function (_options, callback) {
254
- // eslint-disable-next-line es5/no-es6-static-methods
255
- var options = Object.assign({}, _options)
256
- // Don't send timeout or wait options to the API - causes a schema validation error.
257
- delete options.timeout
258
- delete options.wait
256
+ this.originalCombineSubmissions = this.combineSubmissions.bind(this)
257
+ this.combineSubmissions = function (_options, callback) {
258
+ // eslint-disable-next-line es5/no-es6-static-methods
259
+ var options = Object.assign({}, _options)
260
+ // Don't send timeout or wait options to the API - causes a schema validation error.
261
+ delete options.timeout
262
+ delete options.wait
259
263
 
260
- waitForPDFJob(
261
- _options,
262
- function (waitCallback) {
263
- self.originalCombineSubmissions(options, function (error, response) {
264
- if (error) {
265
- callback(error, response)
266
- return
267
- }
268
- waitCallback(response.combined_submission)
269
- })
270
- },
271
- function (record, updateCallback) {
272
- self.getCombinedSubmission(record.id, function (
273
- error,
274
- combinedSubmission
275
- ) {
264
+ waitForPDFJob(
265
+ _options,
266
+ function (waitCallback) {
267
+ self.originalCombineSubmissions(
268
+ options,
269
+ function (error, response) {
270
+ if (error) {
271
+ callback(error, response)
272
+ return
273
+ }
274
+ waitCallback(response.combined_submission)
275
+ }
276
+ )
277
+ },
278
+ function (record, updateCallback) {
279
+ self.getCombinedSubmission(
280
+ record.id,
281
+ function (error, combinedSubmission) {
282
+ if (error) {
283
+ callback(error, combinedSubmission)
284
+ return
285
+ }
286
+ updateCallback(combinedSubmission)
287
+ }
288
+ )
289
+ },
290
+ function (error, record, success) {
276
291
  if (error) {
277
- callback(error, combinedSubmission)
292
+ callback(error, record)
278
293
  return
279
294
  }
280
- updateCallback(combinedSubmission)
281
- })
282
- },
283
- function (error, record, success) {
284
- if (error) {
285
- callback(error, record)
286
- return
295
+ var response = CreateCombinedSubmissionResponse.constructFromObject(
296
+ {
297
+ status: success ? 'success' : 'error',
298
+ combined_submission: record,
299
+ }
300
+ )
301
+ callback(error, response)
287
302
  }
288
- var response = CreateCombinedSubmissionResponse.constructFromObject({
289
- status: success ? 'success' : 'error',
290
- combined_submission: record,
291
- })
292
- callback(error, response)
293
- }
294
- )
295
- }
303
+ )
304
+ }
296
305
 
297
- this.originalCombinePdfs = this.combinePdfs.bind(this)
298
- this.combinePdfs = function (_options, callback) {
299
- // eslint-disable-next-line es5/no-es6-static-methods
300
- var options = Object.assign({}, _options)
301
- // Don't send timeout or wait options to the API - causes a schema validation error.
302
- delete options.timeout
303
- delete options.wait
306
+ this.originalCombinePdfs = this.combinePdfs.bind(this)
307
+ this.combinePdfs = function (_options, callback) {
308
+ // eslint-disable-next-line es5/no-es6-static-methods
309
+ var options = Object.assign({}, _options)
310
+ // Don't send timeout or wait options to the API - causes a schema validation error.
311
+ delete options.timeout
312
+ delete options.wait
304
313
 
305
- waitForPDFJob(
306
- _options,
307
- function (waitCallback) {
308
- self.originalCombinePdfs(options, function (error, response) {
309
- if (error) {
310
- callback(error, response)
311
- return
312
- }
313
- waitCallback(response.combined_submission)
314
- })
315
- },
316
- function (record, updateCallback) {
317
- self.getCombinedSubmission(record.id, function (
318
- error,
319
- combinedSubmission
320
- ) {
314
+ waitForPDFJob(
315
+ _options,
316
+ function (waitCallback) {
317
+ self.originalCombinePdfs(options, function (error, response) {
318
+ if (error) {
319
+ callback(error, response)
320
+ return
321
+ }
322
+ waitCallback(response.combined_submission)
323
+ })
324
+ },
325
+ function (record, updateCallback) {
326
+ self.getCombinedSubmission(
327
+ record.id,
328
+ function (error, combinedSubmission) {
329
+ if (error) {
330
+ callback(error, combinedSubmission)
331
+ return
332
+ }
333
+ updateCallback(combinedSubmission)
334
+ }
335
+ )
336
+ },
337
+ function (error, record, success) {
321
338
  if (error) {
322
- callback(error, combinedSubmission)
339
+ callback(error, record)
323
340
  return
324
341
  }
325
- updateCallback(combinedSubmission)
326
- })
327
- },
328
- function (error, record, success) {
329
- if (error) {
330
- callback(error, record)
331
- return
342
+ var response = CreateCombinedSubmissionResponse.constructFromObject(
343
+ {
344
+ status: success ? 'success' : 'error',
345
+ combined_submission: record,
346
+ }
347
+ )
348
+ callback(error, response)
332
349
  }
333
- var response = CreateCombinedSubmissionResponse.constructFromObject({
334
- status: success ? 'success' : 'error',
335
- combined_submission: record,
336
- })
337
- callback(error, response)
338
- }
339
- )
340
- }
350
+ )
351
+ }
341
352
 
342
- this.originalGeneratePDF = this.generatePDF.bind(this)
343
- this.generatePDF = function (templateId, _options, callback) {
344
- // eslint-disable-next-line es5/no-es6-static-methods
345
- var options = Object.assign({}, _options)
346
- // Don't send timeout or wait options to the API - causes a schema validation error.
347
- delete options.timeout
348
- delete options.wait
353
+ this.originalGeneratePDF = this.generatePDF.bind(this)
354
+ this.generatePDF = function (templateId, _options, callback) {
355
+ // eslint-disable-next-line es5/no-es6-static-methods
356
+ var options = Object.assign({}, _options)
357
+ // Don't send timeout or wait options to the API - causes a schema validation error.
358
+ delete options.timeout
359
+ delete options.wait
349
360
 
350
- waitForPDFJob(
351
- _options,
352
- function (waitCallback) {
353
- self.originalGeneratePDF(templateId, options, function (
354
- error,
355
- response
356
- ) {
357
- if (error) {
358
- callback(error, response)
359
- return
360
- }
361
- waitCallback(response.submission)
362
- })
363
- },
364
- function (record, updateCallback) {
365
- self.getSubmission(record.id, {}, function (error, submission) {
361
+ waitForPDFJob(
362
+ _options,
363
+ function (waitCallback) {
364
+ self.originalGeneratePDF(
365
+ templateId,
366
+ options,
367
+ function (error, response) {
368
+ if (error) {
369
+ callback(error, response)
370
+ return
371
+ }
372
+ waitCallback(response.submission)
373
+ }
374
+ )
375
+ },
376
+ function (record, updateCallback) {
377
+ self.getSubmission(record.id, {}, function (error, submission) {
378
+ if (error) {
379
+ callback(error, submission)
380
+ return
381
+ }
382
+ updateCallback(submission)
383
+ })
384
+ },
385
+ function (error, record, success) {
366
386
  if (error) {
367
- callback(error, submission)
387
+ callback(error, record)
368
388
  return
369
389
  }
370
- updateCallback(submission)
371
- })
372
- },
373
- function (error, record, success) {
374
- if (error) {
375
- callback(error, record)
376
- return
390
+ var response = CreateSubmissionResponse.constructFromObject({
391
+ status: success ? 'success' : 'error',
392
+ submission: record,
393
+ })
394
+ callback(error, response)
377
395
  }
378
- var response = CreateSubmissionResponse.constructFromObject({
379
- status: success ? 'success' : 'error',
380
- submission: record,
381
- })
382
- callback(error, response)
383
- }
384
- )
385
- }
396
+ )
397
+ }
386
398
 
387
- // this.batchGeneratePDF = function (templateId, createSubmissionData, callback) {
388
- // };
389
- }
399
+ // this.batchGeneratePDF = function (templateId, createSubmissionData, callback) {
400
+ // };
401
+ }
390
402
 
391
- Client.prototype = Object.create(PDFApi.prototype)
392
- Client.prototype.constructor = Client
403
+ Client.prototype = Object.create(PDFApi.prototype)
404
+ Client.prototype.constructor = Client
393
405
 
394
- return Client
395
- })
406
+ return Client
407
+ }
408
+ )
package/src/api/PDFApi.js CHANGED
@@ -33,7 +33,7 @@
33
33
  /**
34
34
  * PDF service.
35
35
  * @module api/PDFApi
36
- * @version 1.4.0
36
+ * @version 1.5.0
37
37
  */
38
38
 
39
39
  /**
@@ -680,6 +680,53 @@
680
680
  );
681
681
  }
682
682
 
683
+ /**
684
+ * Callback function to receive the result of the deleteTemplate operation.
685
+ * @callback module:api/PDFApi~deleteTemplateCallback
686
+ * @param {String} error Error message, if any.
687
+ * @param {module:model/UpdateTemplateResponse} data The data returned by the service call.
688
+ * @param {String} response The complete HTTP response.
689
+ */
690
+
691
+ /**
692
+ * Delete a template
693
+ * @param {String} templateId
694
+ * @param {module:api/PDFApi~deleteTemplateCallback} callback The callback function, accepting three arguments: error, data, response
695
+ * data is of type: {@link module:model/UpdateTemplateResponse}
696
+ */
697
+ this.deleteTemplate = function(templateId, callback) {
698
+ var postBody = null;
699
+
700
+ // verify the required parameter 'templateId' is set
701
+ if (templateId === undefined || templateId === null) {
702
+ throw new Error("Missing the required parameter 'templateId' when calling deleteTemplate");
703
+ }
704
+
705
+
706
+ var pathParams = {
707
+ 'template_id': templateId
708
+ };
709
+ var queryParams = {
710
+ };
711
+ var collectionQueryParams = {
712
+ };
713
+ var headerParams = {
714
+ };
715
+ var formParams = {
716
+ };
717
+
718
+ var authNames = ['api_token_basic'];
719
+ var contentTypes = [];
720
+ var accepts = ['application/json'];
721
+ var returnType = UpdateTemplateResponse;
722
+
723
+ return this.apiClient.callApi(
724
+ '/templates/{template_id}', 'DELETE',
725
+ pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
726
+ authNames, contentTypes, accepts, returnType, callback
727
+ );
728
+ }
729
+
683
730
  /**
684
731
  * Callback function to receive the result of the expireCombinedSubmission operation.
685
732
  * @callback module:api/PDFApi~expireCombinedSubmissionCallback
@@ -1204,6 +1251,52 @@
1204
1251
  );
1205
1252
  }
1206
1253
 
1254
+ /**
1255
+ * Callback function to receive the result of the listCombinedSubmissions operation.
1256
+ * @callback module:api/PDFApi~listCombinedSubmissionsCallback
1257
+ * @param {String} error Error message, if any.
1258
+ * @param {Array.<module:model/CombinedSubmission>} data The data returned by the service call.
1259
+ * @param {String} response The complete HTTP response.
1260
+ */
1261
+
1262
+ /**
1263
+ * Get a list of all combined submissions
1264
+ * @param {Object} opts Optional parameters
1265
+ * @param {Number} opts.page Default: 1
1266
+ * @param {Number} opts.perPage Default: 50
1267
+ * @param {module:api/PDFApi~listCombinedSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1268
+ * data is of type: {@link Array.<module:model/CombinedSubmission>}
1269
+ */
1270
+ this.listCombinedSubmissions = function(opts, callback) {
1271
+ opts = opts || {};
1272
+ var postBody = null;
1273
+
1274
+
1275
+ var pathParams = {
1276
+ };
1277
+ var queryParams = {
1278
+ 'page': opts['page'],
1279
+ 'per_page': opts['perPage'],
1280
+ };
1281
+ var collectionQueryParams = {
1282
+ };
1283
+ var headerParams = {
1284
+ };
1285
+ var formParams = {
1286
+ };
1287
+
1288
+ var authNames = ['api_token_basic'];
1289
+ var contentTypes = [];
1290
+ var accepts = ['application/json'];
1291
+ var returnType = [CombinedSubmission];
1292
+
1293
+ return this.apiClient.callApi(
1294
+ '/combined_submissions', 'GET',
1295
+ pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1296
+ authNames, contentTypes, accepts, returnType, callback
1297
+ );
1298
+ }
1299
+
1207
1300
  /**
1208
1301
  * Callback function to receive the result of the listFolders operation.
1209
1302
  * @callback module:api/PDFApi~listFoldersCallback