docspring-ts 1.0.1 → 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 (395) hide show
  1. package/README.md +80 -0
  2. package/dist/apis/PDFApi.d.ts +121 -0
  3. package/dist/apis/PDFApi.js +3423 -0
  4. package/dist/apis/PDFApi.js.map +1 -0
  5. package/dist/apis/baseapi.d.ts +18 -0
  6. package/dist/apis/baseapi.js +46 -0
  7. package/dist/apis/baseapi.js.map +1 -0
  8. package/dist/apis/exception.d.ts +10 -0
  9. package/dist/apis/exception.js +32 -0
  10. package/dist/apis/exception.js.map +1 -0
  11. package/dist/auth/auth.d.ts +36 -0
  12. package/dist/auth/auth.js +31 -0
  13. package/dist/auth/auth.js.map +1 -0
  14. package/dist/configuration.d.ts +18 -0
  15. package/dist/configuration.js +22 -0
  16. package/dist/configuration.js.map +1 -0
  17. package/dist/http/http.d.ts +68 -0
  18. package/dist/http/http.js +261 -0
  19. package/dist/http/http.js.map +1 -0
  20. package/dist/http/isomorphic-fetch.d.ts +6 -0
  21. package/dist/http/isomorphic-fetch.js +45 -0
  22. package/dist/http/isomorphic-fetch.js.map +1 -0
  23. package/dist/index.d.ts +10 -0
  24. package/dist/index.js +29 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/middleware.d.ts +16 -0
  27. package/dist/middleware.js +18 -0
  28. package/dist/middleware.js.map +1 -0
  29. package/dist/models/AddFieldsData.d.ts +20 -0
  30. package/dist/{model/addFieldsData.js → models/AddFieldsData.js} +4 -2
  31. package/dist/models/AddFieldsData.js.map +1 -0
  32. package/dist/models/BatchGeneratePdfs201Response.d.ts +29 -0
  33. package/dist/models/BatchGeneratePdfs201Response.js +52 -0
  34. package/dist/models/BatchGeneratePdfs201Response.js.map +1 -0
  35. package/dist/{model/combinePdfsData.d.ts → models/CombinePdfsData.d.ts} +10 -4
  36. package/dist/{model/combinePdfsData.js → models/CombinePdfsData.js} +14 -7
  37. package/dist/models/CombinePdfsData.js.map +1 -0
  38. package/dist/models/CombinedSubmission.d.ts +39 -0
  39. package/dist/{model/combinedSubmission.js → models/CombinedSubmission.js} +53 -36
  40. package/dist/models/CombinedSubmission.js.map +1 -0
  41. package/dist/models/CombinedSubmissionAction.d.ts +41 -0
  42. package/dist/models/CombinedSubmissionAction.js +72 -0
  43. package/dist/models/CombinedSubmissionAction.js.map +1 -0
  44. package/dist/{model/combinedSubmissionData.d.ts → models/CombinedSubmissionData.d.ts} +9 -3
  45. package/dist/{model/combinedSubmissionData.js → models/CombinedSubmissionData.js} +12 -6
  46. package/dist/models/CombinedSubmissionData.js.map +1 -0
  47. package/dist/models/CopyTemplateOptions.d.ts +21 -0
  48. package/dist/models/CopyTemplateOptions.js +29 -0
  49. package/dist/models/CopyTemplateOptions.js.map +1 -0
  50. package/dist/models/CreateCombinedSubmissionResponse.d.ts +27 -0
  51. package/dist/{model/createCombinedSubmissionResponse.js → models/CreateCombinedSubmissionResponse.js} +18 -17
  52. package/dist/models/CreateCombinedSubmissionResponse.js.map +1 -0
  53. package/dist/{model/createCustomFileData.d.ts → models/CreateCustomFileData.d.ts} +8 -2
  54. package/dist/{model/createCustomFileData.js → models/CreateCustomFileData.js} +4 -2
  55. package/dist/models/CreateCustomFileData.js.map +1 -0
  56. package/dist/models/CreateCustomFileResponse.d.ts +27 -0
  57. package/dist/{model/createCustomFileResponse.js → models/CreateCustomFileResponse.js} +18 -17
  58. package/dist/models/CreateCustomFileResponse.js.map +1 -0
  59. package/dist/models/CreateFolderData.d.ts +20 -0
  60. package/dist/{model/createFolderData.js → models/CreateFolderData.js} +4 -2
  61. package/dist/models/CreateFolderData.js.map +1 -0
  62. package/dist/models/CreateHtmlSubmissionData.d.ts +28 -0
  63. package/dist/models/CreateHtmlSubmissionData.js +71 -0
  64. package/dist/models/CreateHtmlSubmissionData.js.map +1 -0
  65. package/dist/models/CreateHtmlTemplate.d.ts +20 -0
  66. package/dist/models/CreateHtmlTemplate.js +23 -0
  67. package/dist/models/CreateHtmlTemplate.js.map +1 -0
  68. package/dist/models/CreatePdfSubmissionData.d.ts +28 -0
  69. package/dist/models/CreatePdfSubmissionData.js +65 -0
  70. package/dist/models/CreatePdfSubmissionData.js.map +1 -0
  71. package/dist/models/CreatePdfTemplate.d.ts +20 -0
  72. package/dist/models/CreatePdfTemplate.js +23 -0
  73. package/dist/models/CreatePdfTemplate.js.map +1 -0
  74. package/dist/models/CreateSubmissionDataRequestData.d.ts +41 -0
  75. package/dist/models/CreateSubmissionDataRequestData.js +66 -0
  76. package/dist/models/CreateSubmissionDataRequestData.js.map +1 -0
  77. package/dist/models/CreateSubmissionDataRequestEventRequest.d.ts +40 -0
  78. package/dist/models/CreateSubmissionDataRequestEventRequest.js +50 -0
  79. package/dist/models/CreateSubmissionDataRequestEventRequest.js.map +1 -0
  80. package/dist/models/CreateSubmissionDataRequestEventResponse.d.ts +27 -0
  81. package/dist/models/CreateSubmissionDataRequestEventResponse.js +40 -0
  82. package/dist/models/CreateSubmissionDataRequestEventResponse.js.map +1 -0
  83. package/dist/models/CreateSubmissionDataRequestResponse.d.ts +27 -0
  84. package/dist/models/CreateSubmissionDataRequestResponse.js +40 -0
  85. package/dist/models/CreateSubmissionDataRequestResponse.js.map +1 -0
  86. package/dist/models/CreateSubmissionDataRequestTokenResponse.d.ts +27 -0
  87. package/dist/models/CreateSubmissionDataRequestTokenResponse.js +40 -0
  88. package/dist/models/CreateSubmissionDataRequestTokenResponse.js.map +1 -0
  89. package/dist/models/CreateSubmissionResponse.d.ts +27 -0
  90. package/dist/{model/createSubmissionResponse.js → models/CreateSubmissionResponse.js} +18 -17
  91. package/dist/models/CreateSubmissionResponse.js.map +1 -0
  92. package/dist/models/CustomFile.d.ts +21 -0
  93. package/dist/models/CustomFile.js +29 -0
  94. package/dist/models/CustomFile.js.map +1 -0
  95. package/dist/models/ErrorResponse.d.ts +24 -0
  96. package/dist/models/ErrorResponse.js +33 -0
  97. package/dist/models/ErrorResponse.js.map +1 -0
  98. package/dist/models/Folder.d.ts +23 -0
  99. package/dist/{model/folder.js → models/Folder.js} +10 -5
  100. package/dist/models/Folder.js.map +1 -0
  101. package/dist/models/JsonSchema.d.ts +28 -0
  102. package/dist/models/JsonSchema.js +71 -0
  103. package/dist/models/JsonSchema.js.map +1 -0
  104. package/dist/{model/listSubmissionsResponse.d.ts → models/ListSubmissionsResponse.d.ts} +9 -3
  105. package/dist/{model/listSubmissionsResponse.js → models/ListSubmissionsResponse.js} +8 -4
  106. package/dist/models/ListSubmissionsResponse.js.map +1 -0
  107. package/dist/{model/moveFolderData.d.ts → models/MoveFolderData.d.ts} +8 -2
  108. package/dist/{model/moveFolderData.js → models/MoveFolderData.js} +4 -2
  109. package/dist/models/MoveFolderData.js.map +1 -0
  110. package/dist/{model/moveTemplateData.d.ts → models/MoveTemplateData.d.ts} +8 -2
  111. package/dist/{model/moveTemplateData.js → models/MoveTemplateData.js} +4 -2
  112. package/dist/models/MoveTemplateData.js.map +1 -0
  113. package/dist/models/MultipleErrorsResponse.d.ts +24 -0
  114. package/dist/models/MultipleErrorsResponse.js +33 -0
  115. package/dist/models/MultipleErrorsResponse.js.map +1 -0
  116. package/dist/models/ObjectSerializer.d.ts +57 -0
  117. package/dist/models/ObjectSerializer.js +459 -0
  118. package/dist/models/ObjectSerializer.js.map +1 -0
  119. package/dist/{model/renameFolderData.d.ts → models/RenameFolderData.d.ts} +8 -2
  120. package/dist/{model/renameFolderData.js → models/RenameFolderData.js} +4 -2
  121. package/dist/models/RenameFolderData.js.map +1 -0
  122. package/dist/models/Submission.d.ts +64 -0
  123. package/dist/models/Submission.js +182 -0
  124. package/dist/models/Submission.js.map +1 -0
  125. package/dist/models/SubmissionAction.d.ts +41 -0
  126. package/dist/models/SubmissionAction.js +72 -0
  127. package/dist/models/SubmissionAction.js.map +1 -0
  128. package/dist/models/SubmissionBatch.d.ts +32 -0
  129. package/dist/{model/submissionBatch.js → models/SubmissionBatch.js} +37 -36
  130. package/dist/models/SubmissionBatch.js.map +1 -0
  131. package/dist/models/SubmissionBatchData.d.ts +22 -0
  132. package/dist/{model/submissionBatchData.js → models/SubmissionBatchData.js} +8 -9
  133. package/dist/models/SubmissionBatchData.js.map +1 -0
  134. package/dist/models/SubmissionBatchWithSubmissions.d.ts +34 -0
  135. package/dist/models/SubmissionBatchWithSubmissions.js +77 -0
  136. package/dist/models/SubmissionBatchWithSubmissions.js.map +1 -0
  137. package/dist/models/SubmissionDataRequest.d.ts +61 -0
  138. package/dist/models/SubmissionDataRequest.js +167 -0
  139. package/dist/models/SubmissionDataRequest.js.map +1 -0
  140. package/dist/models/SubmissionDataRequestEvent.d.ts +45 -0
  141. package/dist/models/SubmissionDataRequestEvent.js +80 -0
  142. package/dist/models/SubmissionDataRequestEvent.js.map +1 -0
  143. package/dist/models/SubmissionDataRequestShow.d.ts +62 -0
  144. package/dist/models/SubmissionDataRequestShow.js +173 -0
  145. package/dist/models/SubmissionDataRequestShow.js.map +1 -0
  146. package/dist/models/SubmissionDataRequestToken.d.ts +23 -0
  147. package/dist/models/SubmissionDataRequestToken.js +41 -0
  148. package/dist/models/SubmissionDataRequestToken.js.map +1 -0
  149. package/dist/models/SubmissionPreview.d.ts +55 -0
  150. package/dist/models/SubmissionPreview.js +157 -0
  151. package/dist/models/SubmissionPreview.js.map +1 -0
  152. package/dist/models/SuccessErrorResponse.d.ts +25 -0
  153. package/dist/models/SuccessErrorResponse.js +34 -0
  154. package/dist/models/SuccessErrorResponse.js.map +1 -0
  155. package/dist/models/SuccessMultipleErrorsResponse.d.ts +25 -0
  156. package/dist/models/SuccessMultipleErrorsResponse.js +34 -0
  157. package/dist/models/SuccessMultipleErrorsResponse.js.map +1 -0
  158. package/dist/{model/fullTemplate.d.ts → models/Template.d.ts} +59 -43
  159. package/dist/models/Template.js +306 -0
  160. package/dist/models/Template.js.map +1 -0
  161. package/dist/models/TemplateAddFieldsResponse.d.ts +26 -0
  162. package/dist/models/TemplateAddFieldsResponse.js +40 -0
  163. package/dist/models/TemplateAddFieldsResponse.js.map +1 -0
  164. package/dist/models/TemplatePreview.d.ts +66 -0
  165. package/dist/models/TemplatePreview.js +246 -0
  166. package/dist/models/TemplatePreview.js.map +1 -0
  167. package/dist/models/UpdateHtmlTemplate.d.ts +20 -0
  168. package/dist/models/UpdateHtmlTemplate.js +23 -0
  169. package/dist/models/UpdateHtmlTemplate.js.map +1 -0
  170. package/dist/models/UpdateSubmissionDataRequestData.d.ts +32 -0
  171. package/dist/models/UpdateSubmissionDataRequestData.js +51 -0
  172. package/dist/models/UpdateSubmissionDataRequestData.js.map +1 -0
  173. package/dist/models/UploadPresignResponse.d.ts +26 -0
  174. package/dist/models/UploadPresignResponse.js +45 -0
  175. package/dist/models/UploadPresignResponse.js.map +1 -0
  176. package/dist/models/all.d.ts +48 -0
  177. package/dist/models/all.js +65 -0
  178. package/dist/models/all.js.map +1 -0
  179. package/dist/rxjsStub.d.ts +10 -0
  180. package/dist/rxjsStub.js +33 -0
  181. package/dist/rxjsStub.js.map +1 -0
  182. package/dist/servers.d.ts +17 -0
  183. package/dist/servers.js +32 -0
  184. package/dist/servers.js.map +1 -0
  185. package/dist/types/ObjectParamAPI.d.ts +269 -0
  186. package/dist/types/ObjectParamAPI.js +252 -0
  187. package/dist/types/ObjectParamAPI.js.map +1 -0
  188. package/dist/types/ObservableAPI.d.ts +124 -0
  189. package/dist/types/ObservableAPI.js +1042 -0
  190. package/dist/types/ObservableAPI.js.map +1 -0
  191. package/dist/types/PromiseAPI.d.ts +121 -0
  192. package/dist/types/PromiseAPI.js +316 -0
  193. package/dist/types/PromiseAPI.js.map +1 -0
  194. package/dist/util.d.ts +2 -0
  195. package/dist/util.js +29 -0
  196. package/dist/util.js.map +1 -0
  197. package/package.json +38 -26
  198. package/.openapi-generator/FILES +0 -58
  199. package/.openapi-generator/VERSION +0 -1
  200. package/.openapi-generator-ignore +0 -23
  201. package/CHANGELOG.md +0 -4
  202. package/api/PDFApi.ts +0 -2869
  203. package/api/apis.ts +0 -16
  204. package/api.ts +0 -4
  205. package/dist/api/PDFApi.d.ts +0 -351
  206. package/dist/api/PDFApi.js +0 -2838
  207. package/dist/api/PDFApi.js.map +0 -1
  208. package/dist/api/apis.d.ts +0 -12
  209. package/dist/api/apis.js +0 -49
  210. package/dist/api/apis.js.map +0 -1
  211. package/dist/api.d.ts +0 -2
  212. package/dist/api.js +0 -19
  213. package/dist/api.js.map +0 -1
  214. package/dist/model/addFieldsData.d.ts +0 -14
  215. package/dist/model/addFieldsData.js.map +0 -1
  216. package/dist/model/addFieldsTemplateResponse.d.ts +0 -22
  217. package/dist/model/addFieldsTemplateResponse.js +0 -39
  218. package/dist/model/addFieldsTemplateResponse.js.map +0 -1
  219. package/dist/model/authenticationError.d.ts +0 -20
  220. package/dist/model/authenticationError.js +0 -33
  221. package/dist/model/authenticationError.js.map +0 -1
  222. package/dist/model/authenticationSuccessResponse.d.ts +0 -19
  223. package/dist/model/authenticationSuccessResponse.js +0 -28
  224. package/dist/model/authenticationSuccessResponse.js.map +0 -1
  225. package/dist/model/combinePdfsData.js.map +0 -1
  226. package/dist/model/combinedSubmission.d.ts +0 -34
  227. package/dist/model/combinedSubmission.js.map +0 -1
  228. package/dist/model/combinedSubmissionAction.d.ts +0 -37
  229. package/dist/model/combinedSubmissionAction.js +0 -68
  230. package/dist/model/combinedSubmissionAction.js.map +0 -1
  231. package/dist/model/combinedSubmissionData.js.map +0 -1
  232. package/dist/model/copyTemplateData.d.ts +0 -15
  233. package/dist/model/copyTemplateData.js +0 -26
  234. package/dist/model/copyTemplateData.js.map +0 -1
  235. package/dist/model/createCombinedSubmissionResponse.d.ts +0 -23
  236. package/dist/model/createCombinedSubmissionResponse.js.map +0 -1
  237. package/dist/model/createCustomFileData.js.map +0 -1
  238. package/dist/model/createCustomFileResponse.d.ts +0 -22
  239. package/dist/model/createCustomFileResponse.js.map +0 -1
  240. package/dist/model/createFolderData.d.ts +0 -15
  241. package/dist/model/createFolderData.js.map +0 -1
  242. package/dist/model/createFolderDataFolder.d.ts +0 -15
  243. package/dist/model/createFolderDataFolder.js +0 -26
  244. package/dist/model/createFolderDataFolder.js.map +0 -1
  245. package/dist/model/createHtmlTemplateData.d.ts +0 -15
  246. package/dist/model/createHtmlTemplateData.js +0 -21
  247. package/dist/model/createHtmlTemplateData.js.map +0 -1
  248. package/dist/model/createSubmissionBatchResponse.d.ts +0 -26
  249. package/dist/model/createSubmissionBatchResponse.js +0 -49
  250. package/dist/model/createSubmissionBatchResponse.js.map +0 -1
  251. package/dist/model/createSubmissionBatchSubmissionsResponse.d.ts +0 -24
  252. package/dist/model/createSubmissionBatchSubmissionsResponse.js +0 -40
  253. package/dist/model/createSubmissionBatchSubmissionsResponse.js.map +0 -1
  254. package/dist/model/createSubmissionDataRequestData.d.ts +0 -45
  255. package/dist/model/createSubmissionDataRequestData.js +0 -103
  256. package/dist/model/createSubmissionDataRequestData.js.map +0 -1
  257. package/dist/model/createSubmissionDataRequestTokenResponse.d.ts +0 -23
  258. package/dist/model/createSubmissionDataRequestTokenResponse.js +0 -39
  259. package/dist/model/createSubmissionDataRequestTokenResponse.js.map +0 -1
  260. package/dist/model/createSubmissionDataRequestTokenResponseToken.d.ts +0 -17
  261. package/dist/model/createSubmissionDataRequestTokenResponseToken.js +0 -36
  262. package/dist/model/createSubmissionDataRequestTokenResponseToken.js.map +0 -1
  263. package/dist/model/createSubmissionResponse.d.ts +0 -23
  264. package/dist/model/createSubmissionResponse.js.map +0 -1
  265. package/dist/model/createTemplateFromUploadData.d.ts +0 -15
  266. package/dist/model/createTemplateFromUploadData.js +0 -21
  267. package/dist/model/createTemplateFromUploadData.js.map +0 -1
  268. package/dist/model/deleteTemplateResponse.d.ts +0 -21
  269. package/dist/model/deleteTemplateResponse.js +0 -34
  270. package/dist/model/deleteTemplateResponse.js.map +0 -1
  271. package/dist/model/folder.d.ts +0 -17
  272. package/dist/model/folder.js.map +0 -1
  273. package/dist/model/fullTemplate.js +0 -220
  274. package/dist/model/fullTemplate.js.map +0 -1
  275. package/dist/model/fullTemplateDefaults.d.ts +0 -16
  276. package/dist/model/fullTemplateDefaults.js +0 -31
  277. package/dist/model/fullTemplateDefaults.js.map +0 -1
  278. package/dist/model/htmlTemplateData.d.ts +0 -41
  279. package/dist/model/htmlTemplateData.js +0 -115
  280. package/dist/model/htmlTemplateData.js.map +0 -1
  281. package/dist/model/invalidRequest.d.ts +0 -20
  282. package/dist/model/invalidRequest.js +0 -33
  283. package/dist/model/invalidRequest.js.map +0 -1
  284. package/dist/model/listSubmissionsResponse.js.map +0 -1
  285. package/dist/model/modelError.d.ts +0 -20
  286. package/dist/model/modelError.js +0 -33
  287. package/dist/model/modelError.js.map +0 -1
  288. package/dist/model/models.d.ts +0 -96
  289. package/dist/model/models.js +0 -414
  290. package/dist/model/models.js.map +0 -1
  291. package/dist/model/moveFolderData.js.map +0 -1
  292. package/dist/model/moveTemplateData.js.map +0 -1
  293. package/dist/model/pendingTemplate.d.ts +0 -37
  294. package/dist/model/pendingTemplate.js +0 -110
  295. package/dist/model/pendingTemplate.js.map +0 -1
  296. package/dist/model/renameFolderData.js.map +0 -1
  297. package/dist/model/submission.d.ts +0 -49
  298. package/dist/model/submission.js +0 -128
  299. package/dist/model/submission.js.map +0 -1
  300. package/dist/model/submissionAction.d.ts +0 -37
  301. package/dist/model/submissionAction.js +0 -68
  302. package/dist/model/submissionAction.js.map +0 -1
  303. package/dist/model/submissionBatch.d.ts +0 -30
  304. package/dist/model/submissionBatch.js.map +0 -1
  305. package/dist/model/submissionBatchData.d.ts +0 -18
  306. package/dist/model/submissionBatchData.js.map +0 -1
  307. package/dist/model/submissionData.d.ts +0 -23
  308. package/dist/model/submissionData.js +0 -61
  309. package/dist/model/submissionData.js.map +0 -1
  310. package/dist/model/submissionDataBatchRequest.d.ts +0 -19
  311. package/dist/model/submissionDataBatchRequest.js +0 -46
  312. package/dist/model/submissionDataBatchRequest.js.map +0 -1
  313. package/dist/model/submissionDataRequest.d.ts +0 -57
  314. package/dist/model/submissionDataRequest.js +0 -148
  315. package/dist/model/submissionDataRequest.js.map +0 -1
  316. package/dist/model/template.d.ts +0 -40
  317. package/dist/model/template.js +0 -125
  318. package/dist/model/template.js.map +0 -1
  319. package/dist/model/templateData.d.ts +0 -36
  320. package/dist/model/templateData.js +0 -105
  321. package/dist/model/templateData.js.map +0 -1
  322. package/dist/model/updateDataRequestResponse.d.ts +0 -23
  323. package/dist/model/updateDataRequestResponse.js +0 -39
  324. package/dist/model/updateDataRequestResponse.js.map +0 -1
  325. package/dist/model/updateSubmissionDataRequestData.d.ts +0 -45
  326. package/dist/model/updateSubmissionDataRequestData.js +0 -103
  327. package/dist/model/updateSubmissionDataRequestData.js.map +0 -1
  328. package/dist/model/updateTemplateData.d.ts +0 -15
  329. package/dist/model/updateTemplateData.js +0 -21
  330. package/dist/model/updateTemplateData.js.map +0 -1
  331. package/dist/model/updateTemplateResponse.d.ts +0 -21
  332. package/dist/model/updateTemplateResponse.js +0 -34
  333. package/dist/model/updateTemplateResponse.js.map +0 -1
  334. package/dist/model/uploadTemplateData.d.ts +0 -43
  335. package/dist/model/uploadTemplateData.js +0 -120
  336. package/dist/model/uploadTemplateData.js.map +0 -1
  337. package/dist/model/uploadTemplateDataDocument.d.ts +0 -22
  338. package/dist/model/uploadTemplateDataDocument.js +0 -38
  339. package/dist/model/uploadTemplateDataDocument.js.map +0 -1
  340. package/dist/model/uploadTemplateDataDocumentMetadata.d.ts +0 -21
  341. package/dist/model/uploadTemplateDataDocumentMetadata.js +0 -38
  342. package/dist/model/uploadTemplateDataDocumentMetadata.js.map +0 -1
  343. package/git_push.sh +0 -57
  344. package/model/addFieldsData.ts +0 -31
  345. package/model/addFieldsTemplateResponse.ts +0 -49
  346. package/model/authenticationError.ts +0 -42
  347. package/model/authenticationSuccessResponse.ts +0 -36
  348. package/model/combinePdfsData.ts +0 -61
  349. package/model/combinedSubmission.ts +0 -111
  350. package/model/combinedSubmissionAction.ts +0 -79
  351. package/model/combinedSubmissionData.ts +0 -55
  352. package/model/copyTemplateData.ts +0 -37
  353. package/model/createCombinedSubmissionResponse.ts +0 -50
  354. package/model/createCustomFileData.ts +0 -31
  355. package/model/createCustomFileResponse.ts +0 -49
  356. package/model/createFolderData.ts +0 -32
  357. package/model/createFolderDataFolder.ts +0 -37
  358. package/model/createHtmlTemplateData.ts +0 -32
  359. package/model/createSubmissionBatchResponse.ts +0 -63
  360. package/model/createSubmissionBatchSubmissionsResponse.ts +0 -51
  361. package/model/createSubmissionDataRequestData.ts +0 -122
  362. package/model/createSubmissionDataRequestTokenResponse.ts +0 -50
  363. package/model/createSubmissionDataRequestTokenResponseToken.ts +0 -49
  364. package/model/createSubmissionResponse.ts +0 -50
  365. package/model/createTemplateFromUploadData.ts +0 -32
  366. package/model/deleteTemplateResponse.ts +0 -43
  367. package/model/folder.ts +0 -49
  368. package/model/fullTemplate.ts +0 -267
  369. package/model/fullTemplateDefaults.ts +0 -43
  370. package/model/htmlTemplateData.ts +0 -138
  371. package/model/invalidRequest.ts +0 -42
  372. package/model/listSubmissionsResponse.ts +0 -44
  373. package/model/modelError.ts +0 -42
  374. package/model/models.ts +0 -409
  375. package/model/moveFolderData.ts +0 -31
  376. package/model/moveTemplateData.ts +0 -31
  377. package/model/pendingTemplate.ts +0 -134
  378. package/model/renameFolderData.ts +0 -31
  379. package/model/submission.ts +0 -156
  380. package/model/submissionAction.ts +0 -79
  381. package/model/submissionBatch.ts +0 -87
  382. package/model/submissionBatchData.ts +0 -50
  383. package/model/submissionData.ts +0 -80
  384. package/model/submissionDataBatchRequest.ts +0 -61
  385. package/model/submissionDataRequest.ts +0 -174
  386. package/model/template.ts +0 -152
  387. package/model/templateData.ts +0 -128
  388. package/model/updateDataRequestResponse.ts +0 -50
  389. package/model/updateSubmissionDataRequestData.ts +0 -122
  390. package/model/updateTemplateData.ts +0 -32
  391. package/model/updateTemplateResponse.ts +0 -43
  392. package/model/uploadTemplateData.ts +0 -145
  393. package/model/uploadTemplateDataDocument.ts +0 -49
  394. package/model/uploadTemplateDataDocumentMetadata.ts +0 -48
  395. package/tsconfig.json +0 -25
