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