docspring 1.5.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 (220) hide show
  1. package/README.md +56 -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 -37
  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 -33
  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 -1800
  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 -16
  98. package/docs/SubmissionDataBatchRequest.md +0 -13
  99. package/docs/SubmissionDataRequest.md +0 -79
  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 -408
  114. package/src/api/PDFApi.js +0 -1815
  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 -199
  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 -146
  155. package/src/model/SubmissionDataBatchRequest.js +0 -121
  156. package/src/model/SubmissionDataRequest.js +0 -345
  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 -281
  168. package/test/api/PDFApi.spec.js.original +0 -415
  169. package/test/api/PDFApiIntegration.spec.js +0 -305
  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 -139
  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 -115
  209. package/test/model/SubmissionDataBatchRequest.spec.js +0 -97
  210. package/test/model/SubmissionDataRequest.spec.js +0 -187
  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
package/src/api/PDFApi.js DELETED
@@ -1,1815 +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.5.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 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
-
730
- /**
731
- * Callback function to receive the result of the expireCombinedSubmission operation.
732
- * @callback module:api/PDFApi~expireCombinedSubmissionCallback
733
- * @param {String} error Error message, if any.
734
- * @param {module:model/CombinedSubmission} data The data returned by the service call.
735
- * @param {String} response The complete HTTP response.
736
- */
737
-
738
- /**
739
- * Expire a combined submission
740
- * @param {String} combinedSubmissionId
741
- * @param {module:api/PDFApi~expireCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
742
- * data is of type: {@link module:model/CombinedSubmission}
743
- */
744
- this.expireCombinedSubmission = function(combinedSubmissionId, callback) {
745
- var postBody = null;
746
-
747
- // verify the required parameter 'combinedSubmissionId' is set
748
- if (combinedSubmissionId === undefined || combinedSubmissionId === null) {
749
- throw new Error("Missing the required parameter 'combinedSubmissionId' when calling expireCombinedSubmission");
750
- }
751
-
752
-
753
- var pathParams = {
754
- 'combined_submission_id': combinedSubmissionId
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 = CombinedSubmission;
769
-
770
- return this.apiClient.callApi(
771
- '/combined_submissions/{combined_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 expireSubmission operation.
779
- * @callback module:api/PDFApi~expireSubmissionCallback
780
- * @param {String} error Error message, if any.
781
- * @param {module:model/Submission} data The data returned by the service call.
782
- * @param {String} response The complete HTTP response.
783
- */
784
-
785
- /**
786
- * Expire a PDF submission
787
- * @param {String} submissionId
788
- * @param {module:api/PDFApi~expireSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
789
- * data is of type: {@link module:model/Submission}
790
- */
791
- this.expireSubmission = function(submissionId, callback) {
792
- var postBody = null;
793
-
794
- // verify the required parameter 'submissionId' is set
795
- if (submissionId === undefined || submissionId === null) {
796
- throw new Error("Missing the required parameter 'submissionId' when calling expireSubmission");
797
- }
798
-
799
-
800
- var pathParams = {
801
- 'submission_id': submissionId
802
- };
803
- var queryParams = {
804
- };
805
- var collectionQueryParams = {
806
- };
807
- var headerParams = {
808
- };
809
- var formParams = {
810
- };
811
-
812
- var authNames = ['api_token_basic'];
813
- var contentTypes = [];
814
- var accepts = ['application/json'];
815
- var returnType = Submission;
816
-
817
- return this.apiClient.callApi(
818
- '/submissions/{submission_id}', 'DELETE',
819
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
820
- authNames, contentTypes, accepts, returnType, callback
821
- );
822
- }
823
-
824
- /**
825
- * Callback function to receive the result of the generatePDF operation.
826
- * @callback module:api/PDFApi~generatePDFCallback
827
- * @param {String} error Error message, if any.
828
- * @param {module:model/CreateSubmissionResponse} data The data returned by the service call.
829
- * @param {String} response The complete HTTP response.
830
- */
831
-
832
- /**
833
- * Generates a new PDF
834
- * @param {String} templateId
835
- * @param {module:model/SubmissionData} submissionData
836
- * @param {module:api/PDFApi~generatePDFCallback} callback The callback function, accepting three arguments: error, data, response
837
- * data is of type: {@link module:model/CreateSubmissionResponse}
838
- */
839
- this.generatePDF = function(templateId, submissionData, callback) {
840
- var postBody = submissionData;
841
-
842
- // verify the required parameter 'templateId' is set
843
- if (templateId === undefined || templateId === null) {
844
- throw new Error("Missing the required parameter 'templateId' when calling generatePDF");
845
- }
846
-
847
- // verify the required parameter 'submissionData' is set
848
- if (submissionData === undefined || submissionData === null) {
849
- throw new Error("Missing the required parameter 'submissionData' when calling generatePDF");
850
- }
851
-
852
-
853
- var pathParams = {
854
- 'template_id': templateId
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 = ['application/json'];
867
- var accepts = ['application/json'];
868
- var returnType = CreateSubmissionResponse;
869
-
870
- return this.apiClient.callApi(
871
- '/templates/{template_id}/submissions', 'POST',
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 getCombinedSubmission operation.
879
- * @callback module:api/PDFApi~getCombinedSubmissionCallback
880
- * @param {String} error Error message, if any.
881
- * @param {module:model/CombinedSubmission} data The data returned by the service call.
882
- * @param {String} response The complete HTTP response.
883
- */
884
-
885
- /**
886
- * Check the status of a combined submission (merged PDFs)
887
- * @param {String} combinedSubmissionId
888
- * @param {module:api/PDFApi~getCombinedSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
889
- * data is of type: {@link module:model/CombinedSubmission}
890
- */
891
- this.getCombinedSubmission = function(combinedSubmissionId, callback) {
892
- var postBody = null;
893
-
894
- // verify the required parameter 'combinedSubmissionId' is set
895
- if (combinedSubmissionId === undefined || combinedSubmissionId === null) {
896
- throw new Error("Missing the required parameter 'combinedSubmissionId' when calling getCombinedSubmission");
897
- }
898
-
899
-
900
- var pathParams = {
901
- 'combined_submission_id': combinedSubmissionId
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 = CombinedSubmission;
916
-
917
- return this.apiClient.callApi(
918
- '/combined_submissions/{combined_submission_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 getDataRequest operation.
926
- * @callback module:api/PDFApi~getDataRequestCallback
927
- * @param {String} error Error message, if any.
928
- * @param {module:model/SubmissionDataRequest} data The data returned by the service call.
929
- * @param {String} response The complete HTTP response.
930
- */
931
-
932
- /**
933
- * Look up a submission data request
934
- * @param {String} dataRequestId
935
- * @param {module:api/PDFApi~getDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
936
- * data is of type: {@link module:model/SubmissionDataRequest}
937
- */
938
- this.getDataRequest = function(dataRequestId, callback) {
939
- var postBody = null;
940
-
941
- // verify the required parameter 'dataRequestId' is set
942
- if (dataRequestId === undefined || dataRequestId === null) {
943
- throw new Error("Missing the required parameter 'dataRequestId' when calling getDataRequest");
944
- }
945
-
946
-
947
- var pathParams = {
948
- 'data_request_id': dataRequestId
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 = SubmissionDataRequest;
963
-
964
- return this.apiClient.callApi(
965
- '/data_requests/{data_request_id}', '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 getFullTemplate operation.
973
- * @callback module:api/PDFApi~getFullTemplateCallback
974
- * @param {String} error Error message, if any.
975
- * @param {module:model/FullTemplate} data The data returned by the service call.
976
- * @param {String} response The complete HTTP response.
977
- */
978
-
979
- /**
980
- * Fetch the full template attributes
981
- * @param {String} templateId
982
- * @param {module:api/PDFApi~getFullTemplateCallback} callback The callback function, accepting three arguments: error, data, response
983
- * data is of type: {@link module:model/FullTemplate}
984
- */
985
- this.getFullTemplate = function(templateId, callback) {
986
- var postBody = null;
987
-
988
- // verify the required parameter 'templateId' is set
989
- if (templateId === undefined || templateId === null) {
990
- throw new Error("Missing the required parameter 'templateId' when calling getFullTemplate");
991
- }
992
-
993
-
994
- var pathParams = {
995
- 'template_id': templateId
996
- };
997
- var queryParams = {
998
- };
999
- var collectionQueryParams = {
1000
- };
1001
- var headerParams = {
1002
- };
1003
- var formParams = {
1004
- };
1005
-
1006
- var authNames = ['api_token_basic'];
1007
- var contentTypes = [];
1008
- var accepts = ['application/json'];
1009
- var returnType = FullTemplate;
1010
-
1011
- return this.apiClient.callApi(
1012
- '/templates/{template_id}?full=true', 'GET',
1013
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1014
- authNames, contentTypes, accepts, returnType, callback
1015
- );
1016
- }
1017
-
1018
- /**
1019
- * Callback function to receive the result of the getPresignUrl operation.
1020
- * @callback module:api/PDFApi~getPresignUrlCallback
1021
- * @param {String} error Error message, if any.
1022
- * @param {Object.<String, {String: Object}>} data The data returned by the service call.
1023
- * @param {String} response The complete HTTP response.
1024
- */
1025
-
1026
- /**
1027
- * Get a presigned URL so that you can upload a file to our AWS S3 bucket
1028
- * @param {module:api/PDFApi~getPresignUrlCallback} callback The callback function, accepting three arguments: error, data, response
1029
- * data is of type: {@link Object.<String, {String: Object}>}
1030
- */
1031
- this.getPresignUrl = function(callback) {
1032
- var postBody = null;
1033
-
1034
-
1035
- var pathParams = {
1036
- };
1037
- var queryParams = {
1038
- };
1039
- var collectionQueryParams = {
1040
- };
1041
- var headerParams = {
1042
- };
1043
- var formParams = {
1044
- };
1045
-
1046
- var authNames = ['api_token_basic'];
1047
- var contentTypes = [];
1048
- var accepts = ['application/json'];
1049
- var returnType = {'String': Object};
1050
-
1051
- return this.apiClient.callApi(
1052
- '/uploads/presign', 'GET',
1053
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1054
- authNames, contentTypes, accepts, returnType, callback
1055
- );
1056
- }
1057
-
1058
- /**
1059
- * Callback function to receive the result of the getSubmission operation.
1060
- * @callback module:api/PDFApi~getSubmissionCallback
1061
- * @param {String} error Error message, if any.
1062
- * @param {module:model/Submission} data The data returned by the service call.
1063
- * @param {String} response The complete HTTP response.
1064
- */
1065
-
1066
- /**
1067
- * Check the status of a PDF
1068
- * @param {String} submissionId
1069
- * @param {Object} opts Optional parameters
1070
- * @param {Boolean} opts.includeData
1071
- * @param {module:api/PDFApi~getSubmissionCallback} callback The callback function, accepting three arguments: error, data, response
1072
- * data is of type: {@link module:model/Submission}
1073
- */
1074
- this.getSubmission = function(submissionId, opts, callback) {
1075
- opts = opts || {};
1076
- var postBody = null;
1077
-
1078
- // verify the required parameter 'submissionId' is set
1079
- if (submissionId === undefined || submissionId === null) {
1080
- throw new Error("Missing the required parameter 'submissionId' when calling getSubmission");
1081
- }
1082
-
1083
-
1084
- var pathParams = {
1085
- 'submission_id': submissionId
1086
- };
1087
- var queryParams = {
1088
- 'include_data': opts['includeData'],
1089
- };
1090
- var collectionQueryParams = {
1091
- };
1092
- var headerParams = {
1093
- };
1094
- var formParams = {
1095
- };
1096
-
1097
- var authNames = ['api_token_basic'];
1098
- var contentTypes = [];
1099
- var accepts = ['application/json'];
1100
- var returnType = Submission;
1101
-
1102
- return this.apiClient.callApi(
1103
- '/submissions/{submission_id}', 'GET',
1104
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1105
- authNames, contentTypes, accepts, returnType, callback
1106
- );
1107
- }
1108
-
1109
- /**
1110
- * Callback function to receive the result of the getSubmissionBatch operation.
1111
- * @callback module:api/PDFApi~getSubmissionBatchCallback
1112
- * @param {String} error Error message, if any.
1113
- * @param {module:model/SubmissionBatch} data The data returned by the service call.
1114
- * @param {String} response The complete HTTP response.
1115
- */
1116
-
1117
- /**
1118
- * Check the status of a submission batch job
1119
- * @param {String} submissionBatchId
1120
- * @param {Object} opts Optional parameters
1121
- * @param {Boolean} opts.includeSubmissions
1122
- * @param {module:api/PDFApi~getSubmissionBatchCallback} callback The callback function, accepting three arguments: error, data, response
1123
- * data is of type: {@link module:model/SubmissionBatch}
1124
- */
1125
- this.getSubmissionBatch = function(submissionBatchId, opts, callback) {
1126
- opts = opts || {};
1127
- var postBody = null;
1128
-
1129
- // verify the required parameter 'submissionBatchId' is set
1130
- if (submissionBatchId === undefined || submissionBatchId === null) {
1131
- throw new Error("Missing the required parameter 'submissionBatchId' when calling getSubmissionBatch");
1132
- }
1133
-
1134
-
1135
- var pathParams = {
1136
- 'submission_batch_id': submissionBatchId
1137
- };
1138
- var queryParams = {
1139
- 'include_submissions': opts['includeSubmissions'],
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 = SubmissionBatch;
1152
-
1153
- return this.apiClient.callApi(
1154
- '/submissions/batches/{submission_batch_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 getTemplate operation.
1162
- * @callback module:api/PDFApi~getTemplateCallback
1163
- * @param {String} error Error message, if any.
1164
- * @param {module:model/Template} data The data returned by the service call.
1165
- * @param {String} response The complete HTTP response.
1166
- */
1167
-
1168
- /**
1169
- * Check the status of an uploaded template
1170
- * @param {String} templateId
1171
- * @param {module:api/PDFApi~getTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1172
- * data is of type: {@link module:model/Template}
1173
- */
1174
- this.getTemplate = 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 getTemplate");
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 = Template;
1199
-
1200
- return this.apiClient.callApi(
1201
- '/templates/{template_id}', '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 getTemplateSchema operation.
1209
- * @callback module:api/PDFApi~getTemplateSchemaCallback
1210
- * @param {String} error Error message, if any.
1211
- * @param {Object.<String, {String: Object}>} data The data returned by the service call.
1212
- * @param {String} response The complete HTTP response.
1213
- */
1214
-
1215
- /**
1216
- * Fetch the JSON schema for a template
1217
- * @param {String} templateId
1218
- * @param {module:api/PDFApi~getTemplateSchemaCallback} callback The callback function, accepting three arguments: error, data, response
1219
- * data is of type: {@link Object.<String, {String: Object}>}
1220
- */
1221
- this.getTemplateSchema = function(templateId, callback) {
1222
- var postBody = null;
1223
-
1224
- // verify the required parameter 'templateId' is set
1225
- if (templateId === undefined || templateId === null) {
1226
- throw new Error("Missing the required parameter 'templateId' when calling getTemplateSchema");
1227
- }
1228
-
1229
-
1230
- var pathParams = {
1231
- 'template_id': templateId
1232
- };
1233
- var queryParams = {
1234
- };
1235
- var collectionQueryParams = {
1236
- };
1237
- var headerParams = {
1238
- };
1239
- var formParams = {
1240
- };
1241
-
1242
- var authNames = ['api_token_basic'];
1243
- var contentTypes = [];
1244
- var accepts = ['application/json'];
1245
- var returnType = {'String': Object};
1246
-
1247
- return this.apiClient.callApi(
1248
- '/templates/{template_id}/schema', 'GET',
1249
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1250
- authNames, contentTypes, accepts, returnType, callback
1251
- );
1252
- }
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
-
1300
- /**
1301
- * Callback function to receive the result of the listFolders operation.
1302
- * @callback module:api/PDFApi~listFoldersCallback
1303
- * @param {String} error Error message, if any.
1304
- * @param {Array.<module:model/Folder>} data The data returned by the service call.
1305
- * @param {String} response The complete HTTP response.
1306
- */
1307
-
1308
- /**
1309
- * Get a list of all folders
1310
- * @param {Object} opts Optional parameters
1311
- * @param {String} opts.parentFolderId Filter By Folder Id
1312
- * @param {module:api/PDFApi~listFoldersCallback} callback The callback function, accepting three arguments: error, data, response
1313
- * data is of type: {@link Array.<module:model/Folder>}
1314
- */
1315
- this.listFolders = function(opts, callback) {
1316
- opts = opts || {};
1317
- var postBody = null;
1318
-
1319
-
1320
- var pathParams = {
1321
- };
1322
- var queryParams = {
1323
- 'parent_folder_id': opts['parentFolderId'],
1324
- };
1325
- var collectionQueryParams = {
1326
- };
1327
- var headerParams = {
1328
- };
1329
- var formParams = {
1330
- };
1331
-
1332
- var authNames = ['api_token_basic'];
1333
- var contentTypes = [];
1334
- var accepts = ['application/json'];
1335
- var returnType = [Folder];
1336
-
1337
- return this.apiClient.callApi(
1338
- '/folders/', 'GET',
1339
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1340
- authNames, contentTypes, accepts, returnType, callback
1341
- );
1342
- }
1343
-
1344
- /**
1345
- * Callback function to receive the result of the listSubmissions operation.
1346
- * @callback module:api/PDFApi~listSubmissionsCallback
1347
- * @param {String} error Error message, if any.
1348
- * @param {module:model/ListSubmissionsResponse} data The data returned by the service call.
1349
- * @param {String} response The complete HTTP response.
1350
- */
1351
-
1352
- /**
1353
- * List all submissions
1354
- * @param {Object} opts Optional parameters
1355
- * @param {String} opts.cursor
1356
- * @param {Number} opts.limit
1357
- * @param {String} opts.createdAfter
1358
- * @param {String} opts.createdBefore
1359
- * @param {String} opts.type
1360
- * @param {Boolean} opts.includeData
1361
- * @param {module:api/PDFApi~listSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
1362
- * data is of type: {@link module:model/ListSubmissionsResponse}
1363
- */
1364
- this.listSubmissions = function(opts, callback) {
1365
- opts = opts || {};
1366
- var postBody = null;
1367
-
1368
-
1369
- var pathParams = {
1370
- };
1371
- var queryParams = {
1372
- 'cursor': opts['cursor'],
1373
- 'limit': opts['limit'],
1374
- 'created_after': opts['createdAfter'],
1375
- 'created_before': opts['createdBefore'],
1376
- 'type': opts['type'],
1377
- 'include_data': opts['includeData'],
1378
- };
1379
- var collectionQueryParams = {
1380
- };
1381
- var headerParams = {
1382
- };
1383
- var formParams = {
1384
- };
1385
-
1386
- var authNames = ['api_token_basic'];
1387
- var contentTypes = [];
1388
- var accepts = ['application/json'];
1389
- var returnType = ListSubmissionsResponse;
1390
-
1391
- return this.apiClient.callApi(
1392
- '/submissions', 'GET',
1393
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1394
- authNames, contentTypes, accepts, returnType, callback
1395
- );
1396
- }
1397
-
1398
- /**
1399
- * Callback function to receive the result of the listSubmissions_0 operation.
1400
- * @callback module:api/PDFApi~listSubmissions_0Callback
1401
- * @param {String} error Error message, if any.
1402
- * @param {module:model/ListSubmissionsResponse} data The data returned by the service call.
1403
- * @param {String} response The complete HTTP response.
1404
- */
1405
-
1406
- /**
1407
- * List all submissions for a given template
1408
- * @param {String} templateId
1409
- * @param {Object} opts Optional parameters
1410
- * @param {String} opts.cursor
1411
- * @param {Number} opts.limit
1412
- * @param {String} opts.createdAfter
1413
- * @param {String} opts.createdBefore
1414
- * @param {String} opts.type
1415
- * @param {Boolean} opts.includeData
1416
- * @param {module:api/PDFApi~listSubmissions_0Callback} callback The callback function, accepting three arguments: error, data, response
1417
- * data is of type: {@link module:model/ListSubmissionsResponse}
1418
- */
1419
- this.listSubmissions_0 = function(templateId, opts, callback) {
1420
- opts = opts || {};
1421
- var postBody = null;
1422
-
1423
- // verify the required parameter 'templateId' is set
1424
- if (templateId === undefined || templateId === null) {
1425
- throw new Error("Missing the required parameter 'templateId' when calling listSubmissions_0");
1426
- }
1427
-
1428
-
1429
- var pathParams = {
1430
- 'template_id': templateId
1431
- };
1432
- var queryParams = {
1433
- 'cursor': opts['cursor'],
1434
- 'limit': opts['limit'],
1435
- 'created_after': opts['createdAfter'],
1436
- 'created_before': opts['createdBefore'],
1437
- 'type': opts['type'],
1438
- 'include_data': opts['includeData'],
1439
- };
1440
- var collectionQueryParams = {
1441
- };
1442
- var headerParams = {
1443
- };
1444
- var formParams = {
1445
- };
1446
-
1447
- var authNames = ['api_token_basic'];
1448
- var contentTypes = [];
1449
- var accepts = ['application/json'];
1450
- var returnType = ListSubmissionsResponse;
1451
-
1452
- return this.apiClient.callApi(
1453
- '/templates/{template_id}/submissions', 'GET',
1454
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1455
- authNames, contentTypes, accepts, returnType, callback
1456
- );
1457
- }
1458
-
1459
- /**
1460
- * Callback function to receive the result of the listTemplates operation.
1461
- * @callback module:api/PDFApi~listTemplatesCallback
1462
- * @param {String} error Error message, if any.
1463
- * @param {Array.<module:model/Template>} data The data returned by the service call.
1464
- * @param {String} response The complete HTTP response.
1465
- */
1466
-
1467
- /**
1468
- * Get a list of all templates
1469
- * @param {Object} opts Optional parameters
1470
- * @param {String} opts.query Search By Name
1471
- * @param {String} opts.parentFolderId Filter By Folder Id
1472
- * @param {Number} opts.page Default: 1
1473
- * @param {Number} opts.perPage Default: 50
1474
- * @param {module:api/PDFApi~listTemplatesCallback} callback The callback function, accepting three arguments: error, data, response
1475
- * data is of type: {@link Array.<module:model/Template>}
1476
- */
1477
- this.listTemplates = function(opts, callback) {
1478
- opts = opts || {};
1479
- var postBody = null;
1480
-
1481
-
1482
- var pathParams = {
1483
- };
1484
- var queryParams = {
1485
- 'query': opts['query'],
1486
- 'parent_folder_id': opts['parentFolderId'],
1487
- 'page': opts['page'],
1488
- 'per_page': opts['perPage'],
1489
- };
1490
- var collectionQueryParams = {
1491
- };
1492
- var headerParams = {
1493
- };
1494
- var formParams = {
1495
- };
1496
-
1497
- var authNames = ['api_token_basic'];
1498
- var contentTypes = [];
1499
- var accepts = ['application/json'];
1500
- var returnType = [Template];
1501
-
1502
- return this.apiClient.callApi(
1503
- '/templates', 'GET',
1504
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1505
- authNames, contentTypes, accepts, returnType, callback
1506
- );
1507
- }
1508
-
1509
- /**
1510
- * Callback function to receive the result of the moveFolderToFolder operation.
1511
- * @callback module:api/PDFApi~moveFolderToFolderCallback
1512
- * @param {String} error Error message, if any.
1513
- * @param {module:model/Folder} data The data returned by the service call.
1514
- * @param {String} response The complete HTTP response.
1515
- */
1516
-
1517
- /**
1518
- * Move a folder
1519
- * @param {String} folderId
1520
- * @param {module:model/MoveFolderData} moveFolderData
1521
- * @param {module:api/PDFApi~moveFolderToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1522
- * data is of type: {@link module:model/Folder}
1523
- */
1524
- this.moveFolderToFolder = function(folderId, moveFolderData, callback) {
1525
- var postBody = moveFolderData;
1526
-
1527
- // verify the required parameter 'folderId' is set
1528
- if (folderId === undefined || folderId === null) {
1529
- throw new Error("Missing the required parameter 'folderId' when calling moveFolderToFolder");
1530
- }
1531
-
1532
- // verify the required parameter 'moveFolderData' is set
1533
- if (moveFolderData === undefined || moveFolderData === null) {
1534
- throw new Error("Missing the required parameter 'moveFolderData' when calling moveFolderToFolder");
1535
- }
1536
-
1537
-
1538
- var pathParams = {
1539
- 'folder_id': folderId
1540
- };
1541
- var queryParams = {
1542
- };
1543
- var collectionQueryParams = {
1544
- };
1545
- var headerParams = {
1546
- };
1547
- var formParams = {
1548
- };
1549
-
1550
- var authNames = ['api_token_basic'];
1551
- var contentTypes = ['application/json'];
1552
- var accepts = ['application/json'];
1553
- var returnType = Folder;
1554
-
1555
- return this.apiClient.callApi(
1556
- '/folders/{folder_id}/move', 'POST',
1557
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1558
- authNames, contentTypes, accepts, returnType, callback
1559
- );
1560
- }
1561
-
1562
- /**
1563
- * Callback function to receive the result of the moveTemplateToFolder operation.
1564
- * @callback module:api/PDFApi~moveTemplateToFolderCallback
1565
- * @param {String} error Error message, if any.
1566
- * @param {module:model/Template} data The data returned by the service call.
1567
- * @param {String} response The complete HTTP response.
1568
- */
1569
-
1570
- /**
1571
- * Move Template to folder
1572
- * @param {String} templateId
1573
- * @param {module:model/MoveTemplateData} moveTemplateData
1574
- * @param {module:api/PDFApi~moveTemplateToFolderCallback} callback The callback function, accepting three arguments: error, data, response
1575
- * data is of type: {@link module:model/Template}
1576
- */
1577
- this.moveTemplateToFolder = function(templateId, moveTemplateData, callback) {
1578
- var postBody = moveTemplateData;
1579
-
1580
- // verify the required parameter 'templateId' is set
1581
- if (templateId === undefined || templateId === null) {
1582
- throw new Error("Missing the required parameter 'templateId' when calling moveTemplateToFolder");
1583
- }
1584
-
1585
- // verify the required parameter 'moveTemplateData' is set
1586
- if (moveTemplateData === undefined || moveTemplateData === null) {
1587
- throw new Error("Missing the required parameter 'moveTemplateData' when calling moveTemplateToFolder");
1588
- }
1589
-
1590
-
1591
- var pathParams = {
1592
- 'template_id': templateId
1593
- };
1594
- var queryParams = {
1595
- };
1596
- var collectionQueryParams = {
1597
- };
1598
- var headerParams = {
1599
- };
1600
- var formParams = {
1601
- };
1602
-
1603
- var authNames = ['api_token_basic'];
1604
- var contentTypes = ['application/json'];
1605
- var accepts = ['application/json'];
1606
- var returnType = Template;
1607
-
1608
- return this.apiClient.callApi(
1609
- '/templates/{template_id}/move', 'POST',
1610
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1611
- authNames, contentTypes, accepts, returnType, callback
1612
- );
1613
- }
1614
-
1615
- /**
1616
- * Callback function to receive the result of the renameFolder operation.
1617
- * @callback module:api/PDFApi~renameFolderCallback
1618
- * @param {String} error Error message, if any.
1619
- * @param data This operation does not return a value.
1620
- * @param {String} response The complete HTTP response.
1621
- */
1622
-
1623
- /**
1624
- * Rename a folder
1625
- * @param {String} folderId
1626
- * @param {module:model/RenameFolderData} renameFolderData
1627
- * @param {module:api/PDFApi~renameFolderCallback} callback The callback function, accepting three arguments: error, data, response
1628
- */
1629
- this.renameFolder = function(folderId, renameFolderData, callback) {
1630
- var postBody = renameFolderData;
1631
-
1632
- // verify the required parameter 'folderId' is set
1633
- if (folderId === undefined || folderId === null) {
1634
- throw new Error("Missing the required parameter 'folderId' when calling renameFolder");
1635
- }
1636
-
1637
- // verify the required parameter 'renameFolderData' is set
1638
- if (renameFolderData === undefined || renameFolderData === null) {
1639
- throw new Error("Missing the required parameter 'renameFolderData' when calling renameFolder");
1640
- }
1641
-
1642
-
1643
- var pathParams = {
1644
- 'folder_id': folderId
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 = null;
1659
-
1660
- return this.apiClient.callApi(
1661
- '/folders/{folder_id}/rename', 'POST',
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 testAuthentication operation.
1669
- * @callback module:api/PDFApi~testAuthenticationCallback
1670
- * @param {String} error Error message, if any.
1671
- * @param {module:model/AuthenticationSuccessResponse} data The data returned by the service call.
1672
- * @param {String} response The complete HTTP response.
1673
- */
1674
-
1675
- /**
1676
- * Test Authentication
1677
- * @param {module:api/PDFApi~testAuthenticationCallback} callback The callback function, accepting three arguments: error, data, response
1678
- * data is of type: {@link module:model/AuthenticationSuccessResponse}
1679
- */
1680
- this.testAuthentication = function(callback) {
1681
- var postBody = null;
1682
-
1683
-
1684
- var pathParams = {
1685
- };
1686
- var queryParams = {
1687
- };
1688
- var collectionQueryParams = {
1689
- };
1690
- var headerParams = {
1691
- };
1692
- var formParams = {
1693
- };
1694
-
1695
- var authNames = ['api_token_basic'];
1696
- var contentTypes = [];
1697
- var accepts = ['application/json'];
1698
- var returnType = AuthenticationSuccessResponse;
1699
-
1700
- return this.apiClient.callApi(
1701
- '/authentication', 'GET',
1702
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1703
- authNames, contentTypes, accepts, returnType, callback
1704
- );
1705
- }
1706
-
1707
- /**
1708
- * Callback function to receive the result of the updateDataRequest operation.
1709
- * @callback module:api/PDFApi~updateDataRequestCallback
1710
- * @param {String} error Error message, if any.
1711
- * @param {module:model/UpdateDataRequestResponse} data The data returned by the service call.
1712
- * @param {String} response The complete HTTP response.
1713
- */
1714
-
1715
- /**
1716
- * Update a submission data request
1717
- * @param {String} dataRequestId
1718
- * @param {module:model/UpdateSubmissionDataRequestData} updateSubmissionDataRequestData
1719
- * @param {module:api/PDFApi~updateDataRequestCallback} callback The callback function, accepting three arguments: error, data, response
1720
- * data is of type: {@link module:model/UpdateDataRequestResponse}
1721
- */
1722
- this.updateDataRequest = function(dataRequestId, updateSubmissionDataRequestData, callback) {
1723
- var postBody = updateSubmissionDataRequestData;
1724
-
1725
- // verify the required parameter 'dataRequestId' is set
1726
- if (dataRequestId === undefined || dataRequestId === null) {
1727
- throw new Error("Missing the required parameter 'dataRequestId' when calling updateDataRequest");
1728
- }
1729
-
1730
- // verify the required parameter 'updateSubmissionDataRequestData' is set
1731
- if (updateSubmissionDataRequestData === undefined || updateSubmissionDataRequestData === null) {
1732
- throw new Error("Missing the required parameter 'updateSubmissionDataRequestData' when calling updateDataRequest");
1733
- }
1734
-
1735
-
1736
- var pathParams = {
1737
- 'data_request_id': dataRequestId
1738
- };
1739
- var queryParams = {
1740
- };
1741
- var collectionQueryParams = {
1742
- };
1743
- var headerParams = {
1744
- };
1745
- var formParams = {
1746
- };
1747
-
1748
- var authNames = ['api_token_basic'];
1749
- var contentTypes = ['application/json'];
1750
- var accepts = ['application/json'];
1751
- var returnType = UpdateDataRequestResponse;
1752
-
1753
- return this.apiClient.callApi(
1754
- '/data_requests/{data_request_id}', 'PUT',
1755
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1756
- authNames, contentTypes, accepts, returnType, callback
1757
- );
1758
- }
1759
-
1760
- /**
1761
- * Callback function to receive the result of the updateTemplate operation.
1762
- * @callback module:api/PDFApi~updateTemplateCallback
1763
- * @param {String} error Error message, if any.
1764
- * @param {module:model/UpdateTemplateResponse} data The data returned by the service call.
1765
- * @param {String} response The complete HTTP response.
1766
- */
1767
-
1768
- /**
1769
- * Update a Template
1770
- * @param {String} templateId
1771
- * @param {module:model/UpdateTemplateData} updateTemplateData
1772
- * @param {module:api/PDFApi~updateTemplateCallback} callback The callback function, accepting three arguments: error, data, response
1773
- * data is of type: {@link module:model/UpdateTemplateResponse}
1774
- */
1775
- this.updateTemplate = function(templateId, updateTemplateData, callback) {
1776
- var postBody = updateTemplateData;
1777
-
1778
- // verify the required parameter 'templateId' is set
1779
- if (templateId === undefined || templateId === null) {
1780
- throw new Error("Missing the required parameter 'templateId' when calling updateTemplate");
1781
- }
1782
-
1783
- // verify the required parameter 'updateTemplateData' is set
1784
- if (updateTemplateData === undefined || updateTemplateData === null) {
1785
- throw new Error("Missing the required parameter 'updateTemplateData' when calling updateTemplate");
1786
- }
1787
-
1788
-
1789
- var pathParams = {
1790
- 'template_id': templateId
1791
- };
1792
- var queryParams = {
1793
- };
1794
- var collectionQueryParams = {
1795
- };
1796
- var headerParams = {
1797
- };
1798
- var formParams = {
1799
- };
1800
-
1801
- var authNames = ['api_token_basic'];
1802
- var contentTypes = ['application/json'];
1803
- var accepts = ['application/json'];
1804
- var returnType = UpdateTemplateResponse;
1805
-
1806
- return this.apiClient.callApi(
1807
- '/templates/{template_id}', 'PUT',
1808
- pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
1809
- authNames, contentTypes, accepts, returnType, callback
1810
- );
1811
- }
1812
- };
1813
-
1814
- return exports;
1815
- }));