Skip to content

Commit cab87ab

Browse files
Merge pull request #121 from regulaforensics/SP-12336/Keycloak_example
SP-12336: Keyckloak example
2 parents b263cf8 + 0ffac13 commit cab87ab

36 files changed

+5861
-22
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/dist/*
22
/lib/*
3-
/example/*
43
!.*

.eslintrc.cjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,12 @@ module.exports = {
88
rules: {
99
'@typescript-eslint/no-explicit-any': ['warn'],
1010
},
11+
overrides: [
12+
{
13+
files: ['./examples/**'],
14+
rules: {
15+
'@typescript-eslint/no-unused-vars': 'off',
16+
}
17+
},
18+
]
1119
};

.github/workflows/run-smoke-test.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ jobs:
1616
registry-url: https://registry.npmjs.org/
1717
- run: npm install
1818
- run: npm run build
19-
- run: npm install
20-
working-directory: ./example
21-
- run: node --unhandled-rejections=strict index.js
22-
working-directory: ./example
19+
- run: npm install && node --unhandled-rejections=strict index.js
20+
working-directory: ./examples/basic/
2321
env:
2422
API_BASE_PATH: "https://test-api.regulaforensics.com"
2523
TEST_LICENSE: ${{secrets.TEST_LICENSE}}

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ typings/
6767
.vscode
6868

6969
# Project
70-
/example/portrait.jpg
71-
/example/document-image.jpg
72-
/example/regula.license
70+
**/portrait.jpg
71+
**/document-image.jpg
72+
**/regula.license
73+
7374
.parcel-cache
7475
dist
7576
lib

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Documents recognition as easy as reading two bytes.
1010

1111
If you have any problems with or questions about this client, please contact us
1212
through a [GitHub issue](https://github.com/regulaforensics/DocumentReader-api-js-client/issues).
13-
You are invited to contribute new features, fixes, or updates, large or small.
13+
You are invited to contribute new features, fixes, or updates, large or small.
1414
We are always thrilled to receive pull requests, and do our best to process them as fast as we can.
1515
See [dev guide](https://github.com/regulaforensics/DocumentReader-web-js-client/blob/master/dev.md)
1616

@@ -19,7 +19,7 @@ See [dev guide](https://github.com/regulaforensics/DocumentReader-web-js-client/
1919
```
2020
npm install @regulaforensics/document-reader-webclient
2121
```
22-
## Example
22+
## Basic Example
2323

2424
Performing request:
2525
```js
@@ -38,17 +38,18 @@ Parsing results:
3838
const docNumber = result.text?.getField(DOCUMENT_NUMBER);
3939
const fullName = result.text?.getField(SURNAME_AND_GIVEN_NAMES);
4040
const dateOfBirth = result.text?.getField(DATE_OF_BIRTH);
41-
41+
4242
// graphics fields
4343
const portraitAsBase64 = result.images?.getField(PORTRAIT);
4444
const signatureAsBase64 = result.images?.getField(SIGNATURE);
4545
```
4646
47+
4748
## Compatibility
4849
4950
Language level
5051
* ES5 with some ES6 features [Promise] and whatwg **URL**. If your environment doesn't support ES6 required features, you can polyfill.
51-
* nodejs 10+
52+
* nodejs 18+
5253
5354
Module system
5455
* CommonJS
File renamed without changes.

0 commit comments

Comments
 (0)