docspring 1.4.0 → 2.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 (221) hide show
  1. package/README.md +58 -52
  2. package/dist/ApiClient.js +701 -0
  3. package/dist/api/PDFApi.js +1509 -0
  4. package/dist/index.js +356 -0
  5. package/dist/model/AddFieldsData.js +112 -0
  6. package/dist/model/BatchGeneratePdfs201Response.js +184 -0
  7. package/dist/model/CombinePdfsData.js +156 -0
  8. package/dist/model/CombinedSubmission.js +323 -0
  9. package/dist/model/CombinedSubmissionAction.js +252 -0
  10. package/dist/model/CombinedSubmissionData.js +148 -0
  11. package/dist/model/CopyTemplateOptions.js +124 -0
  12. package/dist/model/CreateCombinedSubmissionResponse.js +158 -0
  13. package/dist/model/CreateCustomFileData.js +112 -0
  14. package/dist/model/CreateCustomFileResponse.js +158 -0
  15. package/dist/model/CreateFolderData.js +108 -0
  16. package/dist/model/CreateHtmlSubmissionData.js +161 -0
  17. package/dist/model/CreateHtmlTemplate.js +108 -0
  18. package/dist/model/CreatePdfSubmissionData.js +190 -0
  19. package/dist/model/CreatePdfTemplate.js +108 -0
  20. package/dist/model/CreateSubmissionDataRequestData.js +210 -0
  21. package/dist/model/CreateSubmissionDataRequestEventRequest.js +215 -0
  22. package/dist/model/CreateSubmissionDataRequestEventResponse.js +158 -0
  23. package/dist/model/CreateSubmissionDataRequestResponse.js +158 -0
  24. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +158 -0
  25. package/dist/model/CreateSubmissionResponse.js +158 -0
  26. package/dist/model/CustomFile.js +126 -0
  27. package/dist/model/ErrorResponse.js +139 -0
  28. package/dist/model/Folder.js +154 -0
  29. package/dist/model/JsonSchema.js +173 -0
  30. package/dist/model/ListSubmissionsResponse.js +154 -0
  31. package/dist/model/MoveFolderData.js +89 -0
  32. package/dist/model/MoveTemplateData.js +112 -0
  33. package/dist/model/MultipleErrorsResponse.js +139 -0
  34. package/dist/model/RenameFolderData.js +112 -0
  35. package/dist/model/Submission.js +537 -0
  36. package/dist/model/SubmissionAction.js +252 -0
  37. package/dist/model/SubmissionBatch.js +213 -0
  38. package/dist/model/SubmissionBatchData.js +128 -0
  39. package/dist/model/SubmissionBatchWithSubmissions.js +243 -0
  40. package/dist/model/SubmissionDataRequest.js +475 -0
  41. package/dist/model/SubmissionDataRequestEvent.js +287 -0
  42. package/dist/model/SubmissionDataRequestShow.js +489 -0
  43. package/dist/model/SubmissionDataRequestToken.js +154 -0
  44. package/dist/model/SubmissionPreview.js +471 -0
  45. package/dist/model/SuccessErrorResponse.js +142 -0
  46. package/dist/model/SuccessMultipleErrorsResponse.js +142 -0
  47. package/dist/model/Template.js +717 -0
  48. package/dist/model/TemplateAddFieldsResponse.js +154 -0
  49. package/dist/model/TemplatePreview.js +593 -0
  50. package/dist/model/UpdateHtmlTemplate.js +108 -0
  51. package/dist/model/UpdateSubmissionDataRequestData.js +160 -0
  52. package/dist/model/UploadPresignResponse.js +157 -0
  53. package/package.json +33 -8
  54. package/.openapi-generator/VERSION +0 -1
  55. package/.openapi-generator-ignore +0 -23
  56. package/.travis.yml +0 -7
  57. package/CHANGELOG.md +0 -33
  58. package/docs/AddFieldsData.md +0 -8
  59. package/docs/AddFieldsTemplateResponse.md +0 -21
  60. package/docs/AuthenticationError.md +0 -18
  61. package/docs/AuthenticationSuccessResponse.md +0 -17
  62. package/docs/CombinePdfsData.md +0 -13
  63. package/docs/CombinedSubmission.md +0 -31
  64. package/docs/CombinedSubmissionAction.md +0 -54
  65. package/docs/CombinedSubmissionData.md +0 -12
  66. package/docs/CopyTemplateData.md +0 -9
  67. package/docs/CreateCombinedSubmissionResponse.md +0 -21
  68. package/docs/CreateCustomFileData.md +0 -8
  69. package/docs/CreateCustomFileResponse.md +0 -21
  70. package/docs/CreateFolderData.md +0 -8
  71. package/docs/CreateHtmlTemplateData.md +0 -8
  72. package/docs/CreateSubmissionBatchResponse.md +0 -23
  73. package/docs/CreateSubmissionBatchSubmissionsResponse.md +0 -23
  74. package/docs/CreateSubmissionDataRequestData.md +0 -60
  75. package/docs/CreateSubmissionDataRequestTokenResponse.md +0 -21
  76. package/docs/CreateSubmissionDataRequestTokenResponseToken.md +0 -11
  77. package/docs/CreateSubmissionResponse.md +0 -21
  78. package/docs/CreateTemplateFromUploadData.md +0 -8
  79. package/docs/CustomFile.md +0 -9
  80. package/docs/Error.md +0 -18
  81. package/docs/Folder.md +0 -11
  82. package/docs/FoldersFolder.md +0 -9
  83. package/docs/FullTemplate.md +0 -59
  84. package/docs/FullTemplateDefaults.md +0 -10
  85. package/docs/HtmlTemplateData.md +0 -48
  86. package/docs/InvalidRequest.md +0 -18
  87. package/docs/ListSubmissionsResponse.md +0 -10
  88. package/docs/MoveFolderData.md +0 -8
  89. package/docs/MoveTemplateData.md +0 -8
  90. package/docs/PDFApi.md +0 -1700
  91. package/docs/PendingTemplate.md +0 -37
  92. package/docs/RenameFolderData.md +0 -8
  93. package/docs/Submission.md +0 -55
  94. package/docs/SubmissionAction.md +0 -54
  95. package/docs/SubmissionBatch.md +0 -29
  96. package/docs/SubmissionBatchData.md +0 -11
  97. package/docs/SubmissionData.md +0 -15
  98. package/docs/SubmissionDataBatchRequest.md +0 -13
  99. package/docs/SubmissionDataRequest.md +0 -78
  100. package/docs/Template.md +0 -40
  101. package/docs/TemplateData.md +0 -36
  102. package/docs/TemplatestemplateIdaddFieldsFields.md +0 -286
  103. package/docs/UpdateDataRequestResponse.md +0 -21
  104. package/docs/UpdateSubmissionDataRequestData.md +0 -60
  105. package/docs/UpdateTemplateData.md +0 -8
  106. package/docs/UpdateTemplateResponse.md +0 -20
  107. package/docs/UploadTemplateData.md +0 -49
  108. package/docs/UploadTemplateDataDocument.md +0 -19
  109. package/docs/UploadTemplateDataDocumentMetadata.md +0 -19
  110. package/git_push.sh +0 -52
  111. package/mocha.opts +0 -1
  112. package/src/ApiClient.js +0 -605
  113. package/src/api/Client.js +0 -395
  114. package/src/api/PDFApi.js +0 -1722
  115. package/src/index.js +0 -334
  116. package/src/model/AddFieldsData.js +0 -82
  117. package/src/model/AddFieldsTemplateResponse.js +0 -114
  118. package/src/model/AuthenticationError.js +0 -102
  119. package/src/model/AuthenticationSuccessResponse.js +0 -93
  120. package/src/model/CombinePdfsData.js +0 -122
  121. package/src/model/CombinedSubmission.js +0 -183
  122. package/src/model/CombinedSubmissionAction.js +0 -198
  123. package/src/model/CombinedSubmissionData.js +0 -114
  124. package/src/model/CopyTemplateData.js +0 -90
  125. package/src/model/CreateCombinedSubmissionResponse.js +0 -114
  126. package/src/model/CreateCustomFileData.js +0 -82
  127. package/src/model/CreateCustomFileResponse.js +0 -114
  128. package/src/model/CreateFolderData.js +0 -82
  129. package/src/model/CreateHtmlTemplateData.js +0 -82
  130. package/src/model/CreateSubmissionBatchResponse.js +0 -130
  131. package/src/model/CreateSubmissionBatchSubmissionsResponse.js +0 -119
  132. package/src/model/CreateSubmissionDataRequestData.js +0 -256
  133. package/src/model/CreateSubmissionDataRequestTokenResponse.js +0 -114
  134. package/src/model/CreateSubmissionDataRequestTokenResponseToken.js +0 -105
  135. package/src/model/CreateSubmissionResponse.js +0 -114
  136. package/src/model/CreateTemplateFromUploadData.js +0 -82
  137. package/src/model/CustomFile.js +0 -89
  138. package/src/model/Error.js +0 -103
  139. package/src/model/Folder.js +0 -105
  140. package/src/model/FoldersFolder.js +0 -89
  141. package/src/model/FullTemplate.js +0 -407
  142. package/src/model/FullTemplateDefaults.js +0 -97
  143. package/src/model/HtmlTemplateData.js +0 -248
  144. package/src/model/InvalidRequest.js +0 -103
  145. package/src/model/ListSubmissionsResponse.js +0 -97
  146. package/src/model/MoveFolderData.js +0 -81
  147. package/src/model/MoveTemplateData.js +0 -82
  148. package/src/model/PendingTemplate.js +0 -231
  149. package/src/model/RenameFolderData.js +0 -82
  150. package/src/model/Submission.js +0 -291
  151. package/src/model/SubmissionAction.js +0 -198
  152. package/src/model/SubmissionBatch.js +0 -167
  153. package/src/model/SubmissionBatchData.js +0 -106
  154. package/src/model/SubmissionData.js +0 -138
  155. package/src/model/SubmissionDataBatchRequest.js +0 -121
  156. package/src/model/SubmissionDataRequest.js +0 -337
  157. package/src/model/Template.js +0 -255
  158. package/src/model/TemplateData.js +0 -223
  159. package/src/model/TemplatestemplateIdaddFieldsFields.js +0 -1128
  160. package/src/model/UpdateDataRequestResponse.js +0 -114
  161. package/src/model/UpdateSubmissionDataRequestData.js +0 -256
  162. package/src/model/UpdateTemplateData.js +0 -82
  163. package/src/model/UpdateTemplateResponse.js +0 -106
  164. package/src/model/UploadTemplateData.js +0 -256
  165. package/src/model/UploadTemplateDataDocument.js +0 -109
  166. package/src/model/UploadTemplateDataDocumentMetadata.js +0 -109
  167. package/test/api/ClientIntegration.spec.js +0 -275
  168. package/test/api/PDFApi.spec.js.original +0 -395
  169. package/test/api/PDFApiIntegration.spec.js +0 -301
  170. package/test/model/AddFieldsData.spec.js +0 -67
  171. package/test/model/AddFieldsTemplateResponse.spec.js +0 -79
  172. package/test/model/AuthenticationError.spec.js +0 -73
  173. package/test/model/AuthenticationSuccessResponse.spec.js +0 -67
  174. package/test/model/CombinePdfsData.spec.js +0 -97
  175. package/test/model/CombinedSubmission.spec.js +0 -127
  176. package/test/model/CombinedSubmissionAction.spec.js +0 -97
  177. package/test/model/CombinedSubmissionData.spec.js +0 -91
  178. package/test/model/CopyTemplateData.spec.js +0 -73
  179. package/test/model/CreateCombinedSubmissionResponse.spec.js +0 -79
  180. package/test/model/CreateCustomFileData.spec.js +0 -67
  181. package/test/model/CreateCustomFileResponse.spec.js +0 -79
  182. package/test/model/CreateFolderData.spec.js +0 -67
  183. package/test/model/CreateHtmlTemplateData.spec.js +0 -67
  184. package/test/model/CreateSubmissionBatchResponse.spec.js +0 -91
  185. package/test/model/CreateSubmissionBatchSubmissionsResponse.spec.js +0 -79
  186. package/test/model/CreateSubmissionDataRequestData.spec.js +0 -139
  187. package/test/model/CreateSubmissionDataRequestTokenResponse.spec.js +0 -79
  188. package/test/model/CreateSubmissionDataRequestTokenResponseToken.spec.js +0 -85
  189. package/test/model/CreateSubmissionResponse.spec.js +0 -79
  190. package/test/model/CreateTemplateFromUploadData.spec.js +0 -67
  191. package/test/model/CustomFile.spec.js +0 -73
  192. package/test/model/Error.spec.js +0 -73
  193. package/test/model/Folder.spec.js +0 -85
  194. package/test/model/FoldersFolder.spec.js +0 -73
  195. package/test/model/FullTemplate.spec.js +0 -295
  196. package/test/model/FullTemplateDefaults.spec.js +0 -79
  197. package/test/model/HtmlTemplateData.spec.js +0 -163
  198. package/test/model/InvalidRequest.spec.js +0 -73
  199. package/test/model/ListSubmissionsResponse.spec.js +0 -79
  200. package/test/model/MoveFolderData.spec.js +0 -67
  201. package/test/model/MoveTemplateData.spec.js +0 -67
  202. package/test/model/PendingTemplate.spec.js +0 -163
  203. package/test/model/RenameFolderData.spec.js +0 -67
  204. package/test/model/Submission.spec.js +0 -175
  205. package/test/model/SubmissionAction.spec.js +0 -97
  206. package/test/model/SubmissionBatch.spec.js +0 -115
  207. package/test/model/SubmissionBatchData.spec.js +0 -85
  208. package/test/model/SubmissionData.spec.js +0 -109
  209. package/test/model/SubmissionDataBatchRequest.spec.js +0 -97
  210. package/test/model/SubmissionDataRequest.spec.js +0 -181
  211. package/test/model/Template.spec.js +0 -181
  212. package/test/model/TemplateData.spec.js +0 -157
  213. package/test/model/TemplatestemplateIdaddFieldsFields.spec.js +0 -577
  214. package/test/model/UpdateDataRequestResponse.spec.js +0 -79
  215. package/test/model/UpdateSubmissionDataRequestData.spec.js +0 -139
  216. package/test/model/UpdateTemplateData.spec.js +0 -67
  217. package/test/model/UpdateTemplateResponse.spec.js +0 -73
  218. package/test/model/UploadTemplateData.spec.js +0 -169
  219. package/test/model/UploadTemplateDataDocument.spec.js +0 -79
  220. package/test/model/UploadTemplateDataDocumentMetadata.spec.js +0 -79
  221. package/yarn.lock +0 -263
