boldsign 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +137 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/LICENSE +21 -0
- package/README.md +61 -0
- package/api/apis.ts +162 -0
- package/api/brandingApi.ts +1142 -0
- package/api/contactsApi.ts +764 -0
- package/api/customFieldApi.ts +785 -0
- package/api/documentApi.ts +2887 -0
- package/api/index.ts +34 -0
- package/api/planApi.ts +270 -0
- package/api/senderIdentitiesApi.ts +873 -0
- package/api/teamsApi.ts +654 -0
- package/api/templateApi.ts +1686 -0
- package/api/userApi.ts +848 -0
- package/api.ts +3 -0
- package/dist/api/apis.d.ts +29 -0
- package/dist/api/apis.js +112 -0
- package/dist/api/apis.js.map +1 -0
- package/dist/api/brandingApi.d.ts +28 -0
- package/dist/api/brandingApi.js +728 -0
- package/dist/api/brandingApi.js.map +1 -0
- package/dist/api/contactsApi.d.ts +27 -0
- package/dist/api/contactsApi.js +495 -0
- package/dist/api/contactsApi.js.map +1 -0
- package/dist/api/customFieldApi.d.ts +27 -0
- package/dist/api/customFieldApi.js +504 -0
- package/dist/api/customFieldApi.js.map +1 -0
- package/dist/api/documentApi.d.ts +43 -0
- package/dist/api/documentApi.js +1902 -0
- package/dist/api/documentApi.js.map +1 -0
- package/dist/api/index.d.ts +12 -0
- package/dist/api/index.js +29 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/planApi.d.ts +23 -0
- package/dist/api/planApi.js +168 -0
- package/dist/api/planApi.js.map +1 -0
- package/dist/api/senderIdentitiesApi.d.ts +28 -0
- package/dist/api/senderIdentitiesApi.js +573 -0
- package/dist/api/senderIdentitiesApi.js.map +1 -0
- package/dist/api/teamsApi.d.ts +26 -0
- package/dist/api/teamsApi.js +420 -0
- package/dist/api/teamsApi.js.map +1 -0
- package/dist/api/templateApi.d.ts +35 -0
- package/dist/api/templateApi.js +1120 -0
- package/dist/api/templateApi.js.map +1 -0
- package/dist/api/userApi.d.ts +28 -0
- package/dist/api/userApi.js +558 -0
- package/dist/api/userApi.js.map +1 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +19 -0
- package/dist/api.js.map +1 -0
- package/dist/examples/DocumentProperties.d.ts +1 -0
- package/dist/examples/DocumentProperties.js +28 -0
- package/dist/examples/DocumentProperties.js.map +1 -0
- package/dist/examples/brandCreate.d.ts +1 -0
- package/dist/examples/brandCreate.js +68 -0
- package/dist/examples/brandCreate.js.map +1 -0
- package/dist/examples/brandDelete.d.ts +1 -0
- package/dist/examples/brandDelete.js +28 -0
- package/dist/examples/brandDelete.js.map +1 -0
- package/dist/examples/brandGet.d.ts +1 -0
- package/dist/examples/brandGet.js +28 -0
- package/dist/examples/brandGet.js.map +1 -0
- package/dist/examples/brandList.d.ts +1 -0
- package/dist/examples/brandList.js +27 -0
- package/dist/examples/brandList.js.map +1 -0
- package/dist/examples/brandResetDefault.d.ts +1 -0
- package/dist/examples/brandResetDefault.js +28 -0
- package/dist/examples/brandResetDefault.js.map +1 -0
- package/dist/examples/brandUpdate.d.ts +1 -0
- package/dist/examples/brandUpdate.js +68 -0
- package/dist/examples/brandUpdate.js.map +1 -0
- package/dist/examples/contactCreate.d.ts +1 -0
- package/dist/examples/contactCreate.js +38 -0
- package/dist/examples/contactCreate.js.map +1 -0
- package/dist/examples/contactDelete.d.ts +1 -0
- package/dist/examples/contactDelete.js +28 -0
- package/dist/examples/contactDelete.js.map +1 -0
- package/dist/examples/contactGet.d.ts +1 -0
- package/dist/examples/contactGet.js +28 -0
- package/dist/examples/contactGet.js.map +1 -0
- package/dist/examples/contactList.d.ts +1 -0
- package/dist/examples/contactList.js +29 -0
- package/dist/examples/contactList.js.map +1 -0
- package/dist/examples/contactUpdate.d.ts +1 -0
- package/dist/examples/contactUpdate.js +38 -0
- package/dist/examples/contactUpdate.js.map +1 -0
- package/dist/examples/customFieldCreate.d.ts +1 -0
- package/dist/examples/customFieldCreate.js +39 -0
- package/dist/examples/customFieldCreate.js.map +1 -0
- package/dist/examples/customFieldDelete.d.ts +1 -0
- package/dist/examples/customFieldDelete.js +28 -0
- package/dist/examples/customFieldDelete.js.map +1 -0
- package/dist/examples/customFieldEdit.d.ts +1 -0
- package/dist/examples/customFieldEdit.js +40 -0
- package/dist/examples/customFieldEdit.js.map +1 -0
- package/dist/examples/customFieldEmbeddedCreateUrl.d.ts +1 -0
- package/dist/examples/customFieldEmbeddedCreateUrl.js +31 -0
- package/dist/examples/customFieldEmbeddedCreateUrl.js.map +1 -0
- package/dist/examples/customFieldList.d.ts +1 -0
- package/dist/examples/customFieldList.js +28 -0
- package/dist/examples/customFieldList.js.map +1 -0
- package/dist/examples/documentAddAuthentication.d.ts +1 -0
- package/dist/examples/documentAddAuthentication.js +32 -0
- package/dist/examples/documentAddAuthentication.js.map +1 -0
- package/dist/examples/documentAddTags.d.ts +1 -0
- package/dist/examples/documentAddTags.js +31 -0
- package/dist/examples/documentAddTags.js.map +1 -0
- package/dist/examples/documentChangeAccessCode.d.ts +1 -0
- package/dist/examples/documentChangeAccessCode.js +32 -0
- package/dist/examples/documentChangeAccessCode.js.map +1 -0
- package/dist/examples/documentChangeRecipients.d.ts +1 -0
- package/dist/examples/documentChangeRecipients.js +34 -0
- package/dist/examples/documentChangeRecipients.js.map +1 -0
- package/dist/examples/documentDelete.d.ts +1 -0
- package/dist/examples/documentDelete.js +29 -0
- package/dist/examples/documentDelete.js.map +1 -0
- package/dist/examples/documentDeleteTags.d.ts +1 -0
- package/dist/examples/documentDeleteTags.js +31 -0
- package/dist/examples/documentDeleteTags.js.map +1 -0
- package/dist/examples/documentDownload.d.ts +1 -0
- package/dist/examples/documentDownload.js +29 -0
- package/dist/examples/documentDownload.js.map +1 -0
- package/dist/examples/documentDownloadAttachment.d.ts +1 -0
- package/dist/examples/documentDownloadAttachment.js +30 -0
- package/dist/examples/documentDownloadAttachment.js.map +1 -0
- package/dist/examples/documentDownloadAuditTrial.d.ts +1 -0
- package/dist/examples/documentDownloadAuditTrial.js +29 -0
- package/dist/examples/documentDownloadAuditTrial.js.map +1 -0
- package/dist/examples/documentEmbeddedRequestLink.d.ts +1 -0
- package/dist/examples/documentEmbeddedRequestLink.js +96 -0
- package/dist/examples/documentEmbeddedRequestLink.js.map +1 -0
- package/dist/examples/documentEmbeddedSignLink.d.ts +1 -0
- package/dist/examples/documentEmbeddedSignLink.js +35 -0
- package/dist/examples/documentEmbeddedSignLink.js.map +1 -0
- package/dist/examples/documentExtendExpiry.d.ts +1 -0
- package/dist/examples/documentExtendExpiry.js +32 -0
- package/dist/examples/documentExtendExpiry.js.map +1 -0
- package/dist/examples/documentList.d.ts +1 -0
- package/dist/examples/documentList.js +28 -0
- package/dist/examples/documentList.js.map +1 -0
- package/dist/examples/documentListBehalf.d.ts +1 -0
- package/dist/examples/documentListBehalf.js +28 -0
- package/dist/examples/documentListBehalf.js.map +1 -0
- package/dist/examples/documentListTeam.d.ts +1 -0
- package/dist/examples/documentListTeam.js +28 -0
- package/dist/examples/documentListTeam.js.map +1 -0
- package/dist/examples/documentPrefillFieldCheckBox.d.ts +1 -0
- package/dist/examples/documentPrefillFieldCheckBox.js +34 -0
- package/dist/examples/documentPrefillFieldCheckBox.js.map +1 -0
- package/dist/examples/documentPrefillFieldDropDown.d.ts +1 -0
- package/dist/examples/documentPrefillFieldDropDown.js +34 -0
- package/dist/examples/documentPrefillFieldDropDown.js.map +1 -0
- package/dist/examples/documentPrefillFieldEditableDate.d.ts +1 -0
- package/dist/examples/documentPrefillFieldEditableDate.js +34 -0
- package/dist/examples/documentPrefillFieldEditableDate.js.map +1 -0
- package/dist/examples/documentPrefillFieldImage.d.ts +1 -0
- package/dist/examples/documentPrefillFieldImage.js +34 -0
- package/dist/examples/documentPrefillFieldImage.js.map +1 -0
- package/dist/examples/documentPrefillFieldRadioButton.d.ts +1 -0
- package/dist/examples/documentPrefillFieldRadioButton.js +34 -0
- package/dist/examples/documentPrefillFieldRadioButton.js.map +1 -0
- package/dist/examples/documentPrefillFieldTextBox.d.ts +1 -0
- package/dist/examples/documentPrefillFieldTextBox.js +34 -0
- package/dist/examples/documentPrefillFieldTextBox.js.map +1 -0
- package/dist/examples/documentRemoveAuthentication.d.ts +1 -0
- package/dist/examples/documentRemoveAuthentication.js +31 -0
- package/dist/examples/documentRemoveAuthentication.js.map +1 -0
- package/dist/examples/documentRevoke.d.ts +1 -0
- package/dist/examples/documentRevoke.js +31 -0
- package/dist/examples/documentRevoke.js.map +1 -0
- package/dist/examples/documentSend.d.ts +1 -0
- package/dist/examples/documentSend.js +86 -0
- package/dist/examples/documentSend.js.map +1 -0
- package/dist/examples/documentSendOnBehalf.d.ts +1 -0
- package/dist/examples/documentSendOnBehalf.js +101 -0
- package/dist/examples/documentSendOnBehalf.js.map +1 -0
- package/dist/examples/documentSendReminder.d.ts +1 -0
- package/dist/examples/documentSendReminder.js +32 -0
- package/dist/examples/documentSendReminder.js.map +1 -0
- package/dist/examples/listTemplate.d.ts +1 -0
- package/dist/examples/listTemplate.js +29 -0
- package/dist/examples/listTemplate.js.map +1 -0
- package/dist/examples/plan.d.ts +1 -0
- package/dist/examples/plan.js +27 -0
- package/dist/examples/plan.js.map +1 -0
- package/dist/examples/senderIdentityCreate.d.ts +1 -0
- package/dist/examples/senderIdentityCreate.js +33 -0
- package/dist/examples/senderIdentityCreate.js.map +1 -0
- package/dist/examples/senderIdentityDelete.d.ts +1 -0
- package/dist/examples/senderIdentityDelete.js +28 -0
- package/dist/examples/senderIdentityDelete.js.map +1 -0
- package/dist/examples/senderIdentityList.d.ts +1 -0
- package/dist/examples/senderIdentityList.js +29 -0
- package/dist/examples/senderIdentityList.js.map +1 -0
- package/dist/examples/senderIdentityRerequest.d.ts +1 -0
- package/dist/examples/senderIdentityRerequest.js +28 -0
- package/dist/examples/senderIdentityRerequest.js.map +1 -0
- package/dist/examples/senderIdentityResendInvitation.d.ts +1 -0
- package/dist/examples/senderIdentityResendInvitation.js +28 -0
- package/dist/examples/senderIdentityResendInvitation.js.map +1 -0
- package/dist/examples/senderIdentityUpdate.d.ts +1 -0
- package/dist/examples/senderIdentityUpdate.js +32 -0
- package/dist/examples/senderIdentityUpdate.js.map +1 -0
- package/dist/examples/teamCreate.d.ts +1 -0
- package/dist/examples/teamCreate.js +30 -0
- package/dist/examples/teamCreate.js.map +1 -0
- package/dist/examples/teamGet.d.ts +1 -0
- package/dist/examples/teamGet.js +28 -0
- package/dist/examples/teamGet.js.map +1 -0
- package/dist/examples/teamList.d.ts +1 -0
- package/dist/examples/teamList.js +29 -0
- package/dist/examples/teamList.js.map +1 -0
- package/dist/examples/teamUpdate.d.ts +1 -0
- package/dist/examples/teamUpdate.js +31 -0
- package/dist/examples/teamUpdate.js.map +1 -0
- package/dist/examples/templateAddTag.d.ts +1 -0
- package/dist/examples/templateAddTag.js +32 -0
- package/dist/examples/templateAddTag.js.map +1 -0
- package/dist/examples/templateCreate.d.ts +1 -0
- package/dist/examples/templateCreate.js +76 -0
- package/dist/examples/templateCreate.js.map +1 -0
- package/dist/examples/templateDelete.d.ts +1 -0
- package/dist/examples/templateDelete.js +28 -0
- package/dist/examples/templateDelete.js.map +1 -0
- package/dist/examples/templateDeleteTag.d.ts +1 -0
- package/dist/examples/templateDeleteTag.js +32 -0
- package/dist/examples/templateDeleteTag.js.map +1 -0
- package/dist/examples/templateDetails.d.ts +1 -0
- package/dist/examples/templateDetails.js +28 -0
- package/dist/examples/templateDetails.js.map +1 -0
- package/dist/examples/templateDownload.d.ts +1 -0
- package/dist/examples/templateDownload.js +28 -0
- package/dist/examples/templateDownload.js.map +1 -0
- package/dist/examples/templateEdit.d.ts +1 -0
- package/dist/examples/templateEdit.js +34 -0
- package/dist/examples/templateEdit.js.map +1 -0
- package/dist/examples/templateEmbeddedCreate.d.ts +1 -0
- package/dist/examples/templateEmbeddedCreate.js +76 -0
- package/dist/examples/templateEmbeddedCreate.js.map +1 -0
- package/dist/examples/templateEmbeddedEdit.d.ts +1 -0
- package/dist/examples/templateEmbeddedEdit.js +36 -0
- package/dist/examples/templateEmbeddedEdit.js.map +1 -0
- package/dist/examples/templateEmbeddedRequestLink.d.ts +1 -0
- package/dist/examples/templateEmbeddedRequestLink.js +78 -0
- package/dist/examples/templateEmbeddedRequestLink.js.map +1 -0
- package/dist/examples/templateSendDocument.d.ts +1 -0
- package/dist/examples/templateSendDocument.js +102 -0
- package/dist/examples/templateSendDocument.js.map +1 -0
- package/dist/examples/templateSendDocumentUsingMultipleTemplate.d.ts +1 -0
- package/dist/examples/templateSendDocumentUsingMultipleTemplate.js +50 -0
- package/dist/examples/templateSendDocumentUsingMultipleTemplate.js.map +1 -0
- package/dist/examples/userCreate.d.ts +1 -0
- package/dist/examples/userCreate.js +32 -0
- package/dist/examples/userCreate.js.map +1 -0
- package/dist/examples/userGet.d.ts +1 -0
- package/dist/examples/userGet.js +28 -0
- package/dist/examples/userGet.js.map +1 -0
- package/dist/examples/userInvitationCancel.d.ts +1 -0
- package/dist/examples/userInvitationCancel.js +28 -0
- package/dist/examples/userInvitationCancel.js.map +1 -0
- package/dist/examples/userList.d.ts +1 -0
- package/dist/examples/userList.js +29 -0
- package/dist/examples/userList.js.map +1 -0
- package/dist/examples/userResendInvitation.d.ts +1 -0
- package/dist/examples/userResendInvitation.js +28 -0
- package/dist/examples/userResendInvitation.js.map +1 -0
- package/dist/examples/userUpdateRole.d.ts +1 -0
- package/dist/examples/userUpdateRole.js +31 -0
- package/dist/examples/userUpdateRole.js.map +1 -0
- package/dist/model/accessCodeDetail.d.ts +32 -0
- package/dist/model/accessCodeDetail.js +63 -0
- package/dist/model/accessCodeDetail.js.map +1 -0
- package/dist/model/accessCodeDetails.d.ts +17 -0
- package/dist/model/accessCodeDetails.js +28 -0
- package/dist/model/accessCodeDetails.js.map +1 -0
- package/dist/model/attachmentInfo.d.ts +17 -0
- package/dist/model/attachmentInfo.js +33 -0
- package/dist/model/attachmentInfo.js.map +1 -0
- package/dist/model/auditTrail.d.ts +98 -0
- package/dist/model/auditTrail.js +131 -0
- package/dist/model/auditTrail.js.map +1 -0
- package/dist/model/behalfDocument.d.ts +43 -0
- package/dist/model/behalfDocument.js +104 -0
- package/dist/model/behalfDocument.js.map +1 -0
- package/dist/model/behalfDocumentRecords.d.ts +17 -0
- package/dist/model/behalfDocumentRecords.js +23 -0
- package/dist/model/behalfDocumentRecords.js.map +1 -0
- package/dist/model/behalfOf.d.ts +15 -0
- package/dist/model/behalfOf.js +23 -0
- package/dist/model/behalfOf.js.map +1 -0
- package/dist/model/billingViewModel.d.ts +14 -0
- package/dist/model/billingViewModel.js +18 -0
- package/dist/model/billingViewModel.js.map +1 -0
- package/dist/model/brandCreated.d.ts +14 -0
- package/dist/model/brandCreated.js +18 -0
- package/dist/model/brandCreated.js.map +1 -0
- package/dist/model/brandCustomFieldDetails.d.ts +20 -0
- package/dist/model/brandCustomFieldDetails.js +46 -0
- package/dist/model/brandCustomFieldDetails.js.map +1 -0
- package/dist/model/brandingMessage.d.ts +14 -0
- package/dist/model/brandingMessage.js +18 -0
- package/dist/model/brandingMessage.js.map +1 -0
- package/dist/model/brandingRecords.d.ts +15 -0
- package/dist/model/brandingRecords.js +18 -0
- package/dist/model/brandingRecords.js.map +1 -0
- package/dist/model/changeRecipient.d.ts +22 -0
- package/dist/model/changeRecipient.js +53 -0
- package/dist/model/changeRecipient.js.map +1 -0
- package/dist/model/conditionalRule.d.ts +16 -0
- package/dist/model/conditionalRule.js +28 -0
- package/dist/model/conditionalRule.js.map +1 -0
- package/dist/model/contactCreated.d.ts +15 -0
- package/dist/model/contactCreated.js +23 -0
- package/dist/model/contactCreated.js.map +1 -0
- package/dist/model/contactDetails.d.ts +19 -0
- package/dist/model/contactDetails.js +38 -0
- package/dist/model/contactDetails.js.map +1 -0
- package/dist/model/contactPageDetails.d.ts +16 -0
- package/dist/model/contactPageDetails.js +28 -0
- package/dist/model/contactPageDetails.js.map +1 -0
- package/dist/model/contactsDetails.d.ts +20 -0
- package/dist/model/contactsDetails.js +43 -0
- package/dist/model/contactsDetails.js.map +1 -0
- package/dist/model/contactsList.d.ts +17 -0
- package/dist/model/contactsList.js +23 -0
- package/dist/model/contactsList.js.map +1 -0
- package/dist/model/createContactResponse.d.ts +15 -0
- package/dist/model/createContactResponse.js +18 -0
- package/dist/model/createContactResponse.js.map +1 -0
- package/dist/model/createSenderIdentityRequest.d.ts +19 -0
- package/dist/model/createSenderIdentityRequest.js +38 -0
- package/dist/model/createSenderIdentityRequest.js.map +1 -0
- package/dist/model/createTeamRequest.d.ts +14 -0
- package/dist/model/createTeamRequest.js +18 -0
- package/dist/model/createTeamRequest.js.map +1 -0
- package/dist/model/createTemplateRequest.d.ts +43 -0
- package/dist/model/createTemplateRequest.js +144 -0
- package/dist/model/createTemplateRequest.js.map +1 -0
- package/dist/model/createUser.d.ts +26 -0
- package/dist/model/createUser.js +41 -0
- package/dist/model/createUser.js.map +1 -0
- package/dist/model/customDomainSettings.d.ts +15 -0
- package/dist/model/customDomainSettings.js +23 -0
- package/dist/model/customDomainSettings.js.map +1 -0
- package/dist/model/customFieldCollection.d.ts +15 -0
- package/dist/model/customFieldCollection.js +18 -0
- package/dist/model/customFieldCollection.js.map +1 -0
- package/dist/model/customFieldMessage.d.ts +15 -0
- package/dist/model/customFieldMessage.js +23 -0
- package/dist/model/customFieldMessage.js.map +1 -0
- package/dist/model/customFormField.d.ts +89 -0
- package/dist/model/customFormField.js +225 -0
- package/dist/model/customFormField.js.map +1 -0
- package/dist/model/deleteCustomFieldReply.d.ts +14 -0
- package/dist/model/deleteCustomFieldReply.js +18 -0
- package/dist/model/deleteCustomFieldReply.js.map +1 -0
- package/dist/model/document.d.ts +41 -0
- package/dist/model/document.js +99 -0
- package/dist/model/document.js.map +1 -0
- package/dist/model/documentCC.d.ts +14 -0
- package/dist/model/documentCC.js +18 -0
- package/dist/model/documentCC.js.map +1 -0
- package/dist/model/documentCcDetails.d.ts +15 -0
- package/dist/model/documentCcDetails.js +26 -0
- package/dist/model/documentCcDetails.js.map +1 -0
- package/dist/model/documentCreated.d.ts +14 -0
- package/dist/model/documentCreated.js +18 -0
- package/dist/model/documentCreated.js.map +1 -0
- package/dist/model/documentExpirySettings.d.ts +26 -0
- package/dist/model/documentExpirySettings.js +51 -0
- package/dist/model/documentExpirySettings.js.map +1 -0
- package/dist/model/documentFiles.d.ts +16 -0
- package/dist/model/documentFiles.js +28 -0
- package/dist/model/documentFiles.js.map +1 -0
- package/dist/model/documentFormFields.d.ts +74 -0
- package/dist/model/documentFormFields.js +214 -0
- package/dist/model/documentFormFields.js.map +1 -0
- package/dist/model/documentInfo.d.ts +55 -0
- package/dist/model/documentInfo.js +73 -0
- package/dist/model/documentInfo.js.map +1 -0
- package/dist/model/documentProperties.d.ts +103 -0
- package/dist/model/documentProperties.js +250 -0
- package/dist/model/documentProperties.js.map +1 -0
- package/dist/model/documentReassign.d.ts +16 -0
- package/dist/model/documentReassign.js +31 -0
- package/dist/model/documentReassign.js.map +1 -0
- package/dist/model/documentRecords.d.ts +17 -0
- package/dist/model/documentRecords.js +23 -0
- package/dist/model/documentRecords.js.map +1 -0
- package/dist/model/documentSenderDetail.d.ts +17 -0
- package/dist/model/documentSenderDetail.js +36 -0
- package/dist/model/documentSenderDetail.js.map +1 -0
- package/dist/model/documentSigner.d.ts +89 -0
- package/dist/model/documentSigner.js +163 -0
- package/dist/model/documentSigner.js.map +1 -0
- package/dist/model/documentSignerDetails.d.ts +99 -0
- package/dist/model/documentSignerDetails.js +203 -0
- package/dist/model/documentSignerDetails.js.map +1 -0
- package/dist/model/documentTags.d.ts +15 -0
- package/dist/model/documentTags.js +23 -0
- package/dist/model/documentTags.js.map +1 -0
- package/dist/model/editSenderIdentityRequest.d.ts +17 -0
- package/dist/model/editSenderIdentityRequest.js +28 -0
- package/dist/model/editSenderIdentityRequest.js.map +1 -0
- package/dist/model/editTemplateRequest.d.ts +35 -0
- package/dist/model/editTemplateRequest.js +103 -0
- package/dist/model/editTemplateRequest.js.map +1 -0
- package/dist/model/editableDateFieldSettings.d.ts +16 -0
- package/dist/model/editableDateFieldSettings.js +28 -0
- package/dist/model/editableDateFieldSettings.js.map +1 -0
- package/dist/model/embeddedCreateTemplateRequest.d.ts +78 -0
- package/dist/model/embeddedCreateTemplateRequest.js +233 -0
- package/dist/model/embeddedCreateTemplateRequest.js.map +1 -0
- package/dist/model/embeddedCustomFieldCreated.d.ts +14 -0
- package/dist/model/embeddedCustomFieldCreated.js +18 -0
- package/dist/model/embeddedCustomFieldCreated.js.map +1 -0
- package/dist/model/embeddedDocumentRequest.d.ts +96 -0
- package/dist/model/embeddedDocumentRequest.js +275 -0
- package/dist/model/embeddedDocumentRequest.js.map +1 -0
- package/dist/model/embeddedSendCreated.d.ts +15 -0
- package/dist/model/embeddedSendCreated.js +23 -0
- package/dist/model/embeddedSendCreated.js.map +1 -0
- package/dist/model/embeddedSendTemplateFormRequest.d.ts +94 -0
- package/dist/model/embeddedSendTemplateFormRequest.js +254 -0
- package/dist/model/embeddedSendTemplateFormRequest.js.map +1 -0
- package/dist/model/embeddedSigningLink.d.ts +14 -0
- package/dist/model/embeddedSigningLink.js +18 -0
- package/dist/model/embeddedSigningLink.js.map +1 -0
- package/dist/model/embeddedTemplateCreated.d.ts +15 -0
- package/dist/model/embeddedTemplateCreated.js +23 -0
- package/dist/model/embeddedTemplateCreated.js.map +1 -0
- package/dist/model/embeddedTemplateEditRequest.d.ts +48 -0
- package/dist/model/embeddedTemplateEditRequest.js +104 -0
- package/dist/model/embeddedTemplateEditRequest.js.map +1 -0
- package/dist/model/embeddedTemplateEdited.d.ts +14 -0
- package/dist/model/embeddedTemplateEdited.js +18 -0
- package/dist/model/embeddedTemplateEdited.js.map +1 -0
- package/dist/model/errorResult.d.ts +14 -0
- package/dist/model/errorResult.js +18 -0
- package/dist/model/errorResult.js.map +1 -0
- package/dist/model/existingFormField.d.ts +18 -0
- package/dist/model/existingFormField.js +38 -0
- package/dist/model/existingFormField.js.map +1 -0
- package/dist/model/extendExpiry.d.ts +17 -0
- package/dist/model/extendExpiry.js +33 -0
- package/dist/model/extendExpiry.js.map +1 -0
- package/dist/model/fileInfo.d.ts +17 -0
- package/dist/model/fileInfo.js +33 -0
- package/dist/model/fileInfo.js.map +1 -0
- package/dist/model/font.d.ts +32 -0
- package/dist/model/font.js +54 -0
- package/dist/model/font.js.map +1 -0
- package/dist/model/formField.d.ts +97 -0
- package/dist/model/formField.js +244 -0
- package/dist/model/formField.js.map +1 -0
- package/dist/model/formGroup.d.ts +26 -0
- package/dist/model/formGroup.js +47 -0
- package/dist/model/formGroup.js.map +1 -0
- package/dist/model/formulaFieldSettings.d.ts +15 -0
- package/dist/model/formulaFieldSettings.js +26 -0
- package/dist/model/formulaFieldSettings.js.map +1 -0
- package/dist/model/idVerification.d.ts +21 -0
- package/dist/model/idVerification.js +53 -0
- package/dist/model/idVerification.js.map +1 -0
- package/dist/model/identityVerificationSettings.d.ts +31 -0
- package/dist/model/identityVerificationSettings.js +57 -0
- package/dist/model/identityVerificationSettings.js.map +1 -0
- package/dist/model/imageInfo.d.ts +16 -0
- package/dist/model/imageInfo.js +28 -0
- package/dist/model/imageInfo.js.map +1 -0
- package/dist/model/index.d.ts +125 -0
- package/dist/model/index.js +460 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/mergeAndSendForSignForm.d.ts +63 -0
- package/dist/model/mergeAndSendForSignForm.js +185 -0
- package/dist/model/mergeAndSendForSignForm.js.map +1 -0
- package/dist/model/models.d.ts +56 -0
- package/dist/model/models.js +212 -0
- package/dist/model/models.js.map +1 -0
- package/dist/model/notificationSettings.d.ts +24 -0
- package/dist/model/notificationSettings.js +81 -0
- package/dist/model/notificationSettings.js.map +1 -0
- package/dist/model/pageDetails.d.ts +19 -0
- package/dist/model/pageDetails.js +43 -0
- package/dist/model/pageDetails.js.map +1 -0
- package/dist/model/phoneNumber.d.ts +15 -0
- package/dist/model/phoneNumber.js +23 -0
- package/dist/model/phoneNumber.js.map +1 -0
- package/dist/model/prefillField.d.ts +15 -0
- package/dist/model/prefillField.js +23 -0
- package/dist/model/prefillField.js.map +1 -0
- package/dist/model/prefillFieldRequest.d.ts +16 -0
- package/dist/model/prefillFieldRequest.js +23 -0
- package/dist/model/prefillFieldRequest.js.map +1 -0
- package/dist/model/problemDetails.d.ts +18 -0
- package/dist/model/problemDetails.js +38 -0
- package/dist/model/problemDetails.js.map +1 -0
- package/dist/model/recipientNotificationSettings.d.ts +24 -0
- package/dist/model/recipientNotificationSettings.js +81 -0
- package/dist/model/recipientNotificationSettings.js.map +1 -0
- package/dist/model/rectangle.d.ts +17 -0
- package/dist/model/rectangle.js +39 -0
- package/dist/model/rectangle.js.map +1 -0
- package/dist/model/reminderMessage.d.ts +17 -0
- package/dist/model/reminderMessage.js +28 -0
- package/dist/model/reminderMessage.js.map +1 -0
- package/dist/model/reminderSettings.d.ts +16 -0
- package/dist/model/reminderSettings.js +33 -0
- package/dist/model/reminderSettings.js.map +1 -0
- package/dist/model/removeAuthentication.d.ts +18 -0
- package/dist/model/removeAuthentication.js +33 -0
- package/dist/model/removeAuthentication.js.map +1 -0
- package/dist/model/revokeDocument.d.ts +15 -0
- package/dist/model/revokeDocument.js +23 -0
- package/dist/model/revokeDocument.js.map +1 -0
- package/dist/model/role.d.ts +92 -0
- package/dist/model/role.js +173 -0
- package/dist/model/role.js.map +1 -0
- package/dist/model/roles.d.ts +93 -0
- package/dist/model/roles.js +183 -0
- package/dist/model/roles.js.map +1 -0
- package/dist/model/sendForSign.d.ts +64 -0
- package/dist/model/sendForSign.js +193 -0
- package/dist/model/sendForSign.js.map +1 -0
- package/dist/model/sendForSignFromTemplateForm.d.ts +62 -0
- package/dist/model/sendForSignFromTemplateForm.js +180 -0
- package/dist/model/sendForSignFromTemplateForm.js.map +1 -0
- package/dist/model/senderIdentityList.d.ts +17 -0
- package/dist/model/senderIdentityList.js +23 -0
- package/dist/model/senderIdentityList.js.map +1 -0
- package/dist/model/senderIdentityViewModel.d.ts +22 -0
- package/dist/model/senderIdentityViewModel.js +53 -0
- package/dist/model/senderIdentityViewModel.js.map +1 -0
- package/dist/model/size.d.ts +15 -0
- package/dist/model/size.js +27 -0
- package/dist/model/size.js.map +1 -0
- package/dist/model/teamCreated.d.ts +14 -0
- package/dist/model/teamCreated.js +18 -0
- package/dist/model/teamCreated.js.map +1 -0
- package/dist/model/teamDocumentRecords.d.ts +17 -0
- package/dist/model/teamDocumentRecords.js +23 -0
- package/dist/model/teamDocumentRecords.js.map +1 -0
- package/dist/model/teamListResponse.d.ts +17 -0
- package/dist/model/teamListResponse.js +23 -0
- package/dist/model/teamListResponse.js.map +1 -0
- package/dist/model/teamPageDetails.d.ts +15 -0
- package/dist/model/teamPageDetails.js +23 -0
- package/dist/model/teamPageDetails.js.map +1 -0
- package/dist/model/teamResponse.d.ts +19 -0
- package/dist/model/teamResponse.js +38 -0
- package/dist/model/teamResponse.js.map +1 -0
- package/dist/model/teamUpdateRequest.d.ts +15 -0
- package/dist/model/teamUpdateRequest.js +23 -0
- package/dist/model/teamUpdateRequest.js.map +1 -0
- package/dist/model/teamUsers.d.ts +31 -0
- package/dist/model/teamUsers.js +57 -0
- package/dist/model/teamUsers.js.map +1 -0
- package/dist/model/teams.d.ts +17 -0
- package/dist/model/teams.js +33 -0
- package/dist/model/teams.js.map +1 -0
- package/dist/model/template.d.ts +51 -0
- package/dist/model/template.js +128 -0
- package/dist/model/template.js.map +1 -0
- package/dist/model/templateCC.d.ts +15 -0
- package/dist/model/templateCC.js +23 -0
- package/dist/model/templateCC.js.map +1 -0
- package/dist/model/templateCreated.d.ts +14 -0
- package/dist/model/templateCreated.js +18 -0
- package/dist/model/templateCreated.js.map +1 -0
- package/dist/model/templateFormFields.d.ts +74 -0
- package/dist/model/templateFormFields.js +219 -0
- package/dist/model/templateFormFields.js.map +1 -0
- package/dist/model/templateProperties.d.ts +55 -0
- package/dist/model/templateProperties.js +155 -0
- package/dist/model/templateProperties.js.map +1 -0
- package/dist/model/templateRecords.d.ts +17 -0
- package/dist/model/templateRecords.js +23 -0
- package/dist/model/templateRecords.js.map +1 -0
- package/dist/model/templateRole.d.ts +86 -0
- package/dist/model/templateRole.js +153 -0
- package/dist/model/templateRole.js.map +1 -0
- package/dist/model/templateSenderDetail.d.ts +15 -0
- package/dist/model/templateSenderDetail.js +23 -0
- package/dist/model/templateSenderDetail.js.map +1 -0
- package/dist/model/templateSenderDetails.d.ts +16 -0
- package/dist/model/templateSenderDetails.js +28 -0
- package/dist/model/templateSenderDetails.js.map +1 -0
- package/dist/model/templateSharedTemplateDetail.d.ts +21 -0
- package/dist/model/templateSharedTemplateDetail.js +30 -0
- package/dist/model/templateSharedTemplateDetail.js.map +1 -0
- package/dist/model/templateSignerDetails.d.ts +62 -0
- package/dist/model/templateSignerDetails.js +138 -0
- package/dist/model/templateSignerDetails.js.map +1 -0
- package/dist/model/templateTag.d.ts +17 -0
- package/dist/model/templateTag.js +33 -0
- package/dist/model/templateTag.js.map +1 -0
- package/dist/model/textTagDefinition.d.ts +63 -0
- package/dist/model/textTagDefinition.js +153 -0
- package/dist/model/textTagDefinition.js.map +1 -0
- package/dist/model/textTagOffset.d.ts +15 -0
- package/dist/model/textTagOffset.js +23 -0
- package/dist/model/textTagOffset.js.map +1 -0
- package/dist/model/updateUser.d.ts +28 -0
- package/dist/model/updateUser.js +46 -0
- package/dist/model/updateUser.js.map +1 -0
- package/dist/model/userPageDetails.d.ts +15 -0
- package/dist/model/userPageDetails.js +23 -0
- package/dist/model/userPageDetails.js.map +1 -0
- package/dist/model/userProperties.d.ts +26 -0
- package/dist/model/userProperties.js +68 -0
- package/dist/model/userProperties.js.map +1 -0
- package/dist/model/userRecords.d.ts +17 -0
- package/dist/model/userRecords.js +23 -0
- package/dist/model/userRecords.js.map +1 -0
- package/dist/model/usersDetails.d.ts +26 -0
- package/dist/model/usersDetails.js +68 -0
- package/dist/model/usersDetails.js.map +1 -0
- package/dist/model/validation.d.ts +23 -0
- package/dist/model/validation.js +32 -0
- package/dist/model/validation.js.map +1 -0
- package/dist/model/viewBrandDetails.d.ts +45 -0
- package/dist/model/viewBrandDetails.js +140 -0
- package/dist/model/viewBrandDetails.js.map +1 -0
- package/dist/model/viewCustomFieldDetails.d.ts +21 -0
- package/dist/model/viewCustomFieldDetails.js +48 -0
- package/dist/model/viewCustomFieldDetails.js.map +1 -0
- package/dist/tests/integration/BrandingApiTest.spec.d.ts +1 -0
- package/dist/tests/integration/BrandingApiTest.spec.js +195 -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 +224 -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 +263 -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 +1239 -0
- package/dist/tests/integration/DocumentApiTest.spec.js.map +1 -0
- package/dist/tests/integration/TemplateApiTest.spec.d.ts +1 -0
- package/dist/tests/integration/TemplateApiTest.spec.js +788 -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 +39 -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 +225 -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 +174 -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 +230 -0
- package/dist/tests/integration/usersApiTest.spec.js.map +1 -0
- package/examples/DocumentProperties.ts +15 -0
- package/examples/brandCreate.ts +29 -0
- package/examples/brandDelete.ts +15 -0
- package/examples/brandGet.ts +15 -0
- package/examples/brandList.ts +14 -0
- package/examples/brandResetDefault.ts +15 -0
- package/examples/brandUpdate.ts +21 -0
- package/examples/contactCreate.ts +26 -0
- package/examples/contactDelete.ts +15 -0
- package/examples/contactGet.ts +15 -0
- package/examples/contactList.ts +16 -0
- package/examples/contactUpdate.ts +26 -0
- package/examples/customFieldCreate.ts +28 -0
- package/examples/customFieldDelete.ts +15 -0
- package/examples/customFieldEdit.ts +30 -0
- package/examples/customFieldEmbeddedCreateUrl.ts +19 -0
- package/examples/customFieldList.ts +15 -0
- package/examples/documentAddAuthentication.ts +20 -0
- package/examples/documentAddTags.ts +19 -0
- package/examples/documentChangeAccessCode.ts +20 -0
- package/examples/documentChangeRecipients.ts +22 -0
- package/examples/documentDelete.ts +16 -0
- package/examples/documentDeleteTags.ts +19 -0
- package/examples/documentDownload.ts +16 -0
- package/examples/documentDownloadAttachment.ts +17 -0
- package/examples/documentDownloadAuditTrial.ts +16 -0
- package/examples/documentEmbeddedRequestLink.ts +49 -0
- package/examples/documentEmbeddedSignLink.ts +23 -0
- package/examples/documentExtendExpiry.ts +20 -0
- package/examples/documentList.ts +15 -0
- package/examples/documentListBehalf.ts +15 -0
- package/examples/documentListTeam.ts +15 -0
- package/examples/documentPrefillFieldCheckBox.ts +23 -0
- package/examples/documentPrefillFieldDropDown.ts +23 -0
- package/examples/documentPrefillFieldEditableDate.ts +23 -0
- package/examples/documentPrefillFieldImage.ts +23 -0
- package/examples/documentPrefillFieldRadioButton.ts +23 -0
- package/examples/documentPrefillFieldTextBox.ts +23 -0
- package/examples/documentRemoveAuthentication.ts +19 -0
- package/examples/documentRevoke.ts +19 -0
- package/examples/documentSend.ts +47 -0
- package/examples/documentSendOnBehalf.ts +53 -0
- package/examples/documentSendReminder.ts +20 -0
- package/examples/documents/agreement.pdf +0 -0
- package/examples/documents/logo.jpg +0 -0
- package/examples/listTemplate.ts +16 -0
- package/examples/plan.ts +14 -0
- package/examples/senderIdentityCreate.ts +21 -0
- package/examples/senderIdentityDelete.ts +15 -0
- package/examples/senderIdentityList.ts +16 -0
- package/examples/senderIdentityRerequest.ts +15 -0
- package/examples/senderIdentityResendInvitation.ts +15 -0
- package/examples/senderIdentityUpdate.ts +20 -0
- package/examples/teamCreate.ts +18 -0
- package/examples/teamGet.ts +15 -0
- package/examples/teamList.ts +16 -0
- package/examples/teamUpdate.ts +19 -0
- package/examples/templateAddTag.ts +20 -0
- package/examples/templateCreate.ts +29 -0
- package/examples/templateDelete.ts +15 -0
- package/examples/templateDeleteTag.ts +20 -0
- package/examples/templateDetails.ts +15 -0
- package/examples/templateDownload.ts +15 -0
- package/examples/templateEdit.ts +22 -0
- package/examples/templateEmbeddedCreate.ts +29 -0
- package/examples/templateEmbeddedEdit.ts +24 -0
- package/examples/templateEmbeddedRequestLink.ts +34 -0
- package/examples/templateSendDocument.ts +60 -0
- package/examples/templateSendDocumentUsingMultipleTemplate.ts +40 -0
- package/examples/userCreate.ts +20 -0
- package/examples/userGet.ts +15 -0
- package/examples/userInvitationCancel.ts +15 -0
- package/examples/userList.ts +16 -0
- package/examples/userResendInvitation.ts +15 -0
- package/examples/userUpdateRole.ts +19 -0
- package/git_push.sh +57 -0
- package/model/accessCodeDetail.ts +84 -0
- package/model/accessCodeDetails.ts +44 -0
- package/model/attachmentInfo.ts +49 -0
- package/model/auditTrail.ts +150 -0
- package/model/behalfDocument.ts +135 -0
- package/model/behalfDocumentRecords.ts +39 -0
- package/model/behalfOf.ts +37 -0
- package/model/billingViewModel.ts +31 -0
- package/model/brandCreated.ts +31 -0
- package/model/brandCustomFieldDetails.ts +62 -0
- package/model/brandingMessage.ts +31 -0
- package/model/brandingRecords.ts +32 -0
- package/model/changeRecipient.ts +74 -0
- package/model/conditionalRule.ts +43 -0
- package/model/contactCreated.ts +37 -0
- package/model/contactDetails.ts +56 -0
- package/model/contactPageDetails.ts +43 -0
- package/model/contactsDetails.ts +62 -0
- package/model/contactsList.ts +39 -0
- package/model/createContactResponse.ts +32 -0
- package/model/createSenderIdentityRequest.ts +56 -0
- package/model/createTeamRequest.ts +31 -0
- package/model/createTemplateRequest.ts +174 -0
- package/model/createUser.ts +56 -0
- package/model/customDomainSettings.ts +37 -0
- package/model/customFieldCollection.ts +32 -0
- package/model/customFieldMessage.ts +37 -0
- package/model/customFormField.ts +261 -0
- package/model/deleteCustomFieldReply.ts +31 -0
- package/model/document.ts +128 -0
- package/model/documentCC.ts +31 -0
- package/model/documentCcDetails.ts +37 -0
- package/model/documentCreated.ts +31 -0
- package/model/documentExpirySettings.ts +68 -0
- package/model/documentFiles.ts +43 -0
- package/model/documentFormFields.ts +266 -0
- package/model/documentInfo.ts +90 -0
- package/model/documentProperties.ts +308 -0
- package/model/documentReassign.ts +43 -0
- package/model/documentRecords.ts +39 -0
- package/model/documentSenderDetail.ts +49 -0
- package/model/documentSigner.ts +194 -0
- package/model/documentSignerDetails.ts +234 -0
- package/model/documentTags.ts +37 -0
- package/model/editSenderIdentityRequest.ts +44 -0
- package/model/editTemplateRequest.ts +137 -0
- package/model/editableDateFieldSettings.ts +43 -0
- package/model/embeddedCreateTemplateRequest.ts +264 -0
- package/model/embeddedCustomFieldCreated.ts +31 -0
- package/model/embeddedDocumentRequest.ts +310 -0
- package/model/embeddedSendCreated.ts +37 -0
- package/model/embeddedSendTemplateFormRequest.ts +303 -0
- package/model/embeddedSigningLink.ts +31 -0
- package/model/embeddedTemplateCreated.ts +37 -0
- package/model/embeddedTemplateEditRequest.ts +115 -0
- package/model/embeddedTemplateEdited.ts +31 -0
- package/model/errorResult.ts +31 -0
- package/model/existingFormField.ts +55 -0
- package/model/extendExpiry.ts +49 -0
- package/model/fileInfo.ts +49 -0
- package/model/font.ts +69 -0
- package/model/formField.ts +294 -0
- package/model/formGroup.ts +63 -0
- package/model/formulaFieldSettings.ts +37 -0
- package/model/idVerification.ts +73 -0
- package/model/identityVerificationSettings.ts +73 -0
- package/model/imageInfo.ts +43 -0
- package/model/index.ts +476 -0
- package/model/mergeAndSendForSignForm.ts +227 -0
- package/model/models.ts +244 -0
- package/model/notificationSettings.ts +91 -0
- package/model/pageDetails.ts +61 -0
- package/model/phoneNumber.ts +37 -0
- package/model/prefillField.ts +37 -0
- package/model/prefillFieldRequest.ts +38 -0
- package/model/problemDetails.ts +55 -0
- package/model/recipientNotificationSettings.ts +91 -0
- package/model/rectangle.ts +49 -0
- package/model/reminderMessage.ts +44 -0
- package/model/reminderSettings.ts +43 -0
- package/model/removeAuthentication.ts +50 -0
- package/model/revokeDocument.ts +37 -0
- package/model/role.ts +207 -0
- package/model/roles.ts +218 -0
- package/model/sendForSign.ts +228 -0
- package/model/sendForSignFromTemplateForm.ts +221 -0
- package/model/senderIdentityList.ts +39 -0
- package/model/senderIdentityViewModel.ts +74 -0
- package/model/size.ts +37 -0
- package/model/teamCreated.ts +31 -0
- package/model/teamDocumentRecords.ts +39 -0
- package/model/teamListResponse.ts +39 -0
- package/model/teamPageDetails.ts +37 -0
- package/model/teamResponse.ts +56 -0
- package/model/teamUpdateRequest.ts +37 -0
- package/model/teamUsers.ts +73 -0
- package/model/teams.ts +49 -0
- package/model/template.ts +158 -0
- package/model/templateCC.ts +37 -0
- package/model/templateCreated.ts +31 -0
- package/model/templateFormFields.ts +271 -0
- package/model/templateProperties.ts +202 -0
- package/model/templateRecords.ts +39 -0
- package/model/templateRole.ts +181 -0
- package/model/templateSenderDetail.ts +37 -0
- package/model/templateSenderDetails.ts +43 -0
- package/model/templateSharedTemplateDetail.ts +43 -0
- package/model/templateSignerDetails.ts +159 -0
- package/model/templateTag.ts +49 -0
- package/model/textTagDefinition.ts +195 -0
- package/model/textTagOffset.ts +37 -0
- package/model/updateUser.ts +60 -0
- package/model/userPageDetails.ts +37 -0
- package/model/userProperties.ts +91 -0
- package/model/userRecords.ts +39 -0
- package/model/usersDetails.ts +91 -0
- package/model/validation.ts +45 -0
- package/model/viewBrandDetails.ts +177 -0
- package/model/viewCustomFieldDetails.ts +68 -0
- package/package.json +48 -0
- package/tests/integration/BrandingApiTest.spec.ts +141 -0
- package/tests/integration/ContactsApiTest.spec.ts +202 -0
- package/tests/integration/CustomFieldApiTest.spec.ts +209 -0
- package/tests/integration/DocumentApiTest.spec.ts +1166 -0
- package/tests/integration/TemplateApiTest.spec.ts +720 -0
- package/tests/integration/planApiTest.spec.ts +27 -0
- package/tests/integration/senderIdentity.spec.ts +193 -0
- package/tests/integration/teamsApiTest.spec.ts +167 -0
- package/tests/integration/usersApiTest.spec.ts +198 -0
- package/tsconfig.json +24 -0
|
@@ -0,0 +1,2887 @@
|
|
|
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
|
+
AccessCodeDetail,AccessCodeDetails,BehalfDocumentRecords,ChangeRecipient,DocumentCreated,DocumentProperties,DocumentRecords,DocumentTags,EmbeddedDocumentRequest,EmbeddedSendCreated,EmbeddedSigningLink,ErrorResult,ExtendExpiry,PrefillFieldRequest,ReminderMessage,RemoveAuthentication,RevokeDocument,SendForSign,TeamDocumentRecords,
|
|
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 DocumentApi {
|
|
40
|
+
protected _basePath = defaultBasePath;
|
|
41
|
+
protected _defaultHeaders : any = { 'User-Agent': USER_AGENT };
|
|
42
|
+
protected _useQuerystring : boolean = false;
|
|
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 addInterceptor(interceptor: Interceptor) {
|
|
87
|
+
this.interceptors.push(interceptor);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @summary The add authentication to recipient.
|
|
93
|
+
* @param documentId The DocumentId.
|
|
94
|
+
* @param accessCodeDetail Access code details.
|
|
95
|
+
* @param options
|
|
96
|
+
*/
|
|
97
|
+
public async addAuthentication (documentId: string, accessCodeDetail?: AccessCodeDetail, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
98
|
+
accessCodeDetail = deserializeIfNeeded(accessCodeDetail, "AccessCodeDetail");
|
|
99
|
+
const localVarPath = this.basePath + '/v1/document/addAuthentication';
|
|
100
|
+
let localVarQueryParameters: any = {};
|
|
101
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
102
|
+
const produces = ['application/json'];
|
|
103
|
+
// give precedence to 'application/json'
|
|
104
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
105
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
106
|
+
} else {
|
|
107
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
108
|
+
}
|
|
109
|
+
let localVarFormParams: any = {};
|
|
110
|
+
let localVarBodyParams: any = undefined;
|
|
111
|
+
|
|
112
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
113
|
+
if (documentId === null || documentId === undefined) {
|
|
114
|
+
throw new Error('Required parameter documentId was null or undefined when calling addAuthentication.');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (documentId !== undefined) {
|
|
118
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
122
|
+
|
|
123
|
+
let localVarUseFormData = false;
|
|
124
|
+
|
|
125
|
+
const result = generateFormData(accessCodeDetail, AccessCodeDetail);
|
|
126
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
127
|
+
|
|
128
|
+
let data = {};
|
|
129
|
+
if (localVarUseFormData) {
|
|
130
|
+
const formData = toFormData(result.data);
|
|
131
|
+
data = formData;
|
|
132
|
+
localVarHeaderParams = {
|
|
133
|
+
...localVarHeaderParams,
|
|
134
|
+
...formData.getHeaders(),
|
|
135
|
+
};
|
|
136
|
+
} else {
|
|
137
|
+
data = ObjectSerializer.serialize(
|
|
138
|
+
accessCodeDetail,
|
|
139
|
+
"AccessCodeDetail"
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
144
|
+
method: 'PATCH',
|
|
145
|
+
params: localVarQueryParameters,
|
|
146
|
+
headers: localVarHeaderParams,
|
|
147
|
+
url: localVarPath,
|
|
148
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
149
|
+
maxContentLength: Infinity,
|
|
150
|
+
maxBodyLength: Infinity,
|
|
151
|
+
responseType: "json",
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
155
|
+
localVarRequestOptions.data = data;
|
|
156
|
+
}
|
|
157
|
+
let authenticationPromise = Promise.resolve();
|
|
158
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
159
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
160
|
+
}
|
|
161
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
162
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].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<returnTypeI>((resolve, reject) => {
|
|
173
|
+
axios.request(localVarRequestOptions)
|
|
174
|
+
.then((response) => {
|
|
175
|
+
handleSuccessfulResponse(
|
|
176
|
+
resolve,
|
|
177
|
+
reject,
|
|
178
|
+
response,
|
|
179
|
+
|
|
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
|
+
401,
|
|
191
|
+
"ErrorResult",
|
|
192
|
+
)) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (handleErrorCodeResponse(
|
|
196
|
+
reject,
|
|
197
|
+
error.response,
|
|
198
|
+
403,
|
|
199
|
+
"ErrorResult",
|
|
200
|
+
)) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
reject(error);
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @summary Add the Tags in Documents.
|
|
213
|
+
* @param documentTags Contains DocumentId and LabelNames for Adding Tags.
|
|
214
|
+
* @param options
|
|
215
|
+
*/
|
|
216
|
+
public async addTag (documentTags?: DocumentTags, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
217
|
+
documentTags = deserializeIfNeeded(documentTags, "DocumentTags");
|
|
218
|
+
const localVarPath = this.basePath + '/v1/document/addTags';
|
|
219
|
+
let localVarQueryParameters: any = {};
|
|
220
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
221
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
222
|
+
// give precedence to 'application/json'
|
|
223
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
224
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
225
|
+
} else {
|
|
226
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
227
|
+
}
|
|
228
|
+
let localVarFormParams: any = {};
|
|
229
|
+
let localVarBodyParams: any = undefined;
|
|
230
|
+
|
|
231
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
232
|
+
|
|
233
|
+
let localVarUseFormData = false;
|
|
234
|
+
|
|
235
|
+
const result = generateFormData(documentTags, DocumentTags);
|
|
236
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
237
|
+
|
|
238
|
+
let data = {};
|
|
239
|
+
if (localVarUseFormData) {
|
|
240
|
+
const formData = toFormData(result.data);
|
|
241
|
+
data = formData;
|
|
242
|
+
localVarHeaderParams = {
|
|
243
|
+
...localVarHeaderParams,
|
|
244
|
+
...formData.getHeaders(),
|
|
245
|
+
};
|
|
246
|
+
} else {
|
|
247
|
+
data = ObjectSerializer.serialize(
|
|
248
|
+
documentTags,
|
|
249
|
+
"DocumentTags"
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
254
|
+
method: 'PATCH',
|
|
255
|
+
params: localVarQueryParameters,
|
|
256
|
+
headers: localVarHeaderParams,
|
|
257
|
+
url: localVarPath,
|
|
258
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
259
|
+
maxContentLength: Infinity,
|
|
260
|
+
maxBodyLength: Infinity,
|
|
261
|
+
responseType: "json",
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
265
|
+
localVarRequestOptions.data = data;
|
|
266
|
+
}
|
|
267
|
+
let authenticationPromise = Promise.resolve();
|
|
268
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
269
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
270
|
+
}
|
|
271
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
272
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
273
|
+
}
|
|
274
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
275
|
+
|
|
276
|
+
let interceptorPromise = authenticationPromise;
|
|
277
|
+
for (const interceptor of this.interceptors) {
|
|
278
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
return interceptorPromise.then(() => {
|
|
282
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
283
|
+
axios.request(localVarRequestOptions)
|
|
284
|
+
.then((response) => {
|
|
285
|
+
handleSuccessfulResponse(
|
|
286
|
+
resolve,
|
|
287
|
+
reject,
|
|
288
|
+
response,
|
|
289
|
+
|
|
290
|
+
);
|
|
291
|
+
}, (error: AxiosError) => {
|
|
292
|
+
if (error.response == null) {
|
|
293
|
+
reject(error);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if (handleErrorCodeResponse(
|
|
298
|
+
reject,
|
|
299
|
+
error.response,
|
|
300
|
+
400,
|
|
301
|
+
"ErrorResult",
|
|
302
|
+
)) {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (handleErrorCodeResponse(
|
|
306
|
+
reject,
|
|
307
|
+
error.response,
|
|
308
|
+
401,
|
|
309
|
+
"ErrorResult",
|
|
310
|
+
)) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
reject(error);
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
*
|
|
322
|
+
* @summary Gets the behalf documents.
|
|
323
|
+
* @param page Page index specified in get document list request.
|
|
324
|
+
* @param pageType The filter used to differentiate between documents sent on the user\'s behalf and documents sent by the user on behalf of others. The API will return documents based on the specified value.
|
|
325
|
+
* @param emailAddress The sender identity\'s email used to filter the documents returned in the API. The API will return documents that were sent on behalf of the specified email address.
|
|
326
|
+
* @param signers A list of signer email addresses used to filter the documents returned in the API. The API will return documents where the signer\'s email address matches one of the email addresses provided in this list
|
|
327
|
+
* @param pageSize Page size specified in get document list request.
|
|
328
|
+
* @param startDate Start date of the document
|
|
329
|
+
* @param status Status of the document such as In-progress, Completed, Decline, Expired, Revoked, Draft.
|
|
330
|
+
* @param endDate End date of the document
|
|
331
|
+
* @param searchKey Documents can be listed by the search key present in the document like document title, document ID, sender or recipient(s) name, etc.,
|
|
332
|
+
* @param labels Labels of the document.
|
|
333
|
+
* @param nextCursor Next cursor value for pagination, required for fetching the next set of documents beyond 10,000 records.
|
|
334
|
+
* @param brandIds BrandId(s) of the document.
|
|
335
|
+
* @param options
|
|
336
|
+
*/
|
|
337
|
+
public async behalfDocuments (page: number, pageType?: 'BehalfOfOthers' | 'BehalfOfMe', emailAddress?: Array<string>, signers?: Array<string>, pageSize?: number, startDate?: Date, status?: Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft'>, endDate?: Date, searchKey?: string, labels?: Array<string>, nextCursor?: number, brandIds?: Array<string>, options: optionsI = {headers: {}}) : Promise<returnTypeT<BehalfDocumentRecords>> {
|
|
338
|
+
const localVarPath = this.basePath + '/v1/document/behalfList';
|
|
339
|
+
let localVarQueryParameters: any = {};
|
|
340
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
341
|
+
const produces = ['application/json'];
|
|
342
|
+
// give precedence to 'application/json'
|
|
343
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
344
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
345
|
+
} else {
|
|
346
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
347
|
+
}
|
|
348
|
+
let localVarFormParams: any = {};
|
|
349
|
+
let localVarBodyParams: any = undefined;
|
|
350
|
+
|
|
351
|
+
// verify required parameter 'page' is not null or undefined
|
|
352
|
+
if (page === null || page === undefined) {
|
|
353
|
+
throw new Error('Required parameter page was null or undefined when calling behalfDocuments.');
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (pageType !== undefined) {
|
|
357
|
+
localVarQueryParameters['PageType'] = ObjectSerializer.serialize(pageType, "'BehalfOfOthers' | 'BehalfOfMe'");
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (emailAddress !== undefined) {
|
|
361
|
+
localVarQueryParameters['EmailAddress'] = ObjectSerializer.serialize(emailAddress, "Array<string>");
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
if (signers !== undefined) {
|
|
365
|
+
localVarQueryParameters['Signers'] = ObjectSerializer.serialize(signers, "Array<string>");
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (pageSize !== undefined) {
|
|
369
|
+
localVarQueryParameters['PageSize'] = ObjectSerializer.serialize(pageSize, "number");
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
if (page !== undefined) {
|
|
373
|
+
localVarQueryParameters['Page'] = ObjectSerializer.serialize(page, "number");
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if (startDate !== undefined) {
|
|
377
|
+
localVarQueryParameters['StartDate'] = ObjectSerializer.serialize(startDate, "Date");
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
if (status !== undefined) {
|
|
381
|
+
localVarQueryParameters['Status'] = ObjectSerializer.serialize(status, "Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft'>");
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
if (endDate !== undefined) {
|
|
385
|
+
localVarQueryParameters['EndDate'] = ObjectSerializer.serialize(endDate, "Date");
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
if (searchKey !== undefined) {
|
|
389
|
+
localVarQueryParameters['SearchKey'] = ObjectSerializer.serialize(searchKey, "string");
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if (labels !== undefined) {
|
|
393
|
+
localVarQueryParameters['Labels'] = ObjectSerializer.serialize(labels, "Array<string>");
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
if (nextCursor !== undefined) {
|
|
397
|
+
localVarQueryParameters['NextCursor'] = ObjectSerializer.serialize(nextCursor, "number");
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (brandIds !== undefined) {
|
|
401
|
+
localVarQueryParameters['BrandIds'] = ObjectSerializer.serialize(brandIds, "Array<string>");
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
405
|
+
|
|
406
|
+
let localVarUseFormData = false;
|
|
407
|
+
|
|
408
|
+
let data = {};
|
|
409
|
+
if (localVarUseFormData) {
|
|
410
|
+
const formData = toFormData(localVarFormParams);
|
|
411
|
+
data = formData;
|
|
412
|
+
localVarHeaderParams = {
|
|
413
|
+
...localVarHeaderParams,
|
|
414
|
+
...formData.getHeaders(),
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
419
|
+
method: 'GET',
|
|
420
|
+
params: localVarQueryParameters,
|
|
421
|
+
headers: localVarHeaderParams,
|
|
422
|
+
url: localVarPath,
|
|
423
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
424
|
+
maxContentLength: Infinity,
|
|
425
|
+
maxBodyLength: Infinity,
|
|
426
|
+
responseType: "json",
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
430
|
+
localVarRequestOptions.data = data;
|
|
431
|
+
}
|
|
432
|
+
let authenticationPromise = Promise.resolve();
|
|
433
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
434
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
435
|
+
}
|
|
436
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
437
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
438
|
+
}
|
|
439
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
440
|
+
|
|
441
|
+
let interceptorPromise = authenticationPromise;
|
|
442
|
+
for (const interceptor of this.interceptors) {
|
|
443
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
return interceptorPromise.then(() => {
|
|
447
|
+
return new Promise<returnTypeT<BehalfDocumentRecords>>((resolve, reject) => {
|
|
448
|
+
axios.request(localVarRequestOptions)
|
|
449
|
+
.then((response) => {
|
|
450
|
+
handleSuccessfulResponse<BehalfDocumentRecords>(
|
|
451
|
+
resolve,
|
|
452
|
+
reject,
|
|
453
|
+
response,
|
|
454
|
+
"BehalfDocumentRecords",
|
|
455
|
+
);
|
|
456
|
+
}, (error: AxiosError) => {
|
|
457
|
+
if (error.response == null) {
|
|
458
|
+
reject(error);
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if (handleErrorCodeResponse(
|
|
463
|
+
reject,
|
|
464
|
+
error.response,
|
|
465
|
+
200,
|
|
466
|
+
"BehalfDocumentRecords",
|
|
467
|
+
)) {
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
if (handleErrorCodeResponse(
|
|
471
|
+
reject,
|
|
472
|
+
error.response,
|
|
473
|
+
401,
|
|
474
|
+
"ErrorResult",
|
|
475
|
+
)) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
if (handleErrorCodeResponse(
|
|
479
|
+
reject,
|
|
480
|
+
error.response,
|
|
481
|
+
403,
|
|
482
|
+
"ErrorResult",
|
|
483
|
+
)) {
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
reject(error);
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
*
|
|
495
|
+
* @summary Changes the access code for the given document signer.
|
|
496
|
+
* @param documentId
|
|
497
|
+
* @param accessCodeDetails The new access code.
|
|
498
|
+
* @param emailId
|
|
499
|
+
* @param zOrder
|
|
500
|
+
* @param options
|
|
501
|
+
*/
|
|
502
|
+
public async changeAccessCode (documentId: string, accessCodeDetails: AccessCodeDetails, emailId?: string, zOrder?: number, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
503
|
+
accessCodeDetails = deserializeIfNeeded(accessCodeDetails, "AccessCodeDetails");
|
|
504
|
+
const localVarPath = this.basePath + '/v1/document/changeAccessCode';
|
|
505
|
+
let localVarQueryParameters: any = {};
|
|
506
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
507
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
508
|
+
// give precedence to 'application/json'
|
|
509
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
510
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
511
|
+
} else {
|
|
512
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
513
|
+
}
|
|
514
|
+
let localVarFormParams: any = {};
|
|
515
|
+
let localVarBodyParams: any = undefined;
|
|
516
|
+
|
|
517
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
518
|
+
if (documentId === null || documentId === undefined) {
|
|
519
|
+
throw new Error('Required parameter documentId was null or undefined when calling changeAccessCode.');
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// verify required parameter 'accessCodeDetails' is not null or undefined
|
|
523
|
+
if (accessCodeDetails === null || accessCodeDetails === undefined) {
|
|
524
|
+
throw new Error('Required parameter accessCodeDetails was null or undefined when calling changeAccessCode.');
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (documentId !== undefined) {
|
|
528
|
+
localVarQueryParameters['DocumentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if (emailId !== undefined) {
|
|
532
|
+
localVarQueryParameters['EmailId'] = ObjectSerializer.serialize(emailId, "string");
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if (zOrder !== undefined) {
|
|
536
|
+
localVarQueryParameters['ZOrder'] = ObjectSerializer.serialize(zOrder, "number");
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
540
|
+
|
|
541
|
+
let localVarUseFormData = false;
|
|
542
|
+
|
|
543
|
+
const result = generateFormData(accessCodeDetails, AccessCodeDetails);
|
|
544
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
545
|
+
|
|
546
|
+
let data = {};
|
|
547
|
+
if (localVarUseFormData) {
|
|
548
|
+
const formData = toFormData(result.data);
|
|
549
|
+
data = formData;
|
|
550
|
+
localVarHeaderParams = {
|
|
551
|
+
...localVarHeaderParams,
|
|
552
|
+
...formData.getHeaders(),
|
|
553
|
+
};
|
|
554
|
+
} else {
|
|
555
|
+
data = ObjectSerializer.serialize(
|
|
556
|
+
accessCodeDetails,
|
|
557
|
+
"AccessCodeDetails"
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
562
|
+
method: 'PATCH',
|
|
563
|
+
params: localVarQueryParameters,
|
|
564
|
+
headers: localVarHeaderParams,
|
|
565
|
+
url: localVarPath,
|
|
566
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
567
|
+
maxContentLength: Infinity,
|
|
568
|
+
maxBodyLength: Infinity,
|
|
569
|
+
responseType: "json",
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
573
|
+
localVarRequestOptions.data = data;
|
|
574
|
+
}
|
|
575
|
+
let authenticationPromise = Promise.resolve();
|
|
576
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
577
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
578
|
+
}
|
|
579
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
580
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
581
|
+
}
|
|
582
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
583
|
+
|
|
584
|
+
let interceptorPromise = authenticationPromise;
|
|
585
|
+
for (const interceptor of this.interceptors) {
|
|
586
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
return interceptorPromise.then(() => {
|
|
590
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
591
|
+
axios.request(localVarRequestOptions)
|
|
592
|
+
.then((response) => {
|
|
593
|
+
handleSuccessfulResponse(
|
|
594
|
+
resolve,
|
|
595
|
+
reject,
|
|
596
|
+
response,
|
|
597
|
+
|
|
598
|
+
);
|
|
599
|
+
}, (error: AxiosError) => {
|
|
600
|
+
if (error.response == null) {
|
|
601
|
+
reject(error);
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
if (handleErrorCodeResponse(
|
|
606
|
+
reject,
|
|
607
|
+
error.response,
|
|
608
|
+
401,
|
|
609
|
+
"ErrorResult",
|
|
610
|
+
)) {
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
if (handleErrorCodeResponse(
|
|
614
|
+
reject,
|
|
615
|
+
error.response,
|
|
616
|
+
403,
|
|
617
|
+
"ErrorResult",
|
|
618
|
+
)) {
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
reject(error);
|
|
624
|
+
});
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
*
|
|
630
|
+
* @summary Change recipient details of a document.
|
|
631
|
+
* @param documentId The documentID details.
|
|
632
|
+
* @param changeRecipient The new recipient details.
|
|
633
|
+
* @param options
|
|
634
|
+
*/
|
|
635
|
+
public async changeRecipient (documentId: string, changeRecipient: ChangeRecipient, options: optionsI = {headers: {}}) : Promise<returnTypeT<ErrorResult>> {
|
|
636
|
+
changeRecipient = deserializeIfNeeded(changeRecipient, "ChangeRecipient");
|
|
637
|
+
const localVarPath = this.basePath + '/v1/document/changeRecipient';
|
|
638
|
+
let localVarQueryParameters: any = {};
|
|
639
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
640
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
641
|
+
// give precedence to 'application/json'
|
|
642
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
643
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
644
|
+
} else {
|
|
645
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
646
|
+
}
|
|
647
|
+
let localVarFormParams: any = {};
|
|
648
|
+
let localVarBodyParams: any = undefined;
|
|
649
|
+
|
|
650
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
651
|
+
if (documentId === null || documentId === undefined) {
|
|
652
|
+
throw new Error('Required parameter documentId was null or undefined when calling changeRecipient.');
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
// verify required parameter 'changeRecipient' is not null or undefined
|
|
656
|
+
if (changeRecipient === null || changeRecipient === undefined) {
|
|
657
|
+
throw new Error('Required parameter changeRecipient was null or undefined when calling changeRecipient.');
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
if (documentId !== undefined) {
|
|
661
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
665
|
+
|
|
666
|
+
let localVarUseFormData = false;
|
|
667
|
+
|
|
668
|
+
const result = generateFormData(changeRecipient, ChangeRecipient);
|
|
669
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
670
|
+
|
|
671
|
+
let data = {};
|
|
672
|
+
if (localVarUseFormData) {
|
|
673
|
+
const formData = toFormData(result.data);
|
|
674
|
+
data = formData;
|
|
675
|
+
localVarHeaderParams = {
|
|
676
|
+
...localVarHeaderParams,
|
|
677
|
+
...formData.getHeaders(),
|
|
678
|
+
};
|
|
679
|
+
} else {
|
|
680
|
+
data = ObjectSerializer.serialize(
|
|
681
|
+
changeRecipient,
|
|
682
|
+
"ChangeRecipient"
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
687
|
+
method: 'PATCH',
|
|
688
|
+
params: localVarQueryParameters,
|
|
689
|
+
headers: localVarHeaderParams,
|
|
690
|
+
url: localVarPath,
|
|
691
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
692
|
+
maxContentLength: Infinity,
|
|
693
|
+
maxBodyLength: Infinity,
|
|
694
|
+
responseType: "json",
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
698
|
+
localVarRequestOptions.data = data;
|
|
699
|
+
}
|
|
700
|
+
let authenticationPromise = Promise.resolve();
|
|
701
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
702
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
703
|
+
}
|
|
704
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
705
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
706
|
+
}
|
|
707
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
708
|
+
|
|
709
|
+
let interceptorPromise = authenticationPromise;
|
|
710
|
+
for (const interceptor of this.interceptors) {
|
|
711
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
return interceptorPromise.then(() => {
|
|
715
|
+
return new Promise<returnTypeT<ErrorResult>>((resolve, reject) => {
|
|
716
|
+
axios.request(localVarRequestOptions)
|
|
717
|
+
.then((response) => {
|
|
718
|
+
handleSuccessfulResponse<ErrorResult>(
|
|
719
|
+
resolve,
|
|
720
|
+
reject,
|
|
721
|
+
response,
|
|
722
|
+
"ErrorResult",
|
|
723
|
+
);
|
|
724
|
+
}, (error: AxiosError) => {
|
|
725
|
+
if (error.response == null) {
|
|
726
|
+
reject(error);
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
if (handleErrorCodeResponse(
|
|
731
|
+
reject,
|
|
732
|
+
error.response,
|
|
733
|
+
401,
|
|
734
|
+
"ErrorResult",
|
|
735
|
+
)) {
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (handleErrorCodeResponse(
|
|
739
|
+
reject,
|
|
740
|
+
error.response,
|
|
741
|
+
200,
|
|
742
|
+
"ErrorResult",
|
|
743
|
+
)) {
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
reject(error);
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
*
|
|
755
|
+
* @summary Generates a send URL which embeds document sending process into your application.
|
|
756
|
+
* @param embeddedDocumentRequest The embedded send document request body.
|
|
757
|
+
* @param options
|
|
758
|
+
*/
|
|
759
|
+
public async createEmbeddedRequestUrlDocument (embeddedDocumentRequest?: EmbeddedDocumentRequest, options: optionsI = {headers: {}}) : Promise<returnTypeT<EmbeddedSendCreated>> {
|
|
760
|
+
embeddedDocumentRequest = deserializeIfNeeded(embeddedDocumentRequest, "EmbeddedDocumentRequest");
|
|
761
|
+
const localVarPath = this.basePath + '/v1/document/createEmbeddedRequestUrl';
|
|
762
|
+
let localVarQueryParameters: any = {};
|
|
763
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
764
|
+
const produces = ['application/json'];
|
|
765
|
+
// give precedence to 'application/json'
|
|
766
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
767
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
768
|
+
} else {
|
|
769
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
770
|
+
}
|
|
771
|
+
let localVarFormParams: any = {};
|
|
772
|
+
let localVarBodyParams: any = undefined;
|
|
773
|
+
|
|
774
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
775
|
+
|
|
776
|
+
let localVarUseFormData = false;
|
|
777
|
+
|
|
778
|
+
const result = generateFormData(embeddedDocumentRequest, EmbeddedDocumentRequest);
|
|
779
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
780
|
+
|
|
781
|
+
let data = {};
|
|
782
|
+
if (localVarUseFormData) {
|
|
783
|
+
const formData = toFormData(result.data);
|
|
784
|
+
data = formData;
|
|
785
|
+
localVarHeaderParams = {
|
|
786
|
+
...localVarHeaderParams,
|
|
787
|
+
...formData.getHeaders(),
|
|
788
|
+
};
|
|
789
|
+
} else {
|
|
790
|
+
data = ObjectSerializer.serialize(
|
|
791
|
+
embeddedDocumentRequest,
|
|
792
|
+
"EmbeddedDocumentRequest"
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
797
|
+
method: 'POST',
|
|
798
|
+
params: localVarQueryParameters,
|
|
799
|
+
headers: localVarHeaderParams,
|
|
800
|
+
url: localVarPath,
|
|
801
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
802
|
+
maxContentLength: Infinity,
|
|
803
|
+
maxBodyLength: Infinity,
|
|
804
|
+
responseType: "json",
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
808
|
+
localVarRequestOptions.data = data;
|
|
809
|
+
}
|
|
810
|
+
let authenticationPromise = Promise.resolve();
|
|
811
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
812
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
813
|
+
}
|
|
814
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
815
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
816
|
+
}
|
|
817
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
818
|
+
|
|
819
|
+
let interceptorPromise = authenticationPromise;
|
|
820
|
+
for (const interceptor of this.interceptors) {
|
|
821
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
return interceptorPromise.then(() => {
|
|
825
|
+
return new Promise<returnTypeT<EmbeddedSendCreated>>((resolve, reject) => {
|
|
826
|
+
axios.request(localVarRequestOptions)
|
|
827
|
+
.then((response) => {
|
|
828
|
+
handleSuccessfulResponse<EmbeddedSendCreated>(
|
|
829
|
+
resolve,
|
|
830
|
+
reject,
|
|
831
|
+
response,
|
|
832
|
+
"EmbeddedSendCreated",
|
|
833
|
+
);
|
|
834
|
+
}, (error: AxiosError) => {
|
|
835
|
+
if (error.response == null) {
|
|
836
|
+
reject(error);
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
if (handleErrorCodeResponse(
|
|
841
|
+
reject,
|
|
842
|
+
error.response,
|
|
843
|
+
201,
|
|
844
|
+
"EmbeddedSendCreated",
|
|
845
|
+
)) {
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
if (handleErrorCodeResponse(
|
|
849
|
+
reject,
|
|
850
|
+
error.response,
|
|
851
|
+
401,
|
|
852
|
+
"ErrorResult",
|
|
853
|
+
)) {
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
856
|
+
if (handleErrorCodeResponse(
|
|
857
|
+
reject,
|
|
858
|
+
error.response,
|
|
859
|
+
403,
|
|
860
|
+
"ErrorResult",
|
|
861
|
+
)) {
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
reject(error);
|
|
867
|
+
});
|
|
868
|
+
});
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
*
|
|
873
|
+
* @summary Delete the document.
|
|
874
|
+
* @param documentId Document Id.
|
|
875
|
+
* @param deletePermanently Delete Permanently.
|
|
876
|
+
* @param options
|
|
877
|
+
*/
|
|
878
|
+
public async deleteDocument (documentId: string, deletePermanently?: boolean, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
879
|
+
const localVarPath = this.basePath + '/v1/document/delete';
|
|
880
|
+
let localVarQueryParameters: any = {};
|
|
881
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
882
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
883
|
+
// give precedence to 'application/json'
|
|
884
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
885
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
886
|
+
} else {
|
|
887
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
888
|
+
}
|
|
889
|
+
let localVarFormParams: any = {};
|
|
890
|
+
let localVarBodyParams: any = undefined;
|
|
891
|
+
|
|
892
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
893
|
+
if (documentId === null || documentId === undefined) {
|
|
894
|
+
throw new Error('Required parameter documentId was null or undefined when calling deleteDocument.');
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
if (documentId !== undefined) {
|
|
898
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
if (deletePermanently !== undefined) {
|
|
902
|
+
localVarQueryParameters['deletePermanently'] = ObjectSerializer.serialize(deletePermanently, "boolean");
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
906
|
+
|
|
907
|
+
let localVarUseFormData = false;
|
|
908
|
+
|
|
909
|
+
let data = {};
|
|
910
|
+
if (localVarUseFormData) {
|
|
911
|
+
const formData = toFormData(localVarFormParams);
|
|
912
|
+
data = formData;
|
|
913
|
+
localVarHeaderParams = {
|
|
914
|
+
...localVarHeaderParams,
|
|
915
|
+
...formData.getHeaders(),
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
920
|
+
method: 'DELETE',
|
|
921
|
+
params: localVarQueryParameters,
|
|
922
|
+
headers: localVarHeaderParams,
|
|
923
|
+
url: localVarPath,
|
|
924
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
925
|
+
maxContentLength: Infinity,
|
|
926
|
+
maxBodyLength: Infinity,
|
|
927
|
+
responseType: "json",
|
|
928
|
+
};
|
|
929
|
+
|
|
930
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
931
|
+
localVarRequestOptions.data = data;
|
|
932
|
+
}
|
|
933
|
+
let authenticationPromise = Promise.resolve();
|
|
934
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
935
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
936
|
+
}
|
|
937
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
938
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
939
|
+
}
|
|
940
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
941
|
+
|
|
942
|
+
let interceptorPromise = authenticationPromise;
|
|
943
|
+
for (const interceptor of this.interceptors) {
|
|
944
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
return interceptorPromise.then(() => {
|
|
948
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
949
|
+
axios.request(localVarRequestOptions)
|
|
950
|
+
.then((response) => {
|
|
951
|
+
handleSuccessfulResponse(
|
|
952
|
+
resolve,
|
|
953
|
+
reject,
|
|
954
|
+
response,
|
|
955
|
+
|
|
956
|
+
);
|
|
957
|
+
}, (error: AxiosError) => {
|
|
958
|
+
if (error.response == null) {
|
|
959
|
+
reject(error);
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
if (handleErrorCodeResponse(
|
|
964
|
+
reject,
|
|
965
|
+
error.response,
|
|
966
|
+
401,
|
|
967
|
+
"ErrorResult",
|
|
968
|
+
)) {
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
if (handleErrorCodeResponse(
|
|
972
|
+
reject,
|
|
973
|
+
error.response,
|
|
974
|
+
403,
|
|
975
|
+
"ErrorResult",
|
|
976
|
+
)) {
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
reject(error);
|
|
982
|
+
});
|
|
983
|
+
});
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
*
|
|
988
|
+
* @summary Delete the Tags in Documents.
|
|
989
|
+
* @param documentTags Contains DocumentId and LabelNames for Adding Tags.
|
|
990
|
+
* @param options
|
|
991
|
+
*/
|
|
992
|
+
public async deleteTag (documentTags?: DocumentTags, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
993
|
+
documentTags = deserializeIfNeeded(documentTags, "DocumentTags");
|
|
994
|
+
const localVarPath = this.basePath + '/v1/document/deleteTags';
|
|
995
|
+
let localVarQueryParameters: any = {};
|
|
996
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
997
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
998
|
+
// give precedence to 'application/json'
|
|
999
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1000
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1001
|
+
} else {
|
|
1002
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1003
|
+
}
|
|
1004
|
+
let localVarFormParams: any = {};
|
|
1005
|
+
let localVarBodyParams: any = undefined;
|
|
1006
|
+
|
|
1007
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1008
|
+
|
|
1009
|
+
let localVarUseFormData = false;
|
|
1010
|
+
|
|
1011
|
+
const result = generateFormData(documentTags, DocumentTags);
|
|
1012
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
1013
|
+
|
|
1014
|
+
let data = {};
|
|
1015
|
+
if (localVarUseFormData) {
|
|
1016
|
+
const formData = toFormData(result.data);
|
|
1017
|
+
data = formData;
|
|
1018
|
+
localVarHeaderParams = {
|
|
1019
|
+
...localVarHeaderParams,
|
|
1020
|
+
...formData.getHeaders(),
|
|
1021
|
+
};
|
|
1022
|
+
} else {
|
|
1023
|
+
data = ObjectSerializer.serialize(
|
|
1024
|
+
documentTags,
|
|
1025
|
+
"DocumentTags"
|
|
1026
|
+
);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1030
|
+
method: 'DELETE',
|
|
1031
|
+
params: localVarQueryParameters,
|
|
1032
|
+
headers: localVarHeaderParams,
|
|
1033
|
+
url: localVarPath,
|
|
1034
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1035
|
+
maxContentLength: Infinity,
|
|
1036
|
+
maxBodyLength: Infinity,
|
|
1037
|
+
responseType: "json",
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1041
|
+
localVarRequestOptions.data = data;
|
|
1042
|
+
}
|
|
1043
|
+
let authenticationPromise = Promise.resolve();
|
|
1044
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1045
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1046
|
+
}
|
|
1047
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1048
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1049
|
+
}
|
|
1050
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1051
|
+
|
|
1052
|
+
let interceptorPromise = authenticationPromise;
|
|
1053
|
+
for (const interceptor of this.interceptors) {
|
|
1054
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
return interceptorPromise.then(() => {
|
|
1058
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
1059
|
+
axios.request(localVarRequestOptions)
|
|
1060
|
+
.then((response) => {
|
|
1061
|
+
handleSuccessfulResponse(
|
|
1062
|
+
resolve,
|
|
1063
|
+
reject,
|
|
1064
|
+
response,
|
|
1065
|
+
|
|
1066
|
+
);
|
|
1067
|
+
}, (error: AxiosError) => {
|
|
1068
|
+
if (error.response == null) {
|
|
1069
|
+
reject(error);
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
if (handleErrorCodeResponse(
|
|
1074
|
+
reject,
|
|
1075
|
+
error.response,
|
|
1076
|
+
401,
|
|
1077
|
+
"ErrorResult",
|
|
1078
|
+
)) {
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
if (handleErrorCodeResponse(
|
|
1082
|
+
reject,
|
|
1083
|
+
error.response,
|
|
1084
|
+
400,
|
|
1085
|
+
"ErrorResult",
|
|
1086
|
+
)) {
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
reject(error);
|
|
1092
|
+
});
|
|
1093
|
+
});
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
*
|
|
1098
|
+
* @summary Download the Attachment.
|
|
1099
|
+
* @param documentId Document Id.
|
|
1100
|
+
* @param attachmentId Attachment Id(Get attachment ID from Properties API).
|
|
1101
|
+
* @param onBehalfOf The on behalfof email address.
|
|
1102
|
+
* @param options
|
|
1103
|
+
*/
|
|
1104
|
+
public async downloadAttachment (documentId: string, attachmentId: string, onBehalfOf?: string, options: optionsI = {headers: {}}) : Promise<returnTypeT<Buffer>> {
|
|
1105
|
+
const localVarPath = this.basePath + '/v1/document/downloadAttachment';
|
|
1106
|
+
let localVarQueryParameters: any = {};
|
|
1107
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1108
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
1109
|
+
// give precedence to 'application/json'
|
|
1110
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1111
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1112
|
+
} else {
|
|
1113
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1114
|
+
}
|
|
1115
|
+
let localVarFormParams: any = {};
|
|
1116
|
+
let localVarBodyParams: any = undefined;
|
|
1117
|
+
|
|
1118
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1119
|
+
if (documentId === null || documentId === undefined) {
|
|
1120
|
+
throw new Error('Required parameter documentId was null or undefined when calling downloadAttachment.');
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
// verify required parameter 'attachmentId' is not null or undefined
|
|
1124
|
+
if (attachmentId === null || attachmentId === undefined) {
|
|
1125
|
+
throw new Error('Required parameter attachmentId was null or undefined when calling downloadAttachment.');
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
if (documentId !== undefined) {
|
|
1129
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
if (attachmentId !== undefined) {
|
|
1133
|
+
localVarQueryParameters['attachmentId'] = ObjectSerializer.serialize(attachmentId, "string");
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
if (onBehalfOf !== undefined) {
|
|
1137
|
+
localVarQueryParameters['onBehalfOf'] = ObjectSerializer.serialize(onBehalfOf, "string");
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1141
|
+
|
|
1142
|
+
let localVarUseFormData = false;
|
|
1143
|
+
|
|
1144
|
+
let data = {};
|
|
1145
|
+
if (localVarUseFormData) {
|
|
1146
|
+
const formData = toFormData(localVarFormParams);
|
|
1147
|
+
data = formData;
|
|
1148
|
+
localVarHeaderParams = {
|
|
1149
|
+
...localVarHeaderParams,
|
|
1150
|
+
...formData.getHeaders(),
|
|
1151
|
+
};
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1155
|
+
method: 'GET',
|
|
1156
|
+
params: localVarQueryParameters,
|
|
1157
|
+
headers: localVarHeaderParams,
|
|
1158
|
+
url: localVarPath,
|
|
1159
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1160
|
+
maxContentLength: Infinity,
|
|
1161
|
+
maxBodyLength: Infinity,
|
|
1162
|
+
responseType: "arraybuffer",
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1166
|
+
localVarRequestOptions.data = data;
|
|
1167
|
+
}
|
|
1168
|
+
let authenticationPromise = Promise.resolve();
|
|
1169
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1170
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1171
|
+
}
|
|
1172
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1173
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1174
|
+
}
|
|
1175
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1176
|
+
|
|
1177
|
+
let interceptorPromise = authenticationPromise;
|
|
1178
|
+
for (const interceptor of this.interceptors) {
|
|
1179
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
return interceptorPromise.then(() => {
|
|
1183
|
+
return new Promise<returnTypeT<Buffer>>((resolve, reject) => {
|
|
1184
|
+
axios.request(localVarRequestOptions)
|
|
1185
|
+
.then((response) => {
|
|
1186
|
+
handleSuccessfulResponse<Buffer>(
|
|
1187
|
+
resolve,
|
|
1188
|
+
reject,
|
|
1189
|
+
response,
|
|
1190
|
+
"Buffer",
|
|
1191
|
+
);
|
|
1192
|
+
}, (error: AxiosError) => {
|
|
1193
|
+
if (error.response == null) {
|
|
1194
|
+
reject(error);
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
if (handleErrorCodeResponse(
|
|
1199
|
+
reject,
|
|
1200
|
+
error.response,
|
|
1201
|
+
200,
|
|
1202
|
+
"RequestFile",
|
|
1203
|
+
)) {
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
if (handleErrorCodeResponse(
|
|
1207
|
+
reject,
|
|
1208
|
+
error.response,
|
|
1209
|
+
401,
|
|
1210
|
+
"ErrorResult",
|
|
1211
|
+
)) {
|
|
1212
|
+
return;
|
|
1213
|
+
}
|
|
1214
|
+
if (handleErrorCodeResponse(
|
|
1215
|
+
reject,
|
|
1216
|
+
error.response,
|
|
1217
|
+
403,
|
|
1218
|
+
"ErrorResult",
|
|
1219
|
+
)) {
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
reject(error);
|
|
1225
|
+
});
|
|
1226
|
+
});
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
*
|
|
1231
|
+
* @summary Download the audit trail document.
|
|
1232
|
+
* @param documentId Document Id.
|
|
1233
|
+
* @param onBehalfOf The on behalfof email address.
|
|
1234
|
+
* @param options
|
|
1235
|
+
*/
|
|
1236
|
+
public async downloadAuditLog (documentId: string, onBehalfOf?: string, options: optionsI = {headers: {}}) : Promise<returnTypeT<Buffer>> {
|
|
1237
|
+
const localVarPath = this.basePath + '/v1/document/downloadAuditLog';
|
|
1238
|
+
let localVarQueryParameters: any = {};
|
|
1239
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1240
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
1241
|
+
// give precedence to 'application/json'
|
|
1242
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1243
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1244
|
+
} else {
|
|
1245
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1246
|
+
}
|
|
1247
|
+
let localVarFormParams: any = {};
|
|
1248
|
+
let localVarBodyParams: any = undefined;
|
|
1249
|
+
|
|
1250
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1251
|
+
if (documentId === null || documentId === undefined) {
|
|
1252
|
+
throw new Error('Required parameter documentId was null or undefined when calling downloadAuditLog.');
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
if (documentId !== undefined) {
|
|
1256
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
if (onBehalfOf !== undefined) {
|
|
1260
|
+
localVarQueryParameters['onBehalfOf'] = ObjectSerializer.serialize(onBehalfOf, "string");
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1264
|
+
|
|
1265
|
+
let localVarUseFormData = false;
|
|
1266
|
+
|
|
1267
|
+
let data = {};
|
|
1268
|
+
if (localVarUseFormData) {
|
|
1269
|
+
const formData = toFormData(localVarFormParams);
|
|
1270
|
+
data = formData;
|
|
1271
|
+
localVarHeaderParams = {
|
|
1272
|
+
...localVarHeaderParams,
|
|
1273
|
+
...formData.getHeaders(),
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1278
|
+
method: 'GET',
|
|
1279
|
+
params: localVarQueryParameters,
|
|
1280
|
+
headers: localVarHeaderParams,
|
|
1281
|
+
url: localVarPath,
|
|
1282
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1283
|
+
maxContentLength: Infinity,
|
|
1284
|
+
maxBodyLength: Infinity,
|
|
1285
|
+
responseType: "arraybuffer",
|
|
1286
|
+
};
|
|
1287
|
+
|
|
1288
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1289
|
+
localVarRequestOptions.data = data;
|
|
1290
|
+
}
|
|
1291
|
+
let authenticationPromise = Promise.resolve();
|
|
1292
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1293
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1294
|
+
}
|
|
1295
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1296
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1297
|
+
}
|
|
1298
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1299
|
+
|
|
1300
|
+
let interceptorPromise = authenticationPromise;
|
|
1301
|
+
for (const interceptor of this.interceptors) {
|
|
1302
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
return interceptorPromise.then(() => {
|
|
1306
|
+
return new Promise<returnTypeT<Buffer>>((resolve, reject) => {
|
|
1307
|
+
axios.request(localVarRequestOptions)
|
|
1308
|
+
.then((response) => {
|
|
1309
|
+
handleSuccessfulResponse<Buffer>(
|
|
1310
|
+
resolve,
|
|
1311
|
+
reject,
|
|
1312
|
+
response,
|
|
1313
|
+
"Buffer",
|
|
1314
|
+
);
|
|
1315
|
+
}, (error: AxiosError) => {
|
|
1316
|
+
if (error.response == null) {
|
|
1317
|
+
reject(error);
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
if (handleErrorCodeResponse(
|
|
1322
|
+
reject,
|
|
1323
|
+
error.response,
|
|
1324
|
+
200,
|
|
1325
|
+
"RequestFile",
|
|
1326
|
+
)) {
|
|
1327
|
+
return;
|
|
1328
|
+
}
|
|
1329
|
+
if (handleErrorCodeResponse(
|
|
1330
|
+
reject,
|
|
1331
|
+
error.response,
|
|
1332
|
+
401,
|
|
1333
|
+
"ErrorResult",
|
|
1334
|
+
)) {
|
|
1335
|
+
return;
|
|
1336
|
+
}
|
|
1337
|
+
if (handleErrorCodeResponse(
|
|
1338
|
+
reject,
|
|
1339
|
+
error.response,
|
|
1340
|
+
403,
|
|
1341
|
+
"ErrorResult",
|
|
1342
|
+
)) {
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
reject(error);
|
|
1348
|
+
});
|
|
1349
|
+
});
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
*
|
|
1354
|
+
* @summary Download the document.
|
|
1355
|
+
* @param documentId Document Id.
|
|
1356
|
+
* @param onBehalfOf The on behalfof email address.
|
|
1357
|
+
* @param options
|
|
1358
|
+
*/
|
|
1359
|
+
public async downloadDocument (documentId: string, onBehalfOf?: string, options: optionsI = {headers: {}}) : Promise<returnTypeT<Buffer>> {
|
|
1360
|
+
const localVarPath = this.basePath + '/v1/document/download';
|
|
1361
|
+
let localVarQueryParameters: any = {};
|
|
1362
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1363
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
1364
|
+
// give precedence to 'application/json'
|
|
1365
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1366
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1367
|
+
} else {
|
|
1368
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1369
|
+
}
|
|
1370
|
+
let localVarFormParams: any = {};
|
|
1371
|
+
let localVarBodyParams: any = undefined;
|
|
1372
|
+
|
|
1373
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1374
|
+
if (documentId === null || documentId === undefined) {
|
|
1375
|
+
throw new Error('Required parameter documentId was null or undefined when calling downloadDocument.');
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
if (documentId !== undefined) {
|
|
1379
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
if (onBehalfOf !== undefined) {
|
|
1383
|
+
localVarQueryParameters['onBehalfOf'] = ObjectSerializer.serialize(onBehalfOf, "string");
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1387
|
+
|
|
1388
|
+
let localVarUseFormData = false;
|
|
1389
|
+
|
|
1390
|
+
let data = {};
|
|
1391
|
+
if (localVarUseFormData) {
|
|
1392
|
+
const formData = toFormData(localVarFormParams);
|
|
1393
|
+
data = formData;
|
|
1394
|
+
localVarHeaderParams = {
|
|
1395
|
+
...localVarHeaderParams,
|
|
1396
|
+
...formData.getHeaders(),
|
|
1397
|
+
};
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1401
|
+
method: 'GET',
|
|
1402
|
+
params: localVarQueryParameters,
|
|
1403
|
+
headers: localVarHeaderParams,
|
|
1404
|
+
url: localVarPath,
|
|
1405
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1406
|
+
maxContentLength: Infinity,
|
|
1407
|
+
maxBodyLength: Infinity,
|
|
1408
|
+
responseType: "arraybuffer",
|
|
1409
|
+
};
|
|
1410
|
+
|
|
1411
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1412
|
+
localVarRequestOptions.data = data;
|
|
1413
|
+
}
|
|
1414
|
+
let authenticationPromise = Promise.resolve();
|
|
1415
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1416
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1417
|
+
}
|
|
1418
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1419
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1420
|
+
}
|
|
1421
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1422
|
+
|
|
1423
|
+
let interceptorPromise = authenticationPromise;
|
|
1424
|
+
for (const interceptor of this.interceptors) {
|
|
1425
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
return interceptorPromise.then(() => {
|
|
1429
|
+
return new Promise<returnTypeT<Buffer>>((resolve, reject) => {
|
|
1430
|
+
axios.request(localVarRequestOptions)
|
|
1431
|
+
.then((response) => {
|
|
1432
|
+
handleSuccessfulResponse<Buffer>(
|
|
1433
|
+
resolve,
|
|
1434
|
+
reject,
|
|
1435
|
+
response,
|
|
1436
|
+
"Buffer",
|
|
1437
|
+
);
|
|
1438
|
+
}, (error: AxiosError) => {
|
|
1439
|
+
if (error.response == null) {
|
|
1440
|
+
reject(error);
|
|
1441
|
+
return;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
if (handleErrorCodeResponse(
|
|
1445
|
+
reject,
|
|
1446
|
+
error.response,
|
|
1447
|
+
200,
|
|
1448
|
+
"RequestFile",
|
|
1449
|
+
)) {
|
|
1450
|
+
return;
|
|
1451
|
+
}
|
|
1452
|
+
if (handleErrorCodeResponse(
|
|
1453
|
+
reject,
|
|
1454
|
+
error.response,
|
|
1455
|
+
401,
|
|
1456
|
+
"ErrorResult",
|
|
1457
|
+
)) {
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
if (handleErrorCodeResponse(
|
|
1461
|
+
reject,
|
|
1462
|
+
error.response,
|
|
1463
|
+
403,
|
|
1464
|
+
"ErrorResult",
|
|
1465
|
+
)) {
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
reject(error);
|
|
1471
|
+
});
|
|
1472
|
+
});
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
*
|
|
1477
|
+
* @summary Extends the expiration date of the document.
|
|
1478
|
+
* @param documentId Document Id.
|
|
1479
|
+
* @param extendExpiry The new expiry value should be specified in yyyy-MM-dd format for days type, ISO date time format for specific date time and integer for hours type.
|
|
1480
|
+
* @param options
|
|
1481
|
+
*/
|
|
1482
|
+
public async extendExpiry (documentId: string, extendExpiry?: ExtendExpiry, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
1483
|
+
extendExpiry = deserializeIfNeeded(extendExpiry, "ExtendExpiry");
|
|
1484
|
+
const localVarPath = this.basePath + '/v1/document/extendExpiry';
|
|
1485
|
+
let localVarQueryParameters: any = {};
|
|
1486
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1487
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
1488
|
+
// give precedence to 'application/json'
|
|
1489
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1490
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1491
|
+
} else {
|
|
1492
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1493
|
+
}
|
|
1494
|
+
let localVarFormParams: any = {};
|
|
1495
|
+
let localVarBodyParams: any = undefined;
|
|
1496
|
+
|
|
1497
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1498
|
+
if (documentId === null || documentId === undefined) {
|
|
1499
|
+
throw new Error('Required parameter documentId was null or undefined when calling extendExpiry.');
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
if (documentId !== undefined) {
|
|
1503
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1507
|
+
|
|
1508
|
+
let localVarUseFormData = false;
|
|
1509
|
+
|
|
1510
|
+
const result = generateFormData(extendExpiry, ExtendExpiry);
|
|
1511
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
1512
|
+
|
|
1513
|
+
let data = {};
|
|
1514
|
+
if (localVarUseFormData) {
|
|
1515
|
+
const formData = toFormData(result.data);
|
|
1516
|
+
data = formData;
|
|
1517
|
+
localVarHeaderParams = {
|
|
1518
|
+
...localVarHeaderParams,
|
|
1519
|
+
...formData.getHeaders(),
|
|
1520
|
+
};
|
|
1521
|
+
} else {
|
|
1522
|
+
data = ObjectSerializer.serialize(
|
|
1523
|
+
extendExpiry,
|
|
1524
|
+
"ExtendExpiry"
|
|
1525
|
+
);
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1529
|
+
method: 'PATCH',
|
|
1530
|
+
params: localVarQueryParameters,
|
|
1531
|
+
headers: localVarHeaderParams,
|
|
1532
|
+
url: localVarPath,
|
|
1533
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1534
|
+
maxContentLength: Infinity,
|
|
1535
|
+
maxBodyLength: Infinity,
|
|
1536
|
+
responseType: "json",
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1539
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1540
|
+
localVarRequestOptions.data = data;
|
|
1541
|
+
}
|
|
1542
|
+
let authenticationPromise = Promise.resolve();
|
|
1543
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1544
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1545
|
+
}
|
|
1546
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1547
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1548
|
+
}
|
|
1549
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1550
|
+
|
|
1551
|
+
let interceptorPromise = authenticationPromise;
|
|
1552
|
+
for (const interceptor of this.interceptors) {
|
|
1553
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
return interceptorPromise.then(() => {
|
|
1557
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
1558
|
+
axios.request(localVarRequestOptions)
|
|
1559
|
+
.then((response) => {
|
|
1560
|
+
handleSuccessfulResponse(
|
|
1561
|
+
resolve,
|
|
1562
|
+
reject,
|
|
1563
|
+
response,
|
|
1564
|
+
|
|
1565
|
+
);
|
|
1566
|
+
}, (error: AxiosError) => {
|
|
1567
|
+
if (error.response == null) {
|
|
1568
|
+
reject(error);
|
|
1569
|
+
return;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
if (handleErrorCodeResponse(
|
|
1573
|
+
reject,
|
|
1574
|
+
error.response,
|
|
1575
|
+
401,
|
|
1576
|
+
"ErrorResult",
|
|
1577
|
+
)) {
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
if (handleErrorCodeResponse(
|
|
1581
|
+
reject,
|
|
1582
|
+
error.response,
|
|
1583
|
+
403,
|
|
1584
|
+
"ErrorResult",
|
|
1585
|
+
)) {
|
|
1586
|
+
return;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
reject(error);
|
|
1591
|
+
});
|
|
1592
|
+
});
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
*
|
|
1597
|
+
* @summary Get sign link for Embedded Sign.
|
|
1598
|
+
* @param documentId
|
|
1599
|
+
* @param signerEmail
|
|
1600
|
+
* @param countryCode
|
|
1601
|
+
* @param phoneNumber
|
|
1602
|
+
* @param signLinkValidTill
|
|
1603
|
+
* @param redirectUrl
|
|
1604
|
+
* @param options
|
|
1605
|
+
*/
|
|
1606
|
+
public async getEmbeddedSignLink (documentId: string, signerEmail?: string, countryCode?: string, phoneNumber?: string, signLinkValidTill?: Date, redirectUrl?: string, options: optionsI = {headers: {}}) : Promise<returnTypeT<EmbeddedSigningLink>> {
|
|
1607
|
+
const localVarPath = this.basePath + '/v1/document/getEmbeddedSignLink';
|
|
1608
|
+
let localVarQueryParameters: any = {};
|
|
1609
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1610
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
1611
|
+
// give precedence to 'application/json'
|
|
1612
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1613
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1614
|
+
} else {
|
|
1615
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1616
|
+
}
|
|
1617
|
+
let localVarFormParams: any = {};
|
|
1618
|
+
let localVarBodyParams: any = undefined;
|
|
1619
|
+
|
|
1620
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1621
|
+
if (documentId === null || documentId === undefined) {
|
|
1622
|
+
throw new Error('Required parameter documentId was null or undefined when calling getEmbeddedSignLink.');
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
if (documentId !== undefined) {
|
|
1626
|
+
localVarQueryParameters['DocumentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
if (signerEmail !== undefined) {
|
|
1630
|
+
localVarQueryParameters['SignerEmail'] = ObjectSerializer.serialize(signerEmail, "string");
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
if (countryCode !== undefined) {
|
|
1634
|
+
localVarQueryParameters['CountryCode'] = ObjectSerializer.serialize(countryCode, "string");
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
if (phoneNumber !== undefined) {
|
|
1638
|
+
localVarQueryParameters['PhoneNumber'] = ObjectSerializer.serialize(phoneNumber, "string");
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
if (signLinkValidTill !== undefined) {
|
|
1642
|
+
localVarQueryParameters['SignLinkValidTill'] = ObjectSerializer.serialize(signLinkValidTill, "Date");
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
if (redirectUrl !== undefined) {
|
|
1646
|
+
localVarQueryParameters['RedirectUrl'] = ObjectSerializer.serialize(redirectUrl, "string");
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1650
|
+
|
|
1651
|
+
let localVarUseFormData = false;
|
|
1652
|
+
|
|
1653
|
+
let data = {};
|
|
1654
|
+
if (localVarUseFormData) {
|
|
1655
|
+
const formData = toFormData(localVarFormParams);
|
|
1656
|
+
data = formData;
|
|
1657
|
+
localVarHeaderParams = {
|
|
1658
|
+
...localVarHeaderParams,
|
|
1659
|
+
...formData.getHeaders(),
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1664
|
+
method: 'GET',
|
|
1665
|
+
params: localVarQueryParameters,
|
|
1666
|
+
headers: localVarHeaderParams,
|
|
1667
|
+
url: localVarPath,
|
|
1668
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1669
|
+
maxContentLength: Infinity,
|
|
1670
|
+
maxBodyLength: Infinity,
|
|
1671
|
+
responseType: "json",
|
|
1672
|
+
};
|
|
1673
|
+
|
|
1674
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1675
|
+
localVarRequestOptions.data = data;
|
|
1676
|
+
}
|
|
1677
|
+
let authenticationPromise = Promise.resolve();
|
|
1678
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1679
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1680
|
+
}
|
|
1681
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1682
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1683
|
+
}
|
|
1684
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1685
|
+
|
|
1686
|
+
let interceptorPromise = authenticationPromise;
|
|
1687
|
+
for (const interceptor of this.interceptors) {
|
|
1688
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
return interceptorPromise.then(() => {
|
|
1692
|
+
return new Promise<returnTypeT<EmbeddedSigningLink>>((resolve, reject) => {
|
|
1693
|
+
axios.request(localVarRequestOptions)
|
|
1694
|
+
.then((response) => {
|
|
1695
|
+
handleSuccessfulResponse<EmbeddedSigningLink>(
|
|
1696
|
+
resolve,
|
|
1697
|
+
reject,
|
|
1698
|
+
response,
|
|
1699
|
+
"EmbeddedSigningLink",
|
|
1700
|
+
);
|
|
1701
|
+
}, (error: AxiosError) => {
|
|
1702
|
+
if (error.response == null) {
|
|
1703
|
+
reject(error);
|
|
1704
|
+
return;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
if (handleErrorCodeResponse(
|
|
1708
|
+
reject,
|
|
1709
|
+
error.response,
|
|
1710
|
+
200,
|
|
1711
|
+
"EmbeddedSigningLink",
|
|
1712
|
+
)) {
|
|
1713
|
+
return;
|
|
1714
|
+
}
|
|
1715
|
+
if (handleErrorCodeResponse(
|
|
1716
|
+
reject,
|
|
1717
|
+
error.response,
|
|
1718
|
+
401,
|
|
1719
|
+
"ErrorResult",
|
|
1720
|
+
)) {
|
|
1721
|
+
return;
|
|
1722
|
+
}
|
|
1723
|
+
if (handleErrorCodeResponse(
|
|
1724
|
+
reject,
|
|
1725
|
+
error.response,
|
|
1726
|
+
403,
|
|
1727
|
+
"ErrorResult",
|
|
1728
|
+
)) {
|
|
1729
|
+
return;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
|
|
1733
|
+
reject(error);
|
|
1734
|
+
});
|
|
1735
|
+
});
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
*
|
|
1740
|
+
* @summary Get summary of the document.
|
|
1741
|
+
* @param documentId Document Id.
|
|
1742
|
+
* @param options
|
|
1743
|
+
*/
|
|
1744
|
+
public async getProperties (documentId: string, options: optionsI = {headers: {}}) : Promise<returnTypeT<DocumentProperties>> {
|
|
1745
|
+
const localVarPath = this.basePath + '/v1/document/properties';
|
|
1746
|
+
let localVarQueryParameters: any = {};
|
|
1747
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1748
|
+
const produces = ['application/json'];
|
|
1749
|
+
// give precedence to 'application/json'
|
|
1750
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1751
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1752
|
+
} else {
|
|
1753
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1754
|
+
}
|
|
1755
|
+
let localVarFormParams: any = {};
|
|
1756
|
+
let localVarBodyParams: any = undefined;
|
|
1757
|
+
|
|
1758
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1759
|
+
if (documentId === null || documentId === undefined) {
|
|
1760
|
+
throw new Error('Required parameter documentId was null or undefined when calling getProperties.');
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
if (documentId !== undefined) {
|
|
1764
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1768
|
+
|
|
1769
|
+
let localVarUseFormData = false;
|
|
1770
|
+
|
|
1771
|
+
let data = {};
|
|
1772
|
+
if (localVarUseFormData) {
|
|
1773
|
+
const formData = toFormData(localVarFormParams);
|
|
1774
|
+
data = formData;
|
|
1775
|
+
localVarHeaderParams = {
|
|
1776
|
+
...localVarHeaderParams,
|
|
1777
|
+
...formData.getHeaders(),
|
|
1778
|
+
};
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1782
|
+
method: 'GET',
|
|
1783
|
+
params: localVarQueryParameters,
|
|
1784
|
+
headers: localVarHeaderParams,
|
|
1785
|
+
url: localVarPath,
|
|
1786
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1787
|
+
maxContentLength: Infinity,
|
|
1788
|
+
maxBodyLength: Infinity,
|
|
1789
|
+
responseType: "json",
|
|
1790
|
+
};
|
|
1791
|
+
|
|
1792
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1793
|
+
localVarRequestOptions.data = data;
|
|
1794
|
+
}
|
|
1795
|
+
let authenticationPromise = Promise.resolve();
|
|
1796
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1797
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1798
|
+
}
|
|
1799
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1800
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1801
|
+
}
|
|
1802
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1803
|
+
|
|
1804
|
+
let interceptorPromise = authenticationPromise;
|
|
1805
|
+
for (const interceptor of this.interceptors) {
|
|
1806
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
return interceptorPromise.then(() => {
|
|
1810
|
+
return new Promise<returnTypeT<DocumentProperties>>((resolve, reject) => {
|
|
1811
|
+
axios.request(localVarRequestOptions)
|
|
1812
|
+
.then((response) => {
|
|
1813
|
+
handleSuccessfulResponse<DocumentProperties>(
|
|
1814
|
+
resolve,
|
|
1815
|
+
reject,
|
|
1816
|
+
response,
|
|
1817
|
+
"DocumentProperties",
|
|
1818
|
+
);
|
|
1819
|
+
}, (error: AxiosError) => {
|
|
1820
|
+
if (error.response == null) {
|
|
1821
|
+
reject(error);
|
|
1822
|
+
return;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
if (handleErrorCodeResponse(
|
|
1826
|
+
reject,
|
|
1827
|
+
error.response,
|
|
1828
|
+
200,
|
|
1829
|
+
"DocumentProperties",
|
|
1830
|
+
)) {
|
|
1831
|
+
return;
|
|
1832
|
+
}
|
|
1833
|
+
if (handleErrorCodeResponse(
|
|
1834
|
+
reject,
|
|
1835
|
+
error.response,
|
|
1836
|
+
401,
|
|
1837
|
+
"ErrorResult",
|
|
1838
|
+
)) {
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
if (handleErrorCodeResponse(
|
|
1842
|
+
reject,
|
|
1843
|
+
error.response,
|
|
1844
|
+
403,
|
|
1845
|
+
"ErrorResult",
|
|
1846
|
+
)) {
|
|
1847
|
+
return;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
reject(error);
|
|
1852
|
+
});
|
|
1853
|
+
});
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
*
|
|
1858
|
+
* @summary List user documents.
|
|
1859
|
+
* @param page Page index specified in get document list request.
|
|
1860
|
+
* @param sentBy
|
|
1861
|
+
* @param recipients
|
|
1862
|
+
* @param transmitType
|
|
1863
|
+
* @param pageSize Page size specified in get document list request.
|
|
1864
|
+
* @param startDate Start date of the document
|
|
1865
|
+
* @param status Status of the document such as In-progress, Completed, Decline, Expired, Revoked, Draft.
|
|
1866
|
+
* @param endDate End date of the document
|
|
1867
|
+
* @param searchKey Documents can be listed by the search key present in the document like document title, document ID, sender or recipient(s) name, etc.,
|
|
1868
|
+
* @param labels Labels of the document.
|
|
1869
|
+
* @param nextCursor Next cursor value for pagination, required for fetching the next set of documents beyond 10,000 records.
|
|
1870
|
+
* @param brandIds BrandId(s) of the document.
|
|
1871
|
+
* @param options
|
|
1872
|
+
*/
|
|
1873
|
+
public async listDocuments (page: number, sentBy?: Array<string>, recipients?: Array<string>, transmitType?: 'Sent' | 'Received' | ' Both', pageSize?: number, startDate?: Date, status?: Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft'>, endDate?: Date, searchKey?: string, labels?: Array<string>, nextCursor?: number, brandIds?: Array<string>, options: optionsI = {headers: {}}) : Promise<returnTypeT<DocumentRecords>> {
|
|
1874
|
+
const localVarPath = this.basePath + '/v1/document/list';
|
|
1875
|
+
let localVarQueryParameters: any = {};
|
|
1876
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1877
|
+
const produces = ['application/json'];
|
|
1878
|
+
// give precedence to 'application/json'
|
|
1879
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1880
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1881
|
+
} else {
|
|
1882
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1883
|
+
}
|
|
1884
|
+
let localVarFormParams: any = {};
|
|
1885
|
+
let localVarBodyParams: any = undefined;
|
|
1886
|
+
|
|
1887
|
+
// verify required parameter 'page' is not null or undefined
|
|
1888
|
+
if (page === null || page === undefined) {
|
|
1889
|
+
throw new Error('Required parameter page was null or undefined when calling listDocuments.');
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
if (sentBy !== undefined) {
|
|
1893
|
+
localVarQueryParameters['SentBy'] = ObjectSerializer.serialize(sentBy, "Array<string>");
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
if (recipients !== undefined) {
|
|
1897
|
+
localVarQueryParameters['Recipients'] = ObjectSerializer.serialize(recipients, "Array<string>");
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
if (transmitType !== undefined) {
|
|
1901
|
+
localVarQueryParameters['TransmitType'] = ObjectSerializer.serialize(transmitType, "'Sent' | 'Received' | ' Both'");
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
if (pageSize !== undefined) {
|
|
1905
|
+
localVarQueryParameters['PageSize'] = ObjectSerializer.serialize(pageSize, "number");
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
if (page !== undefined) {
|
|
1909
|
+
localVarQueryParameters['Page'] = ObjectSerializer.serialize(page, "number");
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
if (startDate !== undefined) {
|
|
1913
|
+
localVarQueryParameters['StartDate'] = ObjectSerializer.serialize(startDate, "Date");
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
if (status !== undefined) {
|
|
1917
|
+
localVarQueryParameters['Status'] = ObjectSerializer.serialize(status, "Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft'>");
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
if (endDate !== undefined) {
|
|
1921
|
+
localVarQueryParameters['EndDate'] = ObjectSerializer.serialize(endDate, "Date");
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
if (searchKey !== undefined) {
|
|
1925
|
+
localVarQueryParameters['SearchKey'] = ObjectSerializer.serialize(searchKey, "string");
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
if (labels !== undefined) {
|
|
1929
|
+
localVarQueryParameters['Labels'] = ObjectSerializer.serialize(labels, "Array<string>");
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
if (nextCursor !== undefined) {
|
|
1933
|
+
localVarQueryParameters['NextCursor'] = ObjectSerializer.serialize(nextCursor, "number");
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
if (brandIds !== undefined) {
|
|
1937
|
+
localVarQueryParameters['BrandIds'] = ObjectSerializer.serialize(brandIds, "Array<string>");
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1941
|
+
|
|
1942
|
+
let localVarUseFormData = false;
|
|
1943
|
+
|
|
1944
|
+
let data = {};
|
|
1945
|
+
if (localVarUseFormData) {
|
|
1946
|
+
const formData = toFormData(localVarFormParams);
|
|
1947
|
+
data = formData;
|
|
1948
|
+
localVarHeaderParams = {
|
|
1949
|
+
...localVarHeaderParams,
|
|
1950
|
+
...formData.getHeaders(),
|
|
1951
|
+
};
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1955
|
+
method: 'GET',
|
|
1956
|
+
params: localVarQueryParameters,
|
|
1957
|
+
headers: localVarHeaderParams,
|
|
1958
|
+
url: localVarPath,
|
|
1959
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1960
|
+
maxContentLength: Infinity,
|
|
1961
|
+
maxBodyLength: Infinity,
|
|
1962
|
+
responseType: "json",
|
|
1963
|
+
};
|
|
1964
|
+
|
|
1965
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1966
|
+
localVarRequestOptions.data = data;
|
|
1967
|
+
}
|
|
1968
|
+
let authenticationPromise = Promise.resolve();
|
|
1969
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1970
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1971
|
+
}
|
|
1972
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1973
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1974
|
+
}
|
|
1975
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1976
|
+
|
|
1977
|
+
let interceptorPromise = authenticationPromise;
|
|
1978
|
+
for (const interceptor of this.interceptors) {
|
|
1979
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
return interceptorPromise.then(() => {
|
|
1983
|
+
return new Promise<returnTypeT<DocumentRecords>>((resolve, reject) => {
|
|
1984
|
+
axios.request(localVarRequestOptions)
|
|
1985
|
+
.then((response) => {
|
|
1986
|
+
handleSuccessfulResponse<DocumentRecords>(
|
|
1987
|
+
resolve,
|
|
1988
|
+
reject,
|
|
1989
|
+
response,
|
|
1990
|
+
"DocumentRecords",
|
|
1991
|
+
);
|
|
1992
|
+
}, (error: AxiosError) => {
|
|
1993
|
+
if (error.response == null) {
|
|
1994
|
+
reject(error);
|
|
1995
|
+
return;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
if (handleErrorCodeResponse(
|
|
1999
|
+
reject,
|
|
2000
|
+
error.response,
|
|
2001
|
+
200,
|
|
2002
|
+
"DocumentRecords",
|
|
2003
|
+
)) {
|
|
2004
|
+
return;
|
|
2005
|
+
}
|
|
2006
|
+
if (handleErrorCodeResponse(
|
|
2007
|
+
reject,
|
|
2008
|
+
error.response,
|
|
2009
|
+
401,
|
|
2010
|
+
"ErrorResult",
|
|
2011
|
+
)) {
|
|
2012
|
+
return;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
|
|
2016
|
+
reject(error);
|
|
2017
|
+
});
|
|
2018
|
+
});
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
/**
|
|
2022
|
+
*
|
|
2023
|
+
* @summary Updates the value (prefill) of the fields in the document.
|
|
2024
|
+
* @param documentId The DocumentId.
|
|
2025
|
+
* @param prefillFieldRequest The prefill field request.
|
|
2026
|
+
* @param options
|
|
2027
|
+
*/
|
|
2028
|
+
public async prefillFields (documentId: string, prefillFieldRequest: PrefillFieldRequest, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
2029
|
+
prefillFieldRequest = deserializeIfNeeded(prefillFieldRequest, "PrefillFieldRequest");
|
|
2030
|
+
const localVarPath = this.basePath + '/v1/document/prefillFields';
|
|
2031
|
+
let localVarQueryParameters: any = {};
|
|
2032
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
2033
|
+
const produces = ['application/json'];
|
|
2034
|
+
// give precedence to 'application/json'
|
|
2035
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2036
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
2037
|
+
} else {
|
|
2038
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
2039
|
+
}
|
|
2040
|
+
let localVarFormParams: any = {};
|
|
2041
|
+
let localVarBodyParams: any = undefined;
|
|
2042
|
+
|
|
2043
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
2044
|
+
if (documentId === null || documentId === undefined) {
|
|
2045
|
+
throw new Error('Required parameter documentId was null or undefined when calling prefillFields.');
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
// verify required parameter 'prefillFieldRequest' is not null or undefined
|
|
2049
|
+
if (prefillFieldRequest === null || prefillFieldRequest === undefined) {
|
|
2050
|
+
throw new Error('Required parameter prefillFieldRequest was null or undefined when calling prefillFields.');
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
if (documentId !== undefined) {
|
|
2054
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2058
|
+
|
|
2059
|
+
let localVarUseFormData = false;
|
|
2060
|
+
|
|
2061
|
+
const result = generateFormData(prefillFieldRequest, PrefillFieldRequest);
|
|
2062
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
2063
|
+
|
|
2064
|
+
let data = {};
|
|
2065
|
+
if (localVarUseFormData) {
|
|
2066
|
+
const formData = toFormData(result.data);
|
|
2067
|
+
data = formData;
|
|
2068
|
+
localVarHeaderParams = {
|
|
2069
|
+
...localVarHeaderParams,
|
|
2070
|
+
...formData.getHeaders(),
|
|
2071
|
+
};
|
|
2072
|
+
} else {
|
|
2073
|
+
data = ObjectSerializer.serialize(
|
|
2074
|
+
prefillFieldRequest,
|
|
2075
|
+
"PrefillFieldRequest"
|
|
2076
|
+
);
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
2080
|
+
method: 'PATCH',
|
|
2081
|
+
params: localVarQueryParameters,
|
|
2082
|
+
headers: localVarHeaderParams,
|
|
2083
|
+
url: localVarPath,
|
|
2084
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
2085
|
+
maxContentLength: Infinity,
|
|
2086
|
+
maxBodyLength: Infinity,
|
|
2087
|
+
responseType: "json",
|
|
2088
|
+
};
|
|
2089
|
+
|
|
2090
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
2091
|
+
localVarRequestOptions.data = data;
|
|
2092
|
+
}
|
|
2093
|
+
let authenticationPromise = Promise.resolve();
|
|
2094
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2095
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2096
|
+
}
|
|
2097
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2098
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2099
|
+
}
|
|
2100
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2101
|
+
|
|
2102
|
+
let interceptorPromise = authenticationPromise;
|
|
2103
|
+
for (const interceptor of this.interceptors) {
|
|
2104
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
return interceptorPromise.then(() => {
|
|
2108
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
2109
|
+
axios.request(localVarRequestOptions)
|
|
2110
|
+
.then((response) => {
|
|
2111
|
+
handleSuccessfulResponse(
|
|
2112
|
+
resolve,
|
|
2113
|
+
reject,
|
|
2114
|
+
response,
|
|
2115
|
+
|
|
2116
|
+
);
|
|
2117
|
+
}, (error: AxiosError) => {
|
|
2118
|
+
if (error.response == null) {
|
|
2119
|
+
reject(error);
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
if (handleErrorCodeResponse(
|
|
2124
|
+
reject,
|
|
2125
|
+
error.response,
|
|
2126
|
+
401,
|
|
2127
|
+
"ErrorResult",
|
|
2128
|
+
)) {
|
|
2129
|
+
return;
|
|
2130
|
+
}
|
|
2131
|
+
if (handleErrorCodeResponse(
|
|
2132
|
+
reject,
|
|
2133
|
+
error.response,
|
|
2134
|
+
403,
|
|
2135
|
+
"ErrorResult",
|
|
2136
|
+
)) {
|
|
2137
|
+
return;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
reject(error);
|
|
2142
|
+
});
|
|
2143
|
+
});
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2146
|
+
/**
|
|
2147
|
+
*
|
|
2148
|
+
* @summary Send reminder to pending signers.
|
|
2149
|
+
* @param documentId Document Id.
|
|
2150
|
+
* @param receiverEmails Signer emails.
|
|
2151
|
+
* @param reminderMessage Reminder Message for signers.
|
|
2152
|
+
* @param options
|
|
2153
|
+
*/
|
|
2154
|
+
public async remindDocument (documentId: string, receiverEmails?: Array<string>, reminderMessage?: ReminderMessage, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
2155
|
+
reminderMessage = deserializeIfNeeded(reminderMessage, "ReminderMessage");
|
|
2156
|
+
const localVarPath = this.basePath + '/v1/document/remind';
|
|
2157
|
+
let localVarQueryParameters: any = {};
|
|
2158
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
2159
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
2160
|
+
// give precedence to 'application/json'
|
|
2161
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2162
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
2163
|
+
} else {
|
|
2164
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
2165
|
+
}
|
|
2166
|
+
let localVarFormParams: any = {};
|
|
2167
|
+
let localVarBodyParams: any = undefined;
|
|
2168
|
+
|
|
2169
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
2170
|
+
if (documentId === null || documentId === undefined) {
|
|
2171
|
+
throw new Error('Required parameter documentId was null or undefined when calling remindDocument.');
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
if (documentId !== undefined) {
|
|
2175
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
if (receiverEmails !== undefined) {
|
|
2179
|
+
localVarQueryParameters['receiverEmails'] = ObjectSerializer.serialize(receiverEmails, "Array<string>");
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2183
|
+
|
|
2184
|
+
let localVarUseFormData = false;
|
|
2185
|
+
|
|
2186
|
+
const result = generateFormData(reminderMessage, ReminderMessage);
|
|
2187
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
2188
|
+
|
|
2189
|
+
let data = {};
|
|
2190
|
+
if (localVarUseFormData) {
|
|
2191
|
+
const formData = toFormData(result.data);
|
|
2192
|
+
data = formData;
|
|
2193
|
+
localVarHeaderParams = {
|
|
2194
|
+
...localVarHeaderParams,
|
|
2195
|
+
...formData.getHeaders(),
|
|
2196
|
+
};
|
|
2197
|
+
} else {
|
|
2198
|
+
data = ObjectSerializer.serialize(
|
|
2199
|
+
reminderMessage,
|
|
2200
|
+
"ReminderMessage"
|
|
2201
|
+
);
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
2205
|
+
method: 'POST',
|
|
2206
|
+
params: localVarQueryParameters,
|
|
2207
|
+
headers: localVarHeaderParams,
|
|
2208
|
+
url: localVarPath,
|
|
2209
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
2210
|
+
maxContentLength: Infinity,
|
|
2211
|
+
maxBodyLength: Infinity,
|
|
2212
|
+
responseType: "json",
|
|
2213
|
+
};
|
|
2214
|
+
|
|
2215
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
2216
|
+
localVarRequestOptions.data = data;
|
|
2217
|
+
}
|
|
2218
|
+
let authenticationPromise = Promise.resolve();
|
|
2219
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2220
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2221
|
+
}
|
|
2222
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2223
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2224
|
+
}
|
|
2225
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2226
|
+
|
|
2227
|
+
let interceptorPromise = authenticationPromise;
|
|
2228
|
+
for (const interceptor of this.interceptors) {
|
|
2229
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
return interceptorPromise.then(() => {
|
|
2233
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
2234
|
+
axios.request(localVarRequestOptions)
|
|
2235
|
+
.then((response) => {
|
|
2236
|
+
handleSuccessfulResponse(
|
|
2237
|
+
resolve,
|
|
2238
|
+
reject,
|
|
2239
|
+
response,
|
|
2240
|
+
|
|
2241
|
+
);
|
|
2242
|
+
}, (error: AxiosError) => {
|
|
2243
|
+
if (error.response == null) {
|
|
2244
|
+
reject(error);
|
|
2245
|
+
return;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
if (handleErrorCodeResponse(
|
|
2249
|
+
reject,
|
|
2250
|
+
error.response,
|
|
2251
|
+
401,
|
|
2252
|
+
"ErrorResult",
|
|
2253
|
+
)) {
|
|
2254
|
+
return;
|
|
2255
|
+
}
|
|
2256
|
+
if (handleErrorCodeResponse(
|
|
2257
|
+
reject,
|
|
2258
|
+
error.response,
|
|
2259
|
+
403,
|
|
2260
|
+
"ErrorResult",
|
|
2261
|
+
)) {
|
|
2262
|
+
return;
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
reject(error);
|
|
2267
|
+
});
|
|
2268
|
+
});
|
|
2269
|
+
});
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
*
|
|
2273
|
+
* @summary Remove the access code for the given document signer.
|
|
2274
|
+
* @param documentId Document ID of the signature request
|
|
2275
|
+
* @param removeAuthentication To remove access code.
|
|
2276
|
+
* @param options
|
|
2277
|
+
*/
|
|
2278
|
+
public async removeAuthentication (documentId: string, removeAuthentication?: RemoveAuthentication, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
2279
|
+
removeAuthentication = deserializeIfNeeded(removeAuthentication, "RemoveAuthentication");
|
|
2280
|
+
const localVarPath = this.basePath + '/v1/document/RemoveAuthentication';
|
|
2281
|
+
let localVarQueryParameters: any = {};
|
|
2282
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
2283
|
+
const produces = ['application/json;odata.metadata=minimal;odata.streaming=true', 'application/json;odata.metadata=minimal;odata.streaming=false', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full;odata.streaming=true', 'application/json;odata.metadata=full;odata.streaming=false', 'application/json;odata.metadata=full', 'application/json;odata.metadata=none;odata.streaming=true', 'application/json;odata.metadata=none;odata.streaming=false', 'application/json;odata.metadata=none', 'application/json;odata.streaming=true', 'application/json;odata.streaming=false', 'application/json', 'application/xml', 'application/prs.odatatestxx-odata', 'text/plain', 'text/json'];
|
|
2284
|
+
// give precedence to 'application/json'
|
|
2285
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2286
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
2287
|
+
} else {
|
|
2288
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
2289
|
+
}
|
|
2290
|
+
let localVarFormParams: any = {};
|
|
2291
|
+
let localVarBodyParams: any = undefined;
|
|
2292
|
+
|
|
2293
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
2294
|
+
if (documentId === null || documentId === undefined) {
|
|
2295
|
+
throw new Error('Required parameter documentId was null or undefined when calling removeAuthentication.');
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
if (documentId !== undefined) {
|
|
2299
|
+
localVarQueryParameters['DocumentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2303
|
+
|
|
2304
|
+
let localVarUseFormData = false;
|
|
2305
|
+
|
|
2306
|
+
const result = generateFormData(removeAuthentication, RemoveAuthentication);
|
|
2307
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
2308
|
+
|
|
2309
|
+
let data = {};
|
|
2310
|
+
if (localVarUseFormData) {
|
|
2311
|
+
const formData = toFormData(result.data);
|
|
2312
|
+
data = formData;
|
|
2313
|
+
localVarHeaderParams = {
|
|
2314
|
+
...localVarHeaderParams,
|
|
2315
|
+
...formData.getHeaders(),
|
|
2316
|
+
};
|
|
2317
|
+
} else {
|
|
2318
|
+
data = ObjectSerializer.serialize(
|
|
2319
|
+
removeAuthentication,
|
|
2320
|
+
"RemoveAuthentication"
|
|
2321
|
+
);
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
2325
|
+
method: 'PATCH',
|
|
2326
|
+
params: localVarQueryParameters,
|
|
2327
|
+
headers: localVarHeaderParams,
|
|
2328
|
+
url: localVarPath,
|
|
2329
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
2330
|
+
maxContentLength: Infinity,
|
|
2331
|
+
maxBodyLength: Infinity,
|
|
2332
|
+
responseType: "json",
|
|
2333
|
+
};
|
|
2334
|
+
|
|
2335
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
2336
|
+
localVarRequestOptions.data = data;
|
|
2337
|
+
}
|
|
2338
|
+
let authenticationPromise = Promise.resolve();
|
|
2339
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2340
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2341
|
+
}
|
|
2342
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2343
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2344
|
+
}
|
|
2345
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2346
|
+
|
|
2347
|
+
let interceptorPromise = authenticationPromise;
|
|
2348
|
+
for (const interceptor of this.interceptors) {
|
|
2349
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
return interceptorPromise.then(() => {
|
|
2353
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
2354
|
+
axios.request(localVarRequestOptions)
|
|
2355
|
+
.then((response) => {
|
|
2356
|
+
handleSuccessfulResponse(
|
|
2357
|
+
resolve,
|
|
2358
|
+
reject,
|
|
2359
|
+
response,
|
|
2360
|
+
|
|
2361
|
+
);
|
|
2362
|
+
}, (error: AxiosError) => {
|
|
2363
|
+
if (error.response == null) {
|
|
2364
|
+
reject(error);
|
|
2365
|
+
return;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
if (handleErrorCodeResponse(
|
|
2369
|
+
reject,
|
|
2370
|
+
error.response,
|
|
2371
|
+
401,
|
|
2372
|
+
"ErrorResult",
|
|
2373
|
+
)) {
|
|
2374
|
+
return;
|
|
2375
|
+
}
|
|
2376
|
+
if (handleErrorCodeResponse(
|
|
2377
|
+
reject,
|
|
2378
|
+
error.response,
|
|
2379
|
+
403,
|
|
2380
|
+
"ErrorResult",
|
|
2381
|
+
)) {
|
|
2382
|
+
return;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
reject(error);
|
|
2387
|
+
});
|
|
2388
|
+
});
|
|
2389
|
+
});
|
|
2390
|
+
}
|
|
2391
|
+
/**
|
|
2392
|
+
*
|
|
2393
|
+
* @summary Revoke the document.
|
|
2394
|
+
* @param documentId Document Id.
|
|
2395
|
+
* @param revokeDocument RevokeDetails.
|
|
2396
|
+
* @param options
|
|
2397
|
+
*/
|
|
2398
|
+
public async revokeDocument (documentId: string, revokeDocument: RevokeDocument, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
2399
|
+
revokeDocument = deserializeIfNeeded(revokeDocument, "RevokeDocument");
|
|
2400
|
+
const localVarPath = this.basePath + '/v1/document/revoke';
|
|
2401
|
+
let localVarQueryParameters: any = {};
|
|
2402
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
2403
|
+
const produces = ['application/json'];
|
|
2404
|
+
// give precedence to 'application/json'
|
|
2405
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2406
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
2407
|
+
} else {
|
|
2408
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
2409
|
+
}
|
|
2410
|
+
let localVarFormParams: any = {};
|
|
2411
|
+
let localVarBodyParams: any = undefined;
|
|
2412
|
+
|
|
2413
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
2414
|
+
if (documentId === null || documentId === undefined) {
|
|
2415
|
+
throw new Error('Required parameter documentId was null or undefined when calling revokeDocument.');
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
// verify required parameter 'revokeDocument' is not null or undefined
|
|
2419
|
+
if (revokeDocument === null || revokeDocument === undefined) {
|
|
2420
|
+
throw new Error('Required parameter revokeDocument was null or undefined when calling revokeDocument.');
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
if (documentId !== undefined) {
|
|
2424
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2428
|
+
|
|
2429
|
+
let localVarUseFormData = false;
|
|
2430
|
+
|
|
2431
|
+
const result = generateFormData(revokeDocument, RevokeDocument);
|
|
2432
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
2433
|
+
|
|
2434
|
+
let data = {};
|
|
2435
|
+
if (localVarUseFormData) {
|
|
2436
|
+
const formData = toFormData(result.data);
|
|
2437
|
+
data = formData;
|
|
2438
|
+
localVarHeaderParams = {
|
|
2439
|
+
...localVarHeaderParams,
|
|
2440
|
+
...formData.getHeaders(),
|
|
2441
|
+
};
|
|
2442
|
+
} else {
|
|
2443
|
+
data = ObjectSerializer.serialize(
|
|
2444
|
+
revokeDocument,
|
|
2445
|
+
"RevokeDocument"
|
|
2446
|
+
);
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
2450
|
+
method: 'POST',
|
|
2451
|
+
params: localVarQueryParameters,
|
|
2452
|
+
headers: localVarHeaderParams,
|
|
2453
|
+
url: localVarPath,
|
|
2454
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
2455
|
+
maxContentLength: Infinity,
|
|
2456
|
+
maxBodyLength: Infinity,
|
|
2457
|
+
responseType: "json",
|
|
2458
|
+
};
|
|
2459
|
+
|
|
2460
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
2461
|
+
localVarRequestOptions.data = data;
|
|
2462
|
+
}
|
|
2463
|
+
let authenticationPromise = Promise.resolve();
|
|
2464
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2465
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2466
|
+
}
|
|
2467
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2468
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2469
|
+
}
|
|
2470
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2471
|
+
|
|
2472
|
+
let interceptorPromise = authenticationPromise;
|
|
2473
|
+
for (const interceptor of this.interceptors) {
|
|
2474
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
return interceptorPromise.then(() => {
|
|
2478
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
2479
|
+
axios.request(localVarRequestOptions)
|
|
2480
|
+
.then((response) => {
|
|
2481
|
+
handleSuccessfulResponse(
|
|
2482
|
+
resolve,
|
|
2483
|
+
reject,
|
|
2484
|
+
response,
|
|
2485
|
+
|
|
2486
|
+
);
|
|
2487
|
+
}, (error: AxiosError) => {
|
|
2488
|
+
if (error.response == null) {
|
|
2489
|
+
reject(error);
|
|
2490
|
+
return;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
if (handleErrorCodeResponse(
|
|
2494
|
+
reject,
|
|
2495
|
+
error.response,
|
|
2496
|
+
401,
|
|
2497
|
+
"ErrorResult",
|
|
2498
|
+
)) {
|
|
2499
|
+
return;
|
|
2500
|
+
}
|
|
2501
|
+
if (handleErrorCodeResponse(
|
|
2502
|
+
reject,
|
|
2503
|
+
error.response,
|
|
2504
|
+
403,
|
|
2505
|
+
"ErrorResult",
|
|
2506
|
+
)) {
|
|
2507
|
+
return;
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
|
|
2511
|
+
reject(error);
|
|
2512
|
+
});
|
|
2513
|
+
});
|
|
2514
|
+
});
|
|
2515
|
+
}
|
|
2516
|
+
/**
|
|
2517
|
+
*
|
|
2518
|
+
* @summary Sends the document for sign.
|
|
2519
|
+
* @param sendForSign The send for sign request body.
|
|
2520
|
+
* @param options
|
|
2521
|
+
*/
|
|
2522
|
+
public async sendDocument (sendForSign?: SendForSign, options: optionsI = {headers: {}}) : Promise<returnTypeT<DocumentCreated>> {
|
|
2523
|
+
sendForSign = deserializeIfNeeded(sendForSign, "SendForSign");
|
|
2524
|
+
const localVarPath = this.basePath + '/v1/document/send';
|
|
2525
|
+
let localVarQueryParameters: any = {};
|
|
2526
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
2527
|
+
const produces = ['application/json'];
|
|
2528
|
+
// give precedence to 'application/json'
|
|
2529
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2530
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
2531
|
+
} else {
|
|
2532
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
2533
|
+
}
|
|
2534
|
+
let localVarFormParams: any = {};
|
|
2535
|
+
let localVarBodyParams: any = undefined;
|
|
2536
|
+
|
|
2537
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2538
|
+
|
|
2539
|
+
let localVarUseFormData = false;
|
|
2540
|
+
|
|
2541
|
+
const result = generateFormData(sendForSign, SendForSign);
|
|
2542
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
2543
|
+
|
|
2544
|
+
let data = {};
|
|
2545
|
+
if (localVarUseFormData) {
|
|
2546
|
+
const formData = toFormData(result.data);
|
|
2547
|
+
data = formData;
|
|
2548
|
+
localVarHeaderParams = {
|
|
2549
|
+
...localVarHeaderParams,
|
|
2550
|
+
...formData.getHeaders(),
|
|
2551
|
+
};
|
|
2552
|
+
} else {
|
|
2553
|
+
data = ObjectSerializer.serialize(
|
|
2554
|
+
sendForSign,
|
|
2555
|
+
"SendForSign"
|
|
2556
|
+
);
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
2560
|
+
method: 'POST',
|
|
2561
|
+
params: localVarQueryParameters,
|
|
2562
|
+
headers: localVarHeaderParams,
|
|
2563
|
+
url: localVarPath,
|
|
2564
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
2565
|
+
maxContentLength: Infinity,
|
|
2566
|
+
maxBodyLength: Infinity,
|
|
2567
|
+
responseType: "json",
|
|
2568
|
+
};
|
|
2569
|
+
|
|
2570
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
2571
|
+
localVarRequestOptions.data = data;
|
|
2572
|
+
}
|
|
2573
|
+
let authenticationPromise = Promise.resolve();
|
|
2574
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2575
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2576
|
+
}
|
|
2577
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2578
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2579
|
+
}
|
|
2580
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2581
|
+
|
|
2582
|
+
let interceptorPromise = authenticationPromise;
|
|
2583
|
+
for (const interceptor of this.interceptors) {
|
|
2584
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
return interceptorPromise.then(() => {
|
|
2588
|
+
return new Promise<returnTypeT<DocumentCreated>>((resolve, reject) => {
|
|
2589
|
+
axios.request(localVarRequestOptions)
|
|
2590
|
+
.then((response) => {
|
|
2591
|
+
handleSuccessfulResponse<DocumentCreated>(
|
|
2592
|
+
resolve,
|
|
2593
|
+
reject,
|
|
2594
|
+
response,
|
|
2595
|
+
"DocumentCreated",
|
|
2596
|
+
);
|
|
2597
|
+
}, (error: AxiosError) => {
|
|
2598
|
+
if (error.response == null) {
|
|
2599
|
+
reject(error);
|
|
2600
|
+
return;
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
if (handleErrorCodeResponse(
|
|
2604
|
+
reject,
|
|
2605
|
+
error.response,
|
|
2606
|
+
201,
|
|
2607
|
+
"DocumentCreated",
|
|
2608
|
+
)) {
|
|
2609
|
+
return;
|
|
2610
|
+
}
|
|
2611
|
+
if (handleErrorCodeResponse(
|
|
2612
|
+
reject,
|
|
2613
|
+
error.response,
|
|
2614
|
+
401,
|
|
2615
|
+
"ErrorResult",
|
|
2616
|
+
)) {
|
|
2617
|
+
return;
|
|
2618
|
+
}
|
|
2619
|
+
if (handleErrorCodeResponse(
|
|
2620
|
+
reject,
|
|
2621
|
+
error.response,
|
|
2622
|
+
403,
|
|
2623
|
+
"ErrorResult",
|
|
2624
|
+
)) {
|
|
2625
|
+
return;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
reject(error);
|
|
2630
|
+
});
|
|
2631
|
+
});
|
|
2632
|
+
});
|
|
2633
|
+
}
|
|
2634
|
+
/**
|
|
2635
|
+
*
|
|
2636
|
+
* @summary Get user Team documents.
|
|
2637
|
+
* @param page Page index specified in get document list request.
|
|
2638
|
+
* @param userId UserId of the Team document.
|
|
2639
|
+
* @param teamId TeamId of the Team document.
|
|
2640
|
+
* @param transmitType Transmit type as Sent, Received and Both.
|
|
2641
|
+
* @param pageSize Page size specified in get document list request.
|
|
2642
|
+
* @param startDate Start date of the document
|
|
2643
|
+
* @param status Status of the document such as In-progress, Completed, Decline, Expired, Revoked, Draft.
|
|
2644
|
+
* @param endDate End date of the document
|
|
2645
|
+
* @param searchKey Documents can be listed by the search key present in the document like document title, document ID, sender or recipient(s) name, etc.,
|
|
2646
|
+
* @param labels Labels of the document.
|
|
2647
|
+
* @param nextCursor Next cursor value for pagination, required for fetching the next set of documents beyond 10,000 records.
|
|
2648
|
+
* @param brandIds BrandId(s) of the document.
|
|
2649
|
+
* @param options
|
|
2650
|
+
*/
|
|
2651
|
+
public async teamDocuments (page: number, userId?: Array<string>, teamId?: Array<string>, transmitType?: 'Sent' | 'Received' | ' Both', pageSize?: number, startDate?: Date, status?: Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft'>, endDate?: Date, searchKey?: string, labels?: Array<string>, nextCursor?: number, brandIds?: Array<string>, options: optionsI = {headers: {}}) : Promise<returnTypeT<TeamDocumentRecords>> {
|
|
2652
|
+
const localVarPath = this.basePath + '/v1/document/teamlist';
|
|
2653
|
+
let localVarQueryParameters: any = {};
|
|
2654
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
2655
|
+
const produces = ['application/json'];
|
|
2656
|
+
// give precedence to 'application/json'
|
|
2657
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2658
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
2659
|
+
} else {
|
|
2660
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
2661
|
+
}
|
|
2662
|
+
let localVarFormParams: any = {};
|
|
2663
|
+
let localVarBodyParams: any = undefined;
|
|
2664
|
+
|
|
2665
|
+
// verify required parameter 'page' is not null or undefined
|
|
2666
|
+
if (page === null || page === undefined) {
|
|
2667
|
+
throw new Error('Required parameter page was null or undefined when calling teamDocuments.');
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
if (userId !== undefined) {
|
|
2671
|
+
localVarQueryParameters['UserId'] = ObjectSerializer.serialize(userId, "Array<string>");
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
if (teamId !== undefined) {
|
|
2675
|
+
localVarQueryParameters['TeamId'] = ObjectSerializer.serialize(teamId, "Array<string>");
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
if (transmitType !== undefined) {
|
|
2679
|
+
localVarQueryParameters['TransmitType'] = ObjectSerializer.serialize(transmitType, "'Sent' | 'Received' | ' Both'");
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
if (pageSize !== undefined) {
|
|
2683
|
+
localVarQueryParameters['PageSize'] = ObjectSerializer.serialize(pageSize, "number");
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
if (page !== undefined) {
|
|
2687
|
+
localVarQueryParameters['Page'] = ObjectSerializer.serialize(page, "number");
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
if (startDate !== undefined) {
|
|
2691
|
+
localVarQueryParameters['StartDate'] = ObjectSerializer.serialize(startDate, "Date");
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
if (status !== undefined) {
|
|
2695
|
+
localVarQueryParameters['Status'] = ObjectSerializer.serialize(status, "Array<'None' | 'WaitingForMe' | 'WaitingForOthers' | 'NeedAttention' | 'Completed' | 'Declined' | 'Revoked' | 'Expired' | 'Draft'>");
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
if (endDate !== undefined) {
|
|
2699
|
+
localVarQueryParameters['EndDate'] = ObjectSerializer.serialize(endDate, "Date");
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
if (searchKey !== undefined) {
|
|
2703
|
+
localVarQueryParameters['SearchKey'] = ObjectSerializer.serialize(searchKey, "string");
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
if (labels !== undefined) {
|
|
2707
|
+
localVarQueryParameters['Labels'] = ObjectSerializer.serialize(labels, "Array<string>");
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
if (nextCursor !== undefined) {
|
|
2711
|
+
localVarQueryParameters['NextCursor'] = ObjectSerializer.serialize(nextCursor, "number");
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
if (brandIds !== undefined) {
|
|
2715
|
+
localVarQueryParameters['BrandIds'] = ObjectSerializer.serialize(brandIds, "Array<string>");
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2719
|
+
|
|
2720
|
+
let localVarUseFormData = false;
|
|
2721
|
+
|
|
2722
|
+
let data = {};
|
|
2723
|
+
if (localVarUseFormData) {
|
|
2724
|
+
const formData = toFormData(localVarFormParams);
|
|
2725
|
+
data = formData;
|
|
2726
|
+
localVarHeaderParams = {
|
|
2727
|
+
...localVarHeaderParams,
|
|
2728
|
+
...formData.getHeaders(),
|
|
2729
|
+
};
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
2733
|
+
method: 'GET',
|
|
2734
|
+
params: localVarQueryParameters,
|
|
2735
|
+
headers: localVarHeaderParams,
|
|
2736
|
+
url: localVarPath,
|
|
2737
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
2738
|
+
maxContentLength: Infinity,
|
|
2739
|
+
maxBodyLength: Infinity,
|
|
2740
|
+
responseType: "json",
|
|
2741
|
+
};
|
|
2742
|
+
|
|
2743
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
2744
|
+
localVarRequestOptions.data = data;
|
|
2745
|
+
}
|
|
2746
|
+
let authenticationPromise = Promise.resolve();
|
|
2747
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2748
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2749
|
+
}
|
|
2750
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
2751
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
2752
|
+
}
|
|
2753
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2754
|
+
|
|
2755
|
+
let interceptorPromise = authenticationPromise;
|
|
2756
|
+
for (const interceptor of this.interceptors) {
|
|
2757
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2760
|
+
return interceptorPromise.then(() => {
|
|
2761
|
+
return new Promise<returnTypeT<TeamDocumentRecords>>((resolve, reject) => {
|
|
2762
|
+
axios.request(localVarRequestOptions)
|
|
2763
|
+
.then((response) => {
|
|
2764
|
+
handleSuccessfulResponse<TeamDocumentRecords>(
|
|
2765
|
+
resolve,
|
|
2766
|
+
reject,
|
|
2767
|
+
response,
|
|
2768
|
+
"TeamDocumentRecords",
|
|
2769
|
+
);
|
|
2770
|
+
}, (error: AxiosError) => {
|
|
2771
|
+
if (error.response == null) {
|
|
2772
|
+
reject(error);
|
|
2773
|
+
return;
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
if (handleErrorCodeResponse(
|
|
2777
|
+
reject,
|
|
2778
|
+
error.response,
|
|
2779
|
+
200,
|
|
2780
|
+
"TeamDocumentRecords",
|
|
2781
|
+
)) {
|
|
2782
|
+
return;
|
|
2783
|
+
}
|
|
2784
|
+
if (handleErrorCodeResponse(
|
|
2785
|
+
reject,
|
|
2786
|
+
error.response,
|
|
2787
|
+
401,
|
|
2788
|
+
"ErrorResult",
|
|
2789
|
+
)) {
|
|
2790
|
+
return;
|
|
2791
|
+
}
|
|
2792
|
+
if (handleErrorCodeResponse(
|
|
2793
|
+
reject,
|
|
2794
|
+
error.response,
|
|
2795
|
+
403,
|
|
2796
|
+
"ErrorResult",
|
|
2797
|
+
)) {
|
|
2798
|
+
return;
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2801
|
+
|
|
2802
|
+
reject(error);
|
|
2803
|
+
});
|
|
2804
|
+
});
|
|
2805
|
+
});
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
function deserializeIfNeeded<T> (obj: T, classname: string): T {
|
|
2810
|
+
if (obj !== null && obj !== undefined && obj.constructor.name !== classname) {
|
|
2811
|
+
return ObjectSerializer.deserialize(obj, classname);
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
return obj;
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
type AxiosResolve<T> = (
|
|
2818
|
+
value: (returnTypeT<T> | PromiseLike<returnTypeT<T>>),
|
|
2819
|
+
) => void
|
|
2820
|
+
|
|
2821
|
+
type AxiosReject = (reason?: any) => void;
|
|
2822
|
+
|
|
2823
|
+
function handleSuccessfulResponse<T>(
|
|
2824
|
+
resolve: AxiosResolve<T>,
|
|
2825
|
+
reject: AxiosReject,
|
|
2826
|
+
response: AxiosResponse,
|
|
2827
|
+
returnType?: string,
|
|
2828
|
+
) {
|
|
2829
|
+
let body = response.data;
|
|
2830
|
+
|
|
2831
|
+
if (
|
|
2832
|
+
response.status &&
|
|
2833
|
+
response.status >= 200 &&
|
|
2834
|
+
response.status <= 299
|
|
2835
|
+
) {
|
|
2836
|
+
if (returnType) {
|
|
2837
|
+
body = ObjectSerializer.deserialize(body, returnType);
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2840
|
+
resolve({ response: response, body: body });
|
|
2841
|
+
} else {
|
|
2842
|
+
reject(new HttpError(response, body, response.status));
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
function handleErrorCodeResponse(
|
|
2847
|
+
reject: AxiosReject,
|
|
2848
|
+
response: AxiosResponse,
|
|
2849
|
+
code: number,
|
|
2850
|
+
returnType: string
|
|
2851
|
+
): boolean {
|
|
2852
|
+
if (response.status !== code) {
|
|
2853
|
+
return false;
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
const body = ObjectSerializer.deserialize(
|
|
2857
|
+
response.data,
|
|
2858
|
+
returnType,
|
|
2859
|
+
);
|
|
2860
|
+
|
|
2861
|
+
reject(new HttpError(response, body, response.status));
|
|
2862
|
+
|
|
2863
|
+
return true;
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
function handleErrorRangeResponse(
|
|
2867
|
+
reject: AxiosReject,
|
|
2868
|
+
response: AxiosResponse,
|
|
2869
|
+
code: string,
|
|
2870
|
+
returnType: string
|
|
2871
|
+
): boolean {
|
|
2872
|
+
let rangeCodeLeft = Number(code[0] + "00");
|
|
2873
|
+
let rangeCodeRight = Number(code[0] + "99");
|
|
2874
|
+
|
|
2875
|
+
if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) {
|
|
2876
|
+
const body = ObjectSerializer.deserialize(
|
|
2877
|
+
response.data,
|
|
2878
|
+
returnType,
|
|
2879
|
+
);
|
|
2880
|
+
|
|
2881
|
+
reject(new HttpError(response, body, response.status));
|
|
2882
|
+
|
|
2883
|
+
return true;
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
return false;
|
|
2887
|
+
}
|