@authme/id-recognition 2.4.10 → 2.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('core-js/modules/es.object.assign.js');
6
5
  var engine = require('@authme/engine');
7
6
  require('core-js/modules/es.array.iterator.js');
8
7
  require('core-js/modules/es.object.from-entries.js');
@@ -55,22 +54,16 @@ class CardOCR extends engine.AuthmeEngineModuleBase {
55
54
  this.type = engine.EAuthMeCardClass.Invalid;
56
55
  this.moduleName = engine.EngineModule.CardOCR;
57
56
  }
58
- setType(type) {
57
+ setType(type, options) {
59
58
  this.type = type;
60
59
  return this.engine.run(this.moduleName, 'setType', {
61
- type
60
+ type,
61
+ options
62
62
  });
63
63
  }
64
64
  getType() {
65
65
  return this.type;
66
66
  }
67
- setParams(params) {
68
- var _a;
69
- if (((_a = params.type) !== null && _a !== void 0 ? _a : this.type) === engine.EAuthMeCardClass.Invalid) throw new Error('Please set type first');
70
- return this.engine.run(this.moduleName, 'setParams', Object.assign({
71
- type: this.type
72
- }, params));
73
- }
74
67
  }
75
68
  class IdCardAntiFraudService extends engine.AuthmeEngineModuleBase {
76
69
  constructor(engine$1) {
@@ -284,7 +277,7 @@ function saveExtraDoc(params) {
284
277
  }
285
278
 
286
279
  var name = "@authme/id-recognition";
287
- var version$1 = "2.4.10";
280
+ var version$1 = "2.4.11";
288
281
  var peerDependencies = {
289
282
  "core-js": "^3.6.0"
290
283
  };
package/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import 'core-js/modules/es.object.assign.js';
2
1
  import { AuthmeEngineModuleBase, EAuthMeCardClass, EngineModule } from '@authme/engine';
3
2
  export { EAuthMeCardClass, EAuthMeCardMatchStatus, EAuthMeCardOCRStatus, EAuthMeIDCardAntiFraudStage, EAuthMeIDCardAntiFraudStatus, EAuthMeMRZRecogStatus, EAuthMeMRZServiceStatus } from '@authme/engine';
4
3
  import 'core-js/modules/es.array.iterator.js';
@@ -52,22 +51,16 @@ class CardOCR extends AuthmeEngineModuleBase {
52
51
  this.type = EAuthMeCardClass.Invalid;
53
52
  this.moduleName = EngineModule.CardOCR;
54
53
  }
55
- setType(type) {
54
+ setType(type, options) {
56
55
  this.type = type;
57
56
  return this.engine.run(this.moduleName, 'setType', {
58
- type
57
+ type,
58
+ options
59
59
  });
60
60
  }
61
61
  getType() {
62
62
  return this.type;
63
63
  }
64
- setParams(params) {
65
- var _a;
66
- if (((_a = params.type) !== null && _a !== void 0 ? _a : this.type) === EAuthMeCardClass.Invalid) throw new Error('Please set type first');
67
- return this.engine.run(this.moduleName, 'setParams', Object.assign({
68
- type: this.type
69
- }, params));
70
- }
71
64
  }
72
65
  class IdCardAntiFraudService extends AuthmeEngineModuleBase {
73
66
  constructor(engine) {
@@ -281,7 +274,7 @@ function saveExtraDoc(params) {
281
274
  }
282
275
 
283
276
  var name = "@authme/id-recognition";
284
- var version$1 = "2.4.10";
277
+ var version$1 = "2.4.11";
285
278
  var peerDependencies = {
286
279
  "core-js": "^3.6.0"
287
280
  };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@authme/id-recognition",
3
- "version": "2.4.10",
3
+ "version": "2.4.11",
4
4
  "peerDependencies": {
5
5
  "core-js": "^3.6.0",
6
- "@authme/core": "2.4.10",
7
- "@authme/engine": "2.4.10"
6
+ "@authme/core": "2.4.11",
7
+ "@authme/engine": "2.4.11"
8
8
  },
9
9
  "module": "./index.js",
10
10
  "main": "./index.cjs",
@@ -4,9 +4,10 @@ import { EAuthMeCardClass, EAuthMeIDCardAntiFraudStage } from './enum';
4
4
  export declare class CardOCR extends AuthmeEngineModuleBase<CardOCRResult> {
5
5
  private type;
6
6
  constructor(engine: MlEngine);
7
- setType(type: EAuthMeCardClass): Promise<unknown>;
7
+ setType(type: EAuthMeCardClass, options?: {
8
+ [key: string]: unknown;
9
+ }): Promise<unknown>;
8
10
  getType(): EAuthMeCardClass;
9
- setParams(params: any): Promise<unknown>;
10
11
  }
11
12
  export interface Point {
12
13
  x: number;