Conversation
- Implemented core API functionality for DocuSign, including methods for listing, creating, and voiding envelopes. - Added configuration and environment setup with example `.env` file. - Included Jest setup and teardown scripts for testing. - Created default configuration and README documentation for usage instructions. - Updated `.gitignore` to exclude build artifacts and added necessary dependencies in `package.json`.
Comment on lines
17
to
21
| "include": [ | ||
| "./*.ts", | ||
| "./**/*.ts", | ||
| "./tests/**/*.ts" | ||
| , "tests/auth.test.js" ], |
There was a problem hiding this comment.
The include array in tsconfig.json has a formatting issue - there's a comma and string literal ("tests/auth.test.js") placed outside the array brackets. This should be moved inside the array to maintain proper JSON syntax:
"include": [
"./*.ts",
"./**/*.ts",
"./tests/**/*.ts",
"tests/auth.test.js"
]This syntax error could cause TypeScript configuration problems during build.
Suggested change
| "include": [ | |
| "./*.ts", | |
| "./**/*.ts", | |
| "./tests/**/*.ts" | |
| , "tests/auth.test.js" ], | |
| "include": [ | |
| "./*.ts", | |
| "./**/*.ts", | |
| "./tests/**/*.ts", | |
| "tests/auth.test.js" | |
| ], |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
seanspeaks
reviewed
Apr 17, 2025
Contributor
seanspeaks
left a comment
There was a problem hiding this comment.
(Pausing but wanted to drop this comment)
| @@ -0,0 +1,308 @@ | |||
| import { OAuth2Requester } from '@friggframework/core'; | |||
|
|
|||
| interface DocuSignConstructorParams { | |||
Contributor
There was a problem hiding this comment.
Docusign (lower case the S)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview:
This PR introduces a new API module (
@friggframework/api-module-docusign) to enable interaction with the DocuSign eSignature REST API within the Frigg framework. It follows the established patterns for Frigg API modules and provides core functionality for managing envelopes and templates.Key Changes & Features:
api.ts,definition.ts,defaultConfig.json,package.json,tsconfig.build.json,.env.example,index.ts,README.md).Apiclass extendsOAuth2Requesterfrom@friggframework/core.getTokenFromCodemethod inapi.tsto handle DocuSign's requirement for HTTP Basic Authentication during the token exchange step.DOCUSIGN_ENVIRONMENT(devvs.prod).base_uri(API host) from the/oauth/userinfoendpoint during authentication (getEntityDetailsindefinition.ts).base_uri(asbase_url) alongside theaccountIdfor correct rehydration of theApiinstance.Apiclass uses thisbaseUriHostandaccountIdto construct the correct base URL for all eSignature API calls.listEnvelopes,getEnvelope,createEnvelope,voidEnvelope.listTemplates,getTemplate. (Implied by tests, ensure methods exist in api.ts)getAuthorizationUri,getTokenFromCode,getUserInfo.frigg.d.tsto provide necessary type declarations for the used parts of@friggframework/core.jest.config.js, setup/teardown).auther.test.jswith the standard Frigg live test structure (requires manual OAuth step), adapted from other modules.testAutherDefinitionusage for structural validation with mocks.api.test.jsfor live testing of implemented API methods against a DocuSign account (requires configured.env).README.md..cursor/rules/api-module-builder-instructions.mdcto reflect patterns and learnings from this implementation (TypeScript focus,definition.tsstructure,defaultConfig.json, core types, etc.).Testing:
.envfile is created from.env.exampleand populated with valid DocuSign developer credentials (Client ID, Secret, Environment) and a test recipient email.npm installandnpm run buildwithin thepackages/v1-ready/docusigndirectory.npm testto execute Jest tests. Theauther.test.jssuite requires manual interaction for the OAuth flow as prompted in the console. Theapi.test.jssuite runs live against the configured DocuSign account.Future Work:
anyin some places).