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