Skip to content

update-clients #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/run-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- run: node --unhandled-rejections=strict index.js
working-directory: ./examples/basic/esm
env:
API_BASE_PATH: "https://test-faceapi.regulaforensics.com"
API_BASE_PATH: "https://nightly-faceapi.regulaforensics.com"
- run: npm install
working-directory: ./examples/basic/cjs
- run: node --unhandled-rejections=strict index.js
working-directory: ./examples/basic/cjs
env:
API_BASE_PATH: "https://test-faceapi.regulaforensics.com"
API_BASE_PATH: "https://nightly-faceapi.regulaforensics.com"
12 changes: 3 additions & 9 deletions examples/auth/client/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FaceSdk, ImageSource } from '@regulaforensics/facesdk-webclient';
import fs from 'fs';
import qs from "qs";
import axios from "axios";
import qs from 'qs';
import axios from 'axios';

const GATEWAY_BASE_URL = 'http://localhost:8080';

Expand Down Expand Up @@ -39,13 +39,7 @@ async function get_authorization_token() {
const face1 = fs.readFileSync('face1.jpg').buffer;
const face2 = fs.readFileSync('face2.jpg').buffer;
const token = await get_authorization_token();
const sdk = new FaceSdk({ basePath: apiBasePath, baseOptions: { headers: { Authorization: `Bearer ${token}` }},});

const diagnostic = await sdk.diagnosticsApi.readiness();
console.log('-----------------------------------------------------------------');
console.log(' Diagnostic ');
console.log('-----------------------------------------------------------------');
console.log(diagnostic);
const sdk = new FaceSdk({ basePath: apiBasePath, baseOptions: { headers: { Authorization: `Bearer ${token}` } } });

const matchingResponse = await sdk.matchingApi.match({
tag: '1',
Expand Down
9 changes: 0 additions & 9 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ API_BASE_PATH="http://192.168.0.101:41101" node .

This sample generates next text output:
```text
-----------------------------------------------------------------
Diagnostic
-----------------------------------------------------------------
{
metadata: {
serverTime: '2023-10-20T11:57:46.509152',
ctx: { userIp: 'xxx.xx.xx.xx' }
}
}
-----------------------------------------------------------------
Compare Results
-----------------------------------------------------------------
Expand Down
90 changes: 54 additions & 36 deletions examples/basic/angular/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/basic/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@angular/platform-browser-dynamic": "^15.1.0",
"@angular/router": "^15.1.0",
"@regulaforensics/facesdk-webclient": "file:../../..",
"ngx-json-viewer": "^3.2.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.12.0"
Expand Down
9 changes: 6 additions & 3 deletions examples/basic/angular/src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
display: flex;
flex-direction: column;
gap: 15px;
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
justify-content: center;
align-items: center;
}

.result {
width: 500px;
border: 1px solid #e9e9e9;
padding: 10px;
}

button {
padding: 10px 30px;
color: white;
Expand Down
7 changes: 4 additions & 3 deletions examples/basic/angular/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<div class="container">
Face Sdk
<button (click)="diagnostic()">
Diagnostic
Diagnostic Detection
</button>

<pre>{{ resultObject | json }}</pre>
<div class="result">
<ngx-json-viewer [json]="resultObject"></ngx-json-viewer>
</div>
</div>
14 changes: 12 additions & 2 deletions examples/basic/angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { FaceSdk } from '@regulaforensics/facesdk-webclient';
import { imageBase64 } from './resources';

@Component({
selector: 'app-root',
Expand All @@ -15,7 +16,16 @@ export class AppComponent {
title = 'Face Sdk Web Client Example';

async diagnostic() {
const result = await this.faceSdk.diagnosticsApi.readiness();
this.resultObject = result;
const detectResponse = await this.faceSdk.matchingApi.detect({
tag: '1',
image: imageBase64,
thumbnails: true,
});
const detectResults = detectResponse.results;
if (detectResults) {
detectResults.detections[0].crop = 'base64Image';
detectResults.detections[0].thumbnail = 'base64Thumbnail';
this.resultObject = detectResults;
}
}
}
4 changes: 3 additions & 1 deletion examples/basic/angular/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { NgxJsonViewerModule } from 'ngx-json-viewer';

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule
BrowserModule,
NgxJsonViewerModule
],
providers: [],
bootstrap: [AppComponent],
Expand Down
1 change: 1 addition & 0 deletions examples/basic/angular/src/app/resources.ts

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions examples/basic/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ const fs = require('fs');

const sdk = new FaceSdk({ basePath: apiBasePath });

const diagnostic = await sdk.diagnosticsApi.readiness();
console.log('-----------------------------------------------------------------');
console.log(' Diagnostic ');
console.log('-----------------------------------------------------------------');
console.log(diagnostic);

const matchingResponse = await sdk.matchingApi.match({
images: [
{ type: ImageSource.LIVE, data: face1 },
Expand Down
6 changes: 0 additions & 6 deletions examples/basic/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ import fs from 'fs';
const face2 = fs.readFileSync('../face2.jpg').buffer;
const sdk = new FaceSdk({ basePath: apiBasePath });

const diagnostic = await sdk.diagnosticsApi.readiness();
console.log('-----------------------------------------------------------------');
console.log(' Diagnostic ');
console.log('-----------------------------------------------------------------');
console.log(diagnostic);

const matchingResponse = await sdk.matchingApi.match({
tag: '1',
images: [
Expand Down
3 changes: 3 additions & 0 deletions src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ models/face-sdkresult-code.ts
models/face-sdkresult.ts
models/faces-response-all-of.ts
models/faces-response.ts
models/filter-op.ts
models/filter-search-request.ts
models/group-all-of.ts
models/group-page-all-of.ts
models/group-page.ts
Expand All @@ -44,6 +46,7 @@ models/image-page.ts
models/image-source.ts
models/image.ts
models/index.ts
models/liveness-type.ts
models/match-and-search-request-all-of-images.ts
models/match-and-search-request-all-of.ts
models/match-and-search-request.ts
Expand Down
2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Regula Face SDK Web API
* <a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face Detection</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face Match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face Search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness Assessment</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core
* <a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core
*
* The version of the OpenAPI document: 6.1.0
*
Expand Down
2 changes: 1 addition & 1 deletion src/api/diagnostics-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Regula Face SDK Web API
* <a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face Detection</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face Match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face Search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness Assessment</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core
* <a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core
*
* The version of the OpenAPI document: 6.1.0
*
Expand Down
Loading
Loading