boldsign 3.1.4 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (841) hide show
  1. package/.openapi-generator/FILES +188 -184
  2. package/.openapi-generator/VERSION +1 -1
  3. package/.openapi-generator-ignore +23 -23
  4. package/LICENSE +21 -21
  5. package/README.md +350 -345
  6. package/api/apis.ts +208 -208
  7. package/api/brandingApi.ts +1233 -1233
  8. package/api/contactsApi.ts +772 -772
  9. package/api/customFieldApi.ts +817 -817
  10. package/api/documentApi.ts +3470 -3470
  11. package/api/groupContactsApi.ts +779 -779
  12. package/api/identityVerificationApi.ts +586 -586
  13. package/api/index.ts +38 -38
  14. package/api/planApi.ts +274 -274
  15. package/api/senderIdentitiesApi.ts +1017 -1017
  16. package/api/teamsApi.ts +661 -661
  17. package/api/templateApi.ts +2188 -2046
  18. package/api/userApi.ts +1094 -1094
  19. package/api.ts +3 -3
  20. package/dist/api/apis.d.ts +1 -1
  21. package/dist/api/apis.js +1 -1
  22. package/dist/api/templateApi.d.ts +2 -1
  23. package/dist/api/templateApi.js +90 -0
  24. package/dist/api/templateApi.js.map +1 -1
  25. package/dist/model/documentProperties.d.ts +3 -0
  26. package/dist/model/documentProperties.js +15 -0
  27. package/dist/model/documentProperties.js.map +1 -1
  28. package/dist/model/errorResponse.d.ts +15 -0
  29. package/dist/model/errorResponse.js +23 -0
  30. package/dist/model/errorResponse.js.map +1 -0
  31. package/dist/model/index.d.ts +5 -1
  32. package/dist/model/index.js +17 -3
  33. package/dist/model/index.js.map +1 -1
  34. package/dist/model/templateProperties.d.ts +1 -0
  35. package/dist/model/templateProperties.js +5 -0
  36. package/dist/model/templateProperties.js.map +1 -1
  37. package/dist/model/templateShareErrorResponse.d.ts +17 -0
  38. package/dist/model/templateShareErrorResponse.js +33 -0
  39. package/dist/model/templateShareErrorResponse.js.map +1 -0
  40. package/dist/model/templateShareRequest.d.ts +15 -0
  41. package/dist/model/templateShareRequest.js +18 -0
  42. package/dist/model/templateShareRequest.js.map +1 -0
  43. package/dist/model/templateTeamShareRequest.d.ts +26 -0
  44. package/dist/model/templateTeamShareRequest.js +40 -0
  45. package/dist/model/templateTeamShareRequest.js.map +1 -0
  46. package/dist/model/textTagDefinition.d.ts +2 -0
  47. package/dist/model/textTagDefinition.js +5 -0
  48. package/dist/model/textTagDefinition.js.map +1 -1
  49. package/docs/AccessCodeDetail.md +19 -19
  50. package/docs/AccessCodeDetails.md +13 -13
  51. package/docs/Added.md +13 -13
  52. package/docs/Address.md +16 -16
  53. package/docs/AttachmentInfo.md +14 -14
  54. package/docs/AuditTrail.md +25 -25
  55. package/docs/AuthenticationSettings.md +11 -11
  56. package/docs/Base64File.md +12 -12
  57. package/docs/BehalfDocument.md +29 -29
  58. package/docs/BehalfDocumentRecords.md +12 -12
  59. package/docs/BehalfOf.md +12 -12
  60. package/docs/BillingViewModel.md +11 -11
  61. package/docs/BrandCreated.md +11 -11
  62. package/docs/BrandCustomFieldDetails.md +16 -16
  63. package/docs/BrandingApi.md +268 -268
  64. package/docs/BrandingMessage.md +11 -11
  65. package/docs/BrandingRecords.md +11 -11
  66. package/docs/ChangeRecipient.md +18 -18
  67. package/docs/ChangeTeamRequest.md +12 -12
  68. package/docs/CollaborationSettings.md +14 -14
  69. package/docs/ConditionalRule.md +13 -13
  70. package/docs/ContactCreated.md +12 -12
  71. package/docs/ContactDetails.md +15 -15
  72. package/docs/ContactPageDetails.md +13 -13
  73. package/docs/ContactsApi.md +176 -176
  74. package/docs/ContactsDetails.md +16 -16
  75. package/docs/ContactsList.md +12 -12
  76. package/docs/CreateContactResponse.md +11 -11
  77. package/docs/CreateGroupContactResponse.md +12 -12
  78. package/docs/CreateSenderIdentityRequest.md +17 -17
  79. package/docs/CreateTeamRequest.md +11 -11
  80. package/docs/CreateTemplateRequest.md +39 -39
  81. package/docs/CreateUser.md +14 -14
  82. package/docs/Creators.md +12 -12
  83. package/docs/CustomDomainSettings.md +12 -12
  84. package/docs/CustomFieldApi.md +174 -174
  85. package/docs/CustomFieldCollection.md +11 -11
  86. package/docs/CustomFieldMessage.md +12 -12
  87. package/docs/CustomFormField.md +44 -44
  88. package/docs/Date.md +13 -13
  89. package/docs/DeleteCustomFieldReply.md +11 -11
  90. package/docs/Document.md +28 -28
  91. package/docs/DocumentApi.md +891 -891
  92. package/docs/DocumentCC.md +11 -11
  93. package/docs/DocumentCcDetails.md +12 -12
  94. package/docs/DocumentCreated.md +11 -11
  95. package/docs/DocumentEdited.md +11 -11
  96. package/docs/DocumentExpirySettings.md +16 -16
  97. package/docs/DocumentFiles.md +16 -16
  98. package/docs/DocumentFormFields.md +53 -53
  99. package/docs/DocumentInfo.md +14 -14
  100. package/docs/DocumentProperties.md +57 -54
  101. package/docs/DocumentReassign.md +13 -13
  102. package/docs/DocumentRecords.md +12 -12
  103. package/docs/DocumentSenderDetail.md +14 -14
  104. package/docs/DocumentSigner.md +34 -34
  105. package/docs/DocumentSignerDetails.md +41 -41
  106. package/docs/DocumentTags.md +12 -12
  107. package/docs/DownloadImageRequest.md +16 -16
  108. package/docs/EditDocumentFile.md +14 -14
  109. package/docs/EditDocumentRequest.md +41 -41
  110. package/docs/EditDocumentSigner.md +35 -35
  111. package/docs/EditFormField.md +52 -52
  112. package/docs/EditSenderIdentityRequest.md +15 -15
  113. package/docs/EditTemplateRequest.md +34 -34
  114. package/docs/EditableDateFieldSettings.md +14 -14
  115. package/docs/EmbeddedCreateTemplateRequest.md +50 -50
  116. package/docs/EmbeddedCustomFieldCreated.md +11 -11
  117. package/docs/EmbeddedDocumentEditJsonRequest.md +19 -19
  118. package/docs/EmbeddedDocumentEdited.md +11 -11
  119. package/docs/EmbeddedDocumentRequest.md +58 -58
  120. package/docs/EmbeddedFileDetails.md +16 -16
  121. package/docs/EmbeddedFileLink.md +11 -11
  122. package/docs/EmbeddedMergeTemplateFormRequest.md +59 -59
  123. package/docs/EmbeddedSendCreated.md +12 -12
  124. package/docs/EmbeddedSendTemplateFormRequest.md +56 -56
  125. package/docs/EmbeddedSigningLink.md +11 -11
  126. package/docs/EmbeddedTemplateCreated.md +12 -12
  127. package/docs/EmbeddedTemplateEditRequest.md +21 -21
  128. package/docs/EmbeddedTemplateEdited.md +11 -11
  129. package/docs/EmbeddedTemplatePreview.md +11 -11
  130. package/docs/EmbeddedTemplatePreviewJsonRequest.md +12 -12
  131. package/docs/Error.md +12 -12
  132. package/docs/ErrorResult.md +11 -11
  133. package/docs/ExistingFormField.md +15 -15
  134. package/docs/ExtendExpiry.md +14 -14
  135. package/docs/FileInfo.md +14 -14
  136. package/docs/Font.md +18 -18
  137. package/docs/FormField.md +53 -53
  138. package/docs/FormFieldPermission.md +13 -13
  139. package/docs/FormGroup.md +15 -15
  140. package/docs/FormulaFieldSettings.md +12 -12
  141. package/docs/GetGroupContactDetails.md +15 -15
  142. package/docs/GroupContact.md +14 -14
  143. package/docs/GroupContactDetails.md +13 -13
  144. package/docs/GroupContactsApi.md +177 -177
  145. package/docs/GroupContactsList.md +12 -12
  146. package/docs/GroupSigner.md +17 -17
  147. package/docs/GroupSignerSettings.md +12 -12
  148. package/docs/GroupUser.md +12 -12
  149. package/docs/IdDocument.md +21 -21
  150. package/docs/IdReport.md +14 -14
  151. package/docs/IdVerification.md +19 -19
  152. package/docs/IdVerificationDetails.md +20 -20
  153. package/docs/IdentityVerificationApi.md +109 -109
  154. package/docs/IdentityVerificationSettings.md +17 -17
  155. package/docs/ImageInfo.md +13 -13
  156. package/docs/MergeAndSendForSignForm.md +49 -49
  157. package/docs/ModificationDetails.md +12 -12
  158. package/docs/NotificationSettings.md +22 -22
  159. package/docs/PageDetails.md +16 -16
  160. package/docs/PhoneNumber.md +12 -12
  161. package/docs/PlanApi.md +38 -38
  162. package/docs/PrefillField.md +12 -12
  163. package/docs/PrefillFieldRequest.md +12 -12
  164. package/docs/ProblemDetails.md +15 -15
  165. package/docs/RecipientChangeLog.md +12 -12
  166. package/docs/RecipientNotificationSettings.md +22 -22
  167. package/docs/Rectangle.md +14 -14
  168. package/docs/ReminderMessage.md +13 -13
  169. package/docs/ReminderSettings.md +13 -13
  170. package/docs/RemoveAuthentication.md +14 -14
  171. package/docs/Removed.md +13 -13
  172. package/docs/RevokeDocument.md +12 -12
  173. package/docs/Role.md +35 -35
  174. package/docs/Roles.md +36 -36
  175. package/docs/SendForSign.md +48 -48
  176. package/docs/SendForSignFromTemplateForm.md +46 -46
  177. package/docs/SenderIdentitiesApi.md +243 -243
  178. package/docs/SenderIdentityCreated.md +11 -11
  179. package/docs/SenderIdentityList.md +12 -12
  180. package/docs/SenderIdentityViewModel.md +21 -21
  181. package/docs/SignatureFrameSettings.md +14 -14
  182. package/docs/SignerAuthenticationSettings.md +12 -12
  183. package/docs/Size.md +12 -12
  184. package/docs/TeamCreated.md +11 -11
  185. package/docs/TeamDocumentRecords.md +12 -12
  186. package/docs/TeamListResponse.md +12 -12
  187. package/docs/TeamPageDetails.md +12 -12
  188. package/docs/TeamResponse.md +15 -15
  189. package/docs/TeamUpdateRequest.md +12 -12
  190. package/docs/TeamUsers.md +16 -16
  191. package/docs/Teams.md +14 -14
  192. package/docs/TeamsApi.md +141 -141
  193. package/docs/Template.md +29 -29
  194. package/docs/TemplateApi.md +554 -520
  195. package/docs/TemplateCC.md +12 -12
  196. package/docs/TemplateCreated.md +11 -11
  197. package/docs/TemplateFiles.md +14 -14
  198. package/docs/TemplateFormFields.md +53 -53
  199. package/docs/TemplateGroupSigner.md +12 -12
  200. package/docs/TemplateProperties.md +42 -41
  201. package/docs/TemplateRecords.md +12 -12
  202. package/docs/TemplateRole.md +30 -30
  203. package/docs/TemplateSenderDetail.md +12 -12
  204. package/docs/TemplateSenderDetails.md +13 -13
  205. package/docs/TemplateSharedTemplateDetail.md +12 -12
  206. package/docs/TemplateSharing.md +11 -11
  207. package/docs/TemplateSignerDetails.md +29 -29
  208. package/docs/TemplateTag.md +14 -14
  209. package/docs/TemplateTeamShare.md +12 -12
  210. package/docs/TextTagDefinition.md +43 -42
  211. package/docs/TextTagOffset.md +12 -12
  212. package/docs/UpdateGroupContact.md +13 -13
  213. package/docs/UpdateUser.md +14 -14
  214. package/docs/UpdateUserMetaData.md +12 -12
  215. package/docs/UserApi.md +275 -275
  216. package/docs/UserPageDetails.md +12 -12
  217. package/docs/UserProperties.md +21 -21
  218. package/docs/UserRecords.md +12 -12
  219. package/docs/UsersDetails.md +21 -21
  220. package/docs/Validation.md +13 -13
  221. package/docs/VerificationDataRequest.md +15 -15
  222. package/docs/ViewBrandDetails.md +36 -36
  223. package/docs/ViewCustomFieldDetails.md +17 -17
  224. package/git_push.sh +57 -57
  225. package/model/accessCodeDetail.ts +91 -91
  226. package/model/accessCodeDetails.ts +44 -44
  227. package/model/added.ts +43 -43
  228. package/model/address.ts +61 -61
  229. package/model/attachmentInfo.ts +49 -49
  230. package/model/auditTrail.ts +201 -201
  231. package/model/authenticationSettings.ts +39 -39
  232. package/model/base64File.ts +37 -37
  233. package/model/behalfDocument.ts +154 -154
  234. package/model/behalfDocumentRecords.ts +39 -39
  235. package/model/behalfOf.ts +37 -37
  236. package/model/billingViewModel.ts +31 -31
  237. package/model/brandCreated.ts +31 -31
  238. package/model/brandCustomFieldDetails.ts +62 -62
  239. package/model/brandingMessage.ts +31 -31
  240. package/model/brandingRecords.ts +32 -32
  241. package/model/changeRecipient.ts +74 -74
  242. package/model/changeTeamRequest.ts +37 -37
  243. package/model/collaborationSettings.ts +49 -49
  244. package/model/conditionalRule.ts +43 -43
  245. package/model/contactCreated.ts +37 -37
  246. package/model/contactDetails.ts +56 -56
  247. package/model/contactPageDetails.ts +43 -43
  248. package/model/contactsDetails.ts +62 -62
  249. package/model/contactsList.ts +39 -39
  250. package/model/createContactResponse.ts +32 -32
  251. package/model/createGroupContactResponse.ts +37 -37
  252. package/model/createSenderIdentityRequest.ts +93 -93
  253. package/model/createTeamRequest.ts +31 -31
  254. package/model/createTemplateRequest.ts +214 -214
  255. package/model/createUser.ts +56 -56
  256. package/model/creators.ts +37 -37
  257. package/model/customDomainSettings.ts +37 -37
  258. package/model/customFieldCollection.ts +32 -32
  259. package/model/customFieldMessage.ts +37 -37
  260. package/model/customFormField.ts +282 -282
  261. package/model/deleteCustomFieldReply.ts +31 -31
  262. package/model/document.ts +147 -147
  263. package/model/documentCC.ts +31 -31
  264. package/model/documentCcDetails.ts +37 -37
  265. package/model/documentCreated.ts +31 -31
  266. package/model/documentEdited.ts +37 -37
  267. package/model/documentExpirySettings.ts +68 -68
  268. package/model/documentFiles.ts +61 -61
  269. package/model/documentFormFields.ts +316 -316
  270. package/model/documentInfo.ts +100 -100
  271. package/model/documentProperties.ts +364 -346
  272. package/model/documentReassign.ts +43 -43
  273. package/model/documentRecords.ts +39 -39
  274. package/model/documentSenderDetail.ts +49 -49
  275. package/model/documentSigner.ts +247 -247
  276. package/model/documentSignerDetails.ts +298 -298
  277. package/model/documentTags.ts +37 -37
  278. package/model/downloadImageRequest.ts +61 -61
  279. package/model/editDocumentFile.ts +56 -56
  280. package/model/editDocumentRequest.ts +236 -236
  281. package/model/editDocumentSigner.ts +255 -255
  282. package/model/editFormField.ts +338 -338
  283. package/model/editSenderIdentityRequest.ts +81 -81
  284. package/model/editTemplateRequest.ts +183 -183
  285. package/model/editableDateFieldSettings.ts +49 -49
  286. package/model/embeddedCreateTemplateRequest.ts +307 -307
  287. package/model/embeddedCustomFieldCreated.ts +31 -31
  288. package/model/embeddedDocumentEditJsonRequest.ts +108 -108
  289. package/model/embeddedDocumentEdited.ts +31 -31
  290. package/model/embeddedDocumentRequest.ts +364 -364
  291. package/model/embeddedFileDetails.ts +61 -61
  292. package/model/embeddedFileLink.ts +31 -31
  293. package/model/embeddedMergeTemplateFormRequest.ts +370 -370
  294. package/model/embeddedSendCreated.ts +37 -37
  295. package/model/embeddedSendTemplateFormRequest.ts +351 -351
  296. package/model/embeddedSigningLink.ts +31 -31
  297. package/model/embeddedTemplateCreated.ts +37 -37
  298. package/model/embeddedTemplateEditRequest.ts +120 -120
  299. package/model/embeddedTemplateEdited.ts +31 -31
  300. package/model/embeddedTemplatePreview.ts +31 -31
  301. package/model/embeddedTemplatePreviewJsonRequest.ts +37 -37
  302. package/model/errorResponse.ts +37 -0
  303. package/model/errorResult.ts +31 -31
  304. package/model/existingFormField.ts +55 -55
  305. package/model/extendExpiry.ts +49 -49
  306. package/model/fileInfo.ts +49 -49
  307. package/model/font.ts +88 -88
  308. package/model/formField.ts +340 -340
  309. package/model/formFieldPermission.ts +43 -43
  310. package/model/formGroup.ts +63 -63
  311. package/model/formulaFieldSettings.ts +37 -37
  312. package/model/getGroupContactDetails.ts +57 -57
  313. package/model/groupContact.ts +50 -50
  314. package/model/groupContactDetails.ts +44 -44
  315. package/model/groupContactsList.ts +39 -39
  316. package/model/groupSigner.ts +77 -77
  317. package/model/groupSignerSettings.ts +37 -37
  318. package/model/groupUser.ts +37 -37
  319. package/model/idDocument.ts +93 -93
  320. package/model/idReport.ts +50 -50
  321. package/model/idVerification.ts +79 -79
  322. package/model/idVerificationDetails.ts +85 -85
  323. package/model/identityVerificationSettings.ts +84 -84
  324. package/model/imageInfo.ts +43 -43
  325. package/model/index.ts +680 -666
  326. package/model/mergeAndSendForSignForm.ts +283 -283
  327. package/model/modelDate.ts +43 -43
  328. package/model/modelError.ts +37 -37
  329. package/model/models.ts +244 -244
  330. package/model/modificationDetails.ts +37 -37
  331. package/model/notificationSettings.ts +97 -97
  332. package/model/pageDetails.ts +61 -61
  333. package/model/phoneNumber.ts +37 -37
  334. package/model/prefillField.ts +37 -37
  335. package/model/prefillFieldRequest.ts +38 -38
  336. package/model/problemDetails.ts +55 -55
  337. package/model/recipientChangeLog.ts +39 -39
  338. package/model/recipientNotificationSettings.ts +97 -97
  339. package/model/rectangle.ts +49 -49
  340. package/model/reminderMessage.ts +44 -44
  341. package/model/reminderSettings.ts +43 -43
  342. package/model/removeAuthentication.ts +50 -50
  343. package/model/removed.ts +43 -43
  344. package/model/revokeDocument.ts +37 -37
  345. package/model/role.ts +254 -254
  346. package/model/roles.ts +258 -258
  347. package/model/sendForSign.ts +277 -277
  348. package/model/sendForSignFromTemplateForm.ts +264 -264
  349. package/model/senderIdentityCreated.ts +31 -31
  350. package/model/senderIdentityList.ts +39 -39
  351. package/model/senderIdentityViewModel.ts +92 -92
  352. package/model/signatureFrameSettings.ts +49 -49
  353. package/model/signerAuthenticationSettings.ts +37 -37
  354. package/model/size.ts +37 -37
  355. package/model/teamCreated.ts +31 -31
  356. package/model/teamDocumentRecords.ts +39 -39
  357. package/model/teamListResponse.ts +39 -39
  358. package/model/teamPageDetails.ts +37 -37
  359. package/model/teamResponse.ts +56 -56
  360. package/model/teamUpdateRequest.ts +37 -37
  361. package/model/teamUsers.ts +73 -73
  362. package/model/teams.ts +49 -49
  363. package/model/template.ts +159 -159
  364. package/model/templateCC.ts +37 -37
  365. package/model/templateCreated.ts +31 -31
  366. package/model/templateFiles.ts +49 -49
  367. package/model/templateFormFields.ts +315 -315
  368. package/model/templateGroupSigner.ts +37 -37
  369. package/model/templateProperties.ts +240 -234
  370. package/model/templateRecords.ts +39 -39
  371. package/model/templateRole.ts +221 -221
  372. package/model/templateSenderDetail.ts +37 -37
  373. package/model/templateSenderDetails.ts +43 -43
  374. package/model/templateShareErrorResponse.ts +49 -0
  375. package/model/templateShareRequest.ts +32 -0
  376. package/model/templateSharedTemplateDetail.ts +43 -43
  377. package/model/templateSharing.ts +32 -32
  378. package/model/templateSignerDetails.ts +173 -173
  379. package/model/templateTag.ts +49 -49
  380. package/model/templateTeamShare.ts +44 -44
  381. package/model/templateTeamShareRequest.ts +53 -0
  382. package/model/textTagDefinition.ts +268 -261
  383. package/model/textTagOffset.ts +37 -37
  384. package/model/updateGroupContact.ts +44 -44
  385. package/model/updateUser.ts +60 -60
  386. package/model/updateUserMetaData.ts +37 -37
  387. package/model/userPageDetails.ts +37 -37
  388. package/model/userProperties.ts +91 -91
  389. package/model/userRecords.ts +39 -39
  390. package/model/usersDetails.ts +91 -91
  391. package/model/validation.ts +52 -52
  392. package/model/verificationDataRequest.ts +55 -55
  393. package/model/viewBrandDetails.ts +190 -190
  394. package/model/viewCustomFieldDetails.ts +68 -68
  395. package/package.json +52 -52
  396. package/tsconfig.json +24 -24
  397. package/boldsign-3.1.4.tgz +0 -0
  398. package/dist/examples/DocumentProperties.d.ts +0 -1
  399. package/dist/examples/DocumentProperties.js +0 -28
  400. package/dist/examples/DocumentProperties.js.map +0 -1
  401. package/dist/examples/brandCreate.d.ts +0 -1
  402. package/dist/examples/brandCreate.js +0 -68
  403. package/dist/examples/brandCreate.js.map +0 -1
  404. package/dist/examples/brandDelete.d.ts +0 -1
  405. package/dist/examples/brandDelete.js +0 -28
  406. package/dist/examples/brandDelete.js.map +0 -1
  407. package/dist/examples/brandGet.d.ts +0 -1
  408. package/dist/examples/brandGet.js +0 -28
  409. package/dist/examples/brandGet.js.map +0 -1
  410. package/dist/examples/brandList.d.ts +0 -1
  411. package/dist/examples/brandList.js +0 -27
  412. package/dist/examples/brandList.js.map +0 -1
  413. package/dist/examples/brandResetDefault.d.ts +0 -1
  414. package/dist/examples/brandResetDefault.js +0 -28
  415. package/dist/examples/brandResetDefault.js.map +0 -1
  416. package/dist/examples/brandUpdate.d.ts +0 -1
  417. package/dist/examples/brandUpdate.js +0 -68
  418. package/dist/examples/brandUpdate.js.map +0 -1
  419. package/dist/examples/contactCreate.d.ts +0 -1
  420. package/dist/examples/contactCreate.js +0 -38
  421. package/dist/examples/contactCreate.js.map +0 -1
  422. package/dist/examples/contactDelete.d.ts +0 -1
  423. package/dist/examples/contactDelete.js +0 -28
  424. package/dist/examples/contactDelete.js.map +0 -1
  425. package/dist/examples/contactGet.d.ts +0 -1
  426. package/dist/examples/contactGet.js +0 -28
  427. package/dist/examples/contactGet.js.map +0 -1
  428. package/dist/examples/contactGroupDelete.d.ts +0 -1
  429. package/dist/examples/contactGroupDelete.js +0 -27
  430. package/dist/examples/contactGroupDelete.js.map +0 -1
  431. package/dist/examples/contactGroupGet.d.ts +0 -1
  432. package/dist/examples/contactGroupGet.js +0 -27
  433. package/dist/examples/contactGroupGet.js.map +0 -1
  434. package/dist/examples/contactGroupList.d.ts +0 -1
  435. package/dist/examples/contactGroupList.js +0 -29
  436. package/dist/examples/contactGroupList.js.map +0 -1
  437. package/dist/examples/contactGroupUpdate.d.ts +0 -1
  438. package/dist/examples/contactGroupUpdate.js +0 -34
  439. package/dist/examples/contactGroupUpdate.js.map +0 -1
  440. package/dist/examples/contactGroupsCreate.d.ts +0 -1
  441. package/dist/examples/contactGroupsCreate.js +0 -35
  442. package/dist/examples/contactGroupsCreate.js.map +0 -1
  443. package/dist/examples/contactList.d.ts +0 -1
  444. package/dist/examples/contactList.js +0 -29
  445. package/dist/examples/contactList.js.map +0 -1
  446. package/dist/examples/contactUpdate.d.ts +0 -1
  447. package/dist/examples/contactUpdate.js +0 -38
  448. package/dist/examples/contactUpdate.js.map +0 -1
  449. package/dist/examples/customFieldCreate.d.ts +0 -1
  450. package/dist/examples/customFieldCreate.js +0 -39
  451. package/dist/examples/customFieldCreate.js.map +0 -1
  452. package/dist/examples/customFieldDelete.d.ts +0 -1
  453. package/dist/examples/customFieldDelete.js +0 -28
  454. package/dist/examples/customFieldDelete.js.map +0 -1
  455. package/dist/examples/customFieldEdit.d.ts +0 -1
  456. package/dist/examples/customFieldEdit.js +0 -40
  457. package/dist/examples/customFieldEdit.js.map +0 -1
  458. package/dist/examples/customFieldEmbeddedCreateUrl.d.ts +0 -1
  459. package/dist/examples/customFieldEmbeddedCreateUrl.js +0 -31
  460. package/dist/examples/customFieldEmbeddedCreateUrl.js.map +0 -1
  461. package/dist/examples/customFieldList.d.ts +0 -1
  462. package/dist/examples/customFieldList.js +0 -28
  463. package/dist/examples/customFieldList.js.map +0 -1
  464. package/dist/examples/documentAddAuthentication.d.ts +0 -1
  465. package/dist/examples/documentAddAuthentication.js +0 -32
  466. package/dist/examples/documentAddAuthentication.js.map +0 -1
  467. package/dist/examples/documentAddTags.d.ts +0 -1
  468. package/dist/examples/documentAddTags.js +0 -31
  469. package/dist/examples/documentAddTags.js.map +0 -1
  470. package/dist/examples/documentCancelEditing.d.ts +0 -1
  471. package/dist/examples/documentCancelEditing.js +0 -27
  472. package/dist/examples/documentCancelEditing.js.map +0 -1
  473. package/dist/examples/documentChangeAccessCode.d.ts +0 -1
  474. package/dist/examples/documentChangeAccessCode.js +0 -32
  475. package/dist/examples/documentChangeAccessCode.js.map +0 -1
  476. package/dist/examples/documentChangeRecipients.d.ts +0 -1
  477. package/dist/examples/documentChangeRecipients.js +0 -34
  478. package/dist/examples/documentChangeRecipients.js.map +0 -1
  479. package/dist/examples/documentCreateEmbeddedEditUrl.d.ts +0 -1
  480. package/dist/examples/documentCreateEmbeddedEditUrl.js +0 -32
  481. package/dist/examples/documentCreateEmbeddedEditUrl.js.map +0 -1
  482. package/dist/examples/documentDelete.d.ts +0 -1
  483. package/dist/examples/documentDelete.js +0 -29
  484. package/dist/examples/documentDelete.js.map +0 -1
  485. package/dist/examples/documentDeleteTags.d.ts +0 -1
  486. package/dist/examples/documentDeleteTags.js +0 -31
  487. package/dist/examples/documentDeleteTags.js.map +0 -1
  488. package/dist/examples/documentDownload.d.ts +0 -1
  489. package/dist/examples/documentDownload.js +0 -29
  490. package/dist/examples/documentDownload.js.map +0 -1
  491. package/dist/examples/documentDownloadAttachment.d.ts +0 -1
  492. package/dist/examples/documentDownloadAttachment.js +0 -30
  493. package/dist/examples/documentDownloadAttachment.js.map +0 -1
  494. package/dist/examples/documentDownloadAuditTrial.d.ts +0 -1
  495. package/dist/examples/documentDownloadAuditTrial.js +0 -29
  496. package/dist/examples/documentDownloadAuditTrial.js.map +0 -1
  497. package/dist/examples/documentEdit.d.ts +0 -1
  498. package/dist/examples/documentEdit.js +0 -86
  499. package/dist/examples/documentEdit.js.map +0 -1
  500. package/dist/examples/documentEmbeddedRequestLink.d.ts +0 -1
  501. package/dist/examples/documentEmbeddedRequestLink.js +0 -96
  502. package/dist/examples/documentEmbeddedRequestLink.js.map +0 -1
  503. package/dist/examples/documentEmbeddedSignLink.d.ts +0 -1
  504. package/dist/examples/documentEmbeddedSignLink.js +0 -35
  505. package/dist/examples/documentEmbeddedSignLink.js.map +0 -1
  506. package/dist/examples/documentExtendExpiry.d.ts +0 -1
  507. package/dist/examples/documentExtendExpiry.js +0 -32
  508. package/dist/examples/documentExtendExpiry.js.map +0 -1
  509. package/dist/examples/documentList.d.ts +0 -1
  510. package/dist/examples/documentList.js +0 -29
  511. package/dist/examples/documentList.js.map +0 -1
  512. package/dist/examples/documentListBehalf.d.ts +0 -1
  513. package/dist/examples/documentListBehalf.js +0 -28
  514. package/dist/examples/documentListBehalf.js.map +0 -1
  515. package/dist/examples/documentListTeam.d.ts +0 -1
  516. package/dist/examples/documentListTeam.js +0 -28
  517. package/dist/examples/documentListTeam.js.map +0 -1
  518. package/dist/examples/documentPrefillFieldCheckBox.d.ts +0 -1
  519. package/dist/examples/documentPrefillFieldCheckBox.js +0 -34
  520. package/dist/examples/documentPrefillFieldCheckBox.js.map +0 -1
  521. package/dist/examples/documentPrefillFieldDropDown.d.ts +0 -1
  522. package/dist/examples/documentPrefillFieldDropDown.js +0 -34
  523. package/dist/examples/documentPrefillFieldDropDown.js.map +0 -1
  524. package/dist/examples/documentPrefillFieldEditableDate.d.ts +0 -1
  525. package/dist/examples/documentPrefillFieldEditableDate.js +0 -34
  526. package/dist/examples/documentPrefillFieldEditableDate.js.map +0 -1
  527. package/dist/examples/documentPrefillFieldImage.d.ts +0 -1
  528. package/dist/examples/documentPrefillFieldImage.js +0 -34
  529. package/dist/examples/documentPrefillFieldImage.js.map +0 -1
  530. package/dist/examples/documentPrefillFieldRadioButton.d.ts +0 -1
  531. package/dist/examples/documentPrefillFieldRadioButton.js +0 -34
  532. package/dist/examples/documentPrefillFieldRadioButton.js.map +0 -1
  533. package/dist/examples/documentPrefillFieldTextBox.d.ts +0 -1
  534. package/dist/examples/documentPrefillFieldTextBox.js +0 -34
  535. package/dist/examples/documentPrefillFieldTextBox.js.map +0 -1
  536. package/dist/examples/documentRemoveAuthentication.d.ts +0 -1
  537. package/dist/examples/documentRemoveAuthentication.js +0 -31
  538. package/dist/examples/documentRemoveAuthentication.js.map +0 -1
  539. package/dist/examples/documentRevoke.d.ts +0 -1
  540. package/dist/examples/documentRevoke.js +0 -31
  541. package/dist/examples/documentRevoke.js.map +0 -1
  542. package/dist/examples/documentSend.d.ts +0 -1
  543. package/dist/examples/documentSend.js +0 -90
  544. package/dist/examples/documentSend.js.map +0 -1
  545. package/dist/examples/documentSendOnBehalf.d.ts +0 -1
  546. package/dist/examples/documentSendOnBehalf.js +0 -101
  547. package/dist/examples/documentSendOnBehalf.js.map +0 -1
  548. package/dist/examples/documentSendReminder.d.ts +0 -1
  549. package/dist/examples/documentSendReminder.js +0 -32
  550. package/dist/examples/documentSendReminder.js.map +0 -1
  551. package/dist/examples/draftSend.d.ts +0 -1
  552. package/dist/examples/draftSend.js +0 -27
  553. package/dist/examples/draftSend.js.map +0 -1
  554. package/dist/examples/embeddedCreatePreviewUrl.d.ts +0 -1
  555. package/dist/examples/embeddedCreatePreviewUrl.js +0 -29
  556. package/dist/examples/embeddedCreatePreviewUrl.js.map +0 -1
  557. package/dist/examples/embeddedManualVerification.d.ts +0 -1
  558. package/dist/examples/embeddedManualVerification.js +0 -34
  559. package/dist/examples/embeddedManualVerification.js.map +0 -1
  560. package/dist/examples/identityVerificationImage.d.ts +0 -1
  561. package/dist/examples/identityVerificationImage.js +0 -34
  562. package/dist/examples/identityVerificationImage.js.map +0 -1
  563. package/dist/examples/identityVerificationReport.d.ts +0 -1
  564. package/dist/examples/identityVerificationReport.js +0 -33
  565. package/dist/examples/identityVerificationReport.js.map +0 -1
  566. package/dist/examples/listTemplate.d.ts +0 -1
  567. package/dist/examples/listTemplate.js +0 -29
  568. package/dist/examples/listTemplate.js.map +0 -1
  569. package/dist/examples/plan.d.ts +0 -1
  570. package/dist/examples/plan.js +0 -27
  571. package/dist/examples/plan.js.map +0 -1
  572. package/dist/examples/senderIdentityCreate.d.ts +0 -1
  573. package/dist/examples/senderIdentityCreate.js +0 -33
  574. package/dist/examples/senderIdentityCreate.js.map +0 -1
  575. package/dist/examples/senderIdentityDelete.d.ts +0 -1
  576. package/dist/examples/senderIdentityDelete.js +0 -28
  577. package/dist/examples/senderIdentityDelete.js.map +0 -1
  578. package/dist/examples/senderIdentityList.d.ts +0 -1
  579. package/dist/examples/senderIdentityList.js +0 -29
  580. package/dist/examples/senderIdentityList.js.map +0 -1
  581. package/dist/examples/senderIdentityProperties.d.ts +0 -1
  582. package/dist/examples/senderIdentityProperties.js +0 -27
  583. package/dist/examples/senderIdentityProperties.js.map +0 -1
  584. package/dist/examples/senderIdentityRerequest.d.ts +0 -1
  585. package/dist/examples/senderIdentityRerequest.js +0 -28
  586. package/dist/examples/senderIdentityRerequest.js.map +0 -1
  587. package/dist/examples/senderIdentityResendInvitation.d.ts +0 -1
  588. package/dist/examples/senderIdentityResendInvitation.js +0 -28
  589. package/dist/examples/senderIdentityResendInvitation.js.map +0 -1
  590. package/dist/examples/senderIdentityUpdate.d.ts +0 -1
  591. package/dist/examples/senderIdentityUpdate.js +0 -32
  592. package/dist/examples/senderIdentityUpdate.js.map +0 -1
  593. package/dist/examples/teamCreate.d.ts +0 -1
  594. package/dist/examples/teamCreate.js +0 -30
  595. package/dist/examples/teamCreate.js.map +0 -1
  596. package/dist/examples/teamGet.d.ts +0 -1
  597. package/dist/examples/teamGet.js +0 -28
  598. package/dist/examples/teamGet.js.map +0 -1
  599. package/dist/examples/teamList.d.ts +0 -1
  600. package/dist/examples/teamList.js +0 -29
  601. package/dist/examples/teamList.js.map +0 -1
  602. package/dist/examples/teamUpdate.d.ts +0 -1
  603. package/dist/examples/teamUpdate.js +0 -31
  604. package/dist/examples/teamUpdate.js.map +0 -1
  605. package/dist/examples/templateAddTag.d.ts +0 -1
  606. package/dist/examples/templateAddTag.js +0 -32
  607. package/dist/examples/templateAddTag.js.map +0 -1
  608. package/dist/examples/templateCreate.d.ts +0 -1
  609. package/dist/examples/templateCreate.js +0 -91
  610. package/dist/examples/templateCreate.js.map +0 -1
  611. package/dist/examples/templateDelete.d.ts +0 -1
  612. package/dist/examples/templateDelete.js +0 -28
  613. package/dist/examples/templateDelete.js.map +0 -1
  614. package/dist/examples/templateDeleteTag.d.ts +0 -1
  615. package/dist/examples/templateDeleteTag.js +0 -32
  616. package/dist/examples/templateDeleteTag.js.map +0 -1
  617. package/dist/examples/templateDetails.d.ts +0 -1
  618. package/dist/examples/templateDetails.js +0 -28
  619. package/dist/examples/templateDetails.js.map +0 -1
  620. package/dist/examples/templateDownload.d.ts +0 -1
  621. package/dist/examples/templateDownload.js +0 -28
  622. package/dist/examples/templateDownload.js.map +0 -1
  623. package/dist/examples/templateEdit.d.ts +0 -1
  624. package/dist/examples/templateEdit.js +0 -39
  625. package/dist/examples/templateEdit.js.map +0 -1
  626. package/dist/examples/templateEmbeddedCreate.d.ts +0 -1
  627. package/dist/examples/templateEmbeddedCreate.js +0 -76
  628. package/dist/examples/templateEmbeddedCreate.js.map +0 -1
  629. package/dist/examples/templateEmbeddedEdit.d.ts +0 -1
  630. package/dist/examples/templateEmbeddedEdit.js +0 -36
  631. package/dist/examples/templateEmbeddedEdit.js.map +0 -1
  632. package/dist/examples/templateEmbeddedRequestLink.d.ts +0 -1
  633. package/dist/examples/templateEmbeddedRequestLink.js +0 -78
  634. package/dist/examples/templateEmbeddedRequestLink.js.map +0 -1
  635. package/dist/examples/templateMergerEmbeddedRequestUrl.d.ts +0 -1
  636. package/dist/examples/templateMergerEmbeddedRequestUrl.js +0 -80
  637. package/dist/examples/templateMergerEmbeddedRequestUrl.js.map +0 -1
  638. package/dist/examples/templateSendDocument.d.ts +0 -1
  639. package/dist/examples/templateSendDocument.js +0 -102
  640. package/dist/examples/templateSendDocument.js.map +0 -1
  641. package/dist/examples/templateSendDocumentUsingMultipleTemplate.d.ts +0 -1
  642. package/dist/examples/templateSendDocumentUsingMultipleTemplate.js +0 -50
  643. package/dist/examples/templateSendDocumentUsingMultipleTemplate.js.map +0 -1
  644. package/dist/examples/userChangeTeam.d.ts +0 -1
  645. package/dist/examples/userChangeTeam.js +0 -30
  646. package/dist/examples/userChangeTeam.js.map +0 -1
  647. package/dist/examples/userCreate.d.ts +0 -1
  648. package/dist/examples/userCreate.js +0 -32
  649. package/dist/examples/userCreate.js.map +0 -1
  650. package/dist/examples/userGet.d.ts +0 -1
  651. package/dist/examples/userGet.js +0 -28
  652. package/dist/examples/userGet.js.map +0 -1
  653. package/dist/examples/userInvitationCancel.d.ts +0 -1
  654. package/dist/examples/userInvitationCancel.js +0 -28
  655. package/dist/examples/userInvitationCancel.js.map +0 -1
  656. package/dist/examples/userList.d.ts +0 -1
  657. package/dist/examples/userList.js +0 -29
  658. package/dist/examples/userList.js.map +0 -1
  659. package/dist/examples/userResendInvitation.d.ts +0 -1
  660. package/dist/examples/userResendInvitation.js +0 -28
  661. package/dist/examples/userResendInvitation.js.map +0 -1
  662. package/dist/examples/userUpdateRole.d.ts +0 -1
  663. package/dist/examples/userUpdateRole.js +0 -31
  664. package/dist/examples/userUpdateRole.js.map +0 -1
  665. package/dist/tests/config.d.ts +0 -5
  666. package/dist/tests/config.js +0 -43
  667. package/dist/tests/config.js.map +0 -1
  668. package/dist/tests/integration/BrandingApiTest.spec.d.ts +0 -1
  669. package/dist/tests/integration/BrandingApiTest.spec.js +0 -310
  670. package/dist/tests/integration/BrandingApiTest.spec.js.map +0 -1
  671. package/dist/tests/integration/ContactsApiTest.spec.d.ts +0 -1
  672. package/dist/tests/integration/ContactsApiTest.spec.js +0 -249
  673. package/dist/tests/integration/ContactsApiTest.spec.js.map +0 -1
  674. package/dist/tests/integration/CustomFieldApiTest.spec.d.ts +0 -1
  675. package/dist/tests/integration/CustomFieldApiTest.spec.js +0 -289
  676. package/dist/tests/integration/CustomFieldApiTest.spec.js.map +0 -1
  677. package/dist/tests/integration/DocumentApiTest.spec.d.ts +0 -1
  678. package/dist/tests/integration/DocumentApiTest.spec.js +0 -1710
  679. package/dist/tests/integration/DocumentApiTest.spec.js.map +0 -1
  680. package/dist/tests/integration/IdentityVerificationApiTest.spec.d.ts +0 -1
  681. package/dist/tests/integration/IdentityVerificationApiTest.spec.js +0 -160
  682. package/dist/tests/integration/IdentityVerificationApiTest.spec.js.map +0 -1
  683. package/dist/tests/integration/TemplateApiTest.spec.d.ts +0 -1
  684. package/dist/tests/integration/TemplateApiTest.spec.js +0 -1518
  685. package/dist/tests/integration/TemplateApiTest.spec.js.map +0 -1
  686. package/dist/tests/integration/planApiTest.spec.d.ts +0 -1
  687. package/dist/tests/integration/planApiTest.spec.js +0 -41
  688. package/dist/tests/integration/planApiTest.spec.js.map +0 -1
  689. package/dist/tests/integration/senderIdentity.spec.d.ts +0 -1
  690. package/dist/tests/integration/senderIdentity.spec.js +0 -481
  691. package/dist/tests/integration/senderIdentity.spec.js.map +0 -1
  692. package/dist/tests/integration/teamsApiTest.spec.d.ts +0 -1
  693. package/dist/tests/integration/teamsApiTest.spec.js +0 -230
  694. package/dist/tests/integration/teamsApiTest.spec.js.map +0 -1
  695. package/dist/tests/integration/usersApiTest.spec.d.ts +0 -1
  696. package/dist/tests/integration/usersApiTest.spec.js +0 -290
  697. package/dist/tests/integration/usersApiTest.spec.js.map +0 -1
  698. package/dist/tests/performance/performanceApiTest.spec.d.ts +0 -1
  699. package/dist/tests/performance/performanceApiTest.spec.js +0 -368
  700. package/dist/tests/performance/performanceApiTest.spec.js.map +0 -1
  701. package/dist/tests/unit/brandingApi.spec.d.ts +0 -1
  702. package/dist/tests/unit/brandingApi.spec.js +0 -174
  703. package/dist/tests/unit/brandingApi.spec.js.map +0 -1
  704. package/dist/tests/unit/contactsApi.spec.d.ts +0 -1
  705. package/dist/tests/unit/contactsApi.spec.js +0 -154
  706. package/dist/tests/unit/contactsApi.spec.js.map +0 -1
  707. package/dist/tests/unit/customFieldApi.spec.d.ts +0 -1
  708. package/dist/tests/unit/customFieldApi.spec.js +0 -140
  709. package/dist/tests/unit/customFieldApi.spec.js.map +0 -1
  710. package/dist/tests/unit/documentApi.spec.d.ts +0 -1
  711. package/dist/tests/unit/documentApi.spec.js +0 -476
  712. package/dist/tests/unit/documentApi.spec.js.map +0 -1
  713. package/dist/tests/unit/planApi.spec.d.ts +0 -1
  714. package/dist/tests/unit/planApi.spec.js +0 -69
  715. package/dist/tests/unit/planApi.spec.js.map +0 -1
  716. package/dist/tests/unit/senderIdentitiesApi.spec.d.ts +0 -1
  717. package/dist/tests/unit/senderIdentitiesApi.spec.js +0 -148
  718. package/dist/tests/unit/senderIdentitiesApi.spec.js.map +0 -1
  719. package/dist/tests/unit/teamApi.spec.d.ts +0 -1
  720. package/dist/tests/unit/teamApi.spec.js +0 -116
  721. package/dist/tests/unit/teamApi.spec.js.map +0 -1
  722. package/dist/tests/unit/templateApi.spec.d.ts +0 -1
  723. package/dist/tests/unit/templateApi.spec.js +0 -285
  724. package/dist/tests/unit/templateApi.spec.js.map +0 -1
  725. package/dist/tests/unit/userApi.spec.d.ts +0 -1
  726. package/dist/tests/unit/userApi.spec.js +0 -163
  727. package/dist/tests/unit/userApi.spec.js.map +0 -1
  728. package/examples/DocumentProperties.ts +0 -15
  729. package/examples/brandCreate.ts +0 -29
  730. package/examples/brandDelete.ts +0 -15
  731. package/examples/brandGet.ts +0 -15
  732. package/examples/brandList.ts +0 -14
  733. package/examples/brandResetDefault.ts +0 -15
  734. package/examples/brandUpdate.ts +0 -21
  735. package/examples/contactCreate.ts +0 -26
  736. package/examples/contactDelete.ts +0 -15
  737. package/examples/contactGet.ts +0 -15
  738. package/examples/contactGroupDelete.ts +0 -14
  739. package/examples/contactGroupGet.ts +0 -14
  740. package/examples/contactGroupList.ts +0 -16
  741. package/examples/contactGroupUpdate.ts +0 -21
  742. package/examples/contactGroupsCreate.ts +0 -24
  743. package/examples/contactList.ts +0 -16
  744. package/examples/contactUpdate.ts +0 -26
  745. package/examples/customFieldCreate.ts +0 -28
  746. package/examples/customFieldDelete.ts +0 -15
  747. package/examples/customFieldEdit.ts +0 -30
  748. package/examples/customFieldEmbeddedCreateUrl.ts +0 -19
  749. package/examples/customFieldList.ts +0 -15
  750. package/examples/documentAddAuthentication.ts +0 -20
  751. package/examples/documentAddTags.ts +0 -19
  752. package/examples/documentCancelEditing.ts +0 -14
  753. package/examples/documentChangeAccessCode.ts +0 -20
  754. package/examples/documentChangeRecipients.ts +0 -22
  755. package/examples/documentCreateEmbeddedEditUrl.ts +0 -19
  756. package/examples/documentDelete.ts +0 -16
  757. package/examples/documentDeleteTags.ts +0 -19
  758. package/examples/documentDownload.ts +0 -16
  759. package/examples/documentDownloadAttachment.ts +0 -17
  760. package/examples/documentDownloadAuditTrial.ts +0 -16
  761. package/examples/documentEdit.ts +0 -43
  762. package/examples/documentEmbeddedRequestLink.ts +0 -49
  763. package/examples/documentEmbeddedSignLink.ts +0 -23
  764. package/examples/documentExtendExpiry.ts +0 -20
  765. package/examples/documentList.ts +0 -19
  766. package/examples/documentListBehalf.ts +0 -15
  767. package/examples/documentListTeam.ts +0 -15
  768. package/examples/documentPrefillFieldCheckBox.ts +0 -23
  769. package/examples/documentPrefillFieldDropDown.ts +0 -23
  770. package/examples/documentPrefillFieldEditableDate.ts +0 -23
  771. package/examples/documentPrefillFieldImage.ts +0 -23
  772. package/examples/documentPrefillFieldRadioButton.ts +0 -23
  773. package/examples/documentPrefillFieldTextBox.ts +0 -23
  774. package/examples/documentRemoveAuthentication.ts +0 -19
  775. package/examples/documentRevoke.ts +0 -19
  776. package/examples/documentSend.ts +0 -51
  777. package/examples/documentSendOnBehalf.ts +0 -53
  778. package/examples/documentSendReminder.ts +0 -20
  779. package/examples/documents/agreement.pdf +0 -0
  780. package/examples/documents/logo.jpg +0 -0
  781. package/examples/draftSend.ts +0 -12
  782. package/examples/embeddedCreatePreviewUrl.ts +0 -15
  783. package/examples/embeddedManualVerification.ts +0 -22
  784. package/examples/identityVerificationImage.ts +0 -23
  785. package/examples/identityVerificationReport.ts +0 -21
  786. package/examples/listTemplate.ts +0 -16
  787. package/examples/plan.ts +0 -14
  788. package/examples/senderIdentityCreate.ts +0 -21
  789. package/examples/senderIdentityDelete.ts +0 -15
  790. package/examples/senderIdentityList.ts +0 -16
  791. package/examples/senderIdentityProperties.ts +0 -15
  792. package/examples/senderIdentityRerequest.ts +0 -15
  793. package/examples/senderIdentityResendInvitation.ts +0 -15
  794. package/examples/senderIdentityUpdate.ts +0 -20
  795. package/examples/teamCreate.ts +0 -18
  796. package/examples/teamGet.ts +0 -15
  797. package/examples/teamList.ts +0 -16
  798. package/examples/teamUpdate.ts +0 -19
  799. package/examples/templateAddTag.ts +0 -20
  800. package/examples/templateCreate.ts +0 -47
  801. package/examples/templateDelete.ts +0 -15
  802. package/examples/templateDeleteTag.ts +0 -20
  803. package/examples/templateDetails.ts +0 -15
  804. package/examples/templateDownload.ts +0 -15
  805. package/examples/templateEdit.ts +0 -28
  806. package/examples/templateEmbeddedCreate.ts +0 -29
  807. package/examples/templateEmbeddedEdit.ts +0 -24
  808. package/examples/templateEmbeddedRequestLink.ts +0 -34
  809. package/examples/templateMergerEmbeddedRequestUrl.ts +0 -37
  810. package/examples/templateSendDocument.ts +0 -60
  811. package/examples/templateSendDocumentUsingMultipleTemplate.ts +0 -40
  812. package/examples/userChangeTeam.ts +0 -15
  813. package/examples/userCreate.ts +0 -20
  814. package/examples/userGet.ts +0 -15
  815. package/examples/userInvitationCancel.ts +0 -15
  816. package/examples/userList.ts +0 -16
  817. package/examples/userResendInvitation.ts +0 -15
  818. package/examples/userUpdateRole.ts +0 -19
  819. package/tests/config.ts +0 -20
  820. package/tests/documents/agreement.pdf +0 -0
  821. package/tests/documents/logo.jpg +0 -0
  822. package/tests/integration/BrandingApiTest.spec.ts +0 -254
  823. package/tests/integration/ContactsApiTest.spec.ts +0 -222
  824. package/tests/integration/CustomFieldApiTest.spec.ts +0 -231
  825. package/tests/integration/DocumentApiTest.spec.ts +0 -1624
  826. package/tests/integration/IdentityVerificationApiTest.spec.ts +0 -114
  827. package/tests/integration/TemplateApiTest.spec.ts +0 -1420
  828. package/tests/integration/planApiTest.spec.ts +0 -26
  829. package/tests/integration/senderIdentity.spec.ts +0 -397
  830. package/tests/integration/teamsApiTest.spec.ts +0 -226
  831. package/tests/integration/usersApiTest.spec.ts +0 -251
  832. package/tests/performance/performanceApiTest.spec.ts +0 -362
  833. package/tests/unit/brandingApi.spec.ts +0 -163
  834. package/tests/unit/contactsApi.spec.ts +0 -143
  835. package/tests/unit/customFieldApi.spec.ts +0 -123
  836. package/tests/unit/documentApi.spec.ts +0 -545
  837. package/tests/unit/planApi.spec.ts +0 -34
  838. package/tests/unit/senderIdentitiesApi.spec.ts +0 -148
  839. package/tests/unit/teamApi.spec.ts +0 -94
  840. package/tests/unit/templateApi.spec.ts +0 -307
  841. package/tests/unit/userApi.spec.ts +0 -162
@@ -1,1017 +1,1017 @@
1
- /**
2
- * BoldSign API
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
-
13
- import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
14
-
15
- import {
16
- ObjectSerializer, Authentication, VoidAuth, Interceptor,
17
- HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, RequestFile,
18
- CreateSenderIdentityRequest,EditSenderIdentityRequest,ErrorResult,SenderIdentityCreated,SenderIdentityList,SenderIdentityViewModel,
19
- } from '../model';
20
-
21
- import {
22
- HttpError,
23
- optionsI,
24
- returnTypeT,
25
- returnTypeI,
26
- generateFormData,
27
- toFormData,
28
- queryParamsSerializer,
29
- USER_AGENT,
30
- } from './';
31
-
32
- let defaultBasePath = 'https://api.boldsign.com';
33
-
34
- // ===============================================
35
- // This file is autogenerated - Please do not edit
36
- // ===============================================
37
-
38
-
39
- export class SenderIdentitiesApi {
40
- protected _basePath = defaultBasePath;
41
- protected _defaultHeaders : any = { 'User-Agent': USER_AGENT };
42
- protected _useQuerystring : boolean = true;
43
-
44
- protected authentications = {
45
- 'default': <Authentication>new VoidAuth(),
46
- 'Bearer': new ApiKeyAuth('header', 'Authorization'),
47
- 'X-API-KEY': new ApiKeyAuth('header', 'X-API-KEY'),
48
- }
49
-
50
- protected interceptors: Interceptor[] = [];
51
-
52
- constructor(basePath?: string) {
53
- if (basePath) {
54
- this.basePath = basePath;
55
- }
56
- }
57
-
58
- set useQuerystring(value: boolean) {
59
- this._useQuerystring = value;
60
- }
61
-
62
- set basePath(basePath: string) {
63
- this._basePath = basePath;
64
- }
65
-
66
- set defaultHeaders(defaultHeaders: any) {
67
- this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT };
68
- }
69
-
70
- get defaultHeaders() {
71
- return this._defaultHeaders;
72
- }
73
-
74
- get basePath() {
75
- return this._basePath;
76
- }
77
-
78
- public setDefaultAuthentication(auth: Authentication) {
79
- this.authentications.default = auth;
80
- }
81
-
82
- public setApiKey(apikey: string) {
83
- this.authentications["X-API-KEY"].apiKey = apikey;
84
- }
85
-
86
- public setAccessToken(accessToken: string) {
87
- this.authentications["Bearer"].apiKey = 'bearer ' + accessToken;
88
- }
89
-
90
- public addInterceptor(interceptor: Interceptor) {
91
- this.interceptors.push(interceptor);
92
- }
93
-
94
- /**
95
- *
96
- * @summary Creates sender identity.
97
- * @param createSenderIdentityRequest The create sender identity request.
98
- * @param options
99
- */
100
- public async createSenderIdentities (createSenderIdentityRequest: CreateSenderIdentityRequest, options: optionsI = {headers: {}}) : Promise<SenderIdentityCreated> {
101
- createSenderIdentityRequest = deserializeIfNeeded(createSenderIdentityRequest, "CreateSenderIdentityRequest");
102
- const localVarPath = this.basePath + '/v1/senderIdentities/create';
103
- let localVarQueryParameters: any = {};
104
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
105
- const produces = ['application/json'];
106
- // give precedence to 'application/json'
107
- if (produces.indexOf('application/json') >= 0) {
108
- localVarHeaderParams['content-type'] = 'application/json';
109
- } else {
110
- localVarHeaderParams['content-type'] = produces.join(',');
111
- }
112
- let localVarFormParams: any = {};
113
- let localVarBodyParams: any = undefined;
114
-
115
- // verify required parameter 'createSenderIdentityRequest' is not null or undefined
116
- if (createSenderIdentityRequest === null || createSenderIdentityRequest === undefined) {
117
- throw new Error('Required parameter createSenderIdentityRequest was null or undefined when calling createSenderIdentities.');
118
- }
119
-
120
- (<any>Object).assign(localVarHeaderParams, options.headers);
121
-
122
- let localVarUseFormData = false;
123
-
124
- const result = generateFormData(createSenderIdentityRequest, CreateSenderIdentityRequest);
125
- localVarUseFormData = result.localVarUseFormData;
126
-
127
- let data = {};
128
- if (localVarUseFormData) {
129
- const formData = toFormData(result.data);
130
- data = formData;
131
- localVarHeaderParams = {
132
- ...localVarHeaderParams,
133
- ...formData.getHeaders(),
134
- };
135
- } else {
136
- data = ObjectSerializer.serialize(
137
- createSenderIdentityRequest,
138
- "CreateSenderIdentityRequest"
139
- );
140
- }
141
-
142
- let localVarRequestOptions: AxiosRequestConfig = {
143
- method: 'POST',
144
- params: localVarQueryParameters,
145
- headers: localVarHeaderParams,
146
- url: localVarPath,
147
- paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
148
- maxContentLength: Infinity,
149
- maxBodyLength: Infinity,
150
- responseType: "json",
151
- };
152
-
153
- if (localVarRequestOptions.method !== 'GET') {
154
- localVarRequestOptions.data = data;
155
- }
156
- let authenticationPromise = Promise.resolve();
157
-
158
- if (this.authentications["X-API-KEY"].apiKey) {
159
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
160
- }
161
- if (this.authentications["Bearer"].apiKey) {
162
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
163
- }
164
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
165
-
166
- let interceptorPromise = authenticationPromise;
167
- for (const interceptor of this.interceptors) {
168
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
169
- }
170
-
171
- return interceptorPromise.then(() => {
172
- return new Promise<SenderIdentityCreated>((resolve, reject) => {
173
- axios.request(localVarRequestOptions)
174
- .then((response) => {
175
- handleSuccessfulResponse<SenderIdentityCreated>(
176
- resolve,
177
- reject,
178
- response,
179
- "SenderIdentityCreated",
180
- );
181
- }, (error: AxiosError) => {
182
- if (error.response == null) {
183
- reject(error);
184
- return;
185
- }
186
-
187
- if (handleErrorCodeResponse(
188
- reject,
189
- error.response,
190
- 201,
191
- "SenderIdentityCreated",
192
- )) {
193
- return;
194
- }
195
- if (handleErrorCodeResponse(
196
- reject,
197
- error.response,
198
- 401,
199
- "ErrorResult",
200
- )) {
201
- return;
202
- }
203
- if (handleErrorCodeResponse(
204
- reject,
205
- error.response,
206
- 403,
207
- "ErrorResult",
208
- )) {
209
- return;
210
- }
211
- if (handleErrorCodeResponse(
212
- reject,
213
- error.response,
214
- 400,
215
- "ErrorResult",
216
- )) {
217
- return;
218
- }
219
-
220
-
221
- reject(error);
222
- });
223
- });
224
- });
225
- }
226
- /**
227
- *
228
- * @summary Deletes sender identity.
229
- * @param email The email address.
230
- * @param options
231
- */
232
- public async deleteSenderIdentities (email: string, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
233
- const localVarPath = this.basePath + '/v1/senderIdentities/delete';
234
- let localVarQueryParameters: any = {};
235
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
236
- const produces = ['application/json'];
237
- // give precedence to 'application/json'
238
- if (produces.indexOf('application/json') >= 0) {
239
- localVarHeaderParams['content-type'] = 'application/json';
240
- } else {
241
- localVarHeaderParams['content-type'] = produces.join(',');
242
- }
243
- let localVarFormParams: any = {};
244
- let localVarBodyParams: any = undefined;
245
-
246
- // verify required parameter 'email' is not null or undefined
247
- if (email === null || email === undefined) {
248
- throw new Error('Required parameter email was null or undefined when calling deleteSenderIdentities.');
249
- }
250
-
251
- if (email !== undefined) {
252
- localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
253
- }
254
-
255
- (<any>Object).assign(localVarHeaderParams, options.headers);
256
-
257
- let localVarUseFormData = false;
258
-
259
- let data = {};
260
- if (localVarUseFormData) {
261
- const formData = toFormData(localVarFormParams);
262
- data = formData;
263
- localVarHeaderParams = {
264
- ...localVarHeaderParams,
265
- ...formData.getHeaders(),
266
- };
267
- }
268
-
269
- let localVarRequestOptions: AxiosRequestConfig = {
270
- method: 'DELETE',
271
- params: localVarQueryParameters,
272
- headers: localVarHeaderParams,
273
- url: localVarPath,
274
- paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
275
- maxContentLength: Infinity,
276
- maxBodyLength: Infinity,
277
- responseType: "json",
278
- };
279
-
280
- if (localVarRequestOptions.method !== 'GET') {
281
- localVarRequestOptions.data = data;
282
- }
283
- let authenticationPromise = Promise.resolve();
284
-
285
- if (this.authentications["X-API-KEY"].apiKey) {
286
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
287
- }
288
- if (this.authentications["Bearer"].apiKey) {
289
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
290
- }
291
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
292
-
293
- let interceptorPromise = authenticationPromise;
294
- for (const interceptor of this.interceptors) {
295
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
296
- }
297
-
298
- return interceptorPromise.then(() => {
299
- return new Promise<returnTypeI>((resolve, reject) => {
300
- axios.request(localVarRequestOptions)
301
- .then((response) => {
302
- handleSuccessfulResponse(
303
- resolve,
304
- reject,
305
- response,
306
-
307
- );
308
- }, (error: AxiosError) => {
309
- if (error.response == null) {
310
- reject(error);
311
- return;
312
- }
313
-
314
- if (handleErrorCodeResponse(
315
- reject,
316
- error.response,
317
- 401,
318
- "ErrorResult",
319
- )) {
320
- return;
321
- }
322
- if (handleErrorCodeResponse(
323
- reject,
324
- error.response,
325
- 403,
326
- "ErrorResult",
327
- )) {
328
- return;
329
- }
330
-
331
-
332
- reject(error);
333
- });
334
- });
335
- });
336
- }
337
- /**
338
- *
339
- * @summary Gets sender identity by ID or email.
340
- * @param id The sender identity id.
341
- * @param email The sender identity email.
342
- * @param options
343
- */
344
- public async getSenderIdentityProperties (id?: string, email?: string, options: optionsI = {headers: {}}) : Promise<SenderIdentityViewModel> {
345
- const localVarPath = this.basePath + '/v1/senderIdentities/properties';
346
- let localVarQueryParameters: any = {};
347
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
348
- const produces = ['application/json'];
349
- // give precedence to 'application/json'
350
- if (produces.indexOf('application/json') >= 0) {
351
- localVarHeaderParams['content-type'] = 'application/json';
352
- } else {
353
- localVarHeaderParams['content-type'] = produces.join(',');
354
- }
355
- let localVarFormParams: any = {};
356
- let localVarBodyParams: any = undefined;
357
-
358
- if (id !== undefined) {
359
- localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
360
- }
361
-
362
- if (email !== undefined) {
363
- localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
364
- }
365
-
366
- (<any>Object).assign(localVarHeaderParams, options.headers);
367
-
368
- let localVarUseFormData = false;
369
-
370
- let data = {};
371
- if (localVarUseFormData) {
372
- const formData = toFormData(localVarFormParams);
373
- data = formData;
374
- localVarHeaderParams = {
375
- ...localVarHeaderParams,
376
- ...formData.getHeaders(),
377
- };
378
- }
379
-
380
- let localVarRequestOptions: AxiosRequestConfig = {
381
- method: 'GET',
382
- params: localVarQueryParameters,
383
- headers: localVarHeaderParams,
384
- url: localVarPath,
385
- paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
386
- maxContentLength: Infinity,
387
- maxBodyLength: Infinity,
388
- responseType: "json",
389
- };
390
-
391
- if (localVarRequestOptions.method !== 'GET') {
392
- localVarRequestOptions.data = data;
393
- }
394
- let authenticationPromise = Promise.resolve();
395
-
396
- if (this.authentications["X-API-KEY"].apiKey) {
397
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
398
- }
399
- if (this.authentications["Bearer"].apiKey) {
400
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
401
- }
402
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
403
-
404
- let interceptorPromise = authenticationPromise;
405
- for (const interceptor of this.interceptors) {
406
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
407
- }
408
-
409
- return interceptorPromise.then(() => {
410
- return new Promise<SenderIdentityViewModel>((resolve, reject) => {
411
- axios.request(localVarRequestOptions)
412
- .then((response) => {
413
- handleSuccessfulResponse<SenderIdentityViewModel>(
414
- resolve,
415
- reject,
416
- response,
417
- "SenderIdentityViewModel",
418
- );
419
- }, (error: AxiosError) => {
420
- if (error.response == null) {
421
- reject(error);
422
- return;
423
- }
424
-
425
- if (handleErrorCodeResponse(
426
- reject,
427
- error.response,
428
- 200,
429
- "SenderIdentityViewModel",
430
- )) {
431
- return;
432
- }
433
- if (handleErrorCodeResponse(
434
- reject,
435
- error.response,
436
- 401,
437
- "ErrorResult",
438
- )) {
439
- return;
440
- }
441
- if (handleErrorCodeResponse(
442
- reject,
443
- error.response,
444
- 403,
445
- "ErrorResult",
446
- )) {
447
- return;
448
- }
449
-
450
-
451
- reject(error);
452
- });
453
- });
454
- });
455
- }
456
- /**
457
- *
458
- * @summary Lists sender identity.
459
- * @param page Page index specified in get sender identity request.
460
- * @param pageSize Page size specified in get sender identity list request.
461
- * @param search Users can be listed by the search key present in the sender identity like sender identity name and email address
462
- * @param brandIds A list of brand IDs to filter associated with the sender identity.
463
- * @param options
464
- */
465
- public async listSenderIdentities (page: number, pageSize?: number, search?: string, brandIds?: Array<string>, options: optionsI = {headers: {}}) : Promise<SenderIdentityList> {
466
- const localVarPath = this.basePath + '/v1/senderIdentities/list';
467
- let localVarQueryParameters: any = {};
468
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
469
- const produces = ['application/json'];
470
- // give precedence to 'application/json'
471
- if (produces.indexOf('application/json') >= 0) {
472
- localVarHeaderParams['content-type'] = 'application/json';
473
- } else {
474
- localVarHeaderParams['content-type'] = produces.join(',');
475
- }
476
- let localVarFormParams: any = {};
477
- let localVarBodyParams: any = undefined;
478
-
479
- // verify required parameter 'page' is not null or undefined
480
- if (page === null || page === undefined) {
481
- throw new Error('Required parameter page was null or undefined when calling listSenderIdentities.');
482
- }
483
-
484
- if (pageSize !== undefined) {
485
- localVarQueryParameters['PageSize'] = ObjectSerializer.serialize(pageSize, "number");
486
- }
487
-
488
- if (page !== undefined) {
489
- localVarQueryParameters['Page'] = ObjectSerializer.serialize(page, "number");
490
- }
491
-
492
- if (search !== undefined) {
493
- localVarQueryParameters['Search'] = ObjectSerializer.serialize(search, "string");
494
- }
495
-
496
- if (brandIds !== undefined) {
497
- localVarQueryParameters['BrandIds'] = ObjectSerializer.serialize(brandIds, "Array<string>");
498
- }
499
-
500
- (<any>Object).assign(localVarHeaderParams, options.headers);
501
-
502
- let localVarUseFormData = false;
503
-
504
- let data = {};
505
- if (localVarUseFormData) {
506
- const formData = toFormData(localVarFormParams);
507
- data = formData;
508
- localVarHeaderParams = {
509
- ...localVarHeaderParams,
510
- ...formData.getHeaders(),
511
- };
512
- }
513
-
514
- let localVarRequestOptions: AxiosRequestConfig = {
515
- method: 'GET',
516
- params: localVarQueryParameters,
517
- headers: localVarHeaderParams,
518
- url: localVarPath,
519
- paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
520
- maxContentLength: Infinity,
521
- maxBodyLength: Infinity,
522
- responseType: "json",
523
- };
524
-
525
- if (localVarRequestOptions.method !== 'GET') {
526
- localVarRequestOptions.data = data;
527
- }
528
- let authenticationPromise = Promise.resolve();
529
-
530
- if (this.authentications["X-API-KEY"].apiKey) {
531
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
532
- }
533
- if (this.authentications["Bearer"].apiKey) {
534
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
535
- }
536
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
537
-
538
- let interceptorPromise = authenticationPromise;
539
- for (const interceptor of this.interceptors) {
540
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
541
- }
542
-
543
- return interceptorPromise.then(() => {
544
- return new Promise<SenderIdentityList>((resolve, reject) => {
545
- axios.request(localVarRequestOptions)
546
- .then((response) => {
547
- handleSuccessfulResponse<SenderIdentityList>(
548
- resolve,
549
- reject,
550
- response,
551
- "SenderIdentityList",
552
- );
553
- }, (error: AxiosError) => {
554
- if (error.response == null) {
555
- reject(error);
556
- return;
557
- }
558
-
559
- if (handleErrorCodeResponse(
560
- reject,
561
- error.response,
562
- 200,
563
- "SenderIdentityList",
564
- )) {
565
- return;
566
- }
567
- if (handleErrorCodeResponse(
568
- reject,
569
- error.response,
570
- 401,
571
- "ErrorResult",
572
- )) {
573
- return;
574
- }
575
- if (handleErrorCodeResponse(
576
- reject,
577
- error.response,
578
- 403,
579
- "ErrorResult",
580
- )) {
581
- return;
582
- }
583
-
584
-
585
- reject(error);
586
- });
587
- });
588
- });
589
- }
590
- /**
591
- *
592
- * @summary Rerequests denied sender identity.
593
- * @param email The email address.
594
- * @param options
595
- */
596
- public async reRequestSenderIdentities (email: string, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
597
- const localVarPath = this.basePath + '/v1/senderIdentities/rerequest';
598
- let localVarQueryParameters: any = {};
599
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
600
- const produces = ['application/json'];
601
- // give precedence to 'application/json'
602
- if (produces.indexOf('application/json') >= 0) {
603
- localVarHeaderParams['content-type'] = 'application/json';
604
- } else {
605
- localVarHeaderParams['content-type'] = produces.join(',');
606
- }
607
- let localVarFormParams: any = {};
608
- let localVarBodyParams: any = undefined;
609
-
610
- // verify required parameter 'email' is not null or undefined
611
- if (email === null || email === undefined) {
612
- throw new Error('Required parameter email was null or undefined when calling reRequestSenderIdentities.');
613
- }
614
-
615
- if (email !== undefined) {
616
- localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
617
- }
618
-
619
- (<any>Object).assign(localVarHeaderParams, options.headers);
620
-
621
- let localVarUseFormData = false;
622
-
623
- let data = {};
624
- if (localVarUseFormData) {
625
- const formData = toFormData(localVarFormParams);
626
- data = formData;
627
- localVarHeaderParams = {
628
- ...localVarHeaderParams,
629
- ...formData.getHeaders(),
630
- };
631
- }
632
-
633
- let localVarRequestOptions: AxiosRequestConfig = {
634
- method: 'POST',
635
- params: localVarQueryParameters,
636
- headers: localVarHeaderParams,
637
- url: localVarPath,
638
- paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
639
- maxContentLength: Infinity,
640
- maxBodyLength: Infinity,
641
- responseType: "json",
642
- };
643
-
644
- if (localVarRequestOptions.method !== 'GET') {
645
- localVarRequestOptions.data = data;
646
- }
647
- let authenticationPromise = Promise.resolve();
648
-
649
- if (this.authentications["X-API-KEY"].apiKey) {
650
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
651
- }
652
- if (this.authentications["Bearer"].apiKey) {
653
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
654
- }
655
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
656
-
657
- let interceptorPromise = authenticationPromise;
658
- for (const interceptor of this.interceptors) {
659
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
660
- }
661
-
662
- return interceptorPromise.then(() => {
663
- return new Promise<returnTypeI>((resolve, reject) => {
664
- axios.request(localVarRequestOptions)
665
- .then((response) => {
666
- handleSuccessfulResponse(
667
- resolve,
668
- reject,
669
- response,
670
-
671
- );
672
- }, (error: AxiosError) => {
673
- if (error.response == null) {
674
- reject(error);
675
- return;
676
- }
677
-
678
- if (handleErrorCodeResponse(
679
- reject,
680
- error.response,
681
- 401,
682
- "ErrorResult",
683
- )) {
684
- return;
685
- }
686
- if (handleErrorCodeResponse(
687
- reject,
688
- error.response,
689
- 403,
690
- "ErrorResult",
691
- )) {
692
- return;
693
- }
694
-
695
-
696
- reject(error);
697
- });
698
- });
699
- });
700
- }
701
- /**
702
- *
703
- * @summary Resends sender identity invitation.
704
- * @param email The email address.
705
- * @param options
706
- */
707
- public async resendInvitationSenderIdentities (email: string, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
708
- const localVarPath = this.basePath + '/v1/senderIdentities/resendInvitation';
709
- let localVarQueryParameters: any = {};
710
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
711
- const produces = ['application/json'];
712
- // give precedence to 'application/json'
713
- if (produces.indexOf('application/json') >= 0) {
714
- localVarHeaderParams['content-type'] = 'application/json';
715
- } else {
716
- localVarHeaderParams['content-type'] = produces.join(',');
717
- }
718
- let localVarFormParams: any = {};
719
- let localVarBodyParams: any = undefined;
720
-
721
- // verify required parameter 'email' is not null or undefined
722
- if (email === null || email === undefined) {
723
- throw new Error('Required parameter email was null or undefined when calling resendInvitationSenderIdentities.');
724
- }
725
-
726
- if (email !== undefined) {
727
- localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
728
- }
729
-
730
- (<any>Object).assign(localVarHeaderParams, options.headers);
731
-
732
- let localVarUseFormData = false;
733
-
734
- let data = {};
735
- if (localVarUseFormData) {
736
- const formData = toFormData(localVarFormParams);
737
- data = formData;
738
- localVarHeaderParams = {
739
- ...localVarHeaderParams,
740
- ...formData.getHeaders(),
741
- };
742
- }
743
-
744
- let localVarRequestOptions: AxiosRequestConfig = {
745
- method: 'POST',
746
- params: localVarQueryParameters,
747
- headers: localVarHeaderParams,
748
- url: localVarPath,
749
- paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
750
- maxContentLength: Infinity,
751
- maxBodyLength: Infinity,
752
- responseType: "json",
753
- };
754
-
755
- if (localVarRequestOptions.method !== 'GET') {
756
- localVarRequestOptions.data = data;
757
- }
758
- let authenticationPromise = Promise.resolve();
759
-
760
- if (this.authentications["X-API-KEY"].apiKey) {
761
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
762
- }
763
- if (this.authentications["Bearer"].apiKey) {
764
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
765
- }
766
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
767
-
768
- let interceptorPromise = authenticationPromise;
769
- for (const interceptor of this.interceptors) {
770
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
771
- }
772
-
773
- return interceptorPromise.then(() => {
774
- return new Promise<returnTypeI>((resolve, reject) => {
775
- axios.request(localVarRequestOptions)
776
- .then((response) => {
777
- handleSuccessfulResponse(
778
- resolve,
779
- reject,
780
- response,
781
-
782
- );
783
- }, (error: AxiosError) => {
784
- if (error.response == null) {
785
- reject(error);
786
- return;
787
- }
788
-
789
- if (handleErrorCodeResponse(
790
- reject,
791
- error.response,
792
- 401,
793
- "ErrorResult",
794
- )) {
795
- return;
796
- }
797
- if (handleErrorCodeResponse(
798
- reject,
799
- error.response,
800
- 403,
801
- "ErrorResult",
802
- )) {
803
- return;
804
- }
805
-
806
-
807
- reject(error);
808
- });
809
- });
810
- });
811
- }
812
- /**
813
- *
814
- * @summary Updates sender identity.
815
- * @param email The email address.
816
- * @param editSenderIdentityRequest The create sender identity request.
817
- * @param options
818
- */
819
- public async updateSenderIdentities (email: string, editSenderIdentityRequest: EditSenderIdentityRequest, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
820
- editSenderIdentityRequest = deserializeIfNeeded(editSenderIdentityRequest, "EditSenderIdentityRequest");
821
- const localVarPath = this.basePath + '/v1/senderIdentities/update';
822
- let localVarQueryParameters: any = {};
823
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
824
- const produces = ['application/json'];
825
- // give precedence to 'application/json'
826
- if (produces.indexOf('application/json') >= 0) {
827
- localVarHeaderParams['content-type'] = 'application/json';
828
- } else {
829
- localVarHeaderParams['content-type'] = produces.join(',');
830
- }
831
- let localVarFormParams: any = {};
832
- let localVarBodyParams: any = undefined;
833
-
834
- // verify required parameter 'email' is not null or undefined
835
- if (email === null || email === undefined) {
836
- throw new Error('Required parameter email was null or undefined when calling updateSenderIdentities.');
837
- }
838
-
839
- // verify required parameter 'editSenderIdentityRequest' is not null or undefined
840
- if (editSenderIdentityRequest === null || editSenderIdentityRequest === undefined) {
841
- throw new Error('Required parameter editSenderIdentityRequest was null or undefined when calling updateSenderIdentities.');
842
- }
843
-
844
- if (email !== undefined) {
845
- localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
846
- }
847
-
848
- (<any>Object).assign(localVarHeaderParams, options.headers);
849
-
850
- let localVarUseFormData = false;
851
-
852
- const result = generateFormData(editSenderIdentityRequest, EditSenderIdentityRequest);
853
- localVarUseFormData = result.localVarUseFormData;
854
-
855
- let data = {};
856
- if (localVarUseFormData) {
857
- const formData = toFormData(result.data);
858
- data = formData;
859
- localVarHeaderParams = {
860
- ...localVarHeaderParams,
861
- ...formData.getHeaders(),
862
- };
863
- } else {
864
- data = ObjectSerializer.serialize(
865
- editSenderIdentityRequest,
866
- "EditSenderIdentityRequest"
867
- );
868
- }
869
-
870
- let localVarRequestOptions: AxiosRequestConfig = {
871
- method: 'POST',
872
- params: localVarQueryParameters,
873
- headers: localVarHeaderParams,
874
- url: localVarPath,
875
- paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
876
- maxContentLength: Infinity,
877
- maxBodyLength: Infinity,
878
- responseType: "json",
879
- };
880
-
881
- if (localVarRequestOptions.method !== 'GET') {
882
- localVarRequestOptions.data = data;
883
- }
884
- let authenticationPromise = Promise.resolve();
885
-
886
- if (this.authentications["X-API-KEY"].apiKey) {
887
- authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
888
- }
889
- if (this.authentications["Bearer"].apiKey) {
890
- authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
891
- }
892
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
893
-
894
- let interceptorPromise = authenticationPromise;
895
- for (const interceptor of this.interceptors) {
896
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
897
- }
898
-
899
- return interceptorPromise.then(() => {
900
- return new Promise<returnTypeI>((resolve, reject) => {
901
- axios.request(localVarRequestOptions)
902
- .then((response) => {
903
- handleSuccessfulResponse(
904
- resolve,
905
- reject,
906
- response,
907
-
908
- );
909
- }, (error: AxiosError) => {
910
- if (error.response == null) {
911
- reject(error);
912
- return;
913
- }
914
-
915
- if (handleErrorCodeResponse(
916
- reject,
917
- error.response,
918
- 401,
919
- "ErrorResult",
920
- )) {
921
- return;
922
- }
923
- if (handleErrorCodeResponse(
924
- reject,
925
- error.response,
926
- 403,
927
- "ErrorResult",
928
- )) {
929
- return;
930
- }
931
-
932
-
933
- reject(error);
934
- });
935
- });
936
- });
937
- }
938
- }
939
-
940
- function deserializeIfNeeded<T> (obj: T, classname: string): T {
941
- if (obj !== null && obj !== undefined && obj.constructor.name !== classname) {
942
- return ObjectSerializer.deserialize(obj, classname);
943
- }
944
-
945
- return obj;
946
- }
947
-
948
- type AxiosResolve<T> = (
949
- value: (T | PromiseLike<T>),
950
- ) => void
951
-
952
- type AxiosReject = (reason?: any) => void;
953
-
954
- function handleSuccessfulResponse<T>(
955
- resolve: AxiosResolve<T>,
956
- reject: AxiosReject,
957
- response: AxiosResponse,
958
- returnType?: string,
959
- ) {
960
- let body = response.data;
961
-
962
- if (
963
- response.status &&
964
- response.status >= 200 &&
965
- response.status <= 299
966
- ) {
967
- if (returnType) {
968
- body = ObjectSerializer.deserialize(body, returnType);
969
- }
970
-
971
- resolve(body);
972
- } else {
973
- reject(new HttpError(response, body, response.status));
974
- }
975
- }
976
-
977
- function handleErrorCodeResponse(
978
- reject: AxiosReject,
979
- response: AxiosResponse,
980
- code: number,
981
- returnType: string
982
- ): boolean {
983
- if (response.status !== code) {
984
- return false;
985
- }
986
-
987
- let body = response.data;
988
- if(code === 401) {
989
- body = "Unauthorized request (401): Invalid authentication.";
990
- }
991
- reject(new HttpError(response, body, response.status));
992
-
993
- return true;
994
- }
995
-
996
- function handleErrorRangeResponse(
997
- reject: AxiosReject,
998
- response: AxiosResponse,
999
- code: string,
1000
- returnType: string
1001
- ): boolean {
1002
- let rangeCodeLeft = Number(code[0] + "00");
1003
- let rangeCodeRight = Number(code[0] + "99");
1004
-
1005
- if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) {
1006
- const body = ObjectSerializer.deserialize(
1007
- response.data,
1008
- returnType,
1009
- );
1010
-
1011
- reject(new HttpError(response, body, response.status));
1012
-
1013
- return true;
1014
- }
1015
-
1016
- return false;
1017
- }
1
+ /**
2
+ * BoldSign API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+ import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
14
+
15
+ import {
16
+ ObjectSerializer, Authentication, VoidAuth, Interceptor,
17
+ HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, RequestFile,
18
+ CreateSenderIdentityRequest,EditSenderIdentityRequest,ErrorResult,SenderIdentityCreated,SenderIdentityList,SenderIdentityViewModel,
19
+ } from '../model';
20
+
21
+ import {
22
+ HttpError,
23
+ optionsI,
24
+ returnTypeT,
25
+ returnTypeI,
26
+ generateFormData,
27
+ toFormData,
28
+ queryParamsSerializer,
29
+ USER_AGENT,
30
+ } from './';
31
+
32
+ let defaultBasePath = 'https://api.boldsign.com';
33
+
34
+ // ===============================================
35
+ // This file is autogenerated - Please do not edit
36
+ // ===============================================
37
+
38
+
39
+ export class SenderIdentitiesApi {
40
+ protected _basePath = defaultBasePath;
41
+ protected _defaultHeaders : any = { 'User-Agent': USER_AGENT };
42
+ protected _useQuerystring : boolean = true;
43
+
44
+ protected authentications = {
45
+ 'default': <Authentication>new VoidAuth(),
46
+ 'Bearer': new ApiKeyAuth('header', 'Authorization'),
47
+ 'X-API-KEY': new ApiKeyAuth('header', 'X-API-KEY'),
48
+ }
49
+
50
+ protected interceptors: Interceptor[] = [];
51
+
52
+ constructor(basePath?: string) {
53
+ if (basePath) {
54
+ this.basePath = basePath;
55
+ }
56
+ }
57
+
58
+ set useQuerystring(value: boolean) {
59
+ this._useQuerystring = value;
60
+ }
61
+
62
+ set basePath(basePath: string) {
63
+ this._basePath = basePath;
64
+ }
65
+
66
+ set defaultHeaders(defaultHeaders: any) {
67
+ this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT };
68
+ }
69
+
70
+ get defaultHeaders() {
71
+ return this._defaultHeaders;
72
+ }
73
+
74
+ get basePath() {
75
+ return this._basePath;
76
+ }
77
+
78
+ public setDefaultAuthentication(auth: Authentication) {
79
+ this.authentications.default = auth;
80
+ }
81
+
82
+ public setApiKey(apikey: string) {
83
+ this.authentications["X-API-KEY"].apiKey = apikey;
84
+ }
85
+
86
+ public setAccessToken(accessToken: string) {
87
+ this.authentications["Bearer"].apiKey = 'bearer ' + accessToken;
88
+ }
89
+
90
+ public addInterceptor(interceptor: Interceptor) {
91
+ this.interceptors.push(interceptor);
92
+ }
93
+
94
+ /**
95
+ *
96
+ * @summary Creates sender identity.
97
+ * @param createSenderIdentityRequest The create sender identity request.
98
+ * @param options
99
+ */
100
+ public async createSenderIdentities (createSenderIdentityRequest: CreateSenderIdentityRequest, options: optionsI = {headers: {}}) : Promise<SenderIdentityCreated> {
101
+ createSenderIdentityRequest = deserializeIfNeeded(createSenderIdentityRequest, "CreateSenderIdentityRequest");
102
+ const localVarPath = this.basePath + '/v1/senderIdentities/create';
103
+ let localVarQueryParameters: any = {};
104
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
105
+ const produces = ['application/json'];
106
+ // give precedence to 'application/json'
107
+ if (produces.indexOf('application/json') >= 0) {
108
+ localVarHeaderParams['content-type'] = 'application/json';
109
+ } else {
110
+ localVarHeaderParams['content-type'] = produces.join(',');
111
+ }
112
+ let localVarFormParams: any = {};
113
+ let localVarBodyParams: any = undefined;
114
+
115
+ // verify required parameter 'createSenderIdentityRequest' is not null or undefined
116
+ if (createSenderIdentityRequest === null || createSenderIdentityRequest === undefined) {
117
+ throw new Error('Required parameter createSenderIdentityRequest was null or undefined when calling createSenderIdentities.');
118
+ }
119
+
120
+ (<any>Object).assign(localVarHeaderParams, options.headers);
121
+
122
+ let localVarUseFormData = false;
123
+
124
+ const result = generateFormData(createSenderIdentityRequest, CreateSenderIdentityRequest);
125
+ localVarUseFormData = result.localVarUseFormData;
126
+
127
+ let data = {};
128
+ if (localVarUseFormData) {
129
+ const formData = toFormData(result.data);
130
+ data = formData;
131
+ localVarHeaderParams = {
132
+ ...localVarHeaderParams,
133
+ ...formData.getHeaders(),
134
+ };
135
+ } else {
136
+ data = ObjectSerializer.serialize(
137
+ createSenderIdentityRequest,
138
+ "CreateSenderIdentityRequest"
139
+ );
140
+ }
141
+
142
+ let localVarRequestOptions: AxiosRequestConfig = {
143
+ method: 'POST',
144
+ params: localVarQueryParameters,
145
+ headers: localVarHeaderParams,
146
+ url: localVarPath,
147
+ paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
148
+ maxContentLength: Infinity,
149
+ maxBodyLength: Infinity,
150
+ responseType: "json",
151
+ };
152
+
153
+ if (localVarRequestOptions.method !== 'GET') {
154
+ localVarRequestOptions.data = data;
155
+ }
156
+ let authenticationPromise = Promise.resolve();
157
+
158
+ if (this.authentications["X-API-KEY"].apiKey) {
159
+ authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
160
+ }
161
+ if (this.authentications["Bearer"].apiKey) {
162
+ authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
163
+ }
164
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
165
+
166
+ let interceptorPromise = authenticationPromise;
167
+ for (const interceptor of this.interceptors) {
168
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
169
+ }
170
+
171
+ return interceptorPromise.then(() => {
172
+ return new Promise<SenderIdentityCreated>((resolve, reject) => {
173
+ axios.request(localVarRequestOptions)
174
+ .then((response) => {
175
+ handleSuccessfulResponse<SenderIdentityCreated>(
176
+ resolve,
177
+ reject,
178
+ response,
179
+ "SenderIdentityCreated",
180
+ );
181
+ }, (error: AxiosError) => {
182
+ if (error.response == null) {
183
+ reject(error);
184
+ return;
185
+ }
186
+
187
+ if (handleErrorCodeResponse(
188
+ reject,
189
+ error.response,
190
+ 201,
191
+ "SenderIdentityCreated",
192
+ )) {
193
+ return;
194
+ }
195
+ if (handleErrorCodeResponse(
196
+ reject,
197
+ error.response,
198
+ 401,
199
+ "ErrorResult",
200
+ )) {
201
+ return;
202
+ }
203
+ if (handleErrorCodeResponse(
204
+ reject,
205
+ error.response,
206
+ 403,
207
+ "ErrorResult",
208
+ )) {
209
+ return;
210
+ }
211
+ if (handleErrorCodeResponse(
212
+ reject,
213
+ error.response,
214
+ 400,
215
+ "ErrorResult",
216
+ )) {
217
+ return;
218
+ }
219
+
220
+
221
+ reject(error);
222
+ });
223
+ });
224
+ });
225
+ }
226
+ /**
227
+ *
228
+ * @summary Deletes sender identity.
229
+ * @param email The email address.
230
+ * @param options
231
+ */
232
+ public async deleteSenderIdentities (email: string, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
233
+ const localVarPath = this.basePath + '/v1/senderIdentities/delete';
234
+ let localVarQueryParameters: any = {};
235
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
236
+ const produces = ['application/json'];
237
+ // give precedence to 'application/json'
238
+ if (produces.indexOf('application/json') >= 0) {
239
+ localVarHeaderParams['content-type'] = 'application/json';
240
+ } else {
241
+ localVarHeaderParams['content-type'] = produces.join(',');
242
+ }
243
+ let localVarFormParams: any = {};
244
+ let localVarBodyParams: any = undefined;
245
+
246
+ // verify required parameter 'email' is not null or undefined
247
+ if (email === null || email === undefined) {
248
+ throw new Error('Required parameter email was null or undefined when calling deleteSenderIdentities.');
249
+ }
250
+
251
+ if (email !== undefined) {
252
+ localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
253
+ }
254
+
255
+ (<any>Object).assign(localVarHeaderParams, options.headers);
256
+
257
+ let localVarUseFormData = false;
258
+
259
+ let data = {};
260
+ if (localVarUseFormData) {
261
+ const formData = toFormData(localVarFormParams);
262
+ data = formData;
263
+ localVarHeaderParams = {
264
+ ...localVarHeaderParams,
265
+ ...formData.getHeaders(),
266
+ };
267
+ }
268
+
269
+ let localVarRequestOptions: AxiosRequestConfig = {
270
+ method: 'DELETE',
271
+ params: localVarQueryParameters,
272
+ headers: localVarHeaderParams,
273
+ url: localVarPath,
274
+ paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
275
+ maxContentLength: Infinity,
276
+ maxBodyLength: Infinity,
277
+ responseType: "json",
278
+ };
279
+
280
+ if (localVarRequestOptions.method !== 'GET') {
281
+ localVarRequestOptions.data = data;
282
+ }
283
+ let authenticationPromise = Promise.resolve();
284
+
285
+ if (this.authentications["X-API-KEY"].apiKey) {
286
+ authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
287
+ }
288
+ if (this.authentications["Bearer"].apiKey) {
289
+ authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
290
+ }
291
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
292
+
293
+ let interceptorPromise = authenticationPromise;
294
+ for (const interceptor of this.interceptors) {
295
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
296
+ }
297
+
298
+ return interceptorPromise.then(() => {
299
+ return new Promise<returnTypeI>((resolve, reject) => {
300
+ axios.request(localVarRequestOptions)
301
+ .then((response) => {
302
+ handleSuccessfulResponse(
303
+ resolve,
304
+ reject,
305
+ response,
306
+
307
+ );
308
+ }, (error: AxiosError) => {
309
+ if (error.response == null) {
310
+ reject(error);
311
+ return;
312
+ }
313
+
314
+ if (handleErrorCodeResponse(
315
+ reject,
316
+ error.response,
317
+ 401,
318
+ "ErrorResult",
319
+ )) {
320
+ return;
321
+ }
322
+ if (handleErrorCodeResponse(
323
+ reject,
324
+ error.response,
325
+ 403,
326
+ "ErrorResult",
327
+ )) {
328
+ return;
329
+ }
330
+
331
+
332
+ reject(error);
333
+ });
334
+ });
335
+ });
336
+ }
337
+ /**
338
+ *
339
+ * @summary Gets sender identity by ID or email.
340
+ * @param id The sender identity id.
341
+ * @param email The sender identity email.
342
+ * @param options
343
+ */
344
+ public async getSenderIdentityProperties (id?: string, email?: string, options: optionsI = {headers: {}}) : Promise<SenderIdentityViewModel> {
345
+ const localVarPath = this.basePath + '/v1/senderIdentities/properties';
346
+ let localVarQueryParameters: any = {};
347
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
348
+ const produces = ['application/json'];
349
+ // give precedence to 'application/json'
350
+ if (produces.indexOf('application/json') >= 0) {
351
+ localVarHeaderParams['content-type'] = 'application/json';
352
+ } else {
353
+ localVarHeaderParams['content-type'] = produces.join(',');
354
+ }
355
+ let localVarFormParams: any = {};
356
+ let localVarBodyParams: any = undefined;
357
+
358
+ if (id !== undefined) {
359
+ localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
360
+ }
361
+
362
+ if (email !== undefined) {
363
+ localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
364
+ }
365
+
366
+ (<any>Object).assign(localVarHeaderParams, options.headers);
367
+
368
+ let localVarUseFormData = false;
369
+
370
+ let data = {};
371
+ if (localVarUseFormData) {
372
+ const formData = toFormData(localVarFormParams);
373
+ data = formData;
374
+ localVarHeaderParams = {
375
+ ...localVarHeaderParams,
376
+ ...formData.getHeaders(),
377
+ };
378
+ }
379
+
380
+ let localVarRequestOptions: AxiosRequestConfig = {
381
+ method: 'GET',
382
+ params: localVarQueryParameters,
383
+ headers: localVarHeaderParams,
384
+ url: localVarPath,
385
+ paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
386
+ maxContentLength: Infinity,
387
+ maxBodyLength: Infinity,
388
+ responseType: "json",
389
+ };
390
+
391
+ if (localVarRequestOptions.method !== 'GET') {
392
+ localVarRequestOptions.data = data;
393
+ }
394
+ let authenticationPromise = Promise.resolve();
395
+
396
+ if (this.authentications["X-API-KEY"].apiKey) {
397
+ authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
398
+ }
399
+ if (this.authentications["Bearer"].apiKey) {
400
+ authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
401
+ }
402
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
403
+
404
+ let interceptorPromise = authenticationPromise;
405
+ for (const interceptor of this.interceptors) {
406
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
407
+ }
408
+
409
+ return interceptorPromise.then(() => {
410
+ return new Promise<SenderIdentityViewModel>((resolve, reject) => {
411
+ axios.request(localVarRequestOptions)
412
+ .then((response) => {
413
+ handleSuccessfulResponse<SenderIdentityViewModel>(
414
+ resolve,
415
+ reject,
416
+ response,
417
+ "SenderIdentityViewModel",
418
+ );
419
+ }, (error: AxiosError) => {
420
+ if (error.response == null) {
421
+ reject(error);
422
+ return;
423
+ }
424
+
425
+ if (handleErrorCodeResponse(
426
+ reject,
427
+ error.response,
428
+ 200,
429
+ "SenderIdentityViewModel",
430
+ )) {
431
+ return;
432
+ }
433
+ if (handleErrorCodeResponse(
434
+ reject,
435
+ error.response,
436
+ 401,
437
+ "ErrorResult",
438
+ )) {
439
+ return;
440
+ }
441
+ if (handleErrorCodeResponse(
442
+ reject,
443
+ error.response,
444
+ 403,
445
+ "ErrorResult",
446
+ )) {
447
+ return;
448
+ }
449
+
450
+
451
+ reject(error);
452
+ });
453
+ });
454
+ });
455
+ }
456
+ /**
457
+ *
458
+ * @summary Lists sender identity.
459
+ * @param page Page index specified in get sender identity request.
460
+ * @param pageSize Page size specified in get sender identity list request.
461
+ * @param search Users can be listed by the search key present in the sender identity like sender identity name and email address
462
+ * @param brandIds A list of brand IDs to filter associated with the sender identity.
463
+ * @param options
464
+ */
465
+ public async listSenderIdentities (page: number, pageSize?: number, search?: string, brandIds?: Array<string>, options: optionsI = {headers: {}}) : Promise<SenderIdentityList> {
466
+ const localVarPath = this.basePath + '/v1/senderIdentities/list';
467
+ let localVarQueryParameters: any = {};
468
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
469
+ const produces = ['application/json'];
470
+ // give precedence to 'application/json'
471
+ if (produces.indexOf('application/json') >= 0) {
472
+ localVarHeaderParams['content-type'] = 'application/json';
473
+ } else {
474
+ localVarHeaderParams['content-type'] = produces.join(',');
475
+ }
476
+ let localVarFormParams: any = {};
477
+ let localVarBodyParams: any = undefined;
478
+
479
+ // verify required parameter 'page' is not null or undefined
480
+ if (page === null || page === undefined) {
481
+ throw new Error('Required parameter page was null or undefined when calling listSenderIdentities.');
482
+ }
483
+
484
+ if (pageSize !== undefined) {
485
+ localVarQueryParameters['PageSize'] = ObjectSerializer.serialize(pageSize, "number");
486
+ }
487
+
488
+ if (page !== undefined) {
489
+ localVarQueryParameters['Page'] = ObjectSerializer.serialize(page, "number");
490
+ }
491
+
492
+ if (search !== undefined) {
493
+ localVarQueryParameters['Search'] = ObjectSerializer.serialize(search, "string");
494
+ }
495
+
496
+ if (brandIds !== undefined) {
497
+ localVarQueryParameters['BrandIds'] = ObjectSerializer.serialize(brandIds, "Array<string>");
498
+ }
499
+
500
+ (<any>Object).assign(localVarHeaderParams, options.headers);
501
+
502
+ let localVarUseFormData = false;
503
+
504
+ let data = {};
505
+ if (localVarUseFormData) {
506
+ const formData = toFormData(localVarFormParams);
507
+ data = formData;
508
+ localVarHeaderParams = {
509
+ ...localVarHeaderParams,
510
+ ...formData.getHeaders(),
511
+ };
512
+ }
513
+
514
+ let localVarRequestOptions: AxiosRequestConfig = {
515
+ method: 'GET',
516
+ params: localVarQueryParameters,
517
+ headers: localVarHeaderParams,
518
+ url: localVarPath,
519
+ paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
520
+ maxContentLength: Infinity,
521
+ maxBodyLength: Infinity,
522
+ responseType: "json",
523
+ };
524
+
525
+ if (localVarRequestOptions.method !== 'GET') {
526
+ localVarRequestOptions.data = data;
527
+ }
528
+ let authenticationPromise = Promise.resolve();
529
+
530
+ if (this.authentications["X-API-KEY"].apiKey) {
531
+ authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
532
+ }
533
+ if (this.authentications["Bearer"].apiKey) {
534
+ authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
535
+ }
536
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
537
+
538
+ let interceptorPromise = authenticationPromise;
539
+ for (const interceptor of this.interceptors) {
540
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
541
+ }
542
+
543
+ return interceptorPromise.then(() => {
544
+ return new Promise<SenderIdentityList>((resolve, reject) => {
545
+ axios.request(localVarRequestOptions)
546
+ .then((response) => {
547
+ handleSuccessfulResponse<SenderIdentityList>(
548
+ resolve,
549
+ reject,
550
+ response,
551
+ "SenderIdentityList",
552
+ );
553
+ }, (error: AxiosError) => {
554
+ if (error.response == null) {
555
+ reject(error);
556
+ return;
557
+ }
558
+
559
+ if (handleErrorCodeResponse(
560
+ reject,
561
+ error.response,
562
+ 200,
563
+ "SenderIdentityList",
564
+ )) {
565
+ return;
566
+ }
567
+ if (handleErrorCodeResponse(
568
+ reject,
569
+ error.response,
570
+ 401,
571
+ "ErrorResult",
572
+ )) {
573
+ return;
574
+ }
575
+ if (handleErrorCodeResponse(
576
+ reject,
577
+ error.response,
578
+ 403,
579
+ "ErrorResult",
580
+ )) {
581
+ return;
582
+ }
583
+
584
+
585
+ reject(error);
586
+ });
587
+ });
588
+ });
589
+ }
590
+ /**
591
+ *
592
+ * @summary Rerequests denied sender identity.
593
+ * @param email The email address.
594
+ * @param options
595
+ */
596
+ public async reRequestSenderIdentities (email: string, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
597
+ const localVarPath = this.basePath + '/v1/senderIdentities/rerequest';
598
+ let localVarQueryParameters: any = {};
599
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
600
+ const produces = ['application/json'];
601
+ // give precedence to 'application/json'
602
+ if (produces.indexOf('application/json') >= 0) {
603
+ localVarHeaderParams['content-type'] = 'application/json';
604
+ } else {
605
+ localVarHeaderParams['content-type'] = produces.join(',');
606
+ }
607
+ let localVarFormParams: any = {};
608
+ let localVarBodyParams: any = undefined;
609
+
610
+ // verify required parameter 'email' is not null or undefined
611
+ if (email === null || email === undefined) {
612
+ throw new Error('Required parameter email was null or undefined when calling reRequestSenderIdentities.');
613
+ }
614
+
615
+ if (email !== undefined) {
616
+ localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
617
+ }
618
+
619
+ (<any>Object).assign(localVarHeaderParams, options.headers);
620
+
621
+ let localVarUseFormData = false;
622
+
623
+ let data = {};
624
+ if (localVarUseFormData) {
625
+ const formData = toFormData(localVarFormParams);
626
+ data = formData;
627
+ localVarHeaderParams = {
628
+ ...localVarHeaderParams,
629
+ ...formData.getHeaders(),
630
+ };
631
+ }
632
+
633
+ let localVarRequestOptions: AxiosRequestConfig = {
634
+ method: 'POST',
635
+ params: localVarQueryParameters,
636
+ headers: localVarHeaderParams,
637
+ url: localVarPath,
638
+ paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
639
+ maxContentLength: Infinity,
640
+ maxBodyLength: Infinity,
641
+ responseType: "json",
642
+ };
643
+
644
+ if (localVarRequestOptions.method !== 'GET') {
645
+ localVarRequestOptions.data = data;
646
+ }
647
+ let authenticationPromise = Promise.resolve();
648
+
649
+ if (this.authentications["X-API-KEY"].apiKey) {
650
+ authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
651
+ }
652
+ if (this.authentications["Bearer"].apiKey) {
653
+ authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
654
+ }
655
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
656
+
657
+ let interceptorPromise = authenticationPromise;
658
+ for (const interceptor of this.interceptors) {
659
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
660
+ }
661
+
662
+ return interceptorPromise.then(() => {
663
+ return new Promise<returnTypeI>((resolve, reject) => {
664
+ axios.request(localVarRequestOptions)
665
+ .then((response) => {
666
+ handleSuccessfulResponse(
667
+ resolve,
668
+ reject,
669
+ response,
670
+
671
+ );
672
+ }, (error: AxiosError) => {
673
+ if (error.response == null) {
674
+ reject(error);
675
+ return;
676
+ }
677
+
678
+ if (handleErrorCodeResponse(
679
+ reject,
680
+ error.response,
681
+ 401,
682
+ "ErrorResult",
683
+ )) {
684
+ return;
685
+ }
686
+ if (handleErrorCodeResponse(
687
+ reject,
688
+ error.response,
689
+ 403,
690
+ "ErrorResult",
691
+ )) {
692
+ return;
693
+ }
694
+
695
+
696
+ reject(error);
697
+ });
698
+ });
699
+ });
700
+ }
701
+ /**
702
+ *
703
+ * @summary Resends sender identity invitation.
704
+ * @param email The email address.
705
+ * @param options
706
+ */
707
+ public async resendInvitationSenderIdentities (email: string, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
708
+ const localVarPath = this.basePath + '/v1/senderIdentities/resendInvitation';
709
+ let localVarQueryParameters: any = {};
710
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
711
+ const produces = ['application/json'];
712
+ // give precedence to 'application/json'
713
+ if (produces.indexOf('application/json') >= 0) {
714
+ localVarHeaderParams['content-type'] = 'application/json';
715
+ } else {
716
+ localVarHeaderParams['content-type'] = produces.join(',');
717
+ }
718
+ let localVarFormParams: any = {};
719
+ let localVarBodyParams: any = undefined;
720
+
721
+ // verify required parameter 'email' is not null or undefined
722
+ if (email === null || email === undefined) {
723
+ throw new Error('Required parameter email was null or undefined when calling resendInvitationSenderIdentities.');
724
+ }
725
+
726
+ if (email !== undefined) {
727
+ localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
728
+ }
729
+
730
+ (<any>Object).assign(localVarHeaderParams, options.headers);
731
+
732
+ let localVarUseFormData = false;
733
+
734
+ let data = {};
735
+ if (localVarUseFormData) {
736
+ const formData = toFormData(localVarFormParams);
737
+ data = formData;
738
+ localVarHeaderParams = {
739
+ ...localVarHeaderParams,
740
+ ...formData.getHeaders(),
741
+ };
742
+ }
743
+
744
+ let localVarRequestOptions: AxiosRequestConfig = {
745
+ method: 'POST',
746
+ params: localVarQueryParameters,
747
+ headers: localVarHeaderParams,
748
+ url: localVarPath,
749
+ paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
750
+ maxContentLength: Infinity,
751
+ maxBodyLength: Infinity,
752
+ responseType: "json",
753
+ };
754
+
755
+ if (localVarRequestOptions.method !== 'GET') {
756
+ localVarRequestOptions.data = data;
757
+ }
758
+ let authenticationPromise = Promise.resolve();
759
+
760
+ if (this.authentications["X-API-KEY"].apiKey) {
761
+ authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
762
+ }
763
+ if (this.authentications["Bearer"].apiKey) {
764
+ authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
765
+ }
766
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
767
+
768
+ let interceptorPromise = authenticationPromise;
769
+ for (const interceptor of this.interceptors) {
770
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
771
+ }
772
+
773
+ return interceptorPromise.then(() => {
774
+ return new Promise<returnTypeI>((resolve, reject) => {
775
+ axios.request(localVarRequestOptions)
776
+ .then((response) => {
777
+ handleSuccessfulResponse(
778
+ resolve,
779
+ reject,
780
+ response,
781
+
782
+ );
783
+ }, (error: AxiosError) => {
784
+ if (error.response == null) {
785
+ reject(error);
786
+ return;
787
+ }
788
+
789
+ if (handleErrorCodeResponse(
790
+ reject,
791
+ error.response,
792
+ 401,
793
+ "ErrorResult",
794
+ )) {
795
+ return;
796
+ }
797
+ if (handleErrorCodeResponse(
798
+ reject,
799
+ error.response,
800
+ 403,
801
+ "ErrorResult",
802
+ )) {
803
+ return;
804
+ }
805
+
806
+
807
+ reject(error);
808
+ });
809
+ });
810
+ });
811
+ }
812
+ /**
813
+ *
814
+ * @summary Updates sender identity.
815
+ * @param email The email address.
816
+ * @param editSenderIdentityRequest The create sender identity request.
817
+ * @param options
818
+ */
819
+ public async updateSenderIdentities (email: string, editSenderIdentityRequest: EditSenderIdentityRequest, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
820
+ editSenderIdentityRequest = deserializeIfNeeded(editSenderIdentityRequest, "EditSenderIdentityRequest");
821
+ const localVarPath = this.basePath + '/v1/senderIdentities/update';
822
+ let localVarQueryParameters: any = {};
823
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
824
+ const produces = ['application/json'];
825
+ // give precedence to 'application/json'
826
+ if (produces.indexOf('application/json') >= 0) {
827
+ localVarHeaderParams['content-type'] = 'application/json';
828
+ } else {
829
+ localVarHeaderParams['content-type'] = produces.join(',');
830
+ }
831
+ let localVarFormParams: any = {};
832
+ let localVarBodyParams: any = undefined;
833
+
834
+ // verify required parameter 'email' is not null or undefined
835
+ if (email === null || email === undefined) {
836
+ throw new Error('Required parameter email was null or undefined when calling updateSenderIdentities.');
837
+ }
838
+
839
+ // verify required parameter 'editSenderIdentityRequest' is not null or undefined
840
+ if (editSenderIdentityRequest === null || editSenderIdentityRequest === undefined) {
841
+ throw new Error('Required parameter editSenderIdentityRequest was null or undefined when calling updateSenderIdentities.');
842
+ }
843
+
844
+ if (email !== undefined) {
845
+ localVarQueryParameters['email'] = ObjectSerializer.serialize(email, "string");
846
+ }
847
+
848
+ (<any>Object).assign(localVarHeaderParams, options.headers);
849
+
850
+ let localVarUseFormData = false;
851
+
852
+ const result = generateFormData(editSenderIdentityRequest, EditSenderIdentityRequest);
853
+ localVarUseFormData = result.localVarUseFormData;
854
+
855
+ let data = {};
856
+ if (localVarUseFormData) {
857
+ const formData = toFormData(result.data);
858
+ data = formData;
859
+ localVarHeaderParams = {
860
+ ...localVarHeaderParams,
861
+ ...formData.getHeaders(),
862
+ };
863
+ } else {
864
+ data = ObjectSerializer.serialize(
865
+ editSenderIdentityRequest,
866
+ "EditSenderIdentityRequest"
867
+ );
868
+ }
869
+
870
+ let localVarRequestOptions: AxiosRequestConfig = {
871
+ method: 'POST',
872
+ params: localVarQueryParameters,
873
+ headers: localVarHeaderParams,
874
+ url: localVarPath,
875
+ paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
876
+ maxContentLength: Infinity,
877
+ maxBodyLength: Infinity,
878
+ responseType: "json",
879
+ };
880
+
881
+ if (localVarRequestOptions.method !== 'GET') {
882
+ localVarRequestOptions.data = data;
883
+ }
884
+ let authenticationPromise = Promise.resolve();
885
+
886
+ if (this.authentications["X-API-KEY"].apiKey) {
887
+ authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
888
+ }
889
+ if (this.authentications["Bearer"].apiKey) {
890
+ authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
891
+ }
892
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
893
+
894
+ let interceptorPromise = authenticationPromise;
895
+ for (const interceptor of this.interceptors) {
896
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
897
+ }
898
+
899
+ return interceptorPromise.then(() => {
900
+ return new Promise<returnTypeI>((resolve, reject) => {
901
+ axios.request(localVarRequestOptions)
902
+ .then((response) => {
903
+ handleSuccessfulResponse(
904
+ resolve,
905
+ reject,
906
+ response,
907
+
908
+ );
909
+ }, (error: AxiosError) => {
910
+ if (error.response == null) {
911
+ reject(error);
912
+ return;
913
+ }
914
+
915
+ if (handleErrorCodeResponse(
916
+ reject,
917
+ error.response,
918
+ 401,
919
+ "ErrorResult",
920
+ )) {
921
+ return;
922
+ }
923
+ if (handleErrorCodeResponse(
924
+ reject,
925
+ error.response,
926
+ 403,
927
+ "ErrorResult",
928
+ )) {
929
+ return;
930
+ }
931
+
932
+
933
+ reject(error);
934
+ });
935
+ });
936
+ });
937
+ }
938
+ }
939
+
940
+ function deserializeIfNeeded<T> (obj: T, classname: string): T {
941
+ if (obj !== null && obj !== undefined && obj.constructor.name !== classname) {
942
+ return ObjectSerializer.deserialize(obj, classname);
943
+ }
944
+
945
+ return obj;
946
+ }
947
+
948
+ type AxiosResolve<T> = (
949
+ value: (T | PromiseLike<T>),
950
+ ) => void
951
+
952
+ type AxiosReject = (reason?: any) => void;
953
+
954
+ function handleSuccessfulResponse<T>(
955
+ resolve: AxiosResolve<T>,
956
+ reject: AxiosReject,
957
+ response: AxiosResponse,
958
+ returnType?: string,
959
+ ) {
960
+ let body = response.data;
961
+
962
+ if (
963
+ response.status &&
964
+ response.status >= 200 &&
965
+ response.status <= 299
966
+ ) {
967
+ if (returnType) {
968
+ body = ObjectSerializer.deserialize(body, returnType);
969
+ }
970
+
971
+ resolve(body);
972
+ } else {
973
+ reject(new HttpError(response, body, response.status));
974
+ }
975
+ }
976
+
977
+ function handleErrorCodeResponse(
978
+ reject: AxiosReject,
979
+ response: AxiosResponse,
980
+ code: number,
981
+ returnType: string
982
+ ): boolean {
983
+ if (response.status !== code) {
984
+ return false;
985
+ }
986
+
987
+ let body = response.data;
988
+ if(code === 401) {
989
+ body = "Unauthorized request (401): Invalid authentication.";
990
+ }
991
+ reject(new HttpError(response, body, response.status));
992
+
993
+ return true;
994
+ }
995
+
996
+ function handleErrorRangeResponse(
997
+ reject: AxiosReject,
998
+ response: AxiosResponse,
999
+ code: string,
1000
+ returnType: string
1001
+ ): boolean {
1002
+ let rangeCodeLeft = Number(code[0] + "00");
1003
+ let rangeCodeRight = Number(code[0] + "99");
1004
+
1005
+ if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) {
1006
+ const body = ObjectSerializer.deserialize(
1007
+ response.data,
1008
+ returnType,
1009
+ );
1010
+
1011
+ reject(new HttpError(response, body, response.status));
1012
+
1013
+ return true;
1014
+ }
1015
+
1016
+ return false;
1017
+ }