@@ -0,0 +1,3423 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.PDFApiResponseProcessor = exports.PDFApiRequestFactory = void 0;
55
+ var baseapi_1 = require("./baseapi");
56
+ var http_1 = require("../http/http");
57
+ var ObjectSerializer_1 = require("../models/ObjectSerializer");
58
+ var exception_1 = require("./exception");
59
+ var util_1 = require("../util");
60
+ var PDFApiRequestFactory = (function (_super) {
61
+ __extends(PDFApiRequestFactory, _super);
62
+ function PDFApiRequestFactory() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ PDFApiRequestFactory.prototype.addFieldsToTemplate = function (templateId, data, _options) {
66
+ var _a, _b, _c;
67
+ return __awaiter(this, void 0, void 0, function () {
68
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
69
+ return __generator(this, function (_d) {
70
+ switch (_d.label) {
71
+ case 0:
72
+ _config = _options || this.configuration;
73
+ if (templateId === null || templateId === undefined) {
74
+ throw new baseapi_1.RequiredError("PDFApi", "addFieldsToTemplate", "templateId");
75
+ }
76
+ if (data === null || data === undefined) {
77
+ throw new baseapi_1.RequiredError("PDFApi", "addFieldsToTemplate", "data");
78
+ }
79
+ localVarPath = '/templates/{template_id}/add_fields'
80
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
81
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
82
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
83
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
84
+ "application/json"
85
+ ]);
86
+ requestContext.setHeaderParam("Content-Type", contentType);
87
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "AddFieldsData", ""), contentType);
88
+ requestContext.setBody(serializedBody);
89
+ authMethod = _config.authMethods["api_token_basic"];
90
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
91
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
92
+ case 1:
93
+ _d.sent();
94
+ _d.label = 2;
95
+ case 2:
96
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
97
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
98
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
99
+ case 3:
100
+ _d.sent();
101
+ _d.label = 4;
102
+ case 4: return [2, requestContext];
103
+ }
104
+ });
105
+ });
106
+ };
107
+ PDFApiRequestFactory.prototype.batchGeneratePdfs = function (data, wait, _options) {
108
+ var _a, _b, _c;
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
111
+ return __generator(this, function (_d) {
112
+ switch (_d.label) {
113
+ case 0:
114
+ _config = _options || this.configuration;
115
+ if (data === null || data === undefined) {
116
+ throw new baseapi_1.RequiredError("PDFApi", "batchGeneratePdfs", "data");
117
+ }
118
+ localVarPath = '/submissions/batches';
119
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
120
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
121
+ if (wait !== undefined) {
122
+ requestContext.setQueryParam("wait", ObjectSerializer_1.ObjectSerializer.serialize(wait, "boolean", ""));
123
+ }
124
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
125
+ "application/json"
126
+ ]);
127
+ requestContext.setHeaderParam("Content-Type", contentType);
128
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "SubmissionBatchData", ""), contentType);
129
+ requestContext.setBody(serializedBody);
130
+ authMethod = _config.authMethods["api_token_basic"];
131
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
132
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
133
+ case 1:
134
+ _d.sent();
135
+ _d.label = 2;
136
+ case 2:
137
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
138
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
139
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
140
+ case 3:
141
+ _d.sent();
142
+ _d.label = 4;
143
+ case 4: return [2, requestContext];
144
+ }
145
+ });
146
+ });
147
+ };
148
+ PDFApiRequestFactory.prototype.combinePdfs = function (data, _options) {
149
+ var _a, _b, _c;
150
+ return __awaiter(this, void 0, void 0, function () {
151
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
152
+ return __generator(this, function (_d) {
153
+ switch (_d.label) {
154
+ case 0:
155
+ _config = _options || this.configuration;
156
+ if (data === null || data === undefined) {
157
+ throw new baseapi_1.RequiredError("PDFApi", "combinePdfs", "data");
158
+ }
159
+ localVarPath = '/combined_submissions?v=2';
160
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
161
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
162
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
163
+ "application/json"
164
+ ]);
165
+ requestContext.setHeaderParam("Content-Type", contentType);
166
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "CombinePdfsData", ""), contentType);
167
+ requestContext.setBody(serializedBody);
168
+ authMethod = _config.authMethods["api_token_basic"];
169
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
170
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
171
+ case 1:
172
+ _d.sent();
173
+ _d.label = 2;
174
+ case 2:
175
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
176
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
177
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
178
+ case 3:
179
+ _d.sent();
180
+ _d.label = 4;
181
+ case 4: return [2, requestContext];
182
+ }
183
+ });
184
+ });
185
+ };
186
+ PDFApiRequestFactory.prototype.combineSubmissions = function (data, wait, _options) {
187
+ var _a, _b, _c;
188
+ return __awaiter(this, void 0, void 0, function () {
189
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
190
+ return __generator(this, function (_d) {
191
+ switch (_d.label) {
192
+ case 0:
193
+ _config = _options || this.configuration;
194
+ if (data === null || data === undefined) {
195
+ throw new baseapi_1.RequiredError("PDFApi", "combineSubmissions", "data");
196
+ }
197
+ localVarPath = '/combined_submissions';
198
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
199
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
200
+ if (wait !== undefined) {
201
+ requestContext.setQueryParam("wait", ObjectSerializer_1.ObjectSerializer.serialize(wait, "boolean", ""));
202
+ }
203
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
204
+ "application/json"
205
+ ]);
206
+ requestContext.setHeaderParam("Content-Type", contentType);
207
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "CombinedSubmissionData", ""), contentType);
208
+ requestContext.setBody(serializedBody);
209
+ authMethod = _config.authMethods["api_token_basic"];
210
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
211
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
212
+ case 1:
213
+ _d.sent();
214
+ _d.label = 2;
215
+ case 2:
216
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
217
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
218
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
219
+ case 3:
220
+ _d.sent();
221
+ _d.label = 4;
222
+ case 4: return [2, requestContext];
223
+ }
224
+ });
225
+ });
226
+ };
227
+ PDFApiRequestFactory.prototype.copyTemplate = function (templateId, options, _options) {
228
+ var _a, _b, _c;
229
+ return __awaiter(this, void 0, void 0, function () {
230
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
231
+ return __generator(this, function (_d) {
232
+ switch (_d.label) {
233
+ case 0:
234
+ _config = _options || this.configuration;
235
+ if (templateId === null || templateId === undefined) {
236
+ throw new baseapi_1.RequiredError("PDFApi", "copyTemplate", "templateId");
237
+ }
238
+ localVarPath = '/templates/{template_id}/copy'
239
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
240
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
241
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
242
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
243
+ "application/json"
244
+ ]);
245
+ requestContext.setHeaderParam("Content-Type", contentType);
246
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(options, "CopyTemplateOptions", ""), contentType);
247
+ requestContext.setBody(serializedBody);
248
+ authMethod = _config.authMethods["api_token_basic"];
249
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
250
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
251
+ case 1:
252
+ _d.sent();
253
+ _d.label = 2;
254
+ case 2:
255
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
256
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
257
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
258
+ case 3:
259
+ _d.sent();
260
+ _d.label = 4;
261
+ case 4: return [2, requestContext];
262
+ }
263
+ });
264
+ });
265
+ };
266
+ PDFApiRequestFactory.prototype.createCustomFileFromUpload = function (data, _options) {
267
+ var _a, _b, _c;
268
+ return __awaiter(this, void 0, void 0, function () {
269
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
270
+ return __generator(this, function (_d) {
271
+ switch (_d.label) {
272
+ case 0:
273
+ _config = _options || this.configuration;
274
+ if (data === null || data === undefined) {
275
+ throw new baseapi_1.RequiredError("PDFApi", "createCustomFileFromUpload", "data");
276
+ }
277
+ localVarPath = '/custom_files';
278
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
279
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
280
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
281
+ "application/json"
282
+ ]);
283
+ requestContext.setHeaderParam("Content-Type", contentType);
284
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "CreateCustomFileData", ""), contentType);
285
+ requestContext.setBody(serializedBody);
286
+ authMethod = _config.authMethods["api_token_basic"];
287
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
288
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
289
+ case 1:
290
+ _d.sent();
291
+ _d.label = 2;
292
+ case 2:
293
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
294
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
295
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
296
+ case 3:
297
+ _d.sent();
298
+ _d.label = 4;
299
+ case 4: return [2, requestContext];
300
+ }
301
+ });
302
+ });
303
+ };
304
+ PDFApiRequestFactory.prototype.createDataRequestEvent = function (dataRequestId, event, _options) {
305
+ var _a, _b, _c;
306
+ return __awaiter(this, void 0, void 0, function () {
307
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
308
+ return __generator(this, function (_d) {
309
+ switch (_d.label) {
310
+ case 0:
311
+ _config = _options || this.configuration;
312
+ if (dataRequestId === null || dataRequestId === undefined) {
313
+ throw new baseapi_1.RequiredError("PDFApi", "createDataRequestEvent", "dataRequestId");
314
+ }
315
+ if (event === null || event === undefined) {
316
+ throw new baseapi_1.RequiredError("PDFApi", "createDataRequestEvent", "event");
317
+ }
318
+ localVarPath = '/data_requests/{data_request_id}/events'
319
+ .replace('{' + 'data_request_id' + '}', encodeURIComponent(String(dataRequestId)));
320
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
321
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
322
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
323
+ "application/json"
324
+ ]);
325
+ requestContext.setHeaderParam("Content-Type", contentType);
326
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(event, "CreateSubmissionDataRequestEventRequest", ""), contentType);
327
+ requestContext.setBody(serializedBody);
328
+ authMethod = _config.authMethods["api_token_basic"];
329
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
330
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
331
+ case 1:
332
+ _d.sent();
333
+ _d.label = 2;
334
+ case 2:
335
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
336
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
337
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
338
+ case 3:
339
+ _d.sent();
340
+ _d.label = 4;
341
+ case 4: return [2, requestContext];
342
+ }
343
+ });
344
+ });
345
+ };
346
+ PDFApiRequestFactory.prototype.createDataRequestToken = function (dataRequestId, type, _options) {
347
+ var _a, _b, _c;
348
+ return __awaiter(this, void 0, void 0, function () {
349
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
350
+ return __generator(this, function (_d) {
351
+ switch (_d.label) {
352
+ case 0:
353
+ _config = _options || this.configuration;
354
+ if (dataRequestId === null || dataRequestId === undefined) {
355
+ throw new baseapi_1.RequiredError("PDFApi", "createDataRequestToken", "dataRequestId");
356
+ }
357
+ localVarPath = '/data_requests/{data_request_id}/tokens'
358
+ .replace('{' + 'data_request_id' + '}', encodeURIComponent(String(dataRequestId)));
359
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
360
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
361
+ if (type !== undefined) {
362
+ requestContext.setQueryParam("type", ObjectSerializer_1.ObjectSerializer.serialize(type, "'api' | 'email'", ""));
363
+ }
364
+ authMethod = _config.authMethods["api_token_basic"];
365
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
366
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
367
+ case 1:
368
+ _d.sent();
369
+ _d.label = 2;
370
+ case 2:
371
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
372
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
373
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
374
+ case 3:
375
+ _d.sent();
376
+ _d.label = 4;
377
+ case 4: return [2, requestContext];
378
+ }
379
+ });
380
+ });
381
+ };
382
+ PDFApiRequestFactory.prototype.createFolder = function (data, _options) {
383
+ var _a, _b, _c;
384
+ return __awaiter(this, void 0, void 0, function () {
385
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
386
+ return __generator(this, function (_d) {
387
+ switch (_d.label) {
388
+ case 0:
389
+ _config = _options || this.configuration;
390
+ if (data === null || data === undefined) {
391
+ throw new baseapi_1.RequiredError("PDFApi", "createFolder", "data");
392
+ }
393
+ localVarPath = '/folders/';
394
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
395
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
396
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
397
+ "application/json"
398
+ ]);
399
+ requestContext.setHeaderParam("Content-Type", contentType);
400
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "CreateFolderData", ""), contentType);
401
+ requestContext.setBody(serializedBody);
402
+ authMethod = _config.authMethods["api_token_basic"];
403
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
404
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
405
+ case 1:
406
+ _d.sent();
407
+ _d.label = 2;
408
+ case 2:
409
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
410
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
411
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
412
+ case 3:
413
+ _d.sent();
414
+ _d.label = 4;
415
+ case 4: return [2, requestContext];
416
+ }
417
+ });
418
+ });
419
+ };
420
+ PDFApiRequestFactory.prototype.createHTMLTemplate = function (data, _options) {
421
+ var _a, _b, _c;
422
+ return __awaiter(this, void 0, void 0, function () {
423
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
424
+ return __generator(this, function (_d) {
425
+ switch (_d.label) {
426
+ case 0:
427
+ _config = _options || this.configuration;
428
+ if (data === null || data === undefined) {
429
+ throw new baseapi_1.RequiredError("PDFApi", "createHTMLTemplate", "data");
430
+ }
431
+ localVarPath = '/templates?endpoint_description=html';
432
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
433
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
434
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
435
+ "application/json"
436
+ ]);
437
+ requestContext.setHeaderParam("Content-Type", contentType);
438
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "CreateHtmlTemplate", ""), contentType);
439
+ requestContext.setBody(serializedBody);
440
+ authMethod = _config.authMethods["api_token_basic"];
441
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
442
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
443
+ case 1:
444
+ _d.sent();
445
+ _d.label = 2;
446
+ case 2:
447
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
448
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
449
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
450
+ case 3:
451
+ _d.sent();
452
+ _d.label = 4;
453
+ case 4: return [2, requestContext];
454
+ }
455
+ });
456
+ });
457
+ };
458
+ PDFApiRequestFactory.prototype.createPDFTemplate = function (templateDocument, templateName, wait, templateDescription, templateParentFolderId, _options) {
459
+ var _a, _b, _c;
460
+ return __awaiter(this, void 0, void 0, function () {
461
+ var _config, localVarPath, requestContext, useForm, localVarFormParams, contentType, authMethod, defaultAuth;
462
+ return __generator(this, function (_d) {
463
+ switch (_d.label) {
464
+ case 0:
465
+ _config = _options || this.configuration;
466
+ if (templateDocument === null || templateDocument === undefined) {
467
+ throw new baseapi_1.RequiredError("PDFApi", "createPDFTemplate", "templateDocument");
468
+ }
469
+ if (templateName === null || templateName === undefined) {
470
+ throw new baseapi_1.RequiredError("PDFApi", "createPDFTemplate", "templateName");
471
+ }
472
+ localVarPath = '/templates';
473
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
474
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
475
+ if (wait !== undefined) {
476
+ requestContext.setQueryParam("wait", ObjectSerializer_1.ObjectSerializer.serialize(wait, "boolean", ""));
477
+ }
478
+ useForm = (0, util_1.canConsumeForm)([
479
+ 'multipart/form-data',
480
+ ]);
481
+ if (useForm) {
482
+ localVarFormParams = new FormData();
483
+ }
484
+ else {
485
+ localVarFormParams = new URLSearchParams();
486
+ }
487
+ if (templateDocument !== undefined) {
488
+ if (localVarFormParams instanceof FormData) {
489
+ localVarFormParams.append('template[document]', templateDocument, templateDocument.name);
490
+ }
491
+ }
492
+ if (templateName !== undefined) {
493
+ localVarFormParams.append('template[name]', templateName);
494
+ }
495
+ if (templateDescription !== undefined) {
496
+ localVarFormParams.append('template[description]', templateDescription);
497
+ }
498
+ if (templateParentFolderId !== undefined) {
499
+ localVarFormParams.append('template[parent_folder_id]', templateParentFolderId);
500
+ }
501
+ requestContext.setBody(localVarFormParams);
502
+ if (!useForm) {
503
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
504
+ "multipart/form-data"
505
+ ]);
506
+ requestContext.setHeaderParam("Content-Type", contentType);
507
+ }
508
+ authMethod = _config.authMethods["api_token_basic"];
509
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
510
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
511
+ case 1:
512
+ _d.sent();
513
+ _d.label = 2;
514
+ case 2:
515
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
516
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
517
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
518
+ case 3:
519
+ _d.sent();
520
+ _d.label = 4;
521
+ case 4: return [2, requestContext];
522
+ }
523
+ });
524
+ });
525
+ };
526
+ PDFApiRequestFactory.prototype.createPDFTemplateFromUpload = function (data, _options) {
527
+ var _a, _b, _c;
528
+ return __awaiter(this, void 0, void 0, function () {
529
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
530
+ return __generator(this, function (_d) {
531
+ switch (_d.label) {
532
+ case 0:
533
+ _config = _options || this.configuration;
534
+ if (data === null || data === undefined) {
535
+ throw new baseapi_1.RequiredError("PDFApi", "createPDFTemplateFromUpload", "data");
536
+ }
537
+ localVarPath = '/templates?endpoint_description=cached_upload';
538
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
539
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
540
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
541
+ "application/json"
542
+ ]);
543
+ requestContext.setHeaderParam("Content-Type", contentType);
544
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "CreatePdfTemplate", ""), contentType);
545
+ requestContext.setBody(serializedBody);
546
+ authMethod = _config.authMethods["api_token_basic"];
547
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
548
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
549
+ case 1:
550
+ _d.sent();
551
+ _d.label = 2;
552
+ case 2:
553
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
554
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
555
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
556
+ case 3:
557
+ _d.sent();
558
+ _d.label = 4;
559
+ case 4: return [2, requestContext];
560
+ }
561
+ });
562
+ });
563
+ };
564
+ PDFApiRequestFactory.prototype.deleteFolder = function (folderId, _options) {
565
+ var _a, _b, _c;
566
+ return __awaiter(this, void 0, void 0, function () {
567
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
568
+ return __generator(this, function (_d) {
569
+ switch (_d.label) {
570
+ case 0:
571
+ _config = _options || this.configuration;
572
+ if (folderId === null || folderId === undefined) {
573
+ throw new baseapi_1.RequiredError("PDFApi", "deleteFolder", "folderId");
574
+ }
575
+ localVarPath = '/folders/{folder_id}'
576
+ .replace('{' + 'folder_id' + '}', encodeURIComponent(String(folderId)));
577
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
578
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
579
+ authMethod = _config.authMethods["api_token_basic"];
580
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
581
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
582
+ case 1:
583
+ _d.sent();
584
+ _d.label = 2;
585
+ case 2:
586
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
587
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
588
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
589
+ case 3:
590
+ _d.sent();
591
+ _d.label = 4;
592
+ case 4: return [2, requestContext];
593
+ }
594
+ });
595
+ });
596
+ };
597
+ PDFApiRequestFactory.prototype.deleteTemplate = function (templateId, _options) {
598
+ var _a, _b, _c;
599
+ return __awaiter(this, void 0, void 0, function () {
600
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
601
+ return __generator(this, function (_d) {
602
+ switch (_d.label) {
603
+ case 0:
604
+ _config = _options || this.configuration;
605
+ if (templateId === null || templateId === undefined) {
606
+ throw new baseapi_1.RequiredError("PDFApi", "deleteTemplate", "templateId");
607
+ }
608
+ localVarPath = '/templates/{template_id}'
609
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
610
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
611
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
612
+ authMethod = _config.authMethods["api_token_basic"];
613
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
614
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
615
+ case 1:
616
+ _d.sent();
617
+ _d.label = 2;
618
+ case 2:
619
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
620
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
621
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
622
+ case 3:
623
+ _d.sent();
624
+ _d.label = 4;
625
+ case 4: return [2, requestContext];
626
+ }
627
+ });
628
+ });
629
+ };
630
+ PDFApiRequestFactory.prototype.expireCombinedSubmission = function (combinedSubmissionId, _options) {
631
+ var _a, _b, _c;
632
+ return __awaiter(this, void 0, void 0, function () {
633
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
634
+ return __generator(this, function (_d) {
635
+ switch (_d.label) {
636
+ case 0:
637
+ _config = _options || this.configuration;
638
+ if (combinedSubmissionId === null || combinedSubmissionId === undefined) {
639
+ throw new baseapi_1.RequiredError("PDFApi", "expireCombinedSubmission", "combinedSubmissionId");
640
+ }
641
+ localVarPath = '/combined_submissions/{combined_submission_id}'
642
+ .replace('{' + 'combined_submission_id' + '}', encodeURIComponent(String(combinedSubmissionId)));
643
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
644
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
645
+ authMethod = _config.authMethods["api_token_basic"];
646
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
647
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
648
+ case 1:
649
+ _d.sent();
650
+ _d.label = 2;
651
+ case 2:
652
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
653
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
654
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
655
+ case 3:
656
+ _d.sent();
657
+ _d.label = 4;
658
+ case 4: return [2, requestContext];
659
+ }
660
+ });
661
+ });
662
+ };
663
+ PDFApiRequestFactory.prototype.expireSubmission = function (submissionId, _options) {
664
+ var _a, _b, _c;
665
+ return __awaiter(this, void 0, void 0, function () {
666
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
667
+ return __generator(this, function (_d) {
668
+ switch (_d.label) {
669
+ case 0:
670
+ _config = _options || this.configuration;
671
+ if (submissionId === null || submissionId === undefined) {
672
+ throw new baseapi_1.RequiredError("PDFApi", "expireSubmission", "submissionId");
673
+ }
674
+ localVarPath = '/submissions/{submission_id}'
675
+ .replace('{' + 'submission_id' + '}', encodeURIComponent(String(submissionId)));
676
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
677
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
678
+ authMethod = _config.authMethods["api_token_basic"];
679
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
680
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
681
+ case 1:
682
+ _d.sent();
683
+ _d.label = 2;
684
+ case 2:
685
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
686
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
687
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
688
+ case 3:
689
+ _d.sent();
690
+ _d.label = 4;
691
+ case 4: return [2, requestContext];
692
+ }
693
+ });
694
+ });
695
+ };
696
+ PDFApiRequestFactory.prototype.generatePdf = function (templateId, submission, wait, _options) {
697
+ var _a, _b, _c;
698
+ return __awaiter(this, void 0, void 0, function () {
699
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
700
+ return __generator(this, function (_d) {
701
+ switch (_d.label) {
702
+ case 0:
703
+ _config = _options || this.configuration;
704
+ if (templateId === null || templateId === undefined) {
705
+ throw new baseapi_1.RequiredError("PDFApi", "generatePdf", "templateId");
706
+ }
707
+ if (submission === null || submission === undefined) {
708
+ throw new baseapi_1.RequiredError("PDFApi", "generatePdf", "submission");
709
+ }
710
+ localVarPath = '/templates/{template_id}/submissions'
711
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
712
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
713
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
714
+ if (wait !== undefined) {
715
+ requestContext.setQueryParam("wait", ObjectSerializer_1.ObjectSerializer.serialize(wait, "boolean", ""));
716
+ }
717
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
718
+ "application/json"
719
+ ]);
720
+ requestContext.setHeaderParam("Content-Type", contentType);
721
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(submission, "CreatePdfSubmissionData", ""), contentType);
722
+ requestContext.setBody(serializedBody);
723
+ authMethod = _config.authMethods["api_token_basic"];
724
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
725
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
726
+ case 1:
727
+ _d.sent();
728
+ _d.label = 2;
729
+ case 2:
730
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
731
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
732
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
733
+ case 3:
734
+ _d.sent();
735
+ _d.label = 4;
736
+ case 4: return [2, requestContext];
737
+ }
738
+ });
739
+ });
740
+ };
741
+ PDFApiRequestFactory.prototype.generatePdfForHtmlTemplate = function (templateId, submission, wait, _options) {
742
+ var _a, _b, _c;
743
+ return __awaiter(this, void 0, void 0, function () {
744
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
745
+ return __generator(this, function (_d) {
746
+ switch (_d.label) {
747
+ case 0:
748
+ _config = _options || this.configuration;
749
+ if (templateId === null || templateId === undefined) {
750
+ throw new baseapi_1.RequiredError("PDFApi", "generatePdfForHtmlTemplate", "templateId");
751
+ }
752
+ if (submission === null || submission === undefined) {
753
+ throw new baseapi_1.RequiredError("PDFApi", "generatePdfForHtmlTemplate", "submission");
754
+ }
755
+ localVarPath = '/templates/{template_id}/submissions?endpoint_description=html_templates'
756
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
757
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
758
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
759
+ if (wait !== undefined) {
760
+ requestContext.setQueryParam("wait", ObjectSerializer_1.ObjectSerializer.serialize(wait, "boolean", ""));
761
+ }
762
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
763
+ "application/json"
764
+ ]);
765
+ requestContext.setHeaderParam("Content-Type", contentType);
766
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(submission, "CreateHtmlSubmissionData", ""), contentType);
767
+ requestContext.setBody(serializedBody);
768
+ authMethod = _config.authMethods["api_token_basic"];
769
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
770
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
771
+ case 1:
772
+ _d.sent();
773
+ _d.label = 2;
774
+ case 2:
775
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
776
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
777
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
778
+ case 3:
779
+ _d.sent();
780
+ _d.label = 4;
781
+ case 4: return [2, requestContext];
782
+ }
783
+ });
784
+ });
785
+ };
786
+ PDFApiRequestFactory.prototype.generatePreview = function (submissionId, _options) {
787
+ var _a, _b, _c;
788
+ return __awaiter(this, void 0, void 0, function () {
789
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
790
+ return __generator(this, function (_d) {
791
+ switch (_d.label) {
792
+ case 0:
793
+ _config = _options || this.configuration;
794
+ if (submissionId === null || submissionId === undefined) {
795
+ throw new baseapi_1.RequiredError("PDFApi", "generatePreview", "submissionId");
796
+ }
797
+ localVarPath = '/submissions/{submission_id}/generate_preview'
798
+ .replace('{' + 'submission_id' + '}', encodeURIComponent(String(submissionId)));
799
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
800
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
801
+ authMethod = _config.authMethods["api_token_basic"];
802
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
803
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
804
+ case 1:
805
+ _d.sent();
806
+ _d.label = 2;
807
+ case 2:
808
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
809
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
810
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
811
+ case 3:
812
+ _d.sent();
813
+ _d.label = 4;
814
+ case 4: return [2, requestContext];
815
+ }
816
+ });
817
+ });
818
+ };
819
+ PDFApiRequestFactory.prototype.getCombinedSubmission = function (combinedSubmissionId, _options) {
820
+ var _a, _b, _c;
821
+ return __awaiter(this, void 0, void 0, function () {
822
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
823
+ return __generator(this, function (_d) {
824
+ switch (_d.label) {
825
+ case 0:
826
+ _config = _options || this.configuration;
827
+ if (combinedSubmissionId === null || combinedSubmissionId === undefined) {
828
+ throw new baseapi_1.RequiredError("PDFApi", "getCombinedSubmission", "combinedSubmissionId");
829
+ }
830
+ localVarPath = '/combined_submissions/{combined_submission_id}'
831
+ .replace('{' + 'combined_submission_id' + '}', encodeURIComponent(String(combinedSubmissionId)));
832
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
833
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
834
+ authMethod = _config.authMethods["api_token_basic"];
835
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
836
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
837
+ case 1:
838
+ _d.sent();
839
+ _d.label = 2;
840
+ case 2:
841
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
842
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
843
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
844
+ case 3:
845
+ _d.sent();
846
+ _d.label = 4;
847
+ case 4: return [2, requestContext];
848
+ }
849
+ });
850
+ });
851
+ };
852
+ PDFApiRequestFactory.prototype.getDataRequest = function (dataRequestId, _options) {
853
+ var _a, _b, _c;
854
+ return __awaiter(this, void 0, void 0, function () {
855
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
856
+ return __generator(this, function (_d) {
857
+ switch (_d.label) {
858
+ case 0:
859
+ _config = _options || this.configuration;
860
+ if (dataRequestId === null || dataRequestId === undefined) {
861
+ throw new baseapi_1.RequiredError("PDFApi", "getDataRequest", "dataRequestId");
862
+ }
863
+ localVarPath = '/data_requests/{data_request_id}'
864
+ .replace('{' + 'data_request_id' + '}', encodeURIComponent(String(dataRequestId)));
865
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
866
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
867
+ authMethod = _config.authMethods["api_token_basic"];
868
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
869
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
870
+ case 1:
871
+ _d.sent();
872
+ _d.label = 2;
873
+ case 2:
874
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
875
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
876
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
877
+ case 3:
878
+ _d.sent();
879
+ _d.label = 4;
880
+ case 4: return [2, requestContext];
881
+ }
882
+ });
883
+ });
884
+ };
885
+ PDFApiRequestFactory.prototype.getFullTemplate = function (templateId, _options) {
886
+ var _a, _b, _c;
887
+ return __awaiter(this, void 0, void 0, function () {
888
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
889
+ return __generator(this, function (_d) {
890
+ switch (_d.label) {
891
+ case 0:
892
+ _config = _options || this.configuration;
893
+ if (templateId === null || templateId === undefined) {
894
+ throw new baseapi_1.RequiredError("PDFApi", "getFullTemplate", "templateId");
895
+ }
896
+ localVarPath = '/templates/{template_id}?full=true'
897
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
898
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
899
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
900
+ authMethod = _config.authMethods["api_token_basic"];
901
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
902
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
903
+ case 1:
904
+ _d.sent();
905
+ _d.label = 2;
906
+ case 2:
907
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
908
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
909
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
910
+ case 3:
911
+ _d.sent();
912
+ _d.label = 4;
913
+ case 4: return [2, requestContext];
914
+ }
915
+ });
916
+ });
917
+ };
918
+ PDFApiRequestFactory.prototype.getPresignUrl = function (_options) {
919
+ var _a, _b, _c;
920
+ return __awaiter(this, void 0, void 0, function () {
921
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
922
+ return __generator(this, function (_d) {
923
+ switch (_d.label) {
924
+ case 0:
925
+ _config = _options || this.configuration;
926
+ localVarPath = '/uploads/presign';
927
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
928
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
929
+ authMethod = _config.authMethods["api_token_basic"];
930
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
931
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
932
+ case 1:
933
+ _d.sent();
934
+ _d.label = 2;
935
+ case 2:
936
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
937
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
938
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
939
+ case 3:
940
+ _d.sent();
941
+ _d.label = 4;
942
+ case 4: return [2, requestContext];
943
+ }
944
+ });
945
+ });
946
+ };
947
+ PDFApiRequestFactory.prototype.getSubmission = function (submissionId, includeData, _options) {
948
+ var _a, _b, _c;
949
+ return __awaiter(this, void 0, void 0, function () {
950
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
951
+ return __generator(this, function (_d) {
952
+ switch (_d.label) {
953
+ case 0:
954
+ _config = _options || this.configuration;
955
+ if (submissionId === null || submissionId === undefined) {
956
+ throw new baseapi_1.RequiredError("PDFApi", "getSubmission", "submissionId");
957
+ }
958
+ localVarPath = '/submissions/{submission_id}'
959
+ .replace('{' + 'submission_id' + '}', encodeURIComponent(String(submissionId)));
960
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
961
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
962
+ if (includeData !== undefined) {
963
+ requestContext.setQueryParam("include_data", ObjectSerializer_1.ObjectSerializer.serialize(includeData, "boolean", ""));
964
+ }
965
+ authMethod = _config.authMethods["api_token_basic"];
966
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
967
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
968
+ case 1:
969
+ _d.sent();
970
+ _d.label = 2;
971
+ case 2:
972
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
973
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
974
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
975
+ case 3:
976
+ _d.sent();
977
+ _d.label = 4;
978
+ case 4: return [2, requestContext];
979
+ }
980
+ });
981
+ });
982
+ };
983
+ PDFApiRequestFactory.prototype.getSubmissionBatch = function (submissionBatchId, includeSubmissions, _options) {
984
+ var _a, _b, _c;
985
+ return __awaiter(this, void 0, void 0, function () {
986
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
987
+ return __generator(this, function (_d) {
988
+ switch (_d.label) {
989
+ case 0:
990
+ _config = _options || this.configuration;
991
+ if (submissionBatchId === null || submissionBatchId === undefined) {
992
+ throw new baseapi_1.RequiredError("PDFApi", "getSubmissionBatch", "submissionBatchId");
993
+ }
994
+ localVarPath = '/submissions/batches/{submission_batch_id}'
995
+ .replace('{' + 'submission_batch_id' + '}', encodeURIComponent(String(submissionBatchId)));
996
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
997
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
998
+ if (includeSubmissions !== undefined) {
999
+ requestContext.setQueryParam("include_submissions", ObjectSerializer_1.ObjectSerializer.serialize(includeSubmissions, "boolean", ""));
1000
+ }
1001
+ authMethod = _config.authMethods["api_token_basic"];
1002
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1003
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1004
+ case 1:
1005
+ _d.sent();
1006
+ _d.label = 2;
1007
+ case 2:
1008
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1009
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1010
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1011
+ case 3:
1012
+ _d.sent();
1013
+ _d.label = 4;
1014
+ case 4: return [2, requestContext];
1015
+ }
1016
+ });
1017
+ });
1018
+ };
1019
+ PDFApiRequestFactory.prototype.getTemplate = function (templateId, _options) {
1020
+ var _a, _b, _c;
1021
+ return __awaiter(this, void 0, void 0, function () {
1022
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
1023
+ return __generator(this, function (_d) {
1024
+ switch (_d.label) {
1025
+ case 0:
1026
+ _config = _options || this.configuration;
1027
+ if (templateId === null || templateId === undefined) {
1028
+ throw new baseapi_1.RequiredError("PDFApi", "getTemplate", "templateId");
1029
+ }
1030
+ localVarPath = '/templates/{template_id}'
1031
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1032
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1033
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1034
+ authMethod = _config.authMethods["api_token_basic"];
1035
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1036
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1037
+ case 1:
1038
+ _d.sent();
1039
+ _d.label = 2;
1040
+ case 2:
1041
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1042
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1043
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1044
+ case 3:
1045
+ _d.sent();
1046
+ _d.label = 4;
1047
+ case 4: return [2, requestContext];
1048
+ }
1049
+ });
1050
+ });
1051
+ };
1052
+ PDFApiRequestFactory.prototype.getTemplateSchema = function (templateId, _options) {
1053
+ var _a, _b, _c;
1054
+ return __awaiter(this, void 0, void 0, function () {
1055
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
1056
+ return __generator(this, function (_d) {
1057
+ switch (_d.label) {
1058
+ case 0:
1059
+ _config = _options || this.configuration;
1060
+ if (templateId === null || templateId === undefined) {
1061
+ throw new baseapi_1.RequiredError("PDFApi", "getTemplateSchema", "templateId");
1062
+ }
1063
+ localVarPath = '/templates/{template_id}/schema'
1064
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1065
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1066
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1067
+ authMethod = _config.authMethods["api_token_basic"];
1068
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1069
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1070
+ case 1:
1071
+ _d.sent();
1072
+ _d.label = 2;
1073
+ case 2:
1074
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1075
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1076
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1077
+ case 3:
1078
+ _d.sent();
1079
+ _d.label = 4;
1080
+ case 4: return [2, requestContext];
1081
+ }
1082
+ });
1083
+ });
1084
+ };
1085
+ PDFApiRequestFactory.prototype.listCombinedSubmissions = function (page, perPage, _options) {
1086
+ var _a, _b, _c;
1087
+ return __awaiter(this, void 0, void 0, function () {
1088
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
1089
+ return __generator(this, function (_d) {
1090
+ switch (_d.label) {
1091
+ case 0:
1092
+ _config = _options || this.configuration;
1093
+ localVarPath = '/combined_submissions';
1094
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1095
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1096
+ if (page !== undefined) {
1097
+ requestContext.setQueryParam("page", ObjectSerializer_1.ObjectSerializer.serialize(page, "number", ""));
1098
+ }
1099
+ if (perPage !== undefined) {
1100
+ requestContext.setQueryParam("per_page", ObjectSerializer_1.ObjectSerializer.serialize(perPage, "number", ""));
1101
+ }
1102
+ authMethod = _config.authMethods["api_token_basic"];
1103
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1104
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1105
+ case 1:
1106
+ _d.sent();
1107
+ _d.label = 2;
1108
+ case 2:
1109
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1110
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1111
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1112
+ case 3:
1113
+ _d.sent();
1114
+ _d.label = 4;
1115
+ case 4: return [2, requestContext];
1116
+ }
1117
+ });
1118
+ });
1119
+ };
1120
+ PDFApiRequestFactory.prototype.listFolders = function (parentFolderId, _options) {
1121
+ var _a, _b, _c;
1122
+ return __awaiter(this, void 0, void 0, function () {
1123
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
1124
+ return __generator(this, function (_d) {
1125
+ switch (_d.label) {
1126
+ case 0:
1127
+ _config = _options || this.configuration;
1128
+ localVarPath = '/folders/';
1129
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1130
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1131
+ if (parentFolderId !== undefined) {
1132
+ requestContext.setQueryParam("parent_folder_id", ObjectSerializer_1.ObjectSerializer.serialize(parentFolderId, "string", ""));
1133
+ }
1134
+ authMethod = _config.authMethods["api_token_basic"];
1135
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1136
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1137
+ case 1:
1138
+ _d.sent();
1139
+ _d.label = 2;
1140
+ case 2:
1141
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1142
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1143
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1144
+ case 3:
1145
+ _d.sent();
1146
+ _d.label = 4;
1147
+ case 4: return [2, requestContext];
1148
+ }
1149
+ });
1150
+ });
1151
+ };
1152
+ PDFApiRequestFactory.prototype.listSubmissions = function (cursor, limit, createdAfter, createdBefore, type, includeData, _options) {
1153
+ var _a, _b, _c;
1154
+ return __awaiter(this, void 0, void 0, function () {
1155
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
1156
+ return __generator(this, function (_d) {
1157
+ switch (_d.label) {
1158
+ case 0:
1159
+ _config = _options || this.configuration;
1160
+ localVarPath = '/submissions';
1161
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1162
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1163
+ if (cursor !== undefined) {
1164
+ requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
1165
+ }
1166
+ if (limit !== undefined) {
1167
+ requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
1168
+ }
1169
+ if (createdAfter !== undefined) {
1170
+ requestContext.setQueryParam("created_after", ObjectSerializer_1.ObjectSerializer.serialize(createdAfter, "string", ""));
1171
+ }
1172
+ if (createdBefore !== undefined) {
1173
+ requestContext.setQueryParam("created_before", ObjectSerializer_1.ObjectSerializer.serialize(createdBefore, "string", ""));
1174
+ }
1175
+ if (type !== undefined) {
1176
+ requestContext.setQueryParam("type", ObjectSerializer_1.ObjectSerializer.serialize(type, "string", ""));
1177
+ }
1178
+ if (includeData !== undefined) {
1179
+ requestContext.setQueryParam("include_data", ObjectSerializer_1.ObjectSerializer.serialize(includeData, "boolean", ""));
1180
+ }
1181
+ authMethod = _config.authMethods["api_token_basic"];
1182
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1183
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1184
+ case 1:
1185
+ _d.sent();
1186
+ _d.label = 2;
1187
+ case 2:
1188
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1189
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1190
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1191
+ case 3:
1192
+ _d.sent();
1193
+ _d.label = 4;
1194
+ case 4: return [2, requestContext];
1195
+ }
1196
+ });
1197
+ });
1198
+ };
1199
+ PDFApiRequestFactory.prototype.listTemplateSubmissions = function (templateId, cursor, limit, createdAfter, createdBefore, type, includeData, _options) {
1200
+ var _a, _b, _c;
1201
+ return __awaiter(this, void 0, void 0, function () {
1202
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
1203
+ return __generator(this, function (_d) {
1204
+ switch (_d.label) {
1205
+ case 0:
1206
+ _config = _options || this.configuration;
1207
+ if (templateId === null || templateId === undefined) {
1208
+ throw new baseapi_1.RequiredError("PDFApi", "listTemplateSubmissions", "templateId");
1209
+ }
1210
+ localVarPath = '/templates/{template_id}/submissions'
1211
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1212
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1213
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1214
+ if (cursor !== undefined) {
1215
+ requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
1216
+ }
1217
+ if (limit !== undefined) {
1218
+ requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
1219
+ }
1220
+ if (createdAfter !== undefined) {
1221
+ requestContext.setQueryParam("created_after", ObjectSerializer_1.ObjectSerializer.serialize(createdAfter, "string", ""));
1222
+ }
1223
+ if (createdBefore !== undefined) {
1224
+ requestContext.setQueryParam("created_before", ObjectSerializer_1.ObjectSerializer.serialize(createdBefore, "string", ""));
1225
+ }
1226
+ if (type !== undefined) {
1227
+ requestContext.setQueryParam("type", ObjectSerializer_1.ObjectSerializer.serialize(type, "string", ""));
1228
+ }
1229
+ if (includeData !== undefined) {
1230
+ requestContext.setQueryParam("include_data", ObjectSerializer_1.ObjectSerializer.serialize(includeData, "boolean", ""));
1231
+ }
1232
+ authMethod = _config.authMethods["api_token_basic"];
1233
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1234
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1235
+ case 1:
1236
+ _d.sent();
1237
+ _d.label = 2;
1238
+ case 2:
1239
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1240
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1241
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1242
+ case 3:
1243
+ _d.sent();
1244
+ _d.label = 4;
1245
+ case 4: return [2, requestContext];
1246
+ }
1247
+ });
1248
+ });
1249
+ };
1250
+ PDFApiRequestFactory.prototype.listTemplates = function (query, parentFolderId, page, perPage, _options) {
1251
+ var _a, _b, _c;
1252
+ return __awaiter(this, void 0, void 0, function () {
1253
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
1254
+ return __generator(this, function (_d) {
1255
+ switch (_d.label) {
1256
+ case 0:
1257
+ _config = _options || this.configuration;
1258
+ localVarPath = '/templates';
1259
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1260
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1261
+ if (query !== undefined) {
1262
+ requestContext.setQueryParam("query", ObjectSerializer_1.ObjectSerializer.serialize(query, "string", ""));
1263
+ }
1264
+ if (parentFolderId !== undefined) {
1265
+ requestContext.setQueryParam("parent_folder_id", ObjectSerializer_1.ObjectSerializer.serialize(parentFolderId, "string", ""));
1266
+ }
1267
+ if (page !== undefined) {
1268
+ requestContext.setQueryParam("page", ObjectSerializer_1.ObjectSerializer.serialize(page, "number", ""));
1269
+ }
1270
+ if (perPage !== undefined) {
1271
+ requestContext.setQueryParam("per_page", ObjectSerializer_1.ObjectSerializer.serialize(perPage, "number", ""));
1272
+ }
1273
+ authMethod = _config.authMethods["api_token_basic"];
1274
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1275
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1276
+ case 1:
1277
+ _d.sent();
1278
+ _d.label = 2;
1279
+ case 2:
1280
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1281
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1282
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1283
+ case 3:
1284
+ _d.sent();
1285
+ _d.label = 4;
1286
+ case 4: return [2, requestContext];
1287
+ }
1288
+ });
1289
+ });
1290
+ };
1291
+ PDFApiRequestFactory.prototype.moveFolderToFolder = function (folderId, data, _options) {
1292
+ var _a, _b, _c;
1293
+ return __awaiter(this, void 0, void 0, function () {
1294
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
1295
+ return __generator(this, function (_d) {
1296
+ switch (_d.label) {
1297
+ case 0:
1298
+ _config = _options || this.configuration;
1299
+ if (folderId === null || folderId === undefined) {
1300
+ throw new baseapi_1.RequiredError("PDFApi", "moveFolderToFolder", "folderId");
1301
+ }
1302
+ if (data === null || data === undefined) {
1303
+ throw new baseapi_1.RequiredError("PDFApi", "moveFolderToFolder", "data");
1304
+ }
1305
+ localVarPath = '/folders/{folder_id}/move'
1306
+ .replace('{' + 'folder_id' + '}', encodeURIComponent(String(folderId)));
1307
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1308
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1309
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1310
+ "application/json"
1311
+ ]);
1312
+ requestContext.setHeaderParam("Content-Type", contentType);
1313
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "MoveFolderData", ""), contentType);
1314
+ requestContext.setBody(serializedBody);
1315
+ authMethod = _config.authMethods["api_token_basic"];
1316
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1317
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1318
+ case 1:
1319
+ _d.sent();
1320
+ _d.label = 2;
1321
+ case 2:
1322
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1323
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1324
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1325
+ case 3:
1326
+ _d.sent();
1327
+ _d.label = 4;
1328
+ case 4: return [2, requestContext];
1329
+ }
1330
+ });
1331
+ });
1332
+ };
1333
+ PDFApiRequestFactory.prototype.moveTemplateToFolder = function (templateId, data, _options) {
1334
+ var _a, _b, _c;
1335
+ return __awaiter(this, void 0, void 0, function () {
1336
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
1337
+ return __generator(this, function (_d) {
1338
+ switch (_d.label) {
1339
+ case 0:
1340
+ _config = _options || this.configuration;
1341
+ if (templateId === null || templateId === undefined) {
1342
+ throw new baseapi_1.RequiredError("PDFApi", "moveTemplateToFolder", "templateId");
1343
+ }
1344
+ if (data === null || data === undefined) {
1345
+ throw new baseapi_1.RequiredError("PDFApi", "moveTemplateToFolder", "data");
1346
+ }
1347
+ localVarPath = '/templates/{template_id}/move'
1348
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1349
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1350
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1351
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1352
+ "application/json"
1353
+ ]);
1354
+ requestContext.setHeaderParam("Content-Type", contentType);
1355
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "MoveTemplateData", ""), contentType);
1356
+ requestContext.setBody(serializedBody);
1357
+ authMethod = _config.authMethods["api_token_basic"];
1358
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1359
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1360
+ case 1:
1361
+ _d.sent();
1362
+ _d.label = 2;
1363
+ case 2:
1364
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1365
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1366
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1367
+ case 3:
1368
+ _d.sent();
1369
+ _d.label = 4;
1370
+ case 4: return [2, requestContext];
1371
+ }
1372
+ });
1373
+ });
1374
+ };
1375
+ PDFApiRequestFactory.prototype.renameFolder = function (folderId, data, _options) {
1376
+ var _a, _b, _c;
1377
+ return __awaiter(this, void 0, void 0, function () {
1378
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
1379
+ return __generator(this, function (_d) {
1380
+ switch (_d.label) {
1381
+ case 0:
1382
+ _config = _options || this.configuration;
1383
+ if (folderId === null || folderId === undefined) {
1384
+ throw new baseapi_1.RequiredError("PDFApi", "renameFolder", "folderId");
1385
+ }
1386
+ if (data === null || data === undefined) {
1387
+ throw new baseapi_1.RequiredError("PDFApi", "renameFolder", "data");
1388
+ }
1389
+ localVarPath = '/folders/{folder_id}/rename'
1390
+ .replace('{' + 'folder_id' + '}', encodeURIComponent(String(folderId)));
1391
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1392
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1393
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1394
+ "application/json"
1395
+ ]);
1396
+ requestContext.setHeaderParam("Content-Type", contentType);
1397
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "RenameFolderData", ""), contentType);
1398
+ requestContext.setBody(serializedBody);
1399
+ authMethod = _config.authMethods["api_token_basic"];
1400
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1401
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1402
+ case 1:
1403
+ _d.sent();
1404
+ _d.label = 2;
1405
+ case 2:
1406
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1407
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1408
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1409
+ case 3:
1410
+ _d.sent();
1411
+ _d.label = 4;
1412
+ case 4: return [2, requestContext];
1413
+ }
1414
+ });
1415
+ });
1416
+ };
1417
+ PDFApiRequestFactory.prototype.testAuthentication = function (_options) {
1418
+ var _a, _b, _c;
1419
+ return __awaiter(this, void 0, void 0, function () {
1420
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
1421
+ return __generator(this, function (_d) {
1422
+ switch (_d.label) {
1423
+ case 0:
1424
+ _config = _options || this.configuration;
1425
+ localVarPath = '/authentication';
1426
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1427
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1428
+ authMethod = _config.authMethods["api_token_basic"];
1429
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1430
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1431
+ case 1:
1432
+ _d.sent();
1433
+ _d.label = 2;
1434
+ case 2:
1435
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1436
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1437
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1438
+ case 3:
1439
+ _d.sent();
1440
+ _d.label = 4;
1441
+ case 4: return [2, requestContext];
1442
+ }
1443
+ });
1444
+ });
1445
+ };
1446
+ PDFApiRequestFactory.prototype.updateDataRequest = function (dataRequestId, data, _options) {
1447
+ var _a, _b, _c;
1448
+ return __awaiter(this, void 0, void 0, function () {
1449
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
1450
+ return __generator(this, function (_d) {
1451
+ switch (_d.label) {
1452
+ case 0:
1453
+ _config = _options || this.configuration;
1454
+ if (dataRequestId === null || dataRequestId === undefined) {
1455
+ throw new baseapi_1.RequiredError("PDFApi", "updateDataRequest", "dataRequestId");
1456
+ }
1457
+ if (data === null || data === undefined) {
1458
+ throw new baseapi_1.RequiredError("PDFApi", "updateDataRequest", "data");
1459
+ }
1460
+ localVarPath = '/data_requests/{data_request_id}'
1461
+ .replace('{' + 'data_request_id' + '}', encodeURIComponent(String(dataRequestId)));
1462
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
1463
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1464
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1465
+ "application/json"
1466
+ ]);
1467
+ requestContext.setHeaderParam("Content-Type", contentType);
1468
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "UpdateSubmissionDataRequestData", ""), contentType);
1469
+ requestContext.setBody(serializedBody);
1470
+ authMethod = _config.authMethods["api_token_basic"];
1471
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1472
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1473
+ case 1:
1474
+ _d.sent();
1475
+ _d.label = 2;
1476
+ case 2:
1477
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1478
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1479
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1480
+ case 3:
1481
+ _d.sent();
1482
+ _d.label = 4;
1483
+ case 4: return [2, requestContext];
1484
+ }
1485
+ });
1486
+ });
1487
+ };
1488
+ PDFApiRequestFactory.prototype.updateTemplate = function (templateId, data, _options) {
1489
+ var _a, _b, _c;
1490
+ return __awaiter(this, void 0, void 0, function () {
1491
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
1492
+ return __generator(this, function (_d) {
1493
+ switch (_d.label) {
1494
+ case 0:
1495
+ _config = _options || this.configuration;
1496
+ if (templateId === null || templateId === undefined) {
1497
+ throw new baseapi_1.RequiredError("PDFApi", "updateTemplate", "templateId");
1498
+ }
1499
+ if (data === null || data === undefined) {
1500
+ throw new baseapi_1.RequiredError("PDFApi", "updateTemplate", "data");
1501
+ }
1502
+ localVarPath = '/templates/{template_id}'
1503
+ .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1504
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
1505
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1506
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1507
+ "application/json"
1508
+ ]);
1509
+ requestContext.setHeaderParam("Content-Type", contentType);
1510
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "UpdateHtmlTemplate", ""), contentType);
1511
+ requestContext.setBody(serializedBody);
1512
+ authMethod = _config.authMethods["api_token_basic"];
1513
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1514
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
1515
+ case 1:
1516
+ _d.sent();
1517
+ _d.label = 2;
1518
+ case 2:
1519
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
1520
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
1521
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
1522
+ case 3:
1523
+ _d.sent();
1524
+ _d.label = 4;
1525
+ case 4: return [2, requestContext];
1526
+ }
1527
+ });
1528
+ });
1529
+ };
1530
+ return PDFApiRequestFactory;
1531
+ }(baseapi_1.BaseAPIRequestFactory));
1532
+ exports.PDFApiRequestFactory = PDFApiRequestFactory;
1533
+ var PDFApiResponseProcessor = (function () {
1534
+ function PDFApiResponseProcessor() {
1535
+ }
1536
+ PDFApiResponseProcessor.prototype.addFieldsToTemplateWithHttpInfo = function (response) {
1537
+ return __awaiter(this, void 0, void 0, function () {
1538
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1539
+ return __generator(this, function (_q) {
1540
+ switch (_q.label) {
1541
+ case 0:
1542
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1543
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1544
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1545
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1546
+ return [4, response.body.text()];
1547
+ case 1:
1548
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1549
+ "TemplateAddFieldsResponse", ""]);
1550
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1551
+ case 2:
1552
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
1553
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1554
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1555
+ return [4, response.body.text()];
1556
+ case 3:
1557
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1558
+ "TemplateAddFieldsResponse", ""]);
1559
+ throw new exception_1.ApiException(response.httpStatusCode, "add fields error", body, response.headers);
1560
+ case 4:
1561
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1562
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1563
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1564
+ return [4, response.body.text()];
1565
+ case 5:
1566
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1567
+ "TemplateAddFieldsResponse", ""]);
1568
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1569
+ case 6:
1570
+ _o = exception_1.ApiException.bind;
1571
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1572
+ return [4, response.getBodyAsAny()];
1573
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1574
+ }
1575
+ });
1576
+ });
1577
+ };
1578
+ PDFApiResponseProcessor.prototype.batchGeneratePdfsWithHttpInfo = function (response) {
1579
+ return __awaiter(this, void 0, void 0, function () {
1580
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, body, _w, _x, _y, _z, _0, _1;
1581
+ return __generator(this, function (_2) {
1582
+ switch (_2.label) {
1583
+ case 0:
1584
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1585
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
1586
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1587
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1588
+ return [4, response.body.text()];
1589
+ case 1:
1590
+ body = _b.apply(_a, [_d.apply(_c, [_2.sent(), contentType]),
1591
+ "BatchGeneratePdfs201Response", ""]);
1592
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1593
+ case 2:
1594
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 4];
1595
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1596
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1597
+ return [4, response.body.text()];
1598
+ case 3:
1599
+ body = _f.apply(_e, [_h.apply(_g, [_2.sent(), contentType]),
1600
+ "BatchGeneratePdfs201Response", ""]);
1601
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1602
+ case 4:
1603
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
1604
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1605
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1606
+ return [4, response.body.text()];
1607
+ case 5:
1608
+ body = _k.apply(_j, [_m.apply(_l, [_2.sent(), contentType]),
1609
+ "ErrorResponse", ""]);
1610
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
1611
+ case 6:
1612
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 8];
1613
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1614
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1615
+ return [4, response.body.text()];
1616
+ case 7:
1617
+ body = _p.apply(_o, [_r.apply(_q, [_2.sent(), contentType]),
1618
+ "MultipleErrorsResponse", ""]);
1619
+ throw new exception_1.ApiException(response.httpStatusCode, "array of arrays", body, response.headers);
1620
+ case 8:
1621
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 10];
1622
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
1623
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
1624
+ return [4, response.body.text()];
1625
+ case 9:
1626
+ body = _t.apply(_s, [_v.apply(_u, [_2.sent(), contentType]),
1627
+ "ErrorResponse", ""]);
1628
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid JSON", body, response.headers);
1629
+ case 10:
1630
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 12];
1631
+ _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
1632
+ _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
1633
+ return [4, response.body.text()];
1634
+ case 11:
1635
+ body = _x.apply(_w, [_z.apply(_y, [_2.sent(), contentType]),
1636
+ "BatchGeneratePdfs201Response", ""]);
1637
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1638
+ case 12:
1639
+ _0 = exception_1.ApiException.bind;
1640
+ _1 = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1641
+ return [4, response.getBodyAsAny()];
1642
+ case 13: throw new (_0.apply(exception_1.ApiException, _1.concat([_2.sent(), response.headers])))();
1643
+ }
1644
+ });
1645
+ });
1646
+ };
1647
+ PDFApiResponseProcessor.prototype.combinePdfsWithHttpInfo = function (response) {
1648
+ return __awaiter(this, void 0, void 0, function () {
1649
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
1650
+ return __generator(this, function (_y) {
1651
+ switch (_y.label) {
1652
+ case 0:
1653
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1654
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
1655
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1656
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1657
+ return [4, response.body.text()];
1658
+ case 1:
1659
+ body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
1660
+ "CreateCombinedSubmissionResponse", ""]);
1661
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1662
+ case 2:
1663
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
1664
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1665
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1666
+ return [4, response.body.text()];
1667
+ case 3:
1668
+ body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
1669
+ "MultipleErrorsResponse", ""]);
1670
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid request", body, response.headers);
1671
+ case 4:
1672
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 6];
1673
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1674
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1675
+ return [4, response.body.text()];
1676
+ case 5:
1677
+ body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
1678
+ "ErrorResponse", ""]);
1679
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid JSON", body, response.headers);
1680
+ case 6:
1681
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
1682
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1683
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1684
+ return [4, response.body.text()];
1685
+ case 7:
1686
+ body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
1687
+ "ErrorResponse", ""]);
1688
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
1689
+ case 8:
1690
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
1691
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
1692
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
1693
+ return [4, response.body.text()];
1694
+ case 9:
1695
+ body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
1696
+ "CreateCombinedSubmissionResponse", ""]);
1697
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1698
+ case 10:
1699
+ _w = exception_1.ApiException.bind;
1700
+ _x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1701
+ return [4, response.getBodyAsAny()];
1702
+ case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
1703
+ }
1704
+ });
1705
+ });
1706
+ };
1707
+ PDFApiResponseProcessor.prototype.combineSubmissionsWithHttpInfo = function (response) {
1708
+ return __awaiter(this, void 0, void 0, function () {
1709
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
1710
+ return __generator(this, function (_y) {
1711
+ switch (_y.label) {
1712
+ case 0:
1713
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1714
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
1715
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1716
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1717
+ return [4, response.body.text()];
1718
+ case 1:
1719
+ body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
1720
+ "CreateCombinedSubmissionResponse", ""]);
1721
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1722
+ case 2:
1723
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
1724
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1725
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1726
+ return [4, response.body.text()];
1727
+ case 3:
1728
+ body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
1729
+ "MultipleErrorsResponse", ""]);
1730
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid request", body, response.headers);
1731
+ case 4:
1732
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 6];
1733
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1734
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1735
+ return [4, response.body.text()];
1736
+ case 5:
1737
+ body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
1738
+ "ErrorResponse", ""]);
1739
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid JSON", body, response.headers);
1740
+ case 6:
1741
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
1742
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1743
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1744
+ return [4, response.body.text()];
1745
+ case 7:
1746
+ body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
1747
+ "ErrorResponse", ""]);
1748
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
1749
+ case 8:
1750
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
1751
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
1752
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
1753
+ return [4, response.body.text()];
1754
+ case 9:
1755
+ body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
1756
+ "CreateCombinedSubmissionResponse", ""]);
1757
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1758
+ case 10:
1759
+ _w = exception_1.ApiException.bind;
1760
+ _x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1761
+ return [4, response.getBodyAsAny()];
1762
+ case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
1763
+ }
1764
+ });
1765
+ });
1766
+ };
1767
+ PDFApiResponseProcessor.prototype.copyTemplateWithHttpInfo = function (response) {
1768
+ return __awaiter(this, void 0, void 0, function () {
1769
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1770
+ return __generator(this, function (_q) {
1771
+ switch (_q.label) {
1772
+ case 0:
1773
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1774
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1775
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1776
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1777
+ return [4, response.body.text()];
1778
+ case 1:
1779
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1780
+ "TemplatePreview", ""]);
1781
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1782
+ case 2:
1783
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
1784
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1785
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1786
+ return [4, response.body.text()];
1787
+ case 3:
1788
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1789
+ "ErrorResponse", ""]);
1790
+ throw new exception_1.ApiException(response.httpStatusCode, "folder not found", body, response.headers);
1791
+ case 4:
1792
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1793
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1794
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1795
+ return [4, response.body.text()];
1796
+ case 5:
1797
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1798
+ "TemplatePreview", ""]);
1799
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1800
+ case 6:
1801
+ _o = exception_1.ApiException.bind;
1802
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1803
+ return [4, response.getBodyAsAny()];
1804
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1805
+ }
1806
+ });
1807
+ });
1808
+ };
1809
+ PDFApiResponseProcessor.prototype.createCustomFileFromUploadWithHttpInfo = function (response) {
1810
+ return __awaiter(this, void 0, void 0, function () {
1811
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1812
+ return __generator(this, function (_q) {
1813
+ switch (_q.label) {
1814
+ case 0:
1815
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1816
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
1817
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1818
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1819
+ return [4, response.body.text()];
1820
+ case 1:
1821
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1822
+ "CreateCustomFileResponse", ""]);
1823
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1824
+ case 2:
1825
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
1826
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1827
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1828
+ return [4, response.body.text()];
1829
+ case 3:
1830
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1831
+ "ErrorResponse", ""]);
1832
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
1833
+ case 4:
1834
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1835
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1836
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1837
+ return [4, response.body.text()];
1838
+ case 5:
1839
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1840
+ "CreateCustomFileResponse", ""]);
1841
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1842
+ case 6:
1843
+ _o = exception_1.ApiException.bind;
1844
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1845
+ return [4, response.getBodyAsAny()];
1846
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1847
+ }
1848
+ });
1849
+ });
1850
+ };
1851
+ PDFApiResponseProcessor.prototype.createDataRequestEventWithHttpInfo = function (response) {
1852
+ return __awaiter(this, void 0, void 0, function () {
1853
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
1854
+ return __generator(this, function (_u) {
1855
+ switch (_u.label) {
1856
+ case 0:
1857
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1858
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
1859
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1860
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1861
+ return [4, response.body.text()];
1862
+ case 1:
1863
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
1864
+ "CreateSubmissionDataRequestEventResponse", ""]);
1865
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1866
+ case 2:
1867
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
1868
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1869
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1870
+ return [4, response.body.text()];
1871
+ case 3:
1872
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
1873
+ "ErrorResponse", ""]);
1874
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
1875
+ case 4:
1876
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 6];
1877
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1878
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1879
+ return [4, response.body.text()];
1880
+ case 5:
1881
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
1882
+ "MultipleErrorsResponse", ""]);
1883
+ throw new exception_1.ApiException(response.httpStatusCode, "message recipient must not be blank", body, response.headers);
1884
+ case 6:
1885
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
1886
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1887
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1888
+ return [4, response.body.text()];
1889
+ case 7:
1890
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
1891
+ "CreateSubmissionDataRequestEventResponse", ""]);
1892
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1893
+ case 8:
1894
+ _s = exception_1.ApiException.bind;
1895
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1896
+ return [4, response.getBodyAsAny()];
1897
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
1898
+ }
1899
+ });
1900
+ });
1901
+ };
1902
+ PDFApiResponseProcessor.prototype.createDataRequestTokenWithHttpInfo = function (response) {
1903
+ return __awaiter(this, void 0, void 0, function () {
1904
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
1905
+ return __generator(this, function (_u) {
1906
+ switch (_u.label) {
1907
+ case 0:
1908
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1909
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
1910
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1911
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1912
+ return [4, response.body.text()];
1913
+ case 1:
1914
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
1915
+ "CreateSubmissionDataRequestTokenResponse", ""]);
1916
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1917
+ case 2:
1918
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
1919
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1920
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1921
+ return [4, response.body.text()];
1922
+ case 3:
1923
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
1924
+ "ErrorResponse", ""]);
1925
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
1926
+ case 4:
1927
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 6];
1928
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1929
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1930
+ return [4, response.body.text()];
1931
+ case 5:
1932
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
1933
+ "ErrorResponse", ""]);
1934
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid request", body, response.headers);
1935
+ case 6:
1936
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
1937
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1938
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1939
+ return [4, response.body.text()];
1940
+ case 7:
1941
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
1942
+ "CreateSubmissionDataRequestTokenResponse", ""]);
1943
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1944
+ case 8:
1945
+ _s = exception_1.ApiException.bind;
1946
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1947
+ return [4, response.getBodyAsAny()];
1948
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
1949
+ }
1950
+ });
1951
+ });
1952
+ };
1953
+ PDFApiResponseProcessor.prototype.createFolderWithHttpInfo = function (response) {
1954
+ return __awaiter(this, void 0, void 0, function () {
1955
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
1956
+ return __generator(this, function (_y) {
1957
+ switch (_y.label) {
1958
+ case 0:
1959
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1960
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 2];
1961
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1962
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1963
+ return [4, response.body.text()];
1964
+ case 1:
1965
+ body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
1966
+ "MultipleErrorsResponse", ""]);
1967
+ throw new exception_1.ApiException(response.httpStatusCode, "name already exist", body, response.headers);
1968
+ case 2:
1969
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
1970
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1971
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1972
+ return [4, response.body.text()];
1973
+ case 3:
1974
+ body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
1975
+ "ErrorResponse", ""]);
1976
+ throw new exception_1.ApiException(response.httpStatusCode, "parent folder doesn\&#39;t exist", body, response.headers);
1977
+ case 4:
1978
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 6];
1979
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1980
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1981
+ return [4, response.body.text()];
1982
+ case 5:
1983
+ body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
1984
+ "Folder", ""]);
1985
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
1986
+ case 6:
1987
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
1988
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1989
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1990
+ return [4, response.body.text()];
1991
+ case 7:
1992
+ body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
1993
+ "ErrorResponse", ""]);
1994
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
1995
+ case 8:
1996
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
1997
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
1998
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
1999
+ return [4, response.body.text()];
2000
+ case 9:
2001
+ body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
2002
+ "Folder", ""]);
2003
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2004
+ case 10:
2005
+ _w = exception_1.ApiException.bind;
2006
+ _x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2007
+ return [4, response.getBodyAsAny()];
2008
+ case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
2009
+ }
2010
+ });
2011
+ });
2012
+ };
2013
+ PDFApiResponseProcessor.prototype.createHTMLTemplateWithHttpInfo = function (response) {
2014
+ return __awaiter(this, void 0, void 0, function () {
2015
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
2016
+ return __generator(this, function (_q) {
2017
+ switch (_q.label) {
2018
+ case 0:
2019
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2020
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
2021
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2022
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2023
+ return [4, response.body.text()];
2024
+ case 1:
2025
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
2026
+ "TemplatePreview", ""]);
2027
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2028
+ case 2:
2029
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
2030
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2031
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2032
+ return [4, response.body.text()];
2033
+ case 3:
2034
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
2035
+ "ErrorResponse", ""]);
2036
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2037
+ case 4:
2038
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
2039
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2040
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2041
+ return [4, response.body.text()];
2042
+ case 5:
2043
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
2044
+ "TemplatePreview", ""]);
2045
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2046
+ case 6:
2047
+ _o = exception_1.ApiException.bind;
2048
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2049
+ return [4, response.getBodyAsAny()];
2050
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
2051
+ }
2052
+ });
2053
+ });
2054
+ };
2055
+ PDFApiResponseProcessor.prototype.createPDFTemplateWithHttpInfo = function (response) {
2056
+ return __awaiter(this, void 0, void 0, function () {
2057
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
2058
+ return __generator(this, function (_q) {
2059
+ switch (_q.label) {
2060
+ case 0:
2061
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2062
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
2063
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2064
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2065
+ return [4, response.body.text()];
2066
+ case 1:
2067
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
2068
+ "TemplatePreview", ""]);
2069
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2070
+ case 2:
2071
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
2072
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2073
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2074
+ return [4, response.body.text()];
2075
+ case 3:
2076
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
2077
+ "ErrorResponse", ""]);
2078
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2079
+ case 4:
2080
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
2081
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2082
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2083
+ return [4, response.body.text()];
2084
+ case 5:
2085
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
2086
+ "TemplatePreview", ""]);
2087
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2088
+ case 6:
2089
+ _o = exception_1.ApiException.bind;
2090
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2091
+ return [4, response.getBodyAsAny()];
2092
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
2093
+ }
2094
+ });
2095
+ });
2096
+ };
2097
+ PDFApiResponseProcessor.prototype.createPDFTemplateFromUploadWithHttpInfo = function (response) {
2098
+ return __awaiter(this, void 0, void 0, function () {
2099
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
2100
+ return __generator(this, function (_q) {
2101
+ switch (_q.label) {
2102
+ case 0:
2103
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2104
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
2105
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2106
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2107
+ return [4, response.body.text()];
2108
+ case 1:
2109
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
2110
+ "TemplatePreview", ""]);
2111
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2112
+ case 2:
2113
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
2114
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2115
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2116
+ return [4, response.body.text()];
2117
+ case 3:
2118
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
2119
+ "ErrorResponse", ""]);
2120
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2121
+ case 4:
2122
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
2123
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2124
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2125
+ return [4, response.body.text()];
2126
+ case 5:
2127
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
2128
+ "TemplatePreview", ""]);
2129
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2130
+ case 6:
2131
+ _o = exception_1.ApiException.bind;
2132
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2133
+ return [4, response.getBodyAsAny()];
2134
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
2135
+ }
2136
+ });
2137
+ });
2138
+ };
2139
+ PDFApiResponseProcessor.prototype.deleteFolderWithHttpInfo = function (response) {
2140
+ return __awaiter(this, void 0, void 0, function () {
2141
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
2142
+ return __generator(this, function (_y) {
2143
+ switch (_y.label) {
2144
+ case 0:
2145
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2146
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 2];
2147
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2148
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2149
+ return [4, response.body.text()];
2150
+ case 1:
2151
+ body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
2152
+ "ErrorResponse", ""]);
2153
+ throw new exception_1.ApiException(response.httpStatusCode, "folder doesn\&#39;t exist", body, response.headers);
2154
+ case 2:
2155
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
2156
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2157
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2158
+ return [4, response.body.text()];
2159
+ case 3:
2160
+ body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
2161
+ "ErrorResponse", ""]);
2162
+ throw new exception_1.ApiException(response.httpStatusCode, "folder has contents", body, response.headers);
2163
+ case 4:
2164
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 6];
2165
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2166
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2167
+ return [4, response.body.text()];
2168
+ case 5:
2169
+ body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
2170
+ "Folder", ""]);
2171
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2172
+ case 6:
2173
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
2174
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2175
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2176
+ return [4, response.body.text()];
2177
+ case 7:
2178
+ body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
2179
+ "ErrorResponse", ""]);
2180
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2181
+ case 8:
2182
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
2183
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
2184
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
2185
+ return [4, response.body.text()];
2186
+ case 9:
2187
+ body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
2188
+ "Folder", ""]);
2189
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2190
+ case 10:
2191
+ _w = exception_1.ApiException.bind;
2192
+ _x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2193
+ return [4, response.getBodyAsAny()];
2194
+ case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
2195
+ }
2196
+ });
2197
+ });
2198
+ };
2199
+ PDFApiResponseProcessor.prototype.deleteTemplateWithHttpInfo = function (response) {
2200
+ return __awaiter(this, void 0, void 0, function () {
2201
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2202
+ return __generator(this, function (_u) {
2203
+ switch (_u.label) {
2204
+ case 0:
2205
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2206
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2207
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2208
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2209
+ return [4, response.body.text()];
2210
+ case 1:
2211
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2212
+ "SuccessMultipleErrorsResponse", ""]);
2213
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2214
+ case 2:
2215
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2216
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2217
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2218
+ return [4, response.body.text()];
2219
+ case 3:
2220
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2221
+ "ErrorResponse", ""]);
2222
+ throw new exception_1.ApiException(response.httpStatusCode, "template not found", body, response.headers);
2223
+ case 4:
2224
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2225
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2226
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2227
+ return [4, response.body.text()];
2228
+ case 5:
2229
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2230
+ "ErrorResponse", ""]);
2231
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2232
+ case 6:
2233
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2234
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2235
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2236
+ return [4, response.body.text()];
2237
+ case 7:
2238
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2239
+ "SuccessMultipleErrorsResponse", ""]);
2240
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2241
+ case 8:
2242
+ _s = exception_1.ApiException.bind;
2243
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2244
+ return [4, response.getBodyAsAny()];
2245
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2246
+ }
2247
+ });
2248
+ });
2249
+ };
2250
+ PDFApiResponseProcessor.prototype.expireCombinedSubmissionWithHttpInfo = function (response) {
2251
+ return __awaiter(this, void 0, void 0, function () {
2252
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
2253
+ return __generator(this, function (_y) {
2254
+ switch (_y.label) {
2255
+ case 0:
2256
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2257
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2258
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2259
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2260
+ return [4, response.body.text()];
2261
+ case 1:
2262
+ body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
2263
+ "CombinedSubmission", ""]);
2264
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2265
+ case 2:
2266
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2267
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2268
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2269
+ return [4, response.body.text()];
2270
+ case 3:
2271
+ body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
2272
+ "ErrorResponse", ""]);
2273
+ throw new exception_1.ApiException(response.httpStatusCode, "combined submission not found", body, response.headers);
2274
+ case 4:
2275
+ if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3, 6];
2276
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2277
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2278
+ return [4, response.body.text()];
2279
+ case 5:
2280
+ body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
2281
+ "ErrorResponse", ""]);
2282
+ throw new exception_1.ApiException(response.httpStatusCode, "test API token used", body, response.headers);
2283
+ case 6:
2284
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
2285
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2286
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2287
+ return [4, response.body.text()];
2288
+ case 7:
2289
+ body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
2290
+ "ErrorResponse", ""]);
2291
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2292
+ case 8:
2293
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
2294
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
2295
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
2296
+ return [4, response.body.text()];
2297
+ case 9:
2298
+ body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
2299
+ "CombinedSubmission", ""]);
2300
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2301
+ case 10:
2302
+ _w = exception_1.ApiException.bind;
2303
+ _x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2304
+ return [4, response.getBodyAsAny()];
2305
+ case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
2306
+ }
2307
+ });
2308
+ });
2309
+ };
2310
+ PDFApiResponseProcessor.prototype.expireSubmissionWithHttpInfo = function (response) {
2311
+ return __awaiter(this, void 0, void 0, function () {
2312
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
2313
+ return __generator(this, function (_y) {
2314
+ switch (_y.label) {
2315
+ case 0:
2316
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2317
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2318
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2319
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2320
+ return [4, response.body.text()];
2321
+ case 1:
2322
+ body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
2323
+ "SubmissionPreview", ""]);
2324
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2325
+ case 2:
2326
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2327
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2328
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2329
+ return [4, response.body.text()];
2330
+ case 3:
2331
+ body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
2332
+ "ErrorResponse", ""]);
2333
+ throw new exception_1.ApiException(response.httpStatusCode, "submission not found", body, response.headers);
2334
+ case 4:
2335
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2336
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2337
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2338
+ return [4, response.body.text()];
2339
+ case 5:
2340
+ body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
2341
+ "ErrorResponse", ""]);
2342
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2343
+ case 6:
2344
+ if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3, 8];
2345
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2346
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2347
+ return [4, response.body.text()];
2348
+ case 7:
2349
+ body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
2350
+ "ErrorResponse", ""]);
2351
+ throw new exception_1.ApiException(response.httpStatusCode, "test API token used", body, response.headers);
2352
+ case 8:
2353
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
2354
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
2355
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
2356
+ return [4, response.body.text()];
2357
+ case 9:
2358
+ body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
2359
+ "SubmissionPreview", ""]);
2360
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2361
+ case 10:
2362
+ _w = exception_1.ApiException.bind;
2363
+ _x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2364
+ return [4, response.getBodyAsAny()];
2365
+ case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
2366
+ }
2367
+ });
2368
+ });
2369
+ };
2370
+ PDFApiResponseProcessor.prototype.generatePdfWithHttpInfo = function (response) {
2371
+ return __awaiter(this, void 0, void 0, function () {
2372
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2373
+ return __generator(this, function (_u) {
2374
+ switch (_u.label) {
2375
+ case 0:
2376
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2377
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
2378
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2379
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2380
+ return [4, response.body.text()];
2381
+ case 1:
2382
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2383
+ "CreateSubmissionResponse", ""]);
2384
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2385
+ case 2:
2386
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
2387
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2388
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2389
+ return [4, response.body.text()];
2390
+ case 3:
2391
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2392
+ "ErrorResponse", ""]);
2393
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid request", body, response.headers);
2394
+ case 4:
2395
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2396
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2397
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2398
+ return [4, response.body.text()];
2399
+ case 5:
2400
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2401
+ "ErrorResponse", ""]);
2402
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2403
+ case 6:
2404
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2405
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2406
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2407
+ return [4, response.body.text()];
2408
+ case 7:
2409
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2410
+ "CreateSubmissionResponse", ""]);
2411
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2412
+ case 8:
2413
+ _s = exception_1.ApiException.bind;
2414
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2415
+ return [4, response.getBodyAsAny()];
2416
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2417
+ }
2418
+ });
2419
+ });
2420
+ };
2421
+ PDFApiResponseProcessor.prototype.generatePdfForHtmlTemplateWithHttpInfo = function (response) {
2422
+ return __awaiter(this, void 0, void 0, function () {
2423
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, _j, _k;
2424
+ return __generator(this, function (_l) {
2425
+ switch (_l.label) {
2426
+ case 0:
2427
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2428
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
2429
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2430
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2431
+ return [4, response.body.text()];
2432
+ case 1:
2433
+ body = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
2434
+ "CreateSubmissionResponse", ""]);
2435
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2436
+ case 2:
2437
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
2438
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2439
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2440
+ return [4, response.body.text()];
2441
+ case 3:
2442
+ body = _f.apply(_e, [_h.apply(_g, [_l.sent(), contentType]),
2443
+ "CreateSubmissionResponse", ""]);
2444
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2445
+ case 4:
2446
+ _j = exception_1.ApiException.bind;
2447
+ _k = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2448
+ return [4, response.getBodyAsAny()];
2449
+ case 5: throw new (_j.apply(exception_1.ApiException, _k.concat([_l.sent(), response.headers])))();
2450
+ }
2451
+ });
2452
+ });
2453
+ };
2454
+ PDFApiResponseProcessor.prototype.generatePreviewWithHttpInfo = function (response) {
2455
+ return __awaiter(this, void 0, void 0, function () {
2456
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2457
+ return __generator(this, function (_u) {
2458
+ switch (_u.label) {
2459
+ case 0:
2460
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2461
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2462
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2463
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2464
+ return [4, response.body.text()];
2465
+ case 1:
2466
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2467
+ "SuccessErrorResponse", ""]);
2468
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2469
+ case 2:
2470
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2471
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2472
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2473
+ return [4, response.body.text()];
2474
+ case 3:
2475
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2476
+ "ErrorResponse", ""]);
2477
+ throw new exception_1.ApiException(response.httpStatusCode, "submission not found", body, response.headers);
2478
+ case 4:
2479
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 6];
2480
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2481
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2482
+ return [4, response.body.text()];
2483
+ case 5:
2484
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2485
+ "SuccessErrorResponse", ""]);
2486
+ throw new exception_1.ApiException(response.httpStatusCode, "error requesting preview", body, response.headers);
2487
+ case 6:
2488
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2489
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2490
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2491
+ return [4, response.body.text()];
2492
+ case 7:
2493
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2494
+ "SuccessErrorResponse", ""]);
2495
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2496
+ case 8:
2497
+ _s = exception_1.ApiException.bind;
2498
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2499
+ return [4, response.getBodyAsAny()];
2500
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2501
+ }
2502
+ });
2503
+ });
2504
+ };
2505
+ PDFApiResponseProcessor.prototype.getCombinedSubmissionWithHttpInfo = function (response) {
2506
+ return __awaiter(this, void 0, void 0, function () {
2507
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2508
+ return __generator(this, function (_u) {
2509
+ switch (_u.label) {
2510
+ case 0:
2511
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2512
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2513
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2514
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2515
+ return [4, response.body.text()];
2516
+ case 1:
2517
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2518
+ "CombinedSubmission", ""]);
2519
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2520
+ case 2:
2521
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2522
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2523
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2524
+ return [4, response.body.text()];
2525
+ case 3:
2526
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2527
+ "ErrorResponse", ""]);
2528
+ throw new exception_1.ApiException(response.httpStatusCode, "combined submission not found", body, response.headers);
2529
+ case 4:
2530
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2531
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2532
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2533
+ return [4, response.body.text()];
2534
+ case 5:
2535
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2536
+ "ErrorResponse", ""]);
2537
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2538
+ case 6:
2539
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2540
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2541
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2542
+ return [4, response.body.text()];
2543
+ case 7:
2544
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2545
+ "CombinedSubmission", ""]);
2546
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2547
+ case 8:
2548
+ _s = exception_1.ApiException.bind;
2549
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2550
+ return [4, response.getBodyAsAny()];
2551
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2552
+ }
2553
+ });
2554
+ });
2555
+ };
2556
+ PDFApiResponseProcessor.prototype.getDataRequestWithHttpInfo = function (response) {
2557
+ return __awaiter(this, void 0, void 0, function () {
2558
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2559
+ return __generator(this, function (_u) {
2560
+ switch (_u.label) {
2561
+ case 0:
2562
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2563
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2564
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2565
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2566
+ return [4, response.body.text()];
2567
+ case 1:
2568
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2569
+ "SubmissionDataRequestShow", ""]);
2570
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2571
+ case 2:
2572
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2573
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2574
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2575
+ return [4, response.body.text()];
2576
+ case 3:
2577
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2578
+ "ErrorResponse", ""]);
2579
+ throw new exception_1.ApiException(response.httpStatusCode, "submission data request not found", body, response.headers);
2580
+ case 4:
2581
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2582
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2583
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2584
+ return [4, response.body.text()];
2585
+ case 5:
2586
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2587
+ "ErrorResponse", ""]);
2588
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2589
+ case 6:
2590
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2591
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2592
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2593
+ return [4, response.body.text()];
2594
+ case 7:
2595
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2596
+ "SubmissionDataRequestShow", ""]);
2597
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2598
+ case 8:
2599
+ _s = exception_1.ApiException.bind;
2600
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2601
+ return [4, response.getBodyAsAny()];
2602
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2603
+ }
2604
+ });
2605
+ });
2606
+ };
2607
+ PDFApiResponseProcessor.prototype.getFullTemplateWithHttpInfo = function (response) {
2608
+ return __awaiter(this, void 0, void 0, function () {
2609
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2610
+ return __generator(this, function (_u) {
2611
+ switch (_u.label) {
2612
+ case 0:
2613
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2614
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2615
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2616
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2617
+ return [4, response.body.text()];
2618
+ case 1:
2619
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2620
+ "Template", ""]);
2621
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2622
+ case 2:
2623
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2624
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2625
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2626
+ return [4, response.body.text()];
2627
+ case 3:
2628
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2629
+ "ErrorResponse", ""]);
2630
+ throw new exception_1.ApiException(response.httpStatusCode, "template not found", body, response.headers);
2631
+ case 4:
2632
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2633
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2634
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2635
+ return [4, response.body.text()];
2636
+ case 5:
2637
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2638
+ "ErrorResponse", ""]);
2639
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2640
+ case 6:
2641
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2642
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2643
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2644
+ return [4, response.body.text()];
2645
+ case 7:
2646
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2647
+ "Template", ""]);
2648
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2649
+ case 8:
2650
+ _s = exception_1.ApiException.bind;
2651
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2652
+ return [4, response.getBodyAsAny()];
2653
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2654
+ }
2655
+ });
2656
+ });
2657
+ };
2658
+ PDFApiResponseProcessor.prototype.getPresignUrlWithHttpInfo = function (response) {
2659
+ return __awaiter(this, void 0, void 0, function () {
2660
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
2661
+ return __generator(this, function (_q) {
2662
+ switch (_q.label) {
2663
+ case 0:
2664
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2665
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2666
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2667
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2668
+ return [4, response.body.text()];
2669
+ case 1:
2670
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
2671
+ "UploadPresignResponse", ""]);
2672
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2673
+ case 2:
2674
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
2675
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2676
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2677
+ return [4, response.body.text()];
2678
+ case 3:
2679
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
2680
+ "ErrorResponse", ""]);
2681
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2682
+ case 4:
2683
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
2684
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2685
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2686
+ return [4, response.body.text()];
2687
+ case 5:
2688
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
2689
+ "UploadPresignResponse", ""]);
2690
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2691
+ case 6:
2692
+ _o = exception_1.ApiException.bind;
2693
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2694
+ return [4, response.getBodyAsAny()];
2695
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
2696
+ }
2697
+ });
2698
+ });
2699
+ };
2700
+ PDFApiResponseProcessor.prototype.getSubmissionWithHttpInfo = function (response) {
2701
+ return __awaiter(this, void 0, void 0, function () {
2702
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2703
+ return __generator(this, function (_u) {
2704
+ switch (_u.label) {
2705
+ case 0:
2706
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2707
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2708
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2709
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2710
+ return [4, response.body.text()];
2711
+ case 1:
2712
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2713
+ "Submission", ""]);
2714
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2715
+ case 2:
2716
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2717
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2718
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2719
+ return [4, response.body.text()];
2720
+ case 3:
2721
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2722
+ "ErrorResponse", ""]);
2723
+ throw new exception_1.ApiException(response.httpStatusCode, "submission not found", body, response.headers);
2724
+ case 4:
2725
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2726
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2727
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2728
+ return [4, response.body.text()];
2729
+ case 5:
2730
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2731
+ "ErrorResponse", ""]);
2732
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2733
+ case 6:
2734
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2735
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2736
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2737
+ return [4, response.body.text()];
2738
+ case 7:
2739
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2740
+ "Submission", ""]);
2741
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2742
+ case 8:
2743
+ _s = exception_1.ApiException.bind;
2744
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2745
+ return [4, response.getBodyAsAny()];
2746
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2747
+ }
2748
+ });
2749
+ });
2750
+ };
2751
+ PDFApiResponseProcessor.prototype.getSubmissionBatchWithHttpInfo = function (response) {
2752
+ return __awaiter(this, void 0, void 0, function () {
2753
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2754
+ return __generator(this, function (_u) {
2755
+ switch (_u.label) {
2756
+ case 0:
2757
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2758
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2759
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2760
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2761
+ return [4, response.body.text()];
2762
+ case 1:
2763
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2764
+ "SubmissionBatchWithSubmissions", ""]);
2765
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2766
+ case 2:
2767
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2768
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2769
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2770
+ return [4, response.body.text()];
2771
+ case 3:
2772
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2773
+ "ErrorResponse", ""]);
2774
+ throw new exception_1.ApiException(response.httpStatusCode, "submission batch not found", body, response.headers);
2775
+ case 4:
2776
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2777
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2778
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2779
+ return [4, response.body.text()];
2780
+ case 5:
2781
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2782
+ "ErrorResponse", ""]);
2783
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2784
+ case 6:
2785
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2786
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2787
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2788
+ return [4, response.body.text()];
2789
+ case 7:
2790
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2791
+ "SubmissionBatchWithSubmissions", ""]);
2792
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2793
+ case 8:
2794
+ _s = exception_1.ApiException.bind;
2795
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2796
+ return [4, response.getBodyAsAny()];
2797
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2798
+ }
2799
+ });
2800
+ });
2801
+ };
2802
+ PDFApiResponseProcessor.prototype.getTemplateWithHttpInfo = function (response) {
2803
+ return __awaiter(this, void 0, void 0, function () {
2804
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2805
+ return __generator(this, function (_u) {
2806
+ switch (_u.label) {
2807
+ case 0:
2808
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2809
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2810
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2811
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2812
+ return [4, response.body.text()];
2813
+ case 1:
2814
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2815
+ "TemplatePreview", ""]);
2816
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2817
+ case 2:
2818
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2819
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2820
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2821
+ return [4, response.body.text()];
2822
+ case 3:
2823
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2824
+ "ErrorResponse", ""]);
2825
+ throw new exception_1.ApiException(response.httpStatusCode, "template not found", body, response.headers);
2826
+ case 4:
2827
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2828
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2829
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2830
+ return [4, response.body.text()];
2831
+ case 5:
2832
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2833
+ "ErrorResponse", ""]);
2834
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2835
+ case 6:
2836
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2837
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2838
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2839
+ return [4, response.body.text()];
2840
+ case 7:
2841
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2842
+ "TemplatePreview", ""]);
2843
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2844
+ case 8:
2845
+ _s = exception_1.ApiException.bind;
2846
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2847
+ return [4, response.getBodyAsAny()];
2848
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2849
+ }
2850
+ });
2851
+ });
2852
+ };
2853
+ PDFApiResponseProcessor.prototype.getTemplateSchemaWithHttpInfo = function (response) {
2854
+ return __awaiter(this, void 0, void 0, function () {
2855
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2856
+ return __generator(this, function (_u) {
2857
+ switch (_u.label) {
2858
+ case 0:
2859
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2860
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2861
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2862
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2863
+ return [4, response.body.text()];
2864
+ case 1:
2865
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
2866
+ "JsonSchema", ""]);
2867
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2868
+ case 2:
2869
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
2870
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2871
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2872
+ return [4, response.body.text()];
2873
+ case 3:
2874
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
2875
+ "ErrorResponse", ""]);
2876
+ throw new exception_1.ApiException(response.httpStatusCode, "template not found", body, response.headers);
2877
+ case 4:
2878
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
2879
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2880
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2881
+ return [4, response.body.text()];
2882
+ case 5:
2883
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
2884
+ "ErrorResponse", ""]);
2885
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2886
+ case 6:
2887
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
2888
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
2889
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
2890
+ return [4, response.body.text()];
2891
+ case 7:
2892
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
2893
+ "JsonSchema", ""]);
2894
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2895
+ case 8:
2896
+ _s = exception_1.ApiException.bind;
2897
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2898
+ return [4, response.getBodyAsAny()];
2899
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
2900
+ }
2901
+ });
2902
+ });
2903
+ };
2904
+ PDFApiResponseProcessor.prototype.listCombinedSubmissionsWithHttpInfo = function (response) {
2905
+ return __awaiter(this, void 0, void 0, function () {
2906
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
2907
+ return __generator(this, function (_q) {
2908
+ switch (_q.label) {
2909
+ case 0:
2910
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2911
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2912
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2913
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2914
+ return [4, response.body.text()];
2915
+ case 1:
2916
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
2917
+ "Array<CombinedSubmission>", ""]);
2918
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2919
+ case 2:
2920
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
2921
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2922
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2923
+ return [4, response.body.text()];
2924
+ case 3:
2925
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
2926
+ "ErrorResponse", ""]);
2927
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2928
+ case 4:
2929
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
2930
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2931
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2932
+ return [4, response.body.text()];
2933
+ case 5:
2934
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
2935
+ "Array<CombinedSubmission>", ""]);
2936
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2937
+ case 6:
2938
+ _o = exception_1.ApiException.bind;
2939
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2940
+ return [4, response.getBodyAsAny()];
2941
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
2942
+ }
2943
+ });
2944
+ });
2945
+ };
2946
+ PDFApiResponseProcessor.prototype.listFoldersWithHttpInfo = function (response) {
2947
+ return __awaiter(this, void 0, void 0, function () {
2948
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
2949
+ return __generator(this, function (_q) {
2950
+ switch (_q.label) {
2951
+ case 0:
2952
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2953
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2954
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2955
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2956
+ return [4, response.body.text()];
2957
+ case 1:
2958
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
2959
+ "Array<Folder>", ""]);
2960
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2961
+ case 2:
2962
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
2963
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
2964
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
2965
+ return [4, response.body.text()];
2966
+ case 3:
2967
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
2968
+ "ErrorResponse", ""]);
2969
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
2970
+ case 4:
2971
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
2972
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
2973
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
2974
+ return [4, response.body.text()];
2975
+ case 5:
2976
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
2977
+ "Array<Folder>", ""]);
2978
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
2979
+ case 6:
2980
+ _o = exception_1.ApiException.bind;
2981
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
2982
+ return [4, response.getBodyAsAny()];
2983
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
2984
+ }
2985
+ });
2986
+ });
2987
+ };
2988
+ PDFApiResponseProcessor.prototype.listSubmissionsWithHttpInfo = function (response) {
2989
+ return __awaiter(this, void 0, void 0, function () {
2990
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
2991
+ return __generator(this, function (_u) {
2992
+ switch (_u.label) {
2993
+ case 0:
2994
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2995
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
2996
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
2997
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
2998
+ return [4, response.body.text()];
2999
+ case 1:
3000
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
3001
+ "ListSubmissionsResponse", ""]);
3002
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3003
+ case 2:
3004
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
3005
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3006
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3007
+ return [4, response.body.text()];
3008
+ case 3:
3009
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
3010
+ "ErrorResponse", ""]);
3011
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid type", body, response.headers);
3012
+ case 4:
3013
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
3014
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3015
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3016
+ return [4, response.body.text()];
3017
+ case 5:
3018
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
3019
+ "ErrorResponse", ""]);
3020
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
3021
+ case 6:
3022
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
3023
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
3024
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
3025
+ return [4, response.body.text()];
3026
+ case 7:
3027
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
3028
+ "ListSubmissionsResponse", ""]);
3029
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3030
+ case 8:
3031
+ _s = exception_1.ApiException.bind;
3032
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3033
+ return [4, response.getBodyAsAny()];
3034
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
3035
+ }
3036
+ });
3037
+ });
3038
+ };
3039
+ PDFApiResponseProcessor.prototype.listTemplateSubmissionsWithHttpInfo = function (response) {
3040
+ return __awaiter(this, void 0, void 0, function () {
3041
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
3042
+ return __generator(this, function (_q) {
3043
+ switch (_q.label) {
3044
+ case 0:
3045
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3046
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
3047
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3048
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3049
+ return [4, response.body.text()];
3050
+ case 1:
3051
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
3052
+ "ListSubmissionsResponse", ""]);
3053
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3054
+ case 2:
3055
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
3056
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3057
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3058
+ return [4, response.body.text()];
3059
+ case 3:
3060
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
3061
+ "ErrorResponse", ""]);
3062
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid template id", body, response.headers);
3063
+ case 4:
3064
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
3065
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3066
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3067
+ return [4, response.body.text()];
3068
+ case 5:
3069
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
3070
+ "ListSubmissionsResponse", ""]);
3071
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3072
+ case 6:
3073
+ _o = exception_1.ApiException.bind;
3074
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3075
+ return [4, response.getBodyAsAny()];
3076
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
3077
+ }
3078
+ });
3079
+ });
3080
+ };
3081
+ PDFApiResponseProcessor.prototype.listTemplatesWithHttpInfo = function (response) {
3082
+ return __awaiter(this, void 0, void 0, function () {
3083
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
3084
+ return __generator(this, function (_u) {
3085
+ switch (_u.label) {
3086
+ case 0:
3087
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3088
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
3089
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3090
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3091
+ return [4, response.body.text()];
3092
+ case 1:
3093
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
3094
+ "Array<TemplatePreview>", ""]);
3095
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3096
+ case 2:
3097
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
3098
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3099
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3100
+ return [4, response.body.text()];
3101
+ case 3:
3102
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
3103
+ "ErrorResponse", ""]);
3104
+ throw new exception_1.ApiException(response.httpStatusCode, "filter templates by invalid folder id", body, response.headers);
3105
+ case 4:
3106
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
3107
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3108
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3109
+ return [4, response.body.text()];
3110
+ case 5:
3111
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
3112
+ "ErrorResponse", ""]);
3113
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
3114
+ case 6:
3115
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
3116
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
3117
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
3118
+ return [4, response.body.text()];
3119
+ case 7:
3120
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
3121
+ "Array<TemplatePreview>", ""]);
3122
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3123
+ case 8:
3124
+ _s = exception_1.ApiException.bind;
3125
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3126
+ return [4, response.getBodyAsAny()];
3127
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
3128
+ }
3129
+ });
3130
+ });
3131
+ };
3132
+ PDFApiResponseProcessor.prototype.moveFolderToFolderWithHttpInfo = function (response) {
3133
+ return __awaiter(this, void 0, void 0, function () {
3134
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
3135
+ return __generator(this, function (_u) {
3136
+ switch (_u.label) {
3137
+ case 0:
3138
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3139
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 2];
3140
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3141
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3142
+ return [4, response.body.text()];
3143
+ case 1:
3144
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
3145
+ "ErrorResponse", ""]);
3146
+ throw new exception_1.ApiException(response.httpStatusCode, "parent folder doesn\&#39;t exist", body, response.headers);
3147
+ case 2:
3148
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 4];
3149
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3150
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3151
+ return [4, response.body.text()];
3152
+ case 3:
3153
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
3154
+ "Folder", ""]);
3155
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3156
+ case 4:
3157
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
3158
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3159
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3160
+ return [4, response.body.text()];
3161
+ case 5:
3162
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
3163
+ "ErrorResponse", ""]);
3164
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
3165
+ case 6:
3166
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
3167
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
3168
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
3169
+ return [4, response.body.text()];
3170
+ case 7:
3171
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
3172
+ "Folder", ""]);
3173
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3174
+ case 8:
3175
+ _s = exception_1.ApiException.bind;
3176
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3177
+ return [4, response.getBodyAsAny()];
3178
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
3179
+ }
3180
+ });
3181
+ });
3182
+ };
3183
+ PDFApiResponseProcessor.prototype.moveTemplateToFolderWithHttpInfo = function (response) {
3184
+ return __awaiter(this, void 0, void 0, function () {
3185
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
3186
+ return __generator(this, function (_q) {
3187
+ switch (_q.label) {
3188
+ case 0:
3189
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3190
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
3191
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3192
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3193
+ return [4, response.body.text()];
3194
+ case 1:
3195
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
3196
+ "TemplatePreview", ""]);
3197
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3198
+ case 2:
3199
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
3200
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3201
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3202
+ return [4, response.body.text()];
3203
+ case 3:
3204
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
3205
+ "ErrorResponse", ""]);
3206
+ throw new exception_1.ApiException(response.httpStatusCode, "folder not found", body, response.headers);
3207
+ case 4:
3208
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
3209
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3210
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3211
+ return [4, response.body.text()];
3212
+ case 5:
3213
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
3214
+ "TemplatePreview", ""]);
3215
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3216
+ case 6:
3217
+ _o = exception_1.ApiException.bind;
3218
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3219
+ return [4, response.getBodyAsAny()];
3220
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
3221
+ }
3222
+ });
3223
+ });
3224
+ };
3225
+ PDFApiResponseProcessor.prototype.renameFolderWithHttpInfo = function (response) {
3226
+ return __awaiter(this, void 0, void 0, function () {
3227
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
3228
+ return __generator(this, function (_y) {
3229
+ switch (_y.label) {
3230
+ case 0:
3231
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3232
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 2];
3233
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3234
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3235
+ return [4, response.body.text()];
3236
+ case 1:
3237
+ body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
3238
+ "MultipleErrorsResponse", ""]);
3239
+ throw new exception_1.ApiException(response.httpStatusCode, "name already exist", body, response.headers);
3240
+ case 2:
3241
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
3242
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3243
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3244
+ return [4, response.body.text()];
3245
+ case 3:
3246
+ body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
3247
+ "ErrorResponse", ""]);
3248
+ throw new exception_1.ApiException(response.httpStatusCode, "folder doesn\&#39;t belong to me", body, response.headers);
3249
+ case 4:
3250
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 6];
3251
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3252
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3253
+ return [4, response.body.text()];
3254
+ case 5:
3255
+ body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
3256
+ "Folder", ""]);
3257
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3258
+ case 6:
3259
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
3260
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
3261
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
3262
+ return [4, response.body.text()];
3263
+ case 7:
3264
+ body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
3265
+ "ErrorResponse", ""]);
3266
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
3267
+ case 8:
3268
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
3269
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
3270
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
3271
+ return [4, response.body.text()];
3272
+ case 9:
3273
+ body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
3274
+ "Folder", ""]);
3275
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3276
+ case 10:
3277
+ _w = exception_1.ApiException.bind;
3278
+ _x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3279
+ return [4, response.getBodyAsAny()];
3280
+ case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
3281
+ }
3282
+ });
3283
+ });
3284
+ };
3285
+ PDFApiResponseProcessor.prototype.testAuthenticationWithHttpInfo = function (response) {
3286
+ return __awaiter(this, void 0, void 0, function () {
3287
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
3288
+ return __generator(this, function (_q) {
3289
+ switch (_q.label) {
3290
+ case 0:
3291
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3292
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
3293
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3294
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3295
+ return [4, response.body.text()];
3296
+ case 1:
3297
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
3298
+ "SuccessErrorResponse", ""]);
3299
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3300
+ case 2:
3301
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 4];
3302
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3303
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3304
+ return [4, response.body.text()];
3305
+ case 3:
3306
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
3307
+ "SuccessErrorResponse", ""]);
3308
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
3309
+ case 4:
3310
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
3311
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3312
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3313
+ return [4, response.body.text()];
3314
+ case 5:
3315
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
3316
+ "SuccessErrorResponse", ""]);
3317
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3318
+ case 6:
3319
+ _o = exception_1.ApiException.bind;
3320
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3321
+ return [4, response.getBodyAsAny()];
3322
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
3323
+ }
3324
+ });
3325
+ });
3326
+ };
3327
+ PDFApiResponseProcessor.prototype.updateDataRequestWithHttpInfo = function (response) {
3328
+ return __awaiter(this, void 0, void 0, function () {
3329
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
3330
+ return __generator(this, function (_y) {
3331
+ switch (_y.label) {
3332
+ case 0:
3333
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3334
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
3335
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3336
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3337
+ return [4, response.body.text()];
3338
+ case 1:
3339
+ body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
3340
+ "CreateSubmissionDataRequestResponse", ""]);
3341
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3342
+ case 2:
3343
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
3344
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3345
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3346
+ return [4, response.body.text()];
3347
+ case 3:
3348
+ body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
3349
+ "MultipleErrorsResponse", ""]);
3350
+ throw new exception_1.ApiException(response.httpStatusCode, "invalid request", body, response.headers);
3351
+ case 4:
3352
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 6];
3353
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3354
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3355
+ return [4, response.body.text()];
3356
+ case 5:
3357
+ body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
3358
+ "ErrorResponse", ""]);
3359
+ throw new exception_1.ApiException(response.httpStatusCode, "submission data request not found", body, response.headers);
3360
+ case 6:
3361
+ if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
3362
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
3363
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
3364
+ return [4, response.body.text()];
3365
+ case 7:
3366
+ body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
3367
+ "ErrorResponse", ""]);
3368
+ throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
3369
+ case 8:
3370
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
3371
+ _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
3372
+ _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
3373
+ return [4, response.body.text()];
3374
+ case 9:
3375
+ body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
3376
+ "CreateSubmissionDataRequestResponse", ""]);
3377
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3378
+ case 10:
3379
+ _w = exception_1.ApiException.bind;
3380
+ _x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3381
+ return [4, response.getBodyAsAny()];
3382
+ case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
3383
+ }
3384
+ });
3385
+ });
3386
+ };
3387
+ PDFApiResponseProcessor.prototype.updateTemplateWithHttpInfo = function (response) {
3388
+ return __awaiter(this, void 0, void 0, function () {
3389
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, _j, _k;
3390
+ return __generator(this, function (_l) {
3391
+ switch (_l.label) {
3392
+ case 0:
3393
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3394
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
3395
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3396
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3397
+ return [4, response.body.text()];
3398
+ case 1:
3399
+ body = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
3400
+ "SuccessMultipleErrorsResponse", ""]);
3401
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3402
+ case 2:
3403
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
3404
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3405
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3406
+ return [4, response.body.text()];
3407
+ case 3:
3408
+ body = _f.apply(_e, [_h.apply(_g, [_l.sent(), contentType]),
3409
+ "SuccessMultipleErrorsResponse", ""]);
3410
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
3411
+ case 4:
3412
+ _j = exception_1.ApiException.bind;
3413
+ _k = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3414
+ return [4, response.getBodyAsAny()];
3415
+ case 5: throw new (_j.apply(exception_1.ApiException, _k.concat([_l.sent(), response.headers])))();
3416
+ }
3417
+ });
3418
+ });
3419
+ };
3420
+ return PDFApiResponseProcessor;
3421
+ }());
3422
+ exports.PDFApiResponseProcessor = PDFApiResponseProcessor;
3423
+ //# sourceMappingURL=PDFApi.js.map