From 9b6217439f76ac0de5a7d51c72120093a1780e37 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 15 May 2025 11:19:26 -0500 Subject: [PATCH 1/2] Release 1.9.0 --- README.md | 60 +- VERSION | 2 +- api/apis.ts | 2 +- api/faxApi.ts | 16 +- api/faxLineApi.ts | 22 +- api/signatureRequestApi.ts | 652 + bin/copy-constants.php | 64 + bin/generate-examples.php | 2 +- dist/api.js | 27913 +++++++++------- docs/api/AccountApi.md | 193 +- docs/api/ApiAppApi.md | 307 +- docs/api/BulkSendJobApi.md | 109 +- docs/api/EmbeddedApi.md | 117 +- docs/api/FaxApi.md | 281 +- docs/api/FaxLineApi.md | 324 +- docs/api/OAuthApi.md | 93 +- docs/api/ReportApi.md | 54 +- docs/api/SignatureRequestApi.md | 1624 +- docs/api/TeamApi.md | 488 +- docs/api/TemplateApi.md | 770 +- docs/api/UnclaimedDraftApi.md | 342 +- docs/model/FaxLineAddUserRequest.md | 2 +- docs/model/FaxLineCreateRequest.md | 8 +- docs/model/FaxLineDeleteRequest.md | 2 +- docs/model/FaxLineRemoveUserRequest.md | 6 +- docs/model/FaxSendRequest.md | 10 +- .../SignatureRequestEditEmbeddedRequest.md | 34 + ...eRequestEditEmbeddedWithTemplateRequest.md | 25 + docs/model/SignatureRequestEditRequest.md | 35 + ...SignatureRequestEditWithTemplateRequest.md | 26 + examples/AccountCreate.js | 21 - examples/AccountCreate.ts | 21 - examples/AccountCreateExample.ts | 20 + examples/AccountCreateOauthExample.ts | 22 + examples/AccountGet.js | 17 - examples/AccountGet.ts | 17 - examples/AccountGetExample.ts | 14 + examples/AccountUpdate.js | 21 - examples/AccountUpdate.ts | 21 - examples/AccountUpdateExample.ts | 21 + examples/AccountVerify.js | 21 - examples/AccountVerify.ts | 21 - examples/AccountVerifyExample.ts | 20 + examples/ApiAppCreate.js | 39 - examples/ApiAppCreate.ts | 39 - examples/ApiAppCreateExample.ts | 39 + examples/ApiAppDelete.js | 19 - examples/ApiAppDelete.ts | 19 - examples/ApiAppDeleteExample.ts | 14 + examples/ApiAppGet.js | 19 - examples/ApiAppGet.ts | 19 - examples/ApiAppGetExample.ts | 16 + examples/ApiAppList.js | 20 - examples/ApiAppList.ts | 20 - examples/ApiAppListExample.ts | 17 + examples/ApiAppUpdate.js | 32 - examples/ApiAppUpdate.ts | 32 - examples/ApiAppUpdateExample.ts | 41 + examples/BulkSendJobGet.js | 19 - examples/BulkSendJobGet.ts | 19 - examples/BulkSendJobGetExample.ts | 18 + examples/BulkSendJobList.js | 20 - examples/BulkSendJobList.ts | 20 - examples/BulkSendJobListExample.ts | 17 + examples/EmbeddedEditUrl.js | 24 - examples/EmbeddedEditUrl.ts | 24 - examples/EmbeddedEditUrlExample.ts | 27 + examples/EmbeddedSignUrl.js | 19 - examples/EmbeddedSignUrl.ts | 19 - examples/EmbeddedSignUrlExample.ts | 16 + examples/EventCallback.ts | 29 - ...entCallback.js => EventCallbackExample.ts} | 0 examples/FaxDelete.js | 13 - examples/FaxDelete.ts | 13 - examples/FaxDeleteExample.ts | 13 + examples/FaxFiles.js | 17 - examples/FaxFiles.ts | 17 - examples/FaxFilesExample.ts | 15 + examples/FaxGet.js | 16 - examples/FaxGet.ts | 16 - examples/FaxGetExample.ts | 15 + examples/FaxLineAddUser.js | 19 - examples/FaxLineAddUser.ts | 19 - examples/FaxLineAddUserExample.ts | 20 + examples/FaxLineAreaCodeGet.js | 14 - examples/FaxLineAreaCodeGet.ts | 14 - examples/FaxLineAreaCodeGetExample.ts | 18 + examples/FaxLineCreate.js | 19 - examples/FaxLineCreate.ts | 19 - examples/FaxLineCreateExample.ts | 20 + examples/FaxLineDelete.js | 17 - examples/FaxLineDelete.ts | 17 - examples/FaxLineDeleteExample.ts | 17 + examples/FaxLineGet.js | 14 - examples/FaxLineGet.ts | 14 - examples/FaxLineGetExample.ts | 15 + examples/FaxLineList.js | 14 - examples/FaxLineList.ts | 14 - examples/FaxLineListExample.ts | 18 + examples/FaxLineRemoveUser.js | 19 - examples/FaxLineRemoveUser.ts | 19 - examples/FaxLineRemoveUserExample.ts | 20 + examples/FaxList.js | 17 - examples/FaxList.ts | 17 - examples/FaxListExample.ts | 16 + examples/FaxSend.js | 47 - examples/FaxSend.ts | 47 - examples/FaxSendExample.ts | 28 + examples/OauthTokenGenerate.js | 17 - examples/OauthTokenGenerate.ts | 17 - examples/OauthTokenGenerateExample.ts | 22 + examples/OauthTokenRefresh.js | 14 - examples/OauthTokenRefresh.ts | 14 - examples/OauthTokenRefreshExample.ts | 19 + examples/ReportCreate.js | 23 - examples/ReportCreate.ts | 23 - examples/ReportCreateExample.ts | 24 + ...reRequestBulkCreateEmbeddedWithTemplate.js | 66 - ...reRequestBulkCreateEmbeddedWithTemplate.ts | 63 - ...stBulkCreateEmbeddedWithTemplateExample.ts | 91 + .../SignatureRequestBulkSendWithTemplate.js | 65 - .../SignatureRequestBulkSendWithTemplate.ts | 65 - ...atureRequestBulkSendWithTemplateExample.ts | 91 + examples/SignatureRequestCancel.js | 19 - examples/SignatureRequestCancel.ts | 19 - examples/SignatureRequestCancelExample.ts | 14 + examples/SignatureRequestCreateEmbedded.js | 53 - examples/SignatureRequestCreateEmbedded.ts | 53 - .../SignatureRequestCreateEmbeddedExample.ts | 58 + ...uestCreateEmbeddedGroupedSignersExample.ts | 88 + ...natureRequestCreateEmbeddedWithTemplate.js | 41 - ...natureRequestCreateEmbeddedWithTemplate.ts | 41 - ...equestCreateEmbeddedWithTemplateExample.ts | 46 + examples/SignatureRequestEdit.js | 84 - examples/SignatureRequestEdit.ts | 85 - examples/SignatureRequestEditEmbedded.js | 58 - examples/SignatureRequestEditEmbedded.ts | 58 - .../SignatureRequestEditEmbeddedExample.ts | 59 + ...equestEditEmbeddedGroupedSignersExample.ts | 89 + ...ignatureRequestEditEmbeddedWithTemplate.js | 46 - ...ignatureRequestEditEmbeddedWithTemplate.ts | 46 - ...eRequestEditEmbeddedWithTemplateExample.ts | 47 + examples/SignatureRequestEditExample.ts | 67 + ...gnatureRequestEditGroupedSignersExample.ts | 97 + examples/SignatureRequestEditWithTemplate.js | 59 - examples/SignatureRequestEditWithTemplate.ts | 59 - ...SignatureRequestEditWithTemplateExample.ts | 68 + examples/SignatureRequestFiles.js | 22 - examples/SignatureRequestFiles.ts | 22 - examples/SignatureRequestFilesAsDataUri.js | 19 - examples/SignatureRequestFilesAsDataUri.ts | 19 - .../SignatureRequestFilesAsDataUriExample.ts | 16 + examples/SignatureRequestFilesAsFileUrl.js | 19 - examples/SignatureRequestFilesAsFileUrl.ts | 19 - .../SignatureRequestFilesAsFileUrlExample.ts | 17 + examples/SignatureRequestFilesExample.ts | 17 + examples/SignatureRequestGet.js | 19 - examples/SignatureRequestGet.ts | 19 - examples/SignatureRequestGetExample.ts | 16 + examples/SignatureRequestList.js | 20 - examples/SignatureRequestList.ts | 20 - examples/SignatureRequestListExample.ts | 19 + examples/SignatureRequestReleaseHold.js | 19 - examples/SignatureRequestReleaseHold.ts | 19 - .../SignatureRequestReleaseHoldExample.ts | 16 + examples/SignatureRequestRemind.js | 23 - examples/SignatureRequestRemind.ts | 23 - examples/SignatureRequestRemindExample.ts | 21 + examples/SignatureRequestRemove.js | 19 - examples/SignatureRequestRemove.ts | 19 - examples/SignatureRequestRemoveExample.ts | 13 + examples/SignatureRequestSend.js | 82 - examples/SignatureRequestSend.ts | 82 - examples/SignatureRequestSendExample.ts | 66 + ...gnatureRequestSendGroupedSignersExample.ts | 96 + examples/SignatureRequestSendWithTemplate.js | 54 - examples/SignatureRequestSendWithTemplate.ts | 54 - ...SignatureRequestSendWithTemplateExample.ts | 67 + examples/SignatureRequestUpdate.js | 24 - examples/SignatureRequestUpdate.ts | 24 - examples/SignatureRequestUpdateExample.ts | 22 + examples/TeamAddMember.js | 21 - examples/TeamAddMember.ts | 21 - examples/TeamAddMemberAccountIdExample.ts | 21 + examples/TeamAddMemberExample.ts | 21 + examples/TeamCreate.js | 21 - examples/TeamCreate.ts | 21 - examples/TeamCreateExample.ts | 20 + examples/TeamDelete.js | 17 - examples/TeamDelete.ts | 17 - examples/TeamDeleteExample.ts | 12 + examples/TeamGet.js | 17 - examples/TeamGet.ts | 17 - examples/TeamGetExample.ts | 14 + examples/TeamInfo.js | 17 - examples/TeamInfo.ts | 17 - examples/TeamInfoExample.ts | 16 + examples/TeamInvites.js | 19 - examples/TeamInvites.ts | 19 - examples/TeamInvitesExample.ts | 14 + examples/TeamMembers.js | 19 - examples/TeamMembers.ts | 19 - examples/TeamMembersExample.ts | 18 + examples/TeamRemoveMember.js | 22 - examples/TeamRemoveMember.ts | 22 - examples/TeamRemoveMemberAccountIdExample.ts | 20 + examples/TeamRemoveMemberExample.ts | 21 + examples/TeamSubTeams.js | 19 - examples/TeamSubTeams.ts | 19 - examples/TeamSubTeamsExample.ts | 18 + examples/TeamUpdate.js | 21 - examples/TeamUpdate.ts | 21 - examples/TeamUpdateExample.ts | 20 + examples/TemplateAddUser.js | 23 - examples/TemplateAddUser.ts | 23 - examples/TemplateAddUserExample.ts | 21 + examples/TemplateCreate.js | 61 - examples/TemplateCreate.ts | 61 - examples/TemplateCreateEmbeddedDraft.js | 61 - examples/TemplateCreateEmbeddedDraft.ts | 61 - .../TemplateCreateEmbeddedDraftExample.ts | 67 + ...eateEmbeddedDraftFormFieldGroupsExample.ts | 116 + ...reateEmbeddedDraftFormFieldRulesExample.ts | 134 + ...beddedDraftFormFieldsPerDocumentExample.ts | 103 + examples/TemplateCreateExample.ts | 103 + .../TemplateCreateFormFieldGroupsExample.ts | 116 + .../TemplateCreateFormFieldRulesExample.ts | 134 + ...plateCreateFormFieldsPerDocumentExample.ts | 103 + examples/TemplateDelete.js | 19 - examples/TemplateDelete.ts | 19 - examples/TemplateDeleteExample.ts | 14 + examples/TemplateFiles.js | 21 - examples/TemplateFiles.ts | 21 - examples/TemplateFilesAsDataUri.js | 19 - examples/TemplateFilesAsDataUri.ts | 19 - examples/TemplateFilesAsDataUriExample.ts | 16 + examples/TemplateFilesAsFileUrl.js | 19 - examples/TemplateFilesAsFileUrl.ts | 19 - examples/TemplateFilesAsFileUrlExample.ts | 17 + examples/TemplateFilesExample.ts | 17 + examples/TemplateGet.js | 19 - examples/TemplateGet.ts | 19 - examples/TemplateGetExample.ts | 16 + examples/TemplateList.js | 19 - examples/TemplateList.ts | 19 - examples/TemplateListExample.ts | 19 + examples/TemplateRemoveUser.js | 23 - examples/TemplateRemoveUser.ts | 23 - examples/TemplateRemoveUserExample.ts | 21 + examples/TemplateUpdateFiles.js | 24 - examples/TemplateUpdateFiles.ts | 24 - examples/TemplateUpdateFilesExample.ts | 23 + examples/UnclaimedDraftCreate.js | 64 - examples/UnclaimedDraftCreate.ts | 64 - examples/UnclaimedDraftCreateEmbedded.js | 25 - examples/UnclaimedDraftCreateEmbedded.ts | 25 - .../UnclaimedDraftCreateEmbeddedExample.ts | 25 + ...aftCreateEmbeddedFormFieldGroupsExample.ts | 74 + ...raftCreateEmbeddedFormFieldRulesExample.ts | 92 + ...ateEmbeddedFormFieldsPerDocumentExample.ts | 61 + ...nclaimedDraftCreateEmbeddedWithTemplate.js | 37 - ...nclaimedDraftCreateEmbeddedWithTemplate.ts | 37 - ...dDraftCreateEmbeddedWithTemplateExample.ts | 46 + examples/UnclaimedDraftCreateExample.ts | 35 + ...laimedDraftCreateFormFieldGroupsExample.ts | 73 + ...claimedDraftCreateFormFieldRulesExample.ts | 91 + ...DraftCreateFormFieldsPerDocumentExample.ts | 60 + examples/UnclaimedDraftEditAndResend.js | 24 - examples/UnclaimedDraftEditAndResend.ts | 24 - .../UnclaimedDraftEditAndResendExample.ts | 22 + model/faxLineAddUserRequest.ts | 2 +- model/faxLineCreateRequest.ts | 8 +- model/faxLineDeleteRequest.ts | 2 +- model/faxLineRemoveUserRequest.ts | 6 +- model/faxSendRequest.ts | 10 +- model/index.ts | 14 + model/models.ts | 62 +- model/signatureRequestEditEmbeddedRequest.ts | 264 + ...eRequestEditEmbeddedWithTemplateRequest.ts | 181 + model/signatureRequestEditRequest.ts | 270 + ...signatureRequestEditWithTemplateRequest.ts | 193 + model/signatureRequestSendRequest.ts | 2 + ...signatureRequestSendWithTemplateRequest.ts | 2 + model/subFormFieldRuleAction.ts | 2 + ...lateCreateEmbeddedDraftResponseTemplate.ts | 2 + model/templateResponse.ts | 4 + model/templateUpdateFilesResponseTemplate.ts | 2 + openapi-config.yaml | 6 +- openapi-sdk.yaml | 6034 ++-- package-lock.json | 787 +- package.json | 6 +- run-build | 5 +- templates/api-single.mustache | 4 + templates/dropbox-README.mustache | 6 - templates/dropbox-api-doc.mustache | 6 - templates/model.mustache | 11 + templates/models.mustache | 63 +- templates/package.mustache | 4 +- types/api/apis.d.ts | 2 +- types/api/signatureRequestApi.d.ts | 6 +- types/model/index.d.ts | 6 +- .../signatureRequestEditEmbeddedRequest.d.ts | 42 + ...equestEditEmbeddedWithTemplateRequest.d.ts | 28 + types/model/signatureRequestEditRequest.d.ts | 43 + ...gnatureRequestEditWithTemplateRequest.d.ts | 29 + types/model/subFormFieldRuleAction.d.ts | 2 + 306 files changed, 26560 insertions(+), 22849 deletions(-) create mode 100755 bin/copy-constants.php create mode 100644 docs/model/SignatureRequestEditEmbeddedRequest.md create mode 100644 docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md create mode 100644 docs/model/SignatureRequestEditRequest.md create mode 100644 docs/model/SignatureRequestEditWithTemplateRequest.md delete mode 100644 examples/AccountCreate.js delete mode 100644 examples/AccountCreate.ts create mode 100644 examples/AccountCreateExample.ts create mode 100644 examples/AccountCreateOauthExample.ts delete mode 100644 examples/AccountGet.js delete mode 100644 examples/AccountGet.ts create mode 100644 examples/AccountGetExample.ts delete mode 100644 examples/AccountUpdate.js delete mode 100644 examples/AccountUpdate.ts create mode 100644 examples/AccountUpdateExample.ts delete mode 100644 examples/AccountVerify.js delete mode 100644 examples/AccountVerify.ts create mode 100644 examples/AccountVerifyExample.ts delete mode 100644 examples/ApiAppCreate.js delete mode 100644 examples/ApiAppCreate.ts create mode 100644 examples/ApiAppCreateExample.ts delete mode 100644 examples/ApiAppDelete.js delete mode 100644 examples/ApiAppDelete.ts create mode 100644 examples/ApiAppDeleteExample.ts delete mode 100644 examples/ApiAppGet.js delete mode 100644 examples/ApiAppGet.ts create mode 100644 examples/ApiAppGetExample.ts delete mode 100644 examples/ApiAppList.js delete mode 100644 examples/ApiAppList.ts create mode 100644 examples/ApiAppListExample.ts delete mode 100644 examples/ApiAppUpdate.js delete mode 100644 examples/ApiAppUpdate.ts create mode 100644 examples/ApiAppUpdateExample.ts delete mode 100644 examples/BulkSendJobGet.js delete mode 100644 examples/BulkSendJobGet.ts create mode 100644 examples/BulkSendJobGetExample.ts delete mode 100644 examples/BulkSendJobList.js delete mode 100644 examples/BulkSendJobList.ts create mode 100644 examples/BulkSendJobListExample.ts delete mode 100644 examples/EmbeddedEditUrl.js delete mode 100644 examples/EmbeddedEditUrl.ts create mode 100644 examples/EmbeddedEditUrlExample.ts delete mode 100644 examples/EmbeddedSignUrl.js delete mode 100644 examples/EmbeddedSignUrl.ts create mode 100644 examples/EmbeddedSignUrlExample.ts delete mode 100644 examples/EventCallback.ts rename examples/{EventCallback.js => EventCallbackExample.ts} (100%) delete mode 100644 examples/FaxDelete.js delete mode 100644 examples/FaxDelete.ts create mode 100644 examples/FaxDeleteExample.ts delete mode 100644 examples/FaxFiles.js delete mode 100644 examples/FaxFiles.ts create mode 100644 examples/FaxFilesExample.ts delete mode 100644 examples/FaxGet.js delete mode 100644 examples/FaxGet.ts create mode 100644 examples/FaxGetExample.ts delete mode 100644 examples/FaxLineAddUser.js delete mode 100644 examples/FaxLineAddUser.ts create mode 100644 examples/FaxLineAddUserExample.ts delete mode 100644 examples/FaxLineAreaCodeGet.js delete mode 100644 examples/FaxLineAreaCodeGet.ts create mode 100644 examples/FaxLineAreaCodeGetExample.ts delete mode 100644 examples/FaxLineCreate.js delete mode 100644 examples/FaxLineCreate.ts create mode 100644 examples/FaxLineCreateExample.ts delete mode 100644 examples/FaxLineDelete.js delete mode 100644 examples/FaxLineDelete.ts create mode 100644 examples/FaxLineDeleteExample.ts delete mode 100644 examples/FaxLineGet.js delete mode 100644 examples/FaxLineGet.ts create mode 100644 examples/FaxLineGetExample.ts delete mode 100644 examples/FaxLineList.js delete mode 100644 examples/FaxLineList.ts create mode 100644 examples/FaxLineListExample.ts delete mode 100644 examples/FaxLineRemoveUser.js delete mode 100644 examples/FaxLineRemoveUser.ts create mode 100644 examples/FaxLineRemoveUserExample.ts delete mode 100644 examples/FaxList.js delete mode 100644 examples/FaxList.ts create mode 100644 examples/FaxListExample.ts delete mode 100644 examples/FaxSend.js delete mode 100644 examples/FaxSend.ts create mode 100644 examples/FaxSendExample.ts delete mode 100644 examples/OauthTokenGenerate.js delete mode 100644 examples/OauthTokenGenerate.ts create mode 100644 examples/OauthTokenGenerateExample.ts delete mode 100644 examples/OauthTokenRefresh.js delete mode 100644 examples/OauthTokenRefresh.ts create mode 100644 examples/OauthTokenRefreshExample.ts delete mode 100644 examples/ReportCreate.js delete mode 100644 examples/ReportCreate.ts create mode 100644 examples/ReportCreateExample.ts delete mode 100644 examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js delete mode 100644 examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts create mode 100644 examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts delete mode 100644 examples/SignatureRequestBulkSendWithTemplate.js delete mode 100644 examples/SignatureRequestBulkSendWithTemplate.ts create mode 100644 examples/SignatureRequestBulkSendWithTemplateExample.ts delete mode 100644 examples/SignatureRequestCancel.js delete mode 100644 examples/SignatureRequestCancel.ts create mode 100644 examples/SignatureRequestCancelExample.ts delete mode 100644 examples/SignatureRequestCreateEmbedded.js delete mode 100644 examples/SignatureRequestCreateEmbedded.ts create mode 100644 examples/SignatureRequestCreateEmbeddedExample.ts create mode 100644 examples/SignatureRequestCreateEmbeddedGroupedSignersExample.ts delete mode 100644 examples/SignatureRequestCreateEmbeddedWithTemplate.js delete mode 100644 examples/SignatureRequestCreateEmbeddedWithTemplate.ts create mode 100644 examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts delete mode 100644 examples/SignatureRequestEdit.js delete mode 100644 examples/SignatureRequestEdit.ts delete mode 100644 examples/SignatureRequestEditEmbedded.js delete mode 100644 examples/SignatureRequestEditEmbedded.ts create mode 100644 examples/SignatureRequestEditEmbeddedExample.ts create mode 100644 examples/SignatureRequestEditEmbeddedGroupedSignersExample.ts delete mode 100644 examples/SignatureRequestEditEmbeddedWithTemplate.js delete mode 100644 examples/SignatureRequestEditEmbeddedWithTemplate.ts create mode 100644 examples/SignatureRequestEditEmbeddedWithTemplateExample.ts create mode 100644 examples/SignatureRequestEditExample.ts create mode 100644 examples/SignatureRequestEditGroupedSignersExample.ts delete mode 100644 examples/SignatureRequestEditWithTemplate.js delete mode 100644 examples/SignatureRequestEditWithTemplate.ts create mode 100644 examples/SignatureRequestEditWithTemplateExample.ts delete mode 100644 examples/SignatureRequestFiles.js delete mode 100644 examples/SignatureRequestFiles.ts delete mode 100644 examples/SignatureRequestFilesAsDataUri.js delete mode 100644 examples/SignatureRequestFilesAsDataUri.ts create mode 100644 examples/SignatureRequestFilesAsDataUriExample.ts delete mode 100644 examples/SignatureRequestFilesAsFileUrl.js delete mode 100644 examples/SignatureRequestFilesAsFileUrl.ts create mode 100644 examples/SignatureRequestFilesAsFileUrlExample.ts create mode 100644 examples/SignatureRequestFilesExample.ts delete mode 100644 examples/SignatureRequestGet.js delete mode 100644 examples/SignatureRequestGet.ts create mode 100644 examples/SignatureRequestGetExample.ts delete mode 100644 examples/SignatureRequestList.js delete mode 100644 examples/SignatureRequestList.ts create mode 100644 examples/SignatureRequestListExample.ts delete mode 100644 examples/SignatureRequestReleaseHold.js delete mode 100644 examples/SignatureRequestReleaseHold.ts create mode 100644 examples/SignatureRequestReleaseHoldExample.ts delete mode 100644 examples/SignatureRequestRemind.js delete mode 100644 examples/SignatureRequestRemind.ts create mode 100644 examples/SignatureRequestRemindExample.ts delete mode 100644 examples/SignatureRequestRemove.js delete mode 100644 examples/SignatureRequestRemove.ts create mode 100644 examples/SignatureRequestRemoveExample.ts delete mode 100644 examples/SignatureRequestSend.js delete mode 100644 examples/SignatureRequestSend.ts create mode 100644 examples/SignatureRequestSendExample.ts create mode 100644 examples/SignatureRequestSendGroupedSignersExample.ts delete mode 100644 examples/SignatureRequestSendWithTemplate.js delete mode 100644 examples/SignatureRequestSendWithTemplate.ts create mode 100644 examples/SignatureRequestSendWithTemplateExample.ts delete mode 100644 examples/SignatureRequestUpdate.js delete mode 100644 examples/SignatureRequestUpdate.ts create mode 100644 examples/SignatureRequestUpdateExample.ts delete mode 100644 examples/TeamAddMember.js delete mode 100644 examples/TeamAddMember.ts create mode 100644 examples/TeamAddMemberAccountIdExample.ts create mode 100644 examples/TeamAddMemberExample.ts delete mode 100644 examples/TeamCreate.js delete mode 100644 examples/TeamCreate.ts create mode 100644 examples/TeamCreateExample.ts delete mode 100644 examples/TeamDelete.js delete mode 100644 examples/TeamDelete.ts create mode 100644 examples/TeamDeleteExample.ts delete mode 100644 examples/TeamGet.js delete mode 100644 examples/TeamGet.ts create mode 100644 examples/TeamGetExample.ts delete mode 100644 examples/TeamInfo.js delete mode 100644 examples/TeamInfo.ts create mode 100644 examples/TeamInfoExample.ts delete mode 100644 examples/TeamInvites.js delete mode 100644 examples/TeamInvites.ts create mode 100644 examples/TeamInvitesExample.ts delete mode 100644 examples/TeamMembers.js delete mode 100644 examples/TeamMembers.ts create mode 100644 examples/TeamMembersExample.ts delete mode 100644 examples/TeamRemoveMember.js delete mode 100644 examples/TeamRemoveMember.ts create mode 100644 examples/TeamRemoveMemberAccountIdExample.ts create mode 100644 examples/TeamRemoveMemberExample.ts delete mode 100644 examples/TeamSubTeams.js delete mode 100644 examples/TeamSubTeams.ts create mode 100644 examples/TeamSubTeamsExample.ts delete mode 100644 examples/TeamUpdate.js delete mode 100644 examples/TeamUpdate.ts create mode 100644 examples/TeamUpdateExample.ts delete mode 100644 examples/TemplateAddUser.js delete mode 100644 examples/TemplateAddUser.ts create mode 100644 examples/TemplateAddUserExample.ts delete mode 100644 examples/TemplateCreate.js delete mode 100644 examples/TemplateCreate.ts delete mode 100644 examples/TemplateCreateEmbeddedDraft.js delete mode 100644 examples/TemplateCreateEmbeddedDraft.ts create mode 100644 examples/TemplateCreateEmbeddedDraftExample.ts create mode 100644 examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts create mode 100644 examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts create mode 100644 examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts create mode 100644 examples/TemplateCreateExample.ts create mode 100644 examples/TemplateCreateFormFieldGroupsExample.ts create mode 100644 examples/TemplateCreateFormFieldRulesExample.ts create mode 100644 examples/TemplateCreateFormFieldsPerDocumentExample.ts delete mode 100644 examples/TemplateDelete.js delete mode 100644 examples/TemplateDelete.ts create mode 100644 examples/TemplateDeleteExample.ts delete mode 100644 examples/TemplateFiles.js delete mode 100644 examples/TemplateFiles.ts delete mode 100644 examples/TemplateFilesAsDataUri.js delete mode 100644 examples/TemplateFilesAsDataUri.ts create mode 100644 examples/TemplateFilesAsDataUriExample.ts delete mode 100644 examples/TemplateFilesAsFileUrl.js delete mode 100644 examples/TemplateFilesAsFileUrl.ts create mode 100644 examples/TemplateFilesAsFileUrlExample.ts create mode 100644 examples/TemplateFilesExample.ts delete mode 100644 examples/TemplateGet.js delete mode 100644 examples/TemplateGet.ts create mode 100644 examples/TemplateGetExample.ts delete mode 100644 examples/TemplateList.js delete mode 100644 examples/TemplateList.ts create mode 100644 examples/TemplateListExample.ts delete mode 100644 examples/TemplateRemoveUser.js delete mode 100644 examples/TemplateRemoveUser.ts create mode 100644 examples/TemplateRemoveUserExample.ts delete mode 100644 examples/TemplateUpdateFiles.js delete mode 100644 examples/TemplateUpdateFiles.ts create mode 100644 examples/TemplateUpdateFilesExample.ts delete mode 100644 examples/UnclaimedDraftCreate.js delete mode 100644 examples/UnclaimedDraftCreate.ts delete mode 100644 examples/UnclaimedDraftCreateEmbedded.js delete mode 100644 examples/UnclaimedDraftCreateEmbedded.ts create mode 100644 examples/UnclaimedDraftCreateEmbeddedExample.ts create mode 100644 examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts create mode 100644 examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts create mode 100644 examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts delete mode 100644 examples/UnclaimedDraftCreateEmbeddedWithTemplate.js delete mode 100644 examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts create mode 100644 examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts create mode 100644 examples/UnclaimedDraftCreateExample.ts create mode 100644 examples/UnclaimedDraftCreateFormFieldGroupsExample.ts create mode 100644 examples/UnclaimedDraftCreateFormFieldRulesExample.ts create mode 100644 examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts delete mode 100644 examples/UnclaimedDraftEditAndResend.js delete mode 100644 examples/UnclaimedDraftEditAndResend.ts create mode 100644 examples/UnclaimedDraftEditAndResendExample.ts create mode 100644 model/signatureRequestEditEmbeddedRequest.ts create mode 100644 model/signatureRequestEditEmbeddedWithTemplateRequest.ts create mode 100644 model/signatureRequestEditRequest.ts create mode 100644 model/signatureRequestEditWithTemplateRequest.ts create mode 100644 types/model/signatureRequestEditEmbeddedRequest.d.ts create mode 100644 types/model/signatureRequestEditEmbeddedWithTemplateRequest.d.ts create mode 100644 types/model/signatureRequestEditRequest.d.ts create mode 100644 types/model/signatureRequestEditWithTemplateRequest.d.ts diff --git a/README.md b/README.md index bfee788..93d2bfd 100644 --- a/README.md +++ b/README.md @@ -47,58 +47,30 @@ Please follow the [installation procedure](#installation--usage) and then run th ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const accountApi = new DropboxSign.AccountApi(); +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountCreateRequest = { +const accountCreateRequest: models.AccountCreateRequest = { emailAddress: "newuser@dropboxsign.com", }; -const result = accountApi.accountCreate(data); -result.then(response => { +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountCreate:"); console.log(error.body); }); ``` -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = accountApi.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - ## API Endpoints @@ -121,7 +93,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | *EmbeddedApi* | [**embeddedEditUrl**](./docs/api/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | | *EmbeddedApi* | [**embeddedSignUrl**](./docs/api/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | | *FaxApi* | [**faxDelete**](./docs/api/FaxApi.md#faxdelete) | **DELETE** /fax/{fax_id} | Delete Fax | -| *FaxApi* | [**faxFiles**](./docs/api/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| *FaxApi* | [**faxFiles**](./docs/api/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | Download Fax Files | | *FaxApi* | [**faxGet**](./docs/api/FaxApi.md#faxget) | **GET** /fax/{fax_id} | Get Fax | | *FaxApi* | [**faxList**](./docs/api/FaxApi.md#faxlist) | **GET** /fax/list | Lists Faxes | | *FaxApi* | [**faxSend**](./docs/api/FaxApi.md#faxsend) | **POST** /fax/send | Send Fax | @@ -140,6 +112,10 @@ All URIs are relative to *https://api.hellosign.com/v3* | *SignatureRequestApi* | [**signatureRequestCancel**](./docs/api/SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbedded**](./docs/api/SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbeddedWithTemplate**](./docs/api/SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEdit**](./docs/api/SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbedded**](./docs/api/SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbeddedWithTemplate**](./docs/api/SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEditWithTemplate**](./docs/api/SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | *SignatureRequestApi* | [**signatureRequestFiles**](./docs/api/SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | *SignatureRequestApi* | [**signatureRequestFilesAsDataUri**](./docs/api/SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | *SignatureRequestApi* | [**signatureRequestFilesAsFileUrl**](./docs/api/SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -242,6 +218,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SignatureRequestBulkSendWithTemplateRequest](./docs/model/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](./docs/model/SignatureRequestCreateEmbeddedRequest.md) - [SignatureRequestCreateEmbeddedWithTemplateRequest](./docs/model/SignatureRequestCreateEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditEmbeddedRequest](./docs/model/SignatureRequestEditEmbeddedRequest.md) +- [SignatureRequestEditEmbeddedWithTemplateRequest](./docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditRequest](./docs/model/SignatureRequestEditRequest.md) +- [SignatureRequestEditWithTemplateRequest](./docs/model/SignatureRequestEditWithTemplateRequest.md) - [SignatureRequestGetResponse](./docs/model/SignatureRequestGetResponse.md) - [SignatureRequestListResponse](./docs/model/SignatureRequestListResponse.md) - [SignatureRequestRemindRequest](./docs/model/SignatureRequestRemindRequest.md) diff --git a/VERSION b/VERSION index 27f9cd3..f8e233b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.0 +1.9.0 diff --git a/api/apis.ts b/api/apis.ts index e2267a2..53fbc15 100644 --- a/api/apis.ts +++ b/api/apis.ts @@ -38,7 +38,7 @@ export const queryParamsSerializer = (params) => { return Qs.stringify(params, { arrayFormat: "brackets" }); }; -export const USER_AGENT = "OpenAPI-Generator/1.8.0/node"; +export const USER_AGENT = "OpenAPI-Generator/1.9.0/node"; /** * Generates an object containing form data. diff --git a/api/faxApi.ts b/api/faxApi.ts index dd9c6df..26e2242 100644 --- a/api/faxApi.ts +++ b/api/faxApi.ts @@ -119,7 +119,7 @@ export class FaxApi { } /** - * Deletes the specified Fax from the system. + * Deletes the specified Fax from the system * @summary Delete Fax * @param faxId Fax ID * @param options @@ -220,8 +220,8 @@ export class FaxApi { }); } /** - * Returns list of fax files - * @summary List Fax Files + * Downloads files associated with a Fax + * @summary Download Fax Files * @param faxId Fax ID * @param options */ @@ -337,7 +337,7 @@ export class FaxApi { }); } /** - * Returns information about fax + * Returns information about a Fax * @summary Get Fax * @param faxId Fax ID * @param options @@ -454,10 +454,10 @@ export class FaxApi { }); } /** - * Returns properties of multiple faxes + * Returns properties of multiple Faxes * @summary Lists Faxes - * @param page Page - * @param pageSize Page size + * @param page Which page number of the Fax List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. * @param options */ public async faxList( @@ -575,7 +575,7 @@ export class FaxApi { }); } /** - * Action to prepare and send a fax + * Creates and sends a new Fax with the submitted file(s) * @summary Send Fax * @param faxSendRequest * @param options diff --git a/api/faxLineApi.ts b/api/faxLineApi.ts index 634f614..24510ee 100644 --- a/api/faxLineApi.ts +++ b/api/faxLineApi.ts @@ -261,12 +261,12 @@ export class FaxLineApi { }); } /** - * Returns a response with the area codes available for a given state/provice and city. + * Returns a list of available area codes for a given state/province and city * @summary Get Available Fax Line Area Codes - * @param country Filter area codes by country. - * @param state Filter area codes by state. - * @param province Filter area codes by province. - * @param city Filter area codes by city. + * @param country Filter area codes by country + * @param state Filter area codes by state + * @param province Filter area codes by province + * @param city Filter area codes by city * @param options */ public async faxLineAreaCodeGet( @@ -473,7 +473,7 @@ export class FaxLineApi { }); } /** - * Purchases a new Fax Line. + * Purchases a new Fax Line * @summary Purchase Fax Line * @param faxLineCreateRequest * @param options @@ -735,7 +735,7 @@ export class FaxLineApi { /** * Returns the properties and settings of a Fax Line. * @summary Get Fax Line - * @param number The Fax Line number. + * @param number The Fax Line number * @param options */ public async faxLineGet( @@ -855,9 +855,9 @@ export class FaxLineApi { * Returns the properties and settings of multiple Fax Lines. * @summary List Fax Lines * @param accountId Account ID - * @param page Page - * @param pageSize Page size - * @param showTeamLines Show team lines + * @param page Which page number of the Fax Line List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param showTeamLines Include Fax Lines belonging to team members in the list * @param options */ public async faxLineList( @@ -993,7 +993,7 @@ export class FaxLineApi { }); } /** - * Removes a user\'s access to the specified Fax Line. + * Removes a user\'s access to the specified Fax Line * @summary Remove Fax Line Access * @param faxLineRemoveUserRequest * @param options diff --git a/api/signatureRequestApi.ts b/api/signatureRequestApi.ts index 3fd0d61..845c9f7 100644 --- a/api/signatureRequestApi.ts +++ b/api/signatureRequestApi.ts @@ -37,6 +37,10 @@ import { SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, @@ -824,6 +828,654 @@ export class SignatureRequestApi { ); }); } + /** + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditRequest + * @param options + */ + public async signatureRequestEdit( + signatureRequestId: string, + signatureRequestEditRequest: SignatureRequestEditRequest, + options: optionsI = { headers: {} } + ): Promise> { + signatureRequestEditRequest = deserializeIfNeeded( + signatureRequestEditRequest, + "SignatureRequestEditRequest" + ); + const localVarPath = + this.basePath + + "/signature_request/edit/{signature_request_id}".replace( + "{" + "signature_request_id" + "}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + // verify required parameter 'signatureRequestId' is not null or undefined + if (signatureRequestId === null || signatureRequestId === undefined) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEdit." + ); + } + + // verify required parameter 'signatureRequestEditRequest' is not null or undefined + if ( + signatureRequestEditRequest === null || + signatureRequestEditRequest === undefined + ) { + throw new Error( + "Required parameter signatureRequestEditRequest was null or undefined when calling signatureRequestEdit." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + signatureRequestEditRequest, + SignatureRequestEditRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestEditRequest, + "SignatureRequestEditRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedRequest + * @param options + */ + public async signatureRequestEditEmbedded( + signatureRequestId: string, + signatureRequestEditEmbeddedRequest: SignatureRequestEditEmbeddedRequest, + options: optionsI = { headers: {} } + ): Promise> { + signatureRequestEditEmbeddedRequest = deserializeIfNeeded( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" + ); + const localVarPath = + this.basePath + + "/signature_request/edit_embedded/{signature_request_id}".replace( + "{" + "signature_request_id" + "}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + // verify required parameter 'signatureRequestId' is not null or undefined + if (signatureRequestId === null || signatureRequestId === undefined) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbedded." + ); + } + + // verify required parameter 'signatureRequestEditEmbeddedRequest' is not null or undefined + if ( + signatureRequestEditEmbeddedRequest === null || + signatureRequestEditEmbeddedRequest === undefined + ) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedRequest was null or undefined when calling signatureRequestEditEmbedded." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + signatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request with Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedWithTemplateRequest + * @param options + */ + public async signatureRequestEditEmbeddedWithTemplate( + signatureRequestId: string, + signatureRequestEditEmbeddedWithTemplateRequest: SignatureRequestEditEmbeddedWithTemplateRequest, + options: optionsI = { headers: {} } + ): Promise> { + signatureRequestEditEmbeddedWithTemplateRequest = deserializeIfNeeded( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + const localVarPath = + this.basePath + + "/signature_request/edit_embedded_with_template/{signature_request_id}".replace( + "{" + "signature_request_id" + "}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + // verify required parameter 'signatureRequestId' is not null or undefined + if (signatureRequestId === null || signatureRequestId === undefined) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." + ); + } + + // verify required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' is not null or undefined + if ( + signatureRequestEditEmbeddedWithTemplateRequest === null || + signatureRequestEditEmbeddedWithTemplateRequest === undefined + ) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + signatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request With Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditWithTemplateRequest + * @param options + */ + public async signatureRequestEditWithTemplate( + signatureRequestId: string, + signatureRequestEditWithTemplateRequest: SignatureRequestEditWithTemplateRequest, + options: optionsI = { headers: {} } + ): Promise> { + signatureRequestEditWithTemplateRequest = deserializeIfNeeded( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + const localVarPath = + this.basePath + + "/signature_request/edit_with_template/{signature_request_id}".replace( + "{" + "signature_request_id" + "}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + // verify required parameter 'signatureRequestId' is not null or undefined + if (signatureRequestId === null || signatureRequestId === undefined) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditWithTemplate." + ); + } + + // verify required parameter 'signatureRequestEditWithTemplateRequest' is not null or undefined + if ( + signatureRequestEditWithTemplateRequest === null || + signatureRequestEditWithTemplateRequest === undefined + ) { + throw new Error( + "Required parameter signatureRequestEditWithTemplateRequest was null or undefined when calling signatureRequestEditWithTemplate." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + signatureRequestEditWithTemplateRequest, + SignatureRequestEditWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } /** * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. * @summary Download Files diff --git a/bin/copy-constants.php b/bin/copy-constants.php new file mode 100755 index 0000000..c9634b6 --- /dev/null +++ b/bin/copy-constants.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +run(); diff --git a/bin/generate-examples.php b/bin/generate-examples.php index acd47f3..5288b83 100755 --- a/bin/generate-examples.php +++ b/bin/generate-examples.php @@ -260,7 +260,7 @@ protected function getReplaceCodeString( $generate = new GenerateExamples( Yaml::parse(file_get_contents(__DIR__ . '/../openapi-sdk.yaml')), - ['JavaScript', 'TypeScript'], + ['TypeScript'], [__DIR__ . '/../docs/api', __DIR__ . '/../docs/model'], [__DIR__ . '/../README.md'], [ diff --git a/dist/api.js b/dist/api.js index 08e777f..cafbd1b 100644 --- a/dist/api.js +++ b/dist/api.js @@ -1,27 +1,10 @@ "use strict"; var __create = Object.create; var __defProp = Object.defineProperty; -var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; -var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; @@ -38,36 +21,20 @@ var __copyProps = (to, from, except, desc) => { return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var __async = (__this, __arguments, generator) => { - return new Promise((resolve, reject) => { - var fulfilled = (value) => { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - }; - var rejected = (value) => { - try { - step(generator.throw(value)); - } catch (e) { - reject(e); - } - }; - var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); - step((generator = generator.apply(__this, __arguments)).next()); - }); -}; // node_modules/delayed-stream/lib/delayed_stream.js var require_delayed_stream = __commonJS({ - "node_modules/delayed-stream/lib/delayed_stream.js"(exports, module2) { + "node_modules/delayed-stream/lib/delayed_stream.js"(exports2, module2) { var Stream = require("stream").Stream; - var util2 = require("util"); + var util3 = require("util"); module2.exports = DelayedStream; function DelayedStream() { this.source = null; @@ -78,7 +45,7 @@ var require_delayed_stream = __commonJS({ this._released = false; this._bufferedEvents = []; } - util2.inherits(DelayedStream, Stream); + util3.inherits(DelayedStream, Stream); DelayedStream.create = function(source, options) { var delayedStream = new this(); options = options || {}; @@ -156,8 +123,8 @@ var require_delayed_stream = __commonJS({ // node_modules/combined-stream/lib/combined_stream.js var require_combined_stream = __commonJS({ - "node_modules/combined-stream/lib/combined_stream.js"(exports, module2) { - var util2 = require("util"); + "node_modules/combined-stream/lib/combined_stream.js"(exports2, module2) { + var util3 = require("util"); var Stream = require("stream").Stream; var DelayedStream = require_delayed_stream(); module2.exports = CombinedStream; @@ -173,7 +140,7 @@ var require_combined_stream = __commonJS({ this._insideLoop = false; this._pendingNext = false; } - util2.inherits(CombinedStream, Stream); + util3.inherits(CombinedStream, Stream); CombinedStream.create = function(options) { var combinedStream = new this(); options = options || {}; @@ -270,8 +237,7 @@ var require_combined_stream = __commonJS({ if (!this.pauseStreams) { return; } - if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") - this._currentStream.pause(); + if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") this._currentStream.pause(); this.emit("pause"); }; CombinedStream.prototype.resume = function() { @@ -280,8 +246,7 @@ var require_combined_stream = __commonJS({ this.writable = true; this._getNext(); } - if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") - this._currentStream.resume(); + if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") this._currentStream.resume(); this.emit("resume"); }; CombinedStream.prototype.end = function() { @@ -327,7 +292,7 @@ var require_combined_stream = __commonJS({ // node_modules/mime-db/db.json var require_db = __commonJS({ - "node_modules/mime-db/db.json"(exports, module2) { + "node_modules/mime-db/db.json"(exports2, module2) { module2.exports = { "application/1d-interleaved-parityfec": { source: "iana" @@ -8852,27 +8817,27 @@ var require_db = __commonJS({ // node_modules/mime-db/index.js var require_mime_db = __commonJS({ - "node_modules/mime-db/index.js"(exports, module2) { + "node_modules/mime-db/index.js"(exports2, module2) { module2.exports = require_db(); } }); // node_modules/mime-types/index.js var require_mime_types = __commonJS({ - "node_modules/mime-types/index.js"(exports) { + "node_modules/mime-types/index.js"(exports2) { "use strict"; var db = require_mime_db(); var extname = require("path").extname; var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/; var TEXT_TYPE_REGEXP = /^text\//i; - exports.charset = charset; - exports.charsets = { lookup: charset }; - exports.contentType = contentType; - exports.extension = extension; - exports.extensions = /* @__PURE__ */ Object.create(null); - exports.lookup = lookup; - exports.types = /* @__PURE__ */ Object.create(null); - populateMaps(exports.extensions, exports.types); + exports2.charset = charset; + exports2.charsets = { lookup: charset }; + exports2.contentType = contentType; + exports2.extension = extension; + exports2.extensions = /* @__PURE__ */ Object.create(null); + exports2.lookup = lookup; + exports2.types = /* @__PURE__ */ Object.create(null); + populateMaps(exports2.extensions, exports2.types); function charset(type) { if (!type || typeof type !== "string") { return false; @@ -8891,14 +8856,13 @@ var require_mime_types = __commonJS({ if (!str || typeof str !== "string") { return false; } - var mime = str.indexOf("/") === -1 ? exports.lookup(str) : str; + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; if (!mime) { return false; } if (mime.indexOf("charset") === -1) { - var charset2 = exports.charset(mime); - if (charset2) - mime += "; charset=" + charset2.toLowerCase(); + var charset2 = exports2.charset(mime); + if (charset2) mime += "; charset=" + charset2.toLowerCase(); } return mime; } @@ -8907,7 +8871,7 @@ var require_mime_types = __commonJS({ return false; } var match = EXTRACT_TYPE_REGEXP.exec(type); - var exts = match && exports.extensions[match[1].toLowerCase()]; + var exts = match && exports2.extensions[match[1].toLowerCase()]; if (!exts || !exts.length) { return false; } @@ -8921,7 +8885,7 @@ var require_mime_types = __commonJS({ if (!extension2) { return false; } - return exports.types[extension2] || false; + return exports2.types[extension2] || false; } function populateMaps(extensions, types) { var preference = ["nginx", "apache", void 0, "iana"]; @@ -8950,7 +8914,7 @@ var require_mime_types = __commonJS({ // node_modules/asynckit/lib/defer.js var require_defer = __commonJS({ - "node_modules/asynckit/lib/defer.js"(exports, module2) { + "node_modules/asynckit/lib/defer.js"(exports2, module2) { module2.exports = defer; function defer(fn) { var nextTick = typeof setImmediate == "function" ? setImmediate : typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : null; @@ -8965,7 +8929,7 @@ var require_defer = __commonJS({ // node_modules/asynckit/lib/async.js var require_async = __commonJS({ - "node_modules/asynckit/lib/async.js"(exports, module2) { + "node_modules/asynckit/lib/async.js"(exports2, module2) { var defer = require_defer(); module2.exports = async; function async(callback) { @@ -8988,7 +8952,7 @@ var require_async = __commonJS({ // node_modules/asynckit/lib/abort.js var require_abort = __commonJS({ - "node_modules/asynckit/lib/abort.js"(exports, module2) { + "node_modules/asynckit/lib/abort.js"(exports2, module2) { module2.exports = abort; function abort(state) { Object.keys(state.jobs).forEach(clean.bind(state)); @@ -9004,7 +8968,7 @@ var require_abort = __commonJS({ // node_modules/asynckit/lib/iterate.js var require_iterate = __commonJS({ - "node_modules/asynckit/lib/iterate.js"(exports, module2) { + "node_modules/asynckit/lib/iterate.js"(exports2, module2) { var async = require_async(); var abort = require_abort(); module2.exports = iterate; @@ -9037,7 +9001,7 @@ var require_iterate = __commonJS({ // node_modules/asynckit/lib/state.js var require_state = __commonJS({ - "node_modules/asynckit/lib/state.js"(exports, module2) { + "node_modules/asynckit/lib/state.js"(exports2, module2) { module2.exports = state; function state(list, sortMethod) { var isNamedList = !Array.isArray(list), initState = { @@ -9059,7 +9023,7 @@ var require_state = __commonJS({ // node_modules/asynckit/lib/terminator.js var require_terminator = __commonJS({ - "node_modules/asynckit/lib/terminator.js"(exports, module2) { + "node_modules/asynckit/lib/terminator.js"(exports2, module2) { var abort = require_abort(); var async = require_async(); module2.exports = terminator; @@ -9076,7 +9040,7 @@ var require_terminator = __commonJS({ // node_modules/asynckit/parallel.js var require_parallel = __commonJS({ - "node_modules/asynckit/parallel.js"(exports, module2) { + "node_modules/asynckit/parallel.js"(exports2, module2) { var iterate = require_iterate(); var initState = require_state(); var terminator = require_terminator(); @@ -9103,7 +9067,7 @@ var require_parallel = __commonJS({ // node_modules/asynckit/serialOrdered.js var require_serialOrdered = __commonJS({ - "node_modules/asynckit/serialOrdered.js"(exports, module2) { + "node_modules/asynckit/serialOrdered.js"(exports2, module2) { var iterate = require_iterate(); var initState = require_state(); var terminator = require_terminator(); @@ -9137,7 +9101,7 @@ var require_serialOrdered = __commonJS({ // node_modules/asynckit/serial.js var require_serial = __commonJS({ - "node_modules/asynckit/serial.js"(exports, module2) { + "node_modules/asynckit/serial.js"(exports2, module2) { var serialOrdered = require_serialOrdered(); module2.exports = serial; function serial(list, iterator, callback) { @@ -9148,7 +9112,7 @@ var require_serial = __commonJS({ // node_modules/asynckit/index.js var require_asynckit = __commonJS({ - "node_modules/asynckit/index.js"(exports, module2) { + "node_modules/asynckit/index.js"(exports2, module2) { module2.exports = { parallel: require_parallel(), serial: require_serial(), @@ -9159,7 +9123,7 @@ var require_asynckit = __commonJS({ // node_modules/form-data/lib/populate.js var require_populate = __commonJS({ - "node_modules/form-data/lib/populate.js"(exports, module2) { + "node_modules/form-data/lib/populate.js"(exports2, module2) { module2.exports = function(dst, src) { Object.keys(src).forEach(function(prop) { dst[prop] = dst[prop] || src[prop]; @@ -9171,9 +9135,9 @@ var require_populate = __commonJS({ // node_modules/form-data/lib/form_data.js var require_form_data = __commonJS({ - "node_modules/form-data/lib/form_data.js"(exports, module2) { + "node_modules/form-data/lib/form_data.js"(exports2, module2) { var CombinedStream = require_combined_stream(); - var util2 = require("util"); + var util3 = require("util"); var path = require("path"); var http2 = require("http"); var https2 = require("https"); @@ -9184,7 +9148,7 @@ var require_form_data = __commonJS({ var asynckit = require_asynckit(); var populate = require_populate(); module2.exports = FormData3; - util2.inherits(FormData3, CombinedStream); + util3.inherits(FormData3, CombinedStream); function FormData3(options) { if (!(this instanceof FormData3)) { return new FormData3(options); @@ -9209,7 +9173,7 @@ var require_form_data = __commonJS({ if (typeof value == "number") { value = "" + value; } - if (util2.isArray(value)) { + if (util3.isArray(value)) { this._error(new Error("Arrays are not supported.")); return; } @@ -9273,7 +9237,9 @@ var require_form_data = __commonJS({ var contentType = this._getContentType(value, options); var contents = ""; var headers = { + // add custom disposition as third element or keep it two elements if not "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array "Content-Type": [].concat(contentType || []) }; if (typeof options.header == "object") { @@ -9281,8 +9247,7 @@ var require_form_data = __commonJS({ } var header; for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) - continue; + if (!headers.hasOwnProperty(prop)) continue; header = headers[prop]; if (header == null) { continue; @@ -9484,7 +9449,7 @@ var require_form_data = __commonJS({ // node_modules/proxy-from-env/index.js var require_proxy_from_env = __commonJS({ - "node_modules/proxy-from-env/index.js"(exports) { + "node_modules/proxy-from-env/index.js"(exports2) { "use strict"; var parseUrl = require("url").parse; var DEFAULT_PORTS = { @@ -9498,7 +9463,7 @@ var require_proxy_from_env = __commonJS({ var stringEndsWith = String.prototype.endsWith || function(s) { return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; }; - function getProxyForUrl2(url2) { + function getProxyForUrl(url2) { var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; var proto = parsedUrl.protocol; var hostname = parsedUrl.host; @@ -9548,13 +9513,13 @@ var require_proxy_from_env = __commonJS({ function getEnv(key) { return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; } - exports.getProxyForUrl = getProxyForUrl2; + exports2.getProxyForUrl = getProxyForUrl; } }); // node_modules/ms/index.js var require_ms = __commonJS({ - "node_modules/ms/index.js"(exports, module2) { + "node_modules/ms/index.js"(exports2, module2) { var s = 1e3; var m = s * 60; var h = m * 60; @@ -9670,7 +9635,7 @@ var require_ms = __commonJS({ // node_modules/debug/src/common.js var require_common = __commonJS({ - "node_modules/debug/src/common.js"(exports, module2) { + "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; @@ -9705,7 +9670,7 @@ var require_common = __commonJS({ return; } const self2 = debug; - const curr = Number(new Date()); + const curr = Number(/* @__PURE__ */ new Date()); const ms = curr - (prevTime || curr); self2.diff = ms; self2.prev = prevTime; @@ -9833,13 +9798,13 @@ var require_common = __commonJS({ // node_modules/debug/src/browser.js var require_browser = __commonJS({ - "node_modules/debug/src/browser.js"(exports, module2) { - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - exports.destroy = (() => { + "node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = /* @__PURE__ */ (() => { let warned = false; return () => { if (!warned) { @@ -9848,7 +9813,7 @@ var require_browser = __commonJS({ } }; })(); - exports.colors = [ + exports2.colors = [ "#0000CC", "#0000FF", "#0033CC", @@ -9934,7 +9899,11 @@ var require_browser = __commonJS({ return false; } let m; - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); @@ -9956,14 +9925,14 @@ var require_browser = __commonJS({ }); args.splice(lastC, 0, c); } - exports.log = console.debug || console.log || (() => { + exports2.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { - exports.storage.setItem("debug", namespaces); + exports2.storage.setItem("debug", namespaces); } else { - exports.storage.removeItem("debug"); + exports2.storage.removeItem("debug"); } } catch (error) { } @@ -9971,7 +9940,7 @@ var require_browser = __commonJS({ function load() { let r; try { - r = exports.storage.getItem("debug"); + r = exports2.storage.getItem("debug"); } catch (error) { } if (!r && typeof process !== "undefined" && "env" in process) { @@ -9985,7 +9954,7 @@ var require_browser = __commonJS({ } catch (error) { } } - module2.exports = require_common()(exports); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -9999,7 +9968,7 @@ var require_browser = __commonJS({ // node_modules/has-flag/index.js var require_has_flag = __commonJS({ - "node_modules/has-flag/index.js"(exports, module2) { + "node_modules/has-flag/index.js"(exports2, module2) { "use strict"; module2.exports = (flag, argv = process.argv) => { const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; @@ -10012,7 +9981,7 @@ var require_has_flag = __commonJS({ // node_modules/supports-color/index.js var require_supports_color = __commonJS({ - "node_modules/supports-color/index.js"(exports, module2) { + "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; var os = require("os"); var tty = require("tty"); @@ -10114,25 +10083,25 @@ var require_supports_color = __commonJS({ // node_modules/debug/src/node.js var require_node = __commonJS({ - "node_modules/debug/src/node.js"(exports, module2) { + "node_modules/debug/src/node.js"(exports2, module2) { var tty = require("tty"); - var util2 = require("util"); - exports.init = init; - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.destroy = util2.deprecate( + var util3 = require("util"); + exports2.init = init; + exports2.log = log; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.destroy = util3.deprecate( () => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." ); - exports.colors = [6, 2, 3, 4, 5, 1]; + exports2.colors = [6, 2, 3, 4, 5, 1]; try { const supportsColor = require_supports_color(); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ + exports2.colors = [ 20, 21, 26, @@ -10213,7 +10182,7 @@ var require_node = __commonJS({ } } catch (error) { } - exports.inspectOpts = Object.keys(process.env).filter((key) => { + exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); }).reduce((obj, key) => { const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { @@ -10233,7 +10202,7 @@ var require_node = __commonJS({ return obj; }, {}); function useColors() { - return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); } function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; @@ -10248,13 +10217,13 @@ var require_node = __commonJS({ } } function getDate() { - if (exports.inspectOpts.hideDate) { + if (exports2.inspectOpts.hideDate) { return ""; } - return new Date().toISOString() + " "; + return (/* @__PURE__ */ new Date()).toISOString() + " "; } function log(...args) { - return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args) + "\n"); + return process.stderr.write(util3.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); } function save(namespaces) { if (namespaces) { @@ -10268,27 +10237,27 @@ var require_node = __commonJS({ } function init(debug) { debug.inspectOpts = {}; - const keys = Object.keys(exports.inspectOpts); + const keys = Object.keys(exports2.inspectOpts); for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common()(exports); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; - return util2.inspect(v, this.inspectOpts); + return util3.inspect(v, this.inspectOpts); }; } }); // node_modules/debug/src/index.js var require_src = __commonJS({ - "node_modules/debug/src/index.js"(exports, module2) { + "node_modules/debug/src/index.js"(exports2, module2) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module2.exports = require_browser(); } else { @@ -10299,7 +10268,7 @@ var require_src = __commonJS({ // node_modules/follow-redirects/debug.js var require_debug = __commonJS({ - "node_modules/follow-redirects/debug.js"(exports, module2) { + "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug; module2.exports = function() { if (!debug) { @@ -10319,7 +10288,7 @@ var require_debug = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ - "node_modules/follow-redirects/index.js"(exports, module2) { + "node_modules/follow-redirects/index.js"(exports2, module2) { var url2 = require("url"); var URL2 = url2.URL; var http2 = require("http"); @@ -10565,7 +10534,11 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : this._options.path; + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path + ); if (this._isRedirect) { var i = 0; var self2 = this; @@ -10612,11 +10585,16 @@ var require_follow_redirects = __commonJS({ var beforeRedirect = this._options.beforeRedirect; if (beforeRedirect) { requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request Host: response.req.getHeader("host") }, this._options.headers); } var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { this._options.method = "GET"; this._requestBodyBuffers = []; removeMatchingHeaders(/^content-/i, this._options.headers); @@ -10648,7 +10626,7 @@ var require_follow_redirects = __commonJS({ this._performRequest(); }; function wrap(protocols) { - var exports2 = { + var exports3 = { maxRedirects: 21, maxBodyLength: 10 * 1024 * 1024 }; @@ -10656,7 +10634,7 @@ var require_follow_redirects = __commonJS({ Object.keys(protocols).forEach(function(scheme) { var protocol = scheme + ":"; var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol); + var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol); function request(input, options, callback) { if (isURL(input)) { input = spreadUrlObject(input); @@ -10672,8 +10650,8 @@ var require_follow_redirects = __commonJS({ options = null; } options = Object.assign({ - maxRedirects: exports2.maxRedirects, - maxBodyLength: exports2.maxBodyLength + maxRedirects: exports3.maxRedirects, + maxBodyLength: exports3.maxBodyLength }, input, options); options.nativeProtocols = nativeProtocols; if (!isString2(options.host) && !isString2(options.hostname)) { @@ -10693,7 +10671,7 @@ var require_follow_redirects = __commonJS({ get: { value: get, configurable: true, enumerable: true, writable: true } }); }); - return exports2; + return exports3; } function noop2() { } @@ -10794,9 +10772,17 @@ var require_follow_redirects = __commonJS({ } }); +// node_modules/es-object-atoms/index.js +var require_es_object_atoms = __commonJS({ + "node_modules/es-object-atoms/index.js"(exports2, module2) { + "use strict"; + module2.exports = Object; + } +}); + // node_modules/es-errors/index.js var require_es_errors = __commonJS({ - "node_modules/es-errors/index.js"(exports, module2) { + "node_modules/es-errors/index.js"(exports2, module2) { "use strict"; module2.exports = Error; } @@ -10804,7 +10790,7 @@ var require_es_errors = __commonJS({ // node_modules/es-errors/eval.js var require_eval = __commonJS({ - "node_modules/es-errors/eval.js"(exports, module2) { + "node_modules/es-errors/eval.js"(exports2, module2) { "use strict"; module2.exports = EvalError; } @@ -10812,7 +10798,7 @@ var require_eval = __commonJS({ // node_modules/es-errors/range.js var require_range = __commonJS({ - "node_modules/es-errors/range.js"(exports, module2) { + "node_modules/es-errors/range.js"(exports2, module2) { "use strict"; module2.exports = RangeError; } @@ -10820,7 +10806,7 @@ var require_range = __commonJS({ // node_modules/es-errors/ref.js var require_ref = __commonJS({ - "node_modules/es-errors/ref.js"(exports, module2) { + "node_modules/es-errors/ref.js"(exports2, module2) { "use strict"; module2.exports = ReferenceError; } @@ -10828,7 +10814,7 @@ var require_ref = __commonJS({ // node_modules/es-errors/syntax.js var require_syntax = __commonJS({ - "node_modules/es-errors/syntax.js"(exports, module2) { + "node_modules/es-errors/syntax.js"(exports2, module2) { "use strict"; module2.exports = SyntaxError; } @@ -10836,7 +10822,7 @@ var require_syntax = __commonJS({ // node_modules/es-errors/type.js var require_type = __commonJS({ - "node_modules/es-errors/type.js"(exports, module2) { + "node_modules/es-errors/type.js"(exports2, module2) { "use strict"; module2.exports = TypeError; } @@ -10844,15 +10830,127 @@ var require_type = __commonJS({ // node_modules/es-errors/uri.js var require_uri = __commonJS({ - "node_modules/es-errors/uri.js"(exports, module2) { + "node_modules/es-errors/uri.js"(exports2, module2) { "use strict"; module2.exports = URIError; } }); +// node_modules/math-intrinsics/abs.js +var require_abs = __commonJS({ + "node_modules/math-intrinsics/abs.js"(exports2, module2) { + "use strict"; + module2.exports = Math.abs; + } +}); + +// node_modules/math-intrinsics/floor.js +var require_floor = __commonJS({ + "node_modules/math-intrinsics/floor.js"(exports2, module2) { + "use strict"; + module2.exports = Math.floor; + } +}); + +// node_modules/math-intrinsics/max.js +var require_max = __commonJS({ + "node_modules/math-intrinsics/max.js"(exports2, module2) { + "use strict"; + module2.exports = Math.max; + } +}); + +// node_modules/math-intrinsics/min.js +var require_min = __commonJS({ + "node_modules/math-intrinsics/min.js"(exports2, module2) { + "use strict"; + module2.exports = Math.min; + } +}); + +// node_modules/math-intrinsics/pow.js +var require_pow = __commonJS({ + "node_modules/math-intrinsics/pow.js"(exports2, module2) { + "use strict"; + module2.exports = Math.pow; + } +}); + +// node_modules/math-intrinsics/round.js +var require_round = __commonJS({ + "node_modules/math-intrinsics/round.js"(exports2, module2) { + "use strict"; + module2.exports = Math.round; + } +}); + +// node_modules/math-intrinsics/isNaN.js +var require_isNaN = __commonJS({ + "node_modules/math-intrinsics/isNaN.js"(exports2, module2) { + "use strict"; + module2.exports = Number.isNaN || function isNaN2(a) { + return a !== a; + }; + } +}); + +// node_modules/math-intrinsics/sign.js +var require_sign = __commonJS({ + "node_modules/math-intrinsics/sign.js"(exports2, module2) { + "use strict"; + var $isNaN = require_isNaN(); + module2.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : 1; + }; + } +}); + +// node_modules/gopd/gOPD.js +var require_gOPD = __commonJS({ + "node_modules/gopd/gOPD.js"(exports2, module2) { + "use strict"; + module2.exports = Object.getOwnPropertyDescriptor; + } +}); + +// node_modules/gopd/index.js +var require_gopd = __commonJS({ + "node_modules/gopd/index.js"(exports2, module2) { + "use strict"; + var $gOPD = require_gOPD(); + if ($gOPD) { + try { + $gOPD([], "length"); + } catch (e) { + $gOPD = null; + } + } + module2.exports = $gOPD; + } +}); + +// node_modules/es-define-property/index.js +var require_es_define_property = __commonJS({ + "node_modules/es-define-property/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = Object.defineProperty || false; + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = false; + } + } + module2.exports = $defineProperty; + } +}); + // node_modules/has-symbols/shams.js var require_shams = __commonJS({ - "node_modules/has-symbols/shams.js"(exports, module2) { + "node_modules/has-symbols/shams.js"(exports2, module2) { "use strict"; module2.exports = function hasSymbols() { if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { @@ -10875,7 +10973,7 @@ var require_shams = __commonJS({ } var symVal = 42; obj[sym] = symVal; - for (sym in obj) { + for (var _ in obj) { return false; } if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { @@ -10892,7 +10990,10 @@ var require_shams = __commonJS({ return false; } if (typeof Object.getOwnPropertyDescriptor === "function") { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + var descriptor = ( + /** @type {PropertyDescriptor} */ + Object.getOwnPropertyDescriptor(obj, sym) + ); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } @@ -10904,7 +11005,7 @@ var require_shams = __commonJS({ // node_modules/has-symbols/index.js var require_has_symbols = __commonJS({ - "node_modules/has-symbols/index.js"(exports, module2) { + "node_modules/has-symbols/index.js"(exports2, module2) { "use strict"; var origSymbol = typeof Symbol !== "undefined" && Symbol; var hasSymbolSham = require_shams(); @@ -10926,24 +11027,26 @@ var require_has_symbols = __commonJS({ } }); -// node_modules/has-proto/index.js -var require_has_proto = __commonJS({ - "node_modules/has-proto/index.js"(exports, module2) { +// node_modules/get-proto/Reflect.getPrototypeOf.js +var require_Reflect_getPrototypeOf = __commonJS({ + "node_modules/get-proto/Reflect.getPrototypeOf.js"(exports2, module2) { "use strict"; - var test2 = { - __proto__: null, - foo: {} - }; - var $Object = Object; - module2.exports = function hasProto() { - return { __proto__: test2 }.foo === test2.foo && !(test2 instanceof $Object); - }; + module2.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; + } +}); + +// node_modules/get-proto/Object.getPrototypeOf.js +var require_Object_getPrototypeOf = __commonJS({ + "node_modules/get-proto/Object.getPrototypeOf.js"(exports2, module2) { + "use strict"; + var $Object = require_es_object_atoms(); + module2.exports = $Object.getPrototypeOf || null; } }); // node_modules/function-bind/implementation.js var require_implementation = __commonJS({ - "node_modules/function-bind/implementation.js"(exports, module2) { + "node_modules/function-bind/implementation.js"(exports2, module2) { "use strict"; var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; var toStr = Object.prototype.toString; @@ -11019,16 +11122,120 @@ var require_implementation = __commonJS({ // node_modules/function-bind/index.js var require_function_bind = __commonJS({ - "node_modules/function-bind/index.js"(exports, module2) { + "node_modules/function-bind/index.js"(exports2, module2) { "use strict"; var implementation = require_implementation(); module2.exports = Function.prototype.bind || implementation; } }); +// node_modules/call-bind-apply-helpers/functionCall.js +var require_functionCall = __commonJS({ + "node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) { + "use strict"; + module2.exports = Function.prototype.call; + } +}); + +// node_modules/call-bind-apply-helpers/functionApply.js +var require_functionApply = __commonJS({ + "node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) { + "use strict"; + module2.exports = Function.prototype.apply; + } +}); + +// node_modules/call-bind-apply-helpers/reflectApply.js +var require_reflectApply = __commonJS({ + "node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) { + "use strict"; + module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply; + } +}); + +// node_modules/call-bind-apply-helpers/actualApply.js +var require_actualApply = __commonJS({ + "node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) { + "use strict"; + var bind2 = require_function_bind(); + var $apply = require_functionApply(); + var $call = require_functionCall(); + var $reflectApply = require_reflectApply(); + module2.exports = $reflectApply || bind2.call($call, $apply); + } +}); + +// node_modules/call-bind-apply-helpers/index.js +var require_call_bind_apply_helpers = __commonJS({ + "node_modules/call-bind-apply-helpers/index.js"(exports2, module2) { + "use strict"; + var bind2 = require_function_bind(); + var $TypeError = require_type(); + var $call = require_functionCall(); + var $actualApply = require_actualApply(); + module2.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== "function") { + throw new $TypeError("a function is required"); + } + return $actualApply(bind2, $call, args); + }; + } +}); + +// node_modules/dunder-proto/get.js +var require_get = __commonJS({ + "node_modules/dunder-proto/get.js"(exports2, module2) { + "use strict"; + var callBind = require_call_bind_apply_helpers(); + var gOPD = require_gopd(); + var hasProtoAccessor; + try { + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ + [].__proto__ === Array.prototype; + } catch (e) { + if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") { + throw e; + } + } + var desc = !!hasProtoAccessor && gOPD && gOPD( + Object.prototype, + /** @type {keyof typeof Object.prototype} */ + "__proto__" + ); + var $Object = Object; + var $getPrototypeOf = $Object.getPrototypeOf; + module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? ( + /** @type {import('./get')} */ + function getDunder(value) { + return $getPrototypeOf(value == null ? value : $Object(value)); + } + ) : false; + } +}); + +// node_modules/get-proto/index.js +var require_get_proto = __commonJS({ + "node_modules/get-proto/index.js"(exports2, module2) { + "use strict"; + var reflectGetProto = require_Reflect_getPrototypeOf(); + var originalGetProto = require_Object_getPrototypeOf(); + var getDunderProto = require_get(); + module2.exports = reflectGetProto ? function getProto(O) { + return reflectGetProto(O); + } : originalGetProto ? function getProto(O) { + if (!O || typeof O !== "object" && typeof O !== "function") { + throw new TypeError("getProto: not an object"); + } + return originalGetProto(O); + } : getDunderProto ? function getProto(O) { + return getDunderProto(O); + } : null; + } +}); + // node_modules/hasown/index.js var require_hasown = __commonJS({ - "node_modules/hasown/index.js"(exports, module2) { + "node_modules/hasown/index.js"(exports2, module2) { "use strict"; var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; @@ -11039,9 +11246,10 @@ var require_hasown = __commonJS({ // node_modules/get-intrinsic/index.js var require_get_intrinsic = __commonJS({ - "node_modules/get-intrinsic/index.js"(exports, module2) { + "node_modules/get-intrinsic/index.js"(exports2, module2) { "use strict"; var undefined2; + var $Object = require_es_object_atoms(); var $Error = require_es_errors(); var $EvalError = require_eval(); var $RangeError = require_range(); @@ -11049,6 +11257,13 @@ var require_get_intrinsic = __commonJS({ var $SyntaxError = require_syntax(); var $TypeError = require_type(); var $URIError = require_uri(); + var abs = require_abs(); + var floor = require_floor(); + var max = require_max(); + var min = require_min(); + var pow = require_pow(); + var round = require_round(); + var sign = require_sign(); var $Function = Function; var getEvalledConstructor = function(expressionSyntax) { try { @@ -11056,14 +11271,8 @@ var require_get_intrinsic = __commonJS({ } catch (e) { } }; - var $gOPD = Object.getOwnPropertyDescriptor; - if ($gOPD) { - try { - $gOPD({}, ""); - } catch (e) { - $gOPD = null; - } - } + var $gOPD = require_gopd(); + var $defineProperty = require_es_define_property(); var throwTypeError = function() { throw new $TypeError(); }; @@ -11080,10 +11289,11 @@ var require_get_intrinsic = __commonJS({ } }() : throwTypeError; var hasSymbols = require_has_symbols()(); - var hasProto = require_has_proto()(); - var getProto = Object.getPrototypeOf || (hasProto ? function(x) { - return x.__proto__; - } : null); + var getProto = require_get_proto(); + var $ObjectGPO = require_Object_getPrototypeOf(); + var $ReflectGPO = require_Reflect_getPrototypeOf(); + var $apply = require_functionApply(); + var $call = require_functionCall(); var needsEval = {}; var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); var INTRINSICS = { @@ -11110,7 +11320,9 @@ var require_get_intrinsic = __commonJS({ "%encodeURIComponent%": encodeURIComponent, "%Error%": $Error, "%eval%": eval, + // eslint-disable-line no-eval "%EvalError%": $EvalError, + "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array, "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, @@ -11127,7 +11339,8 @@ var require_get_intrinsic = __commonJS({ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, - "%Object%": Object, + "%Object%": $Object, + "%Object.getOwnPropertyDescriptor%": $gOPD, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, @@ -11153,7 +11366,19 @@ var require_get_intrinsic = __commonJS({ "%URIError%": $URIError, "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, - "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet, + "%Function.prototype.call%": $call, + "%Function.prototype.apply%": $apply, + "%Object.defineProperty%": $defineProperty, + "%Object.getPrototypeOf%": $ObjectGPO, + "%Math.abs%": abs, + "%Math.floor%": floor, + "%Math.max%": max, + "%Math.min%": min, + "%Math.pow%": pow, + "%Math.round%": round, + "%Math.sign%": sign, + "%Reflect.getPrototypeOf%": $ReflectGPO }; if (getProto) { try { @@ -11242,11 +11467,11 @@ var require_get_intrinsic = __commonJS({ }; var bind2 = require_function_bind(); var hasOwn = require_hasown(); - var $concat = bind2.call(Function.call, Array.prototype.concat); - var $spliceApply = bind2.call(Function.apply, Array.prototype.splice); - var $replace = bind2.call(Function.call, String.prototype.replace); - var $strSlice = bind2.call(Function.call, String.prototype.slice); - var $exec = bind2.call(Function.call, RegExp.prototype.exec); + var $concat = bind2.call($call, Array.prototype.concat); + var $spliceApply = bind2.call($apply, Array.prototype.splice); + var $replace = bind2.call($call, String.prototype.replace); + var $strSlice = bind2.call($call, String.prototype.slice); + var $exec = bind2.call($call, RegExp.prototype.exec); var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; var stringToPath = function stringToPath2(string) { @@ -11326,7 +11551,7 @@ var require_get_intrinsic = __commonJS({ if (!allowMissing) { throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); } - return void 0; + return void undefined2; } if ($gOPD && i + 1 >= parts.length) { var desc = $gOPD(value, part); @@ -11350,43 +11575,9 @@ var require_get_intrinsic = __commonJS({ } }); -// node_modules/es-define-property/index.js -var require_es_define_property = __commonJS({ - "node_modules/es-define-property/index.js"(exports, module2) { - "use strict"; - var GetIntrinsic = require_get_intrinsic(); - var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false; - if ($defineProperty) { - try { - $defineProperty({}, "a", { value: 1 }); - } catch (e) { - $defineProperty = false; - } - } - module2.exports = $defineProperty; - } -}); - -// node_modules/gopd/index.js -var require_gopd = __commonJS({ - "node_modules/gopd/index.js"(exports, module2) { - "use strict"; - var GetIntrinsic = require_get_intrinsic(); - var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); - if ($gOPD) { - try { - $gOPD([], "length"); - } catch (e) { - $gOPD = null; - } - } - module2.exports = $gOPD; - } -}); - // node_modules/define-data-property/index.js var require_define_data_property = __commonJS({ - "node_modules/define-data-property/index.js"(exports, module2) { + "node_modules/define-data-property/index.js"(exports2, module2) { "use strict"; var $defineProperty = require_es_define_property(); var $SyntaxError = require_syntax(); @@ -11434,7 +11625,7 @@ var require_define_data_property = __commonJS({ // node_modules/has-property-descriptors/index.js var require_has_property_descriptors = __commonJS({ - "node_modules/has-property-descriptors/index.js"(exports, module2) { + "node_modules/has-property-descriptors/index.js"(exports2, module2) { "use strict"; var $defineProperty = require_es_define_property(); var hasPropertyDescriptors = function hasPropertyDescriptors2() { @@ -11456,7 +11647,7 @@ var require_has_property_descriptors = __commonJS({ // node_modules/set-function-length/index.js var require_set_function_length = __commonJS({ - "node_modules/set-function-length/index.js"(exports, module2) { + "node_modules/set-function-length/index.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var define = require_define_data_property(); @@ -11485,9 +11676,21 @@ var require_set_function_length = __commonJS({ } if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { if (hasDescriptors) { - define(fn, "length", length, true, true); + define( + /** @type {Parameters[0]} */ + fn, + "length", + length, + true, + true + ); } else { - define(fn, "length", length); + define( + /** @type {Parameters[0]} */ + fn, + "length", + length + ); } } return fn; @@ -11497,7 +11700,7 @@ var require_set_function_length = __commonJS({ // node_modules/call-bind/index.js var require_call_bind = __commonJS({ - "node_modules/call-bind/index.js"(exports, module2) { + "node_modules/call-bind/index.js"(exports2, module2) { "use strict"; var bind2 = require_function_bind(); var GetIntrinsic = require_get_intrinsic(); @@ -11532,7 +11735,7 @@ var require_call_bind = __commonJS({ // node_modules/call-bind/callBound.js var require_callBound = __commonJS({ - "node_modules/call-bind/callBound.js"(exports, module2) { + "node_modules/call-bind/callBound.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBind = require_call_bind(); @@ -11549,14 +11752,14 @@ var require_callBound = __commonJS({ // node_modules/object-inspect/util.inspect.js var require_util_inspect = __commonJS({ - "node_modules/object-inspect/util.inspect.js"(exports, module2) { + "node_modules/object-inspect/util.inspect.js"(exports2, module2) { module2.exports = require("util").inspect; } }); // node_modules/object-inspect/index.js var require_object_inspect = __commonJS({ - "node_modules/object-inspect/index.js"(exports, module2) { + "node_modules/object-inspect/index.js"(exports2, module2) { var hasMap = typeof Map === "function" && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; @@ -12071,7 +12274,7 @@ var require_object_inspect = __commonJS({ // node_modules/side-channel/index.js var require_side_channel = __commonJS({ - "node_modules/side-channel/index.js"(exports, module2) { + "node_modules/side-channel/index.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBound = require_callBound(); @@ -12091,7 +12294,8 @@ var require_side_channel = __commonJS({ for (; (curr = prev.next) !== null; prev = curr) { if (curr.key === key) { prev.next = curr.next; - curr.next = list.next; + curr.next = /** @type {NonNullable} */ + list.next; list.next = curr; return curr; } @@ -12106,7 +12310,9 @@ var require_side_channel = __commonJS({ if (node) { node.value = value; } else { - objects.next = { + objects.next = /** @type {import('.').ListNode} */ + { + // eslint-disable-line no-param-reassign, no-extra-parens key, next: objects.next, value @@ -12183,7 +12389,7 @@ var require_side_channel = __commonJS({ // node_modules/qs/lib/formats.js var require_formats = __commonJS({ - "node_modules/qs/lib/formats.js"(exports, module2) { + "node_modules/qs/lib/formats.js"(exports2, module2) { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; @@ -12209,7 +12415,7 @@ var require_formats = __commonJS({ // node_modules/qs/lib/utils.js var require_utils = __commonJS({ - "node_modules/qs/lib/utils.js"(exports, module2) { + "node_modules/qs/lib/utils.js"(exports2, module2) { "use strict"; var formats = require_formats(); var has = Object.prototype.hasOwnProperty; @@ -12414,7 +12620,7 @@ var require_utils = __commonJS({ // node_modules/qs/lib/stringify.js var require_stringify = __commonJS({ - "node_modules/qs/lib/stringify.js"(exports, module2) { + "node_modules/qs/lib/stringify.js"(exports2, module2) { "use strict"; var getSideChannel = require_side_channel(); var utils = require_utils(); @@ -12453,6 +12659,7 @@ var require_stringify = __commonJS({ encodeValuesOnly: false, format: defaultFormat, formatter: formats.formatters[defaultFormat], + // deprecated indices: false, serializeDate: function serializeDate(date) { return toISO.call(date); @@ -12693,7 +12900,7 @@ var require_stringify = __commonJS({ // node_modules/qs/lib/parse.js var require_parse = __commonJS({ - "node_modules/qs/lib/parse.js"(exports, module2) { + "node_modules/qs/lib/parse.js"(exports2, module2) { "use strict"; var utils = require_utils(); var has = Object.prototype.hasOwnProperty; @@ -12885,6 +13092,7 @@ var require_parse = __commonJS({ decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults2.decodeDotInKeys, decoder: typeof opts.decoder === "function" ? opts.decoder : defaults2.decoder, delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults2.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults2.depth, duplicates, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, @@ -12919,7 +13127,7 @@ var require_parse = __commonJS({ // node_modules/qs/lib/index.js var require_lib = __commonJS({ - "node_modules/qs/lib/index.js"(exports, module2) { + "node_modules/qs/lib/index.js"(exports2, module2) { "use strict"; var stringify = require_stringify(); var parse = require_parse(); @@ -13015,6 +13223,10 @@ __export(api_exports, { SignatureRequestBulkSendWithTemplateRequest: () => SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest: () => SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest: () => SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest: () => SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest: () => SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest: () => SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest: () => SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse: () => SignatureRequestGetResponse, SignatureRequestListResponse: () => SignatureRequestListResponse, SignatureRequestRemindRequest: () => SignatureRequestRemindRequest, @@ -13163,7 +13375,7 @@ function bind(fn, thisArg) { // node_modules/axios/lib/utils.js var { toString } = Object.prototype; var { getPrototypeOf } = Object; -var kindOf = ((cache) => (thing) => { +var kindOf = /* @__PURE__ */ ((cache) => (thing) => { const str = toString.call(thing); return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); @@ -13206,7 +13418,8 @@ var isFileList = kindOfTest("FileList"); var isStream = (val) => isObject(val) && isFunction(val.pipe); var isFormData = (thing) => { let kind; - return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); + return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance + kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); }; var isURLSearchParams = kindOfTest("URLSearchParams"); var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest); @@ -13248,8 +13461,7 @@ function findKey(obj, key) { return null; } var _global = (() => { - if (typeof globalThis !== "undefined") - return globalThis; + if (typeof globalThis !== "undefined") return globalThis; return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; })(); var isContextDefined = (context) => !isUndefined(context) && context !== _global; @@ -13303,8 +13515,7 @@ var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { let prop; const merged = {}; destObj = destObj || {}; - if (sourceObj == null) - return destObj; + if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); i = props.length; @@ -13329,20 +13540,17 @@ var endsWith = (str, searchString, position) => { return lastIndex !== -1 && lastIndex === position; }; var toArray = (thing) => { - if (!thing) - return null; - if (isArray(thing)) - return thing; + if (!thing) return null; + if (isArray(thing)) return thing; let i = thing.length; - if (!isNumber(i)) - return null; + if (!isNumber(i)) return null; const arr = new Array(i); while (i-- > 0) { arr[i] = thing[i]; } return arr; }; -var isTypedArray = ((TypedArray) => { +var isTypedArray = /* @__PURE__ */ ((TypedArray) => { return (thing) => { return TypedArray && thing instanceof TypedArray; }; @@ -13392,8 +13600,7 @@ var freezeMethods = (obj) => { return false; } const value = obj[name]; - if (!isFunction(value)) - return; + if (!isFunction(value)) return; descriptor.enumerable = false; if ("writable" in descriptor) { descriptor.writable = false; @@ -13421,21 +13628,6 @@ var noop = () => { var toFiniteNumber = (value, defaultValue) => { return value != null && Number.isFinite(value = +value) ? value : defaultValue; }; -var ALPHA = "abcdefghijklmnopqrstuvwxyz"; -var DIGIT = "0123456789"; -var ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; -var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ""; - const { length } = alphabet; - while (size--) { - str += alphabet[Math.random() * length | 0]; - } - return str; -}; function isSpecCompliantForm(thing) { return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]); } @@ -13524,6 +13716,7 @@ var utils_default = { isHTMLForm, hasOwnProperty, hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors, freezeMethods, toObjectSet, @@ -13533,8 +13726,6 @@ var utils_default = { findKey, global: _global, isContextDefined, - ALPHABET, - generateString, isSpecCompliantForm, toJSONObject, isAsyncFn, @@ -13564,14 +13755,18 @@ function AxiosError(message, code, config, request, response) { utils_default.inherits(AxiosError, Error, { toJSON: function toJSON() { return { + // Standard message: this.message, name: this.name, + // Microsoft description: this.description, number: this.number, + // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, + // Axios config: utils_default.toJSONObject(this.config), code: this.code, status: this.status @@ -13593,6 +13788,7 @@ var descriptors = {}; "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" + // eslint-disable-next-line func-names ].forEach((code) => { descriptors[code] = { value: code }; }); @@ -13625,8 +13821,7 @@ function removeBrackets(key) { return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; } function renderKey(path, key, dots) { - if (!path) - return key; + if (!path) return key; return path.concat(key).map(function each(token, i) { token = removeBrackets(token); return !dots && i ? "[" + token + "]" : token; @@ -13660,8 +13855,7 @@ function toFormData(obj, formData2, options) { throw new TypeError("visitor must be a function"); } function convertValue(value) { - if (value === null) - return ""; + if (value === null) return ""; if (utils_default.isDate(value)) { return value.toISOString(); } @@ -13683,6 +13877,7 @@ function toFormData(obj, formData2, options) { key = removeBrackets(key); arr.forEach(function each(el, index) { !(utils_default.isUndefined(el) || el === null) && formData2.append( + // eslint-disable-next-line no-nested-ternary indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el) ); @@ -13703,8 +13898,7 @@ function toFormData(obj, formData2, options) { isVisitable }); function build(value, path) { - if (utils_default.isUndefined(value)) - return; + if (utils_default.isUndefined(value)) return; if (stack.indexOf(value) !== -1) { throw Error("Circular reference detected in " + path.join(".")); } @@ -13773,6 +13967,11 @@ function buildURL(url2, params, options) { return url2; } const _encode = options && options.encode || encode2; + if (utils_default.isFunction(options)) { + options = { + serialize: options + }; + } const serializeFn = options && options.serialize; let serializedParams; if (serializeFn) { @@ -13795,6 +13994,14 @@ var InterceptorManager = class { constructor() { this.handlers = []; } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ use(fulfilled, rejected, options) { this.handlers.push({ fulfilled, @@ -13804,16 +14011,38 @@ var InterceptorManager = class { }); return this.handlers.length - 1; } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ clear() { if (this.handlers) { this.handlers = []; } } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ forEach(fn) { utils_default.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { @@ -13831,11 +14060,31 @@ var transitional_default = { clarifyTimeoutError: false }; +// node_modules/axios/lib/platform/node/index.js +var import_crypto = __toESM(require("crypto"), 1); + // node_modules/axios/lib/platform/node/classes/URLSearchParams.js var import_url = __toESM(require("url"), 1); var URLSearchParams_default = import_url.default.URLSearchParams; // node_modules/axios/lib/platform/node/index.js +var ALPHA = "abcdefghijklmnopqrstuvwxyz"; +var DIGIT = "0123456789"; +var ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +}; +var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ""; + const { length } = alphabet; + const randomValues = new Uint32Array(size); + import_crypto.default.randomFillSync(randomValues); + for (let i = 0; i < size; i++) { + str += alphabet[randomValues[i] % length]; + } + return str; +}; var node_default = { isNode: true, classes: { @@ -13843,6 +14092,8 @@ var node_default = { FormData: FormData_default, Blob: typeof Blob !== "undefined" && Blob || null }, + ALPHABET, + generateString, protocols: ["http", "https", "file", "data"] }; @@ -13859,7 +14110,8 @@ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefi var _navigator = typeof navigator === "object" && navigator || void 0; var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); var hasStandardBrowserWebWorkerEnv = (() => { - return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; })(); var origin = hasBrowserEnv && window.location.href || "http://localhost"; @@ -13903,8 +14155,7 @@ function arrayToObject(arr) { function formDataToJSON(formData2) { function buildPath(path, value, target, index) { let name = path[index++]; - if (name === "__proto__") - return true; + if (name === "__proto__") return true; const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils_default.isArray(target) ? target.length : name; @@ -14017,6 +14268,10 @@ var defaults = { } return data; }], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", @@ -14114,8 +14369,7 @@ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { if (isHeaderNameFilter) { value = header; } - if (!utils_default.isString(value)) - return; + if (!utils_default.isString(value)) return; if (utils_default.isString(filter2)) { return value.indexOf(filter2) !== -1; } @@ -14363,8 +14617,9 @@ function combineURLs(baseURL, relativeURL) { } // node_modules/axios/lib/core/buildFullPath.js -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { return combineURLs(baseURL, requestedURL); } return requestedURL; @@ -14379,7 +14634,7 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1); var import_zlib = __toESM(require("zlib"), 1); // node_modules/axios/lib/env/data.js -var VERSION = "1.7.5"; +var VERSION = "1.8.4"; // node_modules/axios/lib/helpers/parseProtocol.js function parseProtocol(url2) { @@ -14538,7 +14793,7 @@ var AxiosTransformStream_default = AxiosTransformStream; var import_events = require("events"); // node_modules/axios/lib/helpers/formDataToStream.js -var import_util = require("util"); +var import_util = __toESM(require("util"), 1); var import_stream2 = require("stream"); // node_modules/axios/lib/helpers/readBlob.js @@ -14557,8 +14812,8 @@ var readBlob = async function* (blob) { var readBlob_default = readBlob; // node_modules/axios/lib/helpers/formDataToStream.js -var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_"; -var textEncoder = new import_util.TextEncoder(); +var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_"; +var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new import_util.default.TextEncoder(); var CRLF = "\r\n"; var CRLF_BYTES = textEncoder.encode(CRLF); var CRLF_BYTES_COUNT = 2; @@ -14600,7 +14855,7 @@ var formDataToStream = (form, headersHandler, options) => { const { tag = "form-data-boundary", size = 25, - boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET) + boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) } = options || {}; if (!utils_default.isFormData(form)) { throw TypeError("FormData instance required"); @@ -14808,7 +15063,7 @@ function dispatchBeforeRedirect(options, responseDetails) { function setProxy(options, configProxy, location) { let proxy = configProxy; if (!proxy && proxy !== false) { - const proxyUrl = (0, import_proxy_from_env.getProxyForUrl)(location); + const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location); if (proxyUrl) { proxy = new URL(proxyUrl); } @@ -14844,8 +15099,7 @@ var wrapAsync = (asyncExecutor) => { let onDone; let isDone; const done = (value, isRejected) => { - if (isDone) - return; + if (isDone) return; isDone = true; onDone && onDone(value, isRejected); }; @@ -14917,7 +15171,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort); } } - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0); const protocol = parsed.protocol || supportedProtocols[0]; if (protocol === "data:") { @@ -14983,7 +15237,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { } catch (e) { } } - } else if (utils_default.isBlob(data)) { + } else if (utils_default.isBlob(data) || utils_default.isFile(data)) { data.size && headers.setContentType(data.type || "application/octet-stream"); headers.setContentLength(data.size || 0); data = import_stream4.default.Readable.from(readBlob_default(data)); @@ -15077,7 +15331,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { if (config.socketPath) { options.socketPath = config.socketPath; } else { - options.hostname = parsed.hostname; + options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname; options.port = parsed.port; setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path); } @@ -15106,8 +15360,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { options.insecureHTTPParser = config.insecureHTTPParser; } req = transport.request(options, function handleResponse(res) { - if (req.destroyed) - return; + if (req.destroyed) return; const streams = [res]; const responseLength = +res.headers["content-length"]; if (onDownloadProgress || maxDownloadRate) { @@ -15130,6 +15383,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { delete res.headers["content-encoding"]; } switch ((res.headers["content-encoding"] || "").toLowerCase()) { + /*eslint default-case:0*/ case "gzip": case "x-gzip": case "compress": @@ -15186,7 +15440,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { return; } const err = new AxiosError_default( - "maxContentLength size of " + config.maxContentLength + " exceeded", + "stream has been aborted", AxiosError_default.ERR_BAD_RESPONSE, config, lastRequest @@ -15195,8 +15449,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { reject(err); }); responseStream.on("error", function handleStreamError(err) { - if (req.destroyed) - return; + if (req.destroyed) return; reject(AxiosError_default.from(err, null, config, lastRequest)); }); responseStream.on("end", function handleStreamEnd() { @@ -15244,8 +15497,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { return; } req.setTimeout(timeout, function handleRequestTimeout() { - if (isDone) - return; + if (isDone) return; let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded"; const transitional2 = config.transitional || transitional_default; if (config.timeoutErrorMessage) { @@ -15283,72 +15535,53 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { }; // node_modules/axios/lib/helpers/isURLSameOrigin.js -var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? function standardBrowserEnv() { - const msie = platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent); - const urlParsingNode = document.createElement("a"); - let originURL; - function resolveURL(url2) { - let href = url2; - if (msie) { - urlParsingNode.setAttribute("href", href); - href = urlParsingNode.href; - } - urlParsingNode.setAttribute("href", href); - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "", - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "", - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "", - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname - }; - } - originURL = resolveURL(window.location.href); - return function isURLSameOrigin(requestURL) { - const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL; - return parsed.protocol === originURL.protocol && parsed.host === originURL.host; - }; -}() : function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; -}(); +var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => { + url2 = new URL(url2, platform_default.origin); + return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port); +})( + new URL(platform_default.origin), + platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) +) : () => true; // node_modules/axios/lib/helpers/cookies.js -var cookies_default = platform_default.hasStandardBrowserEnv ? { - write(name, value, expires, path, domain, secure) { - const cookie = [name + "=" + encodeURIComponent(value)]; - utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString()); - utils_default.isString(path) && cookie.push("path=" + path); - utils_default.isString(domain) && cookie.push("domain=" + domain); - secure === true && cookie.push("secure"); - document.cookie = cookie.join("; "); - }, - read(name) { - const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)")); - return match ? decodeURIComponent(match[3]) : null; - }, - remove(name) { - this.write(name, "", Date.now() - 864e5); +var cookies_default = platform_default.hasStandardBrowserEnv ? ( + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure) { + const cookie = [name + "=" + encodeURIComponent(value)]; + utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString()); + utils_default.isString(path) && cookie.push("path=" + path); + utils_default.isString(domain) && cookie.push("domain=" + domain); + secure === true && cookie.push("secure"); + document.cookie = cookie.join("; "); + }, + read(name) { + const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)")); + return match ? decodeURIComponent(match[3]) : null; + }, + remove(name) { + this.write(name, "", Date.now() - 864e5); + } } -} : { - write() { - }, - read() { - return null; - }, - remove() { +) : ( + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { + } } -}; +); // node_modules/axios/lib/core/mergeConfig.js var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing; function mergeConfig(config1, config2) { config2 = config2 || {}; const config = {}; - function getMergedValue(target, source, caseless) { + function getMergedValue(target, source, prop, caseless) { if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { return utils_default.merge.call({ caseless }, target, source); } else if (utils_default.isPlainObject(source)) { @@ -15358,11 +15591,11 @@ function mergeConfig(config1, config2) { } return source; } - function mergeDeepProperties(a, b, caseless) { + function mergeDeepProperties(a, b, prop, caseless) { if (!utils_default.isUndefined(b)) { - return getMergedValue(a, b, caseless); + return getMergedValue(a, b, prop, caseless); } else if (!utils_default.isUndefined(a)) { - return getMergedValue(void 0, a, caseless); + return getMergedValue(void 0, a, prop, caseless); } } function valueFromConfig2(a, b) { @@ -15413,7 +15646,7 @@ function mergeConfig(config1, config2) { socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true) }; utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; @@ -15428,7 +15661,7 @@ var resolveConfig_default = (config) => { const newConfig = mergeConfig({}, config); let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; newConfig.headers = headers = AxiosHeaders_default.from(headers); - newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); + newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); if (auth) { headers.set( "Authorization", @@ -15585,39 +15818,40 @@ var xhr_default = isXHRAdapterSupported && function(config) { // node_modules/axios/lib/helpers/composeSignals.js var composeSignals = (signals, timeout) => { - let controller = new AbortController(); - let aborted; - const onabort = function(cancel) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = cancel instanceof Error ? cancel : this.reason; - controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)); - } - }; - let timer = timeout && setTimeout(() => { - onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT)); - }, timeout); - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); + const { length } = signals = signals ? signals.filter(Boolean) : []; + if (timeout || length) { + let controller = new AbortController(); + let aborted; + const onabort = function(reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)); + } + }; + let timer = timeout && setTimeout(() => { timer = null; - signals.forEach((signal2) => { - signal2 && (signal2.removeEventListener ? signal2.removeEventListener("abort", onabort) : signal2.unsubscribe(onabort)); - }); - signals = null; - } - }; - signals.forEach((signal2) => signal2 && signal2.addEventListener && signal2.addEventListener("abort", onabort)); - const { signal } = controller; - signal.unsubscribe = unsubscribe; - return [signal, () => { - timer && clearTimeout(timer); - timer = null; - }]; -}; -var composeSignals_default = composeSignals; - + onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = () => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + } + }; + signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; + } +}; +var composeSignals_default = composeSignals; + // node_modules/axios/lib/helpers/trackStream.js var streamChunk = function* (chunk, chunkSize) { let len = chunk.byteLength; @@ -15633,13 +15867,31 @@ var streamChunk = function* (chunk, chunkSize) { pos = end; } }; -var readBytes = async function* (iterable, chunkSize, encode3) { - for await (const chunk of iterable) { - yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : await encode3(String(chunk)), chunkSize); +var readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; +var readStream = async function* (stream4) { + if (stream4[Symbol.asyncIterator]) { + yield* stream4; + return; + } + const reader = stream4.getReader(); + try { + for (; ; ) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); } }; -var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => { - const iterator = readBytes(stream4, chunkSize, encode3); +var trackStream = (stream4, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream4, chunkSize); let bytes = 0; let done; let _onFinish = (e) => { @@ -15680,7 +15932,7 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => { // node_modules/axios/lib/adapters/fetch.js var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function"; var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function"; -var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer())); +var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer())); var test = (fn, ...args) => { try { return !!fn(...args); @@ -15720,7 +15972,11 @@ var getBodyLength = async (body) => { return body.size; } if (utils_default.isSpecCompliantForm(body)) { - return (await new Request(body).arrayBuffer()).byteLength; + const _request = new Request(platform_default.origin, { + method: "POST", + body + }); + return (await _request.arrayBuffer()).byteLength; } if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { return body.byteLength; @@ -15752,14 +16008,11 @@ var fetch_default = isFetchSupported && (async (config) => { fetchOptions } = resolveConfig_default(config); responseType = responseType ? (responseType + "").toLowerCase() : "text"; - let [composedSignal, stopTimeout] = signal || cancelToken || timeout ? composeSignals_default([signal, cancelToken], timeout) : []; - let finished, request; - const onFinish = () => { - !finished && setTimeout(() => { - composedSignal && composedSignal.unsubscribe(); - }); - finished = true; - }; + let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout); + let request; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); let requestContentLength; try { if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { @@ -15777,7 +16030,7 @@ var fetch_default = isFetchSupported && (async (config) => { requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)) ); - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText); + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); } } if (!utils_default.isString(withCredentials)) { @@ -15795,7 +16048,7 @@ var fetch_default = isFetchSupported && (async (config) => { }); let response = await fetch(request); const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); - if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) { + if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { const options = {}; ["status", "statusText", "headers"].forEach((prop) => { options[prop] = response[prop]; @@ -15808,15 +16061,14 @@ var fetch_default = isFetchSupported && (async (config) => { response = new Response( trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { flush && flush(); - isStreamResponse && onFinish(); - }, encodeText), + unsubscribe && unsubscribe(); + }), options ); } responseType = responseType || "text"; let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config); - !isStreamResponse && onFinish(); - stopTimeout && stopTimeout(); + !isStreamResponse && unsubscribe && unsubscribe(); return await new Promise((resolve, reject) => { settle(resolve, reject, { data: responseData, @@ -15828,7 +16080,7 @@ var fetch_default = isFetchSupported && (async (config) => { }); }); } catch (err) { - onFinish(); + unsubscribe && unsubscribe(); if (err && err.name === "TypeError" && /fetch/i.test(err.message)) { throw Object.assign( new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), @@ -15971,6 +16223,12 @@ validators.transitional = function transitional(validator, version, message) { return validator ? validator(value, opt, opts) : true; }; }; +validators.spelling = function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; function assertOptions(options, schema, allowUnknown) { if (typeof options !== "object") { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); @@ -16008,13 +16266,21 @@ var Axios = class { response: new InterceptorManager_default() }; } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ async request(configOrUrl, config) { try { return await this._request(configOrUrl, config); } catch (err) { if (err instanceof Error) { - let dummy; - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error(); + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; try { if (!err.stack) { @@ -16056,6 +16322,16 @@ var Axios = class { }, true); } } + if (config.allowAbsoluteUrls !== void 0) { + } else if (this.defaults.allowAbsoluteUrls !== void 0) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + validator_default.assertOptions(config, { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, true); config.method = (config.method || this.defaults.method || "get").toLowerCase(); let contextHeaders = headers && utils_default.merge( headers.common, @@ -16122,7 +16398,7 @@ var Axios = class { } getUri(config) { config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); return buildURL(fullPath, config.params, config.paramsSerializer); } }; @@ -16154,7 +16430,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m var Axios_default = Axios; // node_modules/axios/lib/cancel/CancelToken.js -var CancelToken = class { +var CancelToken = class _CancelToken { constructor(executor) { if (typeof executor !== "function") { throw new TypeError("executor must be a function."); @@ -16165,8 +16441,7 @@ var CancelToken = class { }); const token = this; this.promise.then((cancel) => { - if (!token._listeners) - return; + if (!token._listeners) return; let i = token._listeners.length; while (i-- > 0) { token._listeners[i](cancel); @@ -16192,11 +16467,17 @@ var CancelToken = class { resolvePromise(token.reason); }); } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ throwIfRequested() { if (this.reason) { throw this.reason; } } + /** + * Subscribe to the cancel signal + */ subscribe(listener) { if (this.reason) { listener(this.reason); @@ -16208,6 +16489,9 @@ var CancelToken = class { this._listeners = [listener]; } } + /** + * Unsubscribe from the cancel signal + */ unsubscribe(listener) { if (!this._listeners) { return; @@ -16217,9 +16501,22 @@ var CancelToken = class { this._listeners.splice(index, 1); } } + toAbortSignal() { + const controller = new AbortController(); + const abort = (err) => { + controller.abort(err); + }; + this.subscribe(abort); + controller.signal.unsubscribe = () => this.unsubscribe(abort); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ static source() { let cancel; - const token = new CancelToken(function executor(c) { + const token = new _CancelToken(function executor(c) { cancel = c; }); return { @@ -16367,563 +16664,709 @@ var { } = axios_default; // model/accountCreateRequest.ts -var _AccountCreateRequest = class { +var AccountCreateRequest = class _AccountCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountCreateRequest"); } }; -var AccountCreateRequest = _AccountCreateRequest; -AccountCreateRequest.discriminator = void 0; -AccountCreateRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - } -]; // model/accountCreateResponse.ts -var _AccountCreateResponse = class { +var AccountCreateResponse = class _AccountCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "oauthData", + baseName: "oauth_data", + type: "OAuthTokenResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountCreateResponse"); } }; -var AccountCreateResponse = _AccountCreateResponse; -AccountCreateResponse.discriminator = void 0; -AccountCreateResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "oauthData", - baseName: "oauth_data", - type: "OAuthTokenResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountGetResponse.ts -var _AccountGetResponse = class { +var AccountGetResponse = class _AccountGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountGetResponse"); } }; -var AccountGetResponse = _AccountGetResponse; -AccountGetResponse.discriminator = void 0; -AccountGetResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountResponse.ts -var _AccountResponse = class { +var AccountResponse = class _AccountResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "isPaidHs", + baseName: "is_paid_hs", + type: "boolean" + }, + { + name: "isPaidHf", + baseName: "is_paid_hf", + type: "boolean" + }, + { + name: "quotas", + baseName: "quotas", + type: "AccountResponseQuotas" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "roleCode", + baseName: "role_code", + type: "string" + }, + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + }, + { + name: "usage", + baseName: "usage", + type: "AccountResponseUsage" + } + ]; + } static getAttributeTypeMap() { return _AccountResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponse"); } }; -var AccountResponse = _AccountResponse; -AccountResponse.discriminator = void 0; -AccountResponse.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "isPaidHs", - baseName: "is_paid_hs", - type: "boolean" - }, - { - name: "isPaidHf", - baseName: "is_paid_hf", - type: "boolean" - }, - { - name: "quotas", - baseName: "quotas", - type: "AccountResponseQuotas" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "roleCode", - baseName: "role_code", - type: "string" - }, - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - }, - { - name: "usage", - baseName: "usage", - type: "AccountResponseUsage" - } -]; // model/accountResponseQuotas.ts -var _AccountResponseQuotas = class { +var AccountResponseQuotas = class _AccountResponseQuotas { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiSignatureRequestsLeft", + baseName: "api_signature_requests_left", + type: "number" + }, + { + name: "documentsLeft", + baseName: "documents_left", + type: "number" + }, + { + name: "templatesTotal", + baseName: "templates_total", + type: "number" + }, + { + name: "templatesLeft", + baseName: "templates_left", + type: "number" + }, + { + name: "smsVerificationsLeft", + baseName: "sms_verifications_left", + type: "number" + }, + { + name: "numFaxPagesLeft", + baseName: "num_fax_pages_left", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _AccountResponseQuotas.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponseQuotas"); } }; -var AccountResponseQuotas = _AccountResponseQuotas; -AccountResponseQuotas.discriminator = void 0; -AccountResponseQuotas.attributeTypeMap = [ - { - name: "apiSignatureRequestsLeft", - baseName: "api_signature_requests_left", - type: "number" - }, - { - name: "documentsLeft", - baseName: "documents_left", - type: "number" - }, - { - name: "templatesTotal", - baseName: "templates_total", - type: "number" - }, - { - name: "templatesLeft", - baseName: "templates_left", - type: "number" - }, - { - name: "smsVerificationsLeft", - baseName: "sms_verifications_left", - type: "number" - }, - { - name: "numFaxPagesLeft", - baseName: "num_fax_pages_left", - type: "number" - } -]; // model/accountResponseUsage.ts -var _AccountResponseUsage = class { +var AccountResponseUsage = class _AccountResponseUsage { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxPagesSent", + baseName: "fax_pages_sent", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _AccountResponseUsage.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponseUsage"); } }; -var AccountResponseUsage = _AccountResponseUsage; -AccountResponseUsage.discriminator = void 0; -AccountResponseUsage.attributeTypeMap = [ - { - name: "faxPagesSent", - baseName: "fax_pages_sent", - type: "number" - } -]; // model/accountUpdateRequest.ts -var _AccountUpdateRequest = class { +var AccountUpdateRequest = class _AccountUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountUpdateRequest"); } }; -var AccountUpdateRequest = _AccountUpdateRequest; -AccountUpdateRequest.discriminator = void 0; -AccountUpdateRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - } -]; // model/accountVerifyRequest.ts -var _AccountVerifyRequest = class { +var AccountVerifyRequest = class _AccountVerifyRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyRequest"); } }; -var AccountVerifyRequest = _AccountVerifyRequest; -AccountVerifyRequest.discriminator = void 0; -AccountVerifyRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/accountVerifyResponse.ts -var _AccountVerifyResponse = class { +var AccountVerifyResponse = class _AccountVerifyResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountVerifyResponseAccount" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyResponse"); } }; -var AccountVerifyResponse = _AccountVerifyResponse; -AccountVerifyResponse.discriminator = void 0; -AccountVerifyResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountVerifyResponseAccount" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountVerifyResponseAccount.ts -var _AccountVerifyResponseAccount = class { +var AccountVerifyResponseAccount = class _AccountVerifyResponseAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyResponseAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyResponseAccount"); } }; -var AccountVerifyResponseAccount = _AccountVerifyResponseAccount; -AccountVerifyResponseAccount.discriminator = void 0; -AccountVerifyResponseAccount.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/apiAppCreateRequest.ts -var _ApiAppCreateRequest = class { +var ApiAppCreateRequest = class _ApiAppCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "customLogoFile", + baseName: "custom_logo_file", + type: "RequestFile" + }, + { + name: "oauth", + baseName: "oauth", + type: "SubOAuth" + }, + { + name: "options", + baseName: "options", + type: "SubOptions" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "SubWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppCreateRequest"); } }; -var ApiAppCreateRequest = _ApiAppCreateRequest; -ApiAppCreateRequest.discriminator = void 0; -ApiAppCreateRequest.attributeTypeMap = [ - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "customLogoFile", - baseName: "custom_logo_file", - type: "RequestFile" - }, - { - name: "oauth", - baseName: "oauth", - type: "SubOAuth" - }, - { - name: "options", - baseName: "options", - type: "SubOptions" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "SubWhiteLabelingOptions" - } -]; // model/apiAppGetResponse.ts -var _ApiAppGetResponse = class { +var ApiAppGetResponse = class _ApiAppGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiApp", + baseName: "api_app", + type: "ApiAppResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ApiAppGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppGetResponse"); } }; -var ApiAppGetResponse = _ApiAppGetResponse; -ApiAppGetResponse.discriminator = void 0; -ApiAppGetResponse.attributeTypeMap = [ - { - name: "apiApp", - baseName: "api_app", - type: "ApiAppResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/apiAppListResponse.ts -var _ApiAppListResponse = class { +var ApiAppListResponse = class _ApiAppListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiApps", + baseName: "api_apps", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ApiAppListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppListResponse"); } }; -var ApiAppListResponse = _ApiAppListResponse; -ApiAppListResponse.discriminator = void 0; -ApiAppListResponse.attributeTypeMap = [ - { - name: "apiApps", - baseName: "api_apps", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/apiAppResponse.ts -var _ApiAppResponse = class { +var ApiAppResponse = class _ApiAppResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "isApproved", + baseName: "is_approved", + type: "boolean" + }, + { + name: "oauth", + baseName: "oauth", + type: "ApiAppResponseOAuth" + }, + { + name: "options", + baseName: "options", + type: "ApiAppResponseOptions" + }, + { + name: "ownerAccount", + baseName: "owner_account", + type: "ApiAppResponseOwnerAccount" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "ApiAppResponseWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponse"); } }; -var ApiAppResponse = _ApiAppResponse; -ApiAppResponse.discriminator = void 0; -ApiAppResponse.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "isApproved", - baseName: "is_approved", - type: "boolean" - }, - { - name: "oauth", - baseName: "oauth", - type: "ApiAppResponseOAuth" - }, - { - name: "options", - baseName: "options", - type: "ApiAppResponseOptions" - }, - { - name: "ownerAccount", - baseName: "owner_account", - type: "ApiAppResponseOwnerAccount" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "ApiAppResponseWhiteLabelingOptions" - } -]; // model/apiAppResponseOAuth.ts -var _ApiAppResponseOAuth = class { +var ApiAppResponseOAuth = class _ApiAppResponseOAuth { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "secret", + baseName: "secret", + type: "string" + }, + { + name: "scopes", + baseName: "scopes", + type: "Array" + }, + { + name: "chargesUsers", + baseName: "charges_users", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOAuth.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOAuth"); } }; -var ApiAppResponseOAuth = _ApiAppResponseOAuth; -ApiAppResponseOAuth.discriminator = void 0; -ApiAppResponseOAuth.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "secret", - baseName: "secret", - type: "string" - }, - { - name: "scopes", - baseName: "scopes", - type: "Array" - }, - { - name: "chargesUsers", - baseName: "charges_users", - type: "boolean" - } -]; // model/apiAppResponseOptions.ts -var _ApiAppResponseOptions = class { +var ApiAppResponseOptions = class _ApiAppResponseOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "canInsertEverywhere", + baseName: "can_insert_everywhere", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOptions"); } }; -var ApiAppResponseOptions = _ApiAppResponseOptions; -ApiAppResponseOptions.discriminator = void 0; -ApiAppResponseOptions.attributeTypeMap = [ - { - name: "canInsertEverywhere", - baseName: "can_insert_everywhere", - type: "boolean" - } -]; // model/apiAppResponseOwnerAccount.ts -var _ApiAppResponseOwnerAccount = class { +var ApiAppResponseOwnerAccount = class _ApiAppResponseOwnerAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOwnerAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOwnerAccount"); } }; -var ApiAppResponseOwnerAccount = _ApiAppResponseOwnerAccount; -ApiAppResponseOwnerAccount.discriminator = void 0; -ApiAppResponseOwnerAccount.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/apiAppResponseWhiteLabelingOptions.ts -var _ApiAppResponseWhiteLabelingOptions = class { +var ApiAppResponseWhiteLabelingOptions = class _ApiAppResponseWhiteLabelingOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "headerBackgroundColor", + baseName: "header_background_color", + type: "string" + }, + { + name: "legalVersion", + baseName: "legal_version", + type: "string" + }, + { + name: "linkColor", + baseName: "link_color", + type: "string" + }, + { + name: "pageBackgroundColor", + baseName: "page_background_color", + type: "string" + }, + { + name: "primaryButtonColor", + baseName: "primary_button_color", + type: "string" + }, + { + name: "primaryButtonColorHover", + baseName: "primary_button_color_hover", + type: "string" + }, + { + name: "primaryButtonTextColor", + baseName: "primary_button_text_color", + type: "string" + }, + { + name: "primaryButtonTextColorHover", + baseName: "primary_button_text_color_hover", + type: "string" + }, + { + name: "secondaryButtonColor", + baseName: "secondary_button_color", + type: "string" + }, + { + name: "secondaryButtonColorHover", + baseName: "secondary_button_color_hover", + type: "string" + }, + { + name: "secondaryButtonTextColor", + baseName: "secondary_button_text_color", + type: "string" + }, + { + name: "secondaryButtonTextColorHover", + baseName: "secondary_button_text_color_hover", + type: "string" + }, + { + name: "textColor1", + baseName: "text_color1", + type: "string" + }, + { + name: "textColor2", + baseName: "text_color2", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseWhiteLabelingOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -16931,172 +17374,242 @@ var _ApiAppResponseWhiteLabelingOptions = class { ); } }; -var ApiAppResponseWhiteLabelingOptions = _ApiAppResponseWhiteLabelingOptions; -ApiAppResponseWhiteLabelingOptions.discriminator = void 0; -ApiAppResponseWhiteLabelingOptions.attributeTypeMap = [ - { - name: "headerBackgroundColor", - baseName: "header_background_color", - type: "string" - }, - { - name: "legalVersion", - baseName: "legal_version", - type: "string" - }, - { - name: "linkColor", - baseName: "link_color", - type: "string" - }, - { - name: "pageBackgroundColor", - baseName: "page_background_color", - type: "string" - }, - { - name: "primaryButtonColor", - baseName: "primary_button_color", - type: "string" - }, - { - name: "primaryButtonColorHover", - baseName: "primary_button_color_hover", - type: "string" - }, - { - name: "primaryButtonTextColor", - baseName: "primary_button_text_color", - type: "string" - }, - { - name: "primaryButtonTextColorHover", - baseName: "primary_button_text_color_hover", - type: "string" - }, - { - name: "secondaryButtonColor", - baseName: "secondary_button_color", - type: "string" - }, - { - name: "secondaryButtonColorHover", - baseName: "secondary_button_color_hover", - type: "string" - }, - { - name: "secondaryButtonTextColor", - baseName: "secondary_button_text_color", - type: "string" - }, - { - name: "secondaryButtonTextColorHover", - baseName: "secondary_button_text_color_hover", - type: "string" - }, - { - name: "textColor1", - baseName: "text_color1", - type: "string" - }, - { - name: "textColor2", - baseName: "text_color2", - type: "string" - } -]; // model/apiAppUpdateRequest.ts -var _ApiAppUpdateRequest = class { +var ApiAppUpdateRequest = class _ApiAppUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "customLogoFile", + baseName: "custom_logo_file", + type: "RequestFile" + }, + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "oauth", + baseName: "oauth", + type: "SubOAuth" + }, + { + name: "options", + baseName: "options", + type: "SubOptions" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "SubWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppUpdateRequest"); } }; -var ApiAppUpdateRequest = _ApiAppUpdateRequest; -ApiAppUpdateRequest.discriminator = void 0; -ApiAppUpdateRequest.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "customLogoFile", - baseName: "custom_logo_file", - type: "RequestFile" - }, - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "oauth", - baseName: "oauth", - type: "SubOAuth" - }, - { - name: "options", - baseName: "options", - type: "SubOptions" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "SubWhiteLabelingOptions" - } -]; // model/bulkSendJobGetResponse.ts -var _BulkSendJobGetResponse = class { +var BulkSendJobGetResponse = class _BulkSendJobGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJob", + baseName: "bulk_send_job", + type: "BulkSendJobResponse" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "signatureRequests", + baseName: "signature_requests", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobGetResponse"); } }; -var BulkSendJobGetResponse = _BulkSendJobGetResponse; -BulkSendJobGetResponse.discriminator = void 0; -BulkSendJobGetResponse.attributeTypeMap = [ - { - name: "bulkSendJob", - baseName: "bulk_send_job", - type: "BulkSendJobResponse" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "signatureRequests", - baseName: "signature_requests", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/bulkSendJobGetResponseSignatureRequests.ts -var _BulkSendJobGetResponseSignatureRequests = class { +var BulkSendJobGetResponseSignatureRequests = class _BulkSendJobGetResponseSignatureRequests { constructor() { + /** + * Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "isComplete", + baseName: "is_complete", + type: "boolean" + }, + { + name: "isDeclined", + baseName: "is_declined", + type: "boolean" + }, + { + name: "hasError", + baseName: "has_error", + type: "boolean" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "signingUrl", + baseName: "signing_url", + type: "string" + }, + { + name: "detailsUrl", + baseName: "details_url", + type: "string" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "responseData", + baseName: "response_data", + type: "Array" + }, + { + name: "signatures", + baseName: "signatures", + type: "Array" + }, + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobGetResponseSignatureRequests.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17104,325 +17617,255 @@ var _BulkSendJobGetResponseSignatureRequests = class { ); } }; -var BulkSendJobGetResponseSignatureRequests = _BulkSendJobGetResponseSignatureRequests; -BulkSendJobGetResponseSignatureRequests.discriminator = void 0; -BulkSendJobGetResponseSignatureRequests.attributeTypeMap = [ - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "isComplete", - baseName: "is_complete", - type: "boolean" - }, - { - name: "isDeclined", - baseName: "is_declined", - type: "boolean" - }, - { - name: "hasError", - baseName: "has_error", - type: "boolean" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "signingUrl", - baseName: "signing_url", - type: "string" - }, - { - name: "detailsUrl", - baseName: "details_url", - type: "string" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "responseData", - baseName: "response_data", - type: "Array" - }, - { - name: "signatures", - baseName: "signatures", - type: "Array" - }, - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - } -]; // model/bulkSendJobListResponse.ts -var _BulkSendJobListResponse = class { +var BulkSendJobListResponse = class _BulkSendJobListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJobs", + baseName: "bulk_send_jobs", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobListResponse"); } }; -var BulkSendJobListResponse = _BulkSendJobListResponse; -BulkSendJobListResponse.discriminator = void 0; -BulkSendJobListResponse.attributeTypeMap = [ - { - name: "bulkSendJobs", - baseName: "bulk_send_jobs", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/bulkSendJobResponse.ts -var _BulkSendJobResponse = class { +var BulkSendJobResponse = class _BulkSendJobResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + }, + { + name: "total", + baseName: "total", + type: "number" + }, + { + name: "isCreator", + baseName: "is_creator", + type: "boolean" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobResponse"); } }; -var BulkSendJobResponse = _BulkSendJobResponse; -BulkSendJobResponse.discriminator = void 0; -BulkSendJobResponse.attributeTypeMap = [ - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - }, - { - name: "total", - baseName: "total", - type: "number" - }, - { - name: "isCreator", - baseName: "is_creator", - type: "boolean" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - } -]; // model/bulkSendJobSendResponse.ts -var _BulkSendJobSendResponse = class { +var BulkSendJobSendResponse = class _BulkSendJobSendResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJob", + baseName: "bulk_send_job", + type: "BulkSendJobResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobSendResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobSendResponse"); } }; -var BulkSendJobSendResponse = _BulkSendJobSendResponse; -BulkSendJobSendResponse.discriminator = void 0; -BulkSendJobSendResponse.attributeTypeMap = [ - { - name: "bulkSendJob", - baseName: "bulk_send_job", - type: "BulkSendJobResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedEditUrlRequest.ts -var _EmbeddedEditUrlRequest = class { +var EmbeddedEditUrlRequest = class _EmbeddedEditUrlRequest { constructor() { + /** + * This allows the requester to enable/disable to add or change CC roles when editing the template. + */ this["allowEditCcs"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * This allows the requester to enable the preview experience (i.e. does not allow the requester\'s end user to add any additional fields via the editor). **NOTE:** This parameter overwrites `show_preview=true` (if set). + */ this["previewOnly"] = false; + /** + * This allows the requester to enable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "allowEditCcs", + baseName: "allow_edit_ccs", + type: "boolean" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "previewOnly", + baseName: "preview_only", + type: "boolean" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedEditUrlRequest"); } }; -var EmbeddedEditUrlRequest = _EmbeddedEditUrlRequest; -EmbeddedEditUrlRequest.discriminator = void 0; -EmbeddedEditUrlRequest.attributeTypeMap = [ - { - name: "allowEditCcs", - baseName: "allow_edit_ccs", - type: "boolean" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "previewOnly", - baseName: "preview_only", - type: "boolean" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/embeddedEditUrlResponse.ts -var _EmbeddedEditUrlResponse = class { +var EmbeddedEditUrlResponse = class _EmbeddedEditUrlResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "embedded", + baseName: "embedded", + type: "EmbeddedEditUrlResponseEmbedded" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedEditUrlResponse"); } }; -var EmbeddedEditUrlResponse = _EmbeddedEditUrlResponse; -EmbeddedEditUrlResponse.discriminator = void 0; -EmbeddedEditUrlResponse.attributeTypeMap = [ - { - name: "embedded", - baseName: "embedded", - type: "EmbeddedEditUrlResponseEmbedded" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedEditUrlResponseEmbedded.ts -var _EmbeddedEditUrlResponseEmbedded = class { +var EmbeddedEditUrlResponseEmbedded = class _EmbeddedEditUrlResponseEmbedded { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "editUrl", + baseName: "edit_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlResponseEmbedded.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17430,50 +17873,58 @@ var _EmbeddedEditUrlResponseEmbedded = class { ); } }; -var EmbeddedEditUrlResponseEmbedded = _EmbeddedEditUrlResponseEmbedded; -EmbeddedEditUrlResponseEmbedded.discriminator = void 0; -EmbeddedEditUrlResponseEmbedded.attributeTypeMap = [ - { - name: "editUrl", - baseName: "edit_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/embeddedSignUrlResponse.ts -var _EmbeddedSignUrlResponse = class { +var EmbeddedSignUrlResponse = class _EmbeddedSignUrlResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "embedded", + baseName: "embedded", + type: "EmbeddedSignUrlResponseEmbedded" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedSignUrlResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedSignUrlResponse"); } }; -var EmbeddedSignUrlResponse = _EmbeddedSignUrlResponse; -EmbeddedSignUrlResponse.discriminator = void 0; -EmbeddedSignUrlResponse.attributeTypeMap = [ - { - name: "embedded", - baseName: "embedded", - type: "EmbeddedSignUrlResponseEmbedded" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedSignUrlResponseEmbedded.ts -var _EmbeddedSignUrlResponseEmbedded = class { +var EmbeddedSignUrlResponseEmbedded = class _EmbeddedSignUrlResponseEmbedded { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signUrl", + baseName: "sign_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedSignUrlResponseEmbedded.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17481,157 +17932,173 @@ var _EmbeddedSignUrlResponseEmbedded = class { ); } }; -var EmbeddedSignUrlResponseEmbedded = _EmbeddedSignUrlResponseEmbedded; -EmbeddedSignUrlResponseEmbedded.discriminator = void 0; -EmbeddedSignUrlResponseEmbedded.attributeTypeMap = [ - { - name: "signUrl", - baseName: "sign_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/errorResponse.ts -var _ErrorResponse = class { +var ErrorResponse = class _ErrorResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "error", + baseName: "error", + type: "ErrorResponseError" + } + ]; + } static getAttributeTypeMap() { return _ErrorResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ErrorResponse"); } }; -var ErrorResponse = _ErrorResponse; -ErrorResponse.discriminator = void 0; -ErrorResponse.attributeTypeMap = [ - { - name: "error", - baseName: "error", - type: "ErrorResponseError" - } -]; // model/errorResponseError.ts -var _ErrorResponseError = class { +var ErrorResponseError = class _ErrorResponseError { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "errorMsg", + baseName: "error_msg", + type: "string" + }, + { + name: "errorName", + baseName: "error_name", + type: "string" + }, + { + name: "errorPath", + baseName: "error_path", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ErrorResponseError.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ErrorResponseError"); } }; -var ErrorResponseError = _ErrorResponseError; -ErrorResponseError.discriminator = void 0; -ErrorResponseError.attributeTypeMap = [ - { - name: "errorMsg", - baseName: "error_msg", - type: "string" - }, - { - name: "errorName", - baseName: "error_name", - type: "string" - }, - { - name: "errorPath", - baseName: "error_path", - type: "string" - } -]; // model/eventCallbackHelper.ts -var crypto = __toESM(require("crypto")); -var _EventCallbackHelper = class { -}; -var EventCallbackHelper = _EventCallbackHelper; -EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; -EventCallbackHelper.EVENT_TYPE_APP_CALLBACK = "app_callback"; -EventCallbackHelper.isValid = (apiKey, eventCallback) => { - const hmac = crypto.createHmac("sha256", apiKey); - hmac.update( - `${eventCallback.event.eventTime}${eventCallback.event.eventType}` - ); - return eventCallback.event.eventHash === hmac.digest("hex").toString(); -}; -EventCallbackHelper.getCallbackType = (eventCallback) => { - if (!eventCallback.event.eventMetadata || !eventCallback.event.eventMetadata.reportedForAppId) { - return _EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK; +var crypto2 = __toESM(require("crypto")); +var EventCallbackHelper = class _EventCallbackHelper { + static { + this.EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; + } + static { + this.EVENT_TYPE_APP_CALLBACK = "app_callback"; + } + static { + /** + * Verify that callback came from HelloSign.com + */ + this.isValid = (apiKey, eventCallback) => { + const hmac = crypto2.createHmac("sha256", apiKey); + hmac.update( + `${eventCallback.event.eventTime}${eventCallback.event.eventType}` + ); + return eventCallback.event.eventHash === hmac.digest("hex").toString(); + }; + } + static { + /** + * Identifies the callback type, one of "account_callback" or "app_callback". + * "app_callback" will always include a value for "reported_for_app_id" + */ + this.getCallbackType = (eventCallback) => { + if (!eventCallback.event.eventMetadata || !eventCallback.event.eventMetadata.reportedForAppId) { + return _EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK; + } + return _EventCallbackHelper.EVENT_TYPE_APP_CALLBACK; + }; } - return _EventCallbackHelper.EVENT_TYPE_APP_CALLBACK; }; // model/eventCallbackRequest.ts -var _EventCallbackRequest = class { +var EventCallbackRequest = class _EventCallbackRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "event", + baseName: "event", + type: "EventCallbackRequestEvent" + }, + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "signatureRequest", + baseName: "signature_request", + type: "SignatureRequestResponse" + }, + { + name: "template", + baseName: "template", + type: "TemplateResponse" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EventCallbackRequest"); } }; -var EventCallbackRequest = _EventCallbackRequest; -EventCallbackRequest.discriminator = void 0; -EventCallbackRequest.attributeTypeMap = [ - { - name: "event", - baseName: "event", - type: "EventCallbackRequestEvent" - }, - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "signatureRequest", - baseName: "signature_request", - type: "SignatureRequestResponse" - }, - { - name: "template", - baseName: "template", - type: "TemplateResponse" - } -]; // model/eventCallbackRequestEvent.ts -var _EventCallbackRequestEvent = class { +var EventCallbackRequestEvent = class _EventCallbackRequestEvent { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "eventTime", + baseName: "event_time", + type: "string" + }, + { + name: "eventType", + baseName: "event_type", + type: "EventCallbackRequestEvent.EventTypeEnum" + }, + { + name: "eventHash", + baseName: "event_hash", + type: "string" + }, + { + name: "eventMetadata", + baseName: "event_metadata", + type: "EventCallbackRequestEventMetadata" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequestEvent.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EventCallbackRequestEvent"); } }; -var EventCallbackRequestEvent = _EventCallbackRequestEvent; -EventCallbackRequestEvent.discriminator = void 0; -EventCallbackRequestEvent.attributeTypeMap = [ - { - name: "eventTime", - baseName: "event_time", - type: "string" - }, - { - name: "eventType", - baseName: "event_type", - type: "EventCallbackRequestEvent.EventTypeEnum" - }, - { - name: "eventHash", - baseName: "event_hash", - type: "string" - }, - { - name: "eventMetadata", - baseName: "event_metadata", - type: "EventCallbackRequestEventMetadata" - } -]; ((EventCallbackRequestEvent2) => { let EventTypeEnum; ((EventTypeEnum2) => { @@ -17662,10 +18129,38 @@ EventCallbackRequestEvent.attributeTypeMap = [ })(EventCallbackRequestEvent || (EventCallbackRequestEvent = {})); // model/eventCallbackRequestEventMetadata.ts -var _EventCallbackRequestEventMetadata = class { +var EventCallbackRequestEventMetadata = class _EventCallbackRequestEventMetadata { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "relatedSignatureId", + baseName: "related_signature_id", + type: "string" + }, + { + name: "reportedForAccountId", + baseName: "reported_for_account_id", + type: "string" + }, + { + name: "reportedForAppId", + baseName: "reported_for_app_id", + type: "string" + }, + { + name: "eventMessage", + baseName: "event_message", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequestEventMetadata.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17673,83 +18168,67 @@ var _EventCallbackRequestEventMetadata = class { ); } }; -var EventCallbackRequestEventMetadata = _EventCallbackRequestEventMetadata; -EventCallbackRequestEventMetadata.discriminator = void 0; -EventCallbackRequestEventMetadata.attributeTypeMap = [ - { - name: "relatedSignatureId", - baseName: "related_signature_id", - type: "string" - }, - { - name: "reportedForAccountId", - baseName: "reported_for_account_id", - type: "string" - }, - { - name: "reportedForAppId", - baseName: "reported_for_app_id", - type: "string" - }, - { - name: "eventMessage", - baseName: "event_message", - type: "string" - } -]; // model/faxGetResponse.ts -var _FaxGetResponse = class { +var FaxGetResponse = class _FaxGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "fax", + baseName: "fax", + type: "FaxResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxGetResponse"); } }; -var FaxGetResponse = _FaxGetResponse; -FaxGetResponse.discriminator = void 0; -FaxGetResponse.attributeTypeMap = [ - { - name: "fax", - baseName: "fax", - type: "FaxResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/faxLineAddUserRequest.ts -var _FaxLineAddUserRequest = class { +var FaxLineAddUserRequest = class _FaxLineAddUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineAddUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineAddUserRequest"); } }; -var FaxLineAddUserRequest = _FaxLineAddUserRequest; -FaxLineAddUserRequest.discriminator = void 0; -FaxLineAddUserRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/faxLineAreaCodeGetCountryEnum.ts var FaxLineAreaCodeGetCountryEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetCountryEnum2) => { @@ -17778,23 +18257,27 @@ var FaxLineAreaCodeGetProvinceEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetProvinc })(FaxLineAreaCodeGetProvinceEnum || {}); // model/faxLineAreaCodeGetResponse.ts -var _FaxLineAreaCodeGetResponse = class { +var FaxLineAreaCodeGetResponse = class _FaxLineAreaCodeGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "areaCodes", + baseName: "area_codes", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxLineAreaCodeGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineAreaCodeGetResponse"); } }; -var FaxLineAreaCodeGetResponse = _FaxLineAreaCodeGetResponse; -FaxLineAreaCodeGetResponse.discriminator = void 0; -FaxLineAreaCodeGetResponse.attributeTypeMap = [ - { - name: "areaCodes", - baseName: "area_codes", - type: "Array" - } -]; // model/faxLineAreaCodeGetStateEnum.ts var FaxLineAreaCodeGetStateEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetStateEnum2) => { @@ -17853,38 +18336,42 @@ var FaxLineAreaCodeGetStateEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetStateEnum2 })(FaxLineAreaCodeGetStateEnum || {}); // model/faxLineCreateRequest.ts -var _FaxLineCreateRequest = class { +var FaxLineCreateRequest = class _FaxLineCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "areaCode", + baseName: "area_code", + type: "number" + }, + { + name: "country", + baseName: "country", + type: "FaxLineCreateRequest.CountryEnum" + }, + { + name: "city", + baseName: "city", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineCreateRequest"); } }; -var FaxLineCreateRequest = _FaxLineCreateRequest; -FaxLineCreateRequest.discriminator = void 0; -FaxLineCreateRequest.attributeTypeMap = [ - { - name: "areaCode", - baseName: "area_code", - type: "number" - }, - { - name: "country", - baseName: "country", - type: "FaxLineCreateRequest.CountryEnum" - }, - { - name: "city", - baseName: "city", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - } -]; ((FaxLineCreateRequest2) => { let CountryEnum; ((CountryEnum2) => { @@ -17895,261 +18382,293 @@ FaxLineCreateRequest.attributeTypeMap = [ })(FaxLineCreateRequest || (FaxLineCreateRequest = {})); // model/faxLineDeleteRequest.ts -var _FaxLineDeleteRequest = class { +var FaxLineDeleteRequest = class _FaxLineDeleteRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineDeleteRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineDeleteRequest"); } }; -var FaxLineDeleteRequest = _FaxLineDeleteRequest; -FaxLineDeleteRequest.discriminator = void 0; -FaxLineDeleteRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - } -]; // model/faxLineListResponse.ts -var _FaxLineListResponse = class { +var FaxLineListResponse = class _FaxLineListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "faxLines", + baseName: "fax_lines", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxLineListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineListResponse"); } }; -var FaxLineListResponse = _FaxLineListResponse; -FaxLineListResponse.discriminator = void 0; -FaxLineListResponse.attributeTypeMap = [ - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "faxLines", - baseName: "fax_lines", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "WarningResponse" - } -]; // model/faxLineRemoveUserRequest.ts -var _FaxLineRemoveUserRequest = class { +var FaxLineRemoveUserRequest = class _FaxLineRemoveUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineRemoveUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineRemoveUserRequest"); } }; -var FaxLineRemoveUserRequest = _FaxLineRemoveUserRequest; -FaxLineRemoveUserRequest.discriminator = void 0; -FaxLineRemoveUserRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/faxLineResponse.ts -var _FaxLineResponse = class { +var FaxLineResponse = class _FaxLineResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxLine", + baseName: "fax_line", + type: "FaxLineResponseFaxLine" + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxLineResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineResponse"); } }; -var FaxLineResponse = _FaxLineResponse; -FaxLineResponse.discriminator = void 0; -FaxLineResponse.attributeTypeMap = [ - { - name: "faxLine", - baseName: "fax_line", - type: "FaxLineResponseFaxLine" - }, - { - name: "warnings", - baseName: "warnings", - type: "WarningResponse" - } -]; // model/faxLineResponseFaxLine.ts -var _FaxLineResponseFaxLine = class { +var FaxLineResponseFaxLine = class _FaxLineResponseFaxLine { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "updatedAt", + baseName: "updated_at", + type: "number" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxLineResponseFaxLine.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineResponseFaxLine"); } }; -var FaxLineResponseFaxLine = _FaxLineResponseFaxLine; -FaxLineResponseFaxLine.discriminator = void 0; -FaxLineResponseFaxLine.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "updatedAt", - baseName: "updated_at", - type: "number" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - } -]; // model/faxListResponse.ts -var _FaxListResponse = class { +var FaxListResponse = class _FaxListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxes", + baseName: "faxes", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxListResponse"); } }; -var FaxListResponse = _FaxListResponse; -FaxListResponse.discriminator = void 0; -FaxListResponse.attributeTypeMap = [ - { - name: "faxes", - baseName: "faxes", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - } -]; // model/faxResponse.ts -var _FaxResponse = class { +var FaxResponse = class _FaxResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxId", + baseName: "fax_id", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "sender", + baseName: "sender", + type: "string" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "transmissions", + baseName: "transmissions", + type: "Array" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxResponse"); } }; -var FaxResponse = _FaxResponse; -FaxResponse.discriminator = void 0; -FaxResponse.attributeTypeMap = [ - { - name: "faxId", - baseName: "fax_id", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "sender", - baseName: "sender", - type: "string" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "transmissions", - baseName: "transmissions", - type: "Array" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - } -]; // model/faxResponseTransmission.ts -var _FaxResponseTransmission = class { +var FaxResponseTransmission = class _FaxResponseTransmission { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "recipient", + baseName: "recipient", + type: "string" + }, + { + name: "statusCode", + baseName: "status_code", + type: "FaxResponseTransmission.StatusCodeEnum" + }, + { + name: "sentAt", + baseName: "sent_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _FaxResponseTransmission.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxResponseTransmission"); } }; -var FaxResponseTransmission = _FaxResponseTransmission; -FaxResponseTransmission.discriminator = void 0; -FaxResponseTransmission.attributeTypeMap = [ - { - name: "recipient", - baseName: "recipient", - type: "string" - }, - { - name: "statusCode", - baseName: "status_code", - type: "FaxResponseTransmission.StatusCodeEnum" - }, - { - name: "sentAt", - baseName: "sent_at", - type: "number" - } -]; ((FaxResponseTransmission2) => { let StatusCodeEnum; ((StatusCodeEnum2) => { @@ -18165,143 +18684,162 @@ FaxResponseTransmission.attributeTypeMap = [ })(FaxResponseTransmission || (FaxResponseTransmission = {})); // model/faxSendRequest.ts -var _FaxSendRequest = class { +var FaxSendRequest = class _FaxSendRequest { constructor() { + /** + * API Test Mode Setting + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "recipient", + baseName: "recipient", + type: "string" + }, + { + name: "sender", + baseName: "sender", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "coverPageTo", + baseName: "cover_page_to", + type: "string" + }, + { + name: "coverPageFrom", + baseName: "cover_page_from", + type: "string" + }, + { + name: "coverPageMessage", + baseName: "cover_page_message", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxSendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxSendRequest"); } }; -var FaxSendRequest = _FaxSendRequest; -FaxSendRequest.discriminator = void 0; -FaxSendRequest.attributeTypeMap = [ - { - name: "recipient", - baseName: "recipient", - type: "string" - }, - { - name: "sender", - baseName: "sender", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "coverPageTo", - baseName: "cover_page_to", - type: "string" - }, - { - name: "coverPageFrom", - baseName: "cover_page_from", - type: "string" - }, - { - name: "coverPageMessage", - baseName: "cover_page_message", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/fileResponse.ts -var _FileResponse = class { +var FileResponse = class _FileResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "fileUrl", + baseName: "file_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _FileResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FileResponse"); } }; -var FileResponse = _FileResponse; -FileResponse.discriminator = void 0; -FileResponse.attributeTypeMap = [ - { - name: "fileUrl", - baseName: "file_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/fileResponseDataUri.ts -var _FileResponseDataUri = class { +var FileResponseDataUri = class _FileResponseDataUri { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "dataUri", + baseName: "data_uri", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FileResponseDataUri.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FileResponseDataUri"); } }; -var FileResponseDataUri = _FileResponseDataUri; -FileResponseDataUri.discriminator = void 0; -FileResponseDataUri.attributeTypeMap = [ - { - name: "dataUri", - baseName: "data_uri", - type: "string" - } -]; // model/listInfoResponse.ts -var _ListInfoResponse = class { +var ListInfoResponse = class _ListInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "numPages", + baseName: "num_pages", + type: "number" + }, + { + name: "numResults", + baseName: "num_results", + type: "number" + }, + { + name: "page", + baseName: "page", + type: "number" + }, + { + name: "pageSize", + baseName: "page_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _ListInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ListInfoResponse"); } }; -var ListInfoResponse = _ListInfoResponse; -ListInfoResponse.discriminator = void 0; -ListInfoResponse.attributeTypeMap = [ - { - name: "numPages", - baseName: "num_pages", - type: "number" - }, - { - name: "numResults", - baseName: "num_results", - type: "number" - }, - { - name: "page", - baseName: "page", - type: "number" - }, - { - name: "pageSize", - baseName: "page_size", - type: "number" - } -]; // model/models.ts var primitives = [ @@ -18314,7 +18852,19 @@ var primitives = [ "number", "any" ]; -var ObjectSerializer = class { +function startsWith(str, match) { + return str.substring(0, match.length) === match; +} +function endsWith2(str, match) { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} +var nullableSuffix = " | null"; +var optionalSuffix = " | undefined"; +var arrayPrefix = "Array<"; +var arraySuffix = ">"; +var mapPrefix = "{ [key: string]: "; +var mapSuffix = "; }"; +var ObjectSerializer = class _ObjectSerializer { static findCorrectType(data, expectedType) { if (data == void 0) { return expectedType; @@ -18358,13 +18908,25 @@ var ObjectSerializer = class { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { - let subType = type.replace("Array<", ""); - subType = subType.substring(0, subType.length - 1); + } else if (endsWith2(type, nullableSuffix)) { + let subType = type.slice(0, -nullableSuffix.length); + return _ObjectSerializer.serialize(data, subType); + } else if (endsWith2(type, optionalSuffix)) { + let subType = type.slice(0, -optionalSuffix.length); + return _ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType = type.slice(arrayPrefix.length, -arraySuffix.length); let transformedData = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; - transformedData.push(ObjectSerializer.serialize(datum, subType)); + transformedData.push(_ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType = type.slice(mapPrefix.length, -mapSuffix.length); + let transformedData = {}; + for (let key in data) { + transformedData[key] = _ObjectSerializer.serialize(data[key], subType); } return transformedData; } else if (type === "Date") { @@ -18381,7 +18943,7 @@ var ObjectSerializer = class { let instance = {}; for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; - let value = ObjectSerializer.serialize( + let value = _ObjectSerializer.serialize( data[attributeType.name], attributeType.type ); @@ -18393,18 +18955,30 @@ var ObjectSerializer = class { } } static deserialize(data, type) { - type = ObjectSerializer.findCorrectType(data, type); + type = _ObjectSerializer.findCorrectType(data, type); if (data == void 0) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { - let subType = type.replace("Array<", ""); - subType = subType.substring(0, subType.length - 1); + } else if (endsWith2(type, nullableSuffix)) { + let subType = type.slice(0, -nullableSuffix.length); + return _ObjectSerializer.deserialize(data, subType); + } else if (endsWith2(type, optionalSuffix)) { + let subType = type.slice(0, -optionalSuffix.length); + return _ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType = type.slice(arrayPrefix.length, -arraySuffix.length); let transformedData = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; - transformedData.push(ObjectSerializer.deserialize(datum, subType)); + transformedData.push(_ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType = type.slice(mapPrefix.length, -mapSuffix.length); + let transformedData = {}; + for (let key in data) { + transformedData[key] = _ObjectSerializer.deserialize(data[key], subType); } return transformedData; } else if (type === "Date") { @@ -18421,7 +18995,7 @@ var ObjectSerializer = class { for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; const propertyKey = data[attributeType.baseName] !== void 0 ? attributeType.baseName : attributeType.name; - instance[attributeType.name] = ObjectSerializer.deserialize( + instance[attributeType.name] = _ObjectSerializer.deserialize( data[propertyKey], attributeType.type ); @@ -18493,151 +19067,173 @@ var VoidAuth = class { }; // model/oAuthTokenGenerateRequest.ts -var _OAuthTokenGenerateRequest = class { +var OAuthTokenGenerateRequest = class _OAuthTokenGenerateRequest { constructor() { + /** + * When generating a new token use `authorization_code`. + */ this["grantType"] = "authorization_code"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + }, + { + name: "code", + baseName: "code", + type: "string" + }, + { + name: "grantType", + baseName: "grant_type", + type: "string" + }, + { + name: "state", + baseName: "state", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenGenerateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenGenerateRequest"); } }; -var OAuthTokenGenerateRequest = _OAuthTokenGenerateRequest; -OAuthTokenGenerateRequest.discriminator = void 0; -OAuthTokenGenerateRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - }, - { - name: "code", - baseName: "code", - type: "string" - }, - { - name: "grantType", - baseName: "grant_type", - type: "string" - }, - { - name: "state", - baseName: "state", - type: "string" - } -]; // model/oAuthTokenRefreshRequest.ts -var _OAuthTokenRefreshRequest = class { +var OAuthTokenRefreshRequest = class _OAuthTokenRefreshRequest { constructor() { + /** + * When refreshing an existing token use `refresh_token`. + */ this["grantType"] = "refresh_token"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "grantType", + baseName: "grant_type", + type: "string" + }, + { + name: "refreshToken", + baseName: "refresh_token", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenRefreshRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenRefreshRequest"); } }; -var OAuthTokenRefreshRequest = _OAuthTokenRefreshRequest; -OAuthTokenRefreshRequest.discriminator = void 0; -OAuthTokenRefreshRequest.attributeTypeMap = [ - { - name: "grantType", - baseName: "grant_type", - type: "string" - }, - { - name: "refreshToken", - baseName: "refresh_token", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - } -]; // model/oAuthTokenResponse.ts -var _OAuthTokenResponse = class { +var OAuthTokenResponse = class _OAuthTokenResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accessToken", + baseName: "access_token", + type: "string" + }, + { + name: "tokenType", + baseName: "token_type", + type: "string" + }, + { + name: "refreshToken", + baseName: "refresh_token", + type: "string" + }, + { + name: "expiresIn", + baseName: "expires_in", + type: "number" + }, + { + name: "state", + baseName: "state", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenResponse"); } }; -var OAuthTokenResponse = _OAuthTokenResponse; -OAuthTokenResponse.discriminator = void 0; -OAuthTokenResponse.attributeTypeMap = [ - { - name: "accessToken", - baseName: "access_token", - type: "string" - }, - { - name: "tokenType", - baseName: "token_type", - type: "string" - }, - { - name: "refreshToken", - baseName: "refresh_token", - type: "string" - }, - { - name: "expiresIn", - baseName: "expires_in", - type: "number" - }, - { - name: "state", - baseName: "state", - type: "string" - } -]; // model/reportCreateRequest.ts -var _ReportCreateRequest = class { +var ReportCreateRequest = class _ReportCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "endDate", + baseName: "end_date", + type: "string" + }, + { + name: "reportType", + baseName: "report_type", + type: "Array" + }, + { + name: "startDate", + baseName: "start_date", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ReportCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportCreateRequest"); } }; -var ReportCreateRequest = _ReportCreateRequest; -ReportCreateRequest.discriminator = void 0; -ReportCreateRequest.attributeTypeMap = [ - { - name: "endDate", - baseName: "end_date", - type: "string" - }, - { - name: "reportType", - baseName: "report_type", - type: "Array" - }, - { - name: "startDate", - baseName: "start_date", - type: "string" - } -]; ((ReportCreateRequest2) => { let ReportTypeEnum; ((ReportTypeEnum2) => { @@ -18647,62 +19243,70 @@ ReportCreateRequest.attributeTypeMap = [ })(ReportCreateRequest || (ReportCreateRequest = {})); // model/reportCreateResponse.ts -var _ReportCreateResponse = class { +var ReportCreateResponse = class _ReportCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "report", + baseName: "report", + type: "ReportResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ReportCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportCreateResponse"); } }; -var ReportCreateResponse = _ReportCreateResponse; -ReportCreateResponse.discriminator = void 0; -ReportCreateResponse.attributeTypeMap = [ - { - name: "report", - baseName: "report", - type: "ReportResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/reportResponse.ts -var _ReportResponse = class { +var ReportResponse = class _ReportResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "success", + baseName: "success", + type: "string" + }, + { + name: "startDate", + baseName: "start_date", + type: "string" + }, + { + name: "endDate", + baseName: "end_date", + type: "string" + }, + { + name: "reportType", + baseName: "report_type", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ReportResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportResponse"); } }; -var ReportResponse = _ReportResponse; -ReportResponse.discriminator = void 0; -ReportResponse.attributeTypeMap = [ - { - name: "success", - baseName: "success", - type: "string" - }, - { - name: "startDate", - baseName: "start_date", - type: "string" - }, - { - name: "endDate", - baseName: "end_date", - type: "string" - }, - { - name: "reportType", - baseName: "report_type", - type: "Array" - } -]; ((ReportResponse2) => { let ReportTypeEnum; ((ReportTypeEnum2) => { @@ -18712,14 +19316,93 @@ ReportResponse.attributeTypeMap = [ })(ReportResponse || (ReportResponse = {})); // model/signatureRequestBulkCreateEmbeddedWithTemplateRequest.ts -var _SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class { +var SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class _SignatureRequestBulkCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signerFile", + baseName: "signer_file", + type: "RequestFile" + }, + { + name: "signerList", + baseName: "signer_list", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -18727,85 +19410,95 @@ var _SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class { ); } }; -var SignatureRequestBulkCreateEmbeddedWithTemplateRequest = _SignatureRequestBulkCreateEmbeddedWithTemplateRequest; -SignatureRequestBulkCreateEmbeddedWithTemplateRequest.discriminator = void 0; -SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "signerFile", - baseName: "signer_file", - type: "RequestFile" - }, - { - name: "signerList", - baseName: "signer_list", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestBulkSendWithTemplateRequest.ts -var _SignatureRequestBulkSendWithTemplateRequest = class { +var SignatureRequestBulkSendWithTemplateRequest = class _SignatureRequestBulkSendWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signerFile", + baseName: "signer_file", + type: "RequestFile" + }, + { + name: "signerList", + baseName: "signer_list", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -18813,89 +19506,166 @@ var _SignatureRequestBulkSendWithTemplateRequest = class { ); } }; -var SignatureRequestBulkSendWithTemplateRequest = _SignatureRequestBulkSendWithTemplateRequest; -SignatureRequestBulkSendWithTemplateRequest.discriminator = void 0; -SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "signerFile", - baseName: "signer_file", - type: "RequestFile" - }, - { - name: "signerList", - baseName: "signer_list", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestCreateEmbeddedRequest.ts -var _SignatureRequestCreateEmbeddedRequest = class { +var SignatureRequestCreateEmbeddedRequest = class _SignatureRequestCreateEmbeddedRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + */ this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ this["hideTextTags"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestCreateEmbeddedRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -18903,141 +19673,109 @@ var _SignatureRequestCreateEmbeddedRequest = class { ); } }; -var SignatureRequestCreateEmbeddedRequest = _SignatureRequestCreateEmbeddedRequest; -SignatureRequestCreateEmbeddedRequest.discriminator = void 0; -SignatureRequestCreateEmbeddedRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "groupedSigners", - baseName: "grouped_signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/signatureRequestCreateEmbeddedWithTemplateRequest.ts -var _SignatureRequestCreateEmbeddedWithTemplateRequest = class { +var SignatureRequestCreateEmbeddedWithTemplateRequest = class _SignatureRequestCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19045,310 +19783,849 @@ var _SignatureRequestCreateEmbeddedWithTemplateRequest = class { ); } }; -var SignatureRequestCreateEmbeddedWithTemplateRequest = _SignatureRequestCreateEmbeddedWithTemplateRequest; -SignatureRequestCreateEmbeddedWithTemplateRequest.discriminator = void 0; -SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" + +// model/signatureRequestEditEmbeddedRequest.ts +var SignatureRequestEditEmbeddedRequest = class _SignatureRequestEditEmbeddedRequest { + constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + */ + this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ + this["hideTextTags"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ + this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ + this["populateAutoFillFields"] = false; } -]; + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } + static getAttributeTypeMap() { + return _SignatureRequestEditEmbeddedRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditEmbeddedRequest" + ); + } +}; + +// model/signatureRequestEditEmbeddedWithTemplateRequest.ts +var SignatureRequestEditEmbeddedWithTemplateRequest = class _SignatureRequestEditEmbeddedWithTemplateRequest { + constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ + this["populateAutoFillFields"] = false; + } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + } + ]; + } + static getAttributeTypeMap() { + return _SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + } +}; + +// model/signatureRequestEditRequest.ts +var SignatureRequestEditRequest = class _SignatureRequestEditRequest { + constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ + this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ + this["hideTextTags"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ + this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ + this["useTextTags"] = false; + } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } + static getAttributeTypeMap() { + return _SignatureRequestEditRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "SignatureRequestEditRequest"); + } +}; + +// model/signatureRequestEditWithTemplateRequest.ts +var SignatureRequestEditWithTemplateRequest = class _SignatureRequestEditWithTemplateRequest { + constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ + this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + this["testMode"] = false; + } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } + static getAttributeTypeMap() { + return _SignatureRequestEditWithTemplateRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditWithTemplateRequest" + ); + } +}; // model/signatureRequestGetResponse.ts -var _SignatureRequestGetResponse = class { +var SignatureRequestGetResponse = class _SignatureRequestGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequest", + baseName: "signature_request", + type: "SignatureRequestResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestGetResponse"); } }; -var SignatureRequestGetResponse = _SignatureRequestGetResponse; -SignatureRequestGetResponse.discriminator = void 0; -SignatureRequestGetResponse.attributeTypeMap = [ - { - name: "signatureRequest", - baseName: "signature_request", - type: "SignatureRequestResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/signatureRequestListResponse.ts -var _SignatureRequestListResponse = class { +var SignatureRequestListResponse = class _SignatureRequestListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequests", + baseName: "signature_requests", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestListResponse"); } }; -var SignatureRequestListResponse = _SignatureRequestListResponse; -SignatureRequestListResponse.discriminator = void 0; -SignatureRequestListResponse.attributeTypeMap = [ - { - name: "signatureRequests", - baseName: "signature_requests", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/signatureRequestRemindRequest.ts -var _SignatureRequestRemindRequest = class { +var SignatureRequestRemindRequest = class _SignatureRequestRemindRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestRemindRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestRemindRequest"); } }; -var SignatureRequestRemindRequest = _SignatureRequestRemindRequest; -SignatureRequestRemindRequest.discriminator = void 0; -SignatureRequestRemindRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/signatureRequestResponse.ts -var _SignatureRequestResponse = class { +var SignatureRequestResponse = class _SignatureRequestResponse { constructor() { + /** + * Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "isComplete", + baseName: "is_complete", + type: "boolean" + }, + { + name: "isDeclined", + baseName: "is_declined", + type: "boolean" + }, + { + name: "hasError", + baseName: "has_error", + type: "boolean" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "signingUrl", + baseName: "signing_url", + type: "string" + }, + { + name: "detailsUrl", + baseName: "details_url", + type: "string" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "responseData", + baseName: "response_data", + type: "Array" + }, + { + name: "signatures", + baseName: "signatures", + type: "Array" + }, + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestResponse"); } }; -var SignatureRequestResponse = _SignatureRequestResponse; -SignatureRequestResponse.discriminator = void 0; -SignatureRequestResponse.attributeTypeMap = [ - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "isComplete", - baseName: "is_complete", - type: "boolean" - }, - { - name: "isDeclined", - baseName: "is_declined", - type: "boolean" - }, - { - name: "hasError", - baseName: "has_error", - type: "boolean" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "signingUrl", - baseName: "signing_url", - type: "string" - }, - { - name: "detailsUrl", - baseName: "details_url", - type: "string" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "responseData", - baseName: "response_data", - type: "Array" - }, - { - name: "signatures", - baseName: "signatures", - type: "Array" - }, - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - } -]; // model/signatureRequestResponseAttachment.ts -var _SignatureRequestResponseAttachment = class { +var SignatureRequestResponseAttachment = class _SignatureRequestResponseAttachment { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "instructions", + baseName: "instructions", + type: "string" + }, + { + name: "uploadedAt", + baseName: "uploaded_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseAttachment.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19356,43 +20633,41 @@ var _SignatureRequestResponseAttachment = class { ); } }; -var SignatureRequestResponseAttachment = _SignatureRequestResponseAttachment; -SignatureRequestResponseAttachment.discriminator = void 0; -SignatureRequestResponseAttachment.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "instructions", - baseName: "instructions", - type: "string" - }, - { - name: "uploadedAt", - baseName: "uploaded_at", - type: "number" - } -]; // model/signatureRequestResponseCustomFieldBase.ts -var _SignatureRequestResponseCustomFieldBase = class { +var SignatureRequestResponseCustomFieldBase = class _SignatureRequestResponseCustomFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "editor", + baseName: "editor", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseCustomFieldBase.attributeTypeMap; } @@ -19409,45 +20684,37 @@ var _SignatureRequestResponseCustomFieldBase = class { return null; } }; -var SignatureRequestResponseCustomFieldBase = _SignatureRequestResponseCustomFieldBase; -SignatureRequestResponseCustomFieldBase.discriminator = "type"; -SignatureRequestResponseCustomFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "editor", - baseName: "editor", - type: "string" - } -]; // model/signatureRequestResponseCustomFieldCheckbox.ts -var _SignatureRequestResponseCustomFieldCheckbox = class extends SignatureRequestResponseCustomFieldBase { +var SignatureRequestResponseCustomFieldCheckbox = class _SignatureRequestResponseCustomFieldCheckbox extends SignatureRequestResponseCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only \'text\' and \'checkbox\' are currently supported. + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseCustomFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19455,30 +20722,37 @@ var _SignatureRequestResponseCustomFieldCheckbox = class extends SignatureReques ); } }; -var SignatureRequestResponseCustomFieldCheckbox = _SignatureRequestResponseCustomFieldCheckbox; -SignatureRequestResponseCustomFieldCheckbox.discriminator = void 0; -SignatureRequestResponseCustomFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseCustomFieldText.ts -var _SignatureRequestResponseCustomFieldText = class extends SignatureRequestResponseCustomFieldBase { +var SignatureRequestResponseCustomFieldText = class _SignatureRequestResponseCustomFieldText extends SignatureRequestResponseCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only \'text\' and \'checkbox\' are currently supported. + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseCustomFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19486,20 +20760,6 @@ var _SignatureRequestResponseCustomFieldText = class extends SignatureRequestRes ); } }; -var SignatureRequestResponseCustomFieldText = _SignatureRequestResponseCustomFieldText; -SignatureRequestResponseCustomFieldText.discriminator = void 0; -SignatureRequestResponseCustomFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseCustomFieldTypeEnum.ts var SignatureRequestResponseCustomFieldTypeEnum = /* @__PURE__ */ ((SignatureRequestResponseCustomFieldTypeEnum2) => { @@ -19509,7 +20769,39 @@ var SignatureRequestResponseCustomFieldTypeEnum = /* @__PURE__ */ ((SignatureReq })(SignatureRequestResponseCustomFieldTypeEnum || {}); // model/signatureRequestResponseDataBase.ts -var _SignatureRequestResponseDataBase = class { +var SignatureRequestResponseDataBase = class _SignatureRequestResponseDataBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseDataBase.attributeTypeMap; } @@ -19547,35 +20839,6 @@ var _SignatureRequestResponseDataBase = class { return null; } }; -var SignatureRequestResponseDataBase = _SignatureRequestResponseDataBase; -SignatureRequestResponseDataBase.discriminator = "type"; -SignatureRequestResponseDataBase.attributeTypeMap = [ - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/signatureRequestResponseDataTypeEnum.ts var SignatureRequestResponseDataTypeEnum = /* @__PURE__ */ ((SignatureRequestResponseDataTypeEnum2) => { @@ -19592,14 +20855,35 @@ var SignatureRequestResponseDataTypeEnum = /* @__PURE__ */ ((SignatureRequestRes })(SignatureRequestResponseDataTypeEnum || {}); // model/signatureRequestResponseDataValueCheckbox.ts -var _SignatureRequestResponseDataValueCheckbox = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueCheckbox = class _SignatureRequestResponseDataValueCheckbox extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A yes/no checkbox + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19607,30 +20891,37 @@ var _SignatureRequestResponseDataValueCheckbox = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueCheckbox = _SignatureRequestResponseDataValueCheckbox; -SignatureRequestResponseDataValueCheckbox.discriminator = void 0; -SignatureRequestResponseDataValueCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueCheckboxMerge.ts -var _SignatureRequestResponseDataValueCheckboxMerge = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueCheckboxMerge = class _SignatureRequestResponseDataValueCheckboxMerge extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A checkbox field that has default value set by the api + */ this["type"] = "checkbox-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueCheckboxMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19638,30 +20929,37 @@ var _SignatureRequestResponseDataValueCheckboxMerge = class extends SignatureReq ); } }; -var SignatureRequestResponseDataValueCheckboxMerge = _SignatureRequestResponseDataValueCheckboxMerge; -SignatureRequestResponseDataValueCheckboxMerge.discriminator = void 0; -SignatureRequestResponseDataValueCheckboxMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueDateSigned.ts -var _SignatureRequestResponseDataValueDateSigned = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueDateSigned = class _SignatureRequestResponseDataValueDateSigned extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A date + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19669,30 +20967,37 @@ var _SignatureRequestResponseDataValueDateSigned = class extends SignatureReques ); } }; -var SignatureRequestResponseDataValueDateSigned = _SignatureRequestResponseDataValueDateSigned; -SignatureRequestResponseDataValueDateSigned.discriminator = void 0; -SignatureRequestResponseDataValueDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueDropdown.ts -var _SignatureRequestResponseDataValueDropdown = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueDropdown = class _SignatureRequestResponseDataValueDropdown extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for dropdowns + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19700,30 +21005,42 @@ var _SignatureRequestResponseDataValueDropdown = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueDropdown = _SignatureRequestResponseDataValueDropdown; -SignatureRequestResponseDataValueDropdown.discriminator = void 0; -SignatureRequestResponseDataValueDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueInitials.ts -var _SignatureRequestResponseDataValueInitials = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueInitials = class _SignatureRequestResponseDataValueInitials extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for initials + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "isSigned", + baseName: "is_signed", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19731,35 +21048,37 @@ var _SignatureRequestResponseDataValueInitials = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueInitials = _SignatureRequestResponseDataValueInitials; -SignatureRequestResponseDataValueInitials.discriminator = void 0; -SignatureRequestResponseDataValueInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "isSigned", - baseName: "is_signed", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueRadio.ts -var _SignatureRequestResponseDataValueRadio = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueRadio = class _SignatureRequestResponseDataValueRadio extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for radios + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19767,30 +21086,42 @@ var _SignatureRequestResponseDataValueRadio = class extends SignatureRequestResp ); } }; -var SignatureRequestResponseDataValueRadio = _SignatureRequestResponseDataValueRadio; -SignatureRequestResponseDataValueRadio.discriminator = void 0; -SignatureRequestResponseDataValueRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueSignature.ts -var _SignatureRequestResponseDataValueSignature = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueSignature = class _SignatureRequestResponseDataValueSignature extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A signature input field + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "isSigned", + baseName: "is_signed", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19798,35 +21129,37 @@ var _SignatureRequestResponseDataValueSignature = class extends SignatureRequest ); } }; -var SignatureRequestResponseDataValueSignature = _SignatureRequestResponseDataValueSignature; -SignatureRequestResponseDataValueSignature.discriminator = void 0; -SignatureRequestResponseDataValueSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "isSigned", - baseName: "is_signed", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueText.ts -var _SignatureRequestResponseDataValueText = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueText = class _SignatureRequestResponseDataValueText extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A text input field + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19834,30 +21167,37 @@ var _SignatureRequestResponseDataValueText = class extends SignatureRequestRespo ); } }; -var SignatureRequestResponseDataValueText = _SignatureRequestResponseDataValueText; -SignatureRequestResponseDataValueText.discriminator = void 0; -SignatureRequestResponseDataValueText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueTextMerge.ts -var _SignatureRequestResponseDataValueTextMerge = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueTextMerge = class _SignatureRequestResponseDataValueTextMerge extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A text field that has default text set by the api + */ this["type"] = "text-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueTextMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19865,26 +21205,115 @@ var _SignatureRequestResponseDataValueTextMerge = class extends SignatureRequest ); } }; -var SignatureRequestResponseDataValueTextMerge = _SignatureRequestResponseDataValueTextMerge; -SignatureRequestResponseDataValueTextMerge.discriminator = void 0; -SignatureRequestResponseDataValueTextMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseSignatures.ts -var _SignatureRequestResponseSignatures = class { +var SignatureRequestResponseSignatures = class _SignatureRequestResponseSignatures { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "signerGroupGuid", + baseName: "signer_group_guid", + type: "string" + }, + { + name: "signerEmailAddress", + baseName: "signer_email_address", + type: "string" + }, + { + name: "signerName", + baseName: "signer_name", + type: "string" + }, + { + name: "signerRole", + baseName: "signer_role", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + }, + { + name: "statusCode", + baseName: "status_code", + type: "string" + }, + { + name: "declineReason", + baseName: "decline_reason", + type: "string" + }, + { + name: "signedAt", + baseName: "signed_at", + type: "number" + }, + { + name: "lastViewedAt", + baseName: "last_viewed_at", + type: "number" + }, + { + name: "lastRemindedAt", + baseName: "last_reminded_at", + type: "number" + }, + { + name: "hasPin", + baseName: "has_pin", + type: "boolean" + }, + { + name: "hasSmsAuth", + baseName: "has_sms_auth", + type: "boolean" + }, + { + name: "hasSmsDelivery", + baseName: "has_sms_delivery", + type: "boolean" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "reassignedBy", + baseName: "reassigned_by", + type: "string" + }, + { + name: "reassignmentReason", + baseName: "reassignment_reason", + type: "string" + }, + { + name: "reassignedFrom", + baseName: "reassigned_from", + type: "string" + }, + { + name: "error", + baseName: "error", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseSignatures.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19892,270 +21321,305 @@ var _SignatureRequestResponseSignatures = class { ); } }; -var SignatureRequestResponseSignatures = _SignatureRequestResponseSignatures; -SignatureRequestResponseSignatures.discriminator = void 0; -SignatureRequestResponseSignatures.attributeTypeMap = [ - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "signerGroupGuid", - baseName: "signer_group_guid", - type: "string" - }, - { - name: "signerEmailAddress", - baseName: "signer_email_address", - type: "string" - }, - { - name: "signerName", - baseName: "signer_name", - type: "string" - }, - { - name: "signerRole", - baseName: "signer_role", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - }, - { - name: "statusCode", - baseName: "status_code", - type: "string" - }, - { - name: "declineReason", - baseName: "decline_reason", - type: "string" - }, - { - name: "signedAt", - baseName: "signed_at", - type: "number" - }, - { - name: "lastViewedAt", - baseName: "last_viewed_at", - type: "number" - }, - { - name: "lastRemindedAt", - baseName: "last_reminded_at", - type: "number" - }, - { - name: "hasPin", - baseName: "has_pin", - type: "boolean" - }, - { - name: "hasSmsAuth", - baseName: "has_sms_auth", - type: "boolean" - }, - { - name: "hasSmsDelivery", - baseName: "has_sms_delivery", - type: "boolean" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "reassignedBy", - baseName: "reassigned_by", - type: "string" - }, - { - name: "reassignmentReason", - baseName: "reassignment_reason", - type: "string" - }, - { - name: "reassignedFrom", - baseName: "reassigned_from", - type: "string" - }, - { - name: "error", - baseName: "error", - type: "string" - } -]; // model/signatureRequestSendRequest.ts -var _SignatureRequestSendRequest = class { +var SignatureRequestSendRequest = class _SignatureRequestSendRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ this["hideTextTags"] = false; + /** + * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated + */ this["isQualifiedSignature"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ this["useTextTags"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "isQualifiedSignature", + baseName: "is_qualified_signature", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestSendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestSendRequest"); } }; -var SignatureRequestSendRequest = _SignatureRequestSendRequest; -SignatureRequestSendRequest.discriminator = void 0; -SignatureRequestSendRequest.attributeTypeMap = [ - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "groupedSigners", - baseName: "grouped_signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "isQualifiedSignature", - baseName: "is_qualified_signature", - type: "boolean" - }, - { - name: "isEid", - baseName: "is_eid", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/signatureRequestSendWithTemplateRequest.ts -var _SignatureRequestSendWithTemplateRequest = class { +var SignatureRequestSendWithTemplateRequest = class _SignatureRequestSendWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated + */ this["isQualifiedSignature"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "isQualifiedSignature", + baseName: "is_qualified_signature", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestSendWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20163,322 +21627,277 @@ var _SignatureRequestSendWithTemplateRequest = class { ); } }; -var SignatureRequestSendWithTemplateRequest = _SignatureRequestSendWithTemplateRequest; -SignatureRequestSendWithTemplateRequest.discriminator = void 0; -SignatureRequestSendWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "isQualifiedSignature", - baseName: "is_qualified_signature", - type: "boolean" - }, - { - name: "isEid", - baseName: "is_eid", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestUpdateRequest.ts -var _SignatureRequestUpdateRequest = class { +var SignatureRequestUpdateRequest = class _SignatureRequestUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestUpdateRequest"); } }; -var SignatureRequestUpdateRequest = _SignatureRequestUpdateRequest; -SignatureRequestUpdateRequest.discriminator = void 0; -SignatureRequestUpdateRequest.attributeTypeMap = [ - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/subAttachment.ts -var _SubAttachment = class { +var SubAttachment = class _SubAttachment { constructor() { + /** + * Determines if the attachment must be uploaded. + */ this["required"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signerIndex", + baseName: "signer_index", + type: "number" + }, + { + name: "instructions", + baseName: "instructions", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubAttachment.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubAttachment"); } }; -var SubAttachment = _SubAttachment; -SubAttachment.discriminator = void 0; -SubAttachment.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signerIndex", - baseName: "signer_index", - type: "number" - }, - { - name: "instructions", - baseName: "instructions", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - } -]; // model/subBulkSignerList.ts -var _SubBulkSignerList = class { +var SubBulkSignerList = class _SubBulkSignerList { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubBulkSignerList.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubBulkSignerList"); } }; -var SubBulkSignerList = _SubBulkSignerList; -SubBulkSignerList.discriminator = void 0; -SubBulkSignerList.attributeTypeMap = [ - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - } -]; // model/subBulkSignerListCustomField.ts -var _SubBulkSignerListCustomField = class { +var SubBulkSignerListCustomField = class _SubBulkSignerListCustomField { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubBulkSignerListCustomField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubBulkSignerListCustomField"); } }; -var SubBulkSignerListCustomField = _SubBulkSignerListCustomField; -SubBulkSignerListCustomField.discriminator = void 0; -SubBulkSignerListCustomField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/subCC.ts -var _SubCC = class { +var SubCC = class _SubCC { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubCC.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubCC"); } }; -var SubCC = _SubCC; -SubCC.discriminator = void 0; -SubCC.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/subCustomField.ts -var _SubCustomField = class { +var SubCustomField = class _SubCustomField { constructor() { + /** + * Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. + */ this["required"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "editor", + baseName: "editor", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubCustomField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubCustomField"); } }; -var SubCustomField = _SubCustomField; -SubCustomField.discriminator = void 0; -SubCustomField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "editor", - baseName: "editor", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/subEditorOptions.ts -var _SubEditorOptions = class { +var SubEditorOptions = class _SubEditorOptions { constructor() { + /** + * Allows requesters to edit the list of signers + */ this["allowEditSigners"] = false; + /** + * Allows requesters to edit documents, including delete and add + */ this["allowEditDocuments"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "allowEditSigners", + baseName: "allow_edit_signers", + type: "boolean" + }, + { + name: "allowEditDocuments", + baseName: "allow_edit_documents", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubEditorOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubEditorOptions"); } }; -var SubEditorOptions = _SubEditorOptions; -SubEditorOptions.discriminator = void 0; -SubEditorOptions.attributeTypeMap = [ - { - name: "allowEditSigners", - baseName: "allow_edit_signers", - type: "boolean" - }, - { - name: "allowEditDocuments", - baseName: "allow_edit_documents", - type: "boolean" - } -]; // model/subFieldOptions.ts -var _SubFieldOptions = class { +var SubFieldOptions = class _SubFieldOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "dateFormat", + baseName: "date_format", + type: "SubFieldOptions.DateFormatEnum" + } + ]; + } static getAttributeTypeMap() { return _SubFieldOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFieldOptions"); } }; -var SubFieldOptions = _SubFieldOptions; -SubFieldOptions.discriminator = void 0; -SubFieldOptions.attributeTypeMap = [ - { - name: "dateFormat", - baseName: "date_format", - type: "SubFieldOptions.DateFormatEnum" - } -]; ((SubFieldOptions2) => { let DateFormatEnum; ((DateFormatEnum2) => { @@ -20492,145 +21911,166 @@ SubFieldOptions.attributeTypeMap = [ })(SubFieldOptions || (SubFieldOptions = {})); // model/subFormFieldGroup.ts -var _SubFormFieldGroup = class { +var SubFormFieldGroup = class _SubFormFieldGroup { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "groupId", + baseName: "group_id", + type: "string" + }, + { + name: "groupLabel", + baseName: "group_label", + type: "string" + }, + { + name: "requirement", + baseName: "requirement", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldGroup.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldGroup"); } }; -var SubFormFieldGroup = _SubFormFieldGroup; -SubFormFieldGroup.discriminator = void 0; -SubFormFieldGroup.attributeTypeMap = [ - { - name: "groupId", - baseName: "group_id", - type: "string" - }, - { - name: "groupLabel", - baseName: "group_label", - type: "string" - }, - { - name: "requirement", - baseName: "requirement", - type: "string" - } -]; // model/subFormFieldRule.ts -var _SubFormFieldRule = class { +var SubFormFieldRule = class _SubFormFieldRule { constructor() { + /** + * Currently only `AND` is supported. Support for `OR` is being worked on. + */ this["triggerOperator"] = "AND"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "triggerOperator", + baseName: "trigger_operator", + type: "string" + }, + { + name: "triggers", + baseName: "triggers", + type: "Array" + }, + { + name: "actions", + baseName: "actions", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRule.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRule"); } }; -var SubFormFieldRule = _SubFormFieldRule; -SubFormFieldRule.discriminator = void 0; -SubFormFieldRule.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "triggerOperator", - baseName: "trigger_operator", - type: "string" - }, - { - name: "triggers", - baseName: "triggers", - type: "Array" - }, - { - name: "actions", - baseName: "actions", - type: "Array" - } -]; // model/subFormFieldRuleAction.ts -var _SubFormFieldRuleAction = class { +var SubFormFieldRuleAction = class _SubFormFieldRuleAction { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "hidden", + baseName: "hidden", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "SubFormFieldRuleAction.TypeEnum" + }, + { + name: "fieldId", + baseName: "field_id", + type: "string" + }, + { + name: "groupId", + baseName: "group_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRuleAction.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRuleAction"); } }; -var SubFormFieldRuleAction = _SubFormFieldRuleAction; -SubFormFieldRuleAction.discriminator = void 0; -SubFormFieldRuleAction.attributeTypeMap = [ - { - name: "hidden", - baseName: "hidden", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "SubFormFieldRuleAction.TypeEnum" - }, - { - name: "fieldId", - baseName: "field_id", - type: "string" - }, - { - name: "groupId", - baseName: "group_id", - type: "string" - } -]; ((SubFormFieldRuleAction2) => { let TypeEnum; ((TypeEnum2) => { + TypeEnum2["ChangeFieldVisibility"] = "change-field-visibility"; TypeEnum2["FieldVisibility"] = "change-field-visibility"; + TypeEnum2["ChangeGroupVisibility"] = "change-group-visibility"; TypeEnum2["GroupVisibility"] = "change-group-visibility"; })(TypeEnum = SubFormFieldRuleAction2.TypeEnum || (SubFormFieldRuleAction2.TypeEnum = {})); })(SubFormFieldRuleAction || (SubFormFieldRuleAction = {})); // model/subFormFieldRuleTrigger.ts -var _SubFormFieldRuleTrigger = class { +var SubFormFieldRuleTrigger = class _SubFormFieldRuleTrigger { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "operator", + baseName: "operator", + type: "SubFormFieldRuleTrigger.OperatorEnum" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "values", + baseName: "values", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRuleTrigger.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRuleTrigger"); } }; -var SubFormFieldRuleTrigger = _SubFormFieldRuleTrigger; -SubFormFieldRuleTrigger.discriminator = void 0; -SubFormFieldRuleTrigger.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "operator", - baseName: "operator", - type: "SubFormFieldRuleTrigger.OperatorEnum" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "values", - baseName: "values", - type: "Array" - } -]; ((SubFormFieldRuleTrigger2) => { let OperatorEnum; ((OperatorEnum2) => { @@ -20643,7 +22083,69 @@ SubFormFieldRuleTrigger.attributeTypeMap = [ })(SubFormFieldRuleTrigger || (SubFormFieldRuleTrigger = {})); // model/subFormFieldsPerDocumentBase.ts -var _SubFormFieldsPerDocumentBase = class { +var SubFormFieldsPerDocumentBase = class _SubFormFieldsPerDocumentBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "documentIndex", + baseName: "document_index", + type: "number" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "page", + baseName: "page", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldsPerDocumentBase.attributeTypeMap; } @@ -20684,75 +22186,42 @@ var _SubFormFieldsPerDocumentBase = class { return null; } }; -var SubFormFieldsPerDocumentBase = _SubFormFieldsPerDocumentBase; -SubFormFieldsPerDocumentBase.discriminator = "type"; -SubFormFieldsPerDocumentBase.attributeTypeMap = [ - { - name: "documentIndex", - baseName: "document_index", - type: "number" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "page", - baseName: "page", - type: "number" - } -]; // model/subFormFieldsPerDocumentCheckbox.ts -var _SubFormFieldsPerDocumentCheckbox = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentCheckbox = class _SubFormFieldsPerDocumentCheckbox extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "isChecked", + baseName: "is_checked", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20760,35 +22229,32 @@ var _SubFormFieldsPerDocumentCheckbox = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentCheckbox = _SubFormFieldsPerDocumentCheckbox; -SubFormFieldsPerDocumentCheckbox.discriminator = void 0; -SubFormFieldsPerDocumentCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "isChecked", - baseName: "is_checked", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/subFormFieldsPerDocumentCheckboxMerge.ts -var _SubFormFieldsPerDocumentCheckboxMerge = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentCheckboxMerge = class _SubFormFieldsPerDocumentCheckboxMerge extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. + */ this["type"] = "checkbox-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentCheckboxMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20796,26 +22262,46 @@ var _SubFormFieldsPerDocumentCheckboxMerge = class extends SubFormFieldsPerDocum ); } }; -var SubFormFieldsPerDocumentCheckboxMerge = _SubFormFieldsPerDocumentCheckboxMerge; -SubFormFieldsPerDocumentCheckboxMerge.discriminator = void 0; -SubFormFieldsPerDocumentCheckboxMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentDateSigned.ts -var _SubFormFieldsPerDocumentDateSigned = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentDateSigned = class _SubFormFieldsPerDocumentDateSigned extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A date. Use the `SubFormFieldsPerDocumentDateSigned` class. + */ this["type"] = "date_signed"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentDateSigned.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20823,25 +22309,6 @@ var _SubFormFieldsPerDocumentDateSigned = class extends SubFormFieldsPerDocument ); } }; -var SubFormFieldsPerDocumentDateSigned = _SubFormFieldsPerDocumentDateSigned; -SubFormFieldsPerDocumentDateSigned.discriminator = void 0; -SubFormFieldsPerDocumentDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentDateSigned.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentDateSigned2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -20865,15 +22332,54 @@ SubFormFieldsPerDocumentDateSigned.attributeTypeMap = [ })(SubFormFieldsPerDocumentDateSigned || (SubFormFieldsPerDocumentDateSigned = {})); // model/subFormFieldsPerDocumentDropdown.ts -var _SubFormFieldsPerDocumentDropdown = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentDropdown = class _SubFormFieldsPerDocumentDropdown extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. + */ this["type"] = "dropdown"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } - static getAttributeTypeMap() { - return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentDropdown.attributeTypeMap); + static { + this.discriminator = void 0; } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "options", + baseName: "options", + type: "Array" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentDropdown.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentDropdown.attributeTypeMap); + } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20881,35 +22387,6 @@ var _SubFormFieldsPerDocumentDropdown = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentDropdown = _SubFormFieldsPerDocumentDropdown; -SubFormFieldsPerDocumentDropdown.discriminator = void 0; -SubFormFieldsPerDocumentDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "options", - baseName: "options", - type: "Array" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentDropdown.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentDropdown2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -20954,15 +22431,54 @@ var SubFormFieldsPerDocumentFontEnum = /* @__PURE__ */ ((SubFormFieldsPerDocumen })(SubFormFieldsPerDocumentFontEnum || {}); // model/subFormFieldsPerDocumentHyperlink.ts -var _SubFormFieldsPerDocumentHyperlink = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentHyperlink = class _SubFormFieldsPerDocumentHyperlink extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. + */ this["type"] = "hyperlink"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "contentUrl", + baseName: "content_url", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentHyperlink.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20970,35 +22486,6 @@ var _SubFormFieldsPerDocumentHyperlink = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentHyperlink = _SubFormFieldsPerDocumentHyperlink; -SubFormFieldsPerDocumentHyperlink.discriminator = void 0; -SubFormFieldsPerDocumentHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "contentUrl", - baseName: "content_url", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentHyperlink.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentHyperlink2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -21022,14 +22509,30 @@ SubFormFieldsPerDocumentHyperlink.attributeTypeMap = [ })(SubFormFieldsPerDocumentHyperlink || (SubFormFieldsPerDocumentHyperlink = {})); // model/subFormFieldsPerDocumentInitials.ts -var _SubFormFieldsPerDocumentInitials = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentInitials = class _SubFormFieldsPerDocumentInitials extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21037,58 +22540,72 @@ var _SubFormFieldsPerDocumentInitials = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentInitials = _SubFormFieldsPerDocumentInitials; -SubFormFieldsPerDocumentInitials.discriminator = void 0; -SubFormFieldsPerDocumentInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentRadio.ts -var _SubFormFieldsPerDocumentRadio = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentRadio = class _SubFormFieldsPerDocumentRadio extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + }, + { + name: "isChecked", + baseName: "is_checked", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldsPerDocumentRadio"); } }; -var SubFormFieldsPerDocumentRadio = _SubFormFieldsPerDocumentRadio; -SubFormFieldsPerDocumentRadio.discriminator = void 0; -SubFormFieldsPerDocumentRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - }, - { - name: "isChecked", - baseName: "is_checked", - type: "boolean" - } -]; // model/subFormFieldsPerDocumentSignature.ts -var _SubFormFieldsPerDocumentSignature = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentSignature = class _SubFormFieldsPerDocumentSignature extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21096,89 +22613,90 @@ var _SubFormFieldsPerDocumentSignature = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentSignature = _SubFormFieldsPerDocumentSignature; -SubFormFieldsPerDocumentSignature.discriminator = void 0; -SubFormFieldsPerDocumentSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentText.ts -var _SubFormFieldsPerDocumentText = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentText = class _SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A text input field. Use the `SubFormFieldsPerDocumentText` class. + */ this["type"] = "text"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "placeholder", + baseName: "placeholder", + type: "string" + }, + { + name: "autoFillType", + baseName: "auto_fill_type", + type: "string" + }, + { + name: "linkId", + baseName: "link_id", + type: "string" + }, + { + name: "masked", + baseName: "masked", + type: "boolean" + }, + { + name: "validationType", + baseName: "validation_type", + type: "SubFormFieldsPerDocumentText.ValidationTypeEnum" + }, + { + name: "validationCustomRegex", + baseName: "validation_custom_regex", + type: "string" + }, + { + name: "validationCustomRegexFormatLabel", + baseName: "validation_custom_regex_format_label", + type: "string" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentText.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldsPerDocumentText"); } }; -var SubFormFieldsPerDocumentText = _SubFormFieldsPerDocumentText; -SubFormFieldsPerDocumentText.discriminator = void 0; -SubFormFieldsPerDocumentText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "placeholder", - baseName: "placeholder", - type: "string" - }, - { - name: "autoFillType", - baseName: "auto_fill_type", - type: "string" - }, - { - name: "linkId", - baseName: "link_id", - type: "string" - }, - { - name: "masked", - baseName: "masked", - type: "boolean" - }, - { - name: "validationType", - baseName: "validation_type", - type: "SubFormFieldsPerDocumentText.ValidationTypeEnum" - }, - { - name: "validationCustomRegex", - baseName: "validation_custom_regex", - type: "string" - }, - { - name: "validationCustomRegexFormatLabel", - baseName: "validation_custom_regex_format_label", - type: "string" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentText.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentText2) => { let ValidationTypeEnum; ((ValidationTypeEnum2) => { @@ -21215,15 +22733,44 @@ SubFormFieldsPerDocumentText.attributeTypeMap = [ })(SubFormFieldsPerDocumentText || (SubFormFieldsPerDocumentText = {})); // model/subFormFieldsPerDocumentTextMerge.ts -var _SubFormFieldsPerDocumentTextMerge = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentTextMerge = class _SubFormFieldsPerDocumentTextMerge extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. + */ this["type"] = "text-merge"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentTextMerge.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentTextMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21231,25 +22778,6 @@ var _SubFormFieldsPerDocumentTextMerge = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentTextMerge = _SubFormFieldsPerDocumentTextMerge; -SubFormFieldsPerDocumentTextMerge.discriminator = void 0; -SubFormFieldsPerDocumentTextMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentTextMerge.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentTextMerge2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -21288,28 +22816,32 @@ var SubFormFieldsPerDocumentTypeEnum = /* @__PURE__ */ ((SubFormFieldsPerDocumen })(SubFormFieldsPerDocumentTypeEnum || {}); // model/subMergeField.ts -var _SubMergeField = class { +var SubMergeField = class _SubMergeField { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "type", + baseName: "type", + type: "SubMergeField.TypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubMergeField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubMergeField"); } }; -var SubMergeField = _SubMergeField; -SubMergeField.discriminator = void 0; -SubMergeField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "type", - baseName: "type", - type: "SubMergeField.TypeEnum" - } -]; ((SubMergeField2) => { let TypeEnum; ((TypeEnum2) => { @@ -21319,28 +22851,32 @@ SubMergeField.attributeTypeMap = [ })(SubMergeField || (SubMergeField = {})); // model/subOAuth.ts -var _SubOAuth = class { +var SubOAuth = class _SubOAuth { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "scopes", + baseName: "scopes", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubOAuth.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubOAuth"); } }; -var SubOAuth = _SubOAuth; -SubOAuth.discriminator = void 0; -SubOAuth.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "scopes", - baseName: "scopes", - type: "Array" - } -]; ((SubOAuth2) => { let ScopesEnum; ((ScopesEnum2) => { @@ -21356,32 +22892,62 @@ SubOAuth.attributeTypeMap = [ })(SubOAuth || (SubOAuth = {})); // model/subOptions.ts -var _SubOptions = class { +var SubOptions = class _SubOptions { constructor() { + /** + * Determines if signers can use \"Insert Everywhere\" when signing a document. + */ this["canInsertEverywhere"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "canInsertEverywhere", + baseName: "can_insert_everywhere", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubOptions"); } }; -var SubOptions = _SubOptions; -SubOptions.discriminator = void 0; -SubOptions.attributeTypeMap = [ - { - name: "canInsertEverywhere", - baseName: "can_insert_everywhere", - type: "boolean" - } -]; // model/subSignatureRequestGroupedSigners.ts -var _SubSignatureRequestGroupedSigners = class { +var SubSignatureRequestGroupedSigners = class _SubSignatureRequestGroupedSigners { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "group", + baseName: "group", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestGroupedSigners.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21389,69 +22955,54 @@ var _SubSignatureRequestGroupedSigners = class { ); } }; -var SubSignatureRequestGroupedSigners = _SubSignatureRequestGroupedSigners; -SubSignatureRequestGroupedSigners.discriminator = void 0; -SubSignatureRequestGroupedSigners.attributeTypeMap = [ - { - name: "group", - baseName: "group", - type: "string" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subSignatureRequestSigner.ts -var _SubSignatureRequestSigner = class { +var SubSignatureRequestSigner = class _SubSignatureRequestSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + }, + { + name: "pin", + baseName: "pin", + type: "string" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "smsPhoneNumberType", + baseName: "sms_phone_number_type", + type: "SubSignatureRequestSigner.SmsPhoneNumberTypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubSignatureRequestSigner"); } }; -var SubSignatureRequestSigner = _SubSignatureRequestSigner; -SubSignatureRequestSigner.discriminator = void 0; -SubSignatureRequestSigner.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - }, - { - name: "pin", - baseName: "pin", - type: "string" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "smsPhoneNumberType", - baseName: "sms_phone_number_type", - type: "SubSignatureRequestSigner.SmsPhoneNumberTypeEnum" - } -]; ((SubSignatureRequestSigner2) => { let SmsPhoneNumberTypeEnum; ((SmsPhoneNumberTypeEnum2) => { @@ -21461,10 +23012,48 @@ SubSignatureRequestSigner.attributeTypeMap = [ })(SubSignatureRequestSigner || (SubSignatureRequestSigner = {})); // model/subSignatureRequestTemplateSigner.ts -var _SubSignatureRequestTemplateSigner = class { +var SubSignatureRequestTemplateSigner = class _SubSignatureRequestTemplateSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "pin", + baseName: "pin", + type: "string" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "smsPhoneNumberType", + baseName: "sms_phone_number_type", + type: "SubSignatureRequestTemplateSigner.SmsPhoneNumberTypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestTemplateSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21472,40 +23061,6 @@ var _SubSignatureRequestTemplateSigner = class { ); } }; -var SubSignatureRequestTemplateSigner = _SubSignatureRequestTemplateSigner; -SubSignatureRequestTemplateSigner.discriminator = void 0; -SubSignatureRequestTemplateSigner.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "pin", - baseName: "pin", - type: "string" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "smsPhoneNumberType", - baseName: "sms_phone_number_type", - type: "SubSignatureRequestTemplateSigner.SmsPhoneNumberTypeEnum" - } -]; ((SubSignatureRequestTemplateSigner2) => { let SmsPhoneNumberTypeEnum; ((SmsPhoneNumberTypeEnum2) => { @@ -21515,49 +23070,65 @@ SubSignatureRequestTemplateSigner.attributeTypeMap = [ })(SubSignatureRequestTemplateSigner || (SubSignatureRequestTemplateSigner = {})); // model/subSigningOptions.ts -var _SubSigningOptions = class { +var SubSigningOptions = class _SubSigningOptions { constructor() { + /** + * Allows drawing the signature + */ this["draw"] = false; + /** + * Allows using a smartphone to email the signature + */ this["phone"] = false; + /** + * Allows typing the signature + */ this["type"] = false; + /** + * Allows uploading the signature + */ this["upload"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "defaultType", + baseName: "default_type", + type: "SubSigningOptions.DefaultTypeEnum" + }, + { + name: "draw", + baseName: "draw", + type: "boolean" + }, + { + name: "phone", + baseName: "phone", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "boolean" + }, + { + name: "upload", + baseName: "upload", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubSigningOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubSigningOptions"); } }; -var SubSigningOptions = _SubSigningOptions; -SubSigningOptions.discriminator = void 0; -SubSigningOptions.attributeTypeMap = [ - { - name: "defaultType", - baseName: "default_type", - type: "SubSigningOptions.DefaultTypeEnum" - }, - { - name: "draw", - baseName: "draw", - type: "boolean" - }, - { - name: "phone", - baseName: "phone", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "boolean" - }, - { - name: "upload", - baseName: "upload", - type: "boolean" - } -]; ((SubSigningOptions2) => { let DefaultTypeEnum; ((DefaultTypeEnum2) => { @@ -21569,87 +23140,122 @@ SubSigningOptions.attributeTypeMap = [ })(SubSigningOptions || (SubSigningOptions = {})); // model/subTeamResponse.ts -var _SubTeamResponse = class { +var SubTeamResponse = class _SubTeamResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubTeamResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubTeamResponse"); } }; -var SubTeamResponse = _SubTeamResponse; -SubTeamResponse.discriminator = void 0; -SubTeamResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/subTemplateRole.ts -var _SubTemplateRole = class { +var SubTemplateRole = class _SubTemplateRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubTemplateRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubTemplateRole"); } }; -var SubTemplateRole = _SubTemplateRole; -SubTemplateRole.discriminator = void 0; -SubTemplateRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subUnclaimedDraftSigner.ts -var _SubUnclaimedDraftSigner = class { +var SubUnclaimedDraftSigner = class _SubUnclaimedDraftSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubUnclaimedDraftSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubUnclaimedDraftSigner"); } }; -var SubUnclaimedDraftSigner = _SubUnclaimedDraftSigner; -SubUnclaimedDraftSigner.discriminator = void 0; -SubUnclaimedDraftSigner.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subUnclaimedDraftTemplateSigner.ts -var _SubUnclaimedDraftTemplateSigner = class { +var SubUnclaimedDraftTemplateSigner = class _SubUnclaimedDraftTemplateSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubUnclaimedDraftTemplateSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21657,28 +23263,9 @@ var _SubUnclaimedDraftTemplateSigner = class { ); } }; -var SubUnclaimedDraftTemplateSigner = _SubUnclaimedDraftTemplateSigner; -SubUnclaimedDraftTemplateSigner.discriminator = void 0; -SubUnclaimedDraftTemplateSigner.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/subWhiteLabelingOptions.ts -var _SubWhiteLabelingOptions = class { +var SubWhiteLabelingOptions = class _SubWhiteLabelingOptions { constructor() { this["headerBackgroundColor"] = "#1a1a1a"; this["legalVersion"] = _SubWhiteLabelingOptions.LegalVersionEnum.Terms1; @@ -21695,92 +23282,96 @@ var _SubWhiteLabelingOptions = class { this["textColor1"] = "#808080"; this["textColor2"] = "#ffffff"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "headerBackgroundColor", + baseName: "header_background_color", + type: "string" + }, + { + name: "legalVersion", + baseName: "legal_version", + type: "SubWhiteLabelingOptions.LegalVersionEnum" + }, + { + name: "linkColor", + baseName: "link_color", + type: "string" + }, + { + name: "pageBackgroundColor", + baseName: "page_background_color", + type: "string" + }, + { + name: "primaryButtonColor", + baseName: "primary_button_color", + type: "string" + }, + { + name: "primaryButtonColorHover", + baseName: "primary_button_color_hover", + type: "string" + }, + { + name: "primaryButtonTextColor", + baseName: "primary_button_text_color", + type: "string" + }, + { + name: "primaryButtonTextColorHover", + baseName: "primary_button_text_color_hover", + type: "string" + }, + { + name: "secondaryButtonColor", + baseName: "secondary_button_color", + type: "string" + }, + { + name: "secondaryButtonColorHover", + baseName: "secondary_button_color_hover", + type: "string" + }, + { + name: "secondaryButtonTextColor", + baseName: "secondary_button_text_color", + type: "string" + }, + { + name: "secondaryButtonTextColorHover", + baseName: "secondary_button_text_color_hover", + type: "string" + }, + { + name: "textColor1", + baseName: "text_color1", + type: "string" + }, + { + name: "textColor2", + baseName: "text_color2", + type: "string" + }, + { + name: "resetToDefault", + baseName: "reset_to_default", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubWhiteLabelingOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubWhiteLabelingOptions"); } }; -var SubWhiteLabelingOptions = _SubWhiteLabelingOptions; -SubWhiteLabelingOptions.discriminator = void 0; -SubWhiteLabelingOptions.attributeTypeMap = [ - { - name: "headerBackgroundColor", - baseName: "header_background_color", - type: "string" - }, - { - name: "legalVersion", - baseName: "legal_version", - type: "SubWhiteLabelingOptions.LegalVersionEnum" - }, - { - name: "linkColor", - baseName: "link_color", - type: "string" - }, - { - name: "pageBackgroundColor", - baseName: "page_background_color", - type: "string" - }, - { - name: "primaryButtonColor", - baseName: "primary_button_color", - type: "string" - }, - { - name: "primaryButtonColorHover", - baseName: "primary_button_color_hover", - type: "string" - }, - { - name: "primaryButtonTextColor", - baseName: "primary_button_text_color", - type: "string" - }, - { - name: "primaryButtonTextColorHover", - baseName: "primary_button_text_color_hover", - type: "string" - }, - { - name: "secondaryButtonColor", - baseName: "secondary_button_color", - type: "string" - }, - { - name: "secondaryButtonColorHover", - baseName: "secondary_button_color_hover", - type: "string" - }, - { - name: "secondaryButtonTextColor", - baseName: "secondary_button_text_color", - type: "string" - }, - { - name: "secondaryButtonTextColorHover", - baseName: "secondary_button_text_color_hover", - type: "string" - }, - { - name: "textColor1", - baseName: "text_color1", - type: "string" - }, - { - name: "textColor2", - baseName: "text_color2", - type: "string" - }, - { - name: "resetToDefault", - baseName: "reset_to_default", - type: "boolean" - } -]; ((SubWhiteLabelingOptions2) => { let LegalVersionEnum; ((LegalVersionEnum2) => { @@ -21790,33 +23381,37 @@ SubWhiteLabelingOptions.attributeTypeMap = [ })(SubWhiteLabelingOptions || (SubWhiteLabelingOptions = {})); // model/teamAddMemberRequest.ts -var _TeamAddMemberRequest = class { +var TeamAddMemberRequest = class _TeamAddMemberRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "TeamAddMemberRequest.RoleEnum" + } + ]; + } static getAttributeTypeMap() { return _TeamAddMemberRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamAddMemberRequest"); } }; -var TeamAddMemberRequest = _TeamAddMemberRequest; -TeamAddMemberRequest.discriminator = void 0; -TeamAddMemberRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "TeamAddMemberRequest.RoleEnum" - } -]; ((TeamAddMemberRequest2) => { let RoleEnum; ((RoleEnum2) => { @@ -21828,302 +23423,345 @@ TeamAddMemberRequest.attributeTypeMap = [ })(TeamAddMemberRequest || (TeamAddMemberRequest = {})); // model/teamCreateRequest.ts -var _TeamCreateRequest = class { +var TeamCreateRequest = class _TeamCreateRequest { constructor() { + /** + * The name of your Team. + */ this["name"] = "Untitled Team"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamCreateRequest"); } }; -var TeamCreateRequest = _TeamCreateRequest; -TeamCreateRequest.discriminator = void 0; -TeamCreateRequest.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/teamGetInfoResponse.ts -var _TeamGetInfoResponse = class { +var TeamGetInfoResponse = class _TeamGetInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "team", + baseName: "team", + type: "TeamInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamGetInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamGetInfoResponse"); } }; -var TeamGetInfoResponse = _TeamGetInfoResponse; -TeamGetInfoResponse.discriminator = void 0; -TeamGetInfoResponse.attributeTypeMap = [ - { - name: "team", - baseName: "team", - type: "TeamInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamGetResponse.ts -var _TeamGetResponse = class { +var TeamGetResponse = class _TeamGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "team", + baseName: "team", + type: "TeamResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamGetResponse"); } }; -var TeamGetResponse = _TeamGetResponse; -TeamGetResponse.discriminator = void 0; -TeamGetResponse.attributeTypeMap = [ - { - name: "team", - baseName: "team", - type: "TeamResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamInfoResponse.ts -var _TeamInfoResponse = class { +var TeamInfoResponse = class _TeamInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "teamParent", + baseName: "team_parent", + type: "TeamParentResponse" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "numMembers", + baseName: "num_members", + type: "number" + }, + { + name: "numSubTeams", + baseName: "num_sub_teams", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TeamInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInfoResponse"); } }; -var TeamInfoResponse = _TeamInfoResponse; -TeamInfoResponse.discriminator = void 0; -TeamInfoResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "teamParent", - baseName: "team_parent", - type: "TeamParentResponse" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "numMembers", - baseName: "num_members", - type: "number" - }, - { - name: "numSubTeams", - baseName: "num_sub_teams", - type: "number" - } -]; // model/teamInviteResponse.ts -var _TeamInviteResponse = class { +var TeamInviteResponse = class _TeamInviteResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "sentAt", + baseName: "sent_at", + type: "number" + }, + { + name: "redeemedAt", + baseName: "redeemed_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TeamInviteResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInviteResponse"); } }; -var TeamInviteResponse = _TeamInviteResponse; -TeamInviteResponse.discriminator = void 0; -TeamInviteResponse.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "sentAt", - baseName: "sent_at", - type: "number" - }, - { - name: "redeemedAt", - baseName: "redeemed_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/teamInvitesResponse.ts -var _TeamInvitesResponse = class { +var TeamInvitesResponse = class _TeamInvitesResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamInvites", + baseName: "team_invites", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamInvitesResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInvitesResponse"); } }; -var TeamInvitesResponse = _TeamInvitesResponse; -TeamInvitesResponse.discriminator = void 0; -TeamInvitesResponse.attributeTypeMap = [ - { - name: "teamInvites", - baseName: "team_invites", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamMemberResponse.ts -var _TeamMemberResponse = class { +var TeamMemberResponse = class _TeamMemberResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamMemberResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamMemberResponse"); } }; -var TeamMemberResponse = _TeamMemberResponse; -TeamMemberResponse.discriminator = void 0; -TeamMemberResponse.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "string" - } -]; // model/teamMembersResponse.ts -var _TeamMembersResponse = class { +var TeamMembersResponse = class _TeamMembersResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamMembers", + baseName: "team_members", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamMembersResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamMembersResponse"); } }; -var TeamMembersResponse = _TeamMembersResponse; -TeamMembersResponse.discriminator = void 0; -TeamMembersResponse.attributeTypeMap = [ - { - name: "teamMembers", - baseName: "team_members", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamParentResponse.ts -var _TeamParentResponse = class { +var TeamParentResponse = class _TeamParentResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamParentResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamParentResponse"); } }; -var TeamParentResponse = _TeamParentResponse; -TeamParentResponse.discriminator = void 0; -TeamParentResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/teamRemoveMemberRequest.ts -var _TeamRemoveMemberRequest = class { +var TeamRemoveMemberRequest = class _TeamRemoveMemberRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "newOwnerEmailAddress", + baseName: "new_owner_email_address", + type: "string" + }, + { + name: "newTeamId", + baseName: "new_team_id", + type: "string" + }, + { + name: "newRole", + baseName: "new_role", + type: "TeamRemoveMemberRequest.NewRoleEnum" + } + ]; + } static getAttributeTypeMap() { return _TeamRemoveMemberRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamRemoveMemberRequest"); } }; -var TeamRemoveMemberRequest = _TeamRemoveMemberRequest; -TeamRemoveMemberRequest.discriminator = void 0; -TeamRemoveMemberRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "newOwnerEmailAddress", - baseName: "new_owner_email_address", - type: "string" - }, - { - name: "newTeamId", - baseName: "new_team_id", - type: "string" - }, - { - name: "newRole", - baseName: "new_role", - type: "TeamRemoveMemberRequest.NewRoleEnum" - } -]; ((TeamRemoveMemberRequest2) => { let NewRoleEnum; ((NewRoleEnum2) => { @@ -22135,135 +23773,314 @@ TeamRemoveMemberRequest.attributeTypeMap = [ })(TeamRemoveMemberRequest || (TeamRemoveMemberRequest = {})); // model/teamResponse.ts -var _TeamResponse = class { +var TeamResponse = class _TeamResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + }, + { + name: "invitedAccounts", + baseName: "invited_accounts", + type: "Array" + }, + { + name: "invitedEmails", + baseName: "invited_emails", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamResponse"); } }; -var TeamResponse = _TeamResponse; -TeamResponse.discriminator = void 0; -TeamResponse.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - }, - { - name: "invitedAccounts", - baseName: "invited_accounts", - type: "Array" - }, - { - name: "invitedEmails", - baseName: "invited_emails", - type: "Array" - } -]; // model/teamSubTeamsResponse.ts -var _TeamSubTeamsResponse = class { +var TeamSubTeamsResponse = class _TeamSubTeamsResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "subTeams", + baseName: "sub_teams", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamSubTeamsResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamSubTeamsResponse"); } }; -var TeamSubTeamsResponse = _TeamSubTeamsResponse; -TeamSubTeamsResponse.discriminator = void 0; -TeamSubTeamsResponse.attributeTypeMap = [ - { - name: "subTeams", - baseName: "sub_teams", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamUpdateRequest.ts -var _TeamUpdateRequest = class { +var TeamUpdateRequest = class _TeamUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamUpdateRequest"); } }; -var TeamUpdateRequest = _TeamUpdateRequest; -TeamUpdateRequest.discriminator = void 0; -TeamUpdateRequest.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/templateAddUserRequest.ts -var _TemplateAddUserRequest = class { +var TemplateAddUserRequest = class _TemplateAddUserRequest { constructor() { + /** + * If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. + */ this["skipNotification"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "skipNotification", + baseName: "skip_notification", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateAddUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateAddUserRequest"); } }; -var TemplateAddUserRequest = _TemplateAddUserRequest; -TemplateAddUserRequest.discriminator = void 0; -TemplateAddUserRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "skipNotification", - baseName: "skip_notification", - type: "boolean" - } -]; // model/templateCreateEmbeddedDraftRequest.ts -var _TemplateCreateEmbeddedDraftRequest = class { +var TemplateCreateEmbeddedDraftRequest = class _TemplateCreateEmbeddedDraftRequest { constructor() { + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. + */ this["allowCcs"] = true; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). + */ this["usePreexistingFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22271,141 +24088,30 @@ var _TemplateCreateEmbeddedDraftRequest = class { ); } }; -var TemplateCreateEmbeddedDraftRequest = _TemplateCreateEmbeddedDraftRequest; -TemplateCreateEmbeddedDraftRequest.discriminator = void 0; -TemplateCreateEmbeddedDraftRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - } -]; // model/templateCreateEmbeddedDraftResponse.ts -var _TemplateCreateEmbeddedDraftResponse = class { +var TemplateCreateEmbeddedDraftResponse = class _TemplateCreateEmbeddedDraftResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateCreateEmbeddedDraftResponseTemplate" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22413,26 +24119,40 @@ var _TemplateCreateEmbeddedDraftResponse = class { ); } }; -var TemplateCreateEmbeddedDraftResponse = _TemplateCreateEmbeddedDraftResponse; -TemplateCreateEmbeddedDraftResponse.discriminator = void 0; -TemplateCreateEmbeddedDraftResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateCreateEmbeddedDraftResponseTemplate" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateEmbeddedDraftResponseTemplate.ts -var _TemplateCreateEmbeddedDraftResponseTemplate = class { +var TemplateCreateEmbeddedDraftResponseTemplate = class _TemplateCreateEmbeddedDraftResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "editUrl", + baseName: "edit_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22440,516 +24160,606 @@ var _TemplateCreateEmbeddedDraftResponseTemplate = class { ); } }; -var TemplateCreateEmbeddedDraftResponseTemplate = _TemplateCreateEmbeddedDraftResponseTemplate; -TemplateCreateEmbeddedDraftResponseTemplate.discriminator = void 0; -TemplateCreateEmbeddedDraftResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "editUrl", - baseName: "edit_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateRequest.ts -var _TemplateCreateRequest = class { +var TemplateCreateRequest = class _TemplateCreateRequest { constructor() { + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). + */ this["usePreexistingFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateRequest"); } }; -var TemplateCreateRequest = _TemplateCreateRequest; -TemplateCreateRequest.discriminator = void 0; -TemplateCreateRequest.attributeTypeMap = [ - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - } -]; // model/templateCreateResponse.ts -var _TemplateCreateResponse = class { +var TemplateCreateResponse = class _TemplateCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateCreateResponseTemplate" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateResponse"); } }; -var TemplateCreateResponse = _TemplateCreateResponse; -TemplateCreateResponse.discriminator = void 0; -TemplateCreateResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateCreateResponseTemplate" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateResponseTemplate.ts -var _TemplateCreateResponseTemplate = class { +var TemplateCreateResponseTemplate = class _TemplateCreateResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateResponseTemplate"); } }; -var TemplateCreateResponseTemplate = _TemplateCreateResponseTemplate; -TemplateCreateResponseTemplate.discriminator = void 0; -TemplateCreateResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - } -]; // model/templateEditResponse.ts -var _TemplateEditResponse = class { +var TemplateEditResponse = class _TemplateEditResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateEditResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateEditResponse"); } }; -var TemplateEditResponse = _TemplateEditResponse; -TemplateEditResponse.discriminator = void 0; -TemplateEditResponse.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - } -]; // model/templateGetResponse.ts -var _TemplateGetResponse = class { +var TemplateGetResponse = class _TemplateGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateGetResponse"); } }; -var TemplateGetResponse = _TemplateGetResponse; -TemplateGetResponse.discriminator = void 0; -TemplateGetResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateListResponse.ts -var _TemplateListResponse = class { +var TemplateListResponse = class _TemplateListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templates", + baseName: "templates", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateListResponse"); } }; -var TemplateListResponse = _TemplateListResponse; -TemplateListResponse.discriminator = void 0; -TemplateListResponse.attributeTypeMap = [ - { - name: "templates", - baseName: "templates", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateRemoveUserRequest.ts -var _TemplateRemoveUserRequest = class { +var TemplateRemoveUserRequest = class _TemplateRemoveUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateRemoveUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateRemoveUserRequest"); } }; -var TemplateRemoveUserRequest = _TemplateRemoveUserRequest; -TemplateRemoveUserRequest.discriminator = void 0; -TemplateRemoveUserRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/templateResponse.ts -var _TemplateResponse = class { +var TemplateResponse = class _TemplateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "updatedAt", + baseName: "updated_at", + type: "number" + }, + { + name: "isEmbedded", + baseName: "is_embedded", + type: "boolean" + }, + { + name: "isCreator", + baseName: "is_creator", + type: "boolean" + }, + { + name: "canEdit", + baseName: "can_edit", + type: "boolean" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "documents", + baseName: "documents", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "namedFormFields", + baseName: "named_form_fields", + type: "Array" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponse"); } }; -var TemplateResponse = _TemplateResponse; -TemplateResponse.discriminator = void 0; -TemplateResponse.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "updatedAt", - baseName: "updated_at", - type: "number" - }, - { - name: "isEmbedded", - baseName: "is_embedded", - type: "boolean" - }, - { - name: "isCreator", - baseName: "is_creator", - type: "boolean" - }, - { - name: "canEdit", - baseName: "can_edit", - type: "boolean" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "documents", - baseName: "documents", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "namedFormFields", - baseName: "named_form_fields", - type: "Array" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - } -]; // model/templateResponseAccount.ts -var _TemplateResponseAccount = class { +var TemplateResponseAccount = class _TemplateResponseAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "isPaidHs", + baseName: "is_paid_hs", + type: "boolean" + }, + { + name: "isPaidHf", + baseName: "is_paid_hf", + type: "boolean" + }, + { + name: "quotas", + baseName: "quotas", + type: "TemplateResponseAccountQuota" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseAccount"); } }; -var TemplateResponseAccount = _TemplateResponseAccount; -TemplateResponseAccount.discriminator = void 0; -TemplateResponseAccount.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "isPaidHs", - baseName: "is_paid_hs", - type: "boolean" - }, - { - name: "isPaidHf", - baseName: "is_paid_hf", - type: "boolean" - }, - { - name: "quotas", - baseName: "quotas", - type: "TemplateResponseAccountQuota" - } -]; // model/templateResponseAccountQuota.ts -var _TemplateResponseAccountQuota = class { +var TemplateResponseAccountQuota = class _TemplateResponseAccountQuota { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templatesLeft", + baseName: "templates_left", + type: "number" + }, + { + name: "apiSignatureRequestsLeft", + baseName: "api_signature_requests_left", + type: "number" + }, + { + name: "documentsLeft", + baseName: "documents_left", + type: "number" + }, + { + name: "smsVerificationsLeft", + baseName: "sms_verifications_left", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseAccountQuota.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseAccountQuota"); } }; -var TemplateResponseAccountQuota = _TemplateResponseAccountQuota; -TemplateResponseAccountQuota.discriminator = void 0; -TemplateResponseAccountQuota.attributeTypeMap = [ - { - name: "templatesLeft", - baseName: "templates_left", - type: "number" - }, - { - name: "apiSignatureRequestsLeft", - baseName: "api_signature_requests_left", - type: "number" - }, - { - name: "documentsLeft", - baseName: "documents_left", - type: "number" - }, - { - name: "smsVerificationsLeft", - baseName: "sms_verifications_left", - type: "number" - } -]; // model/templateResponseCCRole.ts -var _TemplateResponseCCRole = class { +var TemplateResponseCCRole = class _TemplateResponseCCRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseCCRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseCCRole"); } }; -var TemplateResponseCCRole = _TemplateResponseCCRole; -TemplateResponseCCRole.discriminator = void 0; -TemplateResponseCCRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/templateResponseDocument.ts -var _TemplateResponseDocument = class { +var TemplateResponseDocument = class _TemplateResponseDocument { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "index", + baseName: "index", + type: "number" + }, + { + name: "fieldGroups", + baseName: "field_groups", + type: "Array" + }, + { + name: "formFields", + baseName: "form_fields", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "staticFields", + baseName: "static_fields", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocument.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseDocument"); } }; -var TemplateResponseDocument = _TemplateResponseDocument; -TemplateResponseDocument.discriminator = void 0; -TemplateResponseDocument.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "index", - baseName: "index", - type: "number" - }, - { - name: "fieldGroups", - baseName: "field_groups", - type: "Array" - }, - { - name: "formFields", - baseName: "form_fields", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "staticFields", - baseName: "static_fields", - type: "Array" - } -]; // model/templateResponseDocumentCustomFieldBase.ts -var _TemplateResponseDocumentCustomFieldBase = class { +var TemplateResponseDocumentCustomFieldBase = class _TemplateResponseDocumentCustomFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentCustomFieldBase.attributeTypeMap; } @@ -22966,70 +24776,32 @@ var _TemplateResponseDocumentCustomFieldBase = class { return null; } }; -var TemplateResponseDocumentCustomFieldBase = _TemplateResponseDocumentCustomFieldBase; -TemplateResponseDocumentCustomFieldBase.discriminator = "type"; -TemplateResponseDocumentCustomFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentCustomFieldCheckbox.ts -var _TemplateResponseDocumentCustomFieldCheckbox = class extends TemplateResponseDocumentCustomFieldBase { +var TemplateResponseDocumentCustomFieldCheckbox = class _TemplateResponseDocumentCustomFieldCheckbox extends TemplateResponseDocumentCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentCustomFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23037,25 +24809,52 @@ var _TemplateResponseDocumentCustomFieldCheckbox = class extends TemplateRespons ); } }; -var TemplateResponseDocumentCustomFieldCheckbox = _TemplateResponseDocumentCustomFieldCheckbox; -TemplateResponseDocumentCustomFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentCustomFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentCustomFieldText.ts -var _TemplateResponseDocumentCustomFieldText = class extends TemplateResponseDocumentCustomFieldBase { +var TemplateResponseDocumentCustomFieldText = class _TemplateResponseDocumentCustomFieldText extends TemplateResponseDocumentCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentCustomFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23063,41 +24862,30 @@ var _TemplateResponseDocumentCustomFieldText = class extends TemplateResponseDoc ); } }; -var TemplateResponseDocumentCustomFieldText = _TemplateResponseDocumentCustomFieldText; -TemplateResponseDocumentCustomFieldText.discriminator = void 0; -TemplateResponseDocumentCustomFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - } -]; // model/templateResponseDocumentFieldGroup.ts -var _TemplateResponseDocumentFieldGroup = class { +var TemplateResponseDocumentFieldGroup = class _TemplateResponseDocumentFieldGroup { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "rule", + baseName: "rule", + type: "TemplateResponseDocumentFieldGroupRule" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFieldGroup.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23105,26 +24893,30 @@ var _TemplateResponseDocumentFieldGroup = class { ); } }; -var TemplateResponseDocumentFieldGroup = _TemplateResponseDocumentFieldGroup; -TemplateResponseDocumentFieldGroup.discriminator = void 0; -TemplateResponseDocumentFieldGroup.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "rule", - baseName: "rule", - type: "TemplateResponseDocumentFieldGroupRule" - } -]; // model/templateResponseDocumentFieldGroupRule.ts -var _TemplateResponseDocumentFieldGroupRule = class { +var TemplateResponseDocumentFieldGroupRule = class _TemplateResponseDocumentFieldGroupRule { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "requirement", + baseName: "requirement", + type: "string" + }, + { + name: "groupLabel", + baseName: "groupLabel", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFieldGroupRule.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23132,23 +24924,61 @@ var _TemplateResponseDocumentFieldGroupRule = class { ); } }; -var TemplateResponseDocumentFieldGroupRule = _TemplateResponseDocumentFieldGroupRule; -TemplateResponseDocumentFieldGroupRule.discriminator = void 0; -TemplateResponseDocumentFieldGroupRule.attributeTypeMap = [ - { - name: "requirement", - baseName: "requirement", - type: "string" - }, - { - name: "groupLabel", - baseName: "groupLabel", - type: "string" - } -]; // model/templateResponseDocumentFormFieldBase.ts -var _TemplateResponseDocumentFormFieldBase = class { +var TemplateResponseDocumentFormFieldBase = class _TemplateResponseDocumentFormFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFormFieldBase.attributeTypeMap; } @@ -23183,65 +25013,37 @@ var _TemplateResponseDocumentFormFieldBase = class { return null; } }; -var TemplateResponseDocumentFormFieldBase = _TemplateResponseDocumentFormFieldBase; -TemplateResponseDocumentFormFieldBase.discriminator = "type"; -TemplateResponseDocumentFormFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - } -]; // model/templateResponseDocumentFormFieldCheckbox.ts -var _TemplateResponseDocumentFormFieldCheckbox = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldCheckbox = class _TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23249,30 +25051,37 @@ var _TemplateResponseDocumentFormFieldCheckbox = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldCheckbox = _TemplateResponseDocumentFormFieldCheckbox; -TemplateResponseDocumentFormFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentFormFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldDateSigned.ts -var _TemplateResponseDocumentFormFieldDateSigned = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldDateSigned = class _TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23280,30 +25089,37 @@ var _TemplateResponseDocumentFormFieldDateSigned = class extends TemplateRespons ); } }; -var TemplateResponseDocumentFormFieldDateSigned = _TemplateResponseDocumentFormFieldDateSigned; -TemplateResponseDocumentFormFieldDateSigned.discriminator = void 0; -TemplateResponseDocumentFormFieldDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldDropdown.ts -var _TemplateResponseDocumentFormFieldDropdown = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldDropdown = class _TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23311,30 +25127,57 @@ var _TemplateResponseDocumentFormFieldDropdown = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldDropdown = _TemplateResponseDocumentFormFieldDropdown; -TemplateResponseDocumentFormFieldDropdown.discriminator = void 0; -TemplateResponseDocumentFormFieldDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldHyperlink.ts -var _TemplateResponseDocumentFormFieldHyperlink = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldHyperlink = class _TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "hyperlink"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23342,50 +25185,37 @@ var _TemplateResponseDocumentFormFieldHyperlink = class extends TemplateResponse ); } }; -var TemplateResponseDocumentFormFieldHyperlink = _TemplateResponseDocumentFormFieldHyperlink; -TemplateResponseDocumentFormFieldHyperlink.discriminator = void 0; -TemplateResponseDocumentFormFieldHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldInitials.ts -var _TemplateResponseDocumentFormFieldInitials = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldInitials = class _TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23393,30 +25223,37 @@ var _TemplateResponseDocumentFormFieldInitials = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldInitials = _TemplateResponseDocumentFormFieldInitials; -TemplateResponseDocumentFormFieldInitials.discriminator = void 0; -TemplateResponseDocumentFormFieldInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldRadio.ts -var _TemplateResponseDocumentFormFieldRadio = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldRadio = class _TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23424,30 +25261,37 @@ var _TemplateResponseDocumentFormFieldRadio = class extends TemplateResponseDocu ); } }; -var TemplateResponseDocumentFormFieldRadio = _TemplateResponseDocumentFormFieldRadio; -TemplateResponseDocumentFormFieldRadio.discriminator = void 0; -TemplateResponseDocumentFormFieldRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldSignature.ts -var _TemplateResponseDocumentFormFieldSignature = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldSignature = class _TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23455,30 +25299,62 @@ var _TemplateResponseDocumentFormFieldSignature = class extends TemplateResponse ); } }; -var TemplateResponseDocumentFormFieldSignature = _TemplateResponseDocumentFormFieldSignature; -TemplateResponseDocumentFormFieldSignature.discriminator = void 0; -TemplateResponseDocumentFormFieldSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldText.ts -var _TemplateResponseDocumentFormFieldText = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldText = class _TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + }, + { + name: "validationType", + baseName: "validation_type", + type: "TemplateResponseDocumentFormFieldText.ValidationTypeEnum" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23486,45 +25362,6 @@ var _TemplateResponseDocumentFormFieldText = class extends TemplateResponseDocum ); } }; -var TemplateResponseDocumentFormFieldText = _TemplateResponseDocumentFormFieldText; -TemplateResponseDocumentFormFieldText.discriminator = void 0; -TemplateResponseDocumentFormFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - }, - { - name: "validationType", - baseName: "validation_type", - type: "TemplateResponseDocumentFormFieldText.ValidationTypeEnum" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; ((TemplateResponseDocumentFormFieldText2) => { let ValidationTypeEnum; ((ValidationTypeEnum2) => { @@ -23542,10 +25379,70 @@ TemplateResponseDocumentFormFieldText.attributeTypeMap = [ })(TemplateResponseDocumentFormFieldText || (TemplateResponseDocumentFormFieldText = {})); // model/templateResponseDocumentStaticFieldBase.ts -var _TemplateResponseDocumentStaticFieldBase = class { +var TemplateResponseDocumentStaticFieldBase = class _TemplateResponseDocumentStaticFieldBase { constructor() { + /** + * The signer of the Static Field. + */ this["signer"] = "me_now"; } + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentStaticFieldBase.attributeTypeMap; } @@ -23580,70 +25477,32 @@ var _TemplateResponseDocumentStaticFieldBase = class { return null; } }; -var TemplateResponseDocumentStaticFieldBase = _TemplateResponseDocumentStaticFieldBase; -TemplateResponseDocumentStaticFieldBase.discriminator = "type"; -TemplateResponseDocumentStaticFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldCheckbox.ts -var _TemplateResponseDocumentStaticFieldCheckbox = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldCheckbox = class _TemplateResponseDocumentStaticFieldCheckbox extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23651,25 +25510,32 @@ var _TemplateResponseDocumentStaticFieldCheckbox = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldCheckbox = _TemplateResponseDocumentStaticFieldCheckbox; -TemplateResponseDocumentStaticFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentStaticFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldDateSigned.ts -var _TemplateResponseDocumentStaticFieldDateSigned = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldDateSigned = class _TemplateResponseDocumentStaticFieldDateSigned extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23677,25 +25543,32 @@ var _TemplateResponseDocumentStaticFieldDateSigned = class extends TemplateRespo ); } }; -var TemplateResponseDocumentStaticFieldDateSigned = _TemplateResponseDocumentStaticFieldDateSigned; -TemplateResponseDocumentStaticFieldDateSigned.discriminator = void 0; -TemplateResponseDocumentStaticFieldDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldDropdown.ts -var _TemplateResponseDocumentStaticFieldDropdown = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldDropdown = class _TemplateResponseDocumentStaticFieldDropdown extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23703,25 +25576,32 @@ var _TemplateResponseDocumentStaticFieldDropdown = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldDropdown = _TemplateResponseDocumentStaticFieldDropdown; -TemplateResponseDocumentStaticFieldDropdown.discriminator = void 0; -TemplateResponseDocumentStaticFieldDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldHyperlink.ts -var _TemplateResponseDocumentStaticFieldHyperlink = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldHyperlink = class _TemplateResponseDocumentStaticFieldHyperlink extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "hyperlink"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23729,25 +25609,32 @@ var _TemplateResponseDocumentStaticFieldHyperlink = class extends TemplateRespon ); } }; -var TemplateResponseDocumentStaticFieldHyperlink = _TemplateResponseDocumentStaticFieldHyperlink; -TemplateResponseDocumentStaticFieldHyperlink.discriminator = void 0; -TemplateResponseDocumentStaticFieldHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldInitials.ts -var _TemplateResponseDocumentStaticFieldInitials = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldInitials = class _TemplateResponseDocumentStaticFieldInitials extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23755,25 +25642,32 @@ var _TemplateResponseDocumentStaticFieldInitials = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldInitials = _TemplateResponseDocumentStaticFieldInitials; -TemplateResponseDocumentStaticFieldInitials.discriminator = void 0; -TemplateResponseDocumentStaticFieldInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldRadio.ts -var _TemplateResponseDocumentStaticFieldRadio = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldRadio = class _TemplateResponseDocumentStaticFieldRadio extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23781,25 +25675,32 @@ var _TemplateResponseDocumentStaticFieldRadio = class extends TemplateResponseDo ); } }; -var TemplateResponseDocumentStaticFieldRadio = _TemplateResponseDocumentStaticFieldRadio; -TemplateResponseDocumentStaticFieldRadio.discriminator = void 0; -TemplateResponseDocumentStaticFieldRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldSignature.ts -var _TemplateResponseDocumentStaticFieldSignature = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldSignature = class _TemplateResponseDocumentStaticFieldSignature extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23807,25 +25708,32 @@ var _TemplateResponseDocumentStaticFieldSignature = class extends TemplateRespon ); } }; -var TemplateResponseDocumentStaticFieldSignature = _TemplateResponseDocumentStaticFieldSignature; -TemplateResponseDocumentStaticFieldSignature.discriminator = void 0; -TemplateResponseDocumentStaticFieldSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldText.ts -var _TemplateResponseDocumentStaticFieldText = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldText = class _TemplateResponseDocumentStaticFieldText extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23833,21 +25741,30 @@ var _TemplateResponseDocumentStaticFieldText = class extends TemplateResponseDoc ); } }; -var TemplateResponseDocumentStaticFieldText = _TemplateResponseDocumentStaticFieldText; -TemplateResponseDocumentStaticFieldText.discriminator = void 0; -TemplateResponseDocumentStaticFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseFieldAvgTextLength.ts -var _TemplateResponseFieldAvgTextLength = class { +var TemplateResponseFieldAvgTextLength = class _TemplateResponseFieldAvgTextLength { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "numLines", + baseName: "num_lines", + type: "number" + }, + { + name: "numCharsPerLine", + baseName: "num_chars_per_line", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseFieldAvgTextLength.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23855,116 +25772,135 @@ var _TemplateResponseFieldAvgTextLength = class { ); } }; -var TemplateResponseFieldAvgTextLength = _TemplateResponseFieldAvgTextLength; -TemplateResponseFieldAvgTextLength.discriminator = void 0; -TemplateResponseFieldAvgTextLength.attributeTypeMap = [ - { - name: "numLines", - baseName: "num_lines", - type: "number" - }, - { - name: "numCharsPerLine", - baseName: "num_chars_per_line", - type: "number" - } -]; // model/templateResponseSignerRole.ts -var _TemplateResponseSignerRole = class { +var TemplateResponseSignerRole = class _TemplateResponseSignerRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseSignerRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseSignerRole"); } }; -var TemplateResponseSignerRole = _TemplateResponseSignerRole; -TemplateResponseSignerRole.discriminator = void 0; -TemplateResponseSignerRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/templateUpdateFilesRequest.ts -var _TemplateUpdateFilesRequest = class { +var TemplateUpdateFilesRequest = class _TemplateUpdateFilesRequest { constructor() { + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateUpdateFilesRequest"); } }; -var TemplateUpdateFilesRequest = _TemplateUpdateFilesRequest; -TemplateUpdateFilesRequest.discriminator = void 0; -TemplateUpdateFilesRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/templateUpdateFilesResponse.ts -var _TemplateUpdateFilesResponse = class { +var TemplateUpdateFilesResponse = class _TemplateUpdateFilesResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateUpdateFilesResponseTemplate" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateUpdateFilesResponse"); } }; -var TemplateUpdateFilesResponse = _TemplateUpdateFilesResponse; -TemplateUpdateFilesResponse.discriminator = void 0; -TemplateUpdateFilesResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateUpdateFilesResponseTemplate" - } -]; // model/templateUpdateFilesResponseTemplate.ts -var _TemplateUpdateFilesResponseTemplate = class { +var TemplateUpdateFilesResponseTemplate = class _TemplateUpdateFilesResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23972,43 +25908,262 @@ var _TemplateUpdateFilesResponseTemplate = class { ); } }; -var TemplateUpdateFilesResponseTemplate = _TemplateUpdateFilesResponseTemplate; -TemplateUpdateFilesResponseTemplate.discriminator = void 0; -TemplateUpdateFilesResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/unclaimedDraftCreateEmbeddedRequest.ts -var _UnclaimedDraftCreateEmbeddedRequest = class { +var UnclaimedDraftCreateEmbeddedRequest = class _UnclaimedDraftCreateEmbeddedRequest { constructor() { + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. + */ this["allowCcs"] = true; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the signers. + */ this["forceSignerPage"] = false; + /** + * Provide users the ability to review/edit the subject and message. + */ this["forceSubjectMessage"] = false; + /** + * Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. + */ this["hideTextTags"] = false; + /** + * The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. + */ this["holdRequest"] = false; + /** + * The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. + */ this["isForEmbeddedSigning"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. + */ this["type"] = _UnclaimedDraftCreateEmbeddedRequest.TypeEnum.RequestSignature; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["usePreexistingFields"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "forceSignerPage", + baseName: "force_signer_page", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "holdRequest", + baseName: "hold_request", + type: "boolean" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "UnclaimedDraftCreateEmbeddedRequest.TypeEnum" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24016,190 +26171,6 @@ var _UnclaimedDraftCreateEmbeddedRequest = class { ); } }; -var UnclaimedDraftCreateEmbeddedRequest = _UnclaimedDraftCreateEmbeddedRequest; -UnclaimedDraftCreateEmbeddedRequest.discriminator = void 0; -UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "forceSignerPage", - baseName: "force_signer_page", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "holdRequest", - baseName: "hold_request", - type: "boolean" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "UnclaimedDraftCreateEmbeddedRequest.TypeEnum" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; ((UnclaimedDraftCreateEmbeddedRequest2) => { let TypeEnum; ((TypeEnum2) => { @@ -24209,25 +26180,222 @@ UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap = [ })(UnclaimedDraftCreateEmbeddedRequest || (UnclaimedDraftCreateEmbeddedRequest = {})); // model/unclaimedDraftCreateEmbeddedWithTemplateRequest.ts -var _UnclaimedDraftCreateEmbeddedWithTemplateRequest = class { +var UnclaimedDraftCreateEmbeddedWithTemplateRequest = class _UnclaimedDraftCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. + */ this["holdRequest"] = false; + /** + * The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. + */ this["isForEmbeddedSigning"] = false; + /** + * This allows the requester to enable the preview experience (i.e. does not allow the requester\'s end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set). + */ this["previewOnly"] = false; + /** + * This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. + */ this["allowCcs"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "holdRequest", + baseName: "hold_request", + type: "boolean" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "previewOnly", + baseName: "preview_only", + type: "boolean" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24235,302 +26403,170 @@ var _UnclaimedDraftCreateEmbeddedWithTemplateRequest = class { ); } }; -var UnclaimedDraftCreateEmbeddedWithTemplateRequest = _UnclaimedDraftCreateEmbeddedWithTemplateRequest; -UnclaimedDraftCreateEmbeddedWithTemplateRequest.discriminator = void 0; -UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "holdRequest", - baseName: "hold_request", - type: "boolean" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "previewOnly", - baseName: "preview_only", - type: "boolean" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - } -]; // model/unclaimedDraftCreateRequest.ts -var _UnclaimedDraftCreateRequest = class { +var UnclaimedDraftCreateRequest = class _UnclaimedDraftCreateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. + */ this["hideTextTags"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["usePreexistingFields"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["useTextTags"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "UnclaimedDraftCreateRequest.TypeEnum" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftCreateRequest"); } }; -var UnclaimedDraftCreateRequest = _UnclaimedDraftCreateRequest; -UnclaimedDraftCreateRequest.discriminator = void 0; -UnclaimedDraftCreateRequest.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "UnclaimedDraftCreateRequest.TypeEnum" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; ((UnclaimedDraftCreateRequest2) => { let TypeEnum; ((TypeEnum2) => { @@ -24540,38 +26576,96 @@ UnclaimedDraftCreateRequest.attributeTypeMap = [ })(UnclaimedDraftCreateRequest || (UnclaimedDraftCreateRequest = {})); // model/unclaimedDraftCreateResponse.ts -var _UnclaimedDraftCreateResponse = class { +var UnclaimedDraftCreateResponse = class _UnclaimedDraftCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "unclaimedDraft", + baseName: "unclaimed_draft", + type: "UnclaimedDraftResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftCreateResponse"); } }; -var UnclaimedDraftCreateResponse = _UnclaimedDraftCreateResponse; -UnclaimedDraftCreateResponse.discriminator = void 0; -UnclaimedDraftCreateResponse.attributeTypeMap = [ - { - name: "unclaimedDraft", - baseName: "unclaimed_draft", - type: "UnclaimedDraftResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/unclaimedDraftEditAndResendRequest.ts -var _UnclaimedDraftEditAndResendRequest = class { +var UnclaimedDraftEditAndResendRequest = class _UnclaimedDraftEditAndResendRequest { constructor() { + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftEditAndResendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24579,118 +26673,82 @@ var _UnclaimedDraftEditAndResendRequest = class { ); } }; -var UnclaimedDraftEditAndResendRequest = _UnclaimedDraftEditAndResendRequest; -UnclaimedDraftEditAndResendRequest.discriminator = void 0; -UnclaimedDraftEditAndResendRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/unclaimedDraftResponse.ts -var _UnclaimedDraftResponse = class { +var UnclaimedDraftResponse = class _UnclaimedDraftResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "claimUrl", + baseName: "claim_url", + type: "string" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftResponse"); } }; -var UnclaimedDraftResponse = _UnclaimedDraftResponse; -UnclaimedDraftResponse.discriminator = void 0; -UnclaimedDraftResponse.attributeTypeMap = [ - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "claimUrl", - baseName: "claim_url", - type: "string" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/warningResponse.ts -var _WarningResponse = class { +var WarningResponse = class _WarningResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "warningMsg", + baseName: "warning_msg", + type: "string" + }, + { + name: "warningName", + baseName: "warning_name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _WarningResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "WarningResponse"); } }; -var WarningResponse = _WarningResponse; -WarningResponse.discriminator = void 0; -WarningResponse.attributeTypeMap = [ - { - name: "warningMsg", - baseName: "warning_msg", - type: "string" - }, - { - name: "warningName", - baseName: "warning_name", - type: "string" - } -]; // model/index.ts var enumsMap = { @@ -24788,6 +26846,10 @@ var typeMap = { SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, @@ -24935,7 +26997,7 @@ var AccountApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -24961,190 +27023,98 @@ var AccountApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - accountCreate(_0) { - return __async(this, arguments, function* (accountCreateRequest, options = { headers: {} }) { - accountCreateRequest = deserializeIfNeeded( + /** + * Creates a new Dropbox Sign Account that is associated with the specified `email_address`. + * @summary Create Account + * @param accountCreateRequest + * @param options + */ + async accountCreate(accountCreateRequest, options = { headers: {} }) { + accountCreateRequest = deserializeIfNeeded( + accountCreateRequest, + "AccountCreateRequest" + ); + const localVarPath = this.basePath + "/account/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountCreateRequest === null || accountCreateRequest === void 0) { + throw new Error( + "Required parameter accountCreateRequest was null or undefined when calling accountCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountCreateRequest, + AccountCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( accountCreateRequest, "AccountCreateRequest" ); - const localVarPath = this.basePath + "/account/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountCreateRequest === null || accountCreateRequest === void 0) { - throw new Error( - "Required parameter accountCreateRequest was null or undefined when calling accountCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - accountCreateRequest, - AccountCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountCreateRequest, - "AccountCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse( - resolve, - reject, - response, - "AccountCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse( - reject, - error.response, - 200, - "AccountCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - accountGet(_0, _1) { - return __async(this, arguments, function* (accountId, emailAddress, options = { headers: {} }) { - const localVarPath = this.basePath + "/account"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (emailAddress !== void 0) { - localVarQueryParameters["email_address"] = ObjectSerializer.serialize( - emailAddress, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse( resolve, reject, response, - "AccountGetResponse" + "AccountCreateResponse" ); }, (error) => { @@ -25156,7 +27126,7 @@ var AccountApi = class { reject, error.response, 200, - "AccountGetResponse" + "AccountCreateResponse" )) { return; } @@ -25171,93 +27141,326 @@ var AccountApi = class { reject(error); } ); - }); - }); + } + ); }); } - accountUpdate(_0) { - return __async(this, arguments, function* (accountUpdateRequest, options = { headers: {} }) { - accountUpdateRequest = deserializeIfNeeded( - accountUpdateRequest, - "AccountUpdateRequest" - ); - const localVarPath = this.basePath + "/account"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns the properties and settings of your Account. + * @summary Get Account + * @param accountId `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. + * @param emailAddress `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. + * @param options + */ + async accountGet(accountId, emailAddress, options = { headers: {} }) { + const localVarPath = this.basePath + "/account"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountUpdateRequest === null || accountUpdateRequest === void 0) { - throw new Error( - "Required parameter accountUpdateRequest was null or undefined when calling accountUpdate." + } + if (emailAddress !== void 0) { + localVarQueryParameters["email_address"] = ObjectSerializer.serialize( + emailAddress, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountGetResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( + }); + }); + } + /** + * Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + * @summary Update Account + * @param accountUpdateRequest + * @param options + */ + async accountUpdate(accountUpdateRequest, options = { headers: {} }) { + accountUpdateRequest = deserializeIfNeeded( + accountUpdateRequest, + "AccountUpdateRequest" + ); + const localVarPath = this.basePath + "/account"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountUpdateRequest === null || accountUpdateRequest === void 0) { + throw new Error( + "Required parameter accountUpdateRequest was null or undefined when calling accountUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountUpdateRequest, + AccountUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( accountUpdateRequest, - AccountUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountUpdateRequest, - "AccountUpdateRequest" + "AccountUpdateRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountGetResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + }); + }); + } + /** + * Verifies whether an Dropbox Sign Account exists for the given email address. + * @summary Verify Account + * @param accountVerifyRequest + * @param options + */ + async accountVerify(accountVerifyRequest, options = { headers: {} }) { + accountVerifyRequest = deserializeIfNeeded( + accountVerifyRequest, + "AccountVerifyRequest" + ); + const localVarPath = this.basePath + "/account/verify"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountVerifyRequest === null || accountVerifyRequest === void 0) { + throw new Error( + "Required parameter accountVerifyRequest was null or undefined when calling accountVerify." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountVerifyRequest, + AccountVerifyRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + accountVerifyRequest, + "AccountVerifyRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse( resolve, reject, response, - "AccountGetResponse" + "AccountVerifyResponse" ); }, (error) => { @@ -25269,7 +27472,7 @@ var AccountApi = class { reject, error.response, 200, - "AccountGetResponse" + "AccountVerifyResponse" )) { return; } @@ -25284,123 +27487,8 @@ var AccountApi = class { reject(error); } ); - }); - }); - }); - } - accountVerify(_0) { - return __async(this, arguments, function* (accountVerifyRequest, options = { headers: {} }) { - accountVerifyRequest = deserializeIfNeeded( - accountVerifyRequest, - "AccountVerifyRequest" - ); - const localVarPath = this.basePath + "/account/verify"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountVerifyRequest === null || accountVerifyRequest === void 0) { - throw new Error( - "Required parameter accountVerifyRequest was null or undefined when calling accountVerify." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - accountVerifyRequest, - AccountVerifyRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountVerifyRequest, - "AccountVerifyRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse( - resolve, - reject, - response, - "AccountVerifyResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse( - reject, - error.response, - 200, - "AccountVerifyResponse" - )) { - return; - } - if (handleErrorRangeResponse( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } }; @@ -25464,7 +27552,7 @@ var ApiAppApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -25490,513 +27578,541 @@ var ApiAppApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - apiAppCreate(_0) { - return __async(this, arguments, function* (apiAppCreateRequest, options = { headers: {} }) { - apiAppCreateRequest = deserializeIfNeeded2( + /** + * Creates a new API App. + * @summary Create API App + * @param apiAppCreateRequest + * @param options + */ + async apiAppCreate(apiAppCreateRequest, options = { headers: {} }) { + apiAppCreateRequest = deserializeIfNeeded2( + apiAppCreateRequest, + "ApiAppCreateRequest" + ); + const localVarPath = this.basePath + "/api_app"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (apiAppCreateRequest === null || apiAppCreateRequest === void 0) { + throw new Error( + "Required parameter apiAppCreateRequest was null or undefined when calling apiAppCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + apiAppCreateRequest, + ApiAppCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( apiAppCreateRequest, "ApiAppCreateRequest" ); - const localVarPath = this.basePath + "/api_app"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (apiAppCreateRequest === null || apiAppCreateRequest === void 0) { - throw new Error( - "Required parameter apiAppCreateRequest was null or undefined when calling apiAppCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - apiAppCreateRequest, - ApiAppCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - apiAppCreateRequest, - "ApiAppCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 201, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 201, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppDelete(_0) { - return __async(this, arguments, function* (clientId, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) + /** + * Deletes an API App. Can only be invoked for apps you own. + * @summary Delete API App + * @param clientId The client id of the API App to delete. + * @param options + */ + async apiAppDelete(clientId, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppDelete." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2(resolve, reject, response); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppGet(_0) { - return __async(this, arguments, function* (clientId, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns an object with information about an API App. + * @summary Get API App + * @param clientId The client id of the API App to retrieve. + * @param options + */ + async apiAppGet(clientId, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppGet." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. + * @summary List API Apps + * @param page Which page number of the API App List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async apiAppList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppListResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppListResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppListResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppUpdate(_0, _1) { - return __async(this, arguments, function* (clientId, apiAppUpdateRequest, options = { headers: {} }) { - apiAppUpdateRequest = deserializeIfNeeded2( + /** + * Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. + * @summary Update API App + * @param clientId The client id of the API App to update. + * @param apiAppUpdateRequest + * @param options + */ + async apiAppUpdate(clientId, apiAppUpdateRequest, options = { headers: {} }) { + apiAppUpdateRequest = deserializeIfNeeded2( + apiAppUpdateRequest, + "ApiAppUpdateRequest" + ); + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppUpdate." + ); + } + if (apiAppUpdateRequest === null || apiAppUpdateRequest === void 0) { + throw new Error( + "Required parameter apiAppUpdateRequest was null or undefined when calling apiAppUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + apiAppUpdateRequest, + ApiAppUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( apiAppUpdateRequest, "ApiAppUpdateRequest" ); - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppUpdate." - ); - } - if (apiAppUpdateRequest === null || apiAppUpdateRequest === void 0) { - throw new Error( - "Required parameter apiAppUpdateRequest was null or undefined when calling apiAppUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - apiAppUpdateRequest, - ApiAppUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - apiAppUpdateRequest, - "ApiAppUpdateRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -26061,7 +28177,7 @@ var BulkSendJobApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -26087,214 +28203,225 @@ var BulkSendJobApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - bulkSendJobGet(_0, _1, _2) { - return __async(this, arguments, function* (bulkSendJobId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/bulk_send_job/{bulk_send_job_id}".replace( - "{bulk_send_job_id}", - encodeURIComponent(String(bulkSendJobId)) + /** + * Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. + * @summary Get Bulk Send Job + * @param bulkSendJobId The id of the BulkSendJob to retrieve. + * @param page Which page number of the BulkSendJob list to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + * @param options + */ + async bulkSendJobGet(bulkSendJobId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/bulk_send_job/{bulk_send_job_id}".replace( + "{bulk_send_job_id}", + encodeURIComponent(String(bulkSendJobId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (bulkSendJobId === null || bulkSendJobId === void 0) { + throw new Error( + "Required parameter bulkSendJobId was null or undefined when calling bulkSendJobGet." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (bulkSendJobId === null || bulkSendJobId === void 0) { - throw new Error( - "Required parameter bulkSendJobId was null or undefined when calling bulkSendJobGet." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse3( - resolve, - reject, - response, - "BulkSendJobGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse3( - reject, - error.response, - 200, - "BulkSendJobGetResponse" - )) { - return; - } - if (handleErrorRangeResponse3( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - bulkSendJobList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/bulk_send_job/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse3( - resolve, - reject, - response, - "BulkSendJobListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse3( - reject, - error.response, - 200, - "BulkSendJobListResponse" - )) { - return; - } - if (handleErrorRangeResponse3( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse3( + resolve, + reject, + response, + "BulkSendJobGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse3( + reject, + error.response, + 200, + "BulkSendJobGetResponse" + )) { + return; + } + if (handleErrorRangeResponse3( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Returns a list of BulkSendJob that you can access. + * @summary List Bulk Send Jobs + * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + * @param options + */ + async bulkSendJobList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/bulk_send_job/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse3( + resolve, + reject, + response, + "BulkSendJobListResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse3( + reject, + error.response, + 200, + "BulkSendJobListResponse" + )) { + return; + } + if (handleErrorRangeResponse3( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -26352,7 +28479,7 @@ var EmbeddedApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -26378,224 +28505,236 @@ var EmbeddedApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - embeddedEditUrl(_0, _1) { - return __async(this, arguments, function* (templateId, embeddedEditUrlRequest, options = { headers: {} }) { - embeddedEditUrlRequest = deserializeIfNeeded3( + /** + * Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. + * @summary Get Embedded Template Edit URL + * @param templateId The id of the template to edit. + * @param embeddedEditUrlRequest + * @param options + */ + async embeddedEditUrl(templateId, embeddedEditUrlRequest, options = { headers: {} }) { + embeddedEditUrlRequest = deserializeIfNeeded3( + embeddedEditUrlRequest, + "EmbeddedEditUrlRequest" + ); + const localVarPath = this.basePath + "/embedded/edit_url/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling embeddedEditUrl." + ); + } + if (embeddedEditUrlRequest === null || embeddedEditUrlRequest === void 0) { + throw new Error( + "Required parameter embeddedEditUrlRequest was null or undefined when calling embeddedEditUrl." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + embeddedEditUrlRequest, + EmbeddedEditUrlRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( embeddedEditUrlRequest, "EmbeddedEditUrlRequest" ); - const localVarPath = this.basePath + "/embedded/edit_url/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling embeddedEditUrl." - ); - } - if (embeddedEditUrlRequest === null || embeddedEditUrlRequest === void 0) { - throw new Error( - "Required parameter embeddedEditUrlRequest was null or undefined when calling embeddedEditUrl." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - embeddedEditUrlRequest, - EmbeddedEditUrlRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - embeddedEditUrlRequest, - "EmbeddedEditUrlRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse4( - resolve, - reject, - response, - "EmbeddedEditUrlResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse4( - reject, - error.response, - 200, - "EmbeddedEditUrlResponse" - )) { - return; - } - if (handleErrorRangeResponse4( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse4( + resolve, + reject, + response, + "EmbeddedEditUrlResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse4( + reject, + error.response, + 200, + "EmbeddedEditUrlResponse" + )) { + return; + } + if (handleErrorRangeResponse4( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - embeddedSignUrl(_0) { - return __async(this, arguments, function* (signatureId, options = { headers: {} }) { - const localVarPath = this.basePath + "/embedded/sign_url/{signature_id}".replace( - "{signature_id}", - encodeURIComponent(String(signatureId)) + /** + * Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. + * @summary Get Embedded Sign URL + * @param signatureId The id of the signature to get a signature url for. + * @param options + */ + async embeddedSignUrl(signatureId, options = { headers: {} }) { + const localVarPath = this.basePath + "/embedded/sign_url/{signature_id}".replace( + "{signature_id}", + encodeURIComponent(String(signatureId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureId === null || signatureId === void 0) { + throw new Error( + "Required parameter signatureId was null or undefined when calling embeddedSignUrl." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureId === null || signatureId === void 0) { - throw new Error( - "Required parameter signatureId was null or undefined when calling embeddedSignUrl." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse4( - resolve, - reject, - response, - "EmbeddedSignUrlResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse4( - reject, - error.response, - 200, - "EmbeddedSignUrlResponse" - )) { - return; - } - if (handleErrorRangeResponse4( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse4( + resolve, + reject, + response, + "EmbeddedSignUrlResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse4( + reject, + error.response, + 200, + "EmbeddedSignUrlResponse" + )) { + return; + } + if (handleErrorRangeResponse4( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -26659,7 +28798,7 @@ var FaxApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -26685,456 +28824,480 @@ var FaxApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - faxDelete(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Deletes the specified Fax from the system + * @summary Delete Fax + * @param faxId Fax ID + * @param options + */ + async faxDelete(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxDelete." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5(resolve, reject, response); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxFiles(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/files/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) + /** + * Downloads files associated with a Fax + * @summary Download Fax Files + * @param faxId Fax ID + * @param options + */ + async faxFiles(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/files/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxFiles." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/pdf", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxFiles." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "Buffer" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "RequestFile" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "Buffer" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxGet(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns information about a Fax + * @summary Get Fax + * @param faxId Fax ID + * @param options + */ + async faxGet(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxGet." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxGetResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxGetResponse" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns properties of multiple Faxes + * @summary Lists Faxes + * @param page Which page number of the Fax List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async faxList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxListResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxListResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxListResponse" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxSend(_0) { - return __async(this, arguments, function* (faxSendRequest, options = { headers: {} }) { - faxSendRequest = deserializeIfNeeded4(faxSendRequest, "FaxSendRequest"); - const localVarPath = this.basePath + "/fax/send"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxSendRequest === null || faxSendRequest === void 0) { - throw new Error( - "Required parameter faxSendRequest was null or undefined when calling faxSend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxSendRequest, - FaxSendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(faxSendRequest, "FaxSendRequest"); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + /** + * Creates and sends a new Fax with the submitted file(s) + * @summary Send Fax + * @param faxSendRequest + * @param options + */ + async faxSend(faxSendRequest, options = { headers: {} }) { + faxSendRequest = deserializeIfNeeded4(faxSendRequest, "FaxSendRequest"); + const localVarPath = this.basePath + "/fax/send"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxSendRequest === null || faxSendRequest === void 0) { + throw new Error( + "Required parameter faxSendRequest was null or undefined when calling faxSend." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxSendRequest, + FaxSendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize(faxSendRequest, "FaxSendRequest"); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxGetResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxGetResponse" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -27199,7 +29362,7 @@ var FaxLineApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -27225,305 +29388,211 @@ var FaxLineApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - faxLineAddUser(_0) { - return __async(this, arguments, function* (faxLineAddUserRequest, options = { headers: {} }) { - faxLineAddUserRequest = deserializeIfNeeded5( + /** + * Grants a user access to the specified Fax Line. + * @summary Add Fax Line User + * @param faxLineAddUserRequest + * @param options + */ + async faxLineAddUser(faxLineAddUserRequest, options = { headers: {} }) { + faxLineAddUserRequest = deserializeIfNeeded5( + faxLineAddUserRequest, + "FaxLineAddUserRequest" + ); + const localVarPath = this.basePath + "/fax_line/add_user"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineAddUserRequest === null || faxLineAddUserRequest === void 0) { + throw new Error( + "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineAddUserRequest, + FaxLineAddUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( faxLineAddUserRequest, "FaxLineAddUserRequest" ); - const localVarPath = this.basePath + "/fax_line/add_user"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineAddUserRequest === null || faxLineAddUserRequest === void 0) { - throw new Error( - "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineAddUserRequest, - FaxLineAddUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineAddUserRequest, - "FaxLineAddUserRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - }); - }); - }); - } - faxLineAreaCodeGet(_0, _1, _2, _3) { - return __async(this, arguments, function* (country, state, province, city, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line/area_codes"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (country === null || country === void 0) { - throw new Error( - "Required parameter country was null or undefined when calling faxLineAreaCodeGet." - ); - } - if (country !== void 0) { - localVarQueryParameters["country"] = ObjectSerializer.serialize( - country, - "'CA' | 'US' | 'UK'" - ); - } - if (state !== void 0) { - localVarQueryParameters["state"] = ObjectSerializer.serialize( - state, - "'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'" - ); - } - if (province !== void 0) { - localVarQueryParameters["province"] = ObjectSerializer.serialize( - province, - "'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'" - ); - } - if (city !== void 0) { - localVarQueryParameters["city"] = ObjectSerializer.serialize( - city, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineAreaCodeGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineAreaCodeGetResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - faxLineCreate(_0) { - return __async(this, arguments, function* (faxLineCreateRequest, options = { headers: {} }) { - faxLineCreateRequest = deserializeIfNeeded5( - faxLineCreateRequest, - "FaxLineCreateRequest" + /** + * Returns a list of available area codes for a given state/province and city + * @summary Get Available Fax Line Area Codes + * @param country Filter area codes by country + * @param state Filter area codes by state + * @param province Filter area codes by province + * @param city Filter area codes by city + * @param options + */ + async faxLineAreaCodeGet(country, state, province, city, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line/area_codes"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (country === null || country === void 0) { + throw new Error( + "Required parameter country was null or undefined when calling faxLineAreaCodeGet." ); - const localVarPath = this.basePath + "/fax_line/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (country !== void 0) { + localVarQueryParameters["country"] = ObjectSerializer.serialize( + country, + "'CA' | 'US' | 'UK'" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineCreateRequest === null || faxLineCreateRequest === void 0) { - throw new Error( - "Required parameter faxLineCreateRequest was null or undefined when calling faxLineCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineCreateRequest, - FaxLineCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineCreateRequest, - "FaxLineCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + if (state !== void 0) { + localVarQueryParameters["state"] = ObjectSerializer.serialize( + state, + "'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'" + ); + } + if (province !== void 0) { + localVarQueryParameters["province"] = ObjectSerializer.serialize( + province, + "'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'" + ); + } + if (city !== void 0) { + localVarQueryParameters["city"] = ObjectSerializer.serialize( + city, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse6( resolve, reject, response, - "FaxLineResponse" + "FaxLineAreaCodeGetResponse" ); }, (error) => { @@ -27535,7 +29604,7 @@ var FaxLineApi = class { reject, error.response, 200, - "FaxLineResponse" + "FaxLineAreaCodeGetResponse" )) { return; } @@ -27550,168 +29619,409 @@ var FaxLineApi = class { reject(error); } ); - }); + } + ); + }); + } + /** + * Purchases a new Fax Line + * @summary Purchase Fax Line + * @param faxLineCreateRequest + * @param options + */ + async faxLineCreate(faxLineCreateRequest, options = { headers: {} }) { + faxLineCreateRequest = deserializeIfNeeded5( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + const localVarPath = this.basePath + "/fax_line/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineCreateRequest === null || faxLineCreateRequest === void 0) { + throw new Error( + "Required parameter faxLineCreateRequest was null or undefined when calling faxLineCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineCreateRequest, + FaxLineCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxLineDelete(_0) { - return __async(this, arguments, function* (faxLineDeleteRequest, options = { headers: {} }) { - faxLineDeleteRequest = deserializeIfNeeded5( + /** + * Deletes the specified Fax Line from the subscription. + * @summary Delete Fax Line + * @param faxLineDeleteRequest + * @param options + */ + async faxLineDelete(faxLineDeleteRequest, options = { headers: {} }) { + faxLineDeleteRequest = deserializeIfNeeded5( + faxLineDeleteRequest, + "FaxLineDeleteRequest" + ); + const localVarPath = this.basePath + "/fax_line"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineDeleteRequest === null || faxLineDeleteRequest === void 0) { + throw new Error( + "Required parameter faxLineDeleteRequest was null or undefined when calling faxLineDelete." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineDeleteRequest, + FaxLineDeleteRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( faxLineDeleteRequest, "FaxLineDeleteRequest" ); - const localVarPath = this.basePath + "/fax_line"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineDeleteRequest === null || faxLineDeleteRequest === void 0) { - throw new Error( - "Required parameter faxLineDeleteRequest was null or undefined when calling faxLineDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineDeleteRequest, - FaxLineDeleteRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineDeleteRequest, - "FaxLineDeleteRequest" - ); - } - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } + }); + }); + } + /** + * Returns the properties and settings of a Fax Line. + * @summary Get Fax Line + * @param number The Fax Line number + * @param options + */ + async faxLineGet(number, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (number === null || number === void 0) { + throw new Error( + "Required parameter number was null or undefined when calling faxLineGet." + ); + } + if (number !== void 0) { + localVarQueryParameters["number"] = ObjectSerializer.serialize( + number, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxLineGet(_0) { - return __async(this, arguments, function* (number, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (number === null || number === void 0) { - throw new Error( - "Required parameter number was null or undefined when calling faxLineGet." - ); - } - if (number !== void 0) { - localVarQueryParameters["number"] = ObjectSerializer.serialize( - number, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns the properties and settings of multiple Fax Lines. + * @summary List Fax Lines + * @param accountId Account ID + * @param page Which page number of the Fax Line List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param showTeamLines Include Fax Lines belonging to team members in the list + * @param options + */ + async faxLineList(accountId, page, pageSize, showTeamLines, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + if (showTeamLines !== void 0) { + localVarQueryParameters["show_team_lines"] = ObjectSerializer.serialize( + showTeamLines, + "boolean" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse6( resolve, reject, response, - "FaxLineResponse" + "FaxLineListResponse" ); }, (error) => { @@ -27723,7 +30033,7 @@ var FaxLineApi = class { reject, error.response, 200, - "FaxLineResponse" + "FaxLineListResponse" )) { return; } @@ -27738,223 +30048,122 @@ var FaxLineApi = class { reject(error); } ); - }); - }); + } + ); }); } - faxLineList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, showTeamLines, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (showTeamLines !== void 0) { - localVarQueryParameters["show_team_lines"] = ObjectSerializer.serialize( - showTeamLines, - "boolean" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + /** + * Removes a user\'s access to the specified Fax Line + * @summary Remove Fax Line Access + * @param faxLineRemoveUserRequest + * @param options + */ + async faxLineRemoveUser(faxLineRemoveUserRequest, options = { headers: {} }) { + faxLineRemoveUserRequest = deserializeIfNeeded5( + faxLineRemoveUserRequest, + "FaxLineRemoveUserRequest" + ); + const localVarPath = this.basePath + "/fax_line/remove_user"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineRemoveUserRequest === null || faxLineRemoveUserRequest === void 0) { + throw new Error( + "Required parameter faxLineRemoveUserRequest was null or undefined when calling faxLineRemoveUser." ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineListResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - faxLineRemoveUser(_0) { - return __async(this, arguments, function* (faxLineRemoveUserRequest, options = { headers: {} }) { - faxLineRemoveUserRequest = deserializeIfNeeded5( + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineRemoveUserRequest, + FaxLineRemoveUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( faxLineRemoveUserRequest, "FaxLineRemoveUserRequest" ); - const localVarPath = this.basePath + "/fax_line/remove_user"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineRemoveUserRequest === null || faxLineRemoveUserRequest === void 0) { - throw new Error( - "Required parameter faxLineRemoveUserRequest was null or undefined when calling faxLineRemoveUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineRemoveUserRequest, - FaxLineRemoveUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineRemoveUserRequest, - "FaxLineRemoveUserRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -28019,7 +30228,7 @@ var OAuthApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -28045,209 +30254,223 @@ var OAuthApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - oauthTokenGenerate(_0) { - return __async(this, arguments, function* (oAuthTokenGenerateRequest, options = { headers: {} }) { - oAuthTokenGenerateRequest = deserializeIfNeeded6( + /** + * Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. + * @summary OAuth Token Generate + * @param oAuthTokenGenerateRequest + * @param options + */ + async oauthTokenGenerate(oAuthTokenGenerateRequest, options = { headers: {} }) { + oAuthTokenGenerateRequest = deserializeIfNeeded6( + oAuthTokenGenerateRequest, + "OAuthTokenGenerateRequest" + ); + const localVarPath = this.basePath + "/oauth/token"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (oAuthTokenGenerateRequest === null || oAuthTokenGenerateRequest === void 0) { + throw new Error( + "Required parameter oAuthTokenGenerateRequest was null or undefined when calling oauthTokenGenerate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + oAuthTokenGenerateRequest, + OAuthTokenGenerateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( oAuthTokenGenerateRequest, "OAuthTokenGenerateRequest" ); - const localVarPath = this.basePath + "/oauth/token"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (oAuthTokenGenerateRequest === null || oAuthTokenGenerateRequest === void 0) { - throw new Error( - "Required parameter oAuthTokenGenerateRequest was null or undefined when calling oauthTokenGenerate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - oAuthTokenGenerateRequest, - OAuthTokenGenerateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - oAuthTokenGenerateRequest, - "OAuthTokenGenerateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse7( - resolve, - reject, - response, - "OAuthTokenResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse7( - reject, - error.response, - 200, - "OAuthTokenResponse" - )) { - return; - } - if (handleErrorRangeResponse7( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse7( + resolve, + reject, + response, + "OAuthTokenResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse7( + reject, + error.response, + 200, + "OAuthTokenResponse" + )) { + return; + } + if (handleErrorRangeResponse7( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - oauthTokenRefresh(_0) { - return __async(this, arguments, function* (oAuthTokenRefreshRequest, options = { headers: {} }) { - oAuthTokenRefreshRequest = deserializeIfNeeded6( + /** + * Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. + * @summary OAuth Token Refresh + * @param oAuthTokenRefreshRequest + * @param options + */ + async oauthTokenRefresh(oAuthTokenRefreshRequest, options = { headers: {} }) { + oAuthTokenRefreshRequest = deserializeIfNeeded6( + oAuthTokenRefreshRequest, + "OAuthTokenRefreshRequest" + ); + const localVarPath = this.basePath + "/oauth/token?refresh"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (oAuthTokenRefreshRequest === null || oAuthTokenRefreshRequest === void 0) { + throw new Error( + "Required parameter oAuthTokenRefreshRequest was null or undefined when calling oauthTokenRefresh." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + oAuthTokenRefreshRequest, + OAuthTokenRefreshRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( oAuthTokenRefreshRequest, "OAuthTokenRefreshRequest" ); - const localVarPath = this.basePath + "/oauth/token?refresh"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (oAuthTokenRefreshRequest === null || oAuthTokenRefreshRequest === void 0) { - throw new Error( - "Required parameter oAuthTokenRefreshRequest was null or undefined when calling oauthTokenRefresh." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - oAuthTokenRefreshRequest, - OAuthTokenRefreshRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - oAuthTokenRefreshRequest, - "OAuthTokenRefreshRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse7( - resolve, - reject, - response, - "OAuthTokenResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse7( - reject, - error.response, - 200, - "OAuthTokenResponse" - )) { - return; - } - if (handleErrorRangeResponse7( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse7( + resolve, + reject, + response, + "OAuthTokenResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse7( + reject, + error.response, + 200, + "OAuthTokenResponse" + )) { + return; + } + if (handleErrorRangeResponse7( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -28312,7 +30535,7 @@ var ReportApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -28338,114 +30561,121 @@ var ReportApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - reportCreate(_0) { - return __async(this, arguments, function* (reportCreateRequest, options = { headers: {} }) { - reportCreateRequest = deserializeIfNeeded7( + /** + * Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. + * @summary Create Report + * @param reportCreateRequest + * @param options + */ + async reportCreate(reportCreateRequest, options = { headers: {} }) { + reportCreateRequest = deserializeIfNeeded7( + reportCreateRequest, + "ReportCreateRequest" + ); + const localVarPath = this.basePath + "/report/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (reportCreateRequest === null || reportCreateRequest === void 0) { + throw new Error( + "Required parameter reportCreateRequest was null or undefined when calling reportCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + reportCreateRequest, + ReportCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( reportCreateRequest, "ReportCreateRequest" ); - const localVarPath = this.basePath + "/report/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (reportCreateRequest === null || reportCreateRequest === void 0) { - throw new Error( - "Required parameter reportCreateRequest was null or undefined when calling reportCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - reportCreateRequest, - ReportCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - reportCreateRequest, - "ReportCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse8( - resolve, - reject, - response, - "ReportCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse8( - reject, - error.response, - 200, - "ReportCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse8( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse8( + resolve, + reject, + response, + "ReportCreateResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse8( + reject, + error.response, + 200, + "ReportCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse8( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -28509,7 +30739,7 @@ var SignatureRequestApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -28535,298 +30765,108 @@ var SignatureRequestApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - signatureRequestBulkCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestBulkCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestBulkCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( - signatureRequestBulkCreateEmbeddedWithTemplateRequest, - "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/bulk_create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. + * @summary Embedded Bulk Send with Template + * @param signatureRequestBulkCreateEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestBulkCreateEmbeddedWithTemplate(signatureRequestBulkCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestBulkCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, + "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/bulk_create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestBulkCreateEmbeddedWithTemplateRequest === null || signatureRequestBulkCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestBulkCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestBulkCreateEmbeddedWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestBulkCreateEmbeddedWithTemplateRequest === null || signatureRequestBulkCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestBulkCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestBulkCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestBulkCreateEmbeddedWithTemplateRequest, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestBulkCreateEmbeddedWithTemplateRequest, - "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, + SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "BulkSendJobSendResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "BulkSendJobSendResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestBulkSendWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestBulkSendWithTemplateRequest, options = { headers: {} }) { - signatureRequestBulkSendWithTemplateRequest = deserializeIfNeeded8( - signatureRequestBulkSendWithTemplateRequest, - "SignatureRequestBulkSendWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/bulk_send_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } else { + data = ObjectSerializer.serialize( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, + "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestBulkSendWithTemplateRequest === null || signatureRequestBulkSendWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestBulkSendWithTemplateRequest was null or undefined when calling signatureRequestBulkSendWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestBulkSendWithTemplateRequest, - SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestBulkSendWithTemplateRequest, - "SignatureRequestBulkSendWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "BulkSendJobSendResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "BulkSendJobSendResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestCancel(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/cancel/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestCancel." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9(resolve, reject, response); + handleSuccessfulResponse9( + resolve, + reject, + response, + "BulkSendJobSendResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "BulkSendJobSendResponse" + )) { + return; + } if (handleErrorRangeResponse9( reject, error.response, @@ -28838,311 +30878,102 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); - }); - } - signatureRequestCreateEmbedded(_0) { - return __async(this, arguments, function* (signatureRequestCreateEmbeddedRequest, options = { headers: {} }) { - signatureRequestCreateEmbeddedRequest = deserializeIfNeeded8( - signatureRequestCreateEmbeddedRequest, - "SignatureRequestCreateEmbeddedRequest" - ); - const localVarPath = this.basePath + "/signature_request/create_embedded"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestCreateEmbeddedRequest === null || signatureRequestCreateEmbeddedRequest === void 0) { - throw new Error( - "Required parameter signatureRequestCreateEmbeddedRequest was null or undefined when calling signatureRequestCreateEmbedded." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestCreateEmbeddedRequest, - SignatureRequestCreateEmbeddedRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestCreateEmbeddedRequest, - "SignatureRequestCreateEmbeddedRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } - signatureRequestCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( - signatureRequestCreateEmbeddedWithTemplateRequest, - "SignatureRequestCreateEmbeddedWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. + * @summary Bulk Send with Template + * @param signatureRequestBulkSendWithTemplateRequest + * @param options + */ + async signatureRequestBulkSendWithTemplate(signatureRequestBulkSendWithTemplateRequest, options = { headers: {} }) { + signatureRequestBulkSendWithTemplateRequest = deserializeIfNeeded8( + signatureRequestBulkSendWithTemplateRequest, + "SignatureRequestBulkSendWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/bulk_send_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestBulkSendWithTemplateRequest === null || signatureRequestBulkSendWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestBulkSendWithTemplateRequest was null or undefined when calling signatureRequestBulkSendWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestCreateEmbeddedWithTemplateRequest === null || signatureRequestCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestCreateEmbeddedWithTemplateRequest, - SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestCreateEmbeddedWithTemplateRequest, - "SignatureRequestCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestBulkSendWithTemplateRequest, + SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestFiles(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, fileType, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } else { + data = ObjectSerializer.serialize( + signatureRequestBulkSendWithTemplateRequest, + "SignatureRequestBulkSendWithTemplateRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/pdf", "application/zip", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFiles." - ); - } - if (fileType !== void 0) { - localVarQueryParameters["file_type"] = ObjectSerializer.serialize( - fileType, - "'pdf' | 'zip'" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse9( resolve, reject, response, - "Buffer" + "BulkSendJobSendResponse" ); }, (error) => { @@ -29154,7 +30985,7 @@ var SignatureRequestApi = class { reject, error.response, 200, - "RequestFile" + "BulkSendJobSendResponse" )) { return; } @@ -29169,178 +31000,188 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestFilesAsDataUri(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files_as_data_uri/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + /** + * Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + * @summary Cancel Incomplete Signature Request + * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. + * @param options + */ + async signatureRequestCancel(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/cancel/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestCancel." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsDataUri." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "FileResponseDataUri" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "FileResponseDataUri" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - signatureRequestFilesAsFileUrl(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, forceDownload, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files_as_file_url/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsFileUrl." - ); - } - if (forceDownload !== void 0) { - localVarQueryParameters["force_download"] = ObjectSerializer.serialize( - forceDownload, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + /** + * Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Create Embedded Signature Request + * @param signatureRequestCreateEmbeddedRequest + * @param options + */ + async signatureRequestCreateEmbedded(signatureRequestCreateEmbeddedRequest, options = { headers: {} }) { + signatureRequestCreateEmbeddedRequest = deserializeIfNeeded8( + signatureRequestCreateEmbeddedRequest, + "SignatureRequestCreateEmbeddedRequest" + ); + const localVarPath = this.basePath + "/signature_request/create_embedded"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestCreateEmbeddedRequest === null || signatureRequestCreateEmbeddedRequest === void 0) { + throw new Error( + "Required parameter signatureRequestCreateEmbeddedRequest was null or undefined when calling signatureRequestCreateEmbedded." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestCreateEmbeddedRequest, + SignatureRequestCreateEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestCreateEmbeddedRequest, + "SignatureRequestCreateEmbeddedRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse9( resolve, reject, response, - "FileResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -29352,7 +31193,7 @@ var SignatureRequestApi = class { reject, error.response, 200, - "FileResponse" + "SignatureRequestGetResponse" )) { return; } @@ -29367,502 +31208,248 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestGet(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Create Embedded Signature Request with Template + * @param signatureRequestCreateEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestCreateEmbeddedWithTemplateRequest, + "SignatureRequestCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestCreateEmbeddedWithTemplateRequest === null || signatureRequestCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestCreateEmbeddedWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } else { + data = ObjectSerializer.serialize( + signatureRequestCreateEmbeddedWithTemplateRequest, + "SignatureRequestCreateEmbeddedWithTemplateRequest" ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, query, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (query !== void 0) { - localVarQueryParameters["query"] = ObjectSerializer.serialize( - query, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestListResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestReleaseHold(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/release_hold/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestReleaseHold." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - signatureRequestRemind(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestRemindRequest, options = { headers: {} }) { - signatureRequestRemindRequest = deserializeIfNeeded8( - signatureRequestRemindRequest, - "SignatureRequestRemindRequest" - ); - const localVarPath = this.basePath + "/signature_request/remind/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + /** + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditRequest + * @param options + */ + async signatureRequestEdit(signatureRequestId, signatureRequestEditRequest, options = { headers: {} }) { + signatureRequestEditRequest = deserializeIfNeeded8( + signatureRequestEditRequest, + "SignatureRequestEditRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEdit." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestEditRequest === null || signatureRequestEditRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditRequest was null or undefined when calling signatureRequestEdit." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemind." - ); - } - if (signatureRequestRemindRequest === null || signatureRequestRemindRequest === void 0) { - throw new Error( - "Required parameter signatureRequestRemindRequest was null or undefined when calling signatureRequestRemind." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestRemindRequest, - SignatureRequestRemindRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestRemindRequest, - "SignatureRequestRemindRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditRequest, + SignatureRequestEditRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestRemove(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/remove/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } else { + data = ObjectSerializer.serialize( + signatureRequestEditRequest, + "SignatureRequestEditRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemove." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9(resolve, reject, response); + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } if (handleErrorRangeResponse9( reject, error.response, @@ -29874,539 +31461,111 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestSend(_0) { - return __async(this, arguments, function* (signatureRequestSendRequest, options = { headers: {} }) { - signatureRequestSendRequest = deserializeIfNeeded8( - signatureRequestSendRequest, - "SignatureRequestSendRequest" + /** + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedRequest + * @param options + */ + async signatureRequestEditEmbedded(signatureRequestId, signatureRequestEditEmbeddedRequest, options = { headers: {} }) { + signatureRequestEditEmbeddedRequest = deserializeIfNeeded8( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_embedded/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbedded." ); - const localVarPath = this.basePath + "/signature_request/send"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestEditEmbeddedRequest === null || signatureRequestEditEmbeddedRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedRequest was null or undefined when calling signatureRequestEditEmbedded." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestSendRequest === null || signatureRequestSendRequest === void 0) { - throw new Error( - "Required parameter signatureRequestSendRequest was null or undefined when calling signatureRequestSend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestSendRequest, - SignatureRequestSendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestSendRequest, - "SignatureRequestSendRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestSendWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestSendWithTemplateRequest, options = { headers: {} }) { - signatureRequestSendWithTemplateRequest = deserializeIfNeeded8( - signatureRequestSendWithTemplateRequest, - "SignatureRequestSendWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/send_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestSendWithTemplateRequest === null || signatureRequestSendWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestSendWithTemplateRequest was null or undefined when calling signatureRequestSendWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestSendWithTemplateRequest, - SignatureRequestSendWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestSendWithTemplateRequest, - "SignatureRequestSendWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestUpdate(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestUpdateRequest, options = { headers: {} }) { - signatureRequestUpdateRequest = deserializeIfNeeded8( - signatureRequestUpdateRequest, - "SignatureRequestUpdateRequest" - ); - const localVarPath = this.basePath + "/signature_request/update/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestUpdate." - ); - } - if (signatureRequestUpdateRequest === null || signatureRequestUpdateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestUpdateRequest was null or undefined when calling signatureRequestUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestUpdateRequest, - SignatureRequestUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestUpdateRequest, - "SignatureRequestUpdateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } -}; -function deserializeIfNeeded8(obj, classname) { - if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { - return ObjectSerializer.deserialize(obj, classname); - } - return obj; -} -function handleSuccessfulResponse9(resolve, reject, response, returnType) { - let body = response.data; - if (response.status && response.status >= 200 && response.status <= 299) { - if (returnType) { - body = ObjectSerializer.deserialize(body, returnType); - } - resolve({ response, body }); - } else { - reject(new HttpError(response, body, response.status)); - } -} -function handleErrorCodeResponse9(reject, response, code, returnType) { - if (response.status !== code) { - return false; - } - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; -} -function handleErrorRangeResponse9(reject, response, code, returnType) { - let rangeCodeLeft = Number(code[0] + "00"); - let rangeCodeRight = Number(code[0] + "99"); - if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; - } - return false; -} - -// api/teamApi.ts -var defaultBasePath10 = "https://api.hellosign.com/v3"; -var TeamApi = class { - constructor(basePath) { - this._basePath = defaultBasePath10; - this._defaultHeaders = { "User-Agent": USER_AGENT }; - this._useQuerystring = false; - this.authentications = { - default: new VoidAuth(), - api_key: new HttpBasicAuth(), - oauth2: new HttpBearerAuth() - }; - this.interceptors = []; - if (basePath) { - this.basePath = basePath; } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key) { - this.authentications.api_key.username = key; - } - set username(username) { - this.authentications.api_key.username = username; - } - set password(password) { - this.authentications.api_key.password = password; - } - set accessToken(accessToken) { - this.authentications.oauth2.accessToken = accessToken; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - teamAddMember(_0, _1) { - return __async(this, arguments, function* (teamAddMemberRequest, teamId, options = { headers: {} }) { - teamAddMemberRequest = deserializeIfNeeded9( - teamAddMemberRequest, - "TeamAddMemberRequest" - ); - const localVarPath = this.basePath + "/team/add_member"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamAddMemberRequest === null || teamAddMemberRequest === void 0) { - throw new Error( - "Required parameter teamAddMemberRequest was null or undefined when calling teamAddMember." - ); - } - if (teamId !== void 0) { - localVarQueryParameters["team_id"] = ObjectSerializer.serialize( - teamId, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamAddMemberRequest, - TeamAddMemberRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - teamAddMemberRequest, - "TeamAddMemberRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -30414,15 +31573,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -30433,90 +31592,111 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamCreate(_0) { - return __async(this, arguments, function* (teamCreateRequest, options = { headers: {} }) { - teamCreateRequest = deserializeIfNeeded9( - teamCreateRequest, - "TeamCreateRequest" - ); - const localVarPath = this.basePath + "/team/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamCreateRequest === null || teamCreateRequest === void 0) { - throw new Error( - "Required parameter teamCreateRequest was null or undefined when calling teamCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamCreateRequest, - TeamCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(teamCreateRequest, "TeamCreateRequest"); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + /** + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request with Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestEditEmbeddedWithTemplate(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestEditEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_embedded_with_template/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." + ); + } + if (signatureRequestEditEmbeddedWithTemplateRequest === null || signatureRequestEditEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -30524,15 +31704,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -30543,141 +31723,111 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamDelete() { - return __async(this, arguments, function* (options = { headers: {} }) { - const localVarPath = this.basePath + "/team/destroy"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + /** + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request With Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditWithTemplateRequest + * @param options + */ + async signatureRequestEditWithTemplate(signatureRequestId, signatureRequestEditWithTemplateRequest, options = { headers: {} }) { + signatureRequestEditWithTemplateRequest = deserializeIfNeeded8( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_with_template/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditWithTemplate." ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - }); - }); - }); - } - teamGet() { - return __async(this, arguments, function* (options = { headers: {} }) { - const localVarPath = this.basePath + "/team"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + if (signatureRequestEditWithTemplateRequest === null || signatureRequestEditWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditWithTemplateRequest was null or undefined when calling signatureRequestEditWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditWithTemplateRequest, + SignatureRequestEditWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -30685,15 +31835,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -30704,392 +31854,187 @@ var TeamApi = class { reject(error); } ); - }); - }); - }); - } - teamInfo(_0) { - return __async(this, arguments, function* (teamId, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/info"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId !== void 0) { - localVarQueryParameters["team_id"] = ObjectSerializer.serialize( - teamId, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamGetInfoResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamGetInfoResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } - teamInvites(_0) { - return __async(this, arguments, function* (emailAddress, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/invites"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (emailAddress !== void 0) { - localVarQueryParameters["email_address"] = ObjectSerializer.serialize( - emailAddress, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + * @param options + */ + async signatureRequestFiles(signatureRequestId, fileType, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/zip", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFiles." ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamInvitesResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamInvitesResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - teamMembers(_0, _1, _2) { - return __async(this, arguments, function* (teamId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/members/{team_id}".replace( - "{team_id}", - encodeURIComponent(String(teamId)) + } + if (fileType !== void 0) { + localVarQueryParameters["file_type"] = ObjectSerializer.serialize( + fileType, + "'pdf' | 'zip'" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId === null || teamId === void 0) { - throw new Error( - "Required parameter teamId was null or undefined when calling teamMembers." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamMembersResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamMembersResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "Buffer" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - teamRemoveMember(_0) { - return __async(this, arguments, function* (teamRemoveMemberRequest, options = { headers: {} }) { - teamRemoveMemberRequest = deserializeIfNeeded9( - teamRemoveMemberRequest, - "TeamRemoveMemberRequest" + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files as Data Uri + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param options + */ + async signatureRequestFilesAsDataUri(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files_as_data_uri/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsDataUri." ); - const localVarPath = this.basePath + "/team/remove_member"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamRemoveMemberRequest === null || teamRemoveMemberRequest === void 0) { - throw new Error( - "Required parameter teamRemoveMemberRequest was null or undefined when calling teamRemoveMember." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamRemoveMemberRequest, - TeamRemoveMemberRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - teamRemoveMemberRequest, - "TeamRemoveMemberRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "FileResponseDataUri" ); }, (error) => { @@ -31097,15 +32042,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, - 201, - "TeamGetResponse" + 200, + "FileResponseDataUri" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31116,199 +32061,187 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamSubTeams(_0, _1, _2) { - return __async(this, arguments, function* (teamId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/sub_teams/{team_id}".replace( - "{team_id}", - encodeURIComponent(String(teamId)) + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files as File Url + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. + * @param options + */ + async signatureRequestFilesAsFileUrl(signatureRequestId, forceDownload, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files_as_file_url/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsFileUrl." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (forceDownload !== void 0) { + localVarQueryParameters["force_download"] = ObjectSerializer.serialize( + forceDownload, + "number" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId === null || teamId === void 0) { - throw new Error( - "Required parameter teamId was null or undefined when calling teamSubTeams." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamSubTeamsResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamSubTeamsResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "FileResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "FileResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - teamUpdate(_0) { - return __async(this, arguments, function* (teamUpdateRequest, options = { headers: {} }) { - teamUpdateRequest = deserializeIfNeeded9( - teamUpdateRequest, - "TeamUpdateRequest" - ); - const localVarPath = this.basePath + "/team"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamUpdateRequest === null || teamUpdateRequest === void 0) { - throw new Error( - "Required parameter teamUpdateRequest was null or undefined when calling teamUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamUpdateRequest, - TeamUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(teamUpdateRequest, "TeamUpdateRequest"); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. + * @summary Get Signature Request + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param options + */ + async signatureRequestGet(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestGet." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -31316,15 +32249,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31335,518 +32268,116 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } -}; -function deserializeIfNeeded9(obj, classname) { - if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { - return ObjectSerializer.deserialize(obj, classname); - } - return obj; -} -function handleSuccessfulResponse10(resolve, reject, response, returnType) { - let body = response.data; - if (response.status && response.status >= 200 && response.status <= 299) { - if (returnType) { - body = ObjectSerializer.deserialize(body, returnType); - } - resolve({ response, body }); - } else { - reject(new HttpError(response, body, response.status)); - } -} -function handleErrorCodeResponse10(reject, response, code, returnType) { - if (response.status !== code) { - return false; - } - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; -} -function handleErrorRangeResponse10(reject, response, code, returnType) { - let rangeCodeLeft = Number(code[0] + "00"); - let rangeCodeRight = Number(code[0] + "99"); - if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; - } - return false; -} - -// api/templateApi.ts -var defaultBasePath11 = "https://api.hellosign.com/v3"; -var TemplateApi = class { - constructor(basePath) { - this._basePath = defaultBasePath11; - this._defaultHeaders = { "User-Agent": USER_AGENT }; - this._useQuerystring = false; - this.authentications = { - default: new VoidAuth(), - api_key: new HttpBasicAuth(), - oauth2: new HttpBearerAuth() - }; - this.interceptors = []; - if (basePath) { - this.basePath = basePath; - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key) { - this.authentications.api_key.username = key; - } - set username(username) { - this.authentications.api_key.username = username; - } - set password(password) { - this.authentications.api_key.password = password; - } - set accessToken(accessToken) { - this.authentications.oauth2.accessToken = accessToken; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - templateAddUser(_0, _1) { - return __async(this, arguments, function* (templateId, templateAddUserRequest, options = { headers: {} }) { - templateAddUserRequest = deserializeIfNeeded10( - templateAddUserRequest, - "TemplateAddUserRequest" - ); - const localVarPath = this.basePath + "/template/add_user/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + * @summary List Signature Requests + * @param accountId Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + * @param page Which page number of the SignatureRequest List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. + * @param options + */ + async signatureRequestList(accountId, page, pageSize, query, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateAddUser." - ); - } - if (templateAddUserRequest === null || templateAddUserRequest === void 0) { - throw new Error( - "Required parameter templateAddUserRequest was null or undefined when calling templateAddUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateAddUserRequest, - TemplateAddUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateAddUserRequest, - "TemplateAddUserRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateCreate(_0) { - return __async(this, arguments, function* (templateCreateRequest, options = { headers: {} }) { - templateCreateRequest = deserializeIfNeeded10( - templateCreateRequest, - "TemplateCreateRequest" + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" ); - const localVarPath = this.basePath + "/template/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (query !== void 0) { + localVarQueryParameters["query"] = ObjectSerializer.serialize( + query, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateCreateRequest === null || templateCreateRequest === void 0) { - throw new Error( - "Required parameter templateCreateRequest was null or undefined when calling templateCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateCreateRequest, - TemplateCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateCreateRequest, - "TemplateCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateCreateEmbeddedDraft(_0) { - return __async(this, arguments, function* (templateCreateEmbeddedDraftRequest, options = { headers: {} }) { - templateCreateEmbeddedDraftRequest = deserializeIfNeeded10( - templateCreateEmbeddedDraftRequest, - "TemplateCreateEmbeddedDraftRequest" - ); - const localVarPath = this.basePath + "/template/create_embedded_draft"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateCreateEmbeddedDraftRequest === null || templateCreateEmbeddedDraftRequest === void 0) { - throw new Error( - "Required parameter templateCreateEmbeddedDraftRequest was null or undefined when calling templateCreateEmbeddedDraft." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateCreateEmbeddedDraftRequest, - TemplateCreateEmbeddedDraftRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateCreateEmbeddedDraftRequest, - "TemplateCreateEmbeddedDraftRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateCreateEmbeddedDraftResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateCreateEmbeddedDraftResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateDelete(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/delete/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11(resolve, reject, response); + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestListResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorRangeResponse11( + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestListResponse" + )) { + return; + } + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31857,81 +32388,81 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateFiles(_0, _1) { - return __async(this, arguments, function* (templateId, fileType, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + /** + * Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. + * @summary Release On-Hold Signature Request + * @param signatureRequestId The id of the SignatureRequest to release. + * @param options + */ + async signatureRequestReleaseHold(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/release_hold/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestReleaseHold." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/pdf", "application/zip", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFiles." - ); - } - if (fileType !== void 0) { - localVarQueryParameters["file_type"] = ObjectSerializer.serialize( - fileType, - "'pdf' | 'zip'" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse9( resolve, reject, response, - "Buffer" + "SignatureRequestGetResponse" ); }, (error) => { @@ -31939,15 +32470,15 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse9( reject, error.response, 200, - "RequestFile" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse11( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31958,178 +32489,111 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateFilesAsDataUri(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files_as_data_uri/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFilesAsDataUri." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "FileResponseDataUri" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "FileResponseDataUri" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateFilesAsFileUrl(_0, _1) { - return __async(this, arguments, function* (templateId, forceDownload, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files_as_file_url/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + /** + * Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. + * @summary Send Request Reminder + * @param signatureRequestId The id of the SignatureRequest to send a reminder for. + * @param signatureRequestRemindRequest + * @param options + */ + async signatureRequestRemind(signatureRequestId, signatureRequestRemindRequest, options = { headers: {} }) { + signatureRequestRemindRequest = deserializeIfNeeded8( + signatureRequestRemindRequest, + "SignatureRequestRemindRequest" + ); + const localVarPath = this.basePath + "/signature_request/remind/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemind." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestRemindRequest === null || signatureRequestRemindRequest === void 0) { + throw new Error( + "Required parameter signatureRequestRemindRequest was null or undefined when calling signatureRequestRemind." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFilesAsFileUrl." - ); - } - if (forceDownload !== void 0) { - localVarQueryParameters["force_download"] = ObjectSerializer.serialize( - forceDownload, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestRemindRequest, + SignatureRequestRemindRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestRemindRequest, + "SignatureRequestRemindRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse9( resolve, reject, response, - "FileResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -32137,15 +32601,15 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse9( reject, error.response, 200, - "FileResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse11( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -32156,474 +32620,474 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateGet(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + * @summary Remove Signature Request Access + * @param signatureRequestId The id of the SignatureRequest to remove. + * @param options + */ + async signatureRequestRemove(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/remove/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemove." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - templateList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, query, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (query !== void 0) { - localVarQueryParameters["query"] = ObjectSerializer.serialize( - query, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + /** + * Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + * @summary Send Signature Request + * @param signatureRequestSendRequest + * @param options + */ + async signatureRequestSend(signatureRequestSendRequest, options = { headers: {} }) { + signatureRequestSendRequest = deserializeIfNeeded8( + signatureRequestSendRequest, + "SignatureRequestSendRequest" + ); + const localVarPath = this.basePath + "/signature_request/send"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestSendRequest === null || signatureRequestSendRequest === void 0) { + throw new Error( + "Required parameter signatureRequestSendRequest was null or undefined when calling signatureRequestSend." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestSendRequest, + SignatureRequestSendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestSendRequest, + "SignatureRequestSendRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateListResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - templateRemoveUser(_0, _1) { - return __async(this, arguments, function* (templateId, templateRemoveUserRequest, options = { headers: {} }) { - templateRemoveUserRequest = deserializeIfNeeded10( - templateRemoveUserRequest, - "TemplateRemoveUserRequest" + /** + * Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. + * @summary Send with Template + * @param signatureRequestSendWithTemplateRequest + * @param options + */ + async signatureRequestSendWithTemplate(signatureRequestSendWithTemplateRequest, options = { headers: {} }) { + signatureRequestSendWithTemplateRequest = deserializeIfNeeded8( + signatureRequestSendWithTemplateRequest, + "SignatureRequestSendWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/send_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestSendWithTemplateRequest === null || signatureRequestSendWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestSendWithTemplateRequest was null or undefined when calling signatureRequestSendWithTemplate." ); - const localVarPath = this.basePath + "/template/remove_user/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestSendWithTemplateRequest, + SignatureRequestSendWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestSendWithTemplateRequest, + "SignatureRequestSendWithTemplateRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateRemoveUser." - ); - } - if (templateRemoveUserRequest === null || templateRemoveUserRequest === void 0) { - throw new Error( - "Required parameter templateRemoveUserRequest was null or undefined when calling templateRemoveUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateRemoveUserRequest, - TemplateRemoveUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateRemoveUserRequest, - "TemplateRemoveUserRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - templateUpdateFiles(_0, _1) { - return __async(this, arguments, function* (templateId, templateUpdateFilesRequest, options = { headers: {} }) { - templateUpdateFilesRequest = deserializeIfNeeded10( - templateUpdateFilesRequest, - "TemplateUpdateFilesRequest" + /** + * Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. + * @summary Update Signature Request + * @param signatureRequestId The id of the SignatureRequest to update. + * @param signatureRequestUpdateRequest + * @param options + */ + async signatureRequestUpdate(signatureRequestId, signatureRequestUpdateRequest, options = { headers: {} }) { + signatureRequestUpdateRequest = deserializeIfNeeded8( + signatureRequestUpdateRequest, + "SignatureRequestUpdateRequest" + ); + const localVarPath = this.basePath + "/signature_request/update/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestUpdate." ); - const localVarPath = this.basePath + "/template/update_files/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + } + if (signatureRequestUpdateRequest === null || signatureRequestUpdateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestUpdateRequest was null or undefined when calling signatureRequestUpdate." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateUpdateFiles." - ); - } - if (templateUpdateFilesRequest === null || templateUpdateFilesRequest === void 0) { - throw new Error( - "Required parameter templateUpdateFilesRequest was null or undefined when calling templateUpdateFiles." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateUpdateFilesRequest, - TemplateUpdateFilesRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateUpdateFilesRequest, - "TemplateUpdateFilesRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestUpdateRequest, + SignatureRequestUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestUpdateRequest, + "SignatureRequestUpdateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateUpdateFilesResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateUpdateFilesResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; -function deserializeIfNeeded10(obj, classname) { +function deserializeIfNeeded8(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { return ObjectSerializer.deserialize(obj, classname); } return obj; } -function handleSuccessfulResponse11(resolve, reject, response, returnType) { +function handleSuccessfulResponse9(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -32634,7 +33098,7 @@ function handleSuccessfulResponse11(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse11(reject, response, code, returnType) { +function handleErrorCodeResponse9(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -32642,7 +33106,7 @@ function handleErrorCodeResponse11(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse11(reject, response, code, returnType) { +function handleErrorRangeResponse9(reject, response, code, returnType) { let rangeCodeLeft = Number(code[0] + "00"); let rangeCodeRight = Number(code[0] + "99"); if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { @@ -32653,11 +33117,11 @@ function handleErrorRangeResponse11(reject, response, code, returnType) { return false; } -// api/unclaimedDraftApi.ts -var defaultBasePath12 = "https://api.hellosign.com/v3"; -var UnclaimedDraftApi = class { +// api/teamApi.ts +var defaultBasePath10 = "https://api.hellosign.com/v3"; +var TeamApi = class { constructor(basePath) { - this._basePath = defaultBasePath12; + this._basePath = defaultBasePath10; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -32677,7 +33141,7 @@ var UnclaimedDraftApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -32703,474 +33167,3010 @@ var UnclaimedDraftApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - unclaimedDraftCreate(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateRequest, options = { headers: {} }) { - unclaimedDraftCreateRequest = deserializeIfNeeded11( - unclaimedDraftCreateRequest, - "UnclaimedDraftCreateRequest" + /** + * Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. + * @summary Add User to Team + * @param teamAddMemberRequest + * @param teamId The id of the team. + * @param options + */ + async teamAddMember(teamAddMemberRequest, teamId, options = { headers: {} }) { + teamAddMemberRequest = deserializeIfNeeded9( + teamAddMemberRequest, + "TeamAddMemberRequest" + ); + const localVarPath = this.basePath + "/team/add_member"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamAddMemberRequest === null || teamAddMemberRequest === void 0) { + throw new Error( + "Required parameter teamAddMemberRequest was null or undefined when calling teamAddMember." ); - const localVarPath = this.basePath + "/unclaimed_draft/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (teamId !== void 0) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateRequest === null || unclaimedDraftCreateRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateRequest was null or undefined when calling unclaimedDraftCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateRequest, - UnclaimedDraftCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateRequest, - "UnclaimedDraftCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamAddMemberRequest, + TeamAddMemberRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + teamAddMemberRequest, + "TeamAddMemberRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - unclaimedDraftCreateEmbedded(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateEmbeddedRequest, options = { headers: {} }) { - unclaimedDraftCreateEmbeddedRequest = deserializeIfNeeded11( - unclaimedDraftCreateEmbeddedRequest, - "UnclaimedDraftCreateEmbeddedRequest" - ); - const localVarPath = this.basePath + "/unclaimed_draft/create_embedded"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. + * @summary Create Team + * @param teamCreateRequest + * @param options + */ + async teamCreate(teamCreateRequest, options = { headers: {} }) { + teamCreateRequest = deserializeIfNeeded9( + teamCreateRequest, + "TeamCreateRequest" + ); + const localVarPath = this.basePath + "/team/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamCreateRequest === null || teamCreateRequest === void 0) { + throw new Error( + "Required parameter teamCreateRequest was null or undefined when calling teamCreate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateEmbeddedRequest === null || unclaimedDraftCreateEmbeddedRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateEmbeddedRequest was null or undefined when calling unclaimedDraftCreateEmbedded." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateEmbeddedRequest, - UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateEmbeddedRequest, - "UnclaimedDraftCreateEmbeddedRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamCreateRequest, + TeamCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize(teamCreateRequest, "TeamCreateRequest"); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - unclaimedDraftCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - unclaimedDraftCreateEmbeddedWithTemplateRequest = deserializeIfNeeded11( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + /** + * Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). + * @summary Delete Team + * @param options + */ + async teamDelete(options = { headers: {} }) { + const localVarPath = this.basePath + "/team/destroy"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const localVarPath = this.basePath + "/unclaimed_draft/create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateEmbeddedWithTemplateRequest === null || unclaimedDraftCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateEmbeddedWithTemplateRequest was null or undefined when calling unclaimedDraftCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - "UnclaimedDraftCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } + }); + }); + } + /** + * Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. + * @summary Get Team + * @param options + */ + async teamGet(options = { headers: {} }) { + const localVarPath = this.basePath + "/team"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - unclaimedDraftEditAndResend(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, unclaimedDraftEditAndResendRequest, options = { headers: {} }) { - unclaimedDraftEditAndResendRequest = deserializeIfNeeded11( - unclaimedDraftEditAndResendRequest, - "UnclaimedDraftEditAndResendRequest" + /** + * Provides information about a team. + * @summary Get Team Info + * @param teamId The id of the team. + * @param options + */ + async teamInfo(teamId, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/info"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId !== void 0) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" ); - const localVarPath = this.basePath + "/unclaimed_draft/edit_and_resend/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling unclaimedDraftEditAndResend." - ); - } - if (unclaimedDraftEditAndResendRequest === null || unclaimedDraftEditAndResendRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftEditAndResendRequest was null or undefined when calling unclaimedDraftEditAndResend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftEditAndResendRequest, - UnclaimedDraftEditAndResendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftEditAndResendRequest, - "UnclaimedDraftEditAndResendRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetInfoResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetInfoResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Provides a list of team invites (and their roles). + * @summary List Team Invites + * @param emailAddress The email address for which to display the team invites. + * @param options + */ + async teamInvites(emailAddress, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/invites"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (emailAddress !== void 0) { + localVarQueryParameters["email_address"] = ObjectSerializer.serialize( + emailAddress, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamInvitesResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamInvitesResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Provides a paginated list of members (and their roles) that belong to a given team. + * @summary List Team Members + * @param teamId The id of the team that a member list is being requested from. + * @param page Which page number of the team member list to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async teamMembers(teamId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/members/{team_id}".replace( + "{team_id}", + encodeURIComponent(String(teamId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId === null || teamId === void 0) { + throw new Error( + "Required parameter teamId was null or undefined when calling teamMembers." + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamMembersResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamMembersResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; } + reject(error); + } + ); + } + ); + }); + } + /** + * Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. + * @summary Remove User from Team + * @param teamRemoveMemberRequest + * @param options + */ + async teamRemoveMember(teamRemoveMemberRequest, options = { headers: {} }) { + teamRemoveMemberRequest = deserializeIfNeeded9( + teamRemoveMemberRequest, + "TeamRemoveMemberRequest" + ); + const localVarPath = this.basePath + "/team/remove_member"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamRemoveMemberRequest === null || teamRemoveMemberRequest === void 0) { + throw new Error( + "Required parameter teamRemoveMemberRequest was null or undefined when calling teamRemoveMember." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamRemoveMemberRequest, + TeamRemoveMemberRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + teamRemoveMemberRequest, + "TeamRemoveMemberRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 201, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } + /** + * Provides a paginated list of sub teams that belong to a given team. + * @summary List Sub Teams + * @param teamId The id of the parent Team. + * @param page Which page number of the SubTeam List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async teamSubTeams(teamId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/sub_teams/{team_id}".replace( + "{team_id}", + encodeURIComponent(String(teamId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId === null || teamId === void 0) { + throw new Error( + "Required parameter teamId was null or undefined when calling teamSubTeams." + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamSubTeamsResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamSubTeamsResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Updates the name of your Team. + * @summary Update Team + * @param teamUpdateRequest + * @param options + */ + async teamUpdate(teamUpdateRequest, options = { headers: {} }) { + teamUpdateRequest = deserializeIfNeeded9( + teamUpdateRequest, + "TeamUpdateRequest" + ); + const localVarPath = this.basePath + "/team"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamUpdateRequest === null || teamUpdateRequest === void 0) { + throw new Error( + "Required parameter teamUpdateRequest was null or undefined when calling teamUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamUpdateRequest, + TeamUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize(teamUpdateRequest, "TeamUpdateRequest"); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } +}; +function deserializeIfNeeded9(obj, classname) { + if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { + return ObjectSerializer.deserialize(obj, classname); + } + return obj; +} +function handleSuccessfulResponse10(resolve, reject, response, returnType) { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + if (returnType) { + body = ObjectSerializer.deserialize(body, returnType); + } + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } +} +function handleErrorCodeResponse10(reject, response, code, returnType) { + if (response.status !== code) { + return false; + } + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; +} +function handleErrorRangeResponse10(reject, response, code, returnType) { + let rangeCodeLeft = Number(code[0] + "00"); + let rangeCodeRight = Number(code[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; + } + return false; +} + +// api/templateApi.ts +var defaultBasePath11 = "https://api.hellosign.com/v3"; +var TemplateApi = class { + constructor(basePath) { + this._basePath = defaultBasePath11; + this._defaultHeaders = { "User-Agent": USER_AGENT }; + this._useQuerystring = false; + this.authentications = { + default: new VoidAuth(), + api_key: new HttpBasicAuth(), + oauth2: new HttpBearerAuth() + }; + this.interceptors = []; + if (basePath) { + this.basePath = basePath; + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key) { + this.authentications.api_key.username = key; + } + set username(username) { + this.authentications.api_key.username = username; + } + set password(password) { + this.authentications.api_key.password = password; + } + set accessToken(accessToken) { + this.authentications.oauth2.accessToken = accessToken; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. + * @summary Add User to Template + * @param templateId The id of the Template to give the Account access to. + * @param templateAddUserRequest + * @param options + */ + async templateAddUser(templateId, templateAddUserRequest, options = { headers: {} }) { + templateAddUserRequest = deserializeIfNeeded10( + templateAddUserRequest, + "TemplateAddUserRequest" + ); + const localVarPath = this.basePath + "/template/add_user/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateAddUser." + ); + } + if (templateAddUserRequest === null || templateAddUserRequest === void 0) { + throw new Error( + "Required parameter templateAddUserRequest was null or undefined when calling templateAddUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateAddUserRequest, + TemplateAddUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateAddUserRequest, + "TemplateAddUserRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a template that can then be used. + * @summary Create Template + * @param templateCreateRequest + * @param options + */ + async templateCreate(templateCreateRequest, options = { headers: {} }) { + templateCreateRequest = deserializeIfNeeded10( + templateCreateRequest, + "TemplateCreateRequest" + ); + const localVarPath = this.basePath + "/template/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateCreateRequest === null || templateCreateRequest === void 0) { + throw new Error( + "Required parameter templateCreateRequest was null or undefined when calling templateCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateCreateRequest, + TemplateCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateCreateRequest, + "TemplateCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template \'edit\' stage. + * @summary Create Embedded Template Draft + * @param templateCreateEmbeddedDraftRequest + * @param options + */ + async templateCreateEmbeddedDraft(templateCreateEmbeddedDraftRequest, options = { headers: {} }) { + templateCreateEmbeddedDraftRequest = deserializeIfNeeded10( + templateCreateEmbeddedDraftRequest, + "TemplateCreateEmbeddedDraftRequest" + ); + const localVarPath = this.basePath + "/template/create_embedded_draft"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateCreateEmbeddedDraftRequest === null || templateCreateEmbeddedDraftRequest === void 0) { + throw new Error( + "Required parameter templateCreateEmbeddedDraftRequest was null or undefined when calling templateCreateEmbeddedDraft." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateCreateEmbeddedDraftRequest, + TemplateCreateEmbeddedDraftRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateCreateEmbeddedDraftRequest, + "TemplateCreateEmbeddedDraftRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateCreateEmbeddedDraftResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateCreateEmbeddedDraftResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Completely deletes the template specified from the account. + * @summary Delete Template + * @param templateId The id of the Template to delete. + * @param options + */ + async templateDelete(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/delete/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateDelete." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files + * @param templateId The id of the template files to retrieve. + * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + * @param options + */ + async templateFiles(templateId, fileType, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/zip", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFiles." + ); + } + if (fileType !== void 0) { + localVarQueryParameters["file_type"] = ObjectSerializer.serialize( + fileType, + "'pdf' | 'zip'" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "Buffer" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files as Data Uri + * @param templateId The id of the template files to retrieve. + * @param options + */ + async templateFilesAsDataUri(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files_as_data_uri/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFilesAsDataUri." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "FileResponseDataUri" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "FileResponseDataUri" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files as File Url + * @param templateId The id of the template files to retrieve. + * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. + * @param options + */ + async templateFilesAsFileUrl(templateId, forceDownload, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files_as_file_url/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFilesAsFileUrl." + ); + } + if (forceDownload !== void 0) { + localVarQueryParameters["force_download"] = ObjectSerializer.serialize( + forceDownload, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "FileResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "FileResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } + /** + * Returns the Template specified by the `template_id` parameter. + * @summary Get Template + * @param templateId The id of the Template to retrieve. + * @param options + */ + async templateGet(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateGet." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + * @summary List Templates + * @param accountId Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + * @param page Which page number of the Template List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param query String that includes search terms and/or fields to be used to filter the Template objects. + * @param options + */ + async templateList(accountId, page, pageSize, query, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + if (query !== void 0) { + localVarQueryParameters["query"] = ObjectSerializer.serialize( + query, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateListResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateListResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Removes the specified Account\'s access to the specified Template. + * @summary Remove User from Template + * @param templateId The id of the Template to remove the Account\'s access to. + * @param templateRemoveUserRequest + * @param options + */ + async templateRemoveUser(templateId, templateRemoveUserRequest, options = { headers: {} }) { + templateRemoveUserRequest = deserializeIfNeeded10( + templateRemoveUserRequest, + "TemplateRemoveUserRequest" + ); + const localVarPath = this.basePath + "/template/remove_user/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateRemoveUser." + ); + } + if (templateRemoveUserRequest === null || templateRemoveUserRequest === void 0) { + throw new Error( + "Required parameter templateRemoveUserRequest was null or undefined when calling templateRemoveUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateRemoveUserRequest, + TemplateRemoveUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateRemoveUserRequest, + "TemplateRemoveUserRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + * @summary Update Template Files + * @param templateId The ID of the template whose files to update. + * @param templateUpdateFilesRequest + * @param options + */ + async templateUpdateFiles(templateId, templateUpdateFilesRequest, options = { headers: {} }) { + templateUpdateFilesRequest = deserializeIfNeeded10( + templateUpdateFilesRequest, + "TemplateUpdateFilesRequest" + ); + const localVarPath = this.basePath + "/template/update_files/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateUpdateFiles." + ); + } + if (templateUpdateFilesRequest === null || templateUpdateFilesRequest === void 0) { + throw new Error( + "Required parameter templateUpdateFilesRequest was null or undefined when calling templateUpdateFiles." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateUpdateFilesRequest, + TemplateUpdateFilesRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateUpdateFilesRequest, + "TemplateUpdateFilesRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateUpdateFilesResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateUpdateFilesResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } +}; +function deserializeIfNeeded10(obj, classname) { + if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { + return ObjectSerializer.deserialize(obj, classname); + } + return obj; +} +function handleSuccessfulResponse11(resolve, reject, response, returnType) { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + if (returnType) { + body = ObjectSerializer.deserialize(body, returnType); + } + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } +} +function handleErrorCodeResponse11(reject, response, code, returnType) { + if (response.status !== code) { + return false; + } + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; +} +function handleErrorRangeResponse11(reject, response, code, returnType) { + let rangeCodeLeft = Number(code[0] + "00"); + let rangeCodeRight = Number(code[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; + } + return false; +} + +// api/unclaimedDraftApi.ts +var defaultBasePath12 = "https://api.hellosign.com/v3"; +var UnclaimedDraftApi = class { + constructor(basePath) { + this._basePath = defaultBasePath12; + this._defaultHeaders = { "User-Agent": USER_AGENT }; + this._useQuerystring = false; + this.authentications = { + default: new VoidAuth(), + api_key: new HttpBasicAuth(), + oauth2: new HttpBearerAuth() + }; + this.interceptors = []; + if (basePath) { + this.basePath = basePath; + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key) { + this.authentications.api_key.username = key; + } + set username(username) { + this.authentications.api_key.username = username; + } + set password(password) { + this.authentications.api_key.password = password; + } + set accessToken(accessToken) { + this.authentications.oauth2.accessToken = accessToken; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. + * @summary Create Unclaimed Draft + * @param unclaimedDraftCreateRequest + * @param options + */ + async unclaimedDraftCreate(unclaimedDraftCreateRequest, options = { headers: {} }) { + unclaimedDraftCreateRequest = deserializeIfNeeded11( + unclaimedDraftCreateRequest, + "UnclaimedDraftCreateRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateRequest === null || unclaimedDraftCreateRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateRequest was null or undefined when calling unclaimedDraftCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateRequest, + UnclaimedDraftCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateRequest, + "UnclaimedDraftCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Create Embedded Unclaimed Draft + * @param unclaimedDraftCreateEmbeddedRequest + * @param options + */ + async unclaimedDraftCreateEmbedded(unclaimedDraftCreateEmbeddedRequest, options = { headers: {} }) { + unclaimedDraftCreateEmbeddedRequest = deserializeIfNeeded11( + unclaimedDraftCreateEmbeddedRequest, + "UnclaimedDraftCreateEmbeddedRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create_embedded"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateEmbeddedRequest === null || unclaimedDraftCreateEmbeddedRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateEmbeddedRequest was null or undefined when calling unclaimedDraftCreateEmbedded." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateEmbeddedRequest, + UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateEmbeddedRequest, + "UnclaimedDraftCreateEmbeddedRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Create Embedded Unclaimed Draft with Template + * @param unclaimedDraftCreateEmbeddedWithTemplateRequest + * @param options + */ + async unclaimedDraftCreateEmbeddedWithTemplate(unclaimedDraftCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + unclaimedDraftCreateEmbeddedWithTemplateRequest = deserializeIfNeeded11( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateEmbeddedWithTemplateRequest === null || unclaimedDraftCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateEmbeddedWithTemplateRequest was null or undefined when calling unclaimedDraftCreateEmbeddedWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester\'s email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Edit and Resend Unclaimed Draft + * @param signatureRequestId The ID of the signature request to edit and resend. + * @param unclaimedDraftEditAndResendRequest + * @param options + */ + async unclaimedDraftEditAndResend(signatureRequestId, unclaimedDraftEditAndResendRequest, options = { headers: {} }) { + unclaimedDraftEditAndResendRequest = deserializeIfNeeded11( + unclaimedDraftEditAndResendRequest, + "UnclaimedDraftEditAndResendRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/edit_and_resend/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling unclaimedDraftEditAndResend." + ); + } + if (unclaimedDraftEditAndResendRequest === null || unclaimedDraftEditAndResendRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftEditAndResendRequest was null or undefined when calling unclaimedDraftEditAndResend." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftEditAndResendRequest, + UnclaimedDraftEditAndResendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftEditAndResendRequest, + "UnclaimedDraftEditAndResendRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } }; function deserializeIfNeeded11(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { @@ -33223,7 +36223,7 @@ var HttpError = class extends Error { var queryParamsSerializer = (params) => { return import_qs.default.stringify(params, { arrayFormat: "brackets" }); }; -var USER_AGENT = "OpenAPI-Generator/1.8.0/node"; +var USER_AGENT = "OpenAPI-Generator/1.9.0/node"; var generateFormData = (obj, typemap) => { const data = {}; let localVarUseFormData = false; @@ -33276,8 +36276,7 @@ var toFormData3 = (obj) => { return form; }; function isBufferDetailedFile(obj) { - var _a, _b; - return obj.value !== void 0 && Buffer.isBuffer(obj.value) && obj.options !== void 0 && ((_a = obj.options) == null ? void 0 : _a.filename) !== void 0 && ((_b = obj.options) == null ? void 0 : _b.contentType) !== void 0; + return obj.value !== void 0 && Buffer.isBuffer(obj.value) && obj.options !== void 0 && obj.options?.filename !== void 0 && obj.options?.contentType !== void 0; } var shouldJsonify = (val) => val === Object(val); @@ -33378,6 +36377,10 @@ var APIS = [ SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, @@ -33514,15 +36517,21 @@ var APIS = [ toFormData, typeMap }); -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ +/*! Bundled license information: + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) +*/ diff --git a/docs/api/AccountApi.md b/docs/api/AccountApi.md index fba97d1..cb57cf6 100644 --- a/docs/api/AccountApi.md +++ b/docs/api/AccountApi.md @@ -23,52 +23,24 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const accountApi = new DropboxSign.AccountApi(); +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountCreateRequest = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = accountApi.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { +const accountCreateRequest: models.AccountCreateRequest = { emailAddress: "newuser@dropboxsign.com", }; -const result = accountApi.accountCreate(data); -result.then(response => { +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountCreate:"); console.log(error.body); }); @@ -110,44 +82,18 @@ Returns the properties and settings of your Account. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const accountApi = new DropboxSign.AccountApi(); +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = accountApi.accountGet(undefined, "jack@example.com"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = accountApi.accountGet(undefined, "jack@example.com"); -result.then(response => { +apiCaller.accountGet().then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountGet:"); console.log(error.body); }); @@ -190,52 +136,25 @@ Updates the properties and settings of your Account. Currently only allows for u ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data: DropboxSign.AccountUpdateRequest = { +const accountUpdateRequest: models.AccountUpdateRequest = { callbackUrl: "https://www.example.com/callback", + locale: "en-US", }; -const result = accountApi.accountUpdate(data); -result.then(response => { +apiCaller.accountUpdate( + accountUpdateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - callbackUrl: "https://www.example.com/callback", -}; - -const result = accountApi.accountUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountUpdate:"); console.log(error.body); }); @@ -277,52 +196,24 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountVerifyRequest = { - emailAddress: "some_user@dropboxsign.com", -}; - -const result = accountApi.accountVerify(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const accountVerifyRequest: models.AccountVerifyRequest = { emailAddress: "some_user@dropboxsign.com", }; -const result = accountApi.accountVerify(data); -result.then(response => { +apiCaller.accountVerify( + accountVerifyRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountVerify:"); console.log(error.body); }); diff --git a/docs/api/ApiAppApi.md b/docs/api/ApiAppApi.md index 69d312b..8494eda 100644 --- a/docs/api/ApiAppApi.md +++ b/docs/api/ApiAppApi.md @@ -24,88 +24,43 @@ Creates a new API App. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const apiAppApi = new DropboxSign.ApiAppApi(); +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const oauth: DropboxSign.SubOAuth = { +const oauth: models.SubOAuth = { callbackUrl: "https://example.com/oauth", scopes: [ - DropboxSign.SubOAuth.ScopesEnum.BasicAccountInfo, - DropboxSign.SubOAuth.ScopesEnum.RequestSignature, + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, ], }; -const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = { +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { primaryButtonColor: "#00b3e6", primaryButtonTextColor: "#ffffff", }; -const data: DropboxSign.ApiAppCreateRequest = { +const apiAppCreateRequest: models.ApiAppCreateRequest = { name: "My Production App", - domains: ["example.com"], - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - oauth, - whiteLabelingOptions, -}; - -const result = apiAppApi.apiAppCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const oauth = { - callbackUrl: "https://example.com/oauth", - scopes: [ - "basic_account_info", - "request_signature", + domains: [ + "example.com", ], -}; - -const whiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data = { - name: "My Production App", - domains: ["example.com"], customLogoFile: fs.createReadStream("CustomLogoFile.png"), - oauth, - whiteLabelingOptions, + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, }; -const result = apiAppApi.apiAppCreate(data); -result.then(response => { +apiCaller.apiAppCreate( + apiAppCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ApiAppApi#apiAppCreate:"); console.log(error.body); }); @@ -147,48 +102,18 @@ Deletes an API App. Can only be invoked for apps you own. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppDelete(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = apiAppApi.apiAppDelete(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppDelete:"); console.log(error.body); }); @@ -230,48 +155,20 @@ Returns an object with information about an API App. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppGet(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = apiAppApi.apiAppGet(clientId); -result.then(response => { +apiCaller.apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ApiAppApi#apiAppGet:"); console.log(error.body); }); @@ -313,50 +210,21 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 2; - -const result = apiAppApi.apiAppList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const page = 1; -const pageSize = 2; +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = apiAppApi.apiAppList(page, pageSize); -result.then(response => { +apiCaller.apiAppList( + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ApiAppApi#apiAppList:"); console.log(error.body); }); @@ -399,74 +267,45 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data: DropboxSign.ApiAppUpdateRequest = { - name: "New Name", - callbackUrl: "http://example.com/dropboxsign", - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - whiteLabelingOptions, +const oauth: models.SubOAuth = { + callbackUrl: "https://example.com/oauth", + scopes: [ + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, + ], }; -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppUpdate(clientId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const whiteLabelingOptions = { +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { primaryButtonColor: "#00b3e6", primaryButtonTextColor: "#ffffff", }; -const data = { +const apiAppUpdateRequest: models.ApiAppUpdateRequest = { + callbackUrl: "https://example.com/dropboxsign", name: "New Name", - callbackUrl: "http://example.com/dropboxsign", + domains: [ + "example.com", + ], customLogoFile: fs.createReadStream("CustomLogoFile.png"), - whiteLabelingOptions, + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, }; -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppUpdate(clientId, data); -result.then(response => { +apiCaller.apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ApiAppApi#apiAppUpdate:"); console.log(error.body); }); diff --git a/docs/api/BulkSendJobApi.md b/docs/api/BulkSendJobApi.md index bbd50c8..95a7a6b 100644 --- a/docs/api/BulkSendJobApi.md +++ b/docs/api/BulkSendJobApi.md @@ -21,48 +21,22 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -const result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -const result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling BulkSendJobApi#bulkSendJobGet:"); console.log(error.body); }); @@ -106,50 +80,21 @@ Returns a list of BulkSendJob that you can access. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 20; - -const result = bulkSendJobApi.bulkSendJobList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 20; - -const result = bulkSendJobApi.bulkSendJobList(page, pageSize); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobList( + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling BulkSendJobApi#bulkSendJobList:"); console.log(error.body); }); diff --git a/docs/api/EmbeddedApi.md b/docs/api/EmbeddedApi.md index 3fc622f..2937ac3 100644 --- a/docs/api/EmbeddedApi.md +++ b/docs/api/EmbeddedApi.md @@ -21,58 +21,31 @@ Retrieves an embedded object containing a template url that can be opened in an ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.EmbeddedEditUrlRequest = { - ccRoles: [""], - mergeFields: [], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = embeddedApi.embeddedEditUrl(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - ccRoles: [""], - mergeFields: [], +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const mergeFields = [ +]; + +const embeddedEditUrlRequest: models.EmbeddedEditUrlRequest = { + ccRoles: [ + "", + ], + mergeFields: mergeFields, }; -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = embeddedApi.embeddedEditUrl(templateId, data); -result.then(response => { +apiCaller.embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling EmbeddedApi#embeddedEditUrl:"); console.log(error.body); }); @@ -115,48 +88,20 @@ Retrieves an embedded object containing a signature url that can be opened in an ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - -const result = embeddedApi.embeddedSignUrl(signatureId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = embeddedApi.embeddedSignUrl(signatureId); -result.then(response => { +apiCaller.embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", // signatureId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling EmbeddedApi#embeddedSignUrl:"); console.log(error.body); }); diff --git a/docs/api/FaxApi.md b/docs/api/FaxApi.md index 84ccc7b..efc84ee 100644 --- a/docs/api/FaxApi.md +++ b/docs/api/FaxApi.md @@ -5,7 +5,7 @@ All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**faxDelete()**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax | -| [**faxFiles()**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| [**faxFiles()**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download Fax Files | | [**faxGet()**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax | | [**faxList()**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes | | [**faxSend()**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax | @@ -19,41 +19,22 @@ faxDelete(faxId: string) Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).catch(error => { + console.log("Exception when calling FaxApi#faxDelete:"); console.log(error.body); }); @@ -88,51 +69,26 @@ void (empty response body) faxFiles(faxId: string): Buffer ``` -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = faxApi.faxFiles(faxId); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = faxApi.faxFiles(faxId); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); +apiCaller.faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { + fs.createWriteStream('./file_response').write(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxApi#faxFiles:"); console.log(error.body); }); @@ -169,47 +125,24 @@ faxGet(faxId: string): FaxGetResponse Get Fax -Returns information about fax +Returns information about a Fax ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -const result = faxApi.faxGet(faxId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -const result = faxApi.faxGet(faxId); -result.then(response => { +apiCaller.faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxApi#faxGet:"); console.log(error.body); }); @@ -246,49 +179,25 @@ faxList(page: number, pageSize: number): FaxListResponse Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const page = 1; -const pageSize = 2; - -const result = faxApi.faxList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const page = 1; -const pageSize = 2; +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -const result = faxApi.faxList(page, pageSize); -result.then(response => { +apiCaller.faxList( + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxApi#faxList:"); console.log(error.body); }); @@ -298,8 +207,8 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **page** | **number**| Page | [optional] [default to 1] | -| **pageSize** | **number**| Page size | [optional] [default to 20] | +| **page** | **number**| Which page number of the Fax List to return. Defaults to `1`. | [optional] [default to 1] | +| **pageSize** | **number**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] | ### Return type @@ -326,109 +235,37 @@ faxSend(faxSendRequest: FaxSendRequest): FaxGetResponse Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.FaxSendRequest = { - files: [ file, fileBuffer, fileBufferAlt ], - testMode: true, +const faxSendRequest: models.FaxSendRequest = { recipient: "16690000001", sender: "16690000000", - coverPageTo: "Jill Fax", - coverPageMessage: "I'm sending you a fax!", - coverPageFrom: "Faxer Faxerson", - title: "This is what the fax is about!", -}; - -const result = faxApi.faxSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data = { - files: [ file, fileBuffer, fileBufferAlt ], testMode: true, - recipient: "16690000001", - sender: "16690000000", coverPageTo: "Jill Fax", - coverPageMessage: "I'm sending you a fax!", coverPageFrom: "Faxer Faxerson", + coverPageMessage: "I'm sending you a fax!", title: "This is what the fax is about!", + files: [ + fs.createReadStream("./example_fax.pdf"), + ], }; -const result = faxApi.faxSend(data); -result.then(response => { +apiCaller.faxSend( + faxSendRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxApi#faxSend:"); console.log(error.body); }); diff --git a/docs/api/FaxLineApi.md b/docs/api/FaxLineApi.md index 4d9f620..5c00c74 100644 --- a/docs/api/FaxLineApi.md +++ b/docs/api/FaxLineApi.md @@ -26,48 +26,24 @@ Grants a user access to the specified Fax Line. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxLineApi = new DropboxSign.FaxLineApi(); +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineAddUserRequest = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineAddUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { +const faxLineAddUserRequest: models.FaxLineAddUserRequest = { number: "[FAX_NUMBER]", emailAddress: "member@dropboxsign.com", }; -const result = faxLineApi.faxLineAddUser(data); -result.then(response => { +apiCaller.faxLineAddUser( + faxLineAddUserRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineAddUser:"); console.log(error.body); }); @@ -104,43 +80,27 @@ faxLineAreaCodeGet(country: 'CA' | 'US' | 'UK', state: 'AK' | 'AL' | 'AR' | 'AZ' Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineAreaCodeGet( + "US", // country + undefined, // state + undefined, // province + undefined, // city +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineAreaCodeGet:"); console.log(error.body); }); @@ -150,10 +110,10 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **country** | **'CA' | 'US' | 'UK'**| Filter area codes by country. | | -| **state** | **'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'**| Filter area codes by state. | [optional] | -| **province** | **'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'**| Filter area codes by province. | [optional] | -| **city** | **string**| Filter area codes by city. | [optional] | +| **country** | **'CA' | 'US' | 'UK'**| Filter area codes by country | | +| **state** | **'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'**| Filter area codes by state | [optional] | +| **province** | **'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'**| Filter area codes by province | [optional] | +| **city** | **string**| Filter area codes by city | [optional] | ### Return type @@ -180,53 +140,29 @@ faxLineCreate(faxLineCreateRequest: FaxLineCreateRequest): FaxLineResponse Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxLineApi = new DropboxSign.FaxLineApi(); +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineCreateRequest = { +const faxLineCreateRequest: models.FaxLineCreateRequest = { areaCode: 209, - country: "US", + country: models.FaxLineCreateRequest.CountryEnum.Us, }; -const result = faxLineApi.faxLineCreate(data); -result.then(response => { +apiCaller.faxLineCreate( + faxLineCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - areaCode: 209, - country: "US", -}; - -const result = faxLineApi.faxLineCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineCreate:"); console.log(error.body); }); @@ -268,44 +204,21 @@ Deletes the specified Fax Line from the subscription. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineDeleteRequest = { - number: "[FAX_NUMBER]", -}; - -const result = faxLineApi.faxLineDelete(data); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { +const faxLineDeleteRequest: models.FaxLineDeleteRequest = { number: "[FAX_NUMBER]", }; -const result = faxLineApi.faxLineDelete(data); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.faxLineDelete( + faxLineDeleteRequest, +).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineDelete:"); console.log(error.body); }); @@ -347,38 +260,19 @@ Returns the properties and settings of a Fax Line. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxLineApi = new DropboxSign.FaxLineApi(); +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); -result.then(response => { +apiCaller.faxLineGet( + "123-123-1234", // number +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineGet:"); console.log(error.body); }); @@ -388,7 +282,7 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **number** | **string**| The Fax Line number. | | +| **number** | **string**| The Fax Line number | | ### Return type @@ -420,38 +314,22 @@ Returns the properties and settings of multiple Fax Lines. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineList(); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + undefined, // showTeamLines +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineList(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineList:"); console.log(error.body); }); @@ -462,9 +340,9 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **accountId** | **string**| Account ID | [optional] | -| **page** | **number**| Page | [optional] [default to 1] | -| **pageSize** | **number**| Page size | [optional] [default to 20] | -| **showTeamLines** | **boolean**| Show team lines | [optional] | +| **page** | **number**| Which page number of the Fax Line List to return. Defaults to `1`. | [optional] [default to 1] | +| **pageSize** | **number**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] | +| **showTeamLines** | **boolean**| Include Fax Lines belonging to team members in the list | [optional] | ### Return type @@ -491,53 +369,29 @@ faxLineRemoveUser(faxLineRemoveUserRequest: FaxLineRemoveUserRequest): FaxLineRe Remove Fax Line Access -Removes a user\'s access to the specified Fax Line. +Removes a user\'s access to the specified Fax Line ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineRemoveUserRequest = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineRemoveUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -const data = { +const faxLineRemoveUserRequest: models.FaxLineRemoveUserRequest = { number: "[FAX_NUMBER]", emailAddress: "member@dropboxsign.com", }; -const result = faxLineApi.faxLineRemoveUser(data); -result.then(response => { +apiCaller.faxLineRemoveUser( + faxLineRemoveUserRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineRemoveUser:"); console.log(error.body); }); diff --git a/docs/api/OAuthApi.md b/docs/api/OAuthApi.md index 81ae5b1..6746ebc 100644 --- a/docs/api/OAuthApi.md +++ b/docs/api/OAuthApi.md @@ -21,44 +21,26 @@ Once you have retrieved the code from the user callback, you will need to exchan ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenGenerateRequest(); -data.state = "900e06e2"; -data.code = "1b0d28d90c86c141"; -data.clientId = "cc91c61d00f8bb2ece1428035716b"; -data.clientSecret = "1d14434088507ffa390e6f5528465"; - -const result = oAuthApi.oauthTokenGenerate(data); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.OAuthApi(); + +const oAuthTokenGenerateRequest: models.OAuthTokenGenerateRequest = { + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", + code: "1b0d28d90c86c141", + state: "900e06e2", + grantType: "authorization_code", +}; + +apiCaller.oauthTokenGenerate( + oAuthTokenGenerateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenGenerateRequest(); -data.state = "900e06e2"; -data.code = "1b0d28d90c86c141"; -data.clientId = "cc91c61d00f8bb2ece1428035716b"; -data.clientSecret = "1d14434088507ffa390e6f5528465"; - -const result = oAuthApi.oauthTokenGenerate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling OAuthApi#oauthTokenGenerate:"); console.log(error.body); }); @@ -100,38 +82,23 @@ Access tokens are only valid for a given period of time (typically one hour) for ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenRefreshRequest(); -data.refreshToken = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"; - -const result = oAuthApi.oauthTokenRefresh(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const oAuthApi = new DropboxSign.OAuthApi(); +const apiCaller = new api.OAuthApi(); -const data = new DropboxSign.OAuthTokenRefreshRequest(); -data.refreshToken = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"; +const oAuthTokenRefreshRequest: models.OAuthTokenRefreshRequest = { + grantType: "refresh_token", + refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", +}; -const result = oAuthApi.oauthTokenRefresh(data); -result.then(response => { +apiCaller.oauthTokenRefresh( + oAuthTokenRefreshRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling OAuthApi#oauthTokenRefresh:"); console.log(error.body); }); diff --git a/docs/api/ReportApi.md b/docs/api/ReportApi.md index 61c772f..005e83c 100644 --- a/docs/api/ReportApi.md +++ b/docs/api/ReportApi.md @@ -20,56 +20,28 @@ Request the creation of one or more report(s). When the report(s) have been gen ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const reportApi = new DropboxSign.ReportApi(); +const apiCaller = new api.ReportApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -reportApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.ReportCreateRequest = { - startDate: "09/01/2020", - endDate: "09/01/2020", - reportType: [ - DropboxSign.ReportCreateRequest.ReportTypeEnum.UserActivity, - DropboxSign.ReportCreateRequest.ReportTypeEnum.DocumentStatus, - ] -}; - -const result = reportApi.reportCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const reportApi = new DropboxSign.ReportApi(); - -// Configure HTTP basic authorization: api_key -reportApi.username = "YOUR_API_KEY"; - -const data = { +const reportCreateRequest: models.ReportCreateRequest = { startDate: "09/01/2020", endDate: "09/01/2020", reportType: [ - "user_activity", - "document_status", - ] + models.ReportCreateRequest.ReportTypeEnum.UserActivity, + models.ReportCreateRequest.ReportTypeEnum.DocumentStatus, + ], }; -const result = reportApi.reportCreate(data); -result.then(response => { +apiCaller.reportCreate( + reportCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ReportApi#reportCreate:"); console.log(error.body); }); diff --git a/docs/api/SignatureRequestApi.md b/docs/api/SignatureRequestApi.md index 459c8c1..2590d0d 100644 --- a/docs/api/SignatureRequestApi.md +++ b/docs/api/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to https://api.hellosign.com/v3. | [**signatureRequestCancel()**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | [**signatureRequestCreateEmbedded()**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | [**signatureRequestCreateEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| [**signatureRequestEdit()**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| [**signatureRequestEditEmbedded()**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| [**signatureRequestEditEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| [**signatureRequestEditWithTemplate()**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | [**signatureRequestFiles()**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | [**signatureRequestFilesAsDataUri()**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | [**signatureRequestFilesAsFileUrl()**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -35,139 +39,95 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; -const signerList1Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields: DropboxSign.SubBulkSignerListCustomField = { +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { name: "company", - value: "ABC Corp", + value: "123 LLC", }; -const signerList1: DropboxSign.SubBulkSignerList = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; +const signerList2CustomFields = [ + signerList2CustomFields1, +]; -const signerList2Signer: DropboxSign.SubSignatureRequestTemplateSigner = { +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "Mary", emailAddress: "mary@example.com", pin: "gd9as5b", }; -const signerList2CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "123 LLC", -}; - -const signerList2: DropboxSign.SubBulkSignerList = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; +const signerList2Signers = [ + signerList2Signers1, +]; -const data: DropboxSign.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", }; -const result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example +const signerList1CustomFields = [ + signerList1CustomFields1, +]; -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer = { +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", pin: "d79a3td", }; -const signerList1CustomFields = { - name: "company", - value: "ABC Corp", -}; - -const signerList1 = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; +const signerList1Signers = [ + signerList1Signers1, +]; -const signerList2Signer = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, }; -const signerList2CustomFields = { - name: "company", - value: "123 LLC", +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, }; -const signerList2 = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; +const signerList = [ + signerList1, + signerList2, +]; -const cc1 = { +const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@example.com", }; -const data = { +const ccs = [ + ccs1, +]; + +const signatureRequestBulkCreateEmbeddedWithTemplateRequest: models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], + subject: "Purchase Order", testMode: true, + signerList: signerList, + ccs: ccs, }; -const result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate:"); console.log(error.body); }); @@ -209,140 +169,95 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signerList1Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields: DropboxSign.SubBulkSignerListCustomField = { +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { name: "company", - value: "ABC Corp", + value: "123 LLC", }; -const signerList1: DropboxSign.SubBulkSignerList = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; +const signerList2CustomFields = [ + signerList2CustomFields1, +]; -const signerList2Signer: DropboxSign.SubSignatureRequestTemplateSigner = { +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "Mary", emailAddress: "mary@example.com", pin: "gd9as5b", }; -const signerList2CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "123 LLC", -}; +const signerList2Signers = [ + signerList2Signers1, +]; -const signerList2: DropboxSign.SubBulkSignerList = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data: DropboxSign.SignatureRequestBulkSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", }; -const result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` +const signerList1CustomFields = [ + signerList1CustomFields1, +]; -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer = { +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", pin: "d79a3td", }; -const signerList1CustomFields = { - name: "company", - value: "ABC Corp", -}; - -const signerList1 = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; +const signerList1Signers = [ + signerList1Signers1, +]; -const signerList2Signer = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, }; -const signerList2CustomFields = { - name: "company", - value: "123 LLC", +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, }; -const signerList2 = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; +const signerList = [ + signerList1, + signerList2, +]; -const cc1 = { +const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@example.com", }; -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", +const ccs = [ + ccs1, +]; + +const signatureRequestBulkSendWithTemplateRequest: models.SignatureRequestBulkSendWithTemplateRequest = { + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], + subject: "Purchase Order", testMode: true, + signerList: signerList, + ccs: ccs, }; -const result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate:"); console.log(error.body); }); @@ -384,48 +299,18 @@ Cancels an incomplete signature request. This action is **not reversible**. The ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestCancel(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestCancel(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCancel:"); console.log(error.body); }); @@ -467,116 +352,147 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", +const signers1: models.SubSignatureRequestSigner = { name: "Jack", + emailAddress: "jack@example.com", order: 0, }; -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", +const signers2: models.SubSignatureRequestSigner = { name: "Jill", + emailAddress: "jill@example.com", order: 1, }; -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; +const signers = [ + signers1, + signers2, +]; -const data: DropboxSign.SignatureRequestCreateEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", +const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], + testMode: true, + title: "NDA with Acme Co.", ccEmailAddresses: [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestCreateEmbedded(data); -result.then(response => { +apiCaller.signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); console.log(error.body); }); ``` -### JavaScript Example +### Parameters -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signatureRequestCreateEmbeddedRequest** | [**SignatureRequestCreateEmbeddedRequest**](../model/SignatureRequestCreateEmbeddedRequest.md)| | | -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +### Return type -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +[**SignatureRequestGetResponse**](../model/SignatureRequestGetResponse.md) -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +### Authorization -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestCreateEmbeddedWithTemplate()` + +```typescript +signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest: SignatureRequestCreateEmbeddedWithTemplateRequest): SignatureRequestGetResponse +``` + +Create Embedded Signature Request with Template + +Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### TypeScript Example + +```typescript +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signingOptions = { +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: true, - defaultType: "draw", }; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const signatureRequestCreateEmbeddedWithTemplateRequest: models.SignatureRequestCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, + message: "Glad we could come to an agreement.", + subject: "Purchase Order", testMode: true, + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestCreateEmbedded(data); -result.then(response => { +apiCaller.signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate:"); console.log(error.body); }); @@ -586,7 +502,7 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **signatureRequestCreateEmbeddedRequest** | [**SignatureRequestCreateEmbeddedRequest**](../model/SignatureRequestCreateEmbeddedRequest.md)| | | +| **signatureRequestCreateEmbeddedWithTemplateRequest** | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](../model/SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | | ### Return type @@ -605,105 +521,183 @@ result.then(response => { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `signatureRequestCreateEmbeddedWithTemplate()` +## `signatureRequestEdit()` ```typescript -signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest: SignatureRequestCreateEmbeddedWithTemplateRequest): SignatureRequestGetResponse +signatureRequestEdit(signatureRequestId: string, signatureRequestEditRequest: SignatureRequestEditRequest): SignatureRequestGetResponse ``` -Create Embedded Signature Request with Template +Edit Signature Request -Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, }; -const signingOptions: DropboxSign.SubSigningOptions = { +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, }; -const data: DropboxSign.SignatureRequestCreateEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditRequest: models.SignatureRequestEditRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestEdit:"); console.log(error.body); }); ``` -### JavaScript Example +### Parameters -```javascript -import * as DropboxSign from "@dropbox/sign"; +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signatureRequestId** | **string**| The id of the SignatureRequest to edit. | | +| **signatureRequestEditRequest** | [**SignatureRequestEditRequest**](../model/SignatureRequestEditRequest.md)| | | -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +### Return type -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +[**SignatureRequestGetResponse**](../model/SignatureRequestGetResponse.md) -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +### Authorization -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditEmbedded()` + +```typescript +signatureRequestEditEmbedded(signatureRequestId: string, signatureRequestEditEmbeddedRequest: SignatureRequestEditEmbeddedRequest): SignatureRequestGetResponse +``` + +Edit Embedded Signature Request -const signingOptions = { +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### TypeScript Example + +```typescript +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: false, - defaultType: "draw", }; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditEmbeddedRequest: models.SignatureRequestEditEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded:"); console.log(error.body); }); @@ -713,7 +707,8 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **signatureRequestCreateEmbeddedWithTemplateRequest** | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](../model/SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | | +| **signatureRequestId** | **string**| The id of the SignatureRequest to edit. | | +| **signatureRequestEditEmbeddedRequest** | [**SignatureRequestEditEmbeddedRequest**](../model/SignatureRequestEditEmbeddedRequest.md)| | | ### Return type @@ -732,67 +727,172 @@ result.then(response => { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `signatureRequestFiles()` +## `signatureRequestEditEmbeddedWithTemplate()` ```typescript -signatureRequestFiles(signatureRequestId: string, fileType: 'pdf' | 'zip'): Buffer +signatureRequestEditEmbeddedWithTemplate(signatureRequestId: string, signatureRequestEditEmbeddedWithTemplateRequest: SignatureRequestEditEmbeddedWithTemplateRequest): SignatureRequestGetResponse ``` -Download Files +Edit Embedded Signature Request with Template -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -const fileType = "pdf"; +const signers = [ + signers1, +]; -const result = signatureRequestApi.signatureRequestFiles(signatureRequestId, fileType); +const signatureRequestEditEmbeddedWithTemplateRequest: models.SignatureRequestEditEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, +}; -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); +apiCaller.signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate:"); console.log(error.body); }); ``` -### JavaScript Example +### Parameters -```javascript -import * as DropboxSign from "@dropbox/sign"; +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signatureRequestId** | **string**| The id of the SignatureRequest to edit. | | +| **signatureRequestEditEmbeddedWithTemplateRequest** | [**SignatureRequestEditEmbeddedWithTemplateRequest**](../model/SignatureRequestEditEmbeddedWithTemplateRequest.md)| | | + +### Return type + +[**SignatureRequestGetResponse**](../model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditWithTemplate()` + +```typescript +signatureRequestEditWithTemplate(signatureRequestId: string, signatureRequestEditWithTemplateRequest: SignatureRequestEditWithTemplateRequest): SignatureRequestGetResponse +``` + +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + +### TypeScript Example + +```typescript import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +const signers = [ + signers1, +]; -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const ccs = [ + ccs1, +]; -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -const fileType = "pdf"; +const customFields1: models.SubCustomField = { + name: "Cost", + editor: "Client", + required: true, + value: "$20,000", +}; -const result = signatureRequestApi.signatureRequestFiles(signatureRequestId, fileType); +const customFields = [ + customFields1, +]; -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); +const signatureRequestEditWithTemplateRequest: models.SignatureRequestEditWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, +}; + +apiCaller.signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest, +).then(response => { + console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate:"); console.log(error.body); }); @@ -802,12 +902,12 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **signatureRequestId** | **string**| The id of the SignatureRequest to retrieve. | | -| **fileType** | **'pdf' | 'zip'**| Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] [default to 'pdf'] | +| **signatureRequestId** | **string**| The id of the SignatureRequest to edit. | | +| **signatureRequestEditWithTemplateRequest** | [**SignatureRequestEditWithTemplateRequest**](../model/SignatureRequestEditWithTemplateRequest.md)| | | ### Return type -**Buffer** +[**SignatureRequestGetResponse**](../model/SignatureRequestGetResponse.md) ### Authorization @@ -815,68 +915,97 @@ result.then(response => { ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: `application/pdf`, `application/zip`, `application/json` +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `signatureRequestFilesAsDataUri()` +## `signatureRequestFiles()` ```typescript -signatureRequestFilesAsDataUri(signatureRequestId: string): FileResponseDataUri +signatureRequestFiles(signatureRequestId: string, fileType: 'pdf' | 'zip'): Buffer ``` -Download Files as Data Uri +Download Files -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf", // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFiles:"); + console.log(error.body); +}); -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +``` -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +### Parameters -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signatureRequestId** | **string**| The id of the SignatureRequest to retrieve. | | +| **fileType** | **'pdf' | 'zip'**| Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] [default to 'pdf'] | -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +### Return type -const result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); +**Buffer** + +### Authorization +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/pdf`, `application/zip`, `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestFilesAsDataUri()` + +```typescript +signatureRequestFilesAsDataUri(signatureRequestId: string): FileResponseDataUri ``` -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; +Download Files as Data Uri -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +### TypeScript Example -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +```typescript +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); -result.then(response => { +apiCaller.signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri:"); console.log(error.body); }); @@ -918,48 +1047,21 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); -result.then(response => { +apiCaller.signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1, // forceDownload +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl:"); console.log(error.body); }); @@ -1002,48 +1104,20 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestGet(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestGet(signatureRequestId); -result.then(response => { +apiCaller.signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestGet:"); console.log(error.body); }); @@ -1085,50 +1159,23 @@ Returns a list of SignatureRequests that you can access. This includes Signature ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = null; -const page = 1; - -const result = signatureRequestApi.signatureRequestList(accountId, page); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = null; -const page = 1; - -const result = signatureRequestApi.signatureRequestList(accountId, page); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestList:"); console.log(error.body); }); @@ -1173,48 +1220,20 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); -result.then(response => { +apiCaller.signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestReleaseHold:"); console.log(error.body); }); @@ -1256,56 +1275,25 @@ Sends an email to the signer reminding them to sign the signature request. You c ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.SignatureRequestRemindRequest = { - emailAddress: "john@example.com", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const signatureRequestRemindRequest: models.SignatureRequestRemindRequest = { emailAddress: "john@example.com", }; -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); -result.then(response => { +apiCaller.signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestRemind:"); console.log(error.body); }); @@ -1348,48 +1336,17 @@ Removes your access to a completed signature request. This action is **not rever ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemove(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; -const result = signatureRequestApi.signatureRequestRemove(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestRemove:"); console.log(error.body); }); @@ -1431,174 +1388,70 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, }; -const signingOptions: DropboxSign.SubSigningOptions = { +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.SignatureRequestSendRequest = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, }; -const result = signatureRequestApi.signatureRequestSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", +const signers1: models.SubSignatureRequestSigner = { name: "Jack", + emailAddress: "jack@example.com", order: 0, }; -const signer2 = { - emailAddress: "jill@example.com", +const signers2: models.SubSignatureRequestSigner = { name: "Jill", + emailAddress: "jill@example.com", order: 1, }; -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; +const signers = [ + signers1, + signers2, +]; -const data = { - title: "NDA with Acme Co.", +const signatureRequestSendRequest: models.SignatureRequestSendRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], + testMode: true, + title: "NDA with Acme Co.", ccEmailAddresses: [ "lawyer1@dropboxsign.com", - "lawyer2@example.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), ], - files: [ file, fileBuffer, fileBufferAlt ], metadata: { "custom_id": 1234, - "custom_text": "NDA #9", + "custom_text": "NDA #9" }, - signingOptions, - fieldOptions, - testMode: true, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestSend(data); -result.then(response => { +apiCaller.signatureRequestSend( + signatureRequestSendRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); console.log(error.body); }); @@ -1640,118 +1493,71 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const customField1: DropboxSign.SubCustomField = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signingOptions: DropboxSign.SubSigningOptions = { +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, }; -const result = signatureRequestApi.signatureRequestSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { +const signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", - emailAddress: "george@example.com", name: "George", + emailAddress: "george@example.com", }; -const cc1 = { +const signers = [ + signers1, +]; + +const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@example.com", }; -const customField1 = { +const ccs = [ + ccs1, +]; + +const customFields1: models.SubCustomField = { name: "Cost", - value: "$20,000", editor: "Client", required: true, + value: "$20,000", }; -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; +const customFields = [ + customFields1, +]; -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", +const signatureRequestSendWithTemplateRequest: models.SignatureRequestSendWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, + subject: "Purchase Order", testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, }; -const result = signatureRequestApi.signatureRequestSendWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate:"); console.log(error.body); }); @@ -1793,58 +1599,26 @@ Updates the email address and/or the name for a given signer on a signature requ ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.SignatureRequestUpdateRequest = { - emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const signatureRequestUpdateRequest: models.SignatureRequestUpdateRequest = { + signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3", }; -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); -result.then(response => { +apiCaller.signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestUpdate:"); console.log(error.body); }); diff --git a/docs/api/TeamApi.md b/docs/api/TeamApi.md index cc21d01..959d4cc 100644 --- a/docs/api/TeamApi.md +++ b/docs/api/TeamApi.md @@ -29,52 +29,25 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const teamApi = new DropboxSign.TeamApi(); +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamAddMemberRequest = { +const teamAddMemberRequest: models.TeamAddMemberRequest = { emailAddress: "george@example.com", }; -const result = teamApi.teamAddMember(data); -result.then(response => { +apiCaller.teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "george@example.com", -}; - -const result = teamApi.teamAddMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamAddMember:"); console.log(error.body); }); @@ -117,52 +90,24 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamCreateRequest = { - name: "New Team Name" -}; - -const result = teamApi.teamCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - name: "New Team Name" +const teamCreateRequest: models.TeamCreateRequest = { + name: "New Team Name", }; -const result = teamApi.teamCreate(data); -result.then(response => { +apiCaller.teamCreate( + teamCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamCreate:"); console.log(error.body); }); @@ -204,44 +149,16 @@ Deletes your Team. Can only be invoked when you have a Team with only one member ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamDelete(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamDelete(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.teamDelete().catch(error => { + console.log("Exception when calling TeamApi#teamDelete:"); console.log(error.body); }); @@ -281,44 +198,18 @@ Returns information about your Team as well as a list of its members. If you do ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamGet(); -result.then(response => { +apiCaller.teamGet().then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamGet(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamGet:"); console.log(error.body); }); @@ -358,44 +249,20 @@ Provides information about a team. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamInfo(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = teamApi.teamInfo(); -result.then(response => { +apiCaller.teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamInfo:"); console.log(error.body); }); @@ -437,48 +304,18 @@ Provides a list of team invites (and their roles). ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const teamApi = new DropboxSign.TeamApi(); +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const emailAddress = "user@dropboxsign.com"; - -const result = teamApi.teamInvites(emailAddress); -result.then(response => { +apiCaller.teamInvites().then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const emailAddress = "user@dropboxsign.com"; - -const result = teamApi.teamInvites(emailAddress); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamInvites:"); console.log(error.body); }); @@ -520,48 +357,22 @@ Provides a paginated list of members (and their roles) that belong to a given te ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamMembers(teamId); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamMembers(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamMembers:"); console.log(error.body); }); @@ -605,54 +416,25 @@ Removes the provided user Account from your Team. If the Account had an outstand ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamRemoveMemberRequest = { - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com", -}; - -const result = teamApi.teamRemoveMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { emailAddress: "teammate@dropboxsign.com", newOwnerEmailAddress: "new_teammate@dropboxsign.com", }; -const result = teamApi.teamRemoveMember(data); -result.then(response => { +apiCaller.teamRemoveMember( + teamRemoveMemberRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamRemoveMember:"); console.log(error.body); }); @@ -694,48 +476,22 @@ Provides a paginated list of sub teams that belong to a given team. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamSubTeams(teamId); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamSubTeams(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamSubTeams:"); console.log(error.body); }); @@ -779,52 +535,24 @@ Updates the name of your Team. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamUpdateRequest = { - name: "New Team Name", -}; - -const result = teamApi.teamUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const teamUpdateRequest: models.TeamUpdateRequest = { name: "New Team Name", }; -const result = teamApi.teamUpdate(data); -result.then(response => { +apiCaller.teamUpdate( + teamUpdateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamUpdate:"); console.log(error.body); }); diff --git a/docs/api/TemplateApi.md b/docs/api/TemplateApi.md index e73e593..d86551c 100644 --- a/docs/api/TemplateApi.md +++ b/docs/api/TemplateApi.md @@ -30,56 +30,25 @@ Gives the specified Account access to the specified Template. The specified Acco ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateAddUserRequest = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateAddUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const templateAddUserRequest: models.TemplateAddUserRequest = { emailAddress: "george@dropboxsign.com", }; -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateAddUser(templateId, data); -result.then(response => { +apiCaller.templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateAddUser:"); console.log(error.body); }); @@ -122,132 +91,107 @@ Creates a template that can then be used. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateApi = new DropboxSign.TemplateApi(); +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; -const role1: DropboxSign.SubTemplateRole = { +const signerRoles1: models.SubTemplateRole = { name: "Client", order: 0, }; -const role2: DropboxSign.SubTemplateRole = { +const signerRoles2: models.SubTemplateRole = { name: "Witness", order: 1, }; -const mergeField1: DropboxSign.SubMergeField = { - name: "Full Name", - type: DropboxSign.SubMergeField.TypeEnum.Text, -}; - -const mergeField2: DropboxSign.SubMergeField = { - name: "Is Registered?", - type: DropboxSign.SubMergeField.TypeEnum.Checkbox, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; +const signerRoles = [ + signerRoles1, + signerRoles2, +]; -const data: DropboxSign.TemplateCreateRequest = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, }; -const result = templateApi.templateCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1 = { - name: "Client", - order: 0, +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, }; -const role2 = { - name: "Witness", - order: 1, -}; +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; -const mergeField1 = { +const mergeFields1: models.SubMergeField = { name: "Full Name", - type: "text", + type: models.SubMergeField.TypeEnum.Text, }; -const mergeField2 = { +const mergeFields2: models.SubMergeField = { name: "Is Registered?", - type: "checkbox", + type: models.SubMergeField.TypeEnum.Checkbox, }; -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; +const mergeFields = [ + mergeFields1, + mergeFields2, +]; -const data = { +const templateCreateRequest: models.TemplateCreateRequest = { clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", message: "For your approval", - signerRoles: [ - role1, - role2, + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, + files: [ + fs.createReadStream("./example_signature_request.pdf"), ], - fieldOptions, - testMode: true, + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, }; -const result = templateApi.templateCreate(data); -result.then(response => { +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateCreate:"); console.log(error.body); }); @@ -289,132 +233,71 @@ The first step in an embedded template workflow. Creates a draft template that c ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1: DropboxSign.SubTemplateRole = { - name: "Client", - order: 0, -}; - -const role2: DropboxSign.SubTemplateRole = { - name: "Witness", - order: 1, +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, }; -const mergeField1: DropboxSign.SubMergeField = { +const mergeFields1: models.SubMergeField = { name: "Full Name", - type: DropboxSign.SubMergeField.TypeEnum.Text, + type: models.SubMergeField.TypeEnum.Text, }; -const mergeField2: DropboxSign.SubMergeField = { +const mergeFields2: models.SubMergeField = { name: "Is Registered?", - type: DropboxSign.SubMergeField.TypeEnum.Checkbox, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.TemplateCreateEmbeddedDraftRequest = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, + type: models.SubMergeField.TypeEnum.Checkbox, }; -const result = templateApi.templateCreateEmbeddedDraft(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); +const mergeFields = [ + mergeFields1, + mergeFields2, +]; -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1 = { +const signerRoles1: models.SubTemplateRole = { name: "Client", order: 0, }; -const role2 = { +const signerRoles2: models.SubTemplateRole = { name: "Witness", order: 1, }; -const mergeField1 = { - name: "Full Name", - type: "text", -}; - -const mergeField2 = { - name: "Is Registered?", - type: "checkbox", -}; +const signerRoles = [ + signerRoles1, + signerRoles2, +]; -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -const data = { +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", message: "For your approval", - signerRoles: [ - role1, - role2, + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, + files: [ + fs.createReadStream("./example_signature_request.pdf"), ], - fieldOptions, - testMode: true, + fieldOptions: fieldOptions, + mergeFields: mergeFields, + signerRoles: signerRoles, }; -const result = templateApi.templateCreateEmbeddedDraft(data); -result.then(response => { +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); console.log(error.body); }); @@ -456,48 +339,18 @@ Completely deletes the template specified from the account. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateDelete(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = templateApi.templateDelete(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.templateDelete( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).catch(error => { + console.log("Exception when calling TemplateApi#templateDelete:"); console.log(error.body); }); @@ -539,52 +392,21 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; -const fileType = "pdf"; - -const result = templateApi.templateFiles(templateId, fileType); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; -const fileType = "pdf"; - -const result = templateApi.templateFiles(templateId, fileType); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + undefined, // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateFiles:"); console.log(error.body); }); @@ -627,48 +449,20 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsDataUri(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = templateApi.templateFilesAsDataUri(templateId); -result.then(response => { +apiCaller.templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateFilesAsDataUri:"); console.log(error.body); }); @@ -710,48 +504,21 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsFileUrl(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = templateApi.templateFilesAsFileUrl(templateId); -result.then(response => { +apiCaller.templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1, // forceDownload +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateFilesAsFileUrl:"); console.log(error.body); }); @@ -794,48 +561,20 @@ Returns the Template specified by the `template_id` parameter. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateGet(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = templateApi.templateGet(templateId); -result.then(response => { +apiCaller.templateGet( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateGet:"); console.log(error.body); }); @@ -877,48 +616,23 @@ Returns a list of the Templates that are accessible by you. Take a look at our ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateList(accountId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateList(accountId); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateList:"); console.log(error.body); }); @@ -963,56 +677,25 @@ Removes the specified Account\'s access to the specified Template. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateRemoveUserRequest = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -const result = templateApi.templateRemoveUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const templateRemoveUserRequest: models.TemplateRemoveUserRequest = { emailAddress: "george@dropboxsign.com", }; -const templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -const result = templateApi.templateRemoveUser(templateId, data); -result.then(response => { +apiCaller.templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateRemoveUser:"); console.log(error.body); }); @@ -1055,58 +738,27 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; -import fs from "fs"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateUpdateFilesRequest = { - files: [fs.createReadStream("example_signature_request.pdf")], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateUpdateFiles(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - files: [fs.createReadStream("example_signature_request.pdf")], +const templateUpdateFilesRequest: models.TemplateUpdateFilesRequest = { + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], }; -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateUpdateFiles(templateId, data); -result.then(response => { +apiCaller.templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateUpdateFiles:"); console.log(error.body); }); diff --git a/docs/api/UnclaimedDraftApi.md b/docs/api/UnclaimedDraftApi.md index 068a549..ef4bb11 100644 --- a/docs/api/UnclaimedDraftApi.md +++ b/docs/api/UnclaimedDraftApi.md @@ -23,138 +23,39 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubUnclaimedDraftSigner = { - emailAddress: "jack@example.com", +const signers1: models.SubUnclaimedDraftSigner = { name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubUnclaimedDraftSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.UnclaimedDraftCreateRequest = { - subject: "The NDA we talked about", - type: DropboxSign.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ - signer1, - signer2, - ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { emailAddress: "jack@example.com", - name: "Jack", order: 0, }; -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; +const signers = [ + signers1, +]; -const data = { - subject: "The NDA we talked about", - type: "request_signature", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ - signer1, - signer2, - ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signers: signers, }; -const result = unclaimedDraftApi.unclaimedDraftCreate(data); -result.then(response => { +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); console.log(error.body); }); @@ -196,60 +97,29 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.UnclaimedDraftCreateEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: [fs.createReadStream("example_signature_request.pdf")], - requesterEmailAddress: "jack@dropboxsign.com", - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: [fs.createReadStream("example_signature_request.pdf")], +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], }; -const result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); -result.then(response => { +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); console.log(error.body); }); @@ -291,84 +161,50 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signer1: DropboxSign.SubUnclaimedDraftTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", -}; - -const cc1: DropboxSign.SubCC = { +const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@dropboxsign.com", }; -const data: DropboxSign.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requesterEmailAddress: "jack@dropboxsign.com", - signers: [ signer1 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; +const ccs = [ + ccs1, +]; -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { +const signers1: models.SubUnclaimedDraftTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", }; -const cc1 = { - role: "Accounting", - emailAddress: "accounting@dropboxsign.com", -}; +const signers = [ + signers1, +]; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], +const unclaimedDraftCreateEmbeddedWithTemplateRequest: models.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", - signers: [ signer1 ], - ccs: [ cc1 ], - testMode: true, + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + testMode: false, + ccs: ccs, + signers: signers, }; -const result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); -result.then(response => { +apiCaller.unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate:"); console.log(error.body); }); @@ -410,58 +246,26 @@ Creates a new signature request from an embedded request that can be edited prio ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.UnclaimedDraftEditAndResendRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - testMode: true, -}; - -const signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -const result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - testMode: true, +const unclaimedDraftEditAndResendRequest: models.UnclaimedDraftEditAndResendRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + testMode: false, }; -const signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -const result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); -result.then(response => { +apiCaller.unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend:"); console.log(error.body); }); diff --git a/docs/model/FaxLineAddUserRequest.md b/docs/model/FaxLineAddUserRequest.md index df23c2c..0b687c0 100644 --- a/docs/model/FaxLineAddUserRequest.md +++ b/docs/model/FaxLineAddUserRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | +| `number`*_required_ | ```string``` | The Fax Line number | | | `accountId` | ```string``` | Account ID | | | `emailAddress` | ```string``` | Email address | | diff --git a/docs/model/FaxLineCreateRequest.md b/docs/model/FaxLineCreateRequest.md index ae70b5c..6087b89 100644 --- a/docs/model/FaxLineCreateRequest.md +++ b/docs/model/FaxLineCreateRequest.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `areaCode`*_required_ | ```number``` | Area code | | -| `country`*_required_ | ```string``` | Country | | -| `city` | ```string``` | City | | -| `accountId` | ```string``` | Account ID | | +| `areaCode`*_required_ | ```number``` | Area code of the new Fax Line | | +| `country`*_required_ | ```string``` | Country of the area code | | +| `city` | ```string``` | City of the area code | | +| `accountId` | ```string``` | Account ID of the account that will be assigned this new Fax Line | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/model/FaxLineDeleteRequest.md b/docs/model/FaxLineDeleteRequest.md index a2112ed..fed4ee1 100644 --- a/docs/model/FaxLineDeleteRequest.md +++ b/docs/model/FaxLineDeleteRequest.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | +| `number`*_required_ | ```string``` | The Fax Line number | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/model/FaxLineRemoveUserRequest.md b/docs/model/FaxLineRemoveUserRequest.md index e161ecf..9ae81a6 100644 --- a/docs/model/FaxLineRemoveUserRequest.md +++ b/docs/model/FaxLineRemoveUserRequest.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | -| `accountId` | ```string``` | Account ID | | -| `emailAddress` | ```string``` | Email address | | +| `number`*_required_ | ```string``` | The Fax Line number | | +| `accountId` | ```string``` | Account ID of the user to remove access | | +| `emailAddress` | ```string``` | Email address of the user to remove access | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/model/FaxSendRequest.md b/docs/model/FaxSendRequest.md index 72ebb6f..9df85d9 100644 --- a/docs/model/FaxSendRequest.md +++ b/docs/model/FaxSendRequest.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `recipient`*_required_ | ```string``` | Fax Send To Recipient | | +| `recipient`*_required_ | ```string``` | Recipient of the fax Can be a phone number in E.164 format or email address | | | `sender` | ```string``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```Array``` | Fax File to Send | | -| `fileUrls` | ```Array``` | Fax File URL to Send | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | | `testMode` | ```boolean``` | API Test Mode Setting | [default to false] | -| `coverPageTo` | ```string``` | Fax Cover Page for Recipient | | -| `coverPageFrom` | ```string``` | Fax Cover Page for Sender | | +| `coverPageTo` | ```string``` | Fax cover page recipient information | | +| `coverPageFrom` | ```string``` | Fax cover page sender information | | | `coverPageMessage` | ```string``` | Fax Cover Page Message | | | `title` | ```string``` | Fax Title | | diff --git a/docs/model/SignatureRequestEditEmbeddedRequest.md b/docs/model/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 0000000..bcc66ec --- /dev/null +++ b/docs/model/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,34 @@ +# # SignatureRequestEditEmbeddedRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `clientId`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```Array```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```Array```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allowReassign` | ```boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [default to false] | +| `attachments` | [```Array```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```Array``` | The email addresses that should be CCed. | | +| `customFields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```Array```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```Array```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```Array```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `populateAutoFillFields` | ```boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | +| `expiresAt` | ```number``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md b/docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 0000000..f417f0f --- /dev/null +++ b/docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,25 @@ +# # SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `templateIds`*_required_ | ```Array``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `clientId`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```Array```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```Array```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `customFields` | [```Array```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `populateAutoFillFields` | ```boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/model/SignatureRequestEditRequest.md b/docs/model/SignatureRequestEditRequest.md new file mode 100644 index 0000000..3093846 --- /dev/null +++ b/docs/model/SignatureRequestEditRequest.md @@ -0,0 +1,35 @@ +# # SignatureRequestEditRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```Array```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```Array```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allowReassign` | ```boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [default to false] | +| `attachments` | [```Array```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```Array``` | The email addresses that should be CCed. | | +| `clientId` | ```string``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```Array```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```Array```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```Array```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `isEid` | ```boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `expiresAt` | ```number``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/model/SignatureRequestEditWithTemplateRequest.md b/docs/model/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 0000000..fdec2cf --- /dev/null +++ b/docs/model/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,26 @@ +# # SignatureRequestEditWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `templateIds`*_required_ | ```Array``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```Array```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```Array```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `clientId` | ```string``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```Array```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `isEid` | ```boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/AccountCreate.js b/examples/AccountCreate.js deleted file mode 100644 index 3aed648..0000000 --- a/examples/AccountCreate.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = accountApi.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountCreate.ts b/examples/AccountCreate.ts deleted file mode 100644 index 2819e3d..0000000 --- a/examples/AccountCreate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountCreateRequest = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = accountApi.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountCreateExample.ts b/examples/AccountCreateExample.ts new file mode 100644 index 0000000..bf8570a --- /dev/null +++ b/examples/AccountCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountCreateRequest: models.AccountCreateRequest = { + emailAddress: "newuser@dropboxsign.com", +}; + +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountCreate:"); + console.log(error.body); +}); diff --git a/examples/AccountCreateOauthExample.ts b/examples/AccountCreateOauthExample.ts new file mode 100644 index 0000000..d77c2e5 --- /dev/null +++ b/examples/AccountCreateOauthExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountCreateRequest: models.AccountCreateRequest = { + emailAddress: "newuser@dropboxsign.com", + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", +}; + +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountCreate:"); + console.log(error.body); +}); diff --git a/examples/AccountGet.js b/examples/AccountGet.js deleted file mode 100644 index 00d03af..0000000 --- a/examples/AccountGet.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = accountApi.accountGet(undefined, "jack@example.com"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountGet.ts b/examples/AccountGet.ts deleted file mode 100644 index 00d03af..0000000 --- a/examples/AccountGet.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = accountApi.accountGet(undefined, "jack@example.com"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountGetExample.ts b/examples/AccountGetExample.ts new file mode 100644 index 0000000..6bc7ae2 --- /dev/null +++ b/examples/AccountGetExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.accountGet().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountGet:"); + console.log(error.body); +}); diff --git a/examples/AccountUpdate.js b/examples/AccountUpdate.js deleted file mode 100644 index 0d48a59..0000000 --- a/examples/AccountUpdate.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - callbackUrl: "https://www.example.com/callback", -}; - -const result = accountApi.accountUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountUpdate.ts b/examples/AccountUpdate.ts deleted file mode 100644 index c76ac1d..0000000 --- a/examples/AccountUpdate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountUpdateRequest = { - callbackUrl: "https://www.example.com/callback", -}; - -const result = accountApi.accountUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountUpdateExample.ts b/examples/AccountUpdateExample.ts new file mode 100644 index 0000000..3f86ffe --- /dev/null +++ b/examples/AccountUpdateExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountUpdateRequest: models.AccountUpdateRequest = { + callbackUrl: "https://www.example.com/callback", + locale: "en-US", +}; + +apiCaller.accountUpdate( + accountUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountUpdate:"); + console.log(error.body); +}); diff --git a/examples/AccountVerify.js b/examples/AccountVerify.js deleted file mode 100644 index 689286e..0000000 --- a/examples/AccountVerify.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "some_user@dropboxsign.com", -}; - -const result = accountApi.accountVerify(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountVerify.ts b/examples/AccountVerify.ts deleted file mode 100644 index d2a7548..0000000 --- a/examples/AccountVerify.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountVerifyRequest = { - emailAddress: "some_user@dropboxsign.com", -}; - -const result = accountApi.accountVerify(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountVerifyExample.ts b/examples/AccountVerifyExample.ts new file mode 100644 index 0000000..8b79bdf --- /dev/null +++ b/examples/AccountVerifyExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountVerifyRequest: models.AccountVerifyRequest = { + emailAddress: "some_user@dropboxsign.com", +}; + +apiCaller.accountVerify( + accountVerifyRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountVerify:"); + console.log(error.body); +}); diff --git a/examples/ApiAppCreate.js b/examples/ApiAppCreate.js deleted file mode 100644 index 09d14e5..0000000 --- a/examples/ApiAppCreate.js +++ /dev/null @@ -1,39 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const oauth = { - callbackUrl: "https://example.com/oauth", - scopes: [ - "basic_account_info", - "request_signature", - ], -}; - -const whiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data = { - name: "My Production App", - domains: ["example.com"], - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - oauth, - whiteLabelingOptions, -}; - -const result = apiAppApi.apiAppCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppCreate.ts b/examples/ApiAppCreate.ts deleted file mode 100644 index bcbec4d..0000000 --- a/examples/ApiAppCreate.ts +++ /dev/null @@ -1,39 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const oauth: DropboxSign.SubOAuth = { - callbackUrl: "https://example.com/oauth", - scopes: [ - DropboxSign.SubOAuth.ScopesEnum.BasicAccountInfo, - DropboxSign.SubOAuth.ScopesEnum.RequestSignature, - ], -}; - -const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data: DropboxSign.ApiAppCreateRequest = { - name: "My Production App", - domains: ["example.com"], - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - oauth, - whiteLabelingOptions, -}; - -const result = apiAppApi.apiAppCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppCreateExample.ts b/examples/ApiAppCreateExample.ts new file mode 100644 index 0000000..82890bf --- /dev/null +++ b/examples/ApiAppCreateExample.ts @@ -0,0 +1,39 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const oauth: models.SubOAuth = { + callbackUrl: "https://example.com/oauth", + scopes: [ + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, + ], +}; + +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff", +}; + +const apiAppCreateRequest: models.ApiAppCreateRequest = { + name: "My Production App", + domains: [ + "example.com", + ], + customLogoFile: fs.createReadStream("CustomLogoFile.png"), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, +}; + +apiCaller.apiAppCreate( + apiAppCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppCreate:"); + console.log(error.body); +}); diff --git a/examples/ApiAppDelete.js b/examples/ApiAppDelete.js deleted file mode 100644 index 37f7b0e..0000000 --- a/examples/ApiAppDelete.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppDelete(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppDelete.ts b/examples/ApiAppDelete.ts deleted file mode 100644 index 37f7b0e..0000000 --- a/examples/ApiAppDelete.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppDelete(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppDeleteExample.ts b/examples/ApiAppDeleteExample.ts new file mode 100644 index 0000000..1ffefb9 --- /dev/null +++ b/examples/ApiAppDeleteExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppDelete:"); + console.log(error.body); +}); diff --git a/examples/ApiAppGet.js b/examples/ApiAppGet.js deleted file mode 100644 index e300219..0000000 --- a/examples/ApiAppGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppGet(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppGet.ts b/examples/ApiAppGet.ts deleted file mode 100644 index e300219..0000000 --- a/examples/ApiAppGet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppGet(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppGetExample.ts b/examples/ApiAppGetExample.ts new file mode 100644 index 0000000..4899769 --- /dev/null +++ b/examples/ApiAppGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppGet:"); + console.log(error.body); +}); diff --git a/examples/ApiAppList.js b/examples/ApiAppList.js deleted file mode 100644 index 46638eb..0000000 --- a/examples/ApiAppList.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 2; - -const result = apiAppApi.apiAppList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppList.ts b/examples/ApiAppList.ts deleted file mode 100644 index 46638eb..0000000 --- a/examples/ApiAppList.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 2; - -const result = apiAppApi.apiAppList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppListExample.ts b/examples/ApiAppListExample.ts new file mode 100644 index 0000000..7304a9d --- /dev/null +++ b/examples/ApiAppListExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppList:"); + console.log(error.body); +}); diff --git a/examples/ApiAppUpdate.js b/examples/ApiAppUpdate.js deleted file mode 100644 index 9408789..0000000 --- a/examples/ApiAppUpdate.js +++ /dev/null @@ -1,32 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const whiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data = { - name: "New Name", - callbackUrl: "http://example.com/dropboxsign", - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - whiteLabelingOptions, -}; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppUpdate(clientId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppUpdate.ts b/examples/ApiAppUpdate.ts deleted file mode 100644 index fdbc255..0000000 --- a/examples/ApiAppUpdate.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data: DropboxSign.ApiAppUpdateRequest = { - name: "New Name", - callbackUrl: "http://example.com/dropboxsign", - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - whiteLabelingOptions, -}; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppUpdate(clientId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppUpdateExample.ts b/examples/ApiAppUpdateExample.ts new file mode 100644 index 0000000..0331942 --- /dev/null +++ b/examples/ApiAppUpdateExample.ts @@ -0,0 +1,41 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const oauth: models.SubOAuth = { + callbackUrl: "https://example.com/oauth", + scopes: [ + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, + ], +}; + +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff", +}; + +const apiAppUpdateRequest: models.ApiAppUpdateRequest = { + callbackUrl: "https://example.com/dropboxsign", + name: "New Name", + domains: [ + "example.com", + ], + customLogoFile: fs.createReadStream("CustomLogoFile.png"), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, +}; + +apiCaller.apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppUpdate:"); + console.log(error.body); +}); diff --git a/examples/BulkSendJobGet.js b/examples/BulkSendJobGet.js deleted file mode 100644 index 7a1f5e0..0000000 --- a/examples/BulkSendJobGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -const result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/BulkSendJobGet.ts b/examples/BulkSendJobGet.ts deleted file mode 100644 index 7a1f5e0..0000000 --- a/examples/BulkSendJobGet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -const result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/BulkSendJobGetExample.ts b/examples/BulkSendJobGetExample.ts new file mode 100644 index 0000000..9c3e43e --- /dev/null +++ b/examples/BulkSendJobGetExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling BulkSendJobApi#bulkSendJobGet:"); + console.log(error.body); +}); diff --git a/examples/BulkSendJobList.js b/examples/BulkSendJobList.js deleted file mode 100644 index ceb3570..0000000 --- a/examples/BulkSendJobList.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 20; - -const result = bulkSendJobApi.bulkSendJobList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/BulkSendJobList.ts b/examples/BulkSendJobList.ts deleted file mode 100644 index ceb3570..0000000 --- a/examples/BulkSendJobList.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 20; - -const result = bulkSendJobApi.bulkSendJobList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/BulkSendJobListExample.ts b/examples/BulkSendJobListExample.ts new file mode 100644 index 0000000..4f8b1b3 --- /dev/null +++ b/examples/BulkSendJobListExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling BulkSendJobApi#bulkSendJobList:"); + console.log(error.body); +}); diff --git a/examples/EmbeddedEditUrl.js b/examples/EmbeddedEditUrl.js deleted file mode 100644 index a3fab55..0000000 --- a/examples/EmbeddedEditUrl.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - ccRoles: [""], - mergeFields: [], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = embeddedApi.embeddedEditUrl(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/EmbeddedEditUrl.ts b/examples/EmbeddedEditUrl.ts deleted file mode 100644 index c6c93c2..0000000 --- a/examples/EmbeddedEditUrl.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.EmbeddedEditUrlRequest = { - ccRoles: [""], - mergeFields: [], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = embeddedApi.embeddedEditUrl(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/EmbeddedEditUrlExample.ts b/examples/EmbeddedEditUrlExample.ts new file mode 100644 index 0000000..cdfa90b --- /dev/null +++ b/examples/EmbeddedEditUrlExample.ts @@ -0,0 +1,27 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const mergeFields = [ +]; + +const embeddedEditUrlRequest: models.EmbeddedEditUrlRequest = { + ccRoles: [ + "", + ], + mergeFields: mergeFields, +}; + +apiCaller.embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling EmbeddedApi#embeddedEditUrl:"); + console.log(error.body); +}); diff --git a/examples/EmbeddedSignUrl.js b/examples/EmbeddedSignUrl.js deleted file mode 100644 index e69bca0..0000000 --- a/examples/EmbeddedSignUrl.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - -const result = embeddedApi.embeddedSignUrl(signatureId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/EmbeddedSignUrl.ts b/examples/EmbeddedSignUrl.ts deleted file mode 100644 index e69bca0..0000000 --- a/examples/EmbeddedSignUrl.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - -const result = embeddedApi.embeddedSignUrl(signatureId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/EmbeddedSignUrlExample.ts b/examples/EmbeddedSignUrlExample.ts new file mode 100644 index 0000000..ec7da05 --- /dev/null +++ b/examples/EmbeddedSignUrlExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", // signatureId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling EmbeddedApi#embeddedSignUrl:"); + console.log(error.body); +}); diff --git a/examples/EventCallback.ts b/examples/EventCallback.ts deleted file mode 100644 index bd7e9a4..0000000 --- a/examples/EventCallback.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { EventCallbackRequest, EventCallbackHelper } from "@dropbox/sign"; - -// use your API key -const api_key = '324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782'; - -// callback_data represents data we send to you -const callback_data = { - event: { - event_type: 'account_confirmed', - event_time: '1669926463', - event_hash: 'ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f', - event_metadata: { - related_signature_id: null, - reported_for_account_id: '6421d70b9bd45059fa207d03ab8d1b96515b472c', - reported_for_app_id: null, - event_message: null - } - } -}; - -const callback_event = EventCallbackRequest.init(callback_data); - -// verify that a callback came from HelloSign.com -if (EventCallbackHelper.isValid(api_key, callback_event)) { - // one of "account_callback" or "api_app_callback" - const callback_type = EventCallbackHelper.getCallbackType(callback_event); - - // do your magic below! -} diff --git a/examples/EventCallback.js b/examples/EventCallbackExample.ts similarity index 100% rename from examples/EventCallback.js rename to examples/EventCallbackExample.ts diff --git a/examples/FaxDelete.js b/examples/FaxDelete.js deleted file mode 100644 index 38492bd..0000000 --- a/examples/FaxDelete.js +++ /dev/null @@ -1,13 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxDelete.ts b/examples/FaxDelete.ts deleted file mode 100644 index 38492bd..0000000 --- a/examples/FaxDelete.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxDeleteExample.ts b/examples/FaxDeleteExample.ts new file mode 100644 index 0000000..3afd7a6 --- /dev/null +++ b/examples/FaxDeleteExample.ts @@ -0,0 +1,13 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).catch(error => { + console.log("Exception when calling FaxApi#faxDelete:"); + console.log(error.body); +}); diff --git a/examples/FaxFiles.js b/examples/FaxFiles.js deleted file mode 100644 index d7390cf..0000000 --- a/examples/FaxFiles.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = faxApi.faxFiles(faxId); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxFiles.ts b/examples/FaxFiles.ts deleted file mode 100644 index d7390cf..0000000 --- a/examples/FaxFiles.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = faxApi.faxFiles(faxId); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxFilesExample.ts b/examples/FaxFilesExample.ts new file mode 100644 index 0000000..d436071 --- /dev/null +++ b/examples/FaxFilesExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxFiles:"); + console.log(error.body); +}); diff --git a/examples/FaxGet.js b/examples/FaxGet.js deleted file mode 100644 index 8a1dbbf..0000000 --- a/examples/FaxGet.js +++ /dev/null @@ -1,16 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -const result = faxApi.faxGet(faxId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxGet.ts b/examples/FaxGet.ts deleted file mode 100644 index 793f6e5..0000000 --- a/examples/FaxGet.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -const result = faxApi.faxGet(faxId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxGetExample.ts b/examples/FaxGetExample.ts new file mode 100644 index 0000000..56a87db --- /dev/null +++ b/examples/FaxGetExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxGet:"); + console.log(error.body); +}); diff --git a/examples/FaxLineAddUser.js b/examples/FaxLineAddUser.js deleted file mode 100644 index 84e1e2c..0000000 --- a/examples/FaxLineAddUser.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineAddUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineAddUser.ts b/examples/FaxLineAddUser.ts deleted file mode 100644 index e5d705e..0000000 --- a/examples/FaxLineAddUser.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineAddUserRequest = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineAddUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineAddUserExample.ts b/examples/FaxLineAddUserExample.ts new file mode 100644 index 0000000..07d0569 --- /dev/null +++ b/examples/FaxLineAddUserExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineAddUserRequest: models.FaxLineAddUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +apiCaller.faxLineAddUser( + faxLineAddUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineAddUser:"); + console.log(error.body); +}); diff --git a/examples/FaxLineAreaCodeGet.js b/examples/FaxLineAreaCodeGet.js deleted file mode 100644 index bfc908f..0000000 --- a/examples/FaxLineAreaCodeGet.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineAreaCodeGet.ts b/examples/FaxLineAreaCodeGet.ts deleted file mode 100644 index bfc908f..0000000 --- a/examples/FaxLineAreaCodeGet.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineAreaCodeGetExample.ts b/examples/FaxLineAreaCodeGetExample.ts new file mode 100644 index 0000000..0abb378 --- /dev/null +++ b/examples/FaxLineAreaCodeGetExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineAreaCodeGet( + "US", // country + undefined, // state + undefined, // province + undefined, // city +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineAreaCodeGet:"); + console.log(error.body); +}); diff --git a/examples/FaxLineCreate.js b/examples/FaxLineCreate.js deleted file mode 100644 index c4ee72c..0000000 --- a/examples/FaxLineCreate.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - areaCode: 209, - country: "US", -}; - -const result = faxLineApi.faxLineCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineCreate.ts b/examples/FaxLineCreate.ts deleted file mode 100644 index 6ceeb71..0000000 --- a/examples/FaxLineCreate.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineCreateRequest = { - areaCode: 209, - country: "US", -}; - -const result = faxLineApi.faxLineCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineCreateExample.ts b/examples/FaxLineCreateExample.ts new file mode 100644 index 0000000..5f1f5e2 --- /dev/null +++ b/examples/FaxLineCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineCreateRequest: models.FaxLineCreateRequest = { + areaCode: 209, + country: models.FaxLineCreateRequest.CountryEnum.Us, +}; + +apiCaller.faxLineCreate( + faxLineCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineCreate:"); + console.log(error.body); +}); diff --git a/examples/FaxLineDelete.js b/examples/FaxLineDelete.js deleted file mode 100644 index 1e8bdda..0000000 --- a/examples/FaxLineDelete.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - number: "[FAX_NUMBER]", -}; - -const result = faxLineApi.faxLineDelete(data); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineDelete.ts b/examples/FaxLineDelete.ts deleted file mode 100644 index 14efef4..0000000 --- a/examples/FaxLineDelete.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineDeleteRequest = { - number: "[FAX_NUMBER]", -}; - -const result = faxLineApi.faxLineDelete(data); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineDeleteExample.ts b/examples/FaxLineDeleteExample.ts new file mode 100644 index 0000000..834fe8a --- /dev/null +++ b/examples/FaxLineDeleteExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineDeleteRequest: models.FaxLineDeleteRequest = { + number: "[FAX_NUMBER]", +}; + +apiCaller.faxLineDelete( + faxLineDeleteRequest, +).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineDelete:"); + console.log(error.body); +}); diff --git a/examples/FaxLineGet.js b/examples/FaxLineGet.js deleted file mode 100644 index e9643ab..0000000 --- a/examples/FaxLineGet.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineGet.ts b/examples/FaxLineGet.ts deleted file mode 100644 index e9643ab..0000000 --- a/examples/FaxLineGet.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineGetExample.ts b/examples/FaxLineGetExample.ts new file mode 100644 index 0000000..e5ee2fd --- /dev/null +++ b/examples/FaxLineGetExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineGet( + "123-123-1234", // number +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineGet:"); + console.log(error.body); +}); diff --git a/examples/FaxLineList.js b/examples/FaxLineList.js deleted file mode 100644 index f40c60d..0000000 --- a/examples/FaxLineList.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineList(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineList.ts b/examples/FaxLineList.ts deleted file mode 100644 index f40c60d..0000000 --- a/examples/FaxLineList.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineList(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineListExample.ts b/examples/FaxLineListExample.ts new file mode 100644 index 0000000..aa547af --- /dev/null +++ b/examples/FaxLineListExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + undefined, // showTeamLines +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineList:"); + console.log(error.body); +}); diff --git a/examples/FaxLineRemoveUser.js b/examples/FaxLineRemoveUser.js deleted file mode 100644 index 64f2479..0000000 --- a/examples/FaxLineRemoveUser.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineRemoveUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineRemoveUser.ts b/examples/FaxLineRemoveUser.ts deleted file mode 100644 index 91dc306..0000000 --- a/examples/FaxLineRemoveUser.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineRemoveUserRequest = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineRemoveUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineRemoveUserExample.ts b/examples/FaxLineRemoveUserExample.ts new file mode 100644 index 0000000..6daea08 --- /dev/null +++ b/examples/FaxLineRemoveUserExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineRemoveUserRequest: models.FaxLineRemoveUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +apiCaller.faxLineRemoveUser( + faxLineRemoveUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineRemoveUser:"); + console.log(error.body); +}); diff --git a/examples/FaxList.js b/examples/FaxList.js deleted file mode 100644 index 385f447..0000000 --- a/examples/FaxList.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const page = 1; -const pageSize = 2; - -const result = faxApi.faxList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxList.ts b/examples/FaxList.ts deleted file mode 100644 index 385f447..0000000 --- a/examples/FaxList.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const page = 1; -const pageSize = 2; - -const result = faxApi.faxList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxListExample.ts b/examples/FaxListExample.ts new file mode 100644 index 0000000..70b904d --- /dev/null +++ b/examples/FaxListExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxList:"); + console.log(error.body); +}); diff --git a/examples/FaxSend.js b/examples/FaxSend.js deleted file mode 100644 index 4b0eef2..0000000 --- a/examples/FaxSend.js +++ /dev/null @@ -1,47 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data = { - files: [ file, fileBuffer, fileBufferAlt ], - testMode: true, - recipient: "16690000001", - sender: "16690000000", - coverPageTo: "Jill Fax", - coverPageMessage: "I'm sending you a fax!", - coverPageFrom: "Faxer Faxerson", - title: "This is what the fax is about!", -}; - -const result = faxApi.faxSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxSend.ts b/examples/FaxSend.ts deleted file mode 100644 index 2f3f6e2..0000000 --- a/examples/FaxSend.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.FaxSendRequest = { - files: [ file, fileBuffer, fileBufferAlt ], - testMode: true, - recipient: "16690000001", - sender: "16690000000", - coverPageTo: "Jill Fax", - coverPageMessage: "I'm sending you a fax!", - coverPageFrom: "Faxer Faxerson", - title: "This is what the fax is about!", -}; - -const result = faxApi.faxSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxSendExample.ts b/examples/FaxSendExample.ts new file mode 100644 index 0000000..190caf0 --- /dev/null +++ b/examples/FaxSendExample.ts @@ -0,0 +1,28 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxSendRequest: models.FaxSendRequest = { + recipient: "16690000001", + sender: "16690000000", + testMode: true, + coverPageTo: "Jill Fax", + coverPageFrom: "Faxer Faxerson", + coverPageMessage: "I'm sending you a fax!", + title: "This is what the fax is about!", + files: [ + fs.createReadStream("./example_fax.pdf"), + ], +}; + +apiCaller.faxSend( + faxSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxSend:"); + console.log(error.body); +}); diff --git a/examples/OauthTokenGenerate.js b/examples/OauthTokenGenerate.js deleted file mode 100644 index 20a3413..0000000 --- a/examples/OauthTokenGenerate.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenGenerateRequest(); -data.state = "900e06e2"; -data.code = "1b0d28d90c86c141"; -data.clientId = "cc91c61d00f8bb2ece1428035716b"; -data.clientSecret = "1d14434088507ffa390e6f5528465"; - -const result = oAuthApi.oauthTokenGenerate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/OauthTokenGenerate.ts b/examples/OauthTokenGenerate.ts deleted file mode 100644 index 20a3413..0000000 --- a/examples/OauthTokenGenerate.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenGenerateRequest(); -data.state = "900e06e2"; -data.code = "1b0d28d90c86c141"; -data.clientId = "cc91c61d00f8bb2ece1428035716b"; -data.clientSecret = "1d14434088507ffa390e6f5528465"; - -const result = oAuthApi.oauthTokenGenerate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/OauthTokenGenerateExample.ts b/examples/OauthTokenGenerateExample.ts new file mode 100644 index 0000000..80e6adf --- /dev/null +++ b/examples/OauthTokenGenerateExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.OAuthApi(); + +const oAuthTokenGenerateRequest: models.OAuthTokenGenerateRequest = { + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", + code: "1b0d28d90c86c141", + state: "900e06e2", + grantType: "authorization_code", +}; + +apiCaller.oauthTokenGenerate( + oAuthTokenGenerateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling OAuthApi#oauthTokenGenerate:"); + console.log(error.body); +}); diff --git a/examples/OauthTokenRefresh.js b/examples/OauthTokenRefresh.js deleted file mode 100644 index da46f9f..0000000 --- a/examples/OauthTokenRefresh.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenRefreshRequest(); -data.refreshToken = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"; - -const result = oAuthApi.oauthTokenRefresh(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/OauthTokenRefresh.ts b/examples/OauthTokenRefresh.ts deleted file mode 100644 index da46f9f..0000000 --- a/examples/OauthTokenRefresh.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenRefreshRequest(); -data.refreshToken = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"; - -const result = oAuthApi.oauthTokenRefresh(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/OauthTokenRefreshExample.ts b/examples/OauthTokenRefreshExample.ts new file mode 100644 index 0000000..351d689 --- /dev/null +++ b/examples/OauthTokenRefreshExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.OAuthApi(); + +const oAuthTokenRefreshRequest: models.OAuthTokenRefreshRequest = { + grantType: "refresh_token", + refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", +}; + +apiCaller.oauthTokenRefresh( + oAuthTokenRefreshRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling OAuthApi#oauthTokenRefresh:"); + console.log(error.body); +}); diff --git a/examples/ReportCreate.js b/examples/ReportCreate.js deleted file mode 100644 index 738b12a..0000000 --- a/examples/ReportCreate.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const reportApi = new DropboxSign.ReportApi(); - -// Configure HTTP basic authorization: api_key -reportApi.username = "YOUR_API_KEY"; - -const data = { - startDate: "09/01/2020", - endDate: "09/01/2020", - reportType: [ - "user_activity", - "document_status", - ] -}; - -const result = reportApi.reportCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ReportCreate.ts b/examples/ReportCreate.ts deleted file mode 100644 index 39da03c..0000000 --- a/examples/ReportCreate.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const reportApi = new DropboxSign.ReportApi(); - -// Configure HTTP basic authorization: api_key -reportApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.ReportCreateRequest = { - startDate: "09/01/2020", - endDate: "09/01/2020", - reportType: [ - DropboxSign.ReportCreateRequest.ReportTypeEnum.UserActivity, - DropboxSign.ReportCreateRequest.ReportTypeEnum.DocumentStatus, - ] -}; - -const result = reportApi.reportCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ReportCreateExample.ts b/examples/ReportCreateExample.ts new file mode 100644 index 0000000..7195512 --- /dev/null +++ b/examples/ReportCreateExample.ts @@ -0,0 +1,24 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ReportApi(); +apiCaller.username = "YOUR_API_KEY"; + +const reportCreateRequest: models.ReportCreateRequest = { + startDate: "09/01/2020", + endDate: "09/01/2020", + reportType: [ + models.ReportCreateRequest.ReportTypeEnum.UserActivity, + models.ReportCreateRequest.ReportTypeEnum.DocumentStatus, + ], +}; + +apiCaller.reportCreate( + reportCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ReportApi#reportCreate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js deleted file mode 100644 index 6a303ba..0000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js +++ /dev/null @@ -1,66 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields = { - name: "company", - value: "ABC Corp", -}; - -const signerList1 = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; - -const signerList2Signer = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", -}; - -const signerList2CustomFields = { - name: "company", - value: "123 LLC", -}; - -const signerList2 = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data = { - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts deleted file mode 100644 index acb3aa5..0000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -const signerList1Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "ABC Corp", -}; - -const signerList1: DropboxSign.SubBulkSignerList = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; - -const signerList2Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", -}; - -const signerList2CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "123 LLC", -}; - -const signerList2: DropboxSign.SubBulkSignerList = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data: DropboxSign.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 0000000..9c95521 --- /dev/null +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; + +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "123 LLC", +}; + +const signerList2CustomFields = [ + signerList2CustomFields1, +]; + +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b", +}; + +const signerList2Signers = [ + signerList2Signers1, +]; + +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", +}; + +const signerList1CustomFields = [ + signerList1CustomFields1, +]; + +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td", +}; + +const signerList1Signers = [ + signerList1Signers1, +]; + +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, +}; + +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, +}; + +const signerList = [ + signerList1, + signerList2, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const signatureRequestBulkCreateEmbeddedWithTemplateRequest: models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { + clientId: "1a659d9ad95bccd307ecad78d72192f8", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs, +}; + +apiCaller.signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestBulkSendWithTemplate.js b/examples/SignatureRequestBulkSendWithTemplate.js deleted file mode 100644 index 088d2e1..0000000 --- a/examples/SignatureRequestBulkSendWithTemplate.js +++ /dev/null @@ -1,65 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields = { - name: "company", - value: "ABC Corp", -}; - -const signerList1 = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; - -const signerList2Signer = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", -}; - -const signerList2CustomFields = { - name: "company", - value: "123 LLC", -}; - -const signerList2 = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestBulkSendWithTemplate.ts b/examples/SignatureRequestBulkSendWithTemplate.ts deleted file mode 100644 index b2eb7a9..0000000 --- a/examples/SignatureRequestBulkSendWithTemplate.ts +++ /dev/null @@ -1,65 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "ABC Corp", -}; - -const signerList1: DropboxSign.SubBulkSignerList = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; - -const signerList2Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", -}; - -const signerList2CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "123 LLC", -}; - -const signerList2: DropboxSign.SubBulkSignerList = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data: DropboxSign.SignatureRequestBulkSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestBulkSendWithTemplateExample.ts b/examples/SignatureRequestBulkSendWithTemplateExample.ts new file mode 100644 index 0000000..a8c7d7b --- /dev/null +++ b/examples/SignatureRequestBulkSendWithTemplateExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "123 LLC", +}; + +const signerList2CustomFields = [ + signerList2CustomFields1, +]; + +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b", +}; + +const signerList2Signers = [ + signerList2Signers1, +]; + +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", +}; + +const signerList1CustomFields = [ + signerList1CustomFields1, +]; + +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td", +}; + +const signerList1Signers = [ + signerList1Signers1, +]; + +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, +}; + +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, +}; + +const signerList = [ + signerList1, + signerList2, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const signatureRequestBulkSendWithTemplateRequest: models.SignatureRequestBulkSendWithTemplateRequest = { + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs, +}; + +apiCaller.signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestCancel.js b/examples/SignatureRequestCancel.js deleted file mode 100644 index ba378c4..0000000 --- a/examples/SignatureRequestCancel.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestCancel(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCancel.ts b/examples/SignatureRequestCancel.ts deleted file mode 100644 index ba378c4..0000000 --- a/examples/SignatureRequestCancel.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestCancel(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCancelExample.ts b/examples/SignatureRequestCancelExample.ts new file mode 100644 index 0000000..d6207b3 --- /dev/null +++ b/examples/SignatureRequestCancelExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCancel:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestCreateEmbedded.js b/examples/SignatureRequestCreateEmbedded.js deleted file mode 100644 index 14dca9a..0000000 --- a/examples/SignatureRequestCreateEmbedded.js +++ /dev/null @@ -1,53 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: "draw", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCreateEmbedded.ts b/examples/SignatureRequestCreateEmbedded.ts deleted file mode 100644 index cad1685..0000000 --- a/examples/SignatureRequestCreateEmbedded.ts +++ /dev/null @@ -1,53 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestCreateEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCreateEmbeddedExample.ts b/examples/SignatureRequestCreateEmbeddedExample.ts new file mode 100644 index 0000000..a2c620a --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedExample.ts @@ -0,0 +1,58 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.ts b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.ts new file mode 100644 index 0000000..a79b117 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.ts @@ -0,0 +1,88 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.js b/examples/SignatureRequestCreateEmbeddedWithTemplate.js deleted file mode 100644 index 12ba7fc..0000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.js +++ /dev/null @@ -1,41 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.ts b/examples/SignatureRequestCreateEmbeddedWithTemplate.ts deleted file mode 100644 index 993efd8..0000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.ts +++ /dev/null @@ -1,41 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestCreateEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 0000000..a2ee15e --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,46 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const signatureRequestCreateEmbeddedWithTemplateRequest: models.SignatureRequestCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEdit.js b/examples/SignatureRequestEdit.js deleted file mode 100644 index 797ffc5..0000000 --- a/examples/SignatureRequestEdit.js +++ /dev/null @@ -1,84 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.SignatureRequestEditRequest = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEdit(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEdit.ts b/examples/SignatureRequestEdit.ts deleted file mode 100644 index 634c0ba..0000000 --- a/examples/SignatureRequestEdit.ts +++ /dev/null @@ -1,85 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.SignatureRequestEditRequest = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - -const result = signatureRequestApi.signatureRequestEdit(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbedded.js b/examples/SignatureRequestEditEmbedded.js deleted file mode 100644 index c3b4ae0..0000000 --- a/examples/SignatureRequestEditEmbedded.js +++ /dev/null @@ -1,58 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: "draw", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditEmbedded( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbedded.ts b/examples/SignatureRequestEditEmbedded.ts deleted file mode 100644 index 49c15b5..0000000 --- a/examples/SignatureRequestEditEmbedded.ts +++ /dev/null @@ -1,58 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestEditEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditEmbedded( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbeddedExample.ts b/examples/SignatureRequestEditEmbeddedExample.ts new file mode 100644 index 0000000..f0f7580 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedExample.ts @@ -0,0 +1,59 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditEmbeddedRequest: models.SignatureRequestEditEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditEmbeddedGroupedSignersExample.ts b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.ts new file mode 100644 index 0000000..3d828db --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.ts @@ -0,0 +1,89 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestEditEmbeddedRequest: models.SignatureRequestEditEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.js b/examples/SignatureRequestEditEmbeddedWithTemplate.js deleted file mode 100644 index b4207e8..0000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.js +++ /dev/null @@ -1,46 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditEmbeddedWithTemplate( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.ts b/examples/SignatureRequestEditEmbeddedWithTemplate.ts deleted file mode 100644 index cfe6cdc..0000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.ts +++ /dev/null @@ -1,46 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestEditEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditEmbeddedWithTemplate( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbeddedWithTemplateExample.ts b/examples/SignatureRequestEditEmbeddedWithTemplateExample.ts new file mode 100644 index 0000000..0deff76 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplateExample.ts @@ -0,0 +1,47 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const signatureRequestEditEmbeddedWithTemplateRequest: models.SignatureRequestEditEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditExample.ts b/examples/SignatureRequestEditExample.ts new file mode 100644 index 0000000..86e3fd1 --- /dev/null +++ b/examples/SignatureRequestEditExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditRequest: models.SignatureRequestEditRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEdit:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditGroupedSignersExample.ts b/examples/SignatureRequestEditGroupedSignersExample.ts new file mode 100644 index 0000000..7b300f7 --- /dev/null +++ b/examples/SignatureRequestEditGroupedSignersExample.ts @@ -0,0 +1,97 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestEditRequest: models.SignatureRequestEditRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEdit:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditWithTemplate.js b/examples/SignatureRequestEditWithTemplate.js deleted file mode 100644 index 3bc93e2..0000000 --- a/examples/SignatureRequestEditWithTemplate.js +++ /dev/null @@ -1,59 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const customField1 = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditWithTemplate( - signatureRequestId, - data, -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditWithTemplate.ts b/examples/SignatureRequestEditWithTemplate.ts deleted file mode 100644 index d187204..0000000 --- a/examples/SignatureRequestEditWithTemplate.ts +++ /dev/null @@ -1,59 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const customField1: DropboxSign.SubCustomField = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditWithTemplate( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditWithTemplateExample.ts b/examples/SignatureRequestEditWithTemplateExample.ts new file mode 100644 index 0000000..f8e8cd0 --- /dev/null +++ b/examples/SignatureRequestEditWithTemplateExample.ts @@ -0,0 +1,68 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const customFields1: models.SubCustomField = { + name: "Cost", + editor: "Client", + required: true, + value: "$20,000", +}; + +const customFields = [ + customFields1, +]; + +const signatureRequestEditWithTemplateRequest: models.SignatureRequestEditWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, +}; + +apiCaller.signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestFiles.js b/examples/SignatureRequestFiles.js deleted file mode 100644 index 309fea4..0000000 --- a/examples/SignatureRequestFiles.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -const fileType = "pdf"; - -const result = signatureRequestApi.signatureRequestFiles(signatureRequestId, fileType); - -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFiles.ts b/examples/SignatureRequestFiles.ts deleted file mode 100644 index 309fea4..0000000 --- a/examples/SignatureRequestFiles.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -const fileType = "pdf"; - -const result = signatureRequestApi.signatureRequestFiles(signatureRequestId, fileType); - -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsDataUri.js b/examples/SignatureRequestFilesAsDataUri.js deleted file mode 100644 index 6836ecc..0000000 --- a/examples/SignatureRequestFilesAsDataUri.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsDataUri.ts b/examples/SignatureRequestFilesAsDataUri.ts deleted file mode 100644 index 6836ecc..0000000 --- a/examples/SignatureRequestFilesAsDataUri.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsDataUriExample.ts b/examples/SignatureRequestFilesAsDataUriExample.ts new file mode 100644 index 0000000..58630ae --- /dev/null +++ b/examples/SignatureRequestFilesAsDataUriExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestFilesAsFileUrl.js b/examples/SignatureRequestFilesAsFileUrl.js deleted file mode 100644 index bb86660..0000000 --- a/examples/SignatureRequestFilesAsFileUrl.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsFileUrl.ts b/examples/SignatureRequestFilesAsFileUrl.ts deleted file mode 100644 index bb86660..0000000 --- a/examples/SignatureRequestFilesAsFileUrl.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsFileUrlExample.ts b/examples/SignatureRequestFilesAsFileUrlExample.ts new file mode 100644 index 0000000..5ca65d9 --- /dev/null +++ b/examples/SignatureRequestFilesAsFileUrlExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1, // forceDownload +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestFilesExample.ts b/examples/SignatureRequestFilesExample.ts new file mode 100644 index 0000000..8876290 --- /dev/null +++ b/examples/SignatureRequestFilesExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf", // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFiles:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestGet.js b/examples/SignatureRequestGet.js deleted file mode 100644 index 894f53b..0000000 --- a/examples/SignatureRequestGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestGet(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestGet.ts b/examples/SignatureRequestGet.ts deleted file mode 100644 index 894f53b..0000000 --- a/examples/SignatureRequestGet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestGet(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestGetExample.ts b/examples/SignatureRequestGetExample.ts new file mode 100644 index 0000000..05ea209 --- /dev/null +++ b/examples/SignatureRequestGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestGet:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestList.js b/examples/SignatureRequestList.js deleted file mode 100644 index a25f344..0000000 --- a/examples/SignatureRequestList.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = null; -const page = 1; - -const result = signatureRequestApi.signatureRequestList(accountId, page); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestList.ts b/examples/SignatureRequestList.ts deleted file mode 100644 index a25f344..0000000 --- a/examples/SignatureRequestList.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = null; -const page = 1; - -const result = signatureRequestApi.signatureRequestList(accountId, page); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestListExample.ts b/examples/SignatureRequestListExample.ts new file mode 100644 index 0000000..20d63ed --- /dev/null +++ b/examples/SignatureRequestListExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestList:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestReleaseHold.js b/examples/SignatureRequestReleaseHold.js deleted file mode 100644 index be47079..0000000 --- a/examples/SignatureRequestReleaseHold.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestReleaseHold.ts b/examples/SignatureRequestReleaseHold.ts deleted file mode 100644 index be47079..0000000 --- a/examples/SignatureRequestReleaseHold.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestReleaseHoldExample.ts b/examples/SignatureRequestReleaseHoldExample.ts new file mode 100644 index 0000000..3dca1e1 --- /dev/null +++ b/examples/SignatureRequestReleaseHoldExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestReleaseHold:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestRemind.js b/examples/SignatureRequestRemind.js deleted file mode 100644 index 3e582ed..0000000 --- a/examples/SignatureRequestRemind.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "john@example.com", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestRemind.ts b/examples/SignatureRequestRemind.ts deleted file mode 100644 index cfe7cef..0000000 --- a/examples/SignatureRequestRemind.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.SignatureRequestRemindRequest = { - emailAddress: "john@example.com", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestRemindExample.ts b/examples/SignatureRequestRemindExample.ts new file mode 100644 index 0000000..4801d70 --- /dev/null +++ b/examples/SignatureRequestRemindExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signatureRequestRemindRequest: models.SignatureRequestRemindRequest = { + emailAddress: "john@example.com", +}; + +apiCaller.signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestRemind:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestRemove.js b/examples/SignatureRequestRemove.js deleted file mode 100644 index 189a445..0000000 --- a/examples/SignatureRequestRemove.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemove(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestRemove.ts b/examples/SignatureRequestRemove.ts deleted file mode 100644 index 189a445..0000000 --- a/examples/SignatureRequestRemove.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemove(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestRemoveExample.ts b/examples/SignatureRequestRemoveExample.ts new file mode 100644 index 0000000..7f76eb5 --- /dev/null +++ b/examples/SignatureRequestRemoveExample.ts @@ -0,0 +1,13 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestRemove:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestSend.js b/examples/SignatureRequestSend.js deleted file mode 100644 index 1735a30..0000000 --- a/examples/SignatureRequestSend.js +++ /dev/null @@ -1,82 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestSend.ts b/examples/SignatureRequestSend.ts deleted file mode 100644 index ca321ca..0000000 --- a/examples/SignatureRequestSend.ts +++ /dev/null @@ -1,82 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.SignatureRequestSendRequest = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestSendExample.ts b/examples/SignatureRequestSendExample.ts new file mode 100644 index 0000000..910a667 --- /dev/null +++ b/examples/SignatureRequestSendExample.ts @@ -0,0 +1,66 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestSendRequest: models.SignatureRequestSendRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestSend( + signatureRequestSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestSendGroupedSignersExample.ts b/examples/SignatureRequestSendGroupedSignersExample.ts new file mode 100644 index 0000000..1105672 --- /dev/null +++ b/examples/SignatureRequestSendGroupedSignersExample.ts @@ -0,0 +1,96 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestSendRequest: models.SignatureRequestSendRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestSend( + signatureRequestSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestSendWithTemplate.js b/examples/SignatureRequestSendWithTemplate.js deleted file mode 100644 index cbbb998..0000000 --- a/examples/SignatureRequestSendWithTemplate.js +++ /dev/null @@ -1,54 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const customField1 = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestSendWithTemplate.ts b/examples/SignatureRequestSendWithTemplate.ts deleted file mode 100644 index 2f21350..0000000 --- a/examples/SignatureRequestSendWithTemplate.ts +++ /dev/null @@ -1,54 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const customField1: DropboxSign.SubCustomField = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestSendWithTemplateExample.ts b/examples/SignatureRequestSendWithTemplateExample.ts new file mode 100644 index 0000000..8821910 --- /dev/null +++ b/examples/SignatureRequestSendWithTemplateExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const customFields1: models.SubCustomField = { + name: "Cost", + editor: "Client", + required: true, + value: "$20,000", +}; + +const customFields = [ + customFields1, +]; + +const signatureRequestSendWithTemplateRequest: models.SignatureRequestSendWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, +}; + +apiCaller.signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestUpdate.js b/examples/SignatureRequestUpdate.js deleted file mode 100644 index 87372e7..0000000 --- a/examples/SignatureRequestUpdate.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestUpdate.ts b/examples/SignatureRequestUpdate.ts deleted file mode 100644 index 61a7c74..0000000 --- a/examples/SignatureRequestUpdate.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.SignatureRequestUpdateRequest = { - emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestUpdateExample.ts b/examples/SignatureRequestUpdateExample.ts new file mode 100644 index 0000000..8464618 --- /dev/null +++ b/examples/SignatureRequestUpdateExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signatureRequestUpdateRequest: models.SignatureRequestUpdateRequest = { + signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", + emailAddress: "john@example.com", +}; + +apiCaller.signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestUpdate:"); + console.log(error.body); +}); diff --git a/examples/TeamAddMember.js b/examples/TeamAddMember.js deleted file mode 100644 index eaa69ad..0000000 --- a/examples/TeamAddMember.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "george@example.com", -}; - -const result = teamApi.teamAddMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamAddMember.ts b/examples/TeamAddMember.ts deleted file mode 100644 index 8e84f24..0000000 --- a/examples/TeamAddMember.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamAddMemberRequest = { - emailAddress: "george@example.com", -}; - -const result = teamApi.teamAddMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamAddMemberAccountIdExample.ts b/examples/TeamAddMemberAccountIdExample.ts new file mode 100644 index 0000000..1f2190b --- /dev/null +++ b/examples/TeamAddMemberAccountIdExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamAddMemberRequest: models.TeamAddMemberRequest = { + accountId: "f57db65d3f933b5316d398057a36176831451a35", +}; + +apiCaller.teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamAddMember:"); + console.log(error.body); +}); diff --git a/examples/TeamAddMemberExample.ts b/examples/TeamAddMemberExample.ts new file mode 100644 index 0000000..b781f29 --- /dev/null +++ b/examples/TeamAddMemberExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamAddMemberRequest: models.TeamAddMemberRequest = { + emailAddress: "george@example.com", +}; + +apiCaller.teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamAddMember:"); + console.log(error.body); +}); diff --git a/examples/TeamCreate.js b/examples/TeamCreate.js deleted file mode 100644 index e8cb548..0000000 --- a/examples/TeamCreate.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - name: "New Team Name" -}; - -const result = teamApi.teamCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamCreate.ts b/examples/TeamCreate.ts deleted file mode 100644 index 8ef337f..0000000 --- a/examples/TeamCreate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamCreateRequest = { - name: "New Team Name" -}; - -const result = teamApi.teamCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamCreateExample.ts b/examples/TeamCreateExample.ts new file mode 100644 index 0000000..03431e0 --- /dev/null +++ b/examples/TeamCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamCreateRequest: models.TeamCreateRequest = { + name: "New Team Name", +}; + +apiCaller.teamCreate( + teamCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamCreate:"); + console.log(error.body); +}); diff --git a/examples/TeamDelete.js b/examples/TeamDelete.js deleted file mode 100644 index b211e14..0000000 --- a/examples/TeamDelete.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamDelete(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamDelete.ts b/examples/TeamDelete.ts deleted file mode 100644 index b211e14..0000000 --- a/examples/TeamDelete.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamDelete(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamDeleteExample.ts b/examples/TeamDeleteExample.ts new file mode 100644 index 0000000..c37216b --- /dev/null +++ b/examples/TeamDeleteExample.ts @@ -0,0 +1,12 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamDelete().catch(error => { + console.log("Exception when calling TeamApi#teamDelete:"); + console.log(error.body); +}); diff --git a/examples/TeamGet.js b/examples/TeamGet.js deleted file mode 100644 index dd1fc78..0000000 --- a/examples/TeamGet.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamGet(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamGet.ts b/examples/TeamGet.ts deleted file mode 100644 index dd1fc78..0000000 --- a/examples/TeamGet.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamGet(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamGetExample.ts b/examples/TeamGetExample.ts new file mode 100644 index 0000000..65d8758 --- /dev/null +++ b/examples/TeamGetExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamGet().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamGet:"); + console.log(error.body); +}); diff --git a/examples/TeamInfo.js b/examples/TeamInfo.js deleted file mode 100644 index 0e03b0f..0000000 --- a/examples/TeamInfo.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamInfo(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamInfo.ts b/examples/TeamInfo.ts deleted file mode 100644 index 0e03b0f..0000000 --- a/examples/TeamInfo.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamInfo(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamInfoExample.ts b/examples/TeamInfoExample.ts new file mode 100644 index 0000000..d0050e9 --- /dev/null +++ b/examples/TeamInfoExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamInfo:"); + console.log(error.body); +}); diff --git a/examples/TeamInvites.js b/examples/TeamInvites.js deleted file mode 100644 index 21a2501..0000000 --- a/examples/TeamInvites.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const emailAddress = "user@dropboxsign.com"; - -const result = teamApi.teamInvites(emailAddress); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamInvites.ts b/examples/TeamInvites.ts deleted file mode 100644 index 21a2501..0000000 --- a/examples/TeamInvites.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const emailAddress = "user@dropboxsign.com"; - -const result = teamApi.teamInvites(emailAddress); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamInvitesExample.ts b/examples/TeamInvitesExample.ts new file mode 100644 index 0000000..7debb48 --- /dev/null +++ b/examples/TeamInvitesExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamInvites().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamInvites:"); + console.log(error.body); +}); diff --git a/examples/TeamMembers.js b/examples/TeamMembers.js deleted file mode 100644 index eee5075..0000000 --- a/examples/TeamMembers.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamMembers(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamMembers.ts b/examples/TeamMembers.ts deleted file mode 100644 index eee5075..0000000 --- a/examples/TeamMembers.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamMembers(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamMembersExample.ts b/examples/TeamMembersExample.ts new file mode 100644 index 0000000..17479db --- /dev/null +++ b/examples/TeamMembersExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamMembers:"); + console.log(error.body); +}); diff --git a/examples/TeamRemoveMember.js b/examples/TeamRemoveMember.js deleted file mode 100644 index 291e6fa..0000000 --- a/examples/TeamRemoveMember.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com", -}; - -const result = teamApi.teamRemoveMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamRemoveMember.ts b/examples/TeamRemoveMember.ts deleted file mode 100644 index b7ba4be..0000000 --- a/examples/TeamRemoveMember.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamRemoveMemberRequest = { - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com", -}; - -const result = teamApi.teamRemoveMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamRemoveMemberAccountIdExample.ts b/examples/TeamRemoveMemberAccountIdExample.ts new file mode 100644 index 0000000..cf5e42a --- /dev/null +++ b/examples/TeamRemoveMemberAccountIdExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { + accountId: "f57db65d3f933b5316d398057a36176831451a35", +}; + +apiCaller.teamRemoveMember( + teamRemoveMemberRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamRemoveMember:"); + console.log(error.body); +}); diff --git a/examples/TeamRemoveMemberExample.ts b/examples/TeamRemoveMemberExample.ts new file mode 100644 index 0000000..3f12efc --- /dev/null +++ b/examples/TeamRemoveMemberExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { + emailAddress: "teammate@dropboxsign.com", + newOwnerEmailAddress: "new_teammate@dropboxsign.com", +}; + +apiCaller.teamRemoveMember( + teamRemoveMemberRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamRemoveMember:"); + console.log(error.body); +}); diff --git a/examples/TeamSubTeams.js b/examples/TeamSubTeams.js deleted file mode 100644 index faf7a9e..0000000 --- a/examples/TeamSubTeams.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamSubTeams(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamSubTeams.ts b/examples/TeamSubTeams.ts deleted file mode 100644 index faf7a9e..0000000 --- a/examples/TeamSubTeams.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamSubTeams(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamSubTeamsExample.ts b/examples/TeamSubTeamsExample.ts new file mode 100644 index 0000000..e6ef9c8 --- /dev/null +++ b/examples/TeamSubTeamsExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSubTeams:"); + console.log(error.body); +}); diff --git a/examples/TeamUpdate.js b/examples/TeamUpdate.js deleted file mode 100644 index 842457d..0000000 --- a/examples/TeamUpdate.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - name: "New Team Name", -}; - -const result = teamApi.teamUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamUpdate.ts b/examples/TeamUpdate.ts deleted file mode 100644 index 73eac24..0000000 --- a/examples/TeamUpdate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamUpdateRequest = { - name: "New Team Name", -}; - -const result = teamApi.teamUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamUpdateExample.ts b/examples/TeamUpdateExample.ts new file mode 100644 index 0000000..748a4ad --- /dev/null +++ b/examples/TeamUpdateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamUpdateRequest: models.TeamUpdateRequest = { + name: "New Team Name", +}; + +apiCaller.teamUpdate( + teamUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamUpdate:"); + console.log(error.body); +}); diff --git a/examples/TemplateAddUser.js b/examples/TemplateAddUser.js deleted file mode 100644 index 1b53fa3..0000000 --- a/examples/TemplateAddUser.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateAddUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateAddUser.ts b/examples/TemplateAddUser.ts deleted file mode 100644 index 6919a08..0000000 --- a/examples/TemplateAddUser.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateAddUserRequest = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateAddUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateAddUserExample.ts b/examples/TemplateAddUserExample.ts new file mode 100644 index 0000000..b8bf1a5 --- /dev/null +++ b/examples/TemplateAddUserExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateAddUserRequest: models.TemplateAddUserRequest = { + emailAddress: "george@dropboxsign.com", +}; + +apiCaller.templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateAddUser:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreate.js b/examples/TemplateCreate.js deleted file mode 100644 index f71d247..0000000 --- a/examples/TemplateCreate.js +++ /dev/null @@ -1,61 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1 = { - name: "Client", - order: 0, -}; - -const role2 = { - name: "Witness", - order: 1, -}; - -const mergeField1 = { - name: "Full Name", - type: "text", -}; - -const mergeField2 = { - name: "Is Registered?", - type: "checkbox", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -const data = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, -}; - -const result = templateApi.templateCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateCreate.ts b/examples/TemplateCreate.ts deleted file mode 100644 index 2bcd368..0000000 --- a/examples/TemplateCreate.ts +++ /dev/null @@ -1,61 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1: DropboxSign.SubTemplateRole = { - name: "Client", - order: 0, -}; - -const role2: DropboxSign.SubTemplateRole = { - name: "Witness", - order: 1, -}; - -const mergeField1: DropboxSign.SubMergeField = { - name: "Full Name", - type: DropboxSign.SubMergeField.TypeEnum.Text, -}; - -const mergeField2: DropboxSign.SubMergeField = { - name: "Is Registered?", - type: DropboxSign.SubMergeField.TypeEnum.Checkbox, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.TemplateCreateRequest = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, -}; - -const result = templateApi.templateCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateCreateEmbeddedDraft.js b/examples/TemplateCreateEmbeddedDraft.js deleted file mode 100644 index 1d8ba87..0000000 --- a/examples/TemplateCreateEmbeddedDraft.js +++ /dev/null @@ -1,61 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1 = { - name: "Client", - order: 0, -}; - -const role2 = { - name: "Witness", - order: 1, -}; - -const mergeField1 = { - name: "Full Name", - type: "text", -}; - -const mergeField2 = { - name: "Is Registered?", - type: "checkbox", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -const data = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, -}; - -const result = templateApi.templateCreateEmbeddedDraft(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateCreateEmbeddedDraft.ts b/examples/TemplateCreateEmbeddedDraft.ts deleted file mode 100644 index 960e8a6..0000000 --- a/examples/TemplateCreateEmbeddedDraft.ts +++ /dev/null @@ -1,61 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1: DropboxSign.SubTemplateRole = { - name: "Client", - order: 0, -}; - -const role2: DropboxSign.SubTemplateRole = { - name: "Witness", - order: 1, -}; - -const mergeField1: DropboxSign.SubMergeField = { - name: "Full Name", - type: DropboxSign.SubMergeField.TypeEnum.Text, -}; - -const mergeField2: DropboxSign.SubMergeField = { - name: "Is Registered?", - type: DropboxSign.SubMergeField.TypeEnum.Checkbox, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.TemplateCreateEmbeddedDraftRequest = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, -}; - -const result = templateApi.templateCreateEmbeddedDraft(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateCreateEmbeddedDraftExample.ts b/examples/TemplateCreateEmbeddedDraftExample.ts new file mode 100644 index 0000000..300b1f6 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + fieldOptions: fieldOptions, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts new file mode 100644 index 0000000..0f21c22 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts @@ -0,0 +1,116 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts new file mode 100644 index 0000000..d403636 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts @@ -0,0 +1,134 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts new file mode 100644 index 0000000..e785918 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateExample.ts b/examples/TemplateCreateExample.ts new file mode 100644 index 0000000..6046df4 --- /dev/null +++ b/examples/TemplateCreateExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateFormFieldGroupsExample.ts b/examples/TemplateCreateFormFieldGroupsExample.ts new file mode 100644 index 0000000..845ddaa --- /dev/null +++ b/examples/TemplateCreateFormFieldGroupsExample.ts @@ -0,0 +1,116 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldGroups: formFieldGroups, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateFormFieldRulesExample.ts b/examples/TemplateCreateFormFieldRulesExample.ts new file mode 100644 index 0000000..c7ad422 --- /dev/null +++ b/examples/TemplateCreateFormFieldRulesExample.ts @@ -0,0 +1,134 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldRules: formFieldRules, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateFormFieldsPerDocumentExample.ts b/examples/TemplateCreateFormFieldsPerDocumentExample.ts new file mode 100644 index 0000000..59890f4 --- /dev/null +++ b/examples/TemplateCreateFormFieldsPerDocumentExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/examples/TemplateDelete.js b/examples/TemplateDelete.js deleted file mode 100644 index a82580f..0000000 --- a/examples/TemplateDelete.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateDelete(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateDelete.ts b/examples/TemplateDelete.ts deleted file mode 100644 index a82580f..0000000 --- a/examples/TemplateDelete.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateDelete(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateDeleteExample.ts b/examples/TemplateDeleteExample.ts new file mode 100644 index 0000000..3f0aae4 --- /dev/null +++ b/examples/TemplateDeleteExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateDelete( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).catch(error => { + console.log("Exception when calling TemplateApi#templateDelete:"); + console.log(error.body); +}); diff --git a/examples/TemplateFiles.js b/examples/TemplateFiles.js deleted file mode 100644 index 00217b4..0000000 --- a/examples/TemplateFiles.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; -const fileType = "pdf"; - -const result = templateApi.templateFiles(templateId, fileType); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFiles.ts b/examples/TemplateFiles.ts deleted file mode 100644 index 00217b4..0000000 --- a/examples/TemplateFiles.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; -const fileType = "pdf"; - -const result = templateApi.templateFiles(templateId, fileType); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsDataUri.js b/examples/TemplateFilesAsDataUri.js deleted file mode 100644 index 8e0f536..0000000 --- a/examples/TemplateFilesAsDataUri.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsDataUri(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsDataUri.ts b/examples/TemplateFilesAsDataUri.ts deleted file mode 100644 index 8e0f536..0000000 --- a/examples/TemplateFilesAsDataUri.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsDataUri(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsDataUriExample.ts b/examples/TemplateFilesAsDataUriExample.ts new file mode 100644 index 0000000..40a8e2a --- /dev/null +++ b/examples/TemplateFilesAsDataUriExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFilesAsDataUri:"); + console.log(error.body); +}); diff --git a/examples/TemplateFilesAsFileUrl.js b/examples/TemplateFilesAsFileUrl.js deleted file mode 100644 index 3053927..0000000 --- a/examples/TemplateFilesAsFileUrl.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsFileUrl(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsFileUrl.ts b/examples/TemplateFilesAsFileUrl.ts deleted file mode 100644 index 3053927..0000000 --- a/examples/TemplateFilesAsFileUrl.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsFileUrl(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsFileUrlExample.ts b/examples/TemplateFilesAsFileUrlExample.ts new file mode 100644 index 0000000..e80f1ad --- /dev/null +++ b/examples/TemplateFilesAsFileUrlExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1, // forceDownload +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFilesAsFileUrl:"); + console.log(error.body); +}); diff --git a/examples/TemplateFilesExample.ts b/examples/TemplateFilesExample.ts new file mode 100644 index 0000000..923f16d --- /dev/null +++ b/examples/TemplateFilesExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + undefined, // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFiles:"); + console.log(error.body); +}); diff --git a/examples/TemplateGet.js b/examples/TemplateGet.js deleted file mode 100644 index 365fe69..0000000 --- a/examples/TemplateGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateGet(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateGet.ts b/examples/TemplateGet.ts deleted file mode 100644 index 365fe69..0000000 --- a/examples/TemplateGet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateGet(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateGetExample.ts b/examples/TemplateGetExample.ts new file mode 100644 index 0000000..b4fcdda --- /dev/null +++ b/examples/TemplateGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateGet( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateGet:"); + console.log(error.body); +}); diff --git a/examples/TemplateList.js b/examples/TemplateList.js deleted file mode 100644 index be9197a..0000000 --- a/examples/TemplateList.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateList(accountId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateList.ts b/examples/TemplateList.ts deleted file mode 100644 index be9197a..0000000 --- a/examples/TemplateList.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateList(accountId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateListExample.ts b/examples/TemplateListExample.ts new file mode 100644 index 0000000..e678a6c --- /dev/null +++ b/examples/TemplateListExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateList:"); + console.log(error.body); +}); diff --git a/examples/TemplateRemoveUser.js b/examples/TemplateRemoveUser.js deleted file mode 100644 index 9683986..0000000 --- a/examples/TemplateRemoveUser.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -const result = templateApi.templateRemoveUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateRemoveUser.ts b/examples/TemplateRemoveUser.ts deleted file mode 100644 index 7bd8239..0000000 --- a/examples/TemplateRemoveUser.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateRemoveUserRequest = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -const result = templateApi.templateRemoveUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateRemoveUserExample.ts b/examples/TemplateRemoveUserExample.ts new file mode 100644 index 0000000..2d40a2f --- /dev/null +++ b/examples/TemplateRemoveUserExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateRemoveUserRequest: models.TemplateRemoveUserRequest = { + emailAddress: "george@dropboxsign.com", +}; + +apiCaller.templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateRemoveUser:"); + console.log(error.body); +}); diff --git a/examples/TemplateUpdateFiles.js b/examples/TemplateUpdateFiles.js deleted file mode 100644 index 81eb26e..0000000 --- a/examples/TemplateUpdateFiles.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - files: [fs.createReadStream("example_signature_request.pdf")], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateUpdateFiles(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateUpdateFiles.ts b/examples/TemplateUpdateFiles.ts deleted file mode 100644 index ce6bee7..0000000 --- a/examples/TemplateUpdateFiles.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import fs from "fs"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateUpdateFilesRequest = { - files: [fs.createReadStream("example_signature_request.pdf")], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateUpdateFiles(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateUpdateFilesExample.ts b/examples/TemplateUpdateFilesExample.ts new file mode 100644 index 0000000..fe21c56 --- /dev/null +++ b/examples/TemplateUpdateFilesExample.ts @@ -0,0 +1,23 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateUpdateFilesRequest: models.TemplateUpdateFilesRequest = { + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], +}; + +apiCaller.templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateUpdateFiles:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreate.js b/examples/UnclaimedDraftCreate.js deleted file mode 100644 index 70d1c2a..0000000 --- a/examples/UnclaimedDraftCreate.js +++ /dev/null @@ -1,64 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -const data = { - subject: "The NDA we talked about", - type: "request_signature", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ - signer1, - signer2, - ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreate.ts b/examples/UnclaimedDraftCreate.ts deleted file mode 100644 index 137fc64..0000000 --- a/examples/UnclaimedDraftCreate.ts +++ /dev/null @@ -1,64 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubUnclaimedDraftSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubUnclaimedDraftSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.UnclaimedDraftCreateRequest = { - subject: "The NDA we talked about", - type: DropboxSign.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ - signer1, - signer2, - ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbedded.js b/examples/UnclaimedDraftCreateEmbedded.js deleted file mode 100644 index 6f0865c..0000000 --- a/examples/UnclaimedDraftCreateEmbedded.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: [fs.createReadStream("example_signature_request.pdf")], - requesterEmailAddress: "jack@dropboxsign.com", - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbedded.ts b/examples/UnclaimedDraftCreateEmbedded.ts deleted file mode 100644 index 5dbdaab..0000000 --- a/examples/UnclaimedDraftCreateEmbedded.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.UnclaimedDraftCreateEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: [fs.createReadStream("example_signature_request.pdf")], - requesterEmailAddress: "jack@dropboxsign.com", - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbeddedExample.ts b/examples/UnclaimedDraftCreateEmbeddedExample.ts new file mode 100644 index 0000000..7b99e7d --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedExample.ts @@ -0,0 +1,25 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts new file mode 100644 index 0000000..f7953d6 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts @@ -0,0 +1,74 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts new file mode 100644 index 0000000..77d2ee9 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts @@ -0,0 +1,92 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts new file mode 100644 index 0000000..dcdee5d --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts @@ -0,0 +1,61 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.js b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.js deleted file mode 100644 index 097712e..0000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.js +++ /dev/null @@ -1,37 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - name: "George", - emailAddress: "george@example.com", -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@dropboxsign.com", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requesterEmailAddress: "jack@dropboxsign.com", - signers: [ signer1 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts deleted file mode 100644 index cc23f74..0000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubUnclaimedDraftTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@dropboxsign.com", -}; - -const data: DropboxSign.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requesterEmailAddress: "jack@dropboxsign.com", - signers: [ signer1 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 0000000..a326c36 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,46 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@dropboxsign.com", +}; + +const ccs = [ + ccs1, +]; + +const signers1: models.SubUnclaimedDraftTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const unclaimedDraftCreateEmbeddedWithTemplateRequest: models.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + testMode: false, + ccs: ccs, + signers: signers, +}; + +apiCaller.unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateExample.ts b/examples/UnclaimedDraftCreateExample.ts new file mode 100644 index 0000000..aa94b5d --- /dev/null +++ b/examples/UnclaimedDraftCreateExample.ts @@ -0,0 +1,35 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signers1: models.SubUnclaimedDraftSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers = [ + signers1, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signers: signers, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateFormFieldGroupsExample.ts b/examples/UnclaimedDraftCreateFormFieldGroupsExample.ts new file mode 100644 index 0000000..f6e079f --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldGroupsExample.ts @@ -0,0 +1,73 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateFormFieldRulesExample.ts b/examples/UnclaimedDraftCreateFormFieldRulesExample.ts new file mode 100644 index 0000000..de99536 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldRulesExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts new file mode 100644 index 0000000..d010996 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts @@ -0,0 +1,60 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftEditAndResend.js b/examples/UnclaimedDraftEditAndResend.js deleted file mode 100644 index 0ff7c36..0000000 --- a/examples/UnclaimedDraftEditAndResend.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - testMode: true, -}; - -const signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -const result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftEditAndResend.ts b/examples/UnclaimedDraftEditAndResend.ts deleted file mode 100644 index 320b0b7..0000000 --- a/examples/UnclaimedDraftEditAndResend.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.UnclaimedDraftEditAndResendRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - testMode: true, -}; - -const signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -const result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftEditAndResendExample.ts b/examples/UnclaimedDraftEditAndResendExample.ts new file mode 100644 index 0000000..04a04f1 --- /dev/null +++ b/examples/UnclaimedDraftEditAndResendExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const unclaimedDraftEditAndResendRequest: models.UnclaimedDraftEditAndResendRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + testMode: false, +}; + +apiCaller.unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend:"); + console.log(error.body); +}); diff --git a/model/faxLineAddUserRequest.ts b/model/faxLineAddUserRequest.ts index 95b75de..5f890f7 100644 --- a/model/faxLineAddUserRequest.ts +++ b/model/faxLineAddUserRequest.ts @@ -26,7 +26,7 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; export class FaxLineAddUserRequest { /** - * The Fax Line number. + * The Fax Line number */ "number": string; /** diff --git a/model/faxLineCreateRequest.ts b/model/faxLineCreateRequest.ts index 3a67d60..764da82 100644 --- a/model/faxLineCreateRequest.ts +++ b/model/faxLineCreateRequest.ts @@ -26,19 +26,19 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; export class FaxLineCreateRequest { /** - * Area code + * Area code of the new Fax Line */ "areaCode": number; /** - * Country + * Country of the area code */ "country": FaxLineCreateRequest.CountryEnum; /** - * City + * City of the area code */ "city"?: string; /** - * Account ID + * Account ID of the account that will be assigned this new Fax Line */ "accountId"?: string; diff --git a/model/faxLineDeleteRequest.ts b/model/faxLineDeleteRequest.ts index 26d8798..1cb2e63 100644 --- a/model/faxLineDeleteRequest.ts +++ b/model/faxLineDeleteRequest.ts @@ -26,7 +26,7 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; export class FaxLineDeleteRequest { /** - * The Fax Line number. + * The Fax Line number */ "number": string; diff --git a/model/faxLineRemoveUserRequest.ts b/model/faxLineRemoveUserRequest.ts index 02f921c..26e8b4e 100644 --- a/model/faxLineRemoveUserRequest.ts +++ b/model/faxLineRemoveUserRequest.ts @@ -26,15 +26,15 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; export class FaxLineRemoveUserRequest { /** - * The Fax Line number. + * The Fax Line number */ "number": string; /** - * Account ID + * Account ID of the user to remove access */ "accountId"?: string; /** - * Email address + * Email address of the user to remove access */ "emailAddress"?: string; diff --git a/model/faxSendRequest.ts b/model/faxSendRequest.ts index 11ee71e..fcd45d6 100644 --- a/model/faxSendRequest.ts +++ b/model/faxSendRequest.ts @@ -26,7 +26,7 @@ import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; export class FaxSendRequest { /** - * Fax Send To Recipient + * Recipient of the fax Can be a phone number in E.164 format or email address */ "recipient": string; /** @@ -34,11 +34,11 @@ export class FaxSendRequest { */ "sender"?: string; /** - * Fax File to Send + * Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. */ "files"?: Array; /** - * Fax File URL to Send + * Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. */ "fileUrls"?: Array; /** @@ -46,11 +46,11 @@ export class FaxSendRequest { */ "testMode"?: boolean = false; /** - * Fax Cover Page for Recipient + * Fax cover page recipient information */ "coverPageTo"?: string; /** - * Fax Cover Page for Sender + * Fax cover page sender information */ "coverPageFrom"?: string; /** diff --git a/model/index.ts b/model/index.ts index 7813c02..1f2ea9c 100644 --- a/model/index.ts +++ b/model/index.ts @@ -75,6 +75,10 @@ import { SignatureRequestBulkCreateEmbeddedWithTemplateRequest } from "./signatu import { SignatureRequestBulkSendWithTemplateRequest } from "./signatureRequestBulkSendWithTemplateRequest"; import { SignatureRequestCreateEmbeddedRequest } from "./signatureRequestCreateEmbeddedRequest"; import { SignatureRequestCreateEmbeddedWithTemplateRequest } from "./signatureRequestCreateEmbeddedWithTemplateRequest"; +import { SignatureRequestEditEmbeddedRequest } from "./signatureRequestEditEmbeddedRequest"; +import { SignatureRequestEditEmbeddedWithTemplateRequest } from "./signatureRequestEditEmbeddedWithTemplateRequest"; +import { SignatureRequestEditRequest } from "./signatureRequestEditRequest"; +import { SignatureRequestEditWithTemplateRequest } from "./signatureRequestEditWithTemplateRequest"; import { SignatureRequestGetResponse } from "./signatureRequestGetResponse"; import { SignatureRequestListResponse } from "./signatureRequestListResponse"; import { SignatureRequestRemindRequest } from "./signatureRequestRemindRequest"; @@ -315,6 +319,12 @@ export let typeMap: { [index: string]: any } = { SignatureRequestCreateEmbeddedRequest: SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest: SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest: SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest: + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest: SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest: + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse: SignatureRequestGetResponse, SignatureRequestListResponse: SignatureRequestListResponse, SignatureRequestRemindRequest: SignatureRequestRemindRequest, @@ -547,6 +557,10 @@ export { SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, diff --git a/model/models.ts b/model/models.ts index 3f6c346..5db0569 100644 --- a/model/models.ts +++ b/model/models.ts @@ -36,6 +36,26 @@ let primitives = [ "any", ]; +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return ( + str.length >= match.length && + str.substring(str.length - match.length) === match + ); +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -83,21 +103,32 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { - // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize(data[key], subType); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); } else { @@ -131,23 +162,34 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { - // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize(data[key], subType); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { diff --git a/model/signatureRequestEditEmbeddedRequest.ts b/model/signatureRequestEditEmbeddedRequest.ts new file mode 100644 index 0000000..78b05c0 --- /dev/null +++ b/model/signatureRequestEditEmbeddedRequest.ts @@ -0,0 +1,264 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; +import { SubAttachment } from "./subAttachment"; +import { SubCustomField } from "./subCustomField"; +import { SubFieldOptions } from "./subFieldOptions"; +import { SubFormFieldGroup } from "./subFormFieldGroup"; +import { SubFormFieldRule } from "./subFormFieldRule"; +import { SubFormFieldsPerDocumentBase } from "./subFormFieldsPerDocumentBase"; +import { SubSignatureRequestGroupedSigners } from "./subSignatureRequestGroupedSigners"; +import { SubSignatureRequestSigner } from "./subSignatureRequestSigner"; +import { SubSigningOptions } from "./subSigningOptions"; + +export class SignatureRequestEditEmbeddedRequest { + /** + * Client id of the app you\'re using to create this embedded signature request. Used for security purposes. + */ + "clientId": string; + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "files"?: Array; + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "fileUrls"?: Array; + /** + * Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + */ + "signers"?: Array; + /** + * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + */ + "groupedSigners"?: Array; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + "allowDecline"?: boolean = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + */ + "allowReassign"?: boolean = false; + /** + * A list describing the attachments + */ + "attachments"?: Array; + /** + * The email addresses that should be CCed. + */ + "ccEmailAddresses"?: Array; + /** + * When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + */ + "customFields"?: Array; + "fieldOptions"?: SubFieldOptions; + /** + * Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + */ + "formFieldGroups"?: Array; + /** + * Conditional Logic rules for fields defined in `form_fields_per_document`. + */ + "formFieldRules"?: Array; + /** + * The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + */ + "formFieldsPerDocument"?: Array; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ + "hideTextTags"?: boolean = false; + /** + * The custom message in the email that will be sent to the signers. + */ + "message"?: string; + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + */ + "metadata"?: { [key: string]: any }; + "signingOptions"?: SubSigningOptions; + /** + * The subject in the email that will be sent to the signers. + */ + "subject"?: string; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + "testMode"?: boolean = false; + /** + * The title you want to assign to the SignatureRequest. + */ + "title"?: string; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ + "useTextTags"?: boolean = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ + "populateAutoFillFields"?: boolean = false; + /** + * When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + */ + "expiresAt"?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "files", + baseName: "files", + type: "Array", + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array", + }, + { + name: "signers", + baseName: "signers", + type: "Array", + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array", + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean", + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean", + }, + { + name: "attachments", + baseName: "attachments", + type: "Array", + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array", + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array", + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions", + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array", + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array", + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array", + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean", + }, + { + name: "message", + baseName: "message", + type: "string", + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions", + }, + { + name: "subject", + baseName: "subject", + type: "string", + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean", + }, + { + name: "title", + baseName: "title", + type: "string", + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean", + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean", + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SignatureRequestEditEmbeddedRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SignatureRequestEditEmbeddedRequest { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditEmbeddedRequest" + ); + } +} diff --git a/model/signatureRequestEditEmbeddedWithTemplateRequest.ts b/model/signatureRequestEditEmbeddedWithTemplateRequest.ts new file mode 100644 index 0000000..c007c76 --- /dev/null +++ b/model/signatureRequestEditEmbeddedWithTemplateRequest.ts @@ -0,0 +1,181 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; +import { SubCC } from "./subCC"; +import { SubCustomField } from "./subCustomField"; +import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplateSigner"; +import { SubSigningOptions } from "./subSigningOptions"; + +export class SignatureRequestEditEmbeddedWithTemplateRequest { + /** + * Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + */ + "templateIds": Array; + /** + * Client id of the app you\'re using to create this embedded signature request. Used for security purposes. + */ + "clientId": string; + /** + * Add Signers to your Templated-based Signature Request. + */ + "signers": Array; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + "allowDecline"?: boolean = false; + /** + * Add CC email recipients. Required when a CC role exists for the Template. + */ + "ccs"?: Array; + /** + * An array defining values and options for custom fields. Required when a custom field exists in the Template. + */ + "customFields"?: Array; + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "files"?: Array; + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "fileUrls"?: Array; + /** + * The custom message in the email that will be sent to the signers. + */ + "message"?: string; + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + */ + "metadata"?: { [key: string]: any }; + "signingOptions"?: SubSigningOptions; + /** + * The subject in the email that will be sent to the signers. + */ + "subject"?: string; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + "testMode"?: boolean = false; + /** + * The title you want to assign to the SignatureRequest. + */ + "title"?: string; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ + "populateAutoFillFields"?: boolean = false; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array", + }, + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "signers", + baseName: "signers", + type: "Array", + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean", + }, + { + name: "ccs", + baseName: "ccs", + type: "Array", + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array", + }, + { + name: "files", + baseName: "files", + type: "Array", + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array", + }, + { + name: "message", + baseName: "message", + type: "string", + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions", + }, + { + name: "subject", + baseName: "subject", + type: "string", + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean", + }, + { + name: "title", + baseName: "title", + type: "string", + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SignatureRequestEditEmbeddedWithTemplateRequest { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + } +} diff --git a/model/signatureRequestEditRequest.ts b/model/signatureRequestEditRequest.ts new file mode 100644 index 0000000..432e8fe --- /dev/null +++ b/model/signatureRequestEditRequest.ts @@ -0,0 +1,270 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; +import { SubAttachment } from "./subAttachment"; +import { SubCustomField } from "./subCustomField"; +import { SubFieldOptions } from "./subFieldOptions"; +import { SubFormFieldGroup } from "./subFormFieldGroup"; +import { SubFormFieldRule } from "./subFormFieldRule"; +import { SubFormFieldsPerDocumentBase } from "./subFormFieldsPerDocumentBase"; +import { SubSignatureRequestGroupedSigners } from "./subSignatureRequestGroupedSigners"; +import { SubSignatureRequestSigner } from "./subSignatureRequestSigner"; +import { SubSigningOptions } from "./subSigningOptions"; + +export class SignatureRequestEditRequest { + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "files"?: Array; + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "fileUrls"?: Array; + /** + * Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + */ + "signers"?: Array; + /** + * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + */ + "groupedSigners"?: Array; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + "allowDecline"?: boolean = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ + "allowReassign"?: boolean = false; + /** + * A list describing the attachments + */ + "attachments"?: Array; + /** + * The email addresses that should be CCed. + */ + "ccEmailAddresses"?: Array; + /** + * The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. + */ + "clientId"?: string; + /** + * When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + */ + "customFields"?: Array; + "fieldOptions"?: SubFieldOptions; + /** + * Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + */ + "formFieldGroups"?: Array; + /** + * Conditional Logic rules for fields defined in `form_fields_per_document`. + */ + "formFieldRules"?: Array; + /** + * The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + */ + "formFieldsPerDocument"?: Array; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ + "hideTextTags"?: boolean = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ + "isEid"?: boolean = false; + /** + * The custom message in the email that will be sent to the signers. + */ + "message"?: string; + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + */ + "metadata"?: { [key: string]: any }; + "signingOptions"?: SubSigningOptions; + /** + * The URL you want signers redirected to after they successfully sign. + */ + "signingRedirectUrl"?: string; + /** + * The subject in the email that will be sent to the signers. + */ + "subject"?: string; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + "testMode"?: boolean = false; + /** + * The title you want to assign to the SignatureRequest. + */ + "title"?: string; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ + "useTextTags"?: boolean = false; + /** + * When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + */ + "expiresAt"?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "files", + baseName: "files", + type: "Array", + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array", + }, + { + name: "signers", + baseName: "signers", + type: "Array", + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array", + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean", + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean", + }, + { + name: "attachments", + baseName: "attachments", + type: "Array", + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array", + }, + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array", + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions", + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array", + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array", + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array", + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean", + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean", + }, + { + name: "message", + baseName: "message", + type: "string", + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions", + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string", + }, + { + name: "subject", + baseName: "subject", + type: "string", + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean", + }, + { + name: "title", + baseName: "title", + type: "string", + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean", + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SignatureRequestEditRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SignatureRequestEditRequest { + return ObjectSerializer.deserialize(data, "SignatureRequestEditRequest"); + } +} diff --git a/model/signatureRequestEditWithTemplateRequest.ts b/model/signatureRequestEditWithTemplateRequest.ts new file mode 100644 index 0000000..f35af59 --- /dev/null +++ b/model/signatureRequestEditWithTemplateRequest.ts @@ -0,0 +1,193 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; +import { SubCC } from "./subCC"; +import { SubCustomField } from "./subCustomField"; +import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplateSigner"; +import { SubSigningOptions } from "./subSigningOptions"; + +/** + * + */ +export class SignatureRequestEditWithTemplateRequest { + /** + * Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + */ + "templateIds": Array; + /** + * Add Signers to your Templated-based Signature Request. + */ + "signers": Array; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + "allowDecline"?: boolean = false; + /** + * Add CC email recipients. Required when a CC role exists for the Template. + */ + "ccs"?: Array; + /** + * Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + */ + "clientId"?: string; + /** + * An array defining values and options for custom fields. Required when a custom field exists in the Template. + */ + "customFields"?: Array; + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "files"?: Array; + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "fileUrls"?: Array; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ + "isEid"?: boolean = false; + /** + * The custom message in the email that will be sent to the signers. + */ + "message"?: string; + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + */ + "metadata"?: { [key: string]: any }; + "signingOptions"?: SubSigningOptions; + /** + * The URL you want signers redirected to after they successfully sign. + */ + "signingRedirectUrl"?: string; + /** + * The subject in the email that will be sent to the signers. + */ + "subject"?: string; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + "testMode"?: boolean = false; + /** + * The title you want to assign to the SignatureRequest. + */ + "title"?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array", + }, + { + name: "signers", + baseName: "signers", + type: "Array", + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean", + }, + { + name: "ccs", + baseName: "ccs", + type: "Array", + }, + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array", + }, + { + name: "files", + baseName: "files", + type: "Array", + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array", + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean", + }, + { + name: "message", + baseName: "message", + type: "string", + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions", + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string", + }, + { + name: "subject", + baseName: "subject", + type: "string", + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean", + }, + { + name: "title", + baseName: "title", + type: "string", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SignatureRequestEditWithTemplateRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SignatureRequestEditWithTemplateRequest { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditWithTemplateRequest" + ); + } +} diff --git a/model/signatureRequestSendRequest.ts b/model/signatureRequestSendRequest.ts index 63ec9cc..75720c1 100644 --- a/model/signatureRequestSendRequest.ts +++ b/model/signatureRequestSendRequest.ts @@ -93,6 +93,8 @@ export class SignatureRequestSendRequest { "hideTextTags"?: boolean = false; /** * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated */ "isQualifiedSignature"?: boolean = false; /** diff --git a/model/signatureRequestSendWithTemplateRequest.ts b/model/signatureRequestSendWithTemplateRequest.ts index 2a3dbb8..12232a1 100644 --- a/model/signatureRequestSendWithTemplateRequest.ts +++ b/model/signatureRequestSendWithTemplateRequest.ts @@ -66,6 +66,8 @@ export class SignatureRequestSendWithTemplateRequest { "fileUrls"?: Array; /** * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated */ "isQualifiedSignature"?: boolean = false; /** diff --git a/model/subFormFieldRuleAction.ts b/model/subFormFieldRuleAction.ts index 43ec254..d1fe6f0 100644 --- a/model/subFormFieldRuleAction.ts +++ b/model/subFormFieldRuleAction.ts @@ -76,7 +76,9 @@ export class SubFormFieldRuleAction { export namespace SubFormFieldRuleAction { export enum TypeEnum { + ChangeFieldVisibility = "change-field-visibility", FieldVisibility = "change-field-visibility", + ChangeGroupVisibility = "change-group-visibility", GroupVisibility = "change-group-visibility", } } diff --git a/model/templateCreateEmbeddedDraftResponseTemplate.ts b/model/templateCreateEmbeddedDraftResponseTemplate.ts index af7f9a7..d74b06a 100644 --- a/model/templateCreateEmbeddedDraftResponseTemplate.ts +++ b/model/templateCreateEmbeddedDraftResponseTemplate.ts @@ -43,6 +43,8 @@ export class TemplateCreateEmbeddedDraftResponseTemplate { "expiresAt"?: number; /** * A list of warnings. + * + * @deprecated */ "warnings"?: Array; diff --git a/model/templateResponse.ts b/model/templateResponse.ts index 4c4b992..298db46 100644 --- a/model/templateResponse.ts +++ b/model/templateResponse.ts @@ -85,10 +85,14 @@ export class TemplateResponse { "documents"?: Array; /** * Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. + * + * @deprecated */ "customFields"?: Array | null; /** * Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. + * + * @deprecated */ "namedFormFields"?: Array | null; /** diff --git a/model/templateUpdateFilesResponseTemplate.ts b/model/templateUpdateFilesResponseTemplate.ts index 98e18da..2d32cb3 100644 --- a/model/templateUpdateFilesResponseTemplate.ts +++ b/model/templateUpdateFilesResponseTemplate.ts @@ -35,6 +35,8 @@ export class TemplateUpdateFilesResponseTemplate { "templateId"?: string; /** * A list of warnings. + * + * @deprecated */ "warnings"?: Array; diff --git a/openapi-config.yaml b/openapi-config.yaml index d28af8b..9741af3 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -2,13 +2,17 @@ generatorName: typescript-node typeMappings: {} additionalProperties: npmName: "@dropbox/sign" - npmVersion: 1.8.0 + npmVersion: 1.9.0 supportsES6: true apiDocPath: ./docs/api modelDocPath: ./docs/model sortModelPropertiesByRequiredFlag: true useCustomTemplateCode: true licenseCopyrightYear: 2024 + oseg.npmName: "@dropbox/sign-sandbox" + oseg.printApiCallProperty: true + oseg.security.api_key.username: YOUR_API_KEY + oseg.security.oauth2.access_token: YOUR_ACCESS_TOKEN files: dropbox-npmignore: templateType: SupportingFiles diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 608b57d..2a95555 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -27,12 +27,12 @@ paths: schema: $ref: '#/components/schemas/AccountCreateRequest' examples: - default_example: - $ref: '#/components/examples/AccountCreateRequestDefaultExample' - oauth: - $ref: '#/components/examples/AccountCreateRequestOAuthExample' + example: + $ref: '#/components/examples/AccountCreateRequest' + oauth_example: + $ref: '#/components/examples/AccountCreateRequestOAuth' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -46,11 +46,11 @@ paths: schema: $ref: '#/components/schemas/AccountCreateResponse' examples: - default_example: - $ref: '#/components/examples/AccountCreateResponseExample' - oauth: - $ref: '#/components/examples/AccountCreateOAuthResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountCreateResponse' + oauth_example: + $ref: '#/components/examples/AccountCreateOAuthResponse' + '4XX': description: failed_operation content: application/json: @@ -58,15 +58,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -78,42 +78,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountCreate.php + $ref: examples/AccountCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountCreate.js + $ref: examples/AccountCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountCreate.ts + $ref: examples/AccountCreateExample.ts - lang: Java label: Java source: - $ref: examples/AccountCreate.java + $ref: examples/AccountCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountCreate.rb + $ref: examples/AccountCreateExample.rb - lang: Python label: Python source: - $ref: examples/AccountCreate.py + $ref: examples/AccountCreateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountCreate.sh + $ref: examples/AccountCreateExample.sh x-meta: seo: title: 'Create Account | API Documentation | Dropbox Sign for Developers' @@ -147,7 +142,7 @@ paths: schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -161,9 +156,9 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountGetResponse' + '4XX': description: failed_operation content: application/json: @@ -171,15 +166,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -192,42 +187,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountGet.php + $ref: examples/AccountGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountGet.js + $ref: examples/AccountGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountGet.ts + $ref: examples/AccountGetExample.ts - lang: Java label: Java source: - $ref: examples/AccountGet.java + $ref: examples/AccountGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountGet.rb + $ref: examples/AccountGetExample.rb - lang: Python label: Python source: - $ref: examples/AccountGet.py + $ref: examples/AccountGetExample.py - lang: cURL label: cURL source: - $ref: examples/AccountGet.sh + $ref: examples/AccountGetExample.sh x-meta: seo: title: 'Get Account | API Documentation | Dropbox Sign for Developers' @@ -245,10 +235,10 @@ paths: schema: $ref: '#/components/schemas/AccountUpdateRequest' examples: - default_example: - $ref: '#/components/examples/AccountUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/AccountUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -262,9 +252,9 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -272,17 +262,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -294,42 +284,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountUpdate.php + $ref: examples/AccountUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountUpdate.js + $ref: examples/AccountUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountUpdate.ts + $ref: examples/AccountUpdateExample.ts - lang: Java label: Java source: - $ref: examples/AccountUpdate.java + $ref: examples/AccountUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountUpdate.rb + $ref: examples/AccountUpdateExample.rb - lang: Python label: Python source: - $ref: examples/AccountUpdate.py + $ref: examples/AccountUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountUpdate.sh + $ref: examples/AccountUpdateExample.sh x-meta: seo: title: 'Update Account | API Documentation | Dropbox Sign for Developers' @@ -348,10 +333,10 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyRequest' examples: - default_example: - $ref: '#/components/examples/AccountVerifyRequestDefaultExample' + example: + $ref: '#/components/examples/AccountVerifyRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -365,11 +350,11 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyResponse' examples: - default_example: - $ref: '#/components/examples/AccountVerifyFoundResponseExample' - not_found: - $ref: '#/components/examples/AccountVerifyNotFoundResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountVerifyFoundResponse' + not_found_example: + $ref: '#/components/examples/AccountVerifyNotFoundResponse' + '4XX': description: failed_operation content: application/json: @@ -377,15 +362,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -397,42 +382,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountVerify.php + $ref: examples/AccountVerifyExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountVerify.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountVerify.js + $ref: examples/AccountVerifyExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountVerify.ts + $ref: examples/AccountVerifyExample.ts - lang: Java label: Java source: - $ref: examples/AccountVerify.java + $ref: examples/AccountVerifyExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountVerify.rb + $ref: examples/AccountVerifyExample.rb - lang: Python label: Python source: - $ref: examples/AccountVerify.py + $ref: examples/AccountVerifyExample.py - lang: cURL label: cURL source: - $ref: examples/AccountVerify.sh + $ref: examples/AccountVerifyExample.sh x-meta: seo: title: 'Verify Account | API Documentation | Dropbox Sign for Developers' @@ -451,13 +431,13 @@ paths: schema: $ref: '#/components/schemas/ApiAppCreateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppCreateRequest' responses: - 201: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -471,9 +451,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -481,17 +461,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -503,42 +483,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppCreate.php + $ref: examples/ApiAppCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppCreate.js + $ref: examples/ApiAppCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppCreate.ts + $ref: examples/ApiAppCreateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppCreate.java + $ref: examples/ApiAppCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppCreate.rb + $ref: examples/ApiAppCreateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppCreate.py + $ref: examples/ApiAppCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppCreate.sh + $ref: examples/ApiAppCreateExample.sh x-meta: seo: title: 'Create API App | API Documentation | Dropbox Sign for Developers' @@ -560,7 +535,7 @@ paths: type: string example: 0dd3b823a682527788c4e40cb7b6f7e9 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -574,9 +549,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppGetResponse' + '4XX': description: failed_operation content: application/json: @@ -584,19 +559,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -608,42 +583,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppGet.php + $ref: examples/ApiAppGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppGet.js + $ref: examples/ApiAppGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppGet.ts + $ref: examples/ApiAppGetExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppGet.java + $ref: examples/ApiAppGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppGet.rb + $ref: examples/ApiAppGetExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppGet.py + $ref: examples/ApiAppGetExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppGet.sh + $ref: examples/ApiAppGetExample.sh x-meta: seo: title: 'Get API App | API Documentation | Dropbox Sign for Developers' @@ -670,13 +640,13 @@ paths: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -690,9 +660,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -700,19 +670,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -724,42 +694,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppUpdate.php + $ref: examples/ApiAppUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppUpdate.js + $ref: examples/ApiAppUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppUpdate.ts + $ref: examples/ApiAppUpdateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppUpdate.java + $ref: examples/ApiAppUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppUpdate.rb + $ref: examples/ApiAppUpdateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppUpdate.py + $ref: examples/ApiAppUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppUpdate.sh + $ref: examples/ApiAppUpdateExample.sh x-meta: seo: title: 'Update API App | API Documentation | Dropbox Sign for Developers' @@ -780,7 +745,7 @@ paths: type: string example: 0dd3b823a682527788c4e40cb7b6f7e9 responses: - 204: + '204': description: 'successful operation' headers: X-RateLimit-Limit: @@ -789,7 +754,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -797,17 +762,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -819,42 +784,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppDelete.php + $ref: examples/ApiAppDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppDelete.js + $ref: examples/ApiAppDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppDelete.ts + $ref: examples/ApiAppDeleteExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppDelete.java + $ref: examples/ApiAppDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppDelete.rb + $ref: examples/ApiAppDeleteExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppDelete.py + $ref: examples/ApiAppDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppDelete.sh + $ref: examples/ApiAppDeleteExample.sh x-meta: seo: title: 'Delete API App | API Documentation | Dropbox Sign for Developers' @@ -882,7 +842,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -896,9 +856,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppListResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppListResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppListResponse' + '4XX': description: failed_operation content: application/json: @@ -906,15 +866,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -926,42 +886,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppList.php + $ref: examples/ApiAppListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppList.js + $ref: examples/ApiAppListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppList.ts + $ref: examples/ApiAppListExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppList.java + $ref: examples/ApiAppListExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppList.rb + $ref: examples/ApiAppListExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppList.py + $ref: examples/ApiAppListExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppList.sh + $ref: examples/ApiAppListExample.sh x-meta: seo: title: 'List API Apps | API Documentation | Dropbox Sign for Developers' @@ -997,7 +952,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1011,9 +966,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobGetResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/BulkSendJobGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1021,15 +976,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1042,42 +997,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobGet.php + $ref: examples/BulkSendJobGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobGet.js + $ref: examples/BulkSendJobGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobGet.ts + $ref: examples/BulkSendJobGetExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobGet.java + $ref: examples/BulkSendJobGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobGet.rb + $ref: examples/BulkSendJobGetExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobGet.py + $ref: examples/BulkSendJobGetExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobGet.sh + $ref: examples/BulkSendJobGetExample.sh x-meta: seo: title: 'Get Bulk Send Job | API Documentation | Dropbox Sign for Developers' @@ -1105,7 +1055,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1119,9 +1069,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobListResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobListResponseExample' - 4XX: + example: + $ref: '#/components/examples/BulkSendJobListResponse' + '4XX': description: failed_operation content: application/json: @@ -1129,15 +1079,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1150,42 +1100,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobList.php + $ref: examples/BulkSendJobListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobList.js + $ref: examples/BulkSendJobListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobList.ts + $ref: examples/BulkSendJobListExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobList.java + $ref: examples/BulkSendJobListExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobList.rb + $ref: examples/BulkSendJobListExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobList.py + $ref: examples/BulkSendJobListExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobList.sh + $ref: examples/BulkSendJobListExample.sh x-meta: seo: title: 'List Bulk Send Jobs | Documentation | Dropbox Sign for Developers' @@ -1213,10 +1158,10 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlRequest' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlRequestDefaultExample' + example: + $ref: '#/components/examples/EmbeddedEditUrlRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1230,9 +1175,9 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlResponseExample' - 4XX: + example: + $ref: '#/components/examples/EmbeddedEditUrlResponse' + '4XX': description: failed_operation content: application/json: @@ -1240,17 +1185,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1262,42 +1207,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedEditUrl.php + $ref: examples/EmbeddedEditUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedEditUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedEditUrl.js + $ref: examples/EmbeddedEditUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedEditUrl.ts + $ref: examples/EmbeddedEditUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedEditUrl.java + $ref: examples/EmbeddedEditUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedEditUrl.rb + $ref: examples/EmbeddedEditUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedEditUrl.py + $ref: examples/EmbeddedEditUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedEditUrl.sh + $ref: examples/EmbeddedEditUrlExample.sh x-meta: seo: title: 'Get Embedded Template URL | iFrame | Dropbox Sign for Developers' @@ -1319,7 +1259,7 @@ paths: type: string example: 50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1333,9 +1273,9 @@ paths: schema: $ref: '#/components/schemas/EmbeddedSignUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedSignUrlResponseExample' - 4XX: + example: + $ref: '#/components/examples/EmbeddedSignUrlResponse' + '4XX': description: failed_operation content: application/json: @@ -1343,21 +1283,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1369,42 +1309,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedSignUrl.php + $ref: examples/EmbeddedSignUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedSignUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedSignUrl.js + $ref: examples/EmbeddedSignUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedSignUrl.ts + $ref: examples/EmbeddedSignUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedSignUrl.java + $ref: examples/EmbeddedSignUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedSignUrl.rb + $ref: examples/EmbeddedSignUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedSignUrl.py + $ref: examples/EmbeddedSignUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedSignUrl.sh + $ref: examples/EmbeddedSignUrlExample.sh x-meta: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' @@ -1414,7 +1349,7 @@ paths: tags: - Fax summary: 'Get Fax' - description: 'Returns information about fax' + description: 'Returns information about a Fax' operationId: faxGet parameters: - @@ -1426,7 +1361,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1440,9 +1375,9 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1450,19 +1385,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1471,51 +1406,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxGet.php + $ref: examples/FaxGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxGet.js + $ref: examples/FaxGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxGet.ts + $ref: examples/FaxGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxGet.java + $ref: examples/FaxGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxGet.rb + $ref: examples/FaxGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxGet.py + $ref: examples/FaxGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxGet.sh + $ref: examples/FaxGetExample.sh x-meta: seo: title: 'Get Fax | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve properties of a fax, click here.' delete: tags: - Fax summary: 'Delete Fax' - description: 'Deletes the specified Fax from the system.' + description: 'Deletes the specified Fax from the system' operationId: faxDelete parameters: - @@ -1527,7 +1457,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 204: + '204': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1536,7 +1466,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -1544,19 +1474,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1565,42 +1495,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxDelete.php + $ref: examples/FaxDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxDelete.js + $ref: examples/FaxDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxDelete.ts + $ref: examples/FaxDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxDelete.java + $ref: examples/FaxDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxDelete.rb + $ref: examples/FaxDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxDelete.py + $ref: examples/FaxDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxDelete.sh + $ref: examples/FaxDeleteExample.sh x-meta: seo: title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' @@ -1609,8 +1534,8 @@ paths: get: tags: - Fax - summary: 'List Fax Files' - description: 'Returns list of fax files' + summary: 'Download Fax Files' + description: 'Downloads files associated with a Fax' operationId: faxFiles parameters: - @@ -1622,7 +1547,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1636,7 +1561,7 @@ paths: schema: type: string format: binary - 4XX: + '4XX': description: failed_operation content: application/json: @@ -1644,21 +1569,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1667,46 +1592,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxFiles.php + $ref: examples/FaxFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxFiles.js + $ref: examples/FaxFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxFiles.ts + $ref: examples/FaxFilesExample.ts - lang: Java label: Java source: - $ref: examples/FaxFiles.java + $ref: examples/FaxFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxFiles.rb + $ref: examples/FaxFilesExample.rb - lang: Python label: Python source: - $ref: examples/FaxFiles.py + $ref: examples/FaxFilesExample.py - lang: cURL label: cURL source: - $ref: examples/FaxFiles.sh + $ref: examples/FaxFilesExample.sh x-meta: seo: title: 'Fax Files | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list the files of a fax, click here.' /fax_line/add_user: put: tags: @@ -1721,10 +1641,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineAddUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineAddUserRequestExample' + example: + $ref: '#/components/examples/FaxLineAddUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1738,9 +1658,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -1748,17 +1668,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1767,42 +1687,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAddUser.php + $ref: examples/FaxLineAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAddUser.js + $ref: examples/FaxLineAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAddUser.ts + $ref: examples/FaxLineAddUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAddUser.java + $ref: examples/FaxLineAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAddUser.rb + $ref: examples/FaxLineAddUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAddUser.py + $ref: examples/FaxLineAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAddUser.sh + $ref: examples/FaxLineAddUserExample.sh x-meta: seo: title: 'Fax Line Add User | API Documentation | Dropbox Fax for Developers' @@ -1812,13 +1727,13 @@ paths: tags: - 'Fax Line' summary: 'Get Available Fax Line Area Codes' - description: 'Returns a response with the area codes available for a given state/provice and city.' + description: 'Returns a list of available area codes for a given state/province and city' operationId: faxLineAreaCodeGet parameters: - name: country in: query - description: 'Filter area codes by country.' + description: 'Filter area codes by country' required: true schema: type: string @@ -1826,10 +1741,11 @@ paths: - CA - US - UK + example: US - name: state in: query - description: 'Filter area codes by state.' + description: 'Filter area codes by state' schema: type: string enum: @@ -1887,7 +1803,7 @@ paths: - name: province in: query - description: 'Filter area codes by province.' + description: 'Filter area codes by province' schema: type: string enum: @@ -1907,11 +1823,11 @@ paths: - name: city in: query - description: 'Filter area codes by city.' + description: 'Filter area codes by city' schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1925,9 +1841,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineAreaCodeGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineAreaCodeGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1935,15 +1851,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1952,52 +1868,47 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAreaCodeGet.php + $ref: examples/FaxLineAreaCodeGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAreaCodeGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAreaCodeGet.js + $ref: examples/FaxLineAreaCodeGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAreaCodeGet.ts + $ref: examples/FaxLineAreaCodeGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAreaCodeGet.java + $ref: examples/FaxLineAreaCodeGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAreaCodeGet.rb + $ref: examples/FaxLineAreaCodeGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAreaCodeGet.py + $ref: examples/FaxLineAreaCodeGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAreaCodeGet.sh + $ref: examples/FaxLineAreaCodeGetExample.sh x-meta: seo: title: 'Fax Line Get Area Codes | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out what area codes are available, click here.' /fax_line/create: post: tags: - 'Fax Line' summary: 'Purchase Fax Line' - description: 'Purchases a new Fax Line.' + description: 'Purchases a new Fax Line' operationId: faxLineCreate requestBody: required: true @@ -2006,10 +1917,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineCreateRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineCreateRequestExample' + example: + $ref: '#/components/examples/FaxLineCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2023,9 +1934,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2033,17 +1944,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2052,42 +1963,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineCreate.php + $ref: examples/FaxLineCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineCreate.js + $ref: examples/FaxLineCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineCreate.ts + $ref: examples/FaxLineCreateExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineCreate.java + $ref: examples/FaxLineCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineCreate.rb + $ref: examples/FaxLineCreateExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineCreate.py + $ref: examples/FaxLineCreateExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineCreate.sh + $ref: examples/FaxLineCreateExample.sh x-meta: seo: title: 'Purchase Fax Line | API Documentation | Dropbox Fax for Developers' @@ -2103,12 +2009,13 @@ paths: - name: number in: query - description: 'The Fax Line number.' + description: 'The Fax Line number' required: true schema: type: string + example: 123-123-1234 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2122,9 +2029,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2132,17 +2039,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2151,46 +2058,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineGet.php + $ref: examples/FaxLineGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineGet.js + $ref: examples/FaxLineGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineGet.ts + $ref: examples/FaxLineGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineGet.java + $ref: examples/FaxLineGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineGet.rb + $ref: examples/FaxLineGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineGet.py + $ref: examples/FaxLineGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineGet.sh + $ref: examples/FaxLineGetExample.sh x-meta: seo: title: 'Get Fax Line | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax line, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve the properties of a fax line, click here.' delete: tags: - 'Fax Line' @@ -2204,10 +2106,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineDeleteRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineDeleteRequestExample' + example: + $ref: '#/components/examples/FaxLineDeleteRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2218,7 +2120,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -2226,17 +2128,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2245,42 +2147,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineDelete.php + $ref: examples/FaxLineDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineDelete.js + $ref: examples/FaxLineDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineDelete.ts + $ref: examples/FaxLineDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineDelete.java + $ref: examples/FaxLineDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineDelete.rb + $ref: examples/FaxLineDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineDeleteExample.sh x-meta: seo: title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' @@ -2299,31 +2196,31 @@ paths: description: 'Account ID' schema: type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query - description: Page + description: 'Which page number of the Fax Line List to return. Defaults to `1`.' schema: type: integer default: 1 - example: 1 + example: 1 - name: page_size in: query - description: 'Page size' + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' schema: type: integer default: 20 - example: 20 + example: 20 - name: show_team_lines in: query - description: 'Show team lines' + description: 'Include Fax Lines belonging to team members in the list' schema: type: boolean responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2337,9 +2234,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineListResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineListResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineListResponse' + '4XX': description: failed_operation content: application/json: @@ -2347,15 +2244,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2364,42 +2261,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxLineListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineList.js + $ref: examples/FaxLineListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxLineListExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxLineListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxLineListExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxLineListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxLineListExample.sh x-meta: seo: title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' @@ -2409,7 +2301,7 @@ paths: tags: - 'Fax Line' summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' + description: 'Removes a user''s access to the specified Fax Line' operationId: faxLineRemoveUser requestBody: required: true @@ -2418,10 +2310,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + example: + $ref: '#/components/examples/FaxLineRemoveUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2435,9 +2327,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2445,17 +2337,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2464,42 +2356,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxLineRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxLineRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxLineRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxLineRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxLineRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxLineRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxLineRemoveUserExample.sh x-meta: seo: title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' @@ -2509,13 +2396,13 @@ paths: tags: - Fax summary: 'Lists Faxes' - description: 'Returns properties of multiple faxes' + description: 'Returns properties of multiple Faxes' operationId: faxList parameters: - name: page in: query - description: Page + description: 'Which page number of the Fax List to return. Defaults to `1`.' schema: type: integer default: 1 @@ -2524,7 +2411,7 @@ paths: - name: page_size in: query - description: 'Page size' + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' schema: type: integer default: 20 @@ -2532,7 +2419,7 @@ paths: minimum: 1 example: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2546,9 +2433,9 @@ paths: schema: $ref: '#/components/schemas/FaxListResponse' examples: - default_example: - $ref: '#/components/examples/FaxListResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxListResponse' + '4XX': description: failed_operation content: application/json: @@ -2556,15 +2443,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2573,42 +2460,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxList.php + $ref: examples/FaxListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxList.js + $ref: examples/FaxListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxList.ts + $ref: examples/FaxListExample.ts - lang: Java label: Java source: - $ref: examples/FaxList.java + $ref: examples/FaxListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxList.rb + $ref: examples/FaxListExample.rb - lang: Python label: Python source: - $ref: examples/FaxList.py + $ref: examples/FaxListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxList.sh + $ref: examples/FaxListExample.sh x-meta: seo: title: 'List Faxes | API Documentation | Dropbox Fax for Developers' @@ -2618,7 +2500,7 @@ paths: tags: - Fax summary: 'Send Fax' - description: 'Action to prepare and send a fax' + description: 'Creates and sends a new Fax with the submitted file(s)' operationId: faxSend requestBody: required: true @@ -2627,13 +2509,13 @@ paths: schema: $ref: '#/components/schemas/FaxSendRequest' examples: - default_example: - $ref: '#/components/examples/FaxSendRequestExample' + example: + $ref: '#/components/examples/FaxSendRequest' multipart/form-data: schema: $ref: '#/components/schemas/FaxSendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2647,9 +2529,9 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxGetResponse' + '4XX': description: failed_operation content: application/json: @@ -2657,19 +2539,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2678,45 +2560,40 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxSend.php + $ref: examples/FaxSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxSend.js + $ref: examples/FaxSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxSend.ts + $ref: examples/FaxSendExample.ts - lang: Java label: Java source: - $ref: examples/FaxSend.java + $ref: examples/FaxSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxSend.rb + $ref: examples/FaxSendExample.rb - lang: Python label: Python source: - $ref: examples/FaxSend.py + $ref: examples/FaxSendExample.py - lang: cURL label: cURL source: - $ref: examples/FaxSend.sh + $ref: examples/FaxSendExample.sh x-meta: seo: - title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + title: 'Send Fax | API Documentation | Dropbox Fax for Developers' description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here.' /oauth/token: post: @@ -2732,10 +2609,10 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenGenerateRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateRequestExample' + example: + $ref: '#/components/examples/OAuthTokenGenerateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2749,9 +2626,9 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateResponseExample' - 4XX: + example: + $ref: '#/components/examples/OAuthTokenGenerateResponse' + '4XX': description: failed_operation content: application/json: @@ -2759,15 +2636,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2777,42 +2654,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenGenerate.php + $ref: examples/OauthTokenGenerateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenGenerate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenGenerate.js + $ref: examples/OauthTokenGenerateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenGenerate.ts + $ref: examples/OauthTokenGenerateExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenGenerate.java + $ref: examples/OauthTokenGenerateExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenGenerate.rb + $ref: examples/OauthTokenGenerateExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenGenerate.py + $ref: examples/OauthTokenGenerateExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenGenerate.sh + $ref: examples/OauthTokenGenerateExample.sh x-meta: seo: title: 'Generate OAuth Token | Documentation | Dropbox Sign for Developers' @@ -2832,10 +2704,10 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenRefreshRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshRequestExample' + example: + $ref: '#/components/examples/OAuthTokenRefreshRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2849,9 +2721,9 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshResponseExample' - 4XX: + example: + $ref: '#/components/examples/OAuthTokenRefreshResponse' + '4XX': description: failed_operation content: application/json: @@ -2859,15 +2731,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2877,42 +2749,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenRefresh.php + $ref: examples/OauthTokenRefreshExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenRefresh.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenRefresh.js + $ref: examples/OauthTokenRefreshExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenRefresh.ts + $ref: examples/OauthTokenRefreshExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenRefresh.java + $ref: examples/OauthTokenRefreshExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenRefresh.rb + $ref: examples/OauthTokenRefreshExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenRefresh.py + $ref: examples/OauthTokenRefreshExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenRefresh.sh + $ref: examples/OauthTokenRefreshExample.sh x-meta: seo: title: 'OAuth Token Refresh | Documentation | Dropbox Sign for Developers' @@ -2935,10 +2802,10 @@ paths: schema: $ref: '#/components/schemas/ReportCreateRequest' examples: - default_example: - $ref: '#/components/examples/ReportCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ReportCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2952,9 +2819,9 @@ paths: schema: $ref: '#/components/schemas/ReportCreateResponse' examples: - default_example: - $ref: '#/components/examples/ReportCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ReportCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -2962,15 +2829,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2979,42 +2846,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ReportCreate.php + $ref: examples/ReportCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ReportCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ReportCreate.js + $ref: examples/ReportCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ReportCreate.ts + $ref: examples/ReportCreateExample.ts - lang: Java label: Java source: - $ref: examples/ReportCreate.java + $ref: examples/ReportCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ReportCreate.rb + $ref: examples/ReportCreateExample.rb - lang: Python label: Python source: - $ref: examples/ReportCreate.py + $ref: examples/ReportCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ReportCreate.sh + $ref: examples/ReportCreateExample.sh x-meta: seo: title: 'Create Report | API Documentation | Dropbox Sign for Developers' @@ -3036,13 +2898,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3056,9 +2918,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3066,21 +2928,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3089,42 +2951,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Embedded Bulk Send with Template | Dropbox Sign for Developers' @@ -3146,13 +3003,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3166,9 +3023,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3176,17 +3033,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3199,42 +3056,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkSendWithTemplate.php + $ref: examples/SignatureRequestBulkSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkSendWithTemplate.js + $ref: examples/SignatureRequestBulkSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkSendWithTemplate.ts + $ref: examples/SignatureRequestBulkSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkSendWithTemplate.java + $ref: examples/SignatureRequestBulkSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkSendWithTemplate.rb + $ref: examples/SignatureRequestBulkSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkSendWithTemplate.py + $ref: examples/SignatureRequestBulkSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkSendWithTemplate.sh + $ref: examples/SignatureRequestBulkSendWithTemplateExample.sh x-meta: seo: title: 'Bulk Send with Template | REST API | Dropbox Sign for Developers' @@ -3265,7 +3117,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3276,7 +3128,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -3284,21 +3136,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3311,42 +3163,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCancel.php + $ref: examples/SignatureRequestCancelExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCancel.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCancel.js + $ref: examples/SignatureRequestCancelExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCancel.ts + $ref: examples/SignatureRequestCancelExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCancel.java + $ref: examples/SignatureRequestCancelExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCancel.rb + $ref: examples/SignatureRequestCancelExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCancel.py + $ref: examples/SignatureRequestCancelExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCancel.sh + $ref: examples/SignatureRequestCancelExample.sh x-meta: seo: title: 'Cancel Incomplete Signature Request | Dropbox Sign for Developers' @@ -3365,15 +3212,15 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequest' grouped_signers_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSignersExample' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSigners' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3387,9 +3234,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponse' + '4XX': description: failed_operation content: application/json: @@ -3397,19 +3244,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3421,42 +3268,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbedded.php + $ref: examples/SignatureRequestCreateEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbedded.js + $ref: examples/SignatureRequestCreateEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbedded.ts + $ref: examples/SignatureRequestCreateEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbedded.java + $ref: examples/SignatureRequestCreateEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbedded.rb + $ref: examples/SignatureRequestCreateEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbedded.py + $ref: examples/SignatureRequestCreateEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbedded.sh + $ref: examples/SignatureRequestCreateEmbeddedExample.sh x-meta: seo: title: 'Create Embedded Signature Request | Dropbox Sign for Developers' @@ -3475,13 +3317,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3495,9 +3337,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3505,19 +3347,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3529,77 +3371,76 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Signature Request with Template | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create a new SignatureRequest based on the given Template, click here.' - '/signature_request/files/{signature_request_id}': - get: + '/signature_request/edit/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files' + summary: 'Edit Signature Request' description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. + Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFiles + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEdit parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - default: pdf - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3609,15 +3450,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary - 4XX: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditResponse' + '4XX': description: failed_operation content: application/json: @@ -3625,23 +3464,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3654,67 +3491,75 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFiles.php + $ref: examples/SignatureRequestEditExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFiles.js + $ref: examples/SignatureRequestEditExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFiles.ts + $ref: examples/SignatureRequestEditExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFiles.java + $ref: examples/SignatureRequestEditExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFiles.rb + $ref: examples/SignatureRequestEditExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFiles.py + $ref: examples/SignatureRequestEditExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFiles.sh + $ref: examples/SignatureRequestEditExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_data_uri/{signature_request_id}': - get: + title: 'Edit Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest with the submitted documents, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as Data Uri' - description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFilesAsDataUri + summary: 'Edit Embedded Signature Request' + description: 'Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + operationId: signatureRequestEditEmbedded parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3726,11 +3571,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedResponse' + '4XX': description: failed_operation content: application/json: @@ -3738,103 +3583,99 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsDataUri.php + $ref: examples/SignatureRequestEditEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsDataUri.js + $ref: examples/SignatureRequestEditEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsDataUri.ts + $ref: examples/SignatureRequestEditEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsDataUri.java + $ref: examples/SignatureRequestEditEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsDataUri.rb + $ref: examples/SignatureRequestEditEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsDataUri.py + $ref: examples/SignatureRequestEditEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsDataUri.sh + $ref: examples/SignatureRequestEditEmbeddedExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_file_url/{signature_request_id}': - get: + title: 'Edit Embedded Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to edit a SignatureRequest in an iFrame, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as File Url' - description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFilesAsFileUrl + summary: 'Edit Embedded Signature Request with Template' + description: 'Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + operationId: signatureRequestEditEmbeddedWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: force_download - in: query - description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' - schema: - type: integer - default: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3846,11 +3687,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3858,93 +3699,102 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsFileUrl.php + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsFileUrl.js + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.ts + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsFileUrl.java + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsFileUrl.rb + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsFileUrl.py + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsFileUrl.sh + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/{signature_request_id}': - get: + title: 'Signature Request with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based on the given Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Get Signature Request' - description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' - operationId: signatureRequestGet + summary: 'Edit Signature Request With Template' + description: |- + Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEditWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3958,9 +3808,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3968,19 +3818,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3993,86 +3845,74 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestGet.php + $ref: examples/SignatureRequestEditWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestGet.js + $ref: examples/SignatureRequestEditWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestGet.ts + $ref: examples/SignatureRequestEditWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestGet.java + $ref: examples/SignatureRequestEditWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestGet.rb + $ref: examples/SignatureRequestEditWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestGet.py + $ref: examples/SignatureRequestEditWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestGet.sh + $ref: examples/SignatureRequestEditWithTemplateExample.sh x-meta: seo: - title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' - /signature_request/list: + title: 'Edit Signature Request with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based off of the Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/files/{signature_request_id}': get: tags: - 'Signature Request' - summary: 'List Signature Requests' + summary: 'Download Files' description: |- - Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. - operationId: signatureRequestList + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFiles parameters: - - name: account_id - in: query - description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to retrieve.' + required: true schema: type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - name: page + name: file_type in: query - description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - example: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - - - name: query - in: query - description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + default: pdf + enum: + - pdf + - zip responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4082,13 +3922,15 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/SignatureRequestListResponse' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestListResponseExample' - 4XX: + type: string + format: binary + application/zip: + schema: + type: string + format: binary + '4XX': description: failed_operation content: application/json: @@ -4096,17 +3938,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4119,64 +3967,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestList.php + $ref: examples/SignatureRequestFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestList.js + $ref: examples/SignatureRequestFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestList.ts + $ref: examples/SignatureRequestFilesExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestList.java + $ref: examples/SignatureRequestFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestList.rb + $ref: examples/SignatureRequestFilesExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestList.py + $ref: examples/SignatureRequestFilesExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestList.sh + $ref: examples/SignatureRequestFilesExample.sh x-meta: seo: - title: 'List Signature Requests | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' - '/signature_request/release_hold/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_data_uri/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Release On-Hold Signature Request' - description: 'Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers.' - operationId: signatureRequestReleaseHold + summary: 'Download Files as Data Uri' + description: |- + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsDataUri parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to release.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4188,11 +4034,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -4200,98 +4046,98 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestReleaseHold.php + $ref: examples/SignatureRequestFilesAsDataUriExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestReleaseHold.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestReleaseHold.js + $ref: examples/SignatureRequestFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestReleaseHold.ts + $ref: examples/SignatureRequestFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestReleaseHold.java + $ref: examples/SignatureRequestFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestReleaseHold.rb + $ref: examples/SignatureRequestFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestReleaseHold.py + $ref: examples/SignatureRequestFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestReleaseHold.sh + $ref: examples/SignatureRequestFilesAsDataUriExample.sh x-meta: seo: - title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' - '/signature_request/remind/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_file_url/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Send Request Reminder' + summary: 'Download Files as File Url' description: |- - Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - **NOTE:** This action can **not** be used with embedded signature requests. - operationId: signatureRequestRemind + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsFileUrl parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to send a reminder for.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestRemindRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' + - + name: force_download + in: query + description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' + schema: + type: integer + default: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4303,11 +4149,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -4315,23 +4161,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4344,69 +4190,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemind.php + $ref: examples/SignatureRequestFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemind.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemind.js + $ref: examples/SignatureRequestFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemind.ts + $ref: examples/SignatureRequestFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemind.java + $ref: examples/SignatureRequestFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemind.rb + $ref: examples/SignatureRequestFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemind.py + $ref: examples/SignatureRequestFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemind.sh + $ref: examples/SignatureRequestFilesAsFileUrlExample.sh x-meta: seo: - title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' - '/signature_request/remove/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Remove Signature Request Access' - description: |- - Removes your access to a completed signature request. This action is **not reversible**. - - The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). - - Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. - operationId: signatureRequestRemove + summary: 'Get Signature Request' + description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' + operationId: signatureRequestGet parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to remove.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4416,8 +4252,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} - 4XX: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestGetResponse' + '4XX': description: failed_operation content: application/json: @@ -4425,92 +4266,106 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] + - + oauth2: + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemove.php + $ref: examples/SignatureRequestGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemove.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemove.js + $ref: examples/SignatureRequestGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemove.ts + $ref: examples/SignatureRequestGetExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemove.java + $ref: examples/SignatureRequestGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemove.rb + $ref: examples/SignatureRequestGetExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemove.py + $ref: examples/SignatureRequestGetExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemove.sh + $ref: examples/SignatureRequestGetExample.sh x-meta: seo: - title: 'Remove Signature Request Access | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' - /signature_request/send: - post: + title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' + /signature_request/list: + get: tags: - 'Signature Request' - summary: 'Send Signature Request' - description: 'Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents.' - operationId: signatureRequestSend - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' - grouped_signers_example: - $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' + summary: 'List Signature Requests' + description: |- + Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + + Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + operationId: signatureRequestList + parameters: + - + name: account_id + in: query + description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + schema: + type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4522,11 +4377,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/SignatureRequestListResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestListResponse' + '4XX': description: failed_operation content: application/json: @@ -4534,19 +4389,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4559,67 +4412,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSend.php + $ref: examples/SignatureRequestListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSend.js + $ref: examples/SignatureRequestListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSend.ts + $ref: examples/SignatureRequestListExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSend.java + $ref: examples/SignatureRequestListExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSend.rb + $ref: examples/SignatureRequestListExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSend.py + $ref: examples/SignatureRequestListExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSend.sh + $ref: examples/SignatureRequestListExample.sh x-meta: seo: - title: 'Send Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' - /signature_request/send_with_template: + title: 'List Signature Requests | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' + '/signature_request/release_hold/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Send with Template' - description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' - operationId: signatureRequestSendWithTemplate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' + summary: 'Release On-Hold Signature Request' + description: 'Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers.' + operationId: signatureRequestReleaseHold + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to release.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4633,9 +4478,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestReleaseHoldResponse' + '4XX': description: failed_operation content: application/json: @@ -4643,86 +4488,78 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestSendWithTemplate.php + $ref: examples/SignatureRequestReleaseHoldExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSendWithTemplate.js + $ref: examples/SignatureRequestReleaseHoldExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSendWithTemplate.ts + $ref: examples/SignatureRequestReleaseHoldExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSendWithTemplate.java + $ref: examples/SignatureRequestReleaseHoldExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSendWithTemplate.rb + $ref: examples/SignatureRequestReleaseHoldExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSendWithTemplate.py + $ref: examples/SignatureRequestReleaseHoldExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSendWithTemplate.sh + $ref: examples/SignatureRequestReleaseHoldExample.sh x-meta: seo: - title: 'Send with Template | API Documentation | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' - '/signature_request/update/{signature_request_id}': + title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' + '/signature_request/remind/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Update Signature Request' + summary: 'Send Request Reminder' description: |- - Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. - - Updating the email address of a signer will generate a new `signature_id` value. + Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. - **NOTE:** This action cannot be performed on a signature request with an appended signature page. - operationId: signatureRequestUpdate + **NOTE:** This action can **not** be used with embedded signature requests. + operationId: signatureRequestRemind parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to update.' + description: 'The id of the SignatureRequest to send a reminder for.' required: true schema: type: string @@ -4732,12 +4569,12 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestUpdateRequest' + $ref: '#/components/schemas/SignatureRequestRemindRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestRemindRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4751,9 +4588,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestRemindResponse' + '4XX': description: failed_operation content: application/json: @@ -4761,97 +4598,93 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' - security: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: - api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestUpdate.php + $ref: examples/SignatureRequestRemindExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestUpdate.js + $ref: examples/SignatureRequestRemindExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestUpdate.ts + $ref: examples/SignatureRequestRemindExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestUpdate.java + $ref: examples/SignatureRequestRemindExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestUpdate.rb + $ref: examples/SignatureRequestRemindExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestUpdate.py + $ref: examples/SignatureRequestRemindExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestUpdate.sh + $ref: examples/SignatureRequestRemindExample.sh x-meta: seo: - title: 'Update Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' - /team/add_member: - put: + title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' + '/signature_request/remove/{signature_request_id}': + post: tags: - - Team - summary: 'Add User to Team' - description: 'Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.' - operationId: teamAddMember + - 'Signature Request' + summary: 'Remove Signature Request Access' + description: |- + Removes your access to a completed signature request. This action is **not reversible**. + + The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). + + Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + operationId: signatureRequestRemove parameters: - - name: team_id - in: query - description: 'The id of the team.' - required: false + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to remove.' + required: true schema: type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TeamAddMemberRequest' - examples: - email_address: - $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4861,13 +4694,8 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TeamGetResponse' - examples: - default_example: - $ref: '#/components/examples/TeamAddMemberResponseExample' - 4XX: + application/json: {} + '4XX': description: failed_operation content: application/json: @@ -4875,86 +4703,87 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - - - oauth2: - - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamAddMember.php + $ref: examples/SignatureRequestRemoveExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamAddMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamAddMember.js + $ref: examples/SignatureRequestRemoveExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamAddMember.ts + $ref: examples/SignatureRequestRemoveExample.ts - lang: Java label: Java source: - $ref: examples/TeamAddMember.java + $ref: examples/SignatureRequestRemoveExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamAddMember.rb + $ref: examples/SignatureRequestRemoveExample.rb - lang: Python label: Python source: - $ref: examples/TeamAddMember.py + $ref: examples/SignatureRequestRemoveExample.py - lang: cURL label: cURL source: - $ref: examples/TeamAddMember.sh + $ref: examples/SignatureRequestRemoveExample.sh x-meta: seo: - title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' - /team/create: + title: 'Remove Signature Request Access | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' + /signature_request/send: post: tags: - - Team - summary: 'Create Team' - description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' - operationId: teamCreate + - 'Signature Request' + summary: 'Send Signature Request' + description: 'Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents.' + operationId: signatureRequestSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamCreateRequest' + $ref: '#/components/schemas/SignatureRequestSendRequest' examples: - default_example: - $ref: '#/components/examples/TeamCreateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestSendRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestSendRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4966,11 +4795,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestSendResponse' + '4XX': description: failed_operation content: application/json: @@ -4978,75 +4807,87 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamCreate.php + $ref: examples/SignatureRequestSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamCreate.js + $ref: examples/SignatureRequestSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamCreate.ts + $ref: examples/SignatureRequestSendExample.ts - lang: Java label: Java source: - $ref: examples/TeamCreate.java + $ref: examples/SignatureRequestSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamCreate.rb + $ref: examples/SignatureRequestSendExample.rb - lang: Python label: Python source: - $ref: examples/TeamCreate.py + $ref: examples/SignatureRequestSendExample.py - lang: cURL label: cURL source: - $ref: examples/TeamCreate.sh + $ref: examples/SignatureRequestSendExample.sh x-meta: seo: - title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' - /team/destroy: - delete: + title: 'Send Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' + /signature_request/send_with_template: + post: tags: - - Team - summary: 'Delete Team' - description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' - operationId: teamDelete + - 'Signature Request' + summary: 'Send with Template' + description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' + operationId: signatureRequestSendWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5055,7 +4896,14 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -5063,75 +4911,96 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamDelete.php + $ref: examples/SignatureRequestSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamDelete.js + $ref: examples/SignatureRequestSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamDelete.ts + $ref: examples/SignatureRequestSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/TeamDelete.java + $ref: examples/SignatureRequestSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamDelete.rb + $ref: examples/SignatureRequestSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/TeamDelete.py + $ref: examples/SignatureRequestSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamDelete.sh + $ref: examples/SignatureRequestSendWithTemplateExample.sh x-meta: seo: - title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' - /team: - get: + title: 'Send with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' + '/signature_request/update/{signature_request_id}': + post: tags: - - Team - summary: 'Get Team' - description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' - operationId: teamGet + - 'Signature Request' + summary: 'Update Signature Request' + description: |- + Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. + + Updating the email address of a signer will generate a new `signature_id` value. + + **NOTE:** This action cannot be performed on a signature request with an appended signature page. + operationId: signatureRequestUpdate + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to update.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestUpdateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5143,11 +5012,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -5155,85 +5024,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamGet.php + $ref: examples/SignatureRequestUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamGet.js + $ref: examples/SignatureRequestUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamGet.ts + $ref: examples/SignatureRequestUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamGet.java + $ref: examples/SignatureRequestUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamGet.rb + $ref: examples/SignatureRequestUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamGet.py + $ref: examples/SignatureRequestUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamGet.sh + $ref: examples/SignatureRequestUpdateExample.sh x-meta: seo: - title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + title: 'Update Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' + /team/add_member: put: tags: - Team - summary: 'Update Team' - description: 'Updates the name of your Team.' - operationId: teamUpdate + summary: 'Add User to Team' + description: 'Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.' + operationId: teamAddMember + parameters: + - + name: team_id + in: query + description: 'The id of the team.' + required: false + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamUpdateRequest' + $ref: '#/components/schemas/TeamAddMemberRequest' examples: - default_example: - $ref: '#/components/examples/TeamUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/TeamAddMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamAddMemberRequestAccountId' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5247,9 +5123,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamAddMemberResponse' + '4XX': description: failed_operation content: application/json: @@ -5257,15 +5133,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5277,64 +5155,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamUpdate.php + $ref: examples/TeamAddMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamUpdate.js + $ref: examples/TeamAddMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamUpdate.ts + $ref: examples/TeamAddMemberExample.ts - lang: Java label: Java source: - $ref: examples/TeamUpdate.java + $ref: examples/TeamAddMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamUpdate.rb + $ref: examples/TeamAddMemberExample.rb - lang: Python label: Python source: - $ref: examples/TeamUpdate.py + $ref: examples/TeamAddMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TeamUpdate.sh + $ref: examples/TeamAddMemberExample.sh x-meta: seo: - title: 'Update Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' - /team/info: - get: + title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' + /team/create: + post: tags: - Team - summary: 'Get Team Info' - description: 'Provides information about a team.' - operationId: teamInfo - parameters: - - - name: team_id - in: query - description: 'The id of the team.' - required: false - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + summary: 'Create Team' + description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' + operationId: teamCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamCreateRequest' + examples: + example: + $ref: '#/components/examples/TeamCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5346,11 +5219,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetInfoResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetInfoResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -5358,19 +5231,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5382,63 +5251,50 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInfo.php + $ref: examples/TeamCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInfo.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInfo.js + $ref: examples/TeamCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInfo.ts + $ref: examples/TeamCreateExample.ts - lang: Java label: Java source: - $ref: examples/TeamInfo.java + $ref: examples/TeamCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInfo.rb + $ref: examples/TeamCreateExample.rb - lang: Python label: Python source: - $ref: examples/TeamInfo.py + $ref: examples/TeamCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInfo.sh + $ref: examples/TeamCreateExample.sh x-meta: seo: - title: 'Get Team Info | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' - /team/invites: - get: + title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' + /team/destroy: + delete: tags: - Team - summary: 'List Team Invites' - description: 'Provides a list of team invites (and their roles).' - operationId: teamInvites - parameters: - - - name: email_address - in: query - description: 'The email address for which to display the team invites.' - required: false - schema: - type: string + summary: 'Delete Team' + description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' + operationId: teamDelete responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5447,14 +5303,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - content: - application/json: - schema: - $ref: '#/components/schemas/TeamInvitesResponse' - examples: - default_example: - $ref: '#/components/examples/TeamInvitesResponseExample' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -5462,101 +5311,70 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - account_access - - basic_account_info + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamInvites.php + $ref: examples/TeamDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInvites.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInvites.js + $ref: examples/TeamDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInvites.ts + $ref: examples/TeamDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TeamInvites.java + $ref: examples/TeamDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInvites.rb + $ref: examples/TeamDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TeamInvites.py + $ref: examples/TeamDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInvites.sh + $ref: examples/TeamDeleteExample.sh x-meta: seo: - title: 'List Team Invites | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' - '/team/members/{team_id}': + title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' + /team: get: tags: - Team - summary: 'List Team Members' - description: 'Provides a paginated list of members (and their roles) that belong to a given team.' - operationId: teamMembers - parameters: - - - name: team_id - in: path - description: 'The id of the team that a member list is being requested from.' - required: true - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the team member list to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 + summary: 'Get Team' + description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' + operationId: teamGet responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5568,11 +5386,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamMembersResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamMembersResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamGetResponse' + '4XX': description: failed_operation content: application/json: @@ -5580,19 +5398,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5604,66 +5420,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamMembers.php + $ref: examples/TeamGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamMembers.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamMembers.js + $ref: examples/TeamGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamMembers.ts + $ref: examples/TeamGetExample.ts - lang: Java label: Java source: - $ref: examples/TeamMembers.java + $ref: examples/TeamGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamMembers.rb + $ref: examples/TeamGetExample.rb - lang: Python label: Python source: - $ref: examples/TeamMembers.py + $ref: examples/TeamGetExample.py - lang: cURL label: cURL source: - $ref: examples/TeamMembers.sh + $ref: examples/TeamGetExample.sh x-meta: seo: - title: 'List Team Members | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' - /team/remove_member: - post: + title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + put: tags: - Team - summary: 'Remove User from Team' - description: 'Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.' - operationId: teamRemoveMember + summary: 'Update Team' + description: 'Updates the name of your Team.' + operationId: teamUpdate requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamRemoveMemberRequest' + $ref: '#/components/schemas/TeamUpdateRequest' examples: - email_address: - $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' + example: + $ref: '#/components/examples/TeamUpdateRequest' responses: - 201: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5677,9 +5485,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamRemoveMemberResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -5687,17 +5495,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5709,80 +5515,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamRemoveMember.php + $ref: examples/TeamUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamRemoveMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamRemoveMember.js + $ref: examples/TeamUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamRemoveMember.ts + $ref: examples/TeamUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamRemoveMember.java + $ref: examples/TeamUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamRemoveMember.rb + $ref: examples/TeamUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamRemoveMember.py + $ref: examples/TeamUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamRemoveMember.sh + $ref: examples/TeamUpdateExample.sh x-meta: seo: - title: 'Remove User from Team | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' - '/team/sub_teams/{team_id}': + title: 'Update Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' + /team/info: get: tags: - Team - summary: 'List Sub Teams' - description: 'Provides a paginated list of sub teams that belong to a given team.' - operationId: teamSubTeams + summary: 'Get Team Info' + description: 'Provides information about a team.' + operationId: teamInfo parameters: - name: team_id - in: path - description: 'The id of the parent Team.' - required: true + in: query + description: 'The id of the team.' + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the SubTeam List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5794,11 +5579,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamSubTeamsResponse' + $ref: '#/components/schemas/TeamGetInfoResponse' examples: - default_example: - $ref: '#/components/examples/TeamSubTeamsResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamGetInfoResponse' + '4XX': description: failed_operation content: application/json: @@ -5806,19 +5591,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5830,73 +5615,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeams.php + $ref: examples/TeamInfoExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeams.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamSubTeams.js + $ref: examples/TeamInfoExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeams.ts + $ref: examples/TeamInfoExample.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeams.java + $ref: examples/TeamInfoExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeams.rb + $ref: examples/TeamInfoExample.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeams.py + $ref: examples/TeamInfoExample.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeams.sh + $ref: examples/TeamInfoExample.sh x-meta: seo: - title: 'List Sub Teams | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' - '/template/add_user/{template_id}': - post: + title: 'Get Team Info | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' + /team/invites: + get: tags: - - Template - summary: 'Add User to Template' - description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' - operationId: templateAddUser + - Team + summary: 'List Team Invites' + description: 'Provides a list of team invites (and their roles).' + operationId: teamInvites parameters: - - name: template_id - in: path - description: 'The id of the Template to give the Account access to.' - required: true + name: email_address + in: query + description: 'The email address for which to display the team invites.' + required: false schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateAddUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5908,11 +5678,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/TeamInvitesResponse' examples: - default_example: - $ref: '#/components/examples/TemplateAddUserResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamInvitesResponse' + '4XX': description: failed_operation content: application/json: @@ -5920,95 +5690,96 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - account_access + - basic_account_info x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateAddUser.php + $ref: examples/TeamInvitesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateAddUser.js + $ref: examples/TeamInvitesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUser.ts + $ref: examples/TeamInvitesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUser.java + $ref: examples/TeamInvitesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUser.rb + $ref: examples/TeamInvitesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUser.py + $ref: examples/TeamInvitesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUser.sh + $ref: examples/TeamInvitesExample.sh x-meta: seo: - title: 'Add User to Template | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' - /template/create: - post: + title: 'List Team Invites | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' + '/team/members/{team_id}': + get: tags: - - Template - summary: 'Create Template' - description: 'Creates a template that can then be used.' - operationId: templateCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' + - Team + summary: 'List Team Members' + description: 'Provides a paginated list of members (and their roles) that belong to a given team.' + operationId: teamMembers + parameters: + - + name: team_id + in: path + description: 'The id of the team that a member list is being requested from.' + required: true + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the team member list to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6020,11 +5791,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateResponse' + $ref: '#/components/schemas/TeamMembersResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamMembersResponse' + '4XX': description: failed_operation content: application/json: @@ -6032,97 +5803,85 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreate.php + $ref: examples/TeamMembersExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreate.js + $ref: examples/TeamMembersExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreate.ts + $ref: examples/TeamMembersExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreate.java + $ref: examples/TeamMembersExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreate.rb + $ref: examples/TeamMembersExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreate.py + $ref: examples/TeamMembersExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreate.sh + $ref: examples/TeamMembersExample.sh x-meta: seo: - title: 'Create Template | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' - /template/create_embedded_draft: + title: 'List Team Members | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' + /team/remove_member: post: tags: - - Template - summary: 'Create Embedded Template Draft' - description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' - operationId: templateCreateEmbeddedDraft + - Team + summary: 'Remove User from Team' + description: 'Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.' + operationId: teamRemoveMember requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + $ref: '#/components/schemas/TeamRemoveMemberRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + example: + $ref: '#/components/examples/TeamRemoveMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' responses: - 200: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6134,11 +5893,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamRemoveMemberResponse' + '4XX': description: failed_operation content: application/json: @@ -6146,88 +5905,97 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreateEmbeddedDraft.php + $ref: examples/TeamRemoveMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreateEmbeddedDraft.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreateEmbeddedDraft.js + $ref: examples/TeamRemoveMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreateEmbeddedDraft.ts + $ref: examples/TeamRemoveMemberExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreateEmbeddedDraft.java + $ref: examples/TeamRemoveMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreateEmbeddedDraft.rb + $ref: examples/TeamRemoveMemberExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreateEmbeddedDraft.py + $ref: examples/TeamRemoveMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreateEmbeddedDraft.sh + $ref: examples/TeamRemoveMemberExample.sh x-meta: seo: - title: 'Create Embedded Template Draft | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' - '/template/delete/{template_id}': - post: + title: 'Remove User from Team | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' + '/team/sub_teams/{team_id}': + get: tags: - - Template - summary: 'Delete Template' - description: 'Completely deletes the template specified from the account.' - operationId: templateDelete - parameters: - - - name: template_id + - Team + summary: 'List Sub Teams' + description: 'Provides a paginated list of sub teams that belong to a given team.' + operationId: teamSubTeams + parameters: + - + name: team_id in: path - description: 'The id of the Template to delete.' + description: 'The id of the parent Team.' required: true schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the SubTeam List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6237,8 +6005,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} - 4XX: + application/json: + schema: + $ref: '#/components/schemas/TeamSubTeamsResponse' + examples: + example: + $ref: '#/components/examples/TeamSubTeamsResponse' + '4XX': description: failed_operation content: application/json: @@ -6246,100 +6019,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateDelete.php + $ref: examples/TeamSubTeamsExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateDelete.js + $ref: examples/TeamSubTeamsExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateDelete.ts + $ref: examples/TeamSubTeamsExample.ts - lang: Java label: Java source: - $ref: examples/TemplateDelete.java + $ref: examples/TeamSubTeamsExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateDelete.rb + $ref: examples/TeamSubTeamsExample.rb - lang: Python label: Python source: - $ref: examples/TemplateDelete.py + $ref: examples/TeamSubTeamsExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateDelete.sh + $ref: examples/TeamSubTeamsExample.sh x-meta: seo: - title: 'Delete Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' - '/template/files/{template_id}': - get: + title: 'List Sub Teams | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' + '/template/add_user/{template_id}': + post: tags: - Template - summary: 'Get Template Files' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFiles + summary: 'Add User to Template' + description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' + operationId: templateAddUser parameters: - name: template_id in: path - description: 'The id of the template files to retrieve.' + description: 'The id of the Template to give the Account access to.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateAddUserRequest' + examples: + example: + $ref: '#/components/examples/TemplateAddUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6349,15 +6114,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary - 4XX: + $ref: '#/components/schemas/TemplateGetResponse' + examples: + example: + $ref: '#/components/examples/TemplateAddUserResponse' + '4XX': description: failed_operation content: application/json: @@ -6365,23 +6128,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6393,67 +6150,68 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFiles.php + $ref: examples/TemplateAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFiles.js + $ref: examples/TemplateAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFiles.ts + $ref: examples/TemplateAddUserExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFiles.java + $ref: examples/TemplateAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFiles.rb + $ref: examples/TemplateAddUserExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFiles.py + $ref: examples/TemplateAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFiles.sh + $ref: examples/TemplateAddUserExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_data_uri/{template_id}': - get: + title: 'Add User to Template | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' + /template/create: + post: tags: - Template - summary: 'Get Template Files as Data Uri' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFilesAsDataUri - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 + summary: 'Create Template' + description: 'Creates a template that can then be used.' + operationId: templateCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' + examples: + example: + $ref: '#/components/examples/TemplateCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6465,11 +6223,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/TemplateCreateResponse' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -6477,23 +6235,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6505,74 +6259,68 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsDataUri.php + $ref: examples/TemplateCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsDataUri.js + $ref: examples/TemplateCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsDataUri.ts + $ref: examples/TemplateCreateExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsDataUri.java + $ref: examples/TemplateCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsDataUri.rb + $ref: examples/TemplateCreateExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsDataUri.py + $ref: examples/TemplateCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsDataUri.sh + $ref: examples/TemplateCreateExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_file_url/{template_id}': - get: + title: 'Create Template | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' + /template/create_embedded_draft: + post: tags: - Template - summary: 'Get Template Files as File Url' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFilesAsFileUrl - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 - - - name: force_download - in: query - description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' - schema: - type: integer - default: 1 + summary: 'Create Embedded Template Draft' + description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' + operationId: templateCreateEmbeddedDraft + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + examples: + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6584,11 +6332,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponse' + '4XX': description: failed_operation content: application/json: @@ -6596,23 +6344,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6624,64 +6368,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsFileUrl.php + $ref: examples/TemplateCreateEmbeddedDraftExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsFileUrl.js + $ref: examples/TemplateCreateEmbeddedDraftExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsFileUrl.ts + $ref: examples/TemplateCreateEmbeddedDraftExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsFileUrl.java + $ref: examples/TemplateCreateEmbeddedDraftExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsFileUrl.rb + $ref: examples/TemplateCreateEmbeddedDraftExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsFileUrl.py + $ref: examples/TemplateCreateEmbeddedDraftExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsFileUrl.sh + $ref: examples/TemplateCreateEmbeddedDraftExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/{template_id}': - get: + title: 'Create Embedded Template Draft | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' + '/template/delete/{template_id}': + post: tags: - Template - summary: 'Get Template' - description: 'Returns the Template specified by the `template_id` parameter.' - operationId: templateGet + summary: 'Delete Template' + description: 'Completely deletes the template specified from the account.' + operationId: templateDelete parameters: - name: template_id in: path - description: 'The id of the Template to retrieve.' + description: 'The id of the Template to delete.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6691,13 +6430,8 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TemplateGetResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateGetResponseExample' - 4XX: + application/json: {} + '4XX': description: failed_operation content: application/json: @@ -6705,19 +6439,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6729,87 +6463,71 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateGet.php + $ref: examples/TemplateDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateGet.js + $ref: examples/TemplateDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateGet.ts + $ref: examples/TemplateDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TemplateGet.java + $ref: examples/TemplateDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateGet.rb + $ref: examples/TemplateDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TemplateGet.py + $ref: examples/TemplateDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateGet.sh + $ref: examples/TemplateDeleteExample.sh x-meta: seo: - title: 'Get Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' - /template/list: + title: 'Delete Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' + '/template/files/{template_id}': get: tags: - Template - summary: 'List Templates' + summary: 'Get Template Files' description: |- - Returns a list of the Templates that are accessible by you. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. - operationId: templateList + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFiles parameters: - - name: account_id - in: query - description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: template_id + in: path + description: 'The id of the template files to retrieve.' + required: true schema: type: string + example: f57db65d3f933b5316d398057a36176831451a35 - - name: page - in: query - description: 'Which page number of the Template List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 - - - name: query + name: file_type in: query - description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + enum: + - pdf + - zip responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6819,13 +6537,15 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/TemplateListResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateListResponseExample' - 4XX: + type: string + format: binary + application/zip: + schema: + type: string + format: binary + '4XX': description: failed_operation content: application/json: @@ -6833,19 +6553,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6857,73 +6581,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateList.php + $ref: examples/TemplateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateList.js + $ref: examples/TemplateFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateList.ts + $ref: examples/TemplateFilesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateList.java + $ref: examples/TemplateFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateList.rb + $ref: examples/TemplateFilesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateList.py + $ref: examples/TemplateFilesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateList.sh + $ref: examples/TemplateFilesExample.sh x-meta: seo: - title: 'List Templates | API Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' - '/template/remove_user/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_data_uri/{template_id}': + get: tags: - Template - summary: 'Remove User from Template' - description: 'Removes the specified Account''s access to the specified Template.' - operationId: templateRemoveUser + summary: 'Get Template Files as Data Uri' + description: |- + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFilesAsDataUri parameters: - name: template_id in: path - description: 'The id of the Template to remove the Account''s access to.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateRemoveUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6935,11 +6648,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -6947,17 +6660,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6969,88 +6688,69 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateRemoveUser.php + $ref: examples/TemplateFilesAsDataUriExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateRemoveUser.js + $ref: examples/TemplateFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateRemoveUser.ts + $ref: examples/TemplateFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/TemplateRemoveUser.java + $ref: examples/TemplateFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateRemoveUser.rb + $ref: examples/TemplateFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/TemplateRemoveUser.py + $ref: examples/TemplateFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateRemoveUser.sh + $ref: examples/TemplateFilesAsDataUriExample.sh x-meta: seo: - title: 'Remove User from Template | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' - '/template/update_files/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_file_url/{template_id}': + get: tags: - Template - summary: 'Update Template Files' + summary: 'Get Template Files as File Url' description: |- - Overlays a new file with the overlay of an existing template. The new file(s) must: - - 1. have the same or higher page count - 2. the same orientation as the file(s) being replaced. - - This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. - - Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. - - It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). - operationId: templateUpdateFiles + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFilesAsFileUrl parameters: - name: template_id in: path - description: 'The ID of the template whose files to update.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' + - + name: force_download + in: query + description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' + schema: + type: integer + default: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7062,11 +6762,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateUpdateFilesResponse' + $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -7074,21 +6774,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7100,73 +6802,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateUpdateFiles.php + $ref: examples/TemplateFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateUpdateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateUpdateFiles.js + $ref: examples/TemplateFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateUpdateFiles.ts + $ref: examples/TemplateFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/TemplateUpdateFiles.java + $ref: examples/TemplateFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateUpdateFiles.rb + $ref: examples/TemplateFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/TemplateUpdateFiles.py + $ref: examples/TemplateFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateUpdateFiles.sh + $ref: examples/TemplateFilesAsFileUrlExample.sh x-meta: seo: - title: 'Update Template Files | REST API | Dropbox Sign for Developers' - description: 'Overlays a new file with the overlay of an existing template' - /unclaimed_draft/create: - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/{template_id}': + get: tags: - - 'Unclaimed Draft' - summary: 'Create Unclaimed Draft' - description: 'Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404.' - operationId: unclaimedDraftCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + - Template + summary: 'Get Template' + description: 'Returns the Template specified by the `template_id` parameter.' + operationId: templateGet + parameters: + - + name: template_id + in: path + description: 'The id of the Template to retrieve.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7178,11 +6866,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateGetResponse' + '4XX': description: failed_operation content: application/json: @@ -7190,96 +6878,106 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreate.php + $ref: examples/TemplateGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreate.js + $ref: examples/TemplateGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreate.ts + $ref: examples/TemplateGetExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreate.java + $ref: examples/TemplateGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreate.rb + $ref: examples/TemplateGetExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreate.py + $ref: examples/TemplateGetExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreate.sh + $ref: examples/TemplateGetExample.sh x-meta: seo: - title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' - /unclaimed_draft/create_embedded: - post: + title: 'Get Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' + /template/list: + get: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft' + - Template + summary: 'List Templates' description: |- - Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + Returns a list of the Templates that are accessible by you. - **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbedded - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + operationId: templateList + parameters: + - + name: account_id + in: query + description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the Template List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + schema: + type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7291,11 +6989,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateListResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateListResponse' + '4XX': description: failed_operation content: application/json: @@ -7303,95 +7001,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbedded.php + $ref: examples/TemplateListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbedded.js + $ref: examples/TemplateListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.ts + $ref: examples/TemplateListExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbedded.java + $ref: examples/TemplateListExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbedded.rb + $ref: examples/TemplateListExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbedded.py + $ref: examples/TemplateListExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbedded.sh + $ref: examples/TemplateListExample.sh x-meta: seo: - title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' - /unclaimed_draft/create_embedded_with_template: + title: 'List Templates | API Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' + '/template/remove_user/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft with Template' - description: |- - Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - - **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbeddedWithTemplate + - Template + summary: 'Remove User from Template' + description: 'Removes the specified Account''s access to the specified Template.' + operationId: templateRemoveUser + parameters: + - + name: template_id + in: path + description: 'The id of the Template to remove the Account''s access to.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + $ref: '#/components/schemas/TemplateRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + example: + $ref: '#/components/examples/TemplateRemoveUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7403,11 +7098,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateRemoveUserResponse' + '4XX': description: failed_operation content: application/json: @@ -7415,102 +7110,105 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + $ref: examples/TemplateRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + $ref: examples/TemplateRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + $ref: examples/TemplateRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + $ref: examples/TemplateRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + $ref: examples/TemplateRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + $ref: examples/TemplateRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + $ref: examples/TemplateRemoveUserExample.sh x-meta: seo: - title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' - '/unclaimed_draft/edit_and_resend/{signature_request_id}': + title: 'Remove User from Template | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' + '/template/update_files/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Edit and Resend Unclaimed Draft' + - Template + summary: 'Update Template Files' description: |- - Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + Overlays a new file with the overlay of an existing template. The new file(s) must: - **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftEditAndResend + 1. have the same or higher page count + 2. the same orientation as the file(s) being replaced. + + This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. + + Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. + + It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. + + If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + operationId: templateUpdateFiles parameters: - - name: signature_request_id + name: template_id in: path - description: 'The ID of the signature request to edit and resend.' + description: 'The ID of the template whose files to update.' required: true schema: type: string - example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + $ref: '#/components/schemas/TemplateUpdateFilesRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateUpdateFilesRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateUpdateFilesRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7522,11 +7220,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateUpdateFilesResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' - 4XX: + example: + $ref: '#/components/examples/TemplateUpdateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -7534,119 +7232,554 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftEditAndResend.php + $ref: examples/TemplateUpdateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.cs + $ref: examples/TemplateUpdateFilesExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TemplateUpdateFilesExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TemplateUpdateFilesExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TemplateUpdateFilesExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TemplateUpdateFilesExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TemplateUpdateFilesExample.sh + x-meta: + seo: + title: 'Update Template Files | REST API | Dropbox Sign for Developers' + description: 'Overlays a new file with the overlay of an existing template' + /unclaimed_draft/create: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Unclaimed Draft' + description: 'Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404.' + operationId: unclaimedDraftCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateExample.php - - lang: JavaScript - label: JavaScript + lang: 'C#' + label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.js + $ref: examples/UnclaimedDraftCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftEditAndResend.ts + $ref: examples/UnclaimedDraftCreateExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftEditAndResend.java + $ref: examples/UnclaimedDraftCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftEditAndResend.rb + $ref: examples/UnclaimedDraftCreateExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftEditAndResend.py + $ref: examples/UnclaimedDraftCreateExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftEditAndResend.sh + $ref: examples/UnclaimedDraftCreateExample.sh x-meta: seo: - title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' -components: - schemas: - AccountCreateRequest: - required: - - email_address - properties: - client_id: - description: |- - Used when creating a new account with OAuth authorization. + title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' + /unclaimed_draft/create_embedded: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft' + description: |- + Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - client_secret: - description: |- - Used when creating a new account with OAuth authorization. + **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbedded + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.sh + x-meta: + seo: + title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' + /unclaimed_draft/create_embedded_with_template: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft with Template' + description: |- + Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - email_address: - description: 'The email address which will be associated with the new Account.' - type: string - format: email - locale: - description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' - type: string - type: object - AccountUpdateRequest: - properties: - account_id: - description: 'The ID of the Account' - type: string - nullable: true - callback_url: - description: 'The URL that Dropbox Sign should POST events to.' - type: string - locale: - description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' - type: string - type: object - AccountVerifyRequest: - required: - - email_address - properties: - email_address: - description: 'Email address to run the verification for.' - type: string + **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbeddedWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.sh + x-meta: + seo: + title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' + '/unclaimed_draft/edit_and_resend/{signature_request_id}': + post: + tags: + - 'Unclaimed Draft' + summary: 'Edit and Resend Unclaimed Draft' + description: |- + Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + + **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftEditAndResend + parameters: + - + name: signature_request_id + in: path + description: 'The ID of the signature request to edit and resend.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendRequest' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResend' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftEditAndResendExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftEditAndResendExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftEditAndResendExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftEditAndResendExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftEditAndResendExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftEditAndResendExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftEditAndResendExample.sh + x-meta: + seo: + title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' +components: + schemas: + AccountCreateRequest: + required: + - email_address + properties: + client_id: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + client_secret: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + email_address: + description: 'The email address which will be associated with the new Account.' + type: string + format: email + locale: + description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' + type: string + type: object + AccountUpdateRequest: + properties: + account_id: + description: 'The ID of the Account' + type: string + nullable: true + callback_url: + description: 'The URL that Dropbox Sign should POST events to.' + type: string + locale: + description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' + type: string + type: object + AccountVerifyRequest: + required: + - email_address + properties: + email_address: + description: 'Email address to run the verification for.' + type: string format: email type: object ApiAppCreateRequest: @@ -7757,7 +7890,7 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string account_id: description: 'Account ID' @@ -7850,20 +7983,20 @@ components: - country properties: area_code: - description: 'Area code' + description: 'Area code of the new Fax Line' type: integer country: - description: Country + description: 'Country of the area code' type: string enum: - CA - US - UK city: - description: City + description: 'City of the area code' type: string account_id: - description: 'Account ID' + description: 'Account ID of the account that will be assigned this new Fax Line' type: string example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 type: object @@ -7872,7 +8005,7 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string type: object FaxLineRemoveUserRequest: @@ -7880,14 +8013,14 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string account_id: - description: 'Account ID' + description: 'Account ID of the user to remove access' type: string example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 email_address: - description: 'Email address' + description: 'Email address of the user to remove access' type: string format: email type: object @@ -7896,7 +8029,9 @@ components: - recipient properties: recipient: - description: 'Fax Send To Recipient' + description: |- + Recipient of the fax + Can be a phone number in E.164 format or email address type: string example: recipient@example.com sender: @@ -7904,13 +8039,19 @@ components: type: string example: sender@example.com files: - description: 'Fax File to Send' + description: |- + Use `files[]` to indicate the uploaded file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string format: binary file_urls: - description: 'Fax File URL to Send' + description: |- + Use `file_urls[]` to have Dropbox Fax download the file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string @@ -7919,11 +8060,11 @@ components: type: boolean default: false cover_page_to: - description: 'Fax Cover Page for Recipient' + description: 'Fax cover page recipient information' type: string example: 'Recipient Name' cover_page_from: - description: 'Fax Cover Page for Sender' + description: 'Fax cover page sender information' type: string example: 'Sender Name' cover_page_message: @@ -8119,27 +8260,361 @@ components: Example CSV: - ``` - name, email_address, pin, company_field - George, george@example.com, d79a3td, ABC Corp - Mary, mary@example.com, gd9as5b, 123 LLC - ``` - type: string - format: binary - signer_list: - description: '`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.' + ``` + name, email_address, pin, company_field + George, george@example.com, d79a3td, ABC Corp + Mary, mary@example.com, gd9as5b, 123 LLC + ``` + type: string + format: binary + signer_list: + description: '`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.' + type: array + items: + $ref: '#/components/schemas/SubBulkSignerList' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object + SignatureRequestCreateEmbeddedRequest: + required: + - client_id + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **NOTE:** Only available for Premium plan. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' + type: array + items: + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true + type: object + SignatureRequestCreateEmbeddedWithTemplateRequest: + required: + - client_id + - template_ids + - signers + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + type: object + SignatureRequestEditRequest: + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. type: array items: - $ref: '#/components/schemas/SubBulkSignerList' + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' allow_decline: description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' type: boolean default: false - ccs: - description: 'Add CC email recipients. Required when a CC role exists for the Template.' + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **NOTE:** Only available for Premium plan and higher. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' type: array items: - $ref: '#/components/schemas/SubCC' + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email client_id: description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' type: string @@ -8153,6 +8628,52 @@ components: type: array items: $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false message: description: 'The custom message in the email that will be sent to the signers.' type: string @@ -8165,6 +8686,8 @@ components: type: object maxItems: 10 additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' type: string @@ -8180,8 +8703,16 @@ components: description: 'The title you want to assign to the SignatureRequest.' type: string maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true type: object - SignatureRequestCreateEmbeddedRequest: + SignatureRequestEditEmbeddedRequest: required: - client_id properties: @@ -8333,7 +8864,7 @@ components: type: integer nullable: true type: object - SignatureRequestCreateEmbeddedWithTemplateRequest: + SignatureRequestEditEmbeddedWithTemplateRequest: required: - client_id - template_ids @@ -8417,6 +8948,94 @@ components: type: boolean default: false type: object + SignatureRequestEditWithTemplateRequest: + description: '' + required: + - signers + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object SignatureRequestRemindRequest: required: - email_address @@ -13085,498 +13704,522 @@ components: type: string default: 'Hello API Event Received' examples: - AccountCreateRequestDefaultExample: + AccountCreateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountCreateRequestDefaultExample.json - AccountCreateRequestOAuthExample: + $ref: examples/json/AccountCreateRequest.json + AccountCreateRequestOAuth: summary: 'OAuth Example' value: - $ref: examples/json/AccountCreateRequestOAuthExample.json - AccountUpdateRequestDefaultExample: + $ref: examples/json/AccountCreateRequestOAuth.json + AccountUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountUpdateRequestDefaultExample.json - AccountVerifyRequestDefaultExample: + $ref: examples/json/AccountUpdateRequest.json + AccountVerifyRequest: summary: 'Default Example' value: - $ref: examples/json/AccountVerifyRequestDefaultExample.json - ApiAppCreateRequestDefaultExample: + $ref: examples/json/AccountVerifyRequest.json + ApiAppCreateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppCreateRequestDefaultExample.json - ApiAppUpdateRequestDefaultExample: + $ref: examples/json/ApiAppCreateRequest.json + ApiAppUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppUpdateRequestDefaultExample.json - EmbeddedEditUrlRequestDefaultExample: + $ref: examples/json/ApiAppUpdateRequest.json + EmbeddedEditUrlRequest: summary: 'Default Example' value: - $ref: examples/json/EmbeddedEditUrlRequestDefaultExample.json - FaxLineAddUserRequestExample: + $ref: examples/json/EmbeddedEditUrlRequest.json + FaxLineAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineAddUserRequestExample.json - FaxLineCreateRequestExample: + $ref: examples/json/FaxLineAddUserRequest.json + FaxLineCreateRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineCreateRequestExample.json - FaxLineDeleteRequestExample: + $ref: examples/json/FaxLineCreateRequest.json + FaxLineDeleteRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineDeleteRequestExample.json - FaxLineRemoveUserRequestExample: + $ref: examples/json/FaxLineDeleteRequest.json + FaxLineRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineRemoveUserRequestExample.json - FaxSendRequestExample: + $ref: examples/json/FaxLineRemoveUserRequest.json + FaxSendRequest: summary: 'Default Example' value: - $ref: examples/json/FaxSendRequestExample.json - OAuthTokenGenerateRequestExample: + $ref: examples/json/FaxSendRequest.json + OAuthTokenGenerateRequest: summary: 'OAuth Token Generate Example' value: - $ref: examples/json/OAuthTokenGenerateRequestExample.json - OAuthTokenRefreshRequestExample: + $ref: examples/json/OAuthTokenGenerateRequest.json + OAuthTokenRefreshRequest: summary: 'OAuth Token Refresh Example' value: - $ref: examples/json/OAuthTokenRefreshRequestExample.json - ReportCreateRequestDefaultExample: + $ref: examples/json/OAuthTokenRefreshRequest.json + ReportCreateRequest: + summary: 'Default Example' + value: + $ref: examples/json/ReportCreateRequest.json + SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.json + SignatureRequestBulkSendWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkSendWithTemplateRequest.json + SignatureRequestCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/ReportCreateRequestDefaultExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedRequest.json + SignatureRequestCreateEmbeddedRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSigners.json + SignatureRequestCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestBulkSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequest.json + SignatureRequestEditRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestDefaultExample: + $ref: examples/json/SignatureRequestEditRequest.json + SignatureRequestEditRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditRequestGroupedSigners.json + SignatureRequestEditEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequest.json + SignatureRequestEditEmbeddedRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSignersExample.json - SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequestGroupedSigners.json + SignatureRequestEditEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateRequest.json + SignatureRequestEditWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestRemindRequestDefaultExample: + $ref: examples/json/SignatureRequestEditWithTemplateRequest.json + SignatureRequestRemindRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestRemindRequestDefaultExample.json - SignatureRequestSendRequestDefaultExample: + $ref: examples/json/SignatureRequestRemindRequest.json + SignatureRequestSendRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendRequestDefaultExample.json - SignatureRequestSendRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestSendRequest.json + SignatureRequestSendRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestSendRequestGroupedSignersExample.json - SignatureRequestSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendRequestGroupedSigners.json + SignatureRequestSendWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendWithTemplateRequestDefaultExample.json - SignatureRequestUpdateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendWithTemplateRequest.json + SignatureRequestUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestUpdateRequestDefaultExample.json - TeamAddMemberRequestEmailAddressExample: + $ref: examples/json/SignatureRequestUpdateRequest.json + TeamAddMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamAddMemberRequestEmailAddressExample.json - TeamAddMemberRequestAccountIdExample: + $ref: examples/json/TeamAddMemberRequest.json + TeamAddMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamAddMemberRequestAccountIdExample.json - TeamCreateRequestDefaultExample: + $ref: examples/json/TeamAddMemberRequestAccountId.json + TeamCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamCreateRequestDefaultExample.json - TeamRemoveMemberRequestEmailAddressExample: + $ref: examples/json/TeamCreateRequest.json + TeamRemoveMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamRemoveMemberRequestEmailAddressExample.json - TeamRemoveMemberRequestAccountIdExample: + $ref: examples/json/TeamRemoveMemberRequest.json + TeamRemoveMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamRemoveMemberRequestAccountIdExample.json - TeamUpdateRequestDefaultExample: + $ref: examples/json/TeamRemoveMemberRequestAccountId.json + TeamUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamUpdateRequestDefaultExample.json - TemplateAddUserRequestDefaultExample: + $ref: examples/json/TeamUpdateRequest.json + TemplateAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateAddUserRequestDefaultExample.json - TemplateCreateRequestDefaultExample: + $ref: examples/json/TemplateAddUserRequest.json + TemplateCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateRequestDefaultExample.json - TemplateCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateRequest.json + TemplateCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldsPerDocumentExample.json - TemplateCreateRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateRequestFormFieldsPerDocument.json + TemplateCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldGroupsExample.json - TemplateCreateRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateRequestFormFieldGroups.json + TemplateCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldRulesExample.json - TemplateCreateEmbeddedDraftRequestDefaultExample: + $ref: examples/json/TemplateCreateRequestFormFieldRules.json + TemplateCreateEmbeddedDraftRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestDefaultExample.json - TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequest.json + TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample.json - TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument.json + TemplateCreateEmbeddedDraftRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample.json - TemplateCreateEmbeddedDraftRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroups.json + TemplateCreateEmbeddedDraftRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample.json - TemplateRemoveUserRequestDefaultExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRules.json + TemplateRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateRemoveUserRequestDefaultExample.json - TemplateUpdateFilesRequestDefaultExample: + $ref: examples/json/TemplateRemoveUserRequest.json + TemplateUpdateFilesRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateUpdateFilesRequestDefaultExample.json - UnclaimedDraftCreateRequestDefaultExample: + $ref: examples/json/TemplateUpdateFilesRequest.json + UnclaimedDraftCreateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestDefaultExample.json - UnclaimedDraftCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateRequest.json + UnclaimedDraftCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocument.json + UnclaimedDraftCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroupsExample.json - UnclaimedDraftCreateRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroups.json + UnclaimedDraftCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestDefaultExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequest.json + UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument.json + UnclaimedDraftCreateEmbeddedRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups.json + UnclaimedDraftCreateEmbeddedRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample.json - UnclaimedDraftEditAndResendRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json + UnclaimedDraftEditAndResendRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftEditAndResendRequestDefaultExample.json - AccountCreateResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResendRequest.json + AccountCreateResponse: summary: 'Account Create' value: - $ref: examples/json/AccountCreateResponseExample.json - AccountCreateOAuthResponseExample: + $ref: examples/json/AccountCreateResponse.json + AccountCreateOAuthResponse: summary: 'Account Create with OAuth Authorization' value: - $ref: examples/json/AccountCreateOAuthResponseExample.json - AccountGetResponseExample: + $ref: examples/json/AccountCreateOAuthResponse.json + AccountGetResponse: summary: 'Account Get' value: - $ref: examples/json/AccountGetResponseExample.json - AccountVerifyFoundResponseExample: + $ref: examples/json/AccountGetResponse.json + AccountVerifyFoundResponse: summary: 'Account Found' value: - $ref: examples/json/AccountVerifyFoundResponseExample.json - AccountVerifyNotFoundResponseExample: + $ref: examples/json/AccountVerifyFoundResponse.json + AccountVerifyNotFoundResponse: summary: 'Account Not Found' value: - $ref: examples/json/AccountVerifyNotFoundResponseExample.json - ApiAppGetResponseExample: + $ref: examples/json/AccountVerifyNotFoundResponse.json + ApiAppGetResponse: summary: 'API App' value: - $ref: examples/json/ApiAppGetResponseExample.json - ApiAppListResponseExample: + $ref: examples/json/ApiAppGetResponse.json + ApiAppListResponse: summary: 'API App List' value: - $ref: examples/json/ApiAppListResponseExample.json - BulkSendJobGetResponseExample: + $ref: examples/json/ApiAppListResponse.json + BulkSendJobGetResponse: summary: 'Bulk Send Job' value: - $ref: examples/json/BulkSendJobGetResponseExample.json - BulkSendJobListResponseExample: + $ref: examples/json/BulkSendJobGetResponse.json + BulkSendJobListResponse: summary: 'Bulk Send Job List' value: - $ref: examples/json/BulkSendJobListResponseExample.json - EmbeddedEditUrlResponseExample: + $ref: examples/json/BulkSendJobListResponse.json + EmbeddedEditUrlResponse: summary: 'Embedded Edit URL' value: - $ref: examples/json/EmbeddedEditUrlResponseExample.json - EmbeddedSignUrlResponseExample: + $ref: examples/json/EmbeddedEditUrlResponse.json + EmbeddedSignUrlResponse: summary: 'Embedded Sign URL' value: - $ref: examples/json/EmbeddedSignUrlResponseExample.json - Error400ResponseExample: + $ref: examples/json/EmbeddedSignUrlResponse.json + Error400Response: summary: 'Error 400 bad_request' value: - $ref: examples/json/Error400ResponseExample.json - Error401ResponseExample: + $ref: examples/json/Error400Response.json + Error401Response: summary: 'Error 401 unauthorized' value: - $ref: examples/json/Error401ResponseExample.json - Error402ResponseExample: + $ref: examples/json/Error401Response.json + Error402Response: summary: 'Error 402 payment_required' value: - $ref: examples/json/Error402ResponseExample.json - Error403ResponseExample: + $ref: examples/json/Error402Response.json + Error403Response: summary: 'Error 403 forbidden' value: - $ref: examples/json/Error403ResponseExample.json - Error404ResponseExample: + $ref: examples/json/Error403Response.json + Error404Response: summary: 'Error 404 not_found' value: - $ref: examples/json/Error404ResponseExample.json - Error409ResponseExample: + $ref: examples/json/Error404Response.json + Error409Response: summary: 'Error 409 conflict' value: - $ref: examples/json/Error409ResponseExample.json - Error410ResponseExample: + $ref: examples/json/Error409Response.json + Error410Response: summary: 'Error 410 deleted' value: - $ref: examples/json/Error410ResponseExample.json - Error422ResponseExample: + $ref: examples/json/Error410Response.json + Error422Response: summary: 'Error 422 unprocessable_entity' value: - $ref: examples/json/Error422ResponseExample.json - Error429ResponseExample: + $ref: examples/json/Error422Response.json + Error429Response: summary: 'Error 429 exceeded_rate' value: - $ref: examples/json/Error429ResponseExample.json - Error4XXResponseExample: + $ref: examples/json/Error429Response.json + Error4XXResponse: summary: 'Error 4XX failed_operation' value: - $ref: examples/json/Error4XXResponseExample.json - FaxGetResponseExample: + $ref: examples/json/Error4XXResponse.json + FaxGetResponse: summary: 'Fax Response' value: - $ref: examples/json/FaxGetResponseExample.json - FaxLineResponseExample: + $ref: examples/json/FaxGetResponse.json + FaxLineResponse: summary: 'Sample Fax Line Response' value: - $ref: examples/json/FaxLineResponseExample.json - FaxLineAreaCodeGetResponseExample: + $ref: examples/json/FaxLineResponse.json + FaxLineAreaCodeGetResponse: summary: 'Sample Area Code Response' value: - $ref: examples/json/FaxLineAreaCodeGetResponseExample.json - FaxLineListResponseExample: + $ref: examples/json/FaxLineAreaCodeGetResponse.json + FaxLineListResponse: summary: 'Sample Fax Line List Response' value: - $ref: examples/json/FaxLineListResponseExample.json - FaxListResponseExample: - summary: 'Returns the properties and settings of multiple Faxes.' + $ref: examples/json/FaxLineListResponse.json + FaxListResponse: + summary: 'Returns the properties and settings of multiple Faxes' value: - $ref: examples/json/FaxListResponseExample.json - ReportCreateResponseExample: + $ref: examples/json/FaxListResponse.json + ReportCreateResponse: summary: Report value: - $ref: examples/json/ReportCreateResponseExample.json - SignatureRequestGetResponseExample: + $ref: examples/json/ReportCreateResponse.json + SignatureRequestGetResponse: summary: 'Get Signature Request' value: - $ref: examples/json/SignatureRequestGetResponseExample.json - SignatureRequestListResponseExample: + $ref: examples/json/SignatureRequestGetResponse.json + SignatureRequestListResponse: summary: 'List Signature Requests' value: - $ref: examples/json/SignatureRequestListResponseExample.json - AccountUpdateResponseExample: + $ref: examples/json/SignatureRequestListResponse.json + AccountUpdateResponse: summary: 'Account Update' value: - $ref: examples/json/AccountUpdateResponseExample.json - OAuthTokenGenerateResponseExample: + $ref: examples/json/AccountUpdateResponse.json + OAuthTokenGenerateResponse: summary: 'Retrieving the OAuth token' value: - $ref: examples/json/OAuthTokenGenerateResponseExample.json - OAuthTokenRefreshResponseExample: + $ref: examples/json/OAuthTokenGenerateResponse.json + OAuthTokenRefreshResponse: summary: 'Refresh an existing OAuth token' value: - $ref: examples/json/OAuthTokenRefreshResponseExample.json - ApiAppCreateResponseExample: + $ref: examples/json/OAuthTokenRefreshResponse.json + ApiAppCreateResponse: summary: 'API App' value: - $ref: examples/json/ApiAppCreateResponseExample.json - ApiAppUpdateResponseExample: + $ref: examples/json/ApiAppCreateResponse.json + ApiAppUpdateResponse: summary: 'API App Update' value: - $ref: examples/json/ApiAppUpdateResponseExample.json - SignatureRequestCreateEmbeddedResponseExample: + $ref: examples/json/ApiAppUpdateResponse.json + SignatureRequestCreateEmbeddedResponse: summary: 'Create Embedded Signature Request' value: - $ref: examples/json/SignatureRequestCreateEmbeddedResponseExample.json - SignatureRequestCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedResponse.json + SignatureRequestCreateEmbeddedWithTemplateResponse: summary: 'Create Embedded Signature Request With Template' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json - SignatureRequestFilesResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponse.json + SignatureRequestFilesResponse: summary: 'Signature Requests Files' value: - $ref: examples/json/SignatureRequestFilesResponseExample.json - SignatureRequestReleaseHoldResponseExample: + $ref: examples/json/SignatureRequestFilesResponse.json + SignatureRequestReleaseHoldResponse: summary: 'Send Signature Release Hold' value: - $ref: examples/json/SignatureRequestReleaseHoldResponseExample.json - SignatureRequestRemindResponseExample: + $ref: examples/json/SignatureRequestReleaseHoldResponse.json + SignatureRequestRemindResponse: summary: 'Send Signature Request Reminder' value: - $ref: examples/json/SignatureRequestRemindResponseExample.json - SignatureRequestSendResponseExample: + $ref: examples/json/SignatureRequestRemindResponse.json + SignatureRequestSendResponse: summary: 'Send Signature Request' value: - $ref: examples/json/SignatureRequestSendResponseExample.json - SignatureRequestSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestSendResponse.json + SignatureRequestSendWithTemplateResponse: summary: 'Send Signature Request With Template' value: - $ref: examples/json/SignatureRequestSendWithTemplateResponseExample.json - SignatureRequestUpdateResponseExample: + $ref: examples/json/SignatureRequestSendWithTemplateResponse.json + SignatureRequestUpdateResponse: summary: 'Signature Request Update' value: - $ref: examples/json/SignatureRequestUpdateResponseExample.json - SignatureRequestBulkSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestUpdateResponse.json + SignatureRequestBulkSendWithTemplateResponse: summary: 'Send Signature Request With Template' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateResponseExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestBulkSendWithTemplateResponse.json + SignatureRequestBulkCreateEmbeddedWithTemplateResponse: summary: 'Bulk Send Create Embedded Signature Request With Template' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample.json - TeamCreateResponseExample: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponse.json + TeamCreateResponse: summary: 'Team Create' value: - $ref: examples/json/TeamCreateResponseExample.json - TeamMembersResponseExample: + $ref: examples/json/TeamCreateResponse.json + TeamMembersResponse: summary: 'Team Members List' value: - $ref: examples/json/TeamMembersResponseExample.json - TeamRemoveMemberResponseExample: + $ref: examples/json/TeamMembersResponse.json + TeamRemoveMemberResponse: summary: 'Team Remove Member' value: - $ref: examples/json/TeamRemoveMemberResponseExample.json - TeamUpdateResponseExample: + $ref: examples/json/TeamRemoveMemberResponse.json + TeamUpdateResponse: summary: 'Team Update' value: - $ref: examples/json/TeamUpdateResponseExample.json - TeamDoesNotExistResponseExample: + $ref: examples/json/TeamUpdateResponse.json + TeamDoesNotExistResponse: summary: 'Team Does Not Exist' value: - $ref: examples/json/TeamDoesNotExistResponseExample.json - TemplateAddUserResponseExample: + $ref: examples/json/TeamDoesNotExistResponse.json + TemplateAddUserResponse: summary: 'Add User to Template' value: - $ref: examples/json/TemplateAddUserResponseExample.json - TemplateFilesResponseExample: + $ref: examples/json/TemplateAddUserResponse.json + TemplateFilesResponse: summary: 'Template Files' value: - $ref: examples/json/TemplateFilesResponseExample.json - TemplateRemoveUserResponseExample: + $ref: examples/json/TemplateFilesResponse.json + TemplateRemoveUserResponse: summary: 'Remove User from Template' value: - $ref: examples/json/TemplateRemoveUserResponseExample.json - UnclaimedDraftCreateEmbeddedResponseExample: + $ref: examples/json/TemplateRemoveUserResponse.json + UnclaimedDraftCreateEmbeddedResponse: summary: 'Unclaimed Draft Create Embedded' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedResponseExample.json - UnclaimedDraftCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedResponse.json + UnclaimedDraftCreateEmbeddedWithTemplateResponse: summary: 'Unclaimed Draft Create Embedded With Template' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample.json - UnclaimedDraftEditAndResendExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponse.json + UnclaimedDraftEditAndResend: summary: 'Unclaimed Draft Edit and Resend' value: - $ref: examples/json/UnclaimedDraftEditAndResendExample.json - TeamGetResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResend.json + TeamGetResponse: summary: 'Team Get' value: - $ref: examples/json/TeamGetResponseExample.json - TeamGetInfoResponseExample: + $ref: examples/json/TeamGetResponse.json + TeamGetInfoResponse: summary: 'Team Get Info' value: - $ref: examples/json/TeamGetInfoResponseExample.json - TeamInvitesResponseExample: + $ref: examples/json/TeamGetInfoResponse.json + TeamInvitesResponse: summary: 'Team Invites' value: - $ref: examples/json/TeamInvitesResponseExample.json - TeamAddMemberResponseExample: + $ref: examples/json/TeamInvitesResponse.json + TeamAddMemberResponse: summary: 'Team Add Member' value: - $ref: examples/json/TeamAddMemberResponseExample.json - TeamSubTeamsResponseExample: + $ref: examples/json/TeamAddMemberResponse.json + TeamSubTeamsResponse: summary: 'Team Sub Teams List' value: - $ref: examples/json/TeamSubTeamsResponseExample.json - TemplateCreateResponseExample: + $ref: examples/json/TeamSubTeamsResponse.json + TemplateCreateResponse: summary: 'Create Template' value: - $ref: examples/json/TemplateCreateResponseExample.json - TemplateCreateEmbeddedDraftResponseExample: + $ref: examples/json/TemplateCreateResponse.json + TemplateCreateEmbeddedDraftResponse: summary: 'Create Embedded Draft Template' value: - $ref: examples/json/TemplateCreateEmbeddedDraftResponseExample.json - TemplateGetResponseExample: + $ref: examples/json/TemplateCreateEmbeddedDraftResponse.json + TemplateGetResponse: summary: 'Get Template' value: - $ref: examples/json/TemplateGetResponseExample.json - TemplateListResponseExample: + $ref: examples/json/TemplateGetResponse.json + TemplateListResponse: summary: 'List Templates' value: - $ref: examples/json/TemplateListResponseExample.json - TemplateUpdateFilesResponseExample: + $ref: examples/json/TemplateListResponse.json + TemplateUpdateFilesResponse: summary: 'Update Template Files' value: - $ref: examples/json/TemplateUpdateFilesResponseExample.json - UnclaimedDraftCreateResponseExample: + $ref: examples/json/TemplateUpdateFilesResponse.json + UnclaimedDraftCreateResponse: summary: 'Unclaimed Draft Create' value: - $ref: examples/json/UnclaimedDraftCreateResponseExample.json - EventCallbackAccountSignatureRequestSentExample: + $ref: examples/json/UnclaimedDraftCreateResponse.json + EventCallbackAccountSignatureRequestSent: summary: 'Example: signature_request_sent' value: - $ref: examples/json/EventCallbackAccountSignatureRequestSentExample.json - EventCallbackAccountTemplateCreatedExample: + $ref: examples/json/EventCallbackAccountSignatureRequestSent.json + EventCallbackAccountTemplateCreated: summary: 'Example: template_created' value: - $ref: examples/json/EventCallbackAccountTemplateCreatedExample.json - EventCallbackAppAccountConfirmedExample: + $ref: examples/json/EventCallbackAccountTemplateCreated.json + EventCallbackAppAccountConfirmed: summary: 'Example: account_confirmed' value: - $ref: examples/json/EventCallbackAppAccountConfirmedExample.json - EventCallbackAppSignatureRequestSentExample: + $ref: examples/json/EventCallbackAppAccountConfirmed.json + EventCallbackAppSignatureRequestSent: summary: 'Example: signature_request_sent' value: - $ref: examples/json/EventCallbackAppSignatureRequestSentExample.json - EventCallbackAppTemplateCreatedExample: + $ref: examples/json/EventCallbackAppSignatureRequestSent.json + EventCallbackAppTemplateCreated: summary: 'Example: template_created' value: - $ref: examples/json/EventCallbackAppTemplateCreatedExample.json + $ref: examples/json/EventCallbackAppTemplateCreated.json requestBodies: EventCallbackAccountRequest: description: |- @@ -13588,9 +14231,9 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAccountSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAccountSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAccountTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAccountTemplateCreated' EventCallbackAppRequest: description: |- **API App Callback Payloads --** @@ -13601,11 +14244,11 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: account_confirmed_example: - $ref: '#/components/examples/EventCallbackAppAccountConfirmedExample' + $ref: '#/components/examples/EventCallbackAppAccountConfirmed' signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAppSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAppSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAppTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAppTemplateCreated' headers: X-RateLimit-Limit: description: 'The maximum number of requests per hour that you can make.' @@ -13642,6 +14285,7 @@ components: security: - api_key: [] + - oauth2: - account_access - signature_request_access @@ -13669,37 +14313,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: @@ -13722,37 +14361,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: diff --git a/package-lock.json b/package-lock.json index 513f65b..694968c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@dropbox/sign", - "version": "1.8.0", + "version": "1.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dropbox/sign", - "version": "1.8.0", + "version": "1.9.0", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -20,7 +20,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1", @@ -44,12 +44,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -180,18 +181,18 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -207,111 +208,25 @@ } }, "node_modules/@babel/helpers": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", - "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.4.tgz", - "integrity": "sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "dev": true, "dependencies": { - "@babel/types": "^7.25.4" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -543,14 +458,14 @@ } }, "node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -575,14 +490,13 @@ } }, "node_modules/@babel/types": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.4.tgz", - "integrity": "sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -616,6 +530,406 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", + "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", + "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", + "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", + "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", + "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", + "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", + "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", + "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", + "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", + "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", + "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", + "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", + "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", + "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", + "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", + "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", + "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", + "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", + "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", + "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", + "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", + "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", + "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", + "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", + "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1112,9 +1426,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.16.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.1.tgz", - "integrity": "sha512-zJDo7wEadFtSyNz5QITDfRcrhqDvQI1xQNQ0VoizPjM/dVAODqqIUWbJPkvsxmTI0MYRGRikcdjMPhOssnPejQ==", + "version": "20.17.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.24.tgz", + "integrity": "sha512-d7fGCyB96w9BnWQrOsJtpyiSaBcAYYr75bnK6ZRjDbql2cGLj/3GsL5OYmLPNq76l7Gf2q4Rv9J2o6h5CrD9sA==", "dev": true, "dependencies": { "undici-types": "~6.19.2" @@ -1250,9 +1564,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", - "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1492,6 +1806,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1691,9 +2018,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -1832,6 +2159,20 @@ "node": ">=0.4.0" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -1881,12 +2222,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -1899,6 +2238,18 @@ "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es5-ext": { "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", @@ -1952,71 +2303,43 @@ } }, "node_modules/esbuild": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz", - "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==", + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", + "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/linux-loong64": "0.14.54", - "esbuild-android-64": "0.14.54", - "esbuild-android-arm64": "0.14.54", - "esbuild-darwin-64": "0.14.54", - "esbuild-darwin-arm64": "0.14.54", - "esbuild-freebsd-64": "0.14.54", - "esbuild-freebsd-arm64": "0.14.54", - "esbuild-linux-32": "0.14.54", - "esbuild-linux-64": "0.14.54", - "esbuild-linux-arm": "0.14.54", - "esbuild-linux-arm64": "0.14.54", - "esbuild-linux-mips64le": "0.14.54", - "esbuild-linux-ppc64le": "0.14.54", - "esbuild-linux-riscv64": "0.14.54", - "esbuild-linux-s390x": "0.14.54", - "esbuild-netbsd-64": "0.14.54", - "esbuild-openbsd-64": "0.14.54", - "esbuild-sunos-64": "0.14.54", - "esbuild-windows-32": "0.14.54", - "esbuild-windows-64": "0.14.54", - "esbuild-windows-arm64": "0.14.54" - } - }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz", - "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz", - "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "@esbuild/aix-ppc64": "0.25.1", + "@esbuild/android-arm": "0.25.1", + "@esbuild/android-arm64": "0.25.1", + "@esbuild/android-x64": "0.25.1", + "@esbuild/darwin-arm64": "0.25.1", + "@esbuild/darwin-x64": "0.25.1", + "@esbuild/freebsd-arm64": "0.25.1", + "@esbuild/freebsd-x64": "0.25.1", + "@esbuild/linux-arm": "0.25.1", + "@esbuild/linux-arm64": "0.25.1", + "@esbuild/linux-ia32": "0.25.1", + "@esbuild/linux-loong64": "0.25.1", + "@esbuild/linux-mips64el": "0.25.1", + "@esbuild/linux-ppc64": "0.25.1", + "@esbuild/linux-riscv64": "0.25.1", + "@esbuild/linux-s390x": "0.25.1", + "@esbuild/linux-x64": "0.25.1", + "@esbuild/netbsd-arm64": "0.25.1", + "@esbuild/netbsd-x64": "0.25.1", + "@esbuild/openbsd-arm64": "0.25.1", + "@esbuild/openbsd-x64": "0.25.1", + "@esbuild/sunos-x64": "0.25.1", + "@esbuild/win32-arm64": "0.25.1", + "@esbuild/win32-ia32": "0.25.1", + "@esbuild/win32-x64": "0.25.1" } }, "node_modules/escalade": { @@ -2287,15 +2610,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2313,6 +2642,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -2356,11 +2698,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2392,21 +2735,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3417,6 +3750,15 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/memoizee": { "version": "0.4.17", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz", @@ -4137,15 +4479,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/package.json b/package.json index 8720c0c..3fadcbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dropbox/sign", - "version": "1.8.0", + "version": "1.9.0", "description": "Official Node client for Dropbox Sign", "repository": { "type": "git", @@ -18,7 +18,7 @@ }, "author": "Dropbox Sign", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -30,7 +30,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1", diff --git a/run-build b/run-build index 09afd7e..7a26bec 100755 --- a/run-build +++ b/run-build @@ -22,7 +22,7 @@ rm -f "${DIR}/types/model/"*.ts docker run --rm \ -v "${DIR}/:/local" \ --user "$(id -u):$(id -g)" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ @@ -102,6 +102,9 @@ docker run --rm \ -w "${WORKING_DIR}" \ perl bash ./bin/scan_for +printf "Adding old-style constant names ...\n" +bash "${DIR}/bin/php" ./bin/copy-constants.php + printf "Running build ...\n" bash "${DIR}/bin/node" npm run build bash "${DIR}/bin/node" npm run build-types diff --git a/templates/api-single.mustache b/templates/api-single.mustache index cd57b31..da92137 100644 --- a/templates/api-single.mustache +++ b/templates/api-single.mustache @@ -201,6 +201,10 @@ export class {{classname}} { {{#allParams}} * @param {{paramName}} {{description}} {{/allParams}} + {{#isDeprecated}} + * + * @deprecated + {{/isDeprecated}} {{#useCustomTemplateCode}} * @param options {{/useCustomTemplateCode}} diff --git a/templates/dropbox-README.mustache b/templates/dropbox-README.mustache index de052d2..828b0ec 100644 --- a/templates/dropbox-README.mustache +++ b/templates/dropbox-README.mustache @@ -56,12 +56,6 @@ REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_TypeScript_CODE ``` -### JavaScript Example - -```javascript -REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_JavaScript_CODE -``` - {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} ## API Endpoints diff --git a/templates/dropbox-api-doc.mustache b/templates/dropbox-api-doc.mustache index b85a3ea..432d2af 100644 --- a/templates/dropbox-api-doc.mustache +++ b/templates/dropbox-api-doc.mustache @@ -25,12 +25,6 @@ All URIs are relative to {{basePath}}. REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_TypeScript_CODE ``` -### JavaScript Example - -```javascript -REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_JavaScript_CODE -``` - ### Parameters {{#vendorExtensions.x-group-parameters}} diff --git a/templates/model.mustache b/templates/model.mustache index a55b8f1..efc79f4 100644 --- a/templates/model.mustache +++ b/templates/model.mustache @@ -27,9 +27,20 @@ export {{#vendorExtensions.x-base-class}}abstract {{/vendorExtensions.x-base-cla {{#description}} /** * {{{.}}} + {{#deprecated}} + * + * @deprecated + {{/deprecated}} */ {{/description}} {{^useCustomTemplateCode}} +{{^description}} + {{#deprecated}} + /** + * @deprecated + */ + {{/deprecated}} +{{/description}} '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{#defaultValue}} = {{#isEnum}}{{classname}}.{{/isEnum}}{{{.}}}{{/defaultValue}}; {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} diff --git a/templates/models.mustache b/templates/models.mustache index 8443f93..4285d09 100644 --- a/templates/models.mustache +++ b/templates/models.mustache @@ -100,6 +100,23 @@ let typeMap: {[index: string]: any} = { {{/models}} } {{/useCustomTemplateCode}} +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -150,20 +167,35 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); } else { @@ -198,22 +230,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { diff --git a/templates/package.mustache b/templates/package.mustache index ea815e4..7b289f6 100644 --- a/templates/package.mustache +++ b/templates/package.mustache @@ -18,7 +18,7 @@ }, "author": "Dropbox Sign", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -30,7 +30,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1", diff --git a/types/api/apis.d.ts b/types/api/apis.d.ts index 54ed75f..30607a8 100644 --- a/types/api/apis.d.ts +++ b/types/api/apis.d.ts @@ -23,7 +23,7 @@ export interface returnTypeI { body?: any; } export declare const queryParamsSerializer: (params: any) => string; -export declare const USER_AGENT = "OpenAPI-Generator/1.8.0/node"; +export declare const USER_AGENT = "OpenAPI-Generator/1.9.0/node"; export declare const generateFormData: (obj: any, typemap: AttributeTypeMap) => { localVarUseFormData: boolean; data: object; diff --git a/types/api/signatureRequestApi.d.ts b/types/api/signatureRequestApi.d.ts index 58a02bd..54c21ae 100644 --- a/types/api/signatureRequestApi.d.ts +++ b/types/api/signatureRequestApi.d.ts @@ -1,4 +1,4 @@ -import { Authentication, BulkSendJobSendResponse, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest } from "../model"; +import { Authentication, BulkSendJobSendResponse, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest } from "../model"; import { optionsI, returnTypeI, returnTypeT } from "./"; export declare enum SignatureRequestApiApiKeys { } @@ -29,6 +29,10 @@ export declare class SignatureRequestApi { signatureRequestCancel(signatureRequestId: string, options?: optionsI): Promise; signatureRequestCreateEmbedded(signatureRequestCreateEmbeddedRequest: SignatureRequestCreateEmbeddedRequest, options?: optionsI): Promise>; signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest: SignatureRequestCreateEmbeddedWithTemplateRequest, options?: optionsI): Promise>; + signatureRequestEdit(signatureRequestId: string, signatureRequestEditRequest: SignatureRequestEditRequest, options?: optionsI): Promise>; + signatureRequestEditEmbedded(signatureRequestId: string, signatureRequestEditEmbeddedRequest: SignatureRequestEditEmbeddedRequest, options?: optionsI): Promise>; + signatureRequestEditEmbeddedWithTemplate(signatureRequestId: string, signatureRequestEditEmbeddedWithTemplateRequest: SignatureRequestEditEmbeddedWithTemplateRequest, options?: optionsI): Promise>; + signatureRequestEditWithTemplate(signatureRequestId: string, signatureRequestEditWithTemplateRequest: SignatureRequestEditWithTemplateRequest, options?: optionsI): Promise>; signatureRequestFiles(signatureRequestId: string, fileType?: "pdf" | "zip", options?: optionsI): Promise>; signatureRequestFilesAsDataUri(signatureRequestId: string, options?: optionsI): Promise>; signatureRequestFilesAsFileUrl(signatureRequestId: string, forceDownload?: number, options?: optionsI): Promise>; diff --git a/types/model/index.d.ts b/types/model/index.d.ts index 664b479..99010c6 100644 --- a/types/model/index.d.ts +++ b/types/model/index.d.ts @@ -63,6 +63,10 @@ import { SignatureRequestBulkCreateEmbeddedWithTemplateRequest } from "./signatu import { SignatureRequestBulkSendWithTemplateRequest } from "./signatureRequestBulkSendWithTemplateRequest"; import { SignatureRequestCreateEmbeddedRequest } from "./signatureRequestCreateEmbeddedRequest"; import { SignatureRequestCreateEmbeddedWithTemplateRequest } from "./signatureRequestCreateEmbeddedWithTemplateRequest"; +import { SignatureRequestEditEmbeddedRequest } from "./signatureRequestEditEmbeddedRequest"; +import { SignatureRequestEditEmbeddedWithTemplateRequest } from "./signatureRequestEditEmbeddedWithTemplateRequest"; +import { SignatureRequestEditRequest } from "./signatureRequestEditRequest"; +import { SignatureRequestEditWithTemplateRequest } from "./signatureRequestEditWithTemplateRequest"; import { SignatureRequestGetResponse } from "./signatureRequestGetResponse"; import { SignatureRequestListResponse } from "./signatureRequestListResponse"; import { SignatureRequestRemindRequest } from "./signatureRequestRemindRequest"; @@ -194,4 +198,4 @@ export declare let enumsMap: { export declare let typeMap: { [index: string]: any; }; -export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateEditResponse, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; +export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateEditResponse, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; diff --git a/types/model/signatureRequestEditEmbeddedRequest.d.ts b/types/model/signatureRequestEditEmbeddedRequest.d.ts new file mode 100644 index 0000000..6c26914 --- /dev/null +++ b/types/model/signatureRequestEditEmbeddedRequest.d.ts @@ -0,0 +1,42 @@ +import { AttributeTypeMap, RequestFile } from "./"; +import { SubAttachment } from "./subAttachment"; +import { SubCustomField } from "./subCustomField"; +import { SubFieldOptions } from "./subFieldOptions"; +import { SubFormFieldGroup } from "./subFormFieldGroup"; +import { SubFormFieldRule } from "./subFormFieldRule"; +import { SubFormFieldsPerDocumentBase } from "./subFormFieldsPerDocumentBase"; +import { SubSignatureRequestGroupedSigners } from "./subSignatureRequestGroupedSigners"; +import { SubSignatureRequestSigner } from "./subSignatureRequestSigner"; +import { SubSigningOptions } from "./subSigningOptions"; +export declare class SignatureRequestEditEmbeddedRequest { + "clientId": string; + "files"?: Array; + "fileUrls"?: Array; + "signers"?: Array; + "groupedSigners"?: Array; + "allowDecline"?: boolean; + "allowReassign"?: boolean; + "attachments"?: Array; + "ccEmailAddresses"?: Array; + "customFields"?: Array; + "fieldOptions"?: SubFieldOptions; + "formFieldGroups"?: Array; + "formFieldRules"?: Array; + "formFieldsPerDocument"?: Array; + "hideTextTags"?: boolean; + "message"?: string; + "metadata"?: { + [key: string]: any; + }; + "signingOptions"?: SubSigningOptions; + "subject"?: string; + "testMode"?: boolean; + "title"?: string; + "useTextTags"?: boolean; + "populateAutoFillFields"?: boolean; + "expiresAt"?: number | null; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SignatureRequestEditEmbeddedRequest; +} diff --git a/types/model/signatureRequestEditEmbeddedWithTemplateRequest.d.ts b/types/model/signatureRequestEditEmbeddedWithTemplateRequest.d.ts new file mode 100644 index 0000000..6824ad1 --- /dev/null +++ b/types/model/signatureRequestEditEmbeddedWithTemplateRequest.d.ts @@ -0,0 +1,28 @@ +import { AttributeTypeMap, RequestFile } from "./"; +import { SubCC } from "./subCC"; +import { SubCustomField } from "./subCustomField"; +import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplateSigner"; +import { SubSigningOptions } from "./subSigningOptions"; +export declare class SignatureRequestEditEmbeddedWithTemplateRequest { + "templateIds": Array; + "clientId": string; + "signers": Array; + "allowDecline"?: boolean; + "ccs"?: Array; + "customFields"?: Array; + "files"?: Array; + "fileUrls"?: Array; + "message"?: string; + "metadata"?: { + [key: string]: any; + }; + "signingOptions"?: SubSigningOptions; + "subject"?: string; + "testMode"?: boolean; + "title"?: string; + "populateAutoFillFields"?: boolean; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SignatureRequestEditEmbeddedWithTemplateRequest; +} diff --git a/types/model/signatureRequestEditRequest.d.ts b/types/model/signatureRequestEditRequest.d.ts new file mode 100644 index 0000000..91a01f7 --- /dev/null +++ b/types/model/signatureRequestEditRequest.d.ts @@ -0,0 +1,43 @@ +import { AttributeTypeMap, RequestFile } from "./"; +import { SubAttachment } from "./subAttachment"; +import { SubCustomField } from "./subCustomField"; +import { SubFieldOptions } from "./subFieldOptions"; +import { SubFormFieldGroup } from "./subFormFieldGroup"; +import { SubFormFieldRule } from "./subFormFieldRule"; +import { SubFormFieldsPerDocumentBase } from "./subFormFieldsPerDocumentBase"; +import { SubSignatureRequestGroupedSigners } from "./subSignatureRequestGroupedSigners"; +import { SubSignatureRequestSigner } from "./subSignatureRequestSigner"; +import { SubSigningOptions } from "./subSigningOptions"; +export declare class SignatureRequestEditRequest { + "files"?: Array; + "fileUrls"?: Array; + "signers"?: Array; + "groupedSigners"?: Array; + "allowDecline"?: boolean; + "allowReassign"?: boolean; + "attachments"?: Array; + "ccEmailAddresses"?: Array; + "clientId"?: string; + "customFields"?: Array; + "fieldOptions"?: SubFieldOptions; + "formFieldGroups"?: Array; + "formFieldRules"?: Array; + "formFieldsPerDocument"?: Array; + "hideTextTags"?: boolean; + "isEid"?: boolean; + "message"?: string; + "metadata"?: { + [key: string]: any; + }; + "signingOptions"?: SubSigningOptions; + "signingRedirectUrl"?: string; + "subject"?: string; + "testMode"?: boolean; + "title"?: string; + "useTextTags"?: boolean; + "expiresAt"?: number | null; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SignatureRequestEditRequest; +} diff --git a/types/model/signatureRequestEditWithTemplateRequest.d.ts b/types/model/signatureRequestEditWithTemplateRequest.d.ts new file mode 100644 index 0000000..5dc2d73 --- /dev/null +++ b/types/model/signatureRequestEditWithTemplateRequest.d.ts @@ -0,0 +1,29 @@ +import { AttributeTypeMap, RequestFile } from "./"; +import { SubCC } from "./subCC"; +import { SubCustomField } from "./subCustomField"; +import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplateSigner"; +import { SubSigningOptions } from "./subSigningOptions"; +export declare class SignatureRequestEditWithTemplateRequest { + "templateIds": Array; + "signers": Array; + "allowDecline"?: boolean; + "ccs"?: Array; + "clientId"?: string; + "customFields"?: Array; + "files"?: Array; + "fileUrls"?: Array; + "isEid"?: boolean; + "message"?: string; + "metadata"?: { + [key: string]: any; + }; + "signingOptions"?: SubSigningOptions; + "signingRedirectUrl"?: string; + "subject"?: string; + "testMode"?: boolean; + "title"?: string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SignatureRequestEditWithTemplateRequest; +} diff --git a/types/model/subFormFieldRuleAction.d.ts b/types/model/subFormFieldRuleAction.d.ts index 4312277..650f986 100644 --- a/types/model/subFormFieldRuleAction.d.ts +++ b/types/model/subFormFieldRuleAction.d.ts @@ -11,7 +11,9 @@ export declare class SubFormFieldRuleAction { } export declare namespace SubFormFieldRuleAction { enum TypeEnum { + ChangeFieldVisibility = "change-field-visibility", FieldVisibility = "change-field-visibility", + ChangeGroupVisibility = "change-group-visibility", GroupVisibility = "change-group-visibility" } } From 8a34af0ad328b516f0c03f0c3f081c327169a342 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 15 May 2025 12:43:30 -0500 Subject: [PATCH 2/2] Add edit&resend to OpenAPI docs, and note that it uses quota --- api/signatureRequestApi.ts | 8 ++++---- dist/api.js | 8 ++++---- docs/api/SignatureRequestApi.md | 8 ++++---- openapi-sdk.yaml | 30 ++++++++++++++---------------- 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/api/signatureRequestApi.ts b/api/signatureRequestApi.ts index 845c9f7..474ebb7 100644 --- a/api/signatureRequestApi.ts +++ b/api/signatureRequestApi.ts @@ -829,7 +829,7 @@ export class SignatureRequestApi { }); } /** - * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend *will* deduct your signature request quota. * @summary Edit Signature Request * @param signatureRequestId The id of the SignatureRequest to edit. * @param signatureRequestEditRequest @@ -991,7 +991,7 @@ export class SignatureRequestApi { }); } /** - * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Edit and resend *will* deduct your signature request quota. * @summary Edit Embedded Signature Request * @param signatureRequestId The id of the SignatureRequest to edit. * @param signatureRequestEditEmbeddedRequest @@ -1153,7 +1153,7 @@ export class SignatureRequestApi { }); } /** - * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Edit and resend *will* deduct your signature request quota. * @summary Edit Embedded Signature Request with Template * @param signatureRequestId The id of the SignatureRequest to edit. * @param signatureRequestEditEmbeddedWithTemplateRequest @@ -1315,7 +1315,7 @@ export class SignatureRequestApi { }); } /** - * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend *will* deduct your signature request quota. * @summary Edit Signature Request With Template * @param signatureRequestId The id of the SignatureRequest to edit. * @param signatureRequestEditWithTemplateRequest diff --git a/dist/api.js b/dist/api.js index cafbd1b..c385a9a 100644 --- a/dist/api.js +++ b/dist/api.js @@ -31335,7 +31335,7 @@ var SignatureRequestApi = class { }); } /** - * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend *will* deduct your signature request quota. * @summary Edit Signature Request * @param signatureRequestId The id of the SignatureRequest to edit. * @param signatureRequestEditRequest @@ -31466,7 +31466,7 @@ var SignatureRequestApi = class { }); } /** - * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Edit and resend *will* deduct your signature request quota. * @summary Edit Embedded Signature Request * @param signatureRequestId The id of the SignatureRequest to edit. * @param signatureRequestEditEmbeddedRequest @@ -31597,7 +31597,7 @@ var SignatureRequestApi = class { }); } /** - * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Edit and resend *will* deduct your signature request quota. * @summary Edit Embedded Signature Request with Template * @param signatureRequestId The id of the SignatureRequest to edit. * @param signatureRequestEditEmbeddedWithTemplateRequest @@ -31728,7 +31728,7 @@ var SignatureRequestApi = class { }); } /** - * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend *will* deduct your signature request quota. * @summary Edit Signature Request With Template * @param signatureRequestId The id of the SignatureRequest to edit. * @param signatureRequestEditWithTemplateRequest diff --git a/docs/api/SignatureRequestApi.md b/docs/api/SignatureRequestApi.md index 2590d0d..04b197f 100644 --- a/docs/api/SignatureRequestApi.md +++ b/docs/api/SignatureRequestApi.md @@ -529,7 +529,7 @@ signatureRequestEdit(signatureRequestId: string, signatureRequestEditRequest: Si Edit Signature Request -Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend *will* deduct your signature request quota. ### TypeScript Example @@ -636,7 +636,7 @@ signatureRequestEditEmbedded(signatureRequestId: string, signatureRequestEditEmb Edit Embedded Signature Request -Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Edit and resend *will* deduct your signature request quota. ### TypeScript Example @@ -735,7 +735,7 @@ signatureRequestEditEmbeddedWithTemplate(signatureRequestId: string, signatureRe Edit Embedded Signature Request with Template -Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Edit and resend *will* deduct your signature request quota. ### TypeScript Example @@ -822,7 +822,7 @@ signatureRequestEditWithTemplate(signatureRequestId: string, signatureRequestEdi Edit Signature Request With Template -Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend *will* deduct your signature request quota. ### TypeScript Example diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 2a95555..c832450 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -3414,7 +3414,7 @@ paths: description: |- Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - **NOTE:** Edit and resend will not deduct your signature request quota. + **NOTE:** Edit and resend *will* deduct your signature request quota. operationId: signatureRequestEdit parameters: - @@ -3455,7 +3455,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: example: - $ref: '#/components/examples/SignatureRequestEditResponse' + $ref: '#/components/examples/SignatureRequestSendResponse' '4XX': description: failed_operation content: @@ -3526,14 +3526,15 @@ paths: seo: title: 'Edit Signature Request | REST API | Dropbox Sign for Developers' description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest with the submitted documents, click here.' - x-hideOn: doc - x-beta: closed '/signature_request/edit_embedded/{signature_request_id}': put: tags: - 'Signature Request' summary: 'Edit Embedded Signature Request' - description: 'Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + description: |- + Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + **NOTE:** Edit and resend *will* deduct your signature request quota. operationId: signatureRequestEditEmbedded parameters: - @@ -3574,7 +3575,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: example: - $ref: '#/components/examples/SignatureRequestEditEmbeddedResponse' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponse' '4XX': description: failed_operation content: @@ -3644,14 +3645,15 @@ paths: seo: title: 'Edit Embedded Signature Request | Dropbox Sign for Developers' description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to edit a SignatureRequest in an iFrame, click here.' - x-hideOn: doc - x-beta: closed '/signature_request/edit_embedded_with_template/{signature_request_id}': put: tags: - 'Signature Request' summary: 'Edit Embedded Signature Request with Template' - description: 'Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + description: |- + Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + **NOTE:** Edit and resend *will* deduct your signature request quota. operationId: signatureRequestEditEmbeddedWithTemplate parameters: - @@ -3690,7 +3692,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: example: - $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateResponse' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponse' '4XX': description: failed_operation content: @@ -3760,8 +3762,6 @@ paths: seo: title: 'Signature Request with Template | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based on the given Template, click here.' - x-hideOn: doc - x-beta: closed '/signature_request/edit_with_template/{signature_request_id}': put: tags: @@ -3770,7 +3770,7 @@ paths: description: |- Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. - **NOTE:** Edit and resend will not deduct your signature request quota. + **NOTE:** Edit and resend *will* deduct your signature request quota. operationId: signatureRequestEditWithTemplate parameters: - @@ -3809,7 +3809,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: example: - $ref: '#/components/examples/SignatureRequestEditWithTemplateResponse' + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponse' '4XX': description: failed_operation content: @@ -3880,8 +3880,6 @@ paths: seo: title: 'Edit Signature Request with Template | API Documentation | Dropbox Sign for Developers' description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based off of the Template, click here.' - x-hideOn: doc - x-beta: closed '/signature_request/files/{signature_request_id}': get: tags: