boldsign 1.0.3 → 2.0.0

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