@hiregenius/utils
v3.5.5
Published
Utils service is for using firestore, google secret, salesforce, twilio modules.
Downloads
654
Readme
Utils service
Utils service is for using firestore, google secret, salesforce, twilio modules.
Installation
yarn add @hiregenius/utils
Usage
Import the utils service inside the application module. Use it inside controllers & services & modules.
To use salesforce methods in services first you need to initialize SalesforceAuth: this.salesforceAuth = new SalesforceAuth( this.configService.get('DEFAULT_CONSUMER_KEY'), this.configService.get('NODE_ENV'), this.crypto, this.googleSecret, this.redisClass, this.configService.get('ADMIN_PRIVATE_KEY'), ); Then to create salesforce object like this: const sfClient = await SalesforceClient.createSalesforceClientObject( this.salesforceAuth, account, this.crypto, this.redisClass, ); Then use sfClient for all functions that needed.