@yaakadev/nest-yousign
v0.0.1
Published
Nest Wrapper for the YouSign API
Downloads
1
Readme
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);