package/src/api/PDFApi.js DELETED
@@ -1,1722 +0,0 @@
1
- /**
2
- * API v1
3
- * DocSpring is a service that helps you fill out and sign PDF templates.
4
- *
5
- * OpenAPI spec version: v1
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- *
10
- * OpenAPI Generator version: 3.3.0
11
- *
12
- * Do not edit the class manually.
13
- *
14
- */
15
-
16
- (function(root, factory) {
17
- if (typeof define === 'function' && define.amd) {
18
- // AMD. Register as an anonymous module.
19
- define(['../ApiClient', '../model/AddFieldsData', '../model/AddFieldsTemplateResponse', '../model/AuthenticationError', '../model/AuthenticationSuccessResponse', '../model/CombinePdfsData', '../model/CombinedSubmission', '../model/CombinedSubmissionData', '../model/CopyTemplateData', '../model/CreateCombinedSubmissionResponse', '../model/CreateCustomFileData', '../model/CreateCustomFileResponse', '../model/CreateFolderData', '../model/CreateHtmlTemplateData', '../model/CreateSubmissionBatchResponse', '../model/CreateSubmissionDataRequestTokenResponse', '../model/CreateSubmissionResponse', '../model/CreateTemplateFromUploadData', '../model/Error', '../model/Folder', '../model/FullTemplate', '../model/InvalidRequest', '../model/ListSubmissionsResponse', '../model/MoveFolderData', '../model/MoveTemplateData', '../model/PendingTemplate', '../model/RenameFolderData', '../model/Submission', '../model/SubmissionBatch', '../model/SubmissionBatchData', '../model/SubmissionData', '../model/SubmissionDataRequest', '../model/Template', '../model/UpdateDataRequestResponse', '../model/UpdateSubmissionDataRequestData', '../model/UpdateTemplateData', '../model/UpdateTemplateResponse'], factory);
20
- } else if (typeof module === 'object' && module.exports) {
21
- // CommonJS-like environments that support module.exports, like Node.
22
- module.exports = factory(require('../ApiClient'), require('../model/AddFieldsData'), require('../model/AddFieldsTemplateResponse'), require('../model/AuthenticationError'), require('../model/AuthenticationSuccessResponse'), require('../model/CombinePdfsData'), require('../model/CombinedSubmission'), require('../model/CombinedSubmissionData'), require('../model/CopyTemplateData'), require('../model/CreateCombinedSubmissionResponse'), require('../model/CreateCustomFileData'), require('../model/CreateCustomFileResponse'), require('../model/CreateFolderData'), require('../model/CreateHtmlTemplateData'), require('../model/CreateSubmissionBatchResponse'), require('../model/CreateSubmissionDataRequestTokenResponse'), require('../model/CreateSubmissionResponse'), require('../model/CreateTemplateFromUploadData'), require('../model/Error'), require('../model/Folder'), require('../model/FullTemplate'), require('../model/InvalidRequest'), require('../model/ListSubmissionsResponse'), require('../model/MoveFolderData'), require('../model/MoveTemplateData'), require('../model/PendingTemplate'), require('../model/RenameFolderData'), require('../model/Submission'), require('../model/SubmissionBatch'), require('../model/SubmissionBatchData'), require('../model/SubmissionData'), require('../model/SubmissionDataRequest'), require('../model/Template'), require('../model/UpdateDataRequestResponse'), require('../model/UpdateSubmissionDataRequestData'), require('../model/UpdateTemplateData'), require('../model/UpdateTemplateResponse'));
23
- } else {
24
- // Browser globals (root is window)
25
- if (!root.DocSpring) {
26
- root.DocSpring = {};
27
- }
28
- root.DocSpring.PDFApi = factory(root.DocSpring.ApiClient, root.DocSpring.AddFieldsData, root.DocSpring.AddFieldsTemplateResponse, root.DocSpring.AuthenticationError, root.DocSpring.AuthenticationSuccessResponse, root.DocSpring.CombinePdfsData, root.DocSpring.CombinedSubmission, root.DocSpring.CombinedSubmissionData, root.DocSpring.CopyTemplateData, root.DocSpring.CreateCombinedSubmissionResponse, root.DocSpring.CreateCustomFileData, root.DocSpring.CreateCustomFileResponse, root.DocSpring.CreateFolderData, root.DocSpring.CreateHtmlTemplateData, root.DocSpring.CreateSubmissionBatchResponse, root.DocSpring.CreateSubmissionDataRequestTokenResponse, root.DocSpring.CreateSubmissionResponse, root.DocSpring.CreateTemplateFromUploadData, root.DocSpring.Error, root.DocSpring.Folder, root.DocSpring.FullTemplate, root.DocSpring.InvalidRequest, root.DocSpring.ListSubmissionsResponse, root.DocSpring.MoveFolderData, root.DocSpring.MoveTemplateData, root.DocSpring.PendingTemplate, root.DocSpring.RenameFolderData, root.DocSpring.Submission, root.DocSpring.SubmissionBatch, root.DocSpring.SubmissionBatchData, root.DocSpring.SubmissionData, root.DocSpring.SubmissionDataRequest, root.DocSpring.Template, root.DocSpring.UpdateDataRequestResponse, root.DocSpring.UpdateSubmissionDataRequestData, root.DocSpring.UpdateTemplateData, root.DocSpring.UpdateTemplateResponse);
29
- }
30
- }(this, function(ApiClient, AddFieldsData, AddFieldsTemplateResponse, AuthenticationError, AuthenticationSuccessResponse, CombinePdfsData, CombinedSubmission, CombinedSubmissionData, CopyTemplateData, CreateCombinedSubmissionResponse, CreateCustomFileData, CreateCustomFileResponse, CreateFolderData, CreateHtmlTemplateData, CreateSubmissionBatchResponse, CreateSubmissionDataRequestTokenResponse, CreateSubmissionResponse, CreateTemplateFromUploadData, Error, Folder, FullTemplate, InvalidRequest, ListSubmissionsResponse, MoveFolderData, MoveTemplateData, PendingTemplate, RenameFolderData, Submission, SubmissionBatch, SubmissionBatchData, SubmissionData, SubmissionDataRequest, Template, UpdateDataRequestResponse, UpdateSubmissionDataRequestData, UpdateTemplateData, UpdateTemplateResponse) {
31
- 'use strict';
32
-
33
- /**
34
- * PDF service.
35
- * @module api/PDFApi
36
- * @version 1.4.0
37
- */
38
-
39
- /**
40
- * Constructs a new PDFApi.
41
- * @alias module:api/PDFApi
42
- * @class
43
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
44
- * default to {@link module:ApiClient#instance} if unspecified.
45
- */
46
- var exports = function(apiClient) {
47
- this.apiClient = apiClient || ApiClient.instance;
48
-
49
-
50
- /**
51
- * Callback function to receive the result of the addFieldsToTemplate operation.
52
- * @callback module:api/PDFApi~addFieldsToTemplateCallback
53
- * @param {String} error Error message, if any.
54
- * @param {module:model/AddFieldsTemplateResponse} data The data returned by the service call.
55
- * @param {String} response The complete HTTP response.
56
- */
57
-
58
- /**
59
- * Add new fields to a Template
60
- * @param {String} templateId
61
- * @param {module:model/AddFieldsData} addFieldsData
62
- * @param {module:api/PDFApi~addFieldsToTemplateCallback} callback The callback function, accepting three arguments: error, data, response
63
- * data is of type: {@link module:model/AddFieldsTemplateResponse}
64
- */
65
- this.addFieldsToTemplate = function(templateId, addFieldsData, callback) {
66
- var postBody = addFieldsData;
67
-
68
- // verify the required parameter 'templateId' is set
69
- if (templateId === undefined || templateId === null) {
70
- throw new Error("Missing the required parameter 'templateId' when calling addFieldsToTemplate");
71
- }
72
-
73
- // verify the required parameter 'addFieldsData' is set
74
- if (addFieldsData === undefined || addFieldsData === null) {
75
- throw new Error("Missing the required parameter 'addFieldsData' when calling addFieldsToTemplate");
76
- }
77
-
78
-
79
- var pathParams = {
80
- 'template_id': templateId
81
- };
82
- var queryParams = {
83
- };
84
- var collectionQueryParams = {
85
- };
86
- var headerParams = {
87
- };
88
- var formParams = {
89
- };
90
-
91
- var authNames = ['api_token_basic'];
92
- var contentTypes = ['application/json'];
93
- var accepts = ['application/json'];
94
- var returnType = AddFieldsTemplateResponse;
95
-
96
- return this.apiClient.callApi(
97
- '/templates/{template_id}/add_fields', 'PUT',
98
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
99
- authNames, contentTypes, accepts, returnType, callback
100
- );
101
- }
102
-
103
- /**
104
- * Callback function to receive the result of the batchGeneratePdfV1 operation.
105
- * @callback module:api/PDFApi~batchGeneratePdfV1Callback
106
- * @param {String} error Error message, if any.
107
- * @param {Array.<module:model/CreateSubmissionResponse>} data The data returned by the service call.
108
- * @param {String} response The complete HTTP response.
109
- */
110
-
111
- /**
112
- * Generates multiple PDFs
113
- * @param {String} templateId
114
- * @param {Array.<Object>} requestBody
115
- * @param {module:api/PDFApi~batchGeneratePdfV1Callback} callback The callback function, accepting three arguments: error, data, response
116
- * data is of type: {@link Array.<module:model/CreateSubmissionResponse>}
117
- */
118
- this.batchGeneratePdfV1 = function(templateId, requestBody, callback) {
119
- var postBody = requestBody;
120
-
121
- // verify the required parameter 'templateId' is set
122
- if (templateId === undefined || templateId === null) {
123
- throw new Error("Missing the required parameter 'templateId' when calling batchGeneratePdfV1");
124
- }
125
-
126
- // verify the required parameter 'requestBody' is set
127
- if (requestBody === undefined || requestBody === null) {
128
- throw new Error("Missing the required parameter 'requestBody' when calling batchGeneratePdfV1");
129
- }
130
-
131
-
132
- var pathParams = {
133
- 'template_id': templateId
134
- };
135
- var queryParams = {
136
- };
137
- var collectionQueryParams = {
138
- };
139
- var headerParams = {
140
- };
141
- var formParams = {
142
- };
143
-
144
- var authNames = ['api_token_basic'];
145
- var contentTypes = ['application/json'];
146
- var accepts = ['application/json'];
147
- var returnType = [CreateSubmissionResponse];
148
-
149
- return this.apiClient.callApi(
150
- '/templates/{template_id}/submissions/batch', 'POST',
151
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
152
- authNames, contentTypes, accepts, returnType, callback
153
- );
154
- }
155
-
156
- /**
157
- * Callback function to receive the result of the batchGeneratePdfs operation.
158
- * @callback module:api/PDFApi~batchGeneratePdfsCallback
159
- * @param {String} error Error message, if any.
160
- * @param {module:model/CreateSubmissionBatchResponse} data The data returned by the service call.
161
- * @param {String} response The complete HTTP response.
162
- */
163
-
164
- /**
165
- * Generates multiple PDFs
166
- * @param {module:model/SubmissionBatchData} submissionBatchData
167
- * @param {module:api/PDFApi~batchGeneratePdfsCallback} callback The callback function, accepting three arguments: error, data, response
168
- * data is of type: {@link module:model/CreateSubmissionBatchResponse}
169
- */
170
- this.batchGeneratePdfs = function(submissionBatchData, callback) {
171
- var postBody = submissionBatchData;
172
-
173
- // verify the required parameter 'submissionBatchData' is set
174
- if (submissionBatchData === undefined || submissionBatchData === null) {
175
- throw new Error("Missing the required parameter 'submissionBatchData' when calling batchGeneratePdfs");
176
- }
177
-
178
-
179
- var pathParams = {
180
- };
181
- var queryParams = {
182
- };
183
- var collectionQueryParams = {
184
- };
185
- var headerParams = {
186
- };
187
- var formParams = {
188
- };
189
-
190
- var authNames = ['api_token_basic'];
191
- var contentTypes = ['application/json'];
192
- var accepts = ['application/json'];
193
- var returnType = CreateSubmissionBatchResponse;
194
-
195
- return this.apiClient.callApi(
196
- '/submissions/batches', 'POST',
197
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
198
- authNames, contentTypes, accepts, returnType, callback
199
- );
200
- }
201
-
202
- /**
203
- * Callback function to receive the result of the combinePdfs operation.
204
- * @callback module:api/PDFApi~combinePdfsCallback
205
- * @param {String} error Error message, if any.
206
- * @param {module:model/CreateCombinedSubmissionResponse} data The data returned by the service call.
207
- * @param {String} response The complete HTTP response.
208
- */
209
-
210
- /**
211
- * Merge submission PDFs, template PDFs, or custom files
212
- * @param {module:model/CombinePdfsData} combinePdfsData
213
- * @param {module:api/PDFApi~combinePdfsCallback} callback The callback function, accepting three arguments: error, data, response
214
- * data is of type: {@link module:model/CreateCombinedSubmissionResponse}
215
- */
216
- this.combinePdfs = function(combinePdfsData, callback) {
217
- var postBody = combinePdfsData;
218
-
219
- // verify the required parameter 'combinePdfsData' is set
220
- if (combinePdfsData === undefined || combinePdfsData === null) {
221
- throw new Error("Missing the required parameter 'combinePdfsData' when calling combinePdfs");
222
- }
223
-
224
-
225
- var pathParams = {
226
- };
227
- var queryParams = {
228
- };
229
- var collectionQueryParams = {
230
- };
231
- var headerParams = {
232
- };
233
- var formParams = {
234
- };
235
-
236
- var authNames = ['api_token_basic'];
237
- var contentTypes = ['application/json'];
238
- var accepts = ['application/json'];
239
- var returnType = CreateCombinedSubmissionResponse;
240
-
241
- return this.apiClient.callApi(
242
- '/combined_submissions?v=2', 'POST',
243
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
244
- authNames, contentTypes, accepts, returnType, callback
245
- );
246
- }
247
-
248
- /**
249
- * Callback function to receive the result of the combineSubmissions operation.
250
- * @callback module:api/PDFApi~combineSubmissionsCallback
251
- * @param {String} error Error message, if any.
252
- * @param {module:model/CreateCombinedSubmissionResponse} data The data returned by the service call.
253
- * @param {String} response The complete HTTP response.
254
- */
255
-
256
- /**
257
- * Merge generated PDFs together
258
- * @param {module:model/CombinedSubmissionData} combinedSubmissionData
259
- * @param {module:api/PDFApi~combineSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
260
- * data is of type: {@link module:model/CreateCombinedSubmissionResponse}
261
- */
262
- this.combineSubmissions = function(combinedSubmissionData, callback) {
263
- var postBody = combinedSubmissionData;
264
-
265
- // verify the required parameter 'combinedSubmissionData' is set
266
- if (combinedSubmissionData === undefined || combinedSubmissionData === null) {
267
- throw new Error("Missing the required parameter 'combinedSubmissionData' when calling combineSubmissions");
268
- }
269
-
270
-
271
- var pathParams = {
272
- };
273
- var queryParams = {
274
- };
275
- var collectionQueryParams = {
276
- };
277
- var headerParams = {
278
- };
279
- var formParams = {
280
- };
281
-
282
- var authNames = ['api_token_basic'];
283
- var contentTypes = ['application/json'];
284
- var accepts = ['application/json'];
285
- var returnType = CreateCombinedSubmissionResponse;
286
-
287
- return this.apiClient.callApi(
288
- '/combined_submissions', 'POST',
289
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
290
- authNames, contentTypes, accepts, returnType, callback
291
- );
292
- }
293
-
294
- /**
295
- * Callback function to receive the result of the copyTemplate operation.
296
- * @callback module:api/PDFApi~copyTemplateCallback
297
- * @param {String} error Error message, if any.
298
- * @param {module:model/Template} data The data returned by the service call.
299
- * @param {String} response The complete HTTP response.
300
- */
301
-
302
- /**
303
- * Copy a Template
304
- * @param {String} templateId
305
- * @param {module:model/CopyTemplateData} copyTemplateData
306
- * @param {module:api/PDFApi~copyTemplateCallback} callback The callback function, accepting three arguments: error, data, response
307
- * data is of type: {@link module:model/Template}
308
- */
309
- this.copyTemplate = function(templateId, copyTemplateData, callback) {
310
- var postBody = copyTemplateData;
311
-
312
- // verify the required parameter 'templateId' is set
313
- if (templateId === undefined || templateId === null) {
314
- throw new Error("Missing the required parameter 'templateId' when calling copyTemplate");
315
- }
316
-
317
- // verify the required parameter 'copyTemplateData' is set
318
- if (copyTemplateData === undefined || copyTemplateData === null) {
319
- throw new Error("Missing the required parameter 'copyTemplateData' when calling copyTemplate");
320
- }
321
-
322
-
323
- var pathParams = {
324
- 'template_id': templateId
325
- };
326
- var queryParams = {
327
- };
328
- var collectionQueryParams = {
329
- };
330
- var headerParams = {
331
- };
332
- var formParams = {
333
- };
334
-
335
- var authNames = ['api_token_basic'];
336
- var contentTypes = ['application/json'];
337
- var accepts = ['application/json'];
338
- var returnType = Template;
339
-
340
- return this.apiClient.callApi(
341
- '/templates/{template_id}/copy', 'POST',
342
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
343
- authNames, contentTypes, accepts, returnType, callback
344
- );
345
- }
346
-
347
- /**
348
- * Callback function to receive the result of the createCustomFileFromUpload operation.
349
- * @callback module:api/PDFApi~createCustomFileFromUploadCallback
350
- * @param {String} error Error message, if any.
351
- * @param {module:model/CreateCustomFileResponse} data The data returned by the service call.
352
- * @param {String} response The complete HTTP response.
353
- */
354
-
355
- /**
356
- * Create a new custom file from a cached presign upload
357
- * @param {module:model/CreateCustomFileData} createCustomFileData
358
- * @param {module:api/PDFApi~createCustomFileFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
359
- * data is of type: {@link module:model/CreateCustomFileResponse}
360
- */
361
- this.createCustomFileFromUpload = function(createCustomFileData, callback) {
362
- var postBody = createCustomFileData;
363
-
364
- // verify the required parameter 'createCustomFileData' is set
365
- if (createCustomFileData === undefined || createCustomFileData === null) {
366
- throw new Error("Missing the required parameter 'createCustomFileData' when calling createCustomFileFromUpload");
367
- }
368
-
369
-
370
- var pathParams = {
371
- };
372
- var queryParams = {
373
- };
374
- var collectionQueryParams = {
375
- };
376
- var headerParams = {
377
- };
378
- var formParams = {
379
- };
380
-
381
- var authNames = ['api_token_basic'];
382
- var contentTypes = ['application/json'];
383
- var accepts = ['application/json'];
384
- var returnType = CreateCustomFileResponse;
385
-
386
- return this.apiClient.callApi(
387
- '/custom_files', 'POST',
388
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
389
- authNames, contentTypes, accepts, returnType, callback
390
- );
391
- }
392
-
393
- /**
394
- * Callback function to receive the result of the createDataRequestToken operation.
395
- * @callback module:api/PDFApi~createDataRequestTokenCallback
396
- * @param {String} error Error message, if any.
397
- * @param {module:model/CreateSubmissionDataRequestTokenResponse} data The data returned by the service call.
398
- * @param {String} response The complete HTTP response.
399
- */
400
-
401
- /**
402
- * Creates a new data request token for form authentication
403
- * @param {String} dataRequestId
404
- * @param {module:api/PDFApi~createDataRequestTokenCallback} callback The callback function, accepting three arguments: error, data, response
405
- * data is of type: {@link module:model/CreateSubmissionDataRequestTokenResponse}
406
- */
407
- this.createDataRequestToken = function(dataRequestId, callback) {
408
- var postBody = null;
409
-
410
- // verify the required parameter 'dataRequestId' is set
411
- if (dataRequestId === undefined || dataRequestId === null) {
412
- throw new Error("Missing the required parameter 'dataRequestId' when calling createDataRequestToken");
413
- }
414
-
415
-
416
- var pathParams = {
417
- 'data_request_id': dataRequestId
418
- };
419
- var queryParams = {
420
- };
421
- var collectionQueryParams = {
422
- };
423
- var headerParams = {
424
- };
425
- var formParams = {
426
- };
427
-
428
- var authNames = ['api_token_basic'];
429
- var contentTypes = [];
430
- var accepts = ['application/json'];
431
- var returnType = CreateSubmissionDataRequestTokenResponse;
432
-
433
- return this.apiClient.callApi(
434
- '/data_requests/{data_request_id}/tokens', 'POST',
435
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
436
- authNames, contentTypes, accepts, returnType, callback
437
- );
438
- }
439
-
440
- /**
441
- * Callback function to receive the result of the createFolder operation.
442
- * @callback module:api/PDFApi~createFolderCallback
443
- * @param {String} error Error message, if any.
444
- * @param {module:model/Folder} data The data returned by the service call.
445
- * @param {String} response The complete HTTP response.
446
- */
447
-
448
- /**
449
- * Create a folder
450
- * @param {module:model/CreateFolderData} createFolderData
451
- * @param {module:api/PDFApi~createFolderCallback} callback The callback function, accepting three arguments: error, data, response
452
- * data is of type: {@link module:model/Folder}
453
- */
454
- this.createFolder = function(createFolderData, callback) {
455
- var postBody = createFolderData;
456
-
457
- // verify the required parameter 'createFolderData' is set
458
- if (createFolderData === undefined || createFolderData === null) {
459
- throw new Error("Missing the required parameter 'createFolderData' when calling createFolder");
460
- }
461
-
462
-
463
- var pathParams = {
464
- };
465
- var queryParams = {
466
- };
467
- var collectionQueryParams = {
468
- };
469
- var headerParams = {
470
- };
471
- var formParams = {
472
- };
473
-
474
- var authNames = ['api_token_basic'];
475
- var contentTypes = ['application/json'];
476
- var accepts = ['application/json'];
477
- var returnType = Folder;
478
-
479
- return this.apiClient.callApi(
480
- '/folders/', 'POST',
481
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
482
- authNames, contentTypes, accepts, returnType, callback
483
- );
484
- }
485
-
486
- /**
487
- * Callback function to receive the result of the createHTMLTemplate operation.
488
- * @callback module:api/PDFApi~createHTMLTemplateCallback
489
- * @param {String} error Error message, if any.
490
- * @param {module:model/PendingTemplate} data The data returned by the service call.
491
- * @param {String} response The complete HTTP response.
492
- */
493
-
494
- /**
495
- * Create a new HTML template
496
- * @param {module:model/CreateHtmlTemplateData} createHtmlTemplateData
497
- * @param {module:api/PDFApi~createHTMLTemplateCallback} callback The callback function, accepting three arguments: error, data, response
498
- * data is of type: {@link module:model/PendingTemplate}
499
- */
500
- this.createHTMLTemplate = function(createHtmlTemplateData, callback) {
501
- var postBody = createHtmlTemplateData;
502
-
503
- // verify the required parameter 'createHtmlTemplateData' is set
504
- if (createHtmlTemplateData === undefined || createHtmlTemplateData === null) {
505
- throw new Error("Missing the required parameter 'createHtmlTemplateData' when calling createHTMLTemplate");
506
- }
507
-
508
-
509
- var pathParams = {
510
- };
511
- var queryParams = {
512
- };
513
- var collectionQueryParams = {
514
- };
515
- var headerParams = {
516
- };
517
- var formParams = {
518
- };
519
-
520
- var authNames = ['api_token_basic'];
521
- var contentTypes = ['application/json'];
522
- var accepts = ['application/json'];
523
- var returnType = PendingTemplate;
524
-
525
- return this.apiClient.callApi(
526
- '/templates?desc=html', 'POST',
527
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
528
- authNames, contentTypes, accepts, returnType, callback
529
- );
530
- }
531
-
532
- /**
533
- * Callback function to receive the result of the createPDFTemplate operation.
534
- * @callback module:api/PDFApi~createPDFTemplateCallback
535
- * @param {String} error Error message, if any.
536
- * @param {module:model/PendingTemplate} data The data returned by the service call.
537
- * @param {String} response The complete HTTP response.
538
- */
539
-
540
- /**
541
- * Create a new PDF template with a form POST file upload
542
- * @param {File} templateDocument
543
- * @param {String} templateName
544
- * @param {Object} opts Optional parameters
545
- * @param {String} opts.templateParentFolderId
546
- * @param {module:api/PDFApi~createPDFTemplateCallback} callback The callback function, accepting three arguments: error, data, response
547
- * data is of type: {@link module:model/PendingTemplate}
548
- */
549
- this.createPDFTemplate = function(templateDocument, templateName, opts, callback) {
550
- opts = opts || {};
551
- var postBody = null;
552
-
553
- // verify the required parameter 'templateDocument' is set
554
- if (templateDocument === undefined || templateDocument === null) {
555
- throw new Error("Missing the required parameter 'templateDocument' when calling createPDFTemplate");
556
- }
557
-
558
- // verify the required parameter 'templateName' is set
559
- if (templateName === undefined || templateName === null) {
560
- throw new Error("Missing the required parameter 'templateName' when calling createPDFTemplate");
561
- }
562
-
563
-
564
- var pathParams = {
565
- };
566
- var queryParams = {
567
- };
568
- var collectionQueryParams = {
569
- };
570
- var headerParams = {
571
- };
572
- var formParams = {
573
- 'template[document]': templateDocument,
574
- 'template[name]': templateName,
575
- 'template[parent_folder_id]': opts['templateParentFolderId']
576
- };
577
-
578
- var authNames = ['api_token_basic'];
579
- var contentTypes = ['multipart/form-data'];
580
- var accepts = ['application/json'];
581
- var returnType = PendingTemplate;
582
-
583
- return this.apiClient.callApi(
584
- '/templates', 'POST',
585
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
586
- authNames, contentTypes, accepts, returnType, callback
587
- );
588
- }
589
-
590
- /**
591
- * Callback function to receive the result of the createPDFTemplateFromUpload operation.
592
- * @callback module:api/PDFApi~createPDFTemplateFromUploadCallback
593
- * @param {String} error Error message, if any.
594
- * @param {module:model/PendingTemplate} data The data returned by the service call.
595
- * @param {String} response The complete HTTP response.
596
- */
597
-
598
- /**
599
- * Create a new PDF template from a cached presign upload
600
- * @param {module:model/CreateTemplateFromUploadData} createTemplateFromUploadData
601
- * @param {module:api/PDFApi~createPDFTemplateFromUploadCallback} callback The callback function, accepting three arguments: error, data, response
602
- * data is of type: {@link module:model/PendingTemplate}
603
- */
604
- this.createPDFTemplateFromUpload = function(createTemplateFromUploadData, callback) {
605
- var postBody = createTemplateFromUploadData;
606
-
607
- // verify the required parameter 'createTemplateFromUploadData' is set
608
- if (createTemplateFromUploadData === undefined || createTemplateFromUploadData === null) {
609
- throw new Error("Missing the required parameter 'createTemplateFromUploadData' when calling createPDFTemplateFromUpload");
610
- }
611
-
612
-
613
- var pathParams = {
614
- };
615
- var queryParams = {
616
- };
617
- var collectionQueryParams = {
618
- };
619
- var headerParams = {
620
- };
621
- var formParams = {
622
- };
623
-
624
- var authNames = ['api_token_basic'];
625
- var contentTypes = ['application/json'];
626
- var accepts = ['application/json'];
627
- var returnType = PendingTemplate;
628
-
629
- return this.apiClient.callApi(
630
- '/templates?desc=cached_upload', 'POST',
631
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
632
- authNames, contentTypes, accepts, returnType, callback
633
- );
634
- }
635
-
636
- /**
637
- * Callback function to receive the result of the deleteFolder operation.
638
- * @callback module:api/PDFApi~deleteFolderCallback
639
- * @param {String} error Error message, if any.
640
- * @param {module:model/Folder} data The data returned by the service call.
641
- * @param {String} response The complete HTTP response.
642
- */
643
-
644
- /**
645
- * Delete a folder
646
- * @param {String} folderId
647
- * @param {module:api/PDFApi~deleteFolderCallback} callback The callback function, accepting three arguments: error, data, response
648
- * data is of type: {@link module:model/Folder}
649
- */
650
- this.deleteFolder = function(folderId, callback) {
651
- var postBody = null;
652
-
653
- // verify the required parameter 'folderId' is set
654
- if (folderId === undefined || folderId === null) {
655
- throw new Error("Missing the required parameter 'folderId' when calling deleteFolder");
656
- }
657
-
658
-
659
- var pathParams = {
660
- 'folder_id': folderId
661
- };
662
- var queryParams = {
663
- };
664
- var collectionQueryParams = {
665
- };
666
- var headerParams = {
667
- };
668
- var formParams = {
669
- };
670
-
671
- var authNames = ['api_token_basic'];
672
- var contentTypes = [];
673
- var accepts = ['application/json'];
674
- var returnType = Folder;
675
-
676
- return this.apiClient.callApi(
677
- '/folders/{folder_id}', 'DELETE',
678
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
679
- authNames, contentTypes, accepts, returnType, callback
680
- );
681
- }
682
-
683
- /**
684
- * Callback function to receive the result of the expireCombinedSubmission operation.
685
- * @callback module:api/PDFApi~expireCombinedSubmissionCallback
686
- * @param {String} error Error message, if any.
687
- * @param {module:model/CombinedSubmission} data The data returned by the service call.
688
- * @param {String} response The complete HTTP response.
689
- */
690
-
691
- /**
692
- * Expire a combined submission
693
- * @param {String} combinedSubmissionId
694
- * @param {module:api/PDFApi~expireCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
695
- * data is of type: {@link module:model/CombinedSubmission}
696
- */
697
- this.expireCombinedSubmission = function(combinedSubmissionId, callback) {
698
- var postBody = null;
699
-
700
- // verify the required parameter 'combinedSubmissionId' is set
701
- if (combinedSubmissionId === undefined || combinedSubmissionId === null) {
702
- throw new Error("Missing the required parameter 'combinedSubmissionId' when calling expireCombinedSubmission");
703
- }
704
-
705
-
706
- var pathParams = {
707
- 'combined_submission_id': combinedSubmissionId
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 = CombinedSubmission;
722
-
723
- return this.apiClient.callApi(
724
- '/combined_submissions/{combined_submission_id}', 'DELETE',
725
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
726
- authNames, contentTypes, accepts, returnType, callback
727
- );
728
- }
729
-
730
- /**
731
- * Callback function to receive the result of the expireSubmission operation.
732
- * @callback module:api/PDFApi~expireSubmissionCallback
733
- * @param {String} error Error message, if any.
734
- * @param {module:model/Submission} data The data returned by the service call.
735
- * @param {String} response The complete HTTP response.
736
- */
737
-
738
- /**
739
- * Expire a PDF submission
740
- * @param {String} submissionId
741
- * @param {module:api/PDFApi~expireSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
742
- * data is of type: {@link module:model/Submission}
743
- */
744
- this.expireSubmission = function(submissionId, callback) {
745
- var postBody = null;
746
-
747
- // verify the required parameter 'submissionId' is set
748
- if (submissionId === undefined || submissionId === null) {
749
- throw new Error("Missing the required parameter 'submissionId' when calling expireSubmission");
750
- }
751
-
752
-
753
- var pathParams = {
754
- 'submission_id': submissionId
755
- };
756
- var queryParams = {
757
- };
758
- var collectionQueryParams = {
759
- };
760
- var headerParams = {
761
- };
762
- var formParams = {
763
- };
764
-
765
- var authNames = ['api_token_basic'];
766
- var contentTypes = [];
767
- var accepts = ['application/json'];
768
- var returnType = Submission;
769
-
770
- return this.apiClient.callApi(
771
- '/submissions/{submission_id}', 'DELETE',
772
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
773
- authNames, contentTypes, accepts, returnType, callback
774
- );
775
- }
776
-
777
- /**
778
- * Callback function to receive the result of the generatePDF operation.
779
- * @callback module:api/PDFApi~generatePDFCallback
780
- * @param {String} error Error message, if any.
781
- * @param {module:model/CreateSubmissionResponse} data The data returned by the service call.
782
- * @param {String} response The complete HTTP response.
783
- */
784
-
785
- /**
786
- * Generates a new PDF
787
- * @param {String} templateId
788
- * @param {module:model/SubmissionData} submissionData
789
- * @param {module:api/PDFApi~generatePDFCallback} callback The callback function, accepting three arguments: error, data, response
790
- * data is of type: {@link module:model/CreateSubmissionResponse}
791
- */
792
- this.generatePDF = function(templateId, submissionData, callback) {
793
- var postBody = submissionData;
794
-
795
- // verify the required parameter 'templateId' is set
796
- if (templateId === undefined || templateId === null) {
797
- throw new Error("Missing the required parameter 'templateId' when calling generatePDF");
798
- }
799
-
800
- // verify the required parameter 'submissionData' is set
801
- if (submissionData === undefined || submissionData === null) {
802
- throw new Error("Missing the required parameter 'submissionData' when calling generatePDF");
803
- }
804
-
805
-
806
- var pathParams = {
807
- 'template_id': templateId
808
- };
809
- var queryParams = {
810
- };
811
- var collectionQueryParams = {
812
- };
813
- var headerParams = {
814
- };
815
- var formParams = {
816
- };
817
-
818
- var authNames = ['api_token_basic'];
819
- var contentTypes = ['application/json'];
820
- var accepts = ['application/json'];
821
- var returnType = CreateSubmissionResponse;
822
-
823
- return this.apiClient.callApi(
824
- '/templates/{template_id}/submissions', 'POST',
825
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
826
- authNames, contentTypes, accepts, returnType, callback
827
- );
828
- }
829
-
830
- /**
831
- * Callback function to receive the result of the getCombinedSubmission operation.
832
- * @callback module:api/PDFApi~getCombinedSubmissionCallback
833
- * @param {String} error Error message, if any.
834
- * @param {module:model/CombinedSubmission} data The data returned by the service call.
835
- * @param {String} response The complete HTTP response.
836
- */
837
-
838
- /**
839
- * Check the status of a combined submission (merged PDFs)
840
- * @param {String} combinedSubmissionId
841
- * @param {module:api/PDFApi~getCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
842
- * data is of type: {@link module:model/CombinedSubmission}
843
- */
844
- this.getCombinedSubmission = function(combinedSubmissionId, callback) {
845
- var postBody = null;
846
-
847
- // verify the required parameter 'combinedSubmissionId' is set
848
- if (combinedSubmissionId === undefined || combinedSubmissionId === null) {
849
- throw new Error("Missing the required parameter 'combinedSubmissionId' when calling getCombinedSubmission");
850
- }
851
-
852
-
853
- var pathParams = {
854
- 'combined_submission_id': combinedSubmissionId
855
- };
856
- var queryParams = {
857
- };
858
- var collectionQueryParams = {
859
- };
860
- var headerParams = {
861
- };
862
- var formParams = {
863
- };
864
-
865
- var authNames = ['api_token_basic'];
866
- var contentTypes = [];
867
- var accepts = ['application/json'];
868
- var returnType = CombinedSubmission;
869
-
870
- return this.apiClient.callApi(
871
- '/combined_submissions/{combined_submission_id}', 'GET',
872
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
873
- authNames, contentTypes, accepts, returnType, callback
874
- );
875
- }
876
-
877
- /**
878
- * Callback function to receive the result of the getDataRequest operation.
879
- * @callback module:api/PDFApi~getDataRequestCallback
880
- * @param {String} error Error message, if any.
881
- * @param {module:model/SubmissionDataRequest} data The data returned by the service call.
882
- * @param {String} response The complete HTTP response.
883
- */
884
-
885
- /**
886
- * Look up a submission data request
887
- * @param {String} dataRequestId
888
- * @param {module:api/PDFApi~getDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
889
- * data is of type: {@link module:model/SubmissionDataRequest}
890
- */
891
- this.getDataRequest = function(dataRequestId, callback) {
892
- var postBody = null;
893
-
894
- // verify the required parameter 'dataRequestId' is set
895
- if (dataRequestId === undefined || dataRequestId === null) {
896
- throw new Error("Missing the required parameter 'dataRequestId' when calling getDataRequest");
897
- }
898
-
899
-
900
- var pathParams = {
901
- 'data_request_id': dataRequestId
902
- };
903
- var queryParams = {
904
- };
905
- var collectionQueryParams = {
906
- };
907
- var headerParams = {
908
- };
909
- var formParams = {
910
- };
911
-
912
- var authNames = ['api_token_basic'];
913
- var contentTypes = [];
914
- var accepts = ['application/json'];
915
- var returnType = SubmissionDataRequest;
916
-
917
- return this.apiClient.callApi(
918
- '/data_requests/{data_request_id}', 'GET',
919
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
920
- authNames, contentTypes, accepts, returnType, callback
921
- );
922
- }
923
-
924
- /**
925
- * Callback function to receive the result of the getFullTemplate operation.
926
- * @callback module:api/PDFApi~getFullTemplateCallback
927
- * @param {String} error Error message, if any.
928
- * @param {module:model/FullTemplate} data The data returned by the service call.
929
- * @param {String} response The complete HTTP response.
930
- */
931
-
932
- /**
933
- * Fetch the full template attributes
934
- * @param {String} templateId
935
- * @param {module:api/PDFApi~getFullTemplateCallback} callback The callback function, accepting three arguments: error, data, response
936
- * data is of type: {@link module:model/FullTemplate}
937
- */
938
- this.getFullTemplate = function(templateId, callback) {
939
- var postBody = null;
940
-
941
- // verify the required parameter 'templateId' is set
942
- if (templateId === undefined || templateId === null) {
943
- throw new Error("Missing the required parameter 'templateId' when calling getFullTemplate");
944
- }
945
-
946
-
947
- var pathParams = {
948
- 'template_id': templateId
949
- };
950
- var queryParams = {
951
- };
952
- var collectionQueryParams = {
953
- };
954
- var headerParams = {
955
- };
956
- var formParams = {
957
- };
958
-
959
- var authNames = ['api_token_basic'];
960
- var contentTypes = [];
961
- var accepts = ['application/json'];
962
- var returnType = FullTemplate;
963
-
964
- return this.apiClient.callApi(
965
- '/templates/{template_id}?full=true', 'GET',
966
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
967
- authNames, contentTypes, accepts, returnType, callback
968
- );
969
- }
970
-
971
- /**
972
- * Callback function to receive the result of the getPresignUrl operation.
973
- * @callback module:api/PDFApi~getPresignUrlCallback
974
- * @param {String} error Error message, if any.
975
- * @param {Object.<String, {String: Object}>} data The data returned by the service call.
976
- * @param {String} response The complete HTTP response.
977
- */
978
-
979
- /**
980
- * Get a presigned URL so that you can upload a file to our AWS S3 bucket
981
- * @param {module:api/PDFApi~getPresignUrlCallback} callback The callback function, accepting three arguments: error, data, response
982
- * data is of type: {@link Object.<String, {String: Object}>}
983
- */
984
- this.getPresignUrl = function(callback) {
985
- var postBody = null;
986
-
987
-
988
- var pathParams = {
989
- };
990
- var queryParams = {
991
- };
992
- var collectionQueryParams = {
993
- };
994
- var headerParams = {
995
- };
996
- var formParams = {
997
- };
998
-
999
- var authNames = ['api_token_basic'];
1000
- var contentTypes = [];
1001
- var accepts = ['application/json'];
1002
- var returnType = {'String': Object};
1003
-
1004
- return this.apiClient.callApi(
1005
- '/uploads/presign', 'GET',
1006
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1007
- authNames, contentTypes, accepts, returnType, callback
1008
- );
1009
- }
1010
-
1011
- /**
1012
- * Callback function to receive the result of the getSubmission operation.
1013
- * @callback module:api/PDFApi~getSubmissionCallback
1014
- * @param {String} error Error message, if any.
1015
- * @param {module:model/Submission} data The data returned by the service call.
1016
- * @param {String} response The complete HTTP response.
1017
- */
1018
-
1019
- /**
1020
- * Check the status of a PDF
1021
- * @param {String} submissionId
1022
- * @param {Object} opts Optional parameters
1023
- * @param {Boolean} opts.includeData
1024
- * @param {module:api/PDFApi~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
1025
- * data is of type: {@link module:model/Submission}
1026
- */
1027
- this.getSubmission = function(submissionId, opts, callback) {
1028
- opts = opts || {};
1029
- var postBody = null;
1030
-
1031
- // verify the required parameter 'submissionId' is set
1032
- if (submissionId === undefined || submissionId === null) {
1033
- throw new Error("Missing the required parameter 'submissionId' when calling getSubmission");
1034
- }
1035
-
1036
-
1037
- var pathParams = {
1038
- 'submission_id': submissionId
1039
- };
1040
- var queryParams = {
1041
- 'include_data': opts['includeData'],
1042
- };
1043
- var collectionQueryParams = {
1044
- };
1045
- var headerParams = {
1046
- };
1047
- var formParams = {
1048
- };
1049
-
1050
- var authNames = ['api_token_basic'];
1051
- var contentTypes = [];
1052
- var accepts = ['application/json'];
1053
- var returnType = Submission;
1054
-
1055
- return this.apiClient.callApi(
1056
- '/submissions/{submission_id}', 'GET',
1057
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1058
- authNames, contentTypes, accepts, returnType, callback
1059
- );
1060
- }
1061
-
1062
- /**
1063
- * Callback function to receive the result of the getSubmissionBatch operation.
1064
- * @callback module:api/PDFApi~getSubmissionBatchCallback
1065
- * @param {String} error Error message, if any.
1066
- * @param {module:model/SubmissionBatch} data The data returned by the service call.
1067
- * @param {String} response The complete HTTP response.
1068
- */
1069
-
1070
- /**
1071
- * Check the status of a submission batch job
1072
- * @param {String} submissionBatchId
1073
- * @param {Object} opts Optional parameters
1074
- * @param {Boolean} opts.includeSubmissions
1075
- * @param {module:api/PDFApi~getSubmissionBatchCallback} callback The callback function, accepting three arguments: error, data, response
1076
- * data is of type: {@link module:model/SubmissionBatch}
1077
- */
1078
- this.getSubmissionBatch = function(submissionBatchId, opts, callback) {
1079
- opts = opts || {};
1080
- var postBody = null;
1081
-
1082
- // verify the required parameter 'submissionBatchId' is set
1083
- if (submissionBatchId === undefined || submissionBatchId === null) {
1084
- throw new Error("Missing the required parameter 'submissionBatchId' when calling getSubmissionBatch");
1085
- }
1086
-
1087
-
1088
- var pathParams = {
1089
- 'submission_batch_id': submissionBatchId
1090
- };
1091
- var queryParams = {
1092
- 'include_submissions': opts['includeSubmissions'],
1093
- };
1094
- var collectionQueryParams = {
1095
- };
1096
- var headerParams = {
1097
- };
1098
- var formParams = {
1099
- };
1100
-
1101
- var authNames = ['api_token_basic'];
1102
- var contentTypes = [];
1103
- var accepts = ['application/json'];
1104
- var returnType = SubmissionBatch;
1105
-
1106
- return this.apiClient.callApi(
1107
- '/submissions/batches/{submission_batch_id}', 'GET',
1108
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1109
- authNames, contentTypes, accepts, returnType, callback
1110
- );
1111
- }
1112
-
1113
- /**
1114
- * Callback function to receive the result of the getTemplate operation.
1115
- * @callback module:api/PDFApi~getTemplateCallback
1116
- * @param {String} error Error message, if any.
1117
- * @param {module:model/Template} data The data returned by the service call.
1118
- * @param {String} response The complete HTTP response.
1119
- */
1120
-
1121
- /**
1122
- * Check the status of an uploaded template
1123
- * @param {String} templateId
1124
- * @param {module:api/PDFApi~getTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1125
- * data is of type: {@link module:model/Template}
1126
- */
1127
- this.getTemplate = function(templateId, callback) {
1128
- var postBody = null;
1129
-
1130
- // verify the required parameter 'templateId' is set
1131
- if (templateId === undefined || templateId === null) {
1132
- throw new Error("Missing the required parameter 'templateId' when calling getTemplate");
1133
- }
1134
-
1135
-
1136
- var pathParams = {
1137
- 'template_id': templateId
1138
- };
1139
- var queryParams = {
1140
- };
1141
- var collectionQueryParams = {
1142
- };
1143
- var headerParams = {
1144
- };
1145
- var formParams = {
1146
- };
1147
-
1148
- var authNames = ['api_token_basic'];
1149
- var contentTypes = [];
1150
- var accepts = ['application/json'];
1151
- var returnType = Template;
1152
-
1153
- return this.apiClient.callApi(
1154
- '/templates/{template_id}', 'GET',
1155
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1156
- authNames, contentTypes, accepts, returnType, callback
1157
- );
1158
- }
1159
-
1160
- /**
1161
- * Callback function to receive the result of the getTemplateSchema operation.
1162
- * @callback module:api/PDFApi~getTemplateSchemaCallback
1163
- * @param {String} error Error message, if any.
1164
- * @param {Object.<String, {String: Object}>} data The data returned by the service call.
1165
- * @param {String} response The complete HTTP response.
1166
- */
1167
-
1168
- /**
1169
- * Fetch the JSON schema for a template
1170
- * @param {String} templateId
1171
- * @param {module:api/PDFApi~getTemplateSchemaCallback} callback The callback function, accepting three arguments: error, data, response
1172
- * data is of type: {@link Object.<String, {String: Object}>}
1173
- */
1174
- this.getTemplateSchema = function(templateId, callback) {
1175
- var postBody = null;
1176
-
1177
- // verify the required parameter 'templateId' is set
1178
- if (templateId === undefined || templateId === null) {
1179
- throw new Error("Missing the required parameter 'templateId' when calling getTemplateSchema");
1180
- }
1181
-
1182
-
1183
- var pathParams = {
1184
- 'template_id': templateId
1185
- };
1186
- var queryParams = {
1187
- };
1188
- var collectionQueryParams = {
1189
- };
1190
- var headerParams = {
1191
- };
1192
- var formParams = {
1193
- };
1194
-
1195
- var authNames = ['api_token_basic'];
1196
- var contentTypes = [];
1197
- var accepts = ['application/json'];
1198
- var returnType = {'String': Object};
1199
-
1200
- return this.apiClient.callApi(
1201
- '/templates/{template_id}/schema', 'GET',
1202
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1203
- authNames, contentTypes, accepts, returnType, callback
1204
- );
1205
- }
1206
-
1207
- /**
1208
- * Callback function to receive the result of the listFolders operation.
1209
- * @callback module:api/PDFApi~listFoldersCallback
1210
- * @param {String} error Error message, if any.
1211
- * @param {Array.<module:model/Folder>} data The data returned by the service call.
1212
- * @param {String} response The complete HTTP response.
1213
- */
1214
-
1215
- /**
1216
- * Get a list of all folders
1217
- * @param {Object} opts Optional parameters
1218
- * @param {String} opts.parentFolderId Filter By Folder Id
1219
- * @param {module:api/PDFApi~listFoldersCallback} callback The callback function, accepting three arguments: error, data, response
1220
- * data is of type: {@link Array.<module:model/Folder>}
1221
- */
1222
- this.listFolders = function(opts, callback) {
1223
- opts = opts || {};
1224
- var postBody = null;
1225
-
1226
-
1227
- var pathParams = {
1228
- };
1229
- var queryParams = {
1230
- 'parent_folder_id': opts['parentFolderId'],
1231
- };
1232
- var collectionQueryParams = {
1233
- };
1234
- var headerParams = {
1235
- };
1236
- var formParams = {
1237
- };
1238
-
1239
- var authNames = ['api_token_basic'];
1240
- var contentTypes = [];
1241
- var accepts = ['application/json'];
1242
- var returnType = [Folder];
1243
-
1244
- return this.apiClient.callApi(
1245
- '/folders/', 'GET',
1246
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1247
- authNames, contentTypes, accepts, returnType, callback
1248
- );
1249
- }
1250
-
1251
- /**
1252
- * Callback function to receive the result of the listSubmissions operation.
1253
- * @callback module:api/PDFApi~listSubmissionsCallback
1254
- * @param {String} error Error message, if any.
1255
- * @param {module:model/ListSubmissionsResponse} data The data returned by the service call.
1256
- * @param {String} response The complete HTTP response.
1257
- */
1258
-
1259
- /**
1260
- * List all submissions
1261
- * @param {Object} opts Optional parameters
1262
- * @param {String} opts.cursor
1263
- * @param {Number} opts.limit
1264
- * @param {String} opts.createdAfter
1265
- * @param {String} opts.createdBefore
1266
- * @param {String} opts.type
1267
- * @param {Boolean} opts.includeData
1268
- * @param {module:api/PDFApi~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1269
- * data is of type: {@link module:model/ListSubmissionsResponse}
1270
- */
1271
- this.listSubmissions = function(opts, callback) {
1272
- opts = opts || {};
1273
- var postBody = null;
1274
-
1275
-
1276
- var pathParams = {
1277
- };
1278
- var queryParams = {
1279
- 'cursor': opts['cursor'],
1280
- 'limit': opts['limit'],
1281
- 'created_after': opts['createdAfter'],
1282
- 'created_before': opts['createdBefore'],
1283
- 'type': opts['type'],
1284
- 'include_data': opts['includeData'],
1285
- };
1286
- var collectionQueryParams = {
1287
- };
1288
- var headerParams = {
1289
- };
1290
- var formParams = {
1291
- };
1292
-
1293
- var authNames = ['api_token_basic'];
1294
- var contentTypes = [];
1295
- var accepts = ['application/json'];
1296
- var returnType = ListSubmissionsResponse;
1297
-
1298
- return this.apiClient.callApi(
1299
- '/submissions', 'GET',
1300
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1301
- authNames, contentTypes, accepts, returnType, callback
1302
- );
1303
- }
1304
-
1305
- /**
1306
- * Callback function to receive the result of the listSubmissions_0 operation.
1307
- * @callback module:api/PDFApi~listSubmissions_0Callback
1308
- * @param {String} error Error message, if any.
1309
- * @param {module:model/ListSubmissionsResponse} data The data returned by the service call.
1310
- * @param {String} response The complete HTTP response.
1311
- */
1312
-
1313
- /**
1314
- * List all submissions for a given template
1315
- * @param {String} templateId
1316
- * @param {Object} opts Optional parameters
1317
- * @param {String} opts.cursor
1318
- * @param {Number} opts.limit
1319
- * @param {String} opts.createdAfter
1320
- * @param {String} opts.createdBefore
1321
- * @param {String} opts.type
1322
- * @param {Boolean} opts.includeData
1323
- * @param {module:api/PDFApi~listSubmissions_0Callback} callback The callback function, accepting three arguments: error, data, response
1324
- * data is of type: {@link module:model/ListSubmissionsResponse}
1325
- */
1326
- this.listSubmissions_0 = function(templateId, opts, callback) {
1327
- opts = opts || {};
1328
- var postBody = null;
1329
-
1330
- // verify the required parameter 'templateId' is set
1331
- if (templateId === undefined || templateId === null) {
1332
- throw new Error("Missing the required parameter 'templateId' when calling listSubmissions_0");
1333
- }
1334
-
1335
-
1336
- var pathParams = {
1337
- 'template_id': templateId
1338
- };
1339
- var queryParams = {
1340
- 'cursor': opts['cursor'],
1341
- 'limit': opts['limit'],
1342
- 'created_after': opts['createdAfter'],
1343
- 'created_before': opts['createdBefore'],
1344
- 'type': opts['type'],
1345
- 'include_data': opts['includeData'],
1346
- };
1347
- var collectionQueryParams = {
1348
- };
1349
- var headerParams = {
1350
- };
1351
- var formParams = {
1352
- };
1353
-
1354
- var authNames = ['api_token_basic'];
1355
- var contentTypes = [];
1356
- var accepts = ['application/json'];
1357
- var returnType = ListSubmissionsResponse;
1358
-
1359
- return this.apiClient.callApi(
1360
- '/templates/{template_id}/submissions', 'GET',
1361
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1362
- authNames, contentTypes, accepts, returnType, callback
1363
- );
1364
- }
1365
-
1366
- /**
1367
- * Callback function to receive the result of the listTemplates operation.
1368
- * @callback module:api/PDFApi~listTemplatesCallback
1369
- * @param {String} error Error message, if any.
1370
- * @param {Array.<module:model/Template>} data The data returned by the service call.
1371
- * @param {String} response The complete HTTP response.
1372
- */
1373
-
1374
- /**
1375
- * Get a list of all templates
1376
- * @param {Object} opts Optional parameters
1377
- * @param {String} opts.query Search By Name
1378
- * @param {String} opts.parentFolderId Filter By Folder Id
1379
- * @param {Number} opts.page Default: 1
1380
- * @param {Number} opts.perPage Default: 50
1381
- * @param {module:api/PDFApi~listTemplatesCallback} callback The callback function, accepting three arguments: error, data, response
1382
- * data is of type: {@link Array.<module:model/Template>}
1383
- */
1384
- this.listTemplates = function(opts, callback) {
1385
- opts = opts || {};
1386
- var postBody = null;
1387
-
1388
-
1389
- var pathParams = {
1390
- };
1391
- var queryParams = {
1392
- 'query': opts['query'],
1393
- 'parent_folder_id': opts['parentFolderId'],
1394
- 'page': opts['page'],
1395
- 'per_page': opts['perPage'],
1396
- };
1397
- var collectionQueryParams = {
1398
- };
1399
- var headerParams = {
1400
- };
1401
- var formParams = {
1402
- };
1403
-
1404
- var authNames = ['api_token_basic'];
1405
- var contentTypes = [];
1406
- var accepts = ['application/json'];
1407
- var returnType = [Template];
1408
-
1409
- return this.apiClient.callApi(
1410
- '/templates', 'GET',
1411
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1412
- authNames, contentTypes, accepts, returnType, callback
1413
- );
1414
- }
1415
-
1416
- /**
1417
- * Callback function to receive the result of the moveFolderToFolder operation.
1418
- * @callback module:api/PDFApi~moveFolderToFolderCallback
1419
- * @param {String} error Error message, if any.
1420
- * @param {module:model/Folder} data The data returned by the service call.
1421
- * @param {String} response The complete HTTP response.
1422
- */
1423
-
1424
- /**
1425
- * Move a folder
1426
- * @param {String} folderId
1427
- * @param {module:model/MoveFolderData} moveFolderData
1428
- * @param {module:api/PDFApi~moveFolderToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1429
- * data is of type: {@link module:model/Folder}
1430
- */
1431
- this.moveFolderToFolder = function(folderId, moveFolderData, callback) {
1432
- var postBody = moveFolderData;
1433
-
1434
- // verify the required parameter 'folderId' is set
1435
- if (folderId === undefined || folderId === null) {
1436
- throw new Error("Missing the required parameter 'folderId' when calling moveFolderToFolder");
1437
- }
1438
-
1439
- // verify the required parameter 'moveFolderData' is set
1440
- if (moveFolderData === undefined || moveFolderData === null) {
1441
- throw new Error("Missing the required parameter 'moveFolderData' when calling moveFolderToFolder");
1442
- }
1443
-
1444
-
1445
- var pathParams = {
1446
- 'folder_id': folderId
1447
- };
1448
- var queryParams = {
1449
- };
1450
- var collectionQueryParams = {
1451
- };
1452
- var headerParams = {
1453
- };
1454
- var formParams = {
1455
- };
1456
-
1457
- var authNames = ['api_token_basic'];
1458
- var contentTypes = ['application/json'];
1459
- var accepts = ['application/json'];
1460
- var returnType = Folder;
1461
-
1462
- return this.apiClient.callApi(
1463
- '/folders/{folder_id}/move', 'POST',
1464
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1465
- authNames, contentTypes, accepts, returnType, callback
1466
- );
1467
- }
1468
-
1469
- /**
1470
- * Callback function to receive the result of the moveTemplateToFolder operation.
1471
- * @callback module:api/PDFApi~moveTemplateToFolderCallback
1472
- * @param {String} error Error message, if any.
1473
- * @param {module:model/Template} data The data returned by the service call.
1474
- * @param {String} response The complete HTTP response.
1475
- */
1476
-
1477
- /**
1478
- * Move Template to folder
1479
- * @param {String} templateId
1480
- * @param {module:model/MoveTemplateData} moveTemplateData
1481
- * @param {module:api/PDFApi~moveTemplateToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1482
- * data is of type: {@link module:model/Template}
1483
- */
1484
- this.moveTemplateToFolder = function(templateId, moveTemplateData, callback) {
1485
- var postBody = moveTemplateData;
1486
-
1487
- // verify the required parameter 'templateId' is set
1488
- if (templateId === undefined || templateId === null) {
1489
- throw new Error("Missing the required parameter 'templateId' when calling moveTemplateToFolder");
1490
- }
1491
-
1492
- // verify the required parameter 'moveTemplateData' is set
1493
- if (moveTemplateData === undefined || moveTemplateData === null) {
1494
- throw new Error("Missing the required parameter 'moveTemplateData' when calling moveTemplateToFolder");
1495
- }
1496
-
1497
-
1498
- var pathParams = {
1499
- 'template_id': templateId
1500
- };
1501
- var queryParams = {
1502
- };
1503
- var collectionQueryParams = {
1504
- };
1505
- var headerParams = {
1506
- };
1507
- var formParams = {
1508
- };
1509
-
1510
- var authNames = ['api_token_basic'];
1511
- var contentTypes = ['application/json'];
1512
- var accepts = ['application/json'];
1513
- var returnType = Template;
1514
-
1515
- return this.apiClient.callApi(
1516
- '/templates/{template_id}/move', 'POST',
1517
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1518
- authNames, contentTypes, accepts, returnType, callback
1519
- );
1520
- }
1521
-
1522
- /**
1523
- * Callback function to receive the result of the renameFolder operation.
1524
- * @callback module:api/PDFApi~renameFolderCallback
1525
- * @param {String} error Error message, if any.
1526
- * @param data This operation does not return a value.
1527
- * @param {String} response The complete HTTP response.
1528
- */
1529
-
1530
- /**
1531
- * Rename a folder
1532
- * @param {String} folderId
1533
- * @param {module:model/RenameFolderData} renameFolderData
1534
- * @param {module:api/PDFApi~renameFolderCallback} callback The callback function, accepting three arguments: error, data, response
1535
- */
1536
- this.renameFolder = function(folderId, renameFolderData, callback) {
1537
- var postBody = renameFolderData;
1538
-
1539
- // verify the required parameter 'folderId' is set
1540
- if (folderId === undefined || folderId === null) {
1541
- throw new Error("Missing the required parameter 'folderId' when calling renameFolder");
1542
- }
1543
-
1544
- // verify the required parameter 'renameFolderData' is set
1545
- if (renameFolderData === undefined || renameFolderData === null) {
1546
- throw new Error("Missing the required parameter 'renameFolderData' when calling renameFolder");
1547
- }
1548
-
1549
-
1550
- var pathParams = {
1551
- 'folder_id': folderId
1552
- };
1553
- var queryParams = {
1554
- };
1555
- var collectionQueryParams = {
1556
- };
1557
- var headerParams = {
1558
- };
1559
- var formParams = {
1560
- };
1561
-
1562
- var authNames = ['api_token_basic'];
1563
- var contentTypes = ['application/json'];
1564
- var accepts = ['application/json'];
1565
- var returnType = null;
1566
-
1567
- return this.apiClient.callApi(
1568
- '/folders/{folder_id}/rename', 'POST',
1569
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1570
- authNames, contentTypes, accepts, returnType, callback
1571
- );
1572
- }
1573
-
1574
- /**
1575
- * Callback function to receive the result of the testAuthentication operation.
1576
- * @callback module:api/PDFApi~testAuthenticationCallback
1577
- * @param {String} error Error message, if any.
1578
- * @param {module:model/AuthenticationSuccessResponse} data The data returned by the service call.
1579
- * @param {String} response The complete HTTP response.
1580
- */
1581
-
1582
- /**
1583
- * Test Authentication
1584
- * @param {module:api/PDFApi~testAuthenticationCallback} callback The callback function, accepting three arguments: error, data, response
1585
- * data is of type: {@link module:model/AuthenticationSuccessResponse}
1586
- */
1587
- this.testAuthentication = function(callback) {
1588
- var postBody = null;
1589
-
1590
-
1591
- var pathParams = {
1592
- };
1593
- var queryParams = {
1594
- };
1595
- var collectionQueryParams = {
1596
- };
1597
- var headerParams = {
1598
- };
1599
- var formParams = {
1600
- };
1601
-
1602
- var authNames = ['api_token_basic'];
1603
- var contentTypes = [];
1604
- var accepts = ['application/json'];
1605
- var returnType = AuthenticationSuccessResponse;
1606
-
1607
- return this.apiClient.callApi(
1608
- '/authentication', 'GET',
1609
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1610
- authNames, contentTypes, accepts, returnType, callback
1611
- );
1612
- }
1613
-
1614
- /**
1615
- * Callback function to receive the result of the updateDataRequest operation.
1616
- * @callback module:api/PDFApi~updateDataRequestCallback
1617
- * @param {String} error Error message, if any.
1618
- * @param {module:model/UpdateDataRequestResponse} data The data returned by the service call.
1619
- * @param {String} response The complete HTTP response.
1620
- */
1621
-
1622
- /**
1623
- * Update a submission data request
1624
- * @param {String} dataRequestId
1625
- * @param {module:model/UpdateSubmissionDataRequestData} updateSubmissionDataRequestData
1626
- * @param {module:api/PDFApi~updateDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
1627
- * data is of type: {@link module:model/UpdateDataRequestResponse}
1628
- */
1629
- this.updateDataRequest = function(dataRequestId, updateSubmissionDataRequestData, callback) {
1630
- var postBody = updateSubmissionDataRequestData;
1631
-
1632
- // verify the required parameter 'dataRequestId' is set
1633
- if (dataRequestId === undefined || dataRequestId === null) {
1634
- throw new Error("Missing the required parameter 'dataRequestId' when calling updateDataRequest");
1635
- }
1636
-
1637
- // verify the required parameter 'updateSubmissionDataRequestData' is set
1638
- if (updateSubmissionDataRequestData === undefined || updateSubmissionDataRequestData === null) {
1639
- throw new Error("Missing the required parameter 'updateSubmissionDataRequestData' when calling updateDataRequest");
1640
- }
1641
-
1642
-
1643
- var pathParams = {
1644
- 'data_request_id': dataRequestId
1645
- };
1646
- var queryParams = {
1647
- };
1648
- var collectionQueryParams = {
1649
- };
1650
- var headerParams = {
1651
- };
1652
- var formParams = {
1653
- };
1654
-
1655
- var authNames = ['api_token_basic'];
1656
- var contentTypes = ['application/json'];
1657
- var accepts = ['application/json'];
1658
- var returnType = UpdateDataRequestResponse;
1659
-
1660
- return this.apiClient.callApi(
1661
- '/data_requests/{data_request_id}', 'PUT',
1662
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1663
- authNames, contentTypes, accepts, returnType, callback
1664
- );
1665
- }
1666
-
1667
- /**
1668
- * Callback function to receive the result of the updateTemplate operation.
1669
- * @callback module:api/PDFApi~updateTemplateCallback
1670
- * @param {String} error Error message, if any.
1671
- * @param {module:model/UpdateTemplateResponse} data The data returned by the service call.
1672
- * @param {String} response The complete HTTP response.
1673
- */
1674
-
1675
- /**
1676
- * Update a Template
1677
- * @param {String} templateId
1678
- * @param {module:model/UpdateTemplateData} updateTemplateData
1679
- * @param {module:api/PDFApi~updateTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1680
- * data is of type: {@link module:model/UpdateTemplateResponse}
1681
- */
1682
- this.updateTemplate = function(templateId, updateTemplateData, callback) {
1683
- var postBody = updateTemplateData;
1684
-
1685
- // verify the required parameter 'templateId' is set
1686
- if (templateId === undefined || templateId === null) {
1687
- throw new Error("Missing the required parameter 'templateId' when calling updateTemplate");
1688
- }
1689
-
1690
- // verify the required parameter 'updateTemplateData' is set
1691
- if (updateTemplateData === undefined || updateTemplateData === null) {
1692
- throw new Error("Missing the required parameter 'updateTemplateData' when calling updateTemplate");
1693
- }
1694
-
1695
-
1696
- var pathParams = {
1697
- 'template_id': templateId
1698
- };
1699
- var queryParams = {
1700
- };
1701
- var collectionQueryParams = {
1702
- };
1703
- var headerParams = {
1704
- };
1705
- var formParams = {
1706
- };
1707
-
1708
- var authNames = ['api_token_basic'];
1709
- var contentTypes = ['application/json'];
1710
- var accepts = ['application/json'];
1711
- var returnType = UpdateTemplateResponse;
1712
-
1713
- return this.apiClient.callApi(
1714
- '/templates/{template_id}', 'PUT',
1715
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1716
- authNames, contentTypes, accepts, returnType, callback
1717
- );
1718
- }
1719
- };
1720
-
1721
- return exports;
1722
- }));