Skip to content

Commit

Permalink
SDK-2214 upgrade to yoti v4 (#177)
Browse files Browse the repository at this point in the history
* Updated yoti to v4.
* Updated examples.
* Aligned dependencies.
* Updated README.md, world.js and idv.sandbox.error.js to rename doc scan to IDV. 
* Minor copy changes only.
  • Loading branch information
laurent-yoti committed Jan 19, 2023
1 parent 7786e17 commit 81eb3ce
Show file tree
Hide file tree
Showing 102 changed files with 43,401 additions and 12,841 deletions.
6 changes: 4 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ updates:
target-branch: development
reviewers:
- laurent-yoti
- vishmimoney
- taranchauhan
- michaelyoti
- liam-yoti
- manuel-yoti
- abdalmajeed-yoti
assignees:
- laurent-yoti
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- run: pushd ./examples/profile && npm install && npm update && npm run lint && popd

- run: pushd ./examples/doc_scan && npm install && npm update && npm run lint && popd
- run: pushd ./examples/idv && npm install && npm update && npm run lint && popd

node-compatibility:
name: Node ${{ matrix.node-version }}
Expand All @@ -70,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [6, 8, 9, 10, 11, 12, 13, 14]
node-version: [14, 16, 18]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run pre-commit
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,28 @@ const sandboxProfileClient = new SandboxProfileClientBuilder()
.build();
```

### Doc Scan
### IDV

#### Doc Scan Client
#### IDV Client

Point the Doc Scan client at the sandbox by setting environment variable `YOTI_DOC_SCAN_API_URL` to https://api.yoti.com/sandbox/idverify/v1
Point the IDV client at the sandbox by setting environment variable `YOTI_IDV_API_URL` to https://api.yoti.com/sandbox/idverify/v1

```javascript
const { DocScanClient } = require('yoti');
const { IDVClient } = require('yoti');
const fs = require('fs');

const SANDBOX_CLIENT_SDK_ID = 'SANDBOX_CLIENT_SDK_ID';
const PEM = fs.readFileSync('/path/to/your-pem-file.pem', 'utf8');

const docScanClient = new DocScanClient(SANDBOX_CLIENT_SDK_ID, PEM);
const idvClient = new IDVClient(SANDBOX_CLIENT_SDK_ID, PEM);
```

#### Doc Scan Sandbox Client
#### IDV Sandbox Client

```javascript
const { SandboxDocScanClientBuilder } = require('@getyoti/sdk-sandbox');
const { SandboxIDVClientBuilder } = require('@getyoti/sdk-sandbox');

const sandboxClient = new SandboxDocScanClientBuilder()
const sandboxClient = new SandboxIDVClientBuilder()
.withClientSdkId(SANDBOX_CLIENT_SDK_ID)
.withPemString(PEM)
.build();
Expand All @@ -87,4 +87,4 @@ const sandboxClient = new SandboxDocScanClientBuilder()
## Examples

- [Profile Sandbox](examples/profile)
- [Doc Scan Sandbox](examples/doc_scan)
- [IDV Sandbox](examples/idv)
Loading

0 comments on commit 81eb3ce

Please sign in to comment.