boldsign 3.2.0 → 3.3.1

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 (694) hide show
  1. package/.openapi-generator/FILES +36 -0
  2. package/README.md +37 -0
  3. package/WebhookUtility.ts +145 -0
  4. package/api/apis.ts +1 -1
  5. package/api/brandingApi.ts +20 -20
  6. package/api/contactsApi.ts +3 -3
  7. package/api/customFieldApi.ts +3 -3
  8. package/api/documentApi.ts +158 -24
  9. package/api/groupContactsApi.ts +19 -3
  10. package/api/identityVerificationApi.ts +3 -3
  11. package/api/senderIdentitiesApi.ts +6 -6
  12. package/api/teamsApi.ts +1 -1
  13. package/api/templateApi.ts +142 -13
  14. package/api/userApi.ts +2 -2
  15. package/docs/AccessCodeDetail.md +1 -0
  16. package/docs/BehalfOfWebhookModel.md +12 -0
  17. package/docs/BrandingApi.md +20 -20
  18. package/docs/CheckboxValidationSettings.md +13 -0
  19. package/docs/ContactsApi.md +3 -3
  20. package/docs/CreateTemplateRequest.md +1 -0
  21. package/docs/CustomFieldApi.md +3 -3
  22. package/docs/CustomFormField.md +2 -0
  23. package/docs/DocumentApi.md +58 -23
  24. package/docs/DocumentCcWebhookModel.md +12 -0
  25. package/docs/DocumentEvent.md +37 -0
  26. package/docs/DocumentGroupSignerWebhookModel.md +18 -0
  27. package/docs/DocumentProperties.md +1 -0
  28. package/docs/DocumentSender.md +14 -0
  29. package/docs/DocumentSigner.md +1 -0
  30. package/docs/DocumentSignerDetails.md +1 -0
  31. package/docs/DocumentSignerWebhookModel.md +37 -0
  32. package/docs/EditDocumentJsonFile.md +14 -0
  33. package/docs/EditDocumentRequest.md +1 -0
  34. package/docs/EditDocumentSigner.md +1 -0
  35. package/docs/EditTemplateRequest.md +1 -0
  36. package/docs/EmbeddedCloneDocumentJsonRequest.md +22 -0
  37. package/docs/EmbeddedCloneTemplateJsonRequest.md +22 -0
  38. package/docs/EmbeddedClonedDocument.md +12 -0
  39. package/docs/EmbeddedClonedTemplate.md +12 -0
  40. package/docs/EmbeddedCreateTemplateRequest.md +1 -0
  41. package/docs/EmbeddedDocumentRequest.md +1 -0
  42. package/docs/EmbeddedMergeTemplateFormRequest.md +1 -0
  43. package/docs/EmbeddedSendTemplateFormRequest.md +1 -0
  44. package/docs/ErrorResponse.md +12 -0
  45. package/docs/FormFieldPermissionWebhookModel.md +13 -0
  46. package/docs/GroupContactsApi.md +3 -3
  47. package/docs/GroupOption.md +12 -0
  48. package/docs/GroupSignerSettingsWebhookModel.md +12 -0
  49. package/docs/IWebhookData.md +56 -0
  50. package/docs/{IdVerification.md → IdVerificationSignerWebhookModel.md} +1 -1
  51. package/docs/IdentityVerificationApi.md +3 -3
  52. package/docs/IdentityVerificationEvent.md +17 -0
  53. package/docs/KbaAuthenticationEvent.md +17 -0
  54. package/docs/{ProblemDetails.md → KbaDetails.md} +4 -5
  55. package/docs/KbaSettings.md +13 -0
  56. package/docs/KbaSignerWebhookModel.md +14 -0
  57. package/docs/MergeAndSendForSignForm.md +1 -0
  58. package/docs/PhoneNumberWebhookModel.md +12 -0
  59. package/docs/Role.md +1 -0
  60. package/docs/SendForSign.md +1 -0
  61. package/docs/SendForSignFromTemplateForm.md +1 -0
  62. package/docs/SenderIdentitiesApi.md +6 -6
  63. package/docs/SenderIdentityCreator.md +14 -0
  64. package/docs/SenderIdentityEvent.md +23 -0
  65. package/docs/SignerAuthenticationWebhookModel.md +12 -0
  66. package/docs/TeamsApi.md +1 -1
  67. package/docs/TemplateApi.md +46 -12
  68. package/docs/TemplateCcWebhookModel.md +13 -0
  69. package/docs/TemplateEvent.md +36 -0
  70. package/docs/TemplateFormFields.md +1 -0
  71. package/docs/TemplateGroupSignerWebhookModel.md +12 -0
  72. package/docs/TemplateProperties.md +1 -0
  73. package/docs/TemplateSender.md +15 -0
  74. package/docs/TemplateShareErrorResponse.md +14 -0
  75. package/docs/TemplateShareRequest.md +11 -0
  76. package/docs/TemplateSigner.md +29 -0
  77. package/docs/TemplateTeamShareRequest.md +13 -0
  78. package/docs/UserApi.md +2 -2
  79. package/docs/WebhookActorDetails.md +12 -0
  80. package/docs/WebhookContext.md +13 -0
  81. package/docs/WebhookEvent.md +14 -0
  82. package/docs/WebhookEventMetadata.md +15 -0
  83. package/model/accessCodeDetail.ts +9 -1
  84. package/model/auditTrail.ts +7 -1
  85. package/model/behalfOfWebhookModel.ts +37 -0
  86. package/model/checkboxValidationSettings.ts +51 -0
  87. package/model/createTemplateRequest.ts +6 -0
  88. package/model/customFormField.ts +14 -0
  89. package/model/documentCcWebhookModel.ts +37 -0
  90. package/model/documentEvent.ts +213 -0
  91. package/model/documentGroupSignerWebhookModel.ts +83 -0
  92. package/model/documentProperties.ts +8 -1
  93. package/model/documentSender.ts +49 -0
  94. package/model/documentSigner.ts +9 -1
  95. package/model/documentSignerDetails.ts +9 -1
  96. package/model/documentSignerWebhookModel.ts +202 -0
  97. package/model/editDocumentJsonFile.ts +57 -0
  98. package/model/editDocumentRequest.ts +8 -1
  99. package/model/editDocumentSigner.ts +9 -1
  100. package/model/editTemplateRequest.ts +6 -0
  101. package/model/embeddedCloneDocumentJsonRequest.ts +126 -0
  102. package/model/embeddedCloneTemplateJsonRequest.ts +126 -0
  103. package/model/embeddedClonedDocument.ts +37 -0
  104. package/model/embeddedClonedTemplate.ts +37 -0
  105. package/model/embeddedCreateTemplateRequest.ts +6 -0
  106. package/model/embeddedDocumentRequest.ts +8 -1
  107. package/model/embeddedMergeTemplateFormRequest.ts +8 -1
  108. package/model/embeddedSendTemplateFormRequest.ts +8 -1
  109. package/model/formFieldPermissionWebhookModel.ts +43 -0
  110. package/model/groupOption.ts +37 -0
  111. package/model/groupSignerSettingsWebhookModel.ts +37 -0
  112. package/model/iWebhookData.ts +335 -0
  113. package/model/{idVerification.ts → idVerificationSignerWebhookModel.ts} +2 -2
  114. package/model/identityVerificationEvent.ts +80 -0
  115. package/model/index.ts +129 -0
  116. package/model/kbaAuthenticationEvent.ts +80 -0
  117. package/model/{problemDetails.ts → kbaDetails.ts} +11 -17
  118. package/model/kbaSettings.ts +57 -0
  119. package/model/kbaSignerWebhookModel.ts +49 -0
  120. package/model/mergeAndSendForSignForm.ts +8 -1
  121. package/model/phoneNumberWebhookModel.ts +37 -0
  122. package/model/role.ts +9 -1
  123. package/model/roles.ts +2 -1
  124. package/model/sendForSign.ts +8 -1
  125. package/model/sendForSignFromTemplateForm.ts +8 -1
  126. package/model/senderIdentityCreator.ts +49 -0
  127. package/model/senderIdentityEvent.ts +104 -0
  128. package/model/signerAuthenticationWebhookModel.ts +37 -0
  129. package/model/templateCcWebhookModel.ts +43 -0
  130. package/model/templateEvent.ts +198 -0
  131. package/model/templateFormFields.ts +6 -0
  132. package/model/templateGroupSignerWebhookModel.ts +37 -0
  133. package/model/templateProperties.ts +8 -1
  134. package/model/templateRole.ts +2 -1
  135. package/model/templateSender.ts +55 -0
  136. package/model/templateSigner.ts +151 -0
  137. package/model/templateSignerDetails.ts +2 -1
  138. package/model/webhookActorDetails.ts +47 -0
  139. package/model/webhookContext.ts +82 -0
  140. package/model/webhookEvent.ts +53 -0
  141. package/model/webhookEventMetadata.ts +97 -0
  142. package/package.json +1 -1
  143. package/dist/api/apis.d.ts +0 -29
  144. package/dist/api/apis.js +0 -149
  145. package/dist/api/apis.js.map +0 -1
  146. package/dist/api/brandingApi.d.ts +0 -29
  147. package/dist/api/brandingApi.js +0 -776
  148. package/dist/api/brandingApi.js.map +0 -1
  149. package/dist/api/contactsApi.d.ts +0 -28
  150. package/dist/api/contactsApi.js +0 -501
  151. package/dist/api/contactsApi.js.map +0 -1
  152. package/dist/api/customFieldApi.d.ts +0 -28
  153. package/dist/api/customFieldApi.js +0 -519
  154. package/dist/api/customFieldApi.js.map +0 -1
  155. package/dist/api/documentApi.d.ts +0 -48
  156. package/dist/api/documentApi.js +0 -2259
  157. package/dist/api/documentApi.js.map +0 -1
  158. package/dist/api/groupContactsApi.d.ts +0 -28
  159. package/dist/api/groupContactsApi.js +0 -507
  160. package/dist/api/groupContactsApi.js.map +0 -1
  161. package/dist/api/identityVerificationApi.d.ts +0 -26
  162. package/dist/api/identityVerificationApi.js +0 -369
  163. package/dist/api/identityVerificationApi.js.map +0 -1
  164. package/dist/api/index.d.ts +0 -14
  165. package/dist/api/index.js +0 -33
  166. package/dist/api/index.js.map +0 -1
  167. package/dist/api/planApi.d.ts +0 -24
  168. package/dist/api/planApi.js +0 -174
  169. package/dist/api/planApi.js.map +0 -1
  170. package/dist/api/senderIdentitiesApi.d.ts +0 -30
  171. package/dist/api/senderIdentitiesApi.js +0 -663
  172. package/dist/api/senderIdentitiesApi.js.map +0 -1
  173. package/dist/api/teamsApi.d.ts +0 -27
  174. package/dist/api/teamsApi.js +0 -426
  175. package/dist/api/teamsApi.js.map +0 -1
  176. package/dist/api/templateApi.d.ts +0 -39
  177. package/dist/api/templateApi.js +0 -1425
  178. package/dist/api/templateApi.js.map +0 -1
  179. package/dist/api/userApi.d.ts +0 -31
  180. package/dist/api/userApi.js +0 -723
  181. package/dist/api/userApi.js.map +0 -1
  182. package/dist/api.d.ts +0 -2
  183. package/dist/api.js +0 -19
  184. package/dist/api.js.map +0 -1
  185. package/dist/model/accessCodeDetail.d.ts +0 -34
  186. package/dist/model/accessCodeDetail.js +0 -68
  187. package/dist/model/accessCodeDetail.js.map +0 -1
  188. package/dist/model/accessCodeDetails.d.ts +0 -17
  189. package/dist/model/accessCodeDetails.js +0 -28
  190. package/dist/model/accessCodeDetails.js.map +0 -1
  191. package/dist/model/added.d.ts +0 -16
  192. package/dist/model/added.js +0 -28
  193. package/dist/model/added.js.map +0 -1
  194. package/dist/model/address.d.ts +0 -19
  195. package/dist/model/address.js +0 -43
  196. package/dist/model/address.js.map +0 -1
  197. package/dist/model/attachmentInfo.d.ts +0 -17
  198. package/dist/model/attachmentInfo.js +0 -33
  199. package/dist/model/attachmentInfo.js.map +0 -1
  200. package/dist/model/auditTrail.d.ts +0 -114
  201. package/dist/model/auditTrail.js +0 -173
  202. package/dist/model/auditTrail.js.map +0 -1
  203. package/dist/model/authenticationSettings.d.ts +0 -22
  204. package/dist/model/authenticationSettings.js +0 -27
  205. package/dist/model/authenticationSettings.js.map +0 -1
  206. package/dist/model/base64File.d.ts +0 -15
  207. package/dist/model/base64File.js +0 -23
  208. package/dist/model/base64File.js.map +0 -1
  209. package/dist/model/behalfDocument.d.ts +0 -47
  210. package/dist/model/behalfDocument.js +0 -120
  211. package/dist/model/behalfDocument.js.map +0 -1
  212. package/dist/model/behalfDocumentRecords.d.ts +0 -17
  213. package/dist/model/behalfDocumentRecords.js +0 -23
  214. package/dist/model/behalfDocumentRecords.js.map +0 -1
  215. package/dist/model/behalfOf.d.ts +0 -15
  216. package/dist/model/behalfOf.js +0 -23
  217. package/dist/model/behalfOf.js.map +0 -1
  218. package/dist/model/billingViewModel.d.ts +0 -14
  219. package/dist/model/billingViewModel.js +0 -18
  220. package/dist/model/billingViewModel.js.map +0 -1
  221. package/dist/model/brandCreated.d.ts +0 -14
  222. package/dist/model/brandCreated.js +0 -18
  223. package/dist/model/brandCreated.js.map +0 -1
  224. package/dist/model/brandCustomFieldDetails.d.ts +0 -20
  225. package/dist/model/brandCustomFieldDetails.js +0 -46
  226. package/dist/model/brandCustomFieldDetails.js.map +0 -1
  227. package/dist/model/brandingMessage.d.ts +0 -14
  228. package/dist/model/brandingMessage.js +0 -18
  229. package/dist/model/brandingMessage.js.map +0 -1
  230. package/dist/model/brandingRecords.d.ts +0 -15
  231. package/dist/model/brandingRecords.js +0 -18
  232. package/dist/model/brandingRecords.js.map +0 -1
  233. package/dist/model/changeRecipient.d.ts +0 -22
  234. package/dist/model/changeRecipient.js +0 -53
  235. package/dist/model/changeRecipient.js.map +0 -1
  236. package/dist/model/changeTeamRequest.d.ts +0 -15
  237. package/dist/model/changeTeamRequest.js +0 -23
  238. package/dist/model/changeTeamRequest.js.map +0 -1
  239. package/dist/model/collaborationSettings.d.ts +0 -17
  240. package/dist/model/collaborationSettings.js +0 -33
  241. package/dist/model/collaborationSettings.js.map +0 -1
  242. package/dist/model/conditionalRule.d.ts +0 -16
  243. package/dist/model/conditionalRule.js +0 -28
  244. package/dist/model/conditionalRule.js.map +0 -1
  245. package/dist/model/contactCreated.d.ts +0 -15
  246. package/dist/model/contactCreated.js +0 -23
  247. package/dist/model/contactCreated.js.map +0 -1
  248. package/dist/model/contactDetails.d.ts +0 -19
  249. package/dist/model/contactDetails.js +0 -38
  250. package/dist/model/contactDetails.js.map +0 -1
  251. package/dist/model/contactPageDetails.d.ts +0 -16
  252. package/dist/model/contactPageDetails.js +0 -28
  253. package/dist/model/contactPageDetails.js.map +0 -1
  254. package/dist/model/contactsDetails.d.ts +0 -20
  255. package/dist/model/contactsDetails.js +0 -43
  256. package/dist/model/contactsDetails.js.map +0 -1
  257. package/dist/model/contactsList.d.ts +0 -17
  258. package/dist/model/contactsList.js +0 -23
  259. package/dist/model/contactsList.js.map +0 -1
  260. package/dist/model/createContactResponse.d.ts +0 -15
  261. package/dist/model/createContactResponse.js +0 -18
  262. package/dist/model/createContactResponse.js.map +0 -1
  263. package/dist/model/createGroupContactResponse.d.ts +0 -15
  264. package/dist/model/createGroupContactResponse.js +0 -23
  265. package/dist/model/createGroupContactResponse.js.map +0 -1
  266. package/dist/model/createSenderIdentityRequest.d.ts +0 -48
  267. package/dist/model/createSenderIdentityRequest.js +0 -74
  268. package/dist/model/createSenderIdentityRequest.js.map +0 -1
  269. package/dist/model/createTeamRequest.d.ts +0 -14
  270. package/dist/model/createTeamRequest.js +0 -18
  271. package/dist/model/createTeamRequest.js.map +0 -1
  272. package/dist/model/createTemplateRequest.d.ts +0 -58
  273. package/dist/model/createTemplateRequest.js +0 -177
  274. package/dist/model/createTemplateRequest.js.map +0 -1
  275. package/dist/model/createUser.d.ts +0 -26
  276. package/dist/model/createUser.js +0 -41
  277. package/dist/model/createUser.js.map +0 -1
  278. package/dist/model/creators.d.ts +0 -15
  279. package/dist/model/creators.js +0 -23
  280. package/dist/model/creators.js.map +0 -1
  281. package/dist/model/customDomainSettings.d.ts +0 -15
  282. package/dist/model/customDomainSettings.js +0 -23
  283. package/dist/model/customDomainSettings.js.map +0 -1
  284. package/dist/model/customFieldCollection.d.ts +0 -15
  285. package/dist/model/customFieldCollection.js +0 -18
  286. package/dist/model/customFieldCollection.js.map +0 -1
  287. package/dist/model/customFieldMessage.d.ts +0 -15
  288. package/dist/model/customFieldMessage.js +0 -23
  289. package/dist/model/customFieldMessage.js.map +0 -1
  290. package/dist/model/customFormField.d.ts +0 -100
  291. package/dist/model/customFormField.js +0 -246
  292. package/dist/model/customFormField.js.map +0 -1
  293. package/dist/model/deleteCustomFieldReply.d.ts +0 -14
  294. package/dist/model/deleteCustomFieldReply.js +0 -18
  295. package/dist/model/deleteCustomFieldReply.js.map +0 -1
  296. package/dist/model/document.d.ts +0 -45
  297. package/dist/model/document.js +0 -115
  298. package/dist/model/document.js.map +0 -1
  299. package/dist/model/documentCC.d.ts +0 -14
  300. package/dist/model/documentCC.js +0 -18
  301. package/dist/model/documentCC.js.map +0 -1
  302. package/dist/model/documentCcDetails.d.ts +0 -15
  303. package/dist/model/documentCcDetails.js +0 -26
  304. package/dist/model/documentCcDetails.js.map +0 -1
  305. package/dist/model/documentCreated.d.ts +0 -14
  306. package/dist/model/documentCreated.js +0 -18
  307. package/dist/model/documentCreated.js.map +0 -1
  308. package/dist/model/documentEdited.d.ts +0 -20
  309. package/dist/model/documentEdited.js +0 -25
  310. package/dist/model/documentEdited.js.map +0 -1
  311. package/dist/model/documentExpirySettings.d.ts +0 -26
  312. package/dist/model/documentExpirySettings.js +0 -51
  313. package/dist/model/documentExpirySettings.js.map +0 -1
  314. package/dist/model/documentFiles.d.ts +0 -19
  315. package/dist/model/documentFiles.js +0 -43
  316. package/dist/model/documentFiles.js.map +0 -1
  317. package/dist/model/documentFormFields.d.ts +0 -89
  318. package/dist/model/documentFormFields.js +0 -260
  319. package/dist/model/documentFormFields.js.map +0 -1
  320. package/dist/model/documentInfo.d.ts +0 -65
  321. package/dist/model/documentInfo.js +0 -83
  322. package/dist/model/documentInfo.js.map +0 -1
  323. package/dist/model/documentProperties.d.ts +0 -119
  324. package/dist/model/documentProperties.js +0 -298
  325. package/dist/model/documentProperties.js.map +0 -1
  326. package/dist/model/documentReassign.d.ts +0 -16
  327. package/dist/model/documentReassign.js +0 -31
  328. package/dist/model/documentReassign.js.map +0 -1
  329. package/dist/model/documentRecords.d.ts +0 -17
  330. package/dist/model/documentRecords.js +0 -23
  331. package/dist/model/documentRecords.js.map +0 -1
  332. package/dist/model/documentSenderDetail.d.ts +0 -17
  333. package/dist/model/documentSenderDetail.js +0 -36
  334. package/dist/model/documentSenderDetail.js.map +0 -1
  335. package/dist/model/documentSigner.d.ts +0 -112
  336. package/dist/model/documentSigner.js +0 -209
  337. package/dist/model/documentSigner.js.map +0 -1
  338. package/dist/model/documentSignerDetails.d.ts +0 -128
  339. package/dist/model/documentSignerDetails.js +0 -261
  340. package/dist/model/documentSignerDetails.js.map +0 -1
  341. package/dist/model/documentTags.d.ts +0 -15
  342. package/dist/model/documentTags.js +0 -23
  343. package/dist/model/documentTags.js.map +0 -1
  344. package/dist/model/downloadImageRequest.d.ts +0 -19
  345. package/dist/model/downloadImageRequest.js +0 -43
  346. package/dist/model/downloadImageRequest.js.map +0 -1
  347. package/dist/model/editDocumentFile.d.ts +0 -25
  348. package/dist/model/editDocumentFile.js +0 -41
  349. package/dist/model/editDocumentFile.js.map +0 -1
  350. package/dist/model/editDocumentRequest.d.ts +0 -71
  351. package/dist/model/editDocumentRequest.js +0 -187
  352. package/dist/model/editDocumentRequest.js.map +0 -1
  353. package/dist/model/editDocumentSigner.d.ts +0 -118
  354. package/dist/model/editDocumentSigner.js +0 -220
  355. package/dist/model/editDocumentSigner.js.map +0 -1
  356. package/dist/model/editFormField.d.ts +0 -116
  357. package/dist/model/editFormField.js +0 -288
  358. package/dist/model/editFormField.js.map +0 -1
  359. package/dist/model/editSenderIdentityRequest.d.ts +0 -46
  360. package/dist/model/editSenderIdentityRequest.js +0 -64
  361. package/dist/model/editSenderIdentityRequest.js.map +0 -1
  362. package/dist/model/editTemplateRequest.d.ts +0 -51
  363. package/dist/model/editTemplateRequest.js +0 -141
  364. package/dist/model/editTemplateRequest.js.map +0 -1
  365. package/dist/model/editableDateFieldSettings.d.ts +0 -17
  366. package/dist/model/editableDateFieldSettings.js +0 -33
  367. package/dist/model/editableDateFieldSettings.js.map +0 -1
  368. package/dist/model/embeddedCreateTemplateRequest.d.ts +0 -96
  369. package/dist/model/embeddedCreateTemplateRequest.js +0 -269
  370. package/dist/model/embeddedCreateTemplateRequest.js.map +0 -1
  371. package/dist/model/embeddedCustomFieldCreated.d.ts +0 -14
  372. package/dist/model/embeddedCustomFieldCreated.js +0 -18
  373. package/dist/model/embeddedCustomFieldCreated.js.map +0 -1
  374. package/dist/model/embeddedDocumentEditJsonRequest.d.ts +0 -51
  375. package/dist/model/embeddedDocumentEditJsonRequest.js +0 -97
  376. package/dist/model/embeddedDocumentEditJsonRequest.js.map +0 -1
  377. package/dist/model/embeddedDocumentEdited.d.ts +0 -14
  378. package/dist/model/embeddedDocumentEdited.js +0 -18
  379. package/dist/model/embeddedDocumentEdited.js.map +0 -1
  380. package/dist/model/embeddedDocumentRequest.d.ts +0 -115
  381. package/dist/model/embeddedDocumentRequest.js +0 -322
  382. package/dist/model/embeddedDocumentRequest.js.map +0 -1
  383. package/dist/model/embeddedFileDetails.d.ts +0 -19
  384. package/dist/model/embeddedFileDetails.js +0 -43
  385. package/dist/model/embeddedFileDetails.js.map +0 -1
  386. package/dist/model/embeddedFileLink.d.ts +0 -14
  387. package/dist/model/embeddedFileLink.js +0 -18
  388. package/dist/model/embeddedFileLink.js.map +0 -1
  389. package/dist/model/embeddedMergeTemplateFormRequest.d.ts +0 -116
  390. package/dist/model/embeddedMergeTemplateFormRequest.js +0 -311
  391. package/dist/model/embeddedMergeTemplateFormRequest.js.map +0 -1
  392. package/dist/model/embeddedSendCreated.d.ts +0 -15
  393. package/dist/model/embeddedSendCreated.js +0 -23
  394. package/dist/model/embeddedSendCreated.js.map +0 -1
  395. package/dist/model/embeddedSendTemplateFormRequest.d.ts +0 -112
  396. package/dist/model/embeddedSendTemplateFormRequest.js +0 -296
  397. package/dist/model/embeddedSendTemplateFormRequest.js.map +0 -1
  398. package/dist/model/embeddedSigningLink.d.ts +0 -14
  399. package/dist/model/embeddedSigningLink.js +0 -18
  400. package/dist/model/embeddedSigningLink.js.map +0 -1
  401. package/dist/model/embeddedTemplateCreated.d.ts +0 -15
  402. package/dist/model/embeddedTemplateCreated.js +0 -23
  403. package/dist/model/embeddedTemplateCreated.js.map +0 -1
  404. package/dist/model/embeddedTemplateEditRequest.d.ts +0 -53
  405. package/dist/model/embeddedTemplateEditRequest.js +0 -109
  406. package/dist/model/embeddedTemplateEditRequest.js.map +0 -1
  407. package/dist/model/embeddedTemplateEdited.d.ts +0 -14
  408. package/dist/model/embeddedTemplateEdited.js +0 -18
  409. package/dist/model/embeddedTemplateEdited.js.map +0 -1
  410. package/dist/model/embeddedTemplatePreview.d.ts +0 -14
  411. package/dist/model/embeddedTemplatePreview.js +0 -18
  412. package/dist/model/embeddedTemplatePreview.js.map +0 -1
  413. package/dist/model/embeddedTemplatePreviewJsonRequest.d.ts +0 -15
  414. package/dist/model/embeddedTemplatePreviewJsonRequest.js +0 -23
  415. package/dist/model/embeddedTemplatePreviewJsonRequest.js.map +0 -1
  416. package/dist/model/errorResponse.d.ts +0 -15
  417. package/dist/model/errorResponse.js +0 -23
  418. package/dist/model/errorResponse.js.map +0 -1
  419. package/dist/model/errorResult.d.ts +0 -14
  420. package/dist/model/errorResult.js +0 -18
  421. package/dist/model/errorResult.js.map +0 -1
  422. package/dist/model/existingFormField.d.ts +0 -18
  423. package/dist/model/existingFormField.js +0 -38
  424. package/dist/model/existingFormField.js.map +0 -1
  425. package/dist/model/extendExpiry.d.ts +0 -17
  426. package/dist/model/extendExpiry.js +0 -33
  427. package/dist/model/extendExpiry.js.map +0 -1
  428. package/dist/model/fileInfo.d.ts +0 -17
  429. package/dist/model/fileInfo.js +0 -33
  430. package/dist/model/fileInfo.js.map +0 -1
  431. package/dist/model/font.d.ts +0 -36
  432. package/dist/model/font.js +0 -70
  433. package/dist/model/font.js.map +0 -1
  434. package/dist/model/formField.d.ts +0 -113
  435. package/dist/model/formField.js +0 -287
  436. package/dist/model/formField.js.map +0 -1
  437. package/dist/model/formFieldPermission.d.ts +0 -16
  438. package/dist/model/formFieldPermission.js +0 -28
  439. package/dist/model/formFieldPermission.js.map +0 -1
  440. package/dist/model/formGroup.d.ts +0 -26
  441. package/dist/model/formGroup.js +0 -47
  442. package/dist/model/formGroup.js.map +0 -1
  443. package/dist/model/formulaFieldSettings.d.ts +0 -15
  444. package/dist/model/formulaFieldSettings.js +0 -26
  445. package/dist/model/formulaFieldSettings.js.map +0 -1
  446. package/dist/model/getGroupContactDetails.d.ts +0 -20
  447. package/dist/model/getGroupContactDetails.js +0 -38
  448. package/dist/model/getGroupContactDetails.js.map +0 -1
  449. package/dist/model/groupContact.d.ts +0 -18
  450. package/dist/model/groupContact.js +0 -33
  451. package/dist/model/groupContact.js.map +0 -1
  452. package/dist/model/groupContactDetails.d.ts +0 -17
  453. package/dist/model/groupContactDetails.js +0 -28
  454. package/dist/model/groupContactDetails.js.map +0 -1
  455. package/dist/model/groupContactsList.d.ts +0 -17
  456. package/dist/model/groupContactsList.js +0 -23
  457. package/dist/model/groupContactsList.js.map +0 -1
  458. package/dist/model/groupSigner.d.ts +0 -30
  459. package/dist/model/groupSigner.js +0 -59
  460. package/dist/model/groupSigner.js.map +0 -1
  461. package/dist/model/groupSignerSettings.d.ts +0 -15
  462. package/dist/model/groupSignerSettings.js +0 -23
  463. package/dist/model/groupSignerSettings.js.map +0 -1
  464. package/dist/model/groupUser.d.ts +0 -15
  465. package/dist/model/groupUser.js +0 -23
  466. package/dist/model/groupUser.js.map +0 -1
  467. package/dist/model/idDocument.d.ts +0 -26
  468. package/dist/model/idDocument.js +0 -68
  469. package/dist/model/idDocument.js.map +0 -1
  470. package/dist/model/idReport.d.ts +0 -18
  471. package/dist/model/idReport.js +0 -33
  472. package/dist/model/idReport.js.map +0 -1
  473. package/dist/model/idVerification.d.ts +0 -22
  474. package/dist/model/idVerification.js +0 -58
  475. package/dist/model/idVerification.js.map +0 -1
  476. package/dist/model/idVerificationDetails.d.ts +0 -23
  477. package/dist/model/idVerificationDetails.js +0 -63
  478. package/dist/model/idVerificationDetails.js.map +0 -1
  479. package/dist/model/identityVerificationSettings.d.ts +0 -37
  480. package/dist/model/identityVerificationSettings.js +0 -68
  481. package/dist/model/identityVerificationSettings.js.map +0 -1
  482. package/dist/model/imageInfo.d.ts +0 -16
  483. package/dist/model/imageInfo.js +0 -28
  484. package/dist/model/imageInfo.js.map +0 -1
  485. package/dist/model/index.d.ts +0 -174
  486. package/dist/model/index.js +0 -665
  487. package/dist/model/index.js.map +0 -1
  488. package/dist/model/mergeAndSendForSignForm.d.ts +0 -79
  489. package/dist/model/mergeAndSendForSignForm.js +0 -232
  490. package/dist/model/mergeAndSendForSignForm.js.map +0 -1
  491. package/dist/model/modelDate.d.ts +0 -16
  492. package/dist/model/modelDate.js +0 -28
  493. package/dist/model/modelDate.js.map +0 -1
  494. package/dist/model/modelError.d.ts +0 -15
  495. package/dist/model/modelError.js +0 -23
  496. package/dist/model/modelError.js.map +0 -1
  497. package/dist/model/models.d.ts +0 -56
  498. package/dist/model/models.js +0 -212
  499. package/dist/model/models.js.map +0 -1
  500. package/dist/model/modificationDetails.d.ts +0 -15
  501. package/dist/model/modificationDetails.js +0 -23
  502. package/dist/model/modificationDetails.js.map +0 -1
  503. package/dist/model/notificationSettings.d.ts +0 -25
  504. package/dist/model/notificationSettings.js +0 -87
  505. package/dist/model/notificationSettings.js.map +0 -1
  506. package/dist/model/pageDetails.d.ts +0 -19
  507. package/dist/model/pageDetails.js +0 -43
  508. package/dist/model/pageDetails.js.map +0 -1
  509. package/dist/model/phoneNumber.d.ts +0 -15
  510. package/dist/model/phoneNumber.js +0 -23
  511. package/dist/model/phoneNumber.js.map +0 -1
  512. package/dist/model/prefillField.d.ts +0 -15
  513. package/dist/model/prefillField.js +0 -23
  514. package/dist/model/prefillField.js.map +0 -1
  515. package/dist/model/prefillFieldRequest.d.ts +0 -16
  516. package/dist/model/prefillFieldRequest.js +0 -23
  517. package/dist/model/prefillFieldRequest.js.map +0 -1
  518. package/dist/model/problemDetails.d.ts +0 -18
  519. package/dist/model/problemDetails.js +0 -38
  520. package/dist/model/problemDetails.js.map +0 -1
  521. package/dist/model/recipientChangeLog.d.ts +0 -17
  522. package/dist/model/recipientChangeLog.js +0 -23
  523. package/dist/model/recipientChangeLog.js.map +0 -1
  524. package/dist/model/recipientNotificationSettings.d.ts +0 -25
  525. package/dist/model/recipientNotificationSettings.js +0 -86
  526. package/dist/model/recipientNotificationSettings.js.map +0 -1
  527. package/dist/model/rectangle.d.ts +0 -17
  528. package/dist/model/rectangle.js +0 -39
  529. package/dist/model/rectangle.js.map +0 -1
  530. package/dist/model/reminderMessage.d.ts +0 -17
  531. package/dist/model/reminderMessage.js +0 -28
  532. package/dist/model/reminderMessage.js.map +0 -1
  533. package/dist/model/reminderSettings.d.ts +0 -16
  534. package/dist/model/reminderSettings.js +0 -33
  535. package/dist/model/reminderSettings.js.map +0 -1
  536. package/dist/model/removeAuthentication.d.ts +0 -18
  537. package/dist/model/removeAuthentication.js +0 -33
  538. package/dist/model/removeAuthentication.js.map +0 -1
  539. package/dist/model/removed.d.ts +0 -16
  540. package/dist/model/removed.js +0 -28
  541. package/dist/model/removed.js.map +0 -1
  542. package/dist/model/revokeDocument.d.ts +0 -15
  543. package/dist/model/revokeDocument.js +0 -23
  544. package/dist/model/revokeDocument.js.map +0 -1
  545. package/dist/model/role.d.ts +0 -114
  546. package/dist/model/role.js +0 -214
  547. package/dist/model/role.js.map +0 -1
  548. package/dist/model/roles.d.ts +0 -113
  549. package/dist/model/roles.js +0 -219
  550. package/dist/model/roles.js.map +0 -1
  551. package/dist/model/sendForSign.d.ts +0 -78
  552. package/dist/model/sendForSign.js +0 -235
  553. package/dist/model/sendForSign.js.map +0 -1
  554. package/dist/model/sendForSignFromTemplateForm.d.ts +0 -75
  555. package/dist/model/sendForSignFromTemplateForm.js +0 -217
  556. package/dist/model/sendForSignFromTemplateForm.js.map +0 -1
  557. package/dist/model/senderIdentityCreated.d.ts +0 -14
  558. package/dist/model/senderIdentityCreated.js +0 -18
  559. package/dist/model/senderIdentityCreated.js.map +0 -1
  560. package/dist/model/senderIdentityList.d.ts +0 -17
  561. package/dist/model/senderIdentityList.js +0 -23
  562. package/dist/model/senderIdentityList.js.map +0 -1
  563. package/dist/model/senderIdentityViewModel.d.ts +0 -27
  564. package/dist/model/senderIdentityViewModel.js +0 -68
  565. package/dist/model/senderIdentityViewModel.js.map +0 -1
  566. package/dist/model/signatureFrameSettings.d.ts +0 -17
  567. package/dist/model/signatureFrameSettings.js +0 -39
  568. package/dist/model/signatureFrameSettings.js.map +0 -1
  569. package/dist/model/signerAuthenticationSettings.d.ts +0 -15
  570. package/dist/model/signerAuthenticationSettings.js +0 -23
  571. package/dist/model/signerAuthenticationSettings.js.map +0 -1
  572. package/dist/model/size.d.ts +0 -15
  573. package/dist/model/size.js +0 -27
  574. package/dist/model/size.js.map +0 -1
  575. package/dist/model/teamCreated.d.ts +0 -14
  576. package/dist/model/teamCreated.js +0 -18
  577. package/dist/model/teamCreated.js.map +0 -1
  578. package/dist/model/teamDocumentRecords.d.ts +0 -17
  579. package/dist/model/teamDocumentRecords.js +0 -23
  580. package/dist/model/teamDocumentRecords.js.map +0 -1
  581. package/dist/model/teamListResponse.d.ts +0 -17
  582. package/dist/model/teamListResponse.js +0 -23
  583. package/dist/model/teamListResponse.js.map +0 -1
  584. package/dist/model/teamPageDetails.d.ts +0 -15
  585. package/dist/model/teamPageDetails.js +0 -23
  586. package/dist/model/teamPageDetails.js.map +0 -1
  587. package/dist/model/teamResponse.d.ts +0 -19
  588. package/dist/model/teamResponse.js +0 -38
  589. package/dist/model/teamResponse.js.map +0 -1
  590. package/dist/model/teamUpdateRequest.d.ts +0 -15
  591. package/dist/model/teamUpdateRequest.js +0 -23
  592. package/dist/model/teamUpdateRequest.js.map +0 -1
  593. package/dist/model/teamUsers.d.ts +0 -31
  594. package/dist/model/teamUsers.js +0 -57
  595. package/dist/model/teamUsers.js.map +0 -1
  596. package/dist/model/teams.d.ts +0 -17
  597. package/dist/model/teams.js +0 -33
  598. package/dist/model/teams.js.map +0 -1
  599. package/dist/model/template.d.ts +0 -52
  600. package/dist/model/template.js +0 -129
  601. package/dist/model/template.js.map +0 -1
  602. package/dist/model/templateCC.d.ts +0 -15
  603. package/dist/model/templateCC.js +0 -23
  604. package/dist/model/templateCC.js.map +0 -1
  605. package/dist/model/templateCreated.d.ts +0 -14
  606. package/dist/model/templateCreated.js +0 -18
  607. package/dist/model/templateCreated.js.map +0 -1
  608. package/dist/model/templateFiles.d.ts +0 -17
  609. package/dist/model/templateFiles.js +0 -33
  610. package/dist/model/templateFiles.js.map +0 -1
  611. package/dist/model/templateFormFields.d.ts +0 -88
  612. package/dist/model/templateFormFields.js +0 -260
  613. package/dist/model/templateFormFields.js.map +0 -1
  614. package/dist/model/templateGroupSigner.d.ts +0 -15
  615. package/dist/model/templateGroupSigner.js +0 -23
  616. package/dist/model/templateGroupSigner.js.map +0 -1
  617. package/dist/model/templateProperties.d.ts +0 -68
  618. package/dist/model/templateProperties.js +0 -186
  619. package/dist/model/templateProperties.js.map +0 -1
  620. package/dist/model/templateRecords.d.ts +0 -17
  621. package/dist/model/templateRecords.js +0 -23
  622. package/dist/model/templateRecords.js.map +0 -1
  623. package/dist/model/templateRole.d.ts +0 -106
  624. package/dist/model/templateRole.js +0 -189
  625. package/dist/model/templateRole.js.map +0 -1
  626. package/dist/model/templateSenderDetail.d.ts +0 -15
  627. package/dist/model/templateSenderDetail.js +0 -23
  628. package/dist/model/templateSenderDetail.js.map +0 -1
  629. package/dist/model/templateSenderDetails.d.ts +0 -16
  630. package/dist/model/templateSenderDetails.js +0 -28
  631. package/dist/model/templateSenderDetails.js.map +0 -1
  632. package/dist/model/templateShareErrorResponse.d.ts +0 -17
  633. package/dist/model/templateShareErrorResponse.js +0 -33
  634. package/dist/model/templateShareErrorResponse.js.map +0 -1
  635. package/dist/model/templateShareRequest.d.ts +0 -15
  636. package/dist/model/templateShareRequest.js +0 -18
  637. package/dist/model/templateShareRequest.js.map +0 -1
  638. package/dist/model/templateSharedTemplateDetail.d.ts +0 -21
  639. package/dist/model/templateSharedTemplateDetail.js +0 -30
  640. package/dist/model/templateSharedTemplateDetail.js.map +0 -1
  641. package/dist/model/templateSharing.d.ts +0 -15
  642. package/dist/model/templateSharing.js +0 -18
  643. package/dist/model/templateSharing.js.map +0 -1
  644. package/dist/model/templateSignerDetails.d.ts +0 -66
  645. package/dist/model/templateSignerDetails.js +0 -149
  646. package/dist/model/templateSignerDetails.js.map +0 -1
  647. package/dist/model/templateTag.d.ts +0 -17
  648. package/dist/model/templateTag.js +0 -33
  649. package/dist/model/templateTag.js.map +0 -1
  650. package/dist/model/templateTeamShare.d.ts +0 -22
  651. package/dist/model/templateTeamShare.js +0 -31
  652. package/dist/model/templateTeamShare.js.map +0 -1
  653. package/dist/model/templateTeamShareRequest.d.ts +0 -26
  654. package/dist/model/templateTeamShareRequest.js +0 -40
  655. package/dist/model/templateTeamShareRequest.js.map +0 -1
  656. package/dist/model/textTagDefinition.d.ts +0 -91
  657. package/dist/model/textTagDefinition.js +0 -221
  658. package/dist/model/textTagDefinition.js.map +0 -1
  659. package/dist/model/textTagOffset.d.ts +0 -15
  660. package/dist/model/textTagOffset.js +0 -23
  661. package/dist/model/textTagOffset.js.map +0 -1
  662. package/dist/model/updateGroupContact.d.ts +0 -17
  663. package/dist/model/updateGroupContact.js +0 -28
  664. package/dist/model/updateGroupContact.js.map +0 -1
  665. package/dist/model/updateUser.d.ts +0 -28
  666. package/dist/model/updateUser.js +0 -46
  667. package/dist/model/updateUser.js.map +0 -1
  668. package/dist/model/updateUserMetaData.d.ts +0 -17
  669. package/dist/model/updateUserMetaData.js +0 -23
  670. package/dist/model/updateUserMetaData.js.map +0 -1
  671. package/dist/model/userPageDetails.d.ts +0 -15
  672. package/dist/model/userPageDetails.js +0 -23
  673. package/dist/model/userPageDetails.js.map +0 -1
  674. package/dist/model/userProperties.d.ts +0 -26
  675. package/dist/model/userProperties.js +0 -68
  676. package/dist/model/userProperties.js.map +0 -1
  677. package/dist/model/userRecords.d.ts +0 -17
  678. package/dist/model/userRecords.js +0 -23
  679. package/dist/model/userRecords.js.map +0 -1
  680. package/dist/model/usersDetails.d.ts +0 -26
  681. package/dist/model/usersDetails.js +0 -68
  682. package/dist/model/usersDetails.js.map +0 -1
  683. package/dist/model/validation.d.ts +0 -25
  684. package/dist/model/validation.js +0 -38
  685. package/dist/model/validation.js.map +0 -1
  686. package/dist/model/verificationDataRequest.d.ts +0 -18
  687. package/dist/model/verificationDataRequest.js +0 -38
  688. package/dist/model/verificationDataRequest.js.map +0 -1
  689. package/dist/model/viewBrandDetails.d.ts +0 -48
  690. package/dist/model/viewBrandDetails.js +0 -150
  691. package/dist/model/viewBrandDetails.js.map +0 -1
  692. package/dist/model/viewCustomFieldDetails.d.ts +0 -21
  693. package/dist/model/viewCustomFieldDetails.js +0 -48
  694. package/dist/model/viewCustomFieldDetails.js.map +0 -1
@@ -1,2259 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.DocumentApi = void 0;
16
- const axios_1 = __importDefault(require("axios"));
17
- const model_1 = require("../model");
18
- const _1 = require("./");
19
- let defaultBasePath = 'https://api.boldsign.com';
20
- class DocumentApi {
21
- constructor(basePath) {
22
- this._basePath = defaultBasePath;
23
- this._defaultHeaders = { 'User-Agent': _1.USER_AGENT };
24
- this._useQuerystring = true;
25
- this.authentications = {
26
- 'default': new model_1.VoidAuth(),
27
- 'Bearer': new model_1.ApiKeyAuth('header', 'Authorization'),
28
- 'X-API-KEY': new model_1.ApiKeyAuth('header', 'X-API-KEY'),
29
- };
30
- this.interceptors = [];
31
- if (basePath) {
32
- this.basePath = basePath;
33
- }
34
- }
35
- set useQuerystring(value) {
36
- this._useQuerystring = value;
37
- }
38
- set basePath(basePath) {
39
- this._basePath = basePath;
40
- }
41
- set defaultHeaders(defaultHeaders) {
42
- this._defaultHeaders = Object.assign(Object.assign({}, defaultHeaders), { "User-Agent": _1.USER_AGENT });
43
- }
44
- get defaultHeaders() {
45
- return this._defaultHeaders;
46
- }
47
- get basePath() {
48
- return this._basePath;
49
- }
50
- setDefaultAuthentication(auth) {
51
- this.authentications.default = auth;
52
- }
53
- setApiKey(apikey) {
54
- this.authentications["X-API-KEY"].apiKey = apikey;
55
- }
56
- setAccessToken(accessToken) {
57
- this.authentications["Bearer"].apiKey = 'bearer ' + accessToken;
58
- }
59
- addInterceptor(interceptor) {
60
- this.interceptors.push(interceptor);
61
- }
62
- addAuthentication(documentId_1, accessCodeDetail_1) {
63
- return __awaiter(this, arguments, void 0, function* (documentId, accessCodeDetail, options = { headers: {} }) {
64
- accessCodeDetail = deserializeIfNeeded(accessCodeDetail, "AccessCodeDetail");
65
- const localVarPath = this.basePath + '/v1/document/addAuthentication';
66
- let localVarQueryParameters = {};
67
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
68
- const produces = ['application/json'];
69
- if (produces.indexOf('application/json') >= 0) {
70
- localVarHeaderParams['content-type'] = 'application/json';
71
- }
72
- else {
73
- localVarHeaderParams['content-type'] = produces.join(',');
74
- }
75
- let localVarFormParams = {};
76
- let localVarBodyParams = undefined;
77
- if (documentId === null || documentId === undefined) {
78
- throw new Error('Required parameter documentId was null or undefined when calling addAuthentication.');
79
- }
80
- if (documentId !== undefined) {
81
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
82
- }
83
- Object.assign(localVarHeaderParams, options.headers);
84
- let localVarUseFormData = false;
85
- const result = (0, _1.generateFormData)(accessCodeDetail, model_1.AccessCodeDetail);
86
- localVarUseFormData = result.localVarUseFormData;
87
- let data = {};
88
- if (localVarUseFormData) {
89
- const formData = (0, _1.toFormData)(result.data);
90
- data = formData;
91
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
92
- }
93
- else {
94
- data = model_1.ObjectSerializer.serialize(accessCodeDetail, "AccessCodeDetail");
95
- }
96
- let localVarRequestOptions = {
97
- method: 'PATCH',
98
- params: localVarQueryParameters,
99
- headers: localVarHeaderParams,
100
- url: localVarPath,
101
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
102
- maxContentLength: Infinity,
103
- maxBodyLength: Infinity,
104
- responseType: "json",
105
- };
106
- if (localVarRequestOptions.method !== 'GET') {
107
- localVarRequestOptions.data = data;
108
- }
109
- let authenticationPromise = Promise.resolve();
110
- if (this.authentications["X-API-KEY"].apiKey) {
111
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
112
- }
113
- if (this.authentications["Bearer"].apiKey) {
114
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
115
- }
116
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
117
- let interceptorPromise = authenticationPromise;
118
- for (const interceptor of this.interceptors) {
119
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
120
- }
121
- return interceptorPromise.then(() => {
122
- return new Promise((resolve, reject) => {
123
- axios_1.default.request(localVarRequestOptions)
124
- .then((response) => {
125
- handleSuccessfulResponse(resolve, reject, response);
126
- }, (error) => {
127
- if (error.response == null) {
128
- reject(error);
129
- return;
130
- }
131
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
132
- return;
133
- }
134
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
135
- return;
136
- }
137
- reject(error);
138
- });
139
- });
140
- });
141
- });
142
- }
143
- addTag(documentTags_1) {
144
- return __awaiter(this, arguments, void 0, function* (documentTags, options = { headers: {} }) {
145
- documentTags = deserializeIfNeeded(documentTags, "DocumentTags");
146
- const localVarPath = this.basePath + '/v1/document/addTags';
147
- let localVarQueryParameters = {};
148
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
149
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
150
- if (produces.indexOf('application/json') >= 0) {
151
- localVarHeaderParams['content-type'] = 'application/json';
152
- }
153
- else {
154
- localVarHeaderParams['content-type'] = produces.join(',');
155
- }
156
- let localVarFormParams = {};
157
- let localVarBodyParams = undefined;
158
- Object.assign(localVarHeaderParams, options.headers);
159
- let localVarUseFormData = false;
160
- const result = (0, _1.generateFormData)(documentTags, model_1.DocumentTags);
161
- localVarUseFormData = result.localVarUseFormData;
162
- let data = {};
163
- if (localVarUseFormData) {
164
- const formData = (0, _1.toFormData)(result.data);
165
- data = formData;
166
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
167
- }
168
- else {
169
- data = model_1.ObjectSerializer.serialize(documentTags, "DocumentTags");
170
- }
171
- let localVarRequestOptions = {
172
- method: 'PATCH',
173
- params: localVarQueryParameters,
174
- headers: localVarHeaderParams,
175
- url: localVarPath,
176
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
177
- maxContentLength: Infinity,
178
- maxBodyLength: Infinity,
179
- responseType: "json",
180
- };
181
- if (localVarRequestOptions.method !== 'GET') {
182
- localVarRequestOptions.data = data;
183
- }
184
- let authenticationPromise = Promise.resolve();
185
- if (this.authentications["X-API-KEY"].apiKey) {
186
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
187
- }
188
- if (this.authentications["Bearer"].apiKey) {
189
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
190
- }
191
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
192
- let interceptorPromise = authenticationPromise;
193
- for (const interceptor of this.interceptors) {
194
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
195
- }
196
- return interceptorPromise.then(() => {
197
- return new Promise((resolve, reject) => {
198
- axios_1.default.request(localVarRequestOptions)
199
- .then((response) => {
200
- handleSuccessfulResponse(resolve, reject, response);
201
- }, (error) => {
202
- if (error.response == null) {
203
- reject(error);
204
- return;
205
- }
206
- if (handleErrorCodeResponse(reject, error.response, 400, "ErrorResult")) {
207
- return;
208
- }
209
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
210
- return;
211
- }
212
- reject(error);
213
- });
214
- });
215
- });
216
- });
217
- }
218
- behalfDocuments(page_1, pageType_1, emailAddress_1, signers_1, pageSize_1, startDate_1, status_1, endDate_1, searchKey_1, labels_1, nextCursor_1, brandIds_1) {
219
- return __awaiter(this, arguments, void 0, function* (page, pageType, emailAddress, signers, pageSize, startDate, status, endDate, searchKey, labels, nextCursor, brandIds, options = { headers: {} }) {
220
- const localVarPath = this.basePath + '/v1/document/behalfList';
221
- let localVarQueryParameters = {};
222
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
223
- const produces = ['application/json'];
224
- if (produces.indexOf('application/json') >= 0) {
225
- localVarHeaderParams['content-type'] = 'application/json';
226
- }
227
- else {
228
- localVarHeaderParams['content-type'] = produces.join(',');
229
- }
230
- let localVarFormParams = {};
231
- let localVarBodyParams = undefined;
232
- if (page === null || page === undefined) {
233
- throw new Error('Required parameter page was null or undefined when calling behalfDocuments.');
234
- }
235
- if (pageType !== undefined) {
236
- localVarQueryParameters['PageType'] = model_1.ObjectSerializer.serialize(pageType, "'BehalfOfOthers' | 'BehalfOfMe'");
237
- }
238
- if (emailAddress !== undefined) {
239
- localVarQueryParameters['EmailAddress'] = model_1.ObjectSerializer.serialize(emailAddress, "Array<string>");
240
- }
241
- if (signers !== undefined) {
242
- localVarQueryParameters['Signers'] = model_1.ObjectSerializer.serialize(signers, "Array<string>");
243
- }
244
- if (pageSize !== undefined) {
245
- localVarQueryParameters['PageSize'] = model_1.ObjectSerializer.serialize(pageSize, "number");
246
- }
247
- if (page !== undefined) {
248
- localVarQueryParameters['Page'] = model_1.ObjectSerializer.serialize(page, "number");
249
- }
250
- if (startDate !== undefined) {
251
- localVarQueryParameters['StartDate'] = model_1.ObjectSerializer.serialize(startDate, "Date");
252
- }
253
- if (status !== undefined) {
254
- localVarQueryParameters['Status'] = model_1.ObjectSerializer.serialize(status, "Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft' | 'Scheduled'>");
255
- }
256
- if (endDate !== undefined) {
257
- localVarQueryParameters['EndDate'] = model_1.ObjectSerializer.serialize(endDate, "Date");
258
- }
259
- if (searchKey !== undefined) {
260
- localVarQueryParameters['SearchKey'] = model_1.ObjectSerializer.serialize(searchKey, "string");
261
- }
262
- if (labels !== undefined) {
263
- localVarQueryParameters['Labels'] = model_1.ObjectSerializer.serialize(labels, "Array<string>");
264
- }
265
- if (nextCursor !== undefined) {
266
- localVarQueryParameters['NextCursor'] = model_1.ObjectSerializer.serialize(nextCursor, "number");
267
- }
268
- if (brandIds !== undefined) {
269
- localVarQueryParameters['BrandIds'] = model_1.ObjectSerializer.serialize(brandIds, "Array<string>");
270
- }
271
- Object.assign(localVarHeaderParams, options.headers);
272
- let localVarUseFormData = false;
273
- let data = {};
274
- if (localVarUseFormData) {
275
- const formData = (0, _1.toFormData)(localVarFormParams);
276
- data = formData;
277
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
278
- }
279
- let localVarRequestOptions = {
280
- method: 'GET',
281
- params: localVarQueryParameters,
282
- headers: localVarHeaderParams,
283
- url: localVarPath,
284
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
285
- maxContentLength: Infinity,
286
- maxBodyLength: Infinity,
287
- responseType: "json",
288
- };
289
- if (localVarRequestOptions.method !== 'GET') {
290
- localVarRequestOptions.data = data;
291
- }
292
- let authenticationPromise = Promise.resolve();
293
- if (this.authentications["X-API-KEY"].apiKey) {
294
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
295
- }
296
- if (this.authentications["Bearer"].apiKey) {
297
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
298
- }
299
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
300
- let interceptorPromise = authenticationPromise;
301
- for (const interceptor of this.interceptors) {
302
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
303
- }
304
- return interceptorPromise.then(() => {
305
- return new Promise((resolve, reject) => {
306
- axios_1.default.request(localVarRequestOptions)
307
- .then((response) => {
308
- handleSuccessfulResponse(resolve, reject, response, "BehalfDocumentRecords");
309
- }, (error) => {
310
- if (error.response == null) {
311
- reject(error);
312
- return;
313
- }
314
- if (handleErrorCodeResponse(reject, error.response, 200, "BehalfDocumentRecords")) {
315
- return;
316
- }
317
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
318
- return;
319
- }
320
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
321
- return;
322
- }
323
- reject(error);
324
- });
325
- });
326
- });
327
- });
328
- }
329
- cancelEditing(documentId_1, onBehalfOf_1) {
330
- return __awaiter(this, arguments, void 0, function* (documentId, onBehalfOf, options = { headers: {} }) {
331
- const localVarPath = this.basePath + '/v1/document/cancelEditing';
332
- let localVarQueryParameters = {};
333
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
334
- const produces = ['application/json'];
335
- if (produces.indexOf('application/json') >= 0) {
336
- localVarHeaderParams['content-type'] = 'application/json';
337
- }
338
- else {
339
- localVarHeaderParams['content-type'] = produces.join(',');
340
- }
341
- let localVarFormParams = {};
342
- let localVarBodyParams = undefined;
343
- if (documentId === null || documentId === undefined) {
344
- throw new Error('Required parameter documentId was null or undefined when calling cancelEditing.');
345
- }
346
- if (documentId !== undefined) {
347
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
348
- }
349
- if (onBehalfOf !== undefined) {
350
- localVarQueryParameters['onBehalfOf'] = model_1.ObjectSerializer.serialize(onBehalfOf, "string");
351
- }
352
- Object.assign(localVarHeaderParams, options.headers);
353
- let localVarUseFormData = false;
354
- let data = {};
355
- if (localVarUseFormData) {
356
- const formData = (0, _1.toFormData)(localVarFormParams);
357
- data = formData;
358
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
359
- }
360
- let localVarRequestOptions = {
361
- method: 'POST',
362
- params: localVarQueryParameters,
363
- headers: localVarHeaderParams,
364
- url: localVarPath,
365
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
366
- maxContentLength: Infinity,
367
- maxBodyLength: Infinity,
368
- responseType: "json",
369
- };
370
- if (localVarRequestOptions.method !== 'GET') {
371
- localVarRequestOptions.data = data;
372
- }
373
- let authenticationPromise = Promise.resolve();
374
- if (this.authentications["X-API-KEY"].apiKey) {
375
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
376
- }
377
- if (this.authentications["Bearer"].apiKey) {
378
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
379
- }
380
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
381
- let interceptorPromise = authenticationPromise;
382
- for (const interceptor of this.interceptors) {
383
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
384
- }
385
- return interceptorPromise.then(() => {
386
- return new Promise((resolve, reject) => {
387
- axios_1.default.request(localVarRequestOptions)
388
- .then((response) => {
389
- handleSuccessfulResponse(resolve, reject, response);
390
- }, (error) => {
391
- if (error.response == null) {
392
- reject(error);
393
- return;
394
- }
395
- if (handleErrorCodeResponse(reject, error.response, 400, "ErrorResult")) {
396
- return;
397
- }
398
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
399
- return;
400
- }
401
- reject(error);
402
- });
403
- });
404
- });
405
- });
406
- }
407
- changeAccessCode(documentId_1, accessCodeDetails_1, emailId_1, zOrder_1) {
408
- return __awaiter(this, arguments, void 0, function* (documentId, accessCodeDetails, emailId, zOrder, options = { headers: {} }) {
409
- accessCodeDetails = deserializeIfNeeded(accessCodeDetails, "AccessCodeDetails");
410
- const localVarPath = this.basePath + '/v1/document/changeAccessCode';
411
- let localVarQueryParameters = {};
412
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
413
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
414
- if (produces.indexOf('application/json') >= 0) {
415
- localVarHeaderParams['content-type'] = 'application/json';
416
- }
417
- else {
418
- localVarHeaderParams['content-type'] = produces.join(',');
419
- }
420
- let localVarFormParams = {};
421
- let localVarBodyParams = undefined;
422
- if (documentId === null || documentId === undefined) {
423
- throw new Error('Required parameter documentId was null or undefined when calling changeAccessCode.');
424
- }
425
- if (accessCodeDetails === null || accessCodeDetails === undefined) {
426
- throw new Error('Required parameter accessCodeDetails was null or undefined when calling changeAccessCode.');
427
- }
428
- if (documentId !== undefined) {
429
- localVarQueryParameters['DocumentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
430
- }
431
- if (emailId !== undefined) {
432
- localVarQueryParameters['EmailId'] = model_1.ObjectSerializer.serialize(emailId, "string");
433
- }
434
- if (zOrder !== undefined) {
435
- localVarQueryParameters['ZOrder'] = model_1.ObjectSerializer.serialize(zOrder, "number");
436
- }
437
- Object.assign(localVarHeaderParams, options.headers);
438
- let localVarUseFormData = false;
439
- const result = (0, _1.generateFormData)(accessCodeDetails, model_1.AccessCodeDetails);
440
- localVarUseFormData = result.localVarUseFormData;
441
- let data = {};
442
- if (localVarUseFormData) {
443
- const formData = (0, _1.toFormData)(result.data);
444
- data = formData;
445
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
446
- }
447
- else {
448
- data = model_1.ObjectSerializer.serialize(accessCodeDetails, "AccessCodeDetails");
449
- }
450
- let localVarRequestOptions = {
451
- method: 'PATCH',
452
- params: localVarQueryParameters,
453
- headers: localVarHeaderParams,
454
- url: localVarPath,
455
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
456
- maxContentLength: Infinity,
457
- maxBodyLength: Infinity,
458
- responseType: "json",
459
- };
460
- if (localVarRequestOptions.method !== 'GET') {
461
- localVarRequestOptions.data = data;
462
- }
463
- let authenticationPromise = Promise.resolve();
464
- if (this.authentications["X-API-KEY"].apiKey) {
465
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
466
- }
467
- if (this.authentications["Bearer"].apiKey) {
468
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
469
- }
470
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
471
- let interceptorPromise = authenticationPromise;
472
- for (const interceptor of this.interceptors) {
473
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
474
- }
475
- return interceptorPromise.then(() => {
476
- return new Promise((resolve, reject) => {
477
- axios_1.default.request(localVarRequestOptions)
478
- .then((response) => {
479
- handleSuccessfulResponse(resolve, reject, response);
480
- }, (error) => {
481
- if (error.response == null) {
482
- reject(error);
483
- return;
484
- }
485
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
486
- return;
487
- }
488
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
489
- return;
490
- }
491
- reject(error);
492
- });
493
- });
494
- });
495
- });
496
- }
497
- changeRecipient(documentId_1, changeRecipient_1) {
498
- return __awaiter(this, arguments, void 0, function* (documentId, changeRecipient, options = { headers: {} }) {
499
- changeRecipient = deserializeIfNeeded(changeRecipient, "ChangeRecipient");
500
- const localVarPath = this.basePath + '/v1/document/changeRecipient';
501
- let localVarQueryParameters = {};
502
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
503
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
504
- if (produces.indexOf('application/json') >= 0) {
505
- localVarHeaderParams['content-type'] = 'application/json';
506
- }
507
- else {
508
- localVarHeaderParams['content-type'] = produces.join(',');
509
- }
510
- let localVarFormParams = {};
511
- let localVarBodyParams = undefined;
512
- if (documentId === null || documentId === undefined) {
513
- throw new Error('Required parameter documentId was null or undefined when calling changeRecipient.');
514
- }
515
- if (changeRecipient === null || changeRecipient === undefined) {
516
- throw new Error('Required parameter changeRecipient was null or undefined when calling changeRecipient.');
517
- }
518
- if (documentId !== undefined) {
519
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
520
- }
521
- Object.assign(localVarHeaderParams, options.headers);
522
- let localVarUseFormData = false;
523
- const result = (0, _1.generateFormData)(changeRecipient, model_1.ChangeRecipient);
524
- localVarUseFormData = result.localVarUseFormData;
525
- let data = {};
526
- if (localVarUseFormData) {
527
- const formData = (0, _1.toFormData)(result.data);
528
- data = formData;
529
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
530
- }
531
- else {
532
- data = model_1.ObjectSerializer.serialize(changeRecipient, "ChangeRecipient");
533
- }
534
- let localVarRequestOptions = {
535
- method: 'PATCH',
536
- params: localVarQueryParameters,
537
- headers: localVarHeaderParams,
538
- url: localVarPath,
539
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
540
- maxContentLength: Infinity,
541
- maxBodyLength: Infinity,
542
- responseType: "json",
543
- };
544
- if (localVarRequestOptions.method !== 'GET') {
545
- localVarRequestOptions.data = data;
546
- }
547
- let authenticationPromise = Promise.resolve();
548
- if (this.authentications["X-API-KEY"].apiKey) {
549
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
550
- }
551
- if (this.authentications["Bearer"].apiKey) {
552
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
553
- }
554
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
555
- let interceptorPromise = authenticationPromise;
556
- for (const interceptor of this.interceptors) {
557
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
558
- }
559
- return interceptorPromise.then(() => {
560
- return new Promise((resolve, reject) => {
561
- axios_1.default.request(localVarRequestOptions)
562
- .then((response) => {
563
- handleSuccessfulResponse(resolve, reject, response);
564
- }, (error) => {
565
- if (error.response == null) {
566
- reject(error);
567
- return;
568
- }
569
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
570
- return;
571
- }
572
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
573
- return;
574
- }
575
- reject(error);
576
- });
577
- });
578
- });
579
- });
580
- }
581
- createEmbeddedEditUrl(documentId_1, embeddedDocumentEditJsonRequest_1) {
582
- return __awaiter(this, arguments, void 0, function* (documentId, embeddedDocumentEditJsonRequest, options = { headers: {} }) {
583
- embeddedDocumentEditJsonRequest = deserializeIfNeeded(embeddedDocumentEditJsonRequest, "EmbeddedDocumentEditJsonRequest");
584
- const localVarPath = this.basePath + '/v1/document/createEmbeddedEditUrl';
585
- let localVarQueryParameters = {};
586
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
587
- const produces = ['application/json'];
588
- if (produces.indexOf('application/json') >= 0) {
589
- localVarHeaderParams['content-type'] = 'application/json';
590
- }
591
- else {
592
- localVarHeaderParams['content-type'] = produces.join(',');
593
- }
594
- let localVarFormParams = {};
595
- let localVarBodyParams = undefined;
596
- if (documentId === null || documentId === undefined) {
597
- throw new Error('Required parameter documentId was null or undefined when calling createEmbeddedEditUrl.');
598
- }
599
- if (documentId !== undefined) {
600
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
601
- }
602
- Object.assign(localVarHeaderParams, options.headers);
603
- let localVarUseFormData = false;
604
- const result = (0, _1.generateFormData)(embeddedDocumentEditJsonRequest, model_1.EmbeddedDocumentEditJsonRequest);
605
- localVarUseFormData = result.localVarUseFormData;
606
- let data = {};
607
- if (localVarUseFormData) {
608
- const formData = (0, _1.toFormData)(result.data);
609
- data = formData;
610
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
611
- }
612
- else {
613
- data = model_1.ObjectSerializer.serialize(embeddedDocumentEditJsonRequest, "EmbeddedDocumentEditJsonRequest");
614
- }
615
- let localVarRequestOptions = {
616
- method: 'POST',
617
- params: localVarQueryParameters,
618
- headers: localVarHeaderParams,
619
- url: localVarPath,
620
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
621
- maxContentLength: Infinity,
622
- maxBodyLength: Infinity,
623
- responseType: "json",
624
- };
625
- if (localVarRequestOptions.method !== 'GET') {
626
- localVarRequestOptions.data = data;
627
- }
628
- let authenticationPromise = Promise.resolve();
629
- if (this.authentications["X-API-KEY"].apiKey) {
630
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
631
- }
632
- if (this.authentications["Bearer"].apiKey) {
633
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
634
- }
635
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
636
- let interceptorPromise = authenticationPromise;
637
- for (const interceptor of this.interceptors) {
638
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
639
- }
640
- return interceptorPromise.then(() => {
641
- return new Promise((resolve, reject) => {
642
- axios_1.default.request(localVarRequestOptions)
643
- .then((response) => {
644
- handleSuccessfulResponse(resolve, reject, response, "EmbeddedDocumentEdited");
645
- }, (error) => {
646
- if (error.response == null) {
647
- reject(error);
648
- return;
649
- }
650
- if (handleErrorCodeResponse(reject, error.response, 201, "EmbeddedDocumentEdited")) {
651
- return;
652
- }
653
- if (handleErrorCodeResponse(reject, error.response, 400, "ErrorResult")) {
654
- return;
655
- }
656
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
657
- return;
658
- }
659
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
660
- return;
661
- }
662
- if (handleErrorCodeResponse(reject, error.response, 422, "ErrorResult")) {
663
- return;
664
- }
665
- reject(error);
666
- });
667
- });
668
- });
669
- });
670
- }
671
- createEmbeddedRequestUrlDocument(embeddedDocumentRequest_1) {
672
- return __awaiter(this, arguments, void 0, function* (embeddedDocumentRequest, options = { headers: {} }) {
673
- embeddedDocumentRequest = deserializeIfNeeded(embeddedDocumentRequest, "EmbeddedDocumentRequest");
674
- const localVarPath = this.basePath + '/v1/document/createEmbeddedRequestUrl';
675
- let localVarQueryParameters = {};
676
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
677
- const produces = ['application/json'];
678
- if (produces.indexOf('application/json') >= 0) {
679
- localVarHeaderParams['content-type'] = 'application/json';
680
- }
681
- else {
682
- localVarHeaderParams['content-type'] = produces.join(',');
683
- }
684
- let localVarFormParams = {};
685
- let localVarBodyParams = undefined;
686
- Object.assign(localVarHeaderParams, options.headers);
687
- let localVarUseFormData = false;
688
- const result = (0, _1.generateFormData)(embeddedDocumentRequest, model_1.EmbeddedDocumentRequest);
689
- localVarUseFormData = result.localVarUseFormData;
690
- let data = {};
691
- if (localVarUseFormData) {
692
- const formData = (0, _1.toFormData)(result.data);
693
- data = formData;
694
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
695
- }
696
- else {
697
- data = model_1.ObjectSerializer.serialize(embeddedDocumentRequest, "EmbeddedDocumentRequest");
698
- }
699
- let localVarRequestOptions = {
700
- method: 'POST',
701
- params: localVarQueryParameters,
702
- headers: localVarHeaderParams,
703
- url: localVarPath,
704
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
705
- maxContentLength: Infinity,
706
- maxBodyLength: Infinity,
707
- responseType: "json",
708
- };
709
- if (localVarRequestOptions.method !== 'GET') {
710
- localVarRequestOptions.data = data;
711
- }
712
- let authenticationPromise = Promise.resolve();
713
- if (this.authentications["X-API-KEY"].apiKey) {
714
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
715
- }
716
- if (this.authentications["Bearer"].apiKey) {
717
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
718
- }
719
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
720
- let interceptorPromise = authenticationPromise;
721
- for (const interceptor of this.interceptors) {
722
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
723
- }
724
- return interceptorPromise.then(() => {
725
- return new Promise((resolve, reject) => {
726
- axios_1.default.request(localVarRequestOptions)
727
- .then((response) => {
728
- handleSuccessfulResponse(resolve, reject, response, "EmbeddedSendCreated");
729
- }, (error) => {
730
- if (error.response == null) {
731
- reject(error);
732
- return;
733
- }
734
- if (handleErrorCodeResponse(reject, error.response, 201, "EmbeddedSendCreated")) {
735
- return;
736
- }
737
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
738
- return;
739
- }
740
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
741
- return;
742
- }
743
- if (handleErrorCodeResponse(reject, error.response, 400, "ErrorResult")) {
744
- return;
745
- }
746
- if (handleErrorCodeResponse(reject, error.response, 422, "ErrorResult")) {
747
- return;
748
- }
749
- reject(error);
750
- });
751
- });
752
- });
753
- });
754
- }
755
- deleteDocument(documentId_1, deletePermanently_1) {
756
- return __awaiter(this, arguments, void 0, function* (documentId, deletePermanently, options = { headers: {} }) {
757
- const localVarPath = this.basePath + '/v1/document/delete';
758
- let localVarQueryParameters = {};
759
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
760
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
761
- if (produces.indexOf('application/json') >= 0) {
762
- localVarHeaderParams['content-type'] = 'application/json';
763
- }
764
- else {
765
- localVarHeaderParams['content-type'] = produces.join(',');
766
- }
767
- let localVarFormParams = {};
768
- let localVarBodyParams = undefined;
769
- if (documentId === null || documentId === undefined) {
770
- throw new Error('Required parameter documentId was null or undefined when calling deleteDocument.');
771
- }
772
- if (documentId !== undefined) {
773
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
774
- }
775
- if (deletePermanently !== undefined) {
776
- localVarQueryParameters['deletePermanently'] = model_1.ObjectSerializer.serialize(deletePermanently, "boolean");
777
- }
778
- Object.assign(localVarHeaderParams, options.headers);
779
- let localVarUseFormData = false;
780
- let data = {};
781
- if (localVarUseFormData) {
782
- const formData = (0, _1.toFormData)(localVarFormParams);
783
- data = formData;
784
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
785
- }
786
- let localVarRequestOptions = {
787
- method: 'DELETE',
788
- params: localVarQueryParameters,
789
- headers: localVarHeaderParams,
790
- url: localVarPath,
791
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
792
- maxContentLength: Infinity,
793
- maxBodyLength: Infinity,
794
- responseType: "json",
795
- };
796
- if (localVarRequestOptions.method !== 'GET') {
797
- localVarRequestOptions.data = data;
798
- }
799
- let authenticationPromise = Promise.resolve();
800
- if (this.authentications["X-API-KEY"].apiKey) {
801
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
802
- }
803
- if (this.authentications["Bearer"].apiKey) {
804
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
805
- }
806
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
807
- let interceptorPromise = authenticationPromise;
808
- for (const interceptor of this.interceptors) {
809
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
810
- }
811
- return interceptorPromise.then(() => {
812
- return new Promise((resolve, reject) => {
813
- axios_1.default.request(localVarRequestOptions)
814
- .then((response) => {
815
- handleSuccessfulResponse(resolve, reject, response);
816
- }, (error) => {
817
- if (error.response == null) {
818
- reject(error);
819
- return;
820
- }
821
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
822
- return;
823
- }
824
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
825
- return;
826
- }
827
- reject(error);
828
- });
829
- });
830
- });
831
- });
832
- }
833
- deleteTag(documentTags_1) {
834
- return __awaiter(this, arguments, void 0, function* (documentTags, options = { headers: {} }) {
835
- documentTags = deserializeIfNeeded(documentTags, "DocumentTags");
836
- const localVarPath = this.basePath + '/v1/document/deleteTags';
837
- let localVarQueryParameters = {};
838
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
839
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
840
- if (produces.indexOf('application/json') >= 0) {
841
- localVarHeaderParams['content-type'] = 'application/json';
842
- }
843
- else {
844
- localVarHeaderParams['content-type'] = produces.join(',');
845
- }
846
- let localVarFormParams = {};
847
- let localVarBodyParams = undefined;
848
- Object.assign(localVarHeaderParams, options.headers);
849
- let localVarUseFormData = false;
850
- const result = (0, _1.generateFormData)(documentTags, model_1.DocumentTags);
851
- localVarUseFormData = result.localVarUseFormData;
852
- let data = {};
853
- if (localVarUseFormData) {
854
- const formData = (0, _1.toFormData)(result.data);
855
- data = formData;
856
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
857
- }
858
- else {
859
- data = model_1.ObjectSerializer.serialize(documentTags, "DocumentTags");
860
- }
861
- let localVarRequestOptions = {
862
- method: 'DELETE',
863
- params: localVarQueryParameters,
864
- headers: localVarHeaderParams,
865
- url: localVarPath,
866
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
867
- maxContentLength: Infinity,
868
- maxBodyLength: Infinity,
869
- responseType: "json",
870
- };
871
- if (localVarRequestOptions.method !== 'GET') {
872
- localVarRequestOptions.data = data;
873
- }
874
- let authenticationPromise = Promise.resolve();
875
- if (this.authentications["X-API-KEY"].apiKey) {
876
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
877
- }
878
- if (this.authentications["Bearer"].apiKey) {
879
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
880
- }
881
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
882
- let interceptorPromise = authenticationPromise;
883
- for (const interceptor of this.interceptors) {
884
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
885
- }
886
- return interceptorPromise.then(() => {
887
- return new Promise((resolve, reject) => {
888
- axios_1.default.request(localVarRequestOptions)
889
- .then((response) => {
890
- handleSuccessfulResponse(resolve, reject, response);
891
- }, (error) => {
892
- if (error.response == null) {
893
- reject(error);
894
- return;
895
- }
896
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
897
- return;
898
- }
899
- if (handleErrorCodeResponse(reject, error.response, 400, "ErrorResult")) {
900
- return;
901
- }
902
- reject(error);
903
- });
904
- });
905
- });
906
- });
907
- }
908
- downloadAttachment(documentId_1, attachmentId_1, onBehalfOf_1) {
909
- return __awaiter(this, arguments, void 0, function* (documentId, attachmentId, onBehalfOf, options = { headers: {} }) {
910
- const localVarPath = this.basePath + '/v1/document/downloadAttachment';
911
- let localVarQueryParameters = {};
912
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
913
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
914
- if (produces.indexOf('application/json') >= 0) {
915
- localVarHeaderParams['content-type'] = 'application/json';
916
- }
917
- else {
918
- localVarHeaderParams['content-type'] = produces.join(',');
919
- }
920
- let localVarFormParams = {};
921
- let localVarBodyParams = undefined;
922
- if (documentId === null || documentId === undefined) {
923
- throw new Error('Required parameter documentId was null or undefined when calling downloadAttachment.');
924
- }
925
- if (attachmentId === null || attachmentId === undefined) {
926
- throw new Error('Required parameter attachmentId was null or undefined when calling downloadAttachment.');
927
- }
928
- if (documentId !== undefined) {
929
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
930
- }
931
- if (attachmentId !== undefined) {
932
- localVarQueryParameters['attachmentId'] = model_1.ObjectSerializer.serialize(attachmentId, "string");
933
- }
934
- if (onBehalfOf !== undefined) {
935
- localVarQueryParameters['onBehalfOf'] = model_1.ObjectSerializer.serialize(onBehalfOf, "string");
936
- }
937
- Object.assign(localVarHeaderParams, options.headers);
938
- let localVarUseFormData = false;
939
- let data = {};
940
- if (localVarUseFormData) {
941
- const formData = (0, _1.toFormData)(localVarFormParams);
942
- data = formData;
943
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
944
- }
945
- let localVarRequestOptions = {
946
- method: 'GET',
947
- params: localVarQueryParameters,
948
- headers: localVarHeaderParams,
949
- url: localVarPath,
950
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
951
- maxContentLength: Infinity,
952
- maxBodyLength: Infinity,
953
- responseType: "arraybuffer",
954
- };
955
- if (localVarRequestOptions.method !== 'GET') {
956
- localVarRequestOptions.data = data;
957
- }
958
- let authenticationPromise = Promise.resolve();
959
- if (this.authentications["X-API-KEY"].apiKey) {
960
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
961
- }
962
- if (this.authentications["Bearer"].apiKey) {
963
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
964
- }
965
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
966
- let interceptorPromise = authenticationPromise;
967
- for (const interceptor of this.interceptors) {
968
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
969
- }
970
- return interceptorPromise.then(() => {
971
- return new Promise((resolve, reject) => {
972
- axios_1.default.request(localVarRequestOptions)
973
- .then((response) => {
974
- handleSuccessfulResponse(resolve, reject, response, "Buffer");
975
- }, (error) => {
976
- if (error.response == null) {
977
- reject(error);
978
- return;
979
- }
980
- if (handleErrorCodeResponse(reject, error.response, 200, "RequestFile")) {
981
- return;
982
- }
983
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
984
- return;
985
- }
986
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
987
- return;
988
- }
989
- reject(error);
990
- });
991
- });
992
- });
993
- });
994
- }
995
- downloadAuditLog(documentId_1, onBehalfOf_1) {
996
- return __awaiter(this, arguments, void 0, function* (documentId, onBehalfOf, options = { headers: {} }) {
997
- const localVarPath = this.basePath + '/v1/document/downloadAuditLog';
998
- let localVarQueryParameters = {};
999
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1000
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
1001
- if (produces.indexOf('application/json') >= 0) {
1002
- localVarHeaderParams['content-type'] = 'application/json';
1003
- }
1004
- else {
1005
- localVarHeaderParams['content-type'] = produces.join(',');
1006
- }
1007
- let localVarFormParams = {};
1008
- let localVarBodyParams = undefined;
1009
- if (documentId === null || documentId === undefined) {
1010
- throw new Error('Required parameter documentId was null or undefined when calling downloadAuditLog.');
1011
- }
1012
- if (documentId !== undefined) {
1013
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1014
- }
1015
- if (onBehalfOf !== undefined) {
1016
- localVarQueryParameters['onBehalfOf'] = model_1.ObjectSerializer.serialize(onBehalfOf, "string");
1017
- }
1018
- Object.assign(localVarHeaderParams, options.headers);
1019
- let localVarUseFormData = false;
1020
- let data = {};
1021
- if (localVarUseFormData) {
1022
- const formData = (0, _1.toFormData)(localVarFormParams);
1023
- data = formData;
1024
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1025
- }
1026
- let localVarRequestOptions = {
1027
- method: 'GET',
1028
- params: localVarQueryParameters,
1029
- headers: localVarHeaderParams,
1030
- url: localVarPath,
1031
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1032
- maxContentLength: Infinity,
1033
- maxBodyLength: Infinity,
1034
- responseType: "arraybuffer",
1035
- };
1036
- if (localVarRequestOptions.method !== 'GET') {
1037
- localVarRequestOptions.data = data;
1038
- }
1039
- let authenticationPromise = Promise.resolve();
1040
- if (this.authentications["X-API-KEY"].apiKey) {
1041
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1042
- }
1043
- if (this.authentications["Bearer"].apiKey) {
1044
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1045
- }
1046
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1047
- let interceptorPromise = authenticationPromise;
1048
- for (const interceptor of this.interceptors) {
1049
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1050
- }
1051
- return interceptorPromise.then(() => {
1052
- return new Promise((resolve, reject) => {
1053
- axios_1.default.request(localVarRequestOptions)
1054
- .then((response) => {
1055
- handleSuccessfulResponse(resolve, reject, response, "Buffer");
1056
- }, (error) => {
1057
- if (error.response == null) {
1058
- reject(error);
1059
- return;
1060
- }
1061
- if (handleErrorCodeResponse(reject, error.response, 200, "RequestFile")) {
1062
- return;
1063
- }
1064
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1065
- return;
1066
- }
1067
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1068
- return;
1069
- }
1070
- reject(error);
1071
- });
1072
- });
1073
- });
1074
- });
1075
- }
1076
- downloadDocument(documentId_1, onBehalfOf_1) {
1077
- return __awaiter(this, arguments, void 0, function* (documentId, onBehalfOf, options = { headers: {} }) {
1078
- const localVarPath = this.basePath + '/v1/document/download';
1079
- let localVarQueryParameters = {};
1080
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1081
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
1082
- if (produces.indexOf('application/json') >= 0) {
1083
- localVarHeaderParams['content-type'] = 'application/json';
1084
- }
1085
- else {
1086
- localVarHeaderParams['content-type'] = produces.join(',');
1087
- }
1088
- let localVarFormParams = {};
1089
- let localVarBodyParams = undefined;
1090
- if (documentId === null || documentId === undefined) {
1091
- throw new Error('Required parameter documentId was null or undefined when calling downloadDocument.');
1092
- }
1093
- if (documentId !== undefined) {
1094
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1095
- }
1096
- if (onBehalfOf !== undefined) {
1097
- localVarQueryParameters['onBehalfOf'] = model_1.ObjectSerializer.serialize(onBehalfOf, "string");
1098
- }
1099
- Object.assign(localVarHeaderParams, options.headers);
1100
- let localVarUseFormData = false;
1101
- let data = {};
1102
- if (localVarUseFormData) {
1103
- const formData = (0, _1.toFormData)(localVarFormParams);
1104
- data = formData;
1105
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1106
- }
1107
- let localVarRequestOptions = {
1108
- method: 'GET',
1109
- params: localVarQueryParameters,
1110
- headers: localVarHeaderParams,
1111
- url: localVarPath,
1112
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1113
- maxContentLength: Infinity,
1114
- maxBodyLength: Infinity,
1115
- responseType: "arraybuffer",
1116
- };
1117
- if (localVarRequestOptions.method !== 'GET') {
1118
- localVarRequestOptions.data = data;
1119
- }
1120
- let authenticationPromise = Promise.resolve();
1121
- if (this.authentications["X-API-KEY"].apiKey) {
1122
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1123
- }
1124
- if (this.authentications["Bearer"].apiKey) {
1125
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1126
- }
1127
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1128
- let interceptorPromise = authenticationPromise;
1129
- for (const interceptor of this.interceptors) {
1130
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1131
- }
1132
- return interceptorPromise.then(() => {
1133
- return new Promise((resolve, reject) => {
1134
- axios_1.default.request(localVarRequestOptions)
1135
- .then((response) => {
1136
- handleSuccessfulResponse(resolve, reject, response, "Buffer");
1137
- }, (error) => {
1138
- if (error.response == null) {
1139
- reject(error);
1140
- return;
1141
- }
1142
- if (handleErrorCodeResponse(reject, error.response, 200, "RequestFile")) {
1143
- return;
1144
- }
1145
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1146
- return;
1147
- }
1148
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1149
- return;
1150
- }
1151
- reject(error);
1152
- });
1153
- });
1154
- });
1155
- });
1156
- }
1157
- draftSend(documentId_1) {
1158
- return __awaiter(this, arguments, void 0, function* (documentId, options = { headers: {} }) {
1159
- const localVarPath = this.basePath + '/v1/document/draftSend';
1160
- let localVarQueryParameters = {};
1161
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1162
- const produces = ['application/json'];
1163
- if (produces.indexOf('application/json') >= 0) {
1164
- localVarHeaderParams['content-type'] = 'application/json';
1165
- }
1166
- else {
1167
- localVarHeaderParams['content-type'] = produces.join(',');
1168
- }
1169
- let localVarFormParams = {};
1170
- let localVarBodyParams = undefined;
1171
- if (documentId === null || documentId === undefined) {
1172
- throw new Error('Required parameter documentId was null or undefined when calling draftSend.');
1173
- }
1174
- if (documentId !== undefined) {
1175
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1176
- }
1177
- Object.assign(localVarHeaderParams, options.headers);
1178
- let localVarUseFormData = false;
1179
- let data = {};
1180
- if (localVarUseFormData) {
1181
- const formData = (0, _1.toFormData)(localVarFormParams);
1182
- data = formData;
1183
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1184
- }
1185
- let localVarRequestOptions = {
1186
- method: 'POST',
1187
- params: localVarQueryParameters,
1188
- headers: localVarHeaderParams,
1189
- url: localVarPath,
1190
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1191
- maxContentLength: Infinity,
1192
- maxBodyLength: Infinity,
1193
- responseType: "json",
1194
- };
1195
- if (localVarRequestOptions.method !== 'GET') {
1196
- localVarRequestOptions.data = data;
1197
- }
1198
- let authenticationPromise = Promise.resolve();
1199
- if (this.authentications["X-API-KEY"].apiKey) {
1200
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1201
- }
1202
- if (this.authentications["Bearer"].apiKey) {
1203
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1204
- }
1205
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1206
- let interceptorPromise = authenticationPromise;
1207
- for (const interceptor of this.interceptors) {
1208
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1209
- }
1210
- return interceptorPromise.then(() => {
1211
- return new Promise((resolve, reject) => {
1212
- axios_1.default.request(localVarRequestOptions)
1213
- .then((response) => {
1214
- handleSuccessfulResponse(resolve, reject, response);
1215
- }, (error) => {
1216
- if (error.response == null) {
1217
- reject(error);
1218
- return;
1219
- }
1220
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1221
- return;
1222
- }
1223
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1224
- return;
1225
- }
1226
- reject(error);
1227
- });
1228
- });
1229
- });
1230
- });
1231
- }
1232
- editDocument(documentId_1, editDocumentRequest_1) {
1233
- return __awaiter(this, arguments, void 0, function* (documentId, editDocumentRequest, options = { headers: {} }) {
1234
- editDocumentRequest = deserializeIfNeeded(editDocumentRequest, "EditDocumentRequest");
1235
- const localVarPath = this.basePath + '/v1/document/edit';
1236
- let localVarQueryParameters = {};
1237
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1238
- const produces = ['application/json'];
1239
- if (produces.indexOf('application/json') >= 0) {
1240
- localVarHeaderParams['content-type'] = 'application/json';
1241
- }
1242
- else {
1243
- localVarHeaderParams['content-type'] = produces.join(',');
1244
- }
1245
- let localVarFormParams = {};
1246
- let localVarBodyParams = undefined;
1247
- if (documentId === null || documentId === undefined) {
1248
- throw new Error('Required parameter documentId was null or undefined when calling editDocument.');
1249
- }
1250
- if (documentId !== undefined) {
1251
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1252
- }
1253
- Object.assign(localVarHeaderParams, options.headers);
1254
- let localVarUseFormData = false;
1255
- const result = (0, _1.generateFormData)(editDocumentRequest, model_1.EditDocumentRequest);
1256
- localVarUseFormData = result.localVarUseFormData;
1257
- let data = {};
1258
- if (localVarUseFormData) {
1259
- const formData = (0, _1.toFormData)(result.data);
1260
- data = formData;
1261
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1262
- }
1263
- else {
1264
- data = model_1.ObjectSerializer.serialize(editDocumentRequest, "EditDocumentRequest");
1265
- }
1266
- let localVarRequestOptions = {
1267
- method: 'PUT',
1268
- params: localVarQueryParameters,
1269
- headers: localVarHeaderParams,
1270
- url: localVarPath,
1271
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1272
- maxContentLength: Infinity,
1273
- maxBodyLength: Infinity,
1274
- responseType: "json",
1275
- };
1276
- if (localVarRequestOptions.method !== 'GET') {
1277
- localVarRequestOptions.data = data;
1278
- }
1279
- let authenticationPromise = Promise.resolve();
1280
- if (this.authentications["X-API-KEY"].apiKey) {
1281
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1282
- }
1283
- if (this.authentications["Bearer"].apiKey) {
1284
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1285
- }
1286
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1287
- let interceptorPromise = authenticationPromise;
1288
- for (const interceptor of this.interceptors) {
1289
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1290
- }
1291
- return interceptorPromise.then(() => {
1292
- return new Promise((resolve, reject) => {
1293
- axios_1.default.request(localVarRequestOptions)
1294
- .then((response) => {
1295
- handleSuccessfulResponse(resolve, reject, response, "DocumentEdited");
1296
- }, (error) => {
1297
- if (error.response == null) {
1298
- reject(error);
1299
- return;
1300
- }
1301
- if (handleErrorCodeResponse(reject, error.response, 200, "DocumentEdited")) {
1302
- return;
1303
- }
1304
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1305
- return;
1306
- }
1307
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1308
- return;
1309
- }
1310
- if (handleErrorCodeResponse(reject, error.response, 400, "ErrorResult")) {
1311
- return;
1312
- }
1313
- if (handleErrorCodeResponse(reject, error.response, 422, "ErrorResult")) {
1314
- return;
1315
- }
1316
- reject(error);
1317
- });
1318
- });
1319
- });
1320
- });
1321
- }
1322
- extendExpiry(documentId_1, extendExpiry_1) {
1323
- return __awaiter(this, arguments, void 0, function* (documentId, extendExpiry, options = { headers: {} }) {
1324
- extendExpiry = deserializeIfNeeded(extendExpiry, "ExtendExpiry");
1325
- const localVarPath = this.basePath + '/v1/document/extendExpiry';
1326
- let localVarQueryParameters = {};
1327
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1328
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
1329
- if (produces.indexOf('application/json') >= 0) {
1330
- localVarHeaderParams['content-type'] = 'application/json';
1331
- }
1332
- else {
1333
- localVarHeaderParams['content-type'] = produces.join(',');
1334
- }
1335
- let localVarFormParams = {};
1336
- let localVarBodyParams = undefined;
1337
- if (documentId === null || documentId === undefined) {
1338
- throw new Error('Required parameter documentId was null or undefined when calling extendExpiry.');
1339
- }
1340
- if (documentId !== undefined) {
1341
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1342
- }
1343
- Object.assign(localVarHeaderParams, options.headers);
1344
- let localVarUseFormData = false;
1345
- const result = (0, _1.generateFormData)(extendExpiry, model_1.ExtendExpiry);
1346
- localVarUseFormData = result.localVarUseFormData;
1347
- let data = {};
1348
- if (localVarUseFormData) {
1349
- const formData = (0, _1.toFormData)(result.data);
1350
- data = formData;
1351
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1352
- }
1353
- else {
1354
- data = model_1.ObjectSerializer.serialize(extendExpiry, "ExtendExpiry");
1355
- }
1356
- let localVarRequestOptions = {
1357
- method: 'PATCH',
1358
- params: localVarQueryParameters,
1359
- headers: localVarHeaderParams,
1360
- url: localVarPath,
1361
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1362
- maxContentLength: Infinity,
1363
- maxBodyLength: Infinity,
1364
- responseType: "json",
1365
- };
1366
- if (localVarRequestOptions.method !== 'GET') {
1367
- localVarRequestOptions.data = data;
1368
- }
1369
- let authenticationPromise = Promise.resolve();
1370
- if (this.authentications["X-API-KEY"].apiKey) {
1371
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1372
- }
1373
- if (this.authentications["Bearer"].apiKey) {
1374
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1375
- }
1376
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1377
- let interceptorPromise = authenticationPromise;
1378
- for (const interceptor of this.interceptors) {
1379
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1380
- }
1381
- return interceptorPromise.then(() => {
1382
- return new Promise((resolve, reject) => {
1383
- axios_1.default.request(localVarRequestOptions)
1384
- .then((response) => {
1385
- handleSuccessfulResponse(resolve, reject, response);
1386
- }, (error) => {
1387
- if (error.response == null) {
1388
- reject(error);
1389
- return;
1390
- }
1391
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1392
- return;
1393
- }
1394
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1395
- return;
1396
- }
1397
- reject(error);
1398
- });
1399
- });
1400
- });
1401
- });
1402
- }
1403
- getProperties(documentId_1) {
1404
- return __awaiter(this, arguments, void 0, function* (documentId, options = { headers: {} }) {
1405
- const localVarPath = this.basePath + '/v1/document/properties';
1406
- let localVarQueryParameters = {};
1407
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1408
- const produces = ['application/json'];
1409
- if (produces.indexOf('application/json') >= 0) {
1410
- localVarHeaderParams['content-type'] = 'application/json';
1411
- }
1412
- else {
1413
- localVarHeaderParams['content-type'] = produces.join(',');
1414
- }
1415
- let localVarFormParams = {};
1416
- let localVarBodyParams = undefined;
1417
- if (documentId === null || documentId === undefined) {
1418
- throw new Error('Required parameter documentId was null or undefined when calling getDocumentProperties.');
1419
- }
1420
- if (documentId !== undefined) {
1421
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1422
- }
1423
- Object.assign(localVarHeaderParams, options.headers);
1424
- let localVarUseFormData = false;
1425
- let data = {};
1426
- if (localVarUseFormData) {
1427
- const formData = (0, _1.toFormData)(localVarFormParams);
1428
- data = formData;
1429
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1430
- }
1431
- let localVarRequestOptions = {
1432
- method: 'GET',
1433
- params: localVarQueryParameters,
1434
- headers: localVarHeaderParams,
1435
- url: localVarPath,
1436
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1437
- maxContentLength: Infinity,
1438
- maxBodyLength: Infinity,
1439
- responseType: "json",
1440
- };
1441
- if (localVarRequestOptions.method !== 'GET') {
1442
- localVarRequestOptions.data = data;
1443
- }
1444
- let authenticationPromise = Promise.resolve();
1445
- if (this.authentications["X-API-KEY"].apiKey) {
1446
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1447
- }
1448
- if (this.authentications["Bearer"].apiKey) {
1449
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1450
- }
1451
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1452
- let interceptorPromise = authenticationPromise;
1453
- for (const interceptor of this.interceptors) {
1454
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1455
- }
1456
- return interceptorPromise.then(() => {
1457
- return new Promise((resolve, reject) => {
1458
- axios_1.default.request(localVarRequestOptions)
1459
- .then((response) => {
1460
- handleSuccessfulResponse(resolve, reject, response, "DocumentProperties");
1461
- }, (error) => {
1462
- if (error.response == null) {
1463
- reject(error);
1464
- return;
1465
- }
1466
- if (handleErrorCodeResponse(reject, error.response, 200, "DocumentProperties")) {
1467
- return;
1468
- }
1469
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1470
- return;
1471
- }
1472
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1473
- return;
1474
- }
1475
- reject(error);
1476
- });
1477
- });
1478
- });
1479
- });
1480
- }
1481
- getEmbeddedSignLink(documentId_1, signerEmail_1, countryCode_1, phoneNumber_1, signLinkValidTill_1, redirectUrl_1) {
1482
- return __awaiter(this, arguments, void 0, function* (documentId, signerEmail, countryCode, phoneNumber, signLinkValidTill, redirectUrl, options = { headers: {} }) {
1483
- const localVarPath = this.basePath + '/v1/document/getEmbeddedSignLink';
1484
- let localVarQueryParameters = {};
1485
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1486
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
1487
- if (produces.indexOf('application/json') >= 0) {
1488
- localVarHeaderParams['content-type'] = 'application/json';
1489
- }
1490
- else {
1491
- localVarHeaderParams['content-type'] = produces.join(',');
1492
- }
1493
- let localVarFormParams = {};
1494
- let localVarBodyParams = undefined;
1495
- if (documentId === null || documentId === undefined) {
1496
- throw new Error('Required parameter documentId was null or undefined when calling getEmbeddedSignLink.');
1497
- }
1498
- if (documentId !== undefined) {
1499
- localVarQueryParameters['DocumentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1500
- }
1501
- if (signerEmail !== undefined) {
1502
- localVarQueryParameters['SignerEmail'] = model_1.ObjectSerializer.serialize(signerEmail, "string");
1503
- }
1504
- if (countryCode !== undefined) {
1505
- localVarQueryParameters['CountryCode'] = model_1.ObjectSerializer.serialize(countryCode, "string");
1506
- }
1507
- if (phoneNumber !== undefined) {
1508
- localVarQueryParameters['PhoneNumber'] = model_1.ObjectSerializer.serialize(phoneNumber, "string");
1509
- }
1510
- if (signLinkValidTill !== undefined) {
1511
- localVarQueryParameters['SignLinkValidTill'] = model_1.ObjectSerializer.serialize(signLinkValidTill, "Date");
1512
- }
1513
- if (redirectUrl !== undefined) {
1514
- localVarQueryParameters['RedirectUrl'] = model_1.ObjectSerializer.serialize(redirectUrl, "string");
1515
- }
1516
- Object.assign(localVarHeaderParams, options.headers);
1517
- let localVarUseFormData = false;
1518
- let data = {};
1519
- if (localVarUseFormData) {
1520
- const formData = (0, _1.toFormData)(localVarFormParams);
1521
- data = formData;
1522
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1523
- }
1524
- let localVarRequestOptions = {
1525
- method: 'GET',
1526
- params: localVarQueryParameters,
1527
- headers: localVarHeaderParams,
1528
- url: localVarPath,
1529
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1530
- maxContentLength: Infinity,
1531
- maxBodyLength: Infinity,
1532
- responseType: "json",
1533
- };
1534
- if (localVarRequestOptions.method !== 'GET') {
1535
- localVarRequestOptions.data = data;
1536
- }
1537
- let authenticationPromise = Promise.resolve();
1538
- if (this.authentications["X-API-KEY"].apiKey) {
1539
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1540
- }
1541
- if (this.authentications["Bearer"].apiKey) {
1542
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1543
- }
1544
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1545
- let interceptorPromise = authenticationPromise;
1546
- for (const interceptor of this.interceptors) {
1547
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1548
- }
1549
- return interceptorPromise.then(() => {
1550
- return new Promise((resolve, reject) => {
1551
- axios_1.default.request(localVarRequestOptions)
1552
- .then((response) => {
1553
- handleSuccessfulResponse(resolve, reject, response, "EmbeddedSigningLink");
1554
- }, (error) => {
1555
- if (error.response == null) {
1556
- reject(error);
1557
- return;
1558
- }
1559
- if (handleErrorCodeResponse(reject, error.response, 200, "EmbeddedSigningLink")) {
1560
- return;
1561
- }
1562
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1563
- return;
1564
- }
1565
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1566
- return;
1567
- }
1568
- reject(error);
1569
- });
1570
- });
1571
- });
1572
- });
1573
- }
1574
- listDocuments(page_1, sentBy_1, recipients_1, transmitType_1, dateFilterType_1, pageSize_1, startDate_1, status_1, endDate_1, searchKey_1, labels_1, nextCursor_1, brandIds_1) {
1575
- return __awaiter(this, arguments, void 0, function* (page, sentBy, recipients, transmitType, dateFilterType, pageSize, startDate, status, endDate, searchKey, labels, nextCursor, brandIds, options = { headers: {} }) {
1576
- const localVarPath = this.basePath + '/v1/document/list';
1577
- let localVarQueryParameters = {};
1578
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1579
- const produces = ['application/json'];
1580
- if (produces.indexOf('application/json') >= 0) {
1581
- localVarHeaderParams['content-type'] = 'application/json';
1582
- }
1583
- else {
1584
- localVarHeaderParams['content-type'] = produces.join(',');
1585
- }
1586
- let localVarFormParams = {};
1587
- let localVarBodyParams = undefined;
1588
- if (page === null || page === undefined) {
1589
- throw new Error('Required parameter page was null or undefined when calling listDocuments.');
1590
- }
1591
- if (sentBy !== undefined) {
1592
- localVarQueryParameters['SentBy'] = model_1.ObjectSerializer.serialize(sentBy, "Array<string>");
1593
- }
1594
- if (recipients !== undefined) {
1595
- localVarQueryParameters['Recipients'] = model_1.ObjectSerializer.serialize(recipients, "Array<string>");
1596
- }
1597
- if (transmitType !== undefined) {
1598
- localVarQueryParameters['TransmitType'] = model_1.ObjectSerializer.serialize(transmitType, "'Sent' | 'Received' | 'Both'");
1599
- }
1600
- if (dateFilterType !== undefined) {
1601
- localVarQueryParameters['DateFilterType'] = model_1.ObjectSerializer.serialize(dateFilterType, "'SentBetween' | 'Expiring'");
1602
- }
1603
- if (pageSize !== undefined) {
1604
- localVarQueryParameters['PageSize'] = model_1.ObjectSerializer.serialize(pageSize, "number");
1605
- }
1606
- if (page !== undefined) {
1607
- localVarQueryParameters['Page'] = model_1.ObjectSerializer.serialize(page, "number");
1608
- }
1609
- if (startDate !== undefined) {
1610
- localVarQueryParameters['StartDate'] = model_1.ObjectSerializer.serialize(startDate, "Date");
1611
- }
1612
- if (status !== undefined) {
1613
- localVarQueryParameters['Status'] = model_1.ObjectSerializer.serialize(status, "Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft' | 'Scheduled'>");
1614
- }
1615
- if (endDate !== undefined) {
1616
- localVarQueryParameters['EndDate'] = model_1.ObjectSerializer.serialize(endDate, "Date");
1617
- }
1618
- if (searchKey !== undefined) {
1619
- localVarQueryParameters['SearchKey'] = model_1.ObjectSerializer.serialize(searchKey, "string");
1620
- }
1621
- if (labels !== undefined) {
1622
- localVarQueryParameters['Labels'] = model_1.ObjectSerializer.serialize(labels, "Array<string>");
1623
- }
1624
- if (nextCursor !== undefined) {
1625
- localVarQueryParameters['NextCursor'] = model_1.ObjectSerializer.serialize(nextCursor, "number");
1626
- }
1627
- if (brandIds !== undefined) {
1628
- localVarQueryParameters['BrandIds'] = model_1.ObjectSerializer.serialize(brandIds, "Array<string>");
1629
- }
1630
- Object.assign(localVarHeaderParams, options.headers);
1631
- let localVarUseFormData = false;
1632
- let data = {};
1633
- if (localVarUseFormData) {
1634
- const formData = (0, _1.toFormData)(localVarFormParams);
1635
- data = formData;
1636
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1637
- }
1638
- let localVarRequestOptions = {
1639
- method: 'GET',
1640
- params: localVarQueryParameters,
1641
- headers: localVarHeaderParams,
1642
- url: localVarPath,
1643
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1644
- maxContentLength: Infinity,
1645
- maxBodyLength: Infinity,
1646
- responseType: "json",
1647
- };
1648
- if (localVarRequestOptions.method !== 'GET') {
1649
- localVarRequestOptions.data = data;
1650
- }
1651
- let authenticationPromise = Promise.resolve();
1652
- if (this.authentications["X-API-KEY"].apiKey) {
1653
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1654
- }
1655
- if (this.authentications["Bearer"].apiKey) {
1656
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1657
- }
1658
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1659
- let interceptorPromise = authenticationPromise;
1660
- for (const interceptor of this.interceptors) {
1661
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1662
- }
1663
- return interceptorPromise.then(() => {
1664
- return new Promise((resolve, reject) => {
1665
- axios_1.default.request(localVarRequestOptions)
1666
- .then((response) => {
1667
- handleSuccessfulResponse(resolve, reject, response, "DocumentRecords");
1668
- }, (error) => {
1669
- if (error.response == null) {
1670
- reject(error);
1671
- return;
1672
- }
1673
- if (handleErrorCodeResponse(reject, error.response, 200, "DocumentRecords")) {
1674
- return;
1675
- }
1676
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1677
- return;
1678
- }
1679
- reject(error);
1680
- });
1681
- });
1682
- });
1683
- });
1684
- }
1685
- prefillFields(documentId_1, prefillFieldRequest_1) {
1686
- return __awaiter(this, arguments, void 0, function* (documentId, prefillFieldRequest, options = { headers: {} }) {
1687
- prefillFieldRequest = deserializeIfNeeded(prefillFieldRequest, "PrefillFieldRequest");
1688
- const localVarPath = this.basePath + '/v1/document/prefillFields';
1689
- let localVarQueryParameters = {};
1690
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1691
- const produces = ['application/json'];
1692
- if (produces.indexOf('application/json') >= 0) {
1693
- localVarHeaderParams['content-type'] = 'application/json';
1694
- }
1695
- else {
1696
- localVarHeaderParams['content-type'] = produces.join(',');
1697
- }
1698
- let localVarFormParams = {};
1699
- let localVarBodyParams = undefined;
1700
- if (documentId === null || documentId === undefined) {
1701
- throw new Error('Required parameter documentId was null or undefined when calling prefillFields.');
1702
- }
1703
- if (prefillFieldRequest === null || prefillFieldRequest === undefined) {
1704
- throw new Error('Required parameter prefillFieldRequest was null or undefined when calling prefillFields.');
1705
- }
1706
- if (documentId !== undefined) {
1707
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1708
- }
1709
- Object.assign(localVarHeaderParams, options.headers);
1710
- let localVarUseFormData = false;
1711
- const result = (0, _1.generateFormData)(prefillFieldRequest, model_1.PrefillFieldRequest);
1712
- localVarUseFormData = result.localVarUseFormData;
1713
- let data = {};
1714
- if (localVarUseFormData) {
1715
- const formData = (0, _1.toFormData)(result.data);
1716
- data = formData;
1717
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1718
- }
1719
- else {
1720
- data = model_1.ObjectSerializer.serialize(prefillFieldRequest, "PrefillFieldRequest");
1721
- }
1722
- let localVarRequestOptions = {
1723
- method: 'PATCH',
1724
- params: localVarQueryParameters,
1725
- headers: localVarHeaderParams,
1726
- url: localVarPath,
1727
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1728
- maxContentLength: Infinity,
1729
- maxBodyLength: Infinity,
1730
- responseType: "json",
1731
- };
1732
- if (localVarRequestOptions.method !== 'GET') {
1733
- localVarRequestOptions.data = data;
1734
- }
1735
- let authenticationPromise = Promise.resolve();
1736
- if (this.authentications["X-API-KEY"].apiKey) {
1737
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1738
- }
1739
- if (this.authentications["Bearer"].apiKey) {
1740
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1741
- }
1742
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1743
- let interceptorPromise = authenticationPromise;
1744
- for (const interceptor of this.interceptors) {
1745
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1746
- }
1747
- return interceptorPromise.then(() => {
1748
- return new Promise((resolve, reject) => {
1749
- axios_1.default.request(localVarRequestOptions)
1750
- .then((response) => {
1751
- handleSuccessfulResponse(resolve, reject, response);
1752
- }, (error) => {
1753
- if (error.response == null) {
1754
- reject(error);
1755
- return;
1756
- }
1757
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1758
- return;
1759
- }
1760
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1761
- return;
1762
- }
1763
- reject(error);
1764
- });
1765
- });
1766
- });
1767
- });
1768
- }
1769
- remindDocument(documentId_1, receiverEmails_1, reminderMessage_1) {
1770
- return __awaiter(this, arguments, void 0, function* (documentId, receiverEmails, reminderMessage, options = { headers: {} }) {
1771
- reminderMessage = deserializeIfNeeded(reminderMessage, "ReminderMessage");
1772
- const localVarPath = this.basePath + '/v1/document/remind';
1773
- let localVarQueryParameters = {};
1774
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1775
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
1776
- if (produces.indexOf('application/json') >= 0) {
1777
- localVarHeaderParams['content-type'] = 'application/json';
1778
- }
1779
- else {
1780
- localVarHeaderParams['content-type'] = produces.join(',');
1781
- }
1782
- let localVarFormParams = {};
1783
- let localVarBodyParams = undefined;
1784
- if (documentId === null || documentId === undefined) {
1785
- throw new Error('Required parameter documentId was null or undefined when calling remindDocument.');
1786
- }
1787
- if (documentId !== undefined) {
1788
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1789
- }
1790
- if (receiverEmails !== undefined) {
1791
- localVarQueryParameters['receiverEmails'] = model_1.ObjectSerializer.serialize(receiverEmails, "Array<string>");
1792
- }
1793
- Object.assign(localVarHeaderParams, options.headers);
1794
- let localVarUseFormData = false;
1795
- const result = (0, _1.generateFormData)(reminderMessage, model_1.ReminderMessage);
1796
- localVarUseFormData = result.localVarUseFormData;
1797
- let data = {};
1798
- if (localVarUseFormData) {
1799
- const formData = (0, _1.toFormData)(result.data);
1800
- data = formData;
1801
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1802
- }
1803
- else {
1804
- data = model_1.ObjectSerializer.serialize(reminderMessage, "ReminderMessage");
1805
- }
1806
- let localVarRequestOptions = {
1807
- method: 'POST',
1808
- params: localVarQueryParameters,
1809
- headers: localVarHeaderParams,
1810
- url: localVarPath,
1811
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1812
- maxContentLength: Infinity,
1813
- maxBodyLength: Infinity,
1814
- responseType: "json",
1815
- };
1816
- if (localVarRequestOptions.method !== 'GET') {
1817
- localVarRequestOptions.data = data;
1818
- }
1819
- let authenticationPromise = Promise.resolve();
1820
- if (this.authentications["X-API-KEY"].apiKey) {
1821
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1822
- }
1823
- if (this.authentications["Bearer"].apiKey) {
1824
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1825
- }
1826
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1827
- let interceptorPromise = authenticationPromise;
1828
- for (const interceptor of this.interceptors) {
1829
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1830
- }
1831
- return interceptorPromise.then(() => {
1832
- return new Promise((resolve, reject) => {
1833
- axios_1.default.request(localVarRequestOptions)
1834
- .then((response) => {
1835
- handleSuccessfulResponse(resolve, reject, response);
1836
- }, (error) => {
1837
- if (error.response == null) {
1838
- reject(error);
1839
- return;
1840
- }
1841
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1842
- return;
1843
- }
1844
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1845
- return;
1846
- }
1847
- reject(error);
1848
- });
1849
- });
1850
- });
1851
- });
1852
- }
1853
- removeAuthentication(documentId_1, removeAuthentication_1) {
1854
- return __awaiter(this, arguments, void 0, function* (documentId, removeAuthentication, options = { headers: {} }) {
1855
- removeAuthentication = deserializeIfNeeded(removeAuthentication, "RemoveAuthentication");
1856
- const localVarPath = this.basePath + '/v1/document/RemoveAuthentication';
1857
- let localVarQueryParameters = {};
1858
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1859
- const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=minimal;IEEE754Compatible=false', 'application/json;odata.metadata=minimal;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=full;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=full;IEEE754Compatible=false', 'application/json;odata.metadata=full;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.metadata=none;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=true', 'application/json;odata.metadata=none;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=false', 'application/json;odata.metadata=none;IEEE754Compatible=true', 'application/json;odata.streaming=true;IEEE754Compatible=false', 'application/json;odata.streaming=true;IEEE754Compatible=true', 'application/json;odata.streaming=false;IEEE754Compatible=false', 'application/json;odata.streaming=false;IEEE754Compatible=true', 'application/json;IEEE754Compatible=false', 'application/json;IEEE754Compatible=true', 'application/xml', 'text/plain', 'application/octet-stream', 'text/json'];
1860
- if (produces.indexOf('application/json') >= 0) {
1861
- localVarHeaderParams['content-type'] = 'application/json';
1862
- }
1863
- else {
1864
- localVarHeaderParams['content-type'] = produces.join(',');
1865
- }
1866
- let localVarFormParams = {};
1867
- let localVarBodyParams = undefined;
1868
- if (documentId === null || documentId === undefined) {
1869
- throw new Error('Required parameter documentId was null or undefined when calling removeAuthentication.');
1870
- }
1871
- if (documentId !== undefined) {
1872
- localVarQueryParameters['DocumentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1873
- }
1874
- Object.assign(localVarHeaderParams, options.headers);
1875
- let localVarUseFormData = false;
1876
- const result = (0, _1.generateFormData)(removeAuthentication, model_1.RemoveAuthentication);
1877
- localVarUseFormData = result.localVarUseFormData;
1878
- let data = {};
1879
- if (localVarUseFormData) {
1880
- const formData = (0, _1.toFormData)(result.data);
1881
- data = formData;
1882
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1883
- }
1884
- else {
1885
- data = model_1.ObjectSerializer.serialize(removeAuthentication, "RemoveAuthentication");
1886
- }
1887
- let localVarRequestOptions = {
1888
- method: 'PATCH',
1889
- params: localVarQueryParameters,
1890
- headers: localVarHeaderParams,
1891
- url: localVarPath,
1892
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1893
- maxContentLength: Infinity,
1894
- maxBodyLength: Infinity,
1895
- responseType: "json",
1896
- };
1897
- if (localVarRequestOptions.method !== 'GET') {
1898
- localVarRequestOptions.data = data;
1899
- }
1900
- let authenticationPromise = Promise.resolve();
1901
- if (this.authentications["X-API-KEY"].apiKey) {
1902
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1903
- }
1904
- if (this.authentications["Bearer"].apiKey) {
1905
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1906
- }
1907
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1908
- let interceptorPromise = authenticationPromise;
1909
- for (const interceptor of this.interceptors) {
1910
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1911
- }
1912
- return interceptorPromise.then(() => {
1913
- return new Promise((resolve, reject) => {
1914
- axios_1.default.request(localVarRequestOptions)
1915
- .then((response) => {
1916
- handleSuccessfulResponse(resolve, reject, response);
1917
- }, (error) => {
1918
- if (error.response == null) {
1919
- reject(error);
1920
- return;
1921
- }
1922
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
1923
- return;
1924
- }
1925
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
1926
- return;
1927
- }
1928
- reject(error);
1929
- });
1930
- });
1931
- });
1932
- });
1933
- }
1934
- revokeDocument(documentId_1, revokeDocument_1) {
1935
- return __awaiter(this, arguments, void 0, function* (documentId, revokeDocument, options = { headers: {} }) {
1936
- revokeDocument = deserializeIfNeeded(revokeDocument, "RevokeDocument");
1937
- const localVarPath = this.basePath + '/v1/document/revoke';
1938
- let localVarQueryParameters = {};
1939
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
1940
- const produces = ['application/json'];
1941
- if (produces.indexOf('application/json') >= 0) {
1942
- localVarHeaderParams['content-type'] = 'application/json';
1943
- }
1944
- else {
1945
- localVarHeaderParams['content-type'] = produces.join(',');
1946
- }
1947
- let localVarFormParams = {};
1948
- let localVarBodyParams = undefined;
1949
- if (documentId === null || documentId === undefined) {
1950
- throw new Error('Required parameter documentId was null or undefined when calling revokeDocument.');
1951
- }
1952
- if (revokeDocument === null || revokeDocument === undefined) {
1953
- throw new Error('Required parameter revokeDocument was null or undefined when calling revokeDocument.');
1954
- }
1955
- if (documentId !== undefined) {
1956
- localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
1957
- }
1958
- Object.assign(localVarHeaderParams, options.headers);
1959
- let localVarUseFormData = false;
1960
- const result = (0, _1.generateFormData)(revokeDocument, model_1.RevokeDocument);
1961
- localVarUseFormData = result.localVarUseFormData;
1962
- let data = {};
1963
- if (localVarUseFormData) {
1964
- const formData = (0, _1.toFormData)(result.data);
1965
- data = formData;
1966
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
1967
- }
1968
- else {
1969
- data = model_1.ObjectSerializer.serialize(revokeDocument, "RevokeDocument");
1970
- }
1971
- let localVarRequestOptions = {
1972
- method: 'POST',
1973
- params: localVarQueryParameters,
1974
- headers: localVarHeaderParams,
1975
- url: localVarPath,
1976
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
1977
- maxContentLength: Infinity,
1978
- maxBodyLength: Infinity,
1979
- responseType: "json",
1980
- };
1981
- if (localVarRequestOptions.method !== 'GET') {
1982
- localVarRequestOptions.data = data;
1983
- }
1984
- let authenticationPromise = Promise.resolve();
1985
- if (this.authentications["X-API-KEY"].apiKey) {
1986
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
1987
- }
1988
- if (this.authentications["Bearer"].apiKey) {
1989
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
1990
- }
1991
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1992
- let interceptorPromise = authenticationPromise;
1993
- for (const interceptor of this.interceptors) {
1994
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
1995
- }
1996
- return interceptorPromise.then(() => {
1997
- return new Promise((resolve, reject) => {
1998
- axios_1.default.request(localVarRequestOptions)
1999
- .then((response) => {
2000
- handleSuccessfulResponse(resolve, reject, response);
2001
- }, (error) => {
2002
- if (error.response == null) {
2003
- reject(error);
2004
- return;
2005
- }
2006
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
2007
- return;
2008
- }
2009
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
2010
- return;
2011
- }
2012
- reject(error);
2013
- });
2014
- });
2015
- });
2016
- });
2017
- }
2018
- sendDocument(sendForSign_1) {
2019
- return __awaiter(this, arguments, void 0, function* (sendForSign, options = { headers: {} }) {
2020
- sendForSign = deserializeIfNeeded(sendForSign, "SendForSign");
2021
- const localVarPath = this.basePath + '/v1/document/send';
2022
- let localVarQueryParameters = {};
2023
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
2024
- const produces = ['application/json'];
2025
- if (produces.indexOf('application/json') >= 0) {
2026
- localVarHeaderParams['content-type'] = 'application/json';
2027
- }
2028
- else {
2029
- localVarHeaderParams['content-type'] = produces.join(',');
2030
- }
2031
- let localVarFormParams = {};
2032
- let localVarBodyParams = undefined;
2033
- Object.assign(localVarHeaderParams, options.headers);
2034
- let localVarUseFormData = false;
2035
- const result = (0, _1.generateFormData)(sendForSign, model_1.SendForSign);
2036
- localVarUseFormData = result.localVarUseFormData;
2037
- let data = {};
2038
- if (localVarUseFormData) {
2039
- const formData = (0, _1.toFormData)(result.data);
2040
- data = formData;
2041
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
2042
- }
2043
- else {
2044
- data = model_1.ObjectSerializer.serialize(sendForSign, "SendForSign");
2045
- }
2046
- let localVarRequestOptions = {
2047
- method: 'POST',
2048
- params: localVarQueryParameters,
2049
- headers: localVarHeaderParams,
2050
- url: localVarPath,
2051
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
2052
- maxContentLength: Infinity,
2053
- maxBodyLength: Infinity,
2054
- responseType: "json",
2055
- };
2056
- if (localVarRequestOptions.method !== 'GET') {
2057
- localVarRequestOptions.data = data;
2058
- }
2059
- let authenticationPromise = Promise.resolve();
2060
- if (this.authentications["X-API-KEY"].apiKey) {
2061
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
2062
- }
2063
- if (this.authentications["Bearer"].apiKey) {
2064
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
2065
- }
2066
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2067
- let interceptorPromise = authenticationPromise;
2068
- for (const interceptor of this.interceptors) {
2069
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
2070
- }
2071
- return interceptorPromise.then(() => {
2072
- return new Promise((resolve, reject) => {
2073
- axios_1.default.request(localVarRequestOptions)
2074
- .then((response) => {
2075
- handleSuccessfulResponse(resolve, reject, response, "DocumentCreated");
2076
- }, (error) => {
2077
- if (error.response == null) {
2078
- reject(error);
2079
- return;
2080
- }
2081
- if (handleErrorCodeResponse(reject, error.response, 201, "DocumentCreated")) {
2082
- return;
2083
- }
2084
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
2085
- return;
2086
- }
2087
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
2088
- return;
2089
- }
2090
- if (handleErrorCodeResponse(reject, error.response, 400, "ErrorResult")) {
2091
- return;
2092
- }
2093
- if (handleErrorCodeResponse(reject, error.response, 422, "ErrorResult")) {
2094
- return;
2095
- }
2096
- reject(error);
2097
- });
2098
- });
2099
- });
2100
- });
2101
- }
2102
- teamDocuments(page_1, userId_1, teamId_1, transmitType_1, dateFilterType_1, pageSize_1, startDate_1, status_1, endDate_1, searchKey_1, labels_1, nextCursor_1, brandIds_1) {
2103
- return __awaiter(this, arguments, void 0, function* (page, userId, teamId, transmitType, dateFilterType, pageSize, startDate, status, endDate, searchKey, labels, nextCursor, brandIds, options = { headers: {} }) {
2104
- const localVarPath = this.basePath + '/v1/document/teamlist';
2105
- let localVarQueryParameters = {};
2106
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
2107
- const produces = ['application/json'];
2108
- if (produces.indexOf('application/json') >= 0) {
2109
- localVarHeaderParams['content-type'] = 'application/json';
2110
- }
2111
- else {
2112
- localVarHeaderParams['content-type'] = produces.join(',');
2113
- }
2114
- let localVarFormParams = {};
2115
- let localVarBodyParams = undefined;
2116
- if (page === null || page === undefined) {
2117
- throw new Error('Required parameter page was null or undefined when calling teamDocuments.');
2118
- }
2119
- if (userId !== undefined) {
2120
- localVarQueryParameters['UserId'] = model_1.ObjectSerializer.serialize(userId, "Array<string>");
2121
- }
2122
- if (teamId !== undefined) {
2123
- localVarQueryParameters['TeamId'] = model_1.ObjectSerializer.serialize(teamId, "Array<string>");
2124
- }
2125
- if (transmitType !== undefined) {
2126
- localVarQueryParameters['TransmitType'] = model_1.ObjectSerializer.serialize(transmitType, "'Sent' | 'Received' | 'Both'");
2127
- }
2128
- if (dateFilterType !== undefined) {
2129
- localVarQueryParameters['DateFilterType'] = model_1.ObjectSerializer.serialize(dateFilterType, "'SentBetween' | 'Expiring'");
2130
- }
2131
- if (pageSize !== undefined) {
2132
- localVarQueryParameters['PageSize'] = model_1.ObjectSerializer.serialize(pageSize, "number");
2133
- }
2134
- if (page !== undefined) {
2135
- localVarQueryParameters['Page'] = model_1.ObjectSerializer.serialize(page, "number");
2136
- }
2137
- if (startDate !== undefined) {
2138
- localVarQueryParameters['StartDate'] = model_1.ObjectSerializer.serialize(startDate, "Date");
2139
- }
2140
- if (status !== undefined) {
2141
- localVarQueryParameters['Status'] = model_1.ObjectSerializer.serialize(status, "Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft' | 'Scheduled'>");
2142
- }
2143
- if (endDate !== undefined) {
2144
- localVarQueryParameters['EndDate'] = model_1.ObjectSerializer.serialize(endDate, "Date");
2145
- }
2146
- if (searchKey !== undefined) {
2147
- localVarQueryParameters['SearchKey'] = model_1.ObjectSerializer.serialize(searchKey, "string");
2148
- }
2149
- if (labels !== undefined) {
2150
- localVarQueryParameters['Labels'] = model_1.ObjectSerializer.serialize(labels, "Array<string>");
2151
- }
2152
- if (nextCursor !== undefined) {
2153
- localVarQueryParameters['NextCursor'] = model_1.ObjectSerializer.serialize(nextCursor, "number");
2154
- }
2155
- if (brandIds !== undefined) {
2156
- localVarQueryParameters['BrandIds'] = model_1.ObjectSerializer.serialize(brandIds, "Array<string>");
2157
- }
2158
- Object.assign(localVarHeaderParams, options.headers);
2159
- let localVarUseFormData = false;
2160
- let data = {};
2161
- if (localVarUseFormData) {
2162
- const formData = (0, _1.toFormData)(localVarFormParams);
2163
- data = formData;
2164
- localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
2165
- }
2166
- let localVarRequestOptions = {
2167
- method: 'GET',
2168
- params: localVarQueryParameters,
2169
- headers: localVarHeaderParams,
2170
- url: localVarPath,
2171
- paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
2172
- maxContentLength: Infinity,
2173
- maxBodyLength: Infinity,
2174
- responseType: "json",
2175
- };
2176
- if (localVarRequestOptions.method !== 'GET') {
2177
- localVarRequestOptions.data = data;
2178
- }
2179
- let authenticationPromise = Promise.resolve();
2180
- if (this.authentications["X-API-KEY"].apiKey) {
2181
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
2182
- }
2183
- if (this.authentications["Bearer"].apiKey) {
2184
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
2185
- }
2186
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2187
- let interceptorPromise = authenticationPromise;
2188
- for (const interceptor of this.interceptors) {
2189
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
2190
- }
2191
- return interceptorPromise.then(() => {
2192
- return new Promise((resolve, reject) => {
2193
- axios_1.default.request(localVarRequestOptions)
2194
- .then((response) => {
2195
- handleSuccessfulResponse(resolve, reject, response, "TeamDocumentRecords");
2196
- }, (error) => {
2197
- if (error.response == null) {
2198
- reject(error);
2199
- return;
2200
- }
2201
- if (handleErrorCodeResponse(reject, error.response, 200, "TeamDocumentRecords")) {
2202
- return;
2203
- }
2204
- if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
2205
- return;
2206
- }
2207
- if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
2208
- return;
2209
- }
2210
- reject(error);
2211
- });
2212
- });
2213
- });
2214
- });
2215
- }
2216
- }
2217
- exports.DocumentApi = DocumentApi;
2218
- function deserializeIfNeeded(obj, classname) {
2219
- if (obj !== null && obj !== undefined && obj.constructor.name !== classname) {
2220
- return model_1.ObjectSerializer.deserialize(obj, classname);
2221
- }
2222
- return obj;
2223
- }
2224
- function handleSuccessfulResponse(resolve, reject, response, returnType) {
2225
- let body = response.data;
2226
- if (response.status &&
2227
- response.status >= 200 &&
2228
- response.status <= 299) {
2229
- if (returnType) {
2230
- body = model_1.ObjectSerializer.deserialize(body, returnType);
2231
- }
2232
- resolve(body);
2233
- }
2234
- else {
2235
- reject(new _1.HttpError(response, body, response.status));
2236
- }
2237
- }
2238
- function handleErrorCodeResponse(reject, response, code, returnType) {
2239
- if (response.status !== code) {
2240
- return false;
2241
- }
2242
- let body = response.data;
2243
- if (code === 401) {
2244
- body = "Unauthorized request (401): Invalid authentication.";
2245
- }
2246
- reject(new _1.HttpError(response, body, response.status));
2247
- return true;
2248
- }
2249
- function handleErrorRangeResponse(reject, response, code, returnType) {
2250
- let rangeCodeLeft = Number(code[0] + "00");
2251
- let rangeCodeRight = Number(code[0] + "99");
2252
- if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) {
2253
- const body = model_1.ObjectSerializer.deserialize(response.data, returnType);
2254
- reject(new _1.HttpError(response, body, response.status));
2255
- return true;
2256
- }
2257
- return false;
2258
- }
2259
- //# sourceMappingURL=documentApi.js.map