@yaakadev/nest-yousign
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Nest YouSign

Wrapper of the YouSign API using NestJS. Only some parts of the api are currently implemented and the rest might need to be added in the future.

Installation

$ npm install --save @yaakadev/nest-yousign

You can now import the module in your app.module.ts:

YouSignModule.forRoot({
    apiUrl: <API_URL>,
    apiKey: <API_KEY>
}),

or

YouSignModule.forRootAsync({
      inject: [ConfigService],
      imports: [ConfigModule],
      useFactory: (configService: ConfigService) => ({
        apiUrl: configService.get<string>('YOU_SIGN_API_URL'),
        apiKey: configService.get<string>('YOU_SIGN_API_KEY'),
      }),
    }),

You can now import the YouSignService anywhere in your code.

Examples

this._youSignService.createSignatureRequest({
    name: `Signature Request ${requestName}`,
    delivery_mode: YouSignSignatureRequestDeliveryMode.email,
    timezone: 'Europe/Paris',
    ordered_signers: false
});
this._youSignService.uploadDocument(
    requestId,
    'signable_document',
    file,
);
this._youSignService.addSignerToSignatureRequest(requestId, {
    ...
});
this._youSignService.activateRequest(requestId);

Readme

Keywords

Package Sidebar

Install

npm i @yaakadev/nest-yousign

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

76.5 kB

Total Files

108

Last publish

Collaborators

  • bygius
  • marco-gautier
  • charlou28