Skip to content

Commit

Permalink
29 implement docusign webhook listener (#49)
Browse files Browse the repository at this point in the history
* added event data for all events except envelope discard, recipient auto responded, recipient authentication failure, and recipient delegate

* setup webhook api route

* separated source code into a src folder and created a docusign webhook simulate tool

* removed key and added TODO for docusign auth
  • Loading branch information
gcarvellas authored Nov 1, 2023
1 parent 8a818ca commit c117c51
Show file tree
Hide file tree
Showing 102 changed files with 1,899 additions and 468 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
ignore = E501, E123
exclude = __init__.py
exclude = __init__.py, venv
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ setup:
pip install -r requirements.txt

check: # TODO separate into production build setup
python3 -m mypy .
python3 -m flake8 .
cd ./src && python3 -m mypy .
cd ./src && python3 -m flake8 .

run: setup
uvicorn app:app --reload --workers 2 --host 0.0.0.0 --port 3001
cd ./src && uvicorn app:app --reload --workers 2 --host 0.0.0.0 --port 3001

clean:
find . -type f -name ‘*.pyc’ -delete
find . -type f -name ‘*.pyc’ -delete

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions docs/docusign-events/creation-workflow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Creation workflow

1. 20231031232049-envelope-created.json: Contract is first generated.
2. 20231031232106-recipient-sent.json: An email is sent to the signer.
3. 20231031232108-envelope-sent.json: The envelope has been sent to the signer.

* Signer fills out the form, but doesn't click "Finish" yet

4. 20231031232209-recipient-delivered.json: Signer finished fields

* Signer clicks "Finish"

5. 20231031232305-recipient-completed.json: Signer finished all fields

* These are for the approver

6. 20231031232307-recipient-sent.json: An email is sent to the approver.
7. 20231031232411-recipient-delivered.json: Approver has finished fields (aka approver has finished signing)
8. 20231031232414-envelope-delivered.json: Envelope is being made
9. 20231031232433-recipient-completed.json: Approver has finished all fields
10. 20231031232435-envelope-completed.json: Contract has been made

Large diffs are not rendered by default.

141 changes: 141 additions & 0 deletions docs/docusign-events/random-events/20231031173403-recipient-sent.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"event": "envelope-created", "apiVersion": "v2.1", "uri": "/restapi/v2.1/accounts/6f7fcdd0-bc7f-484b-8a15-ed3af04c16ff/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0", "retryCount": 0, "configurationId": 10352224, "generatedDateTime": "2023-10-31T21:48:03.3822098Z", "data": {"accountId": "6f7fcdd0-bc7f-484b-8a15-ed3af04c16ff", "userId": "a6adfbcf-b92b-4754-80e4-21702de884f9", "envelopeId": "e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0", "envelopeSummary": {"status": "created", "documentsUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0/documents", "recipientsUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0/recipients", "attachmentsUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0/attachments", "envelopeUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0", "emailSubject": "", "envelopeId": "e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0", "signingLocation": "online", "customFieldsUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0/custom_fields", "notificationUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0/notification", "enableWetSign": "true", "allowMarkup": "false", "allowReassign": "true", "createdDateTime": "2023-10-31T21:48:03.29Z", "lastModifiedDateTime": "2023-10-31T21:48:03.303Z", "statusChangedDateTime": "2023-10-31T21:48:03.29Z", "documentsCombinedUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0/documents/combined", "certificateUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0/documents/certificate", "templatesUri": "/envelopes/e03b5c92-5fd7-4f9d-bbf2-e16fcf8c36b0/templates", "expireEnabled": "true", "expireAfter": "120", "sender": {"userName": "Kevin Ha", "userId": "a6adfbcf-b92b-4754-80e4-21702de884f9", "accountId": "6f7fcdd0-bc7f-484b-8a15-ed3af04c16ff", "email": "kevtaco123@gmail.com", "ipAddress": "69.114.96.68"}, "purgeState": "unpurged", "envelopeIdStamping": "true", "is21CFRPart11": "false", "signerCanSignOnMobile": "true", "autoNavigation": "true", "isSignatureProviderEnvelope": "false", "hasFormDataChanged": "false", "allowComments": "true", "hasComments": "false", "allowViewHistory": "true", "envelopeMetadata": {"allowAdvancedCorrect": "true", "enableSignWithNotary": "true", "allowCorrect": "true"}, "anySigner": null, "envelopeLocation": "current_site", "isDynamicEnvelope": "false", "burnDefaultTabData": "false"}}}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions lambdaFunctions/docusignLambda/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions lambdaFunctions/docusignLambda/Docusign.py

This file was deleted.

33 changes: 0 additions & 33 deletions lambdaFunctions/docusignLambda/GoogleDrive.py

This file was deleted.

80 changes: 0 additions & 80 deletions lambdaFunctions/docusignLambda/README.md

This file was deleted.

Loading

0 comments on commit c117c51

Please sign in to comment.