2.0.2 • Published 3 years ago
@simple-dealer/autofill-puppeteer-client v2.0.2
Description
Client library to connect to Simple Dealer's Autofill from the web
Pre-Requisites
Installation
Add this as a dependency to your project using npm with
$ npm i @simple-dealer/autofill-puppeteer-client
or using Yarn with
$ yarn add @simple-dealer/autofill-puppeteer-client
Usage
Connect to autofill client
import {
createDownloadAutofillDaemon,
errors,
createHandleAutofillS3,
createHandleAutofillWs,
listenToDaemon
} from '@simple-dealer/autofill-puppeteer-client'
const s3 = {
accessKeyId: '',
secretAccessKey: '',
region: ''
};
const { connected } = listenToDaemon()
const autoFillClient = connected ? createHandleAutofillWs() : createHandleAutofillS3({ s3 })
const downloadAutofillDaemon = createDownloadAutofillDaemon()
Autofill lender
try {
await autoFillClient({
lenders,
mainApplicant,
coApplicant,
deal,
userInformation,
type: 'lender'
})
alert('Autofill started')
} catch (e) {
if (equals(e, errors.DaemonNotInstalledError)) downloadAutofillDaemon()
if (equals(e, errors.AutofillUnknownError)) alert('Unknown error occurred')
}
Autofill OFAC
try {
await autoFillClient({
mainApplicant,
type: 'ofac'
})
alert('Autofill started')
} catch (e) {
if (equals(e, errors.DaemonNotInstalledError)) downloadAutofillDaemon()
if (equals(e, errors.AutofillUnknownError)) alert('Unknown error occurred')
}
Test Lender
try {
await autoFillClient({
lenders: [
{
"exists": true,
"platform": "sheffield",
"name": "sheffield",
"credentials": {
"username": "",
"password": ""
}
}
],
type: 'test'
})
alert('Autofill started')
} catch (e) {
if (equals(e, errors.DaemonNotInstalledError)) downloadAutofillDaemon()
if (equals(e, errors.AutofillUnknownError)) alert('Unknown error occurred')
}
Get detailed parameters - here
2.0.2
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.1.4-alpha
3 years ago
1.0.0
3 years ago
1.1.1-alpha
3 years ago
1.1.2-alpha
3 years ago
1.1.0-alpha
3 years ago
0.2.21
3 years ago
0.2.20
3 years ago
0.2.19
3 years ago
0.2.18
3 years ago
0.2.17
3 years ago
0.2.16
3 years ago
0.2.15
3 years ago
0.2.14
3 years ago
0.2.13
3 years ago
0.2.12
3 years ago
0.2.11
3 years ago
0.2.10
4 years ago
0.2.9
4 years ago
0.2.7
4 years ago
0.2.6
4 years ago
0.2.8
4 years ago
0.2.3
4 years ago
0.2.5
4 years ago
0.2.4
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.9
4 years ago
0.2.2
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago