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