-
Notifications
You must be signed in to change notification settings - Fork 3
feat: docusign api module #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
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`.
| "include": [ | ||
| "./*.ts", | ||
| "./**/*.ts", | ||
| "./tests/**/*.ts" | ||
| , "tests/auth.test.js" ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| "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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Pausing but wanted to drop this comment)
| @@ -0,0 +1,308 @@ | |||
| import { OAuth2Requester } from '@friggframework/core'; | |||
|
|
|||
| interface DocuSignConstructorParams { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docusign (lower case the S)
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).