@authme/id-recognition 2.7.4 → 2.8.0

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
@@ -374,15 +374,15 @@ const twoWayAuthmeCardClassMap = (() => {
374
374
  })();
375
375
 
376
376
  var name = "authme/sdk";
377
- var version$1 = "2.7.4";
378
- var date = "2024-12-04T02:44:31+0000";
377
+ var version$1 = "2.8.0";
378
+ var date = "2025-01-13T09:38:31+0000";
379
379
  var packageInfo = {
380
380
  name: name,
381
381
  version: version$1,
382
382
  date: date
383
383
  };
384
384
 
385
- function init(type, country, needConfirm, cardTypes, encrypt = true) {
385
+ function initScan(type, country, needConfirm, cardTypes) {
386
386
  // let useCardTypes: any = getCardSubTypes(type, country).map((c) =>
387
387
  // twoWayAuthmeCardClassMap.toServer(c)
388
388
  // );
@@ -394,32 +394,47 @@ function init(type, country, needConfirm, cardTypes, encrypt = true) {
394
394
  scanType: type === exports.IdRecognitionCardType.Passport ? `ALL_Passport` : `${country}_${type}`,
395
395
  cardTypes: useCardTypes,
396
396
  needConfirm,
397
- encrypt,
398
397
  clientInfo: {
399
398
  os: 'web',
400
399
  os_ver: util.osVersion(),
401
400
  client_ver: packageInfo.version
402
401
  }
403
402
  };
403
+ const customParameters = util.Storage.getItem('customParameters');
404
+ if (customParameters) {
405
+ body['customParameters'] = customParameters;
406
+ }
404
407
  return core.sendRequest('/api/identity-verification/id-recognition/v3/init-scan', 'POST', {
405
408
  body: JSON.stringify(body)
406
409
  });
407
410
  }
408
- function initScanDocument(scanId, cardType) {
409
- const body = {
410
- scanId,
411
- cardType
412
- };
413
- return core.sendRequest('/api/identity-verification/id-recognition/v3/init-scan-doc', 'POST', {
411
+ // export function initScanDocument(
412
+ // scanId: string,
413
+ // cardType: string
414
+ // ): Promise<InitScanDocumentParams> {
415
+ function initScanDocument(body) {
416
+ // const body = {
417
+ // scanId,
418
+ // cardType,
419
+ // };
420
+ let encryptApiPath = '';
421
+ if (body.encryptedBase64String) {
422
+ encryptApiPath = `/encrypted`;
423
+ }
424
+ return core.sendRequest(`/api/identity-verification/id-recognition/v3/init-scan-doc${encryptApiPath}`, 'POST', {
414
425
  body: JSON.stringify(body)
415
426
  });
416
427
  }
417
- function initScanDocumentResourceBase64(scanId, ResourceId) {
418
- const body = {
419
- scanId,
420
- ResourceId
421
- };
422
- return core.sendRequest('/api/identity-verification/id-recognition/v3/init-scan-doc/resource/base64', 'POST', {
428
+ // export function initScanDocumentResourceBase64(
429
+ // scanId: string,
430
+ // ResourceId: string
431
+ // ): Promise<InitScanDocumentResourceBase64Params> {
432
+ function initScanDocumentResourceBase64(body) {
433
+ let encryptApiPath = '';
434
+ if (body.encryptedBase64String) {
435
+ encryptApiPath = `/encrypted`;
436
+ }
437
+ return core.sendRequest(`/api/identity-verification/id-recognition/v3/init-scan-doc/resource/base64${encryptApiPath}`, 'POST', {
423
438
  body: JSON.stringify(body)
424
439
  });
425
440
  }
@@ -441,16 +456,19 @@ function recognition(documentId, file) {
441
456
  throw error;
442
457
  });
443
458
  }
444
- function recognitionEncrypt(documentId, base64Text, report, fileType) {
445
- return core.sendRequest('/api/identity-verification/id-recognition/v3/recognize-base64', 'POST', {
446
- body: JSON.stringify({
447
- scanDocumentId: documentId,
448
- image: base64Text,
449
- fileType: fileType,
450
- info: {
451
- report
452
- }
453
- }),
459
+ // export function recognizeBase64(
460
+ // documentId: string,
461
+ // base64Text: string,
462
+ // report: string,
463
+ // fileType: RecognitionFileType
464
+ // ): Promise<{ retry?: boolean; details: { [key: string]: string | null } }> {
465
+ function recognizeBase64(body) {
466
+ let encryptApiPath = '';
467
+ if (body.encryptedBase64String) {
468
+ encryptApiPath = `/encrypted`;
469
+ }
470
+ return core.sendRequest(`/api/identity-verification/id-recognition/v3/recognize-base64${encryptApiPath}`, 'POST', {
471
+ body: JSON.stringify(body),
454
472
  contentType: 'application/json'
455
473
  }).catch(error => {
456
474
  var _a, _b, _c;
@@ -463,18 +481,27 @@ function recognitionEncrypt(documentId, base64Text, report, fileType) {
463
481
  throw error;
464
482
  });
465
483
  }
466
- function uploadFrameBase64(documentId, base64Text, index, type = exports.ResourceImageType.Recognition, report) {
467
- return core.sendRequest('/api/identity-verification/id-recognition/v3/upload-frame-base64', 'POST', {
468
- body: JSON.stringify({
469
- scanDocumentId: documentId,
470
- image: base64Text,
471
- type,
472
- // fileType: 'image/jpeg',
473
- info: {
474
- report,
475
- index
476
- }
477
- }),
484
+ // export function uploadFrameBase64(
485
+ // documentId: string,
486
+ // base64Text: string,
487
+ // index: number,
488
+ // type: ResourceImageType = ResourceImageType.Recognition,
489
+ // report?: string
490
+ // ): Promise<{ retry?: boolean; details: { [key: string]: string | null } }> {
491
+ function uploadFrameBase64(body) {
492
+ let encryptApiPath = '';
493
+ if (body.encryptedBase64String) {
494
+ encryptApiPath = `/encrypted`;
495
+ }
496
+ return core.sendRequest(`/api/identity-verification/id-recognition/v3/upload-frame-base64${encryptApiPath}`, 'POST', {
497
+ // body: JSON.stringify({
498
+ // scanDocumentId: documentId,
499
+ // image: base64Text,
500
+ // type,
501
+ // // fileType: 'image/jpeg',
502
+ // info: { report, index },
503
+ // }),
504
+ body: JSON.stringify(body),
478
505
  contentType: 'application/json'
479
506
  }).catch(error => {
480
507
  var _a, _b, _c;
@@ -497,22 +524,39 @@ function saveResourceImage(documentId, type, file) {
497
524
  contentType: 'multipart/form-data'
498
525
  });
499
526
  }
500
- function finishScanDocument(documentId, details, fraud) {
501
- const body = {
502
- scanDocumentId: documentId,
503
- details,
504
- fraud
505
- };
506
- return core.sendRequest('/api/identity-verification/id-recognition/v3/finish-scan-doc', 'POST', {
527
+ // export function finishScanDocument(
528
+ // documentId: string,
529
+ // details: { [key: string]: string | null },
530
+ // fraud: boolean | null
531
+ // ) {
532
+ function finishScanDocument(body) {
533
+ // const body = {
534
+ // scanDocumentId: documentId,
535
+ // details,
536
+ // fraud,
537
+ // };
538
+ let encryptApiPath = '';
539
+ if (body.encryptedBase64String) {
540
+ encryptApiPath = `/encrypted`;
541
+ }
542
+ return core.sendRequest(`/api/identity-verification/id-recognition/v3/finish-scan-doc${encryptApiPath}`, 'POST', {
507
543
  body: JSON.stringify(body)
508
544
  });
509
545
  }
510
- function confirmScan(scanId, details) {
511
- const body = {
512
- scanId,
513
- details
514
- };
515
- return core.sendRequest('/api/identity-verification/id-recognition/v3/confirm-scan', 'POST', {
546
+ // export function confirmScan(
547
+ // scanId: string,
548
+ // details: { [key: string]: string | null }
549
+ // ) {
550
+ function confirmScan(body) {
551
+ // const body = {
552
+ // scanId,
553
+ // details,
554
+ // };
555
+ let encryptApiPath = '';
556
+ if (body.encryptedBase64String) {
557
+ encryptApiPath = `/encrypted`;
558
+ }
559
+ return core.sendRequest(`/api/identity-verification/id-recognition/v3/confirm-scan${encryptApiPath}`, 'POST', {
516
560
  body: JSON.stringify(body)
517
561
  });
518
562
  }
@@ -528,6 +572,19 @@ function saveExtraDoc(params) {
528
572
  contentType: 'multipart/form-data'
529
573
  });
530
574
  }
575
+ function logCollect(message, stackTrace) {
576
+ const body = {
577
+ message: message,
578
+ stack_trace: stackTrace,
579
+ metadata: {
580
+ platform: 'web',
581
+ sdkVersion: packageInfo.version
582
+ }
583
+ };
584
+ return core.sendRequest('/api/identity-verification/v1/logs/collect', 'POST', {
585
+ body: JSON.stringify(body)
586
+ });
587
+ }
531
588
 
532
589
  var _a;
533
590
  var _b, _c;
@@ -575,12 +632,13 @@ exports.finishScanDocument = finishScanDocument;
575
632
  exports.getCardSubTypes = getCardSubTypes;
576
633
  exports.getCardTypes = getCardTypes;
577
634
  exports.getRecognitionColumnOrder = getRecognitionColumnOrder;
578
- exports.init = init;
635
+ exports.initScan = initScan;
579
636
  exports.initScanDocument = initScanDocument;
580
637
  exports.initScanDocumentResourceBase64 = initScanDocumentResourceBase64;
638
+ exports.logCollect = logCollect;
581
639
  exports.mapCardtypeToAuthmeClass = mapCardtypeToAuthmeClass;
582
640
  exports.recognition = recognition;
583
- exports.recognitionEncrypt = recognitionEncrypt;
641
+ exports.recognizeBase64 = recognizeBase64;
584
642
  exports.saveExtraDoc = saveExtraDoc;
585
643
  exports.saveResourceImage = saveResourceImage;
586
644
  exports.thicknessDefaultConfig = thicknessDefaultConfig;
package/index.js CHANGED
@@ -5,7 +5,7 @@ import 'core-js/modules/es.array.iterator.js';
5
5
  import 'core-js/modules/es.object.from-entries.js';
6
6
  import 'core-js/modules/web.dom-collections.iterator.js';
7
7
  import { sendRequest, AuthmeError } from '@authme/core';
8
- import { osVersion } from '@authme/util';
8
+ import { osVersion, Storage } from '@authme/util';
9
9
  import 'core-js/modules/es.symbol.description.js';
10
10
 
11
11
  var ResourceImageType;
@@ -371,15 +371,15 @@ const twoWayAuthmeCardClassMap = (() => {
371
371
  })();
372
372
 
373
373
  var name = "authme/sdk";
374
- var version$1 = "2.7.4";
375
- var date = "2024-12-04T02:44:31+0000";
374
+ var version$1 = "2.8.0";
375
+ var date = "2025-01-13T09:38:31+0000";
376
376
  var packageInfo = {
377
377
  name: name,
378
378
  version: version$1,
379
379
  date: date
380
380
  };
381
381
 
382
- function init(type, country, needConfirm, cardTypes, encrypt = true) {
382
+ function initScan(type, country, needConfirm, cardTypes) {
383
383
  // let useCardTypes: any = getCardSubTypes(type, country).map((c) =>
384
384
  // twoWayAuthmeCardClassMap.toServer(c)
385
385
  // );
@@ -391,32 +391,47 @@ function init(type, country, needConfirm, cardTypes, encrypt = true) {
391
391
  scanType: type === IdRecognitionCardType.Passport ? `ALL_Passport` : `${country}_${type}`,
392
392
  cardTypes: useCardTypes,
393
393
  needConfirm,
394
- encrypt,
395
394
  clientInfo: {
396
395
  os: 'web',
397
396
  os_ver: osVersion(),
398
397
  client_ver: packageInfo.version
399
398
  }
400
399
  };
400
+ const customParameters = Storage.getItem('customParameters');
401
+ if (customParameters) {
402
+ body['customParameters'] = customParameters;
403
+ }
401
404
  return sendRequest('/api/identity-verification/id-recognition/v3/init-scan', 'POST', {
402
405
  body: JSON.stringify(body)
403
406
  });
404
407
  }
405
- function initScanDocument(scanId, cardType) {
406
- const body = {
407
- scanId,
408
- cardType
409
- };
410
- return sendRequest('/api/identity-verification/id-recognition/v3/init-scan-doc', 'POST', {
408
+ // export function initScanDocument(
409
+ // scanId: string,
410
+ // cardType: string
411
+ // ): Promise<InitScanDocumentParams> {
412
+ function initScanDocument(body) {
413
+ // const body = {
414
+ // scanId,
415
+ // cardType,
416
+ // };
417
+ let encryptApiPath = '';
418
+ if (body.encryptedBase64String) {
419
+ encryptApiPath = `/encrypted`;
420
+ }
421
+ return sendRequest(`/api/identity-verification/id-recognition/v3/init-scan-doc${encryptApiPath}`, 'POST', {
411
422
  body: JSON.stringify(body)
412
423
  });
413
424
  }
414
- function initScanDocumentResourceBase64(scanId, ResourceId) {
415
- const body = {
416
- scanId,
417
- ResourceId
418
- };
419
- return sendRequest('/api/identity-verification/id-recognition/v3/init-scan-doc/resource/base64', 'POST', {
425
+ // export function initScanDocumentResourceBase64(
426
+ // scanId: string,
427
+ // ResourceId: string
428
+ // ): Promise<InitScanDocumentResourceBase64Params> {
429
+ function initScanDocumentResourceBase64(body) {
430
+ let encryptApiPath = '';
431
+ if (body.encryptedBase64String) {
432
+ encryptApiPath = `/encrypted`;
433
+ }
434
+ return sendRequest(`/api/identity-verification/id-recognition/v3/init-scan-doc/resource/base64${encryptApiPath}`, 'POST', {
420
435
  body: JSON.stringify(body)
421
436
  });
422
437
  }
@@ -438,16 +453,19 @@ function recognition(documentId, file) {
438
453
  throw error;
439
454
  });
440
455
  }
441
- function recognitionEncrypt(documentId, base64Text, report, fileType) {
442
- return sendRequest('/api/identity-verification/id-recognition/v3/recognize-base64', 'POST', {
443
- body: JSON.stringify({
444
- scanDocumentId: documentId,
445
- image: base64Text,
446
- fileType: fileType,
447
- info: {
448
- report
449
- }
450
- }),
456
+ // export function recognizeBase64(
457
+ // documentId: string,
458
+ // base64Text: string,
459
+ // report: string,
460
+ // fileType: RecognitionFileType
461
+ // ): Promise<{ retry?: boolean; details: { [key: string]: string | null } }> {
462
+ function recognizeBase64(body) {
463
+ let encryptApiPath = '';
464
+ if (body.encryptedBase64String) {
465
+ encryptApiPath = `/encrypted`;
466
+ }
467
+ return sendRequest(`/api/identity-verification/id-recognition/v3/recognize-base64${encryptApiPath}`, 'POST', {
468
+ body: JSON.stringify(body),
451
469
  contentType: 'application/json'
452
470
  }).catch(error => {
453
471
  var _a, _b, _c;
@@ -460,18 +478,27 @@ function recognitionEncrypt(documentId, base64Text, report, fileType) {
460
478
  throw error;
461
479
  });
462
480
  }
463
- function uploadFrameBase64(documentId, base64Text, index, type = ResourceImageType.Recognition, report) {
464
- return sendRequest('/api/identity-verification/id-recognition/v3/upload-frame-base64', 'POST', {
465
- body: JSON.stringify({
466
- scanDocumentId: documentId,
467
- image: base64Text,
468
- type,
469
- // fileType: 'image/jpeg',
470
- info: {
471
- report,
472
- index
473
- }
474
- }),
481
+ // export function uploadFrameBase64(
482
+ // documentId: string,
483
+ // base64Text: string,
484
+ // index: number,
485
+ // type: ResourceImageType = ResourceImageType.Recognition,
486
+ // report?: string
487
+ // ): Promise<{ retry?: boolean; details: { [key: string]: string | null } }> {
488
+ function uploadFrameBase64(body) {
489
+ let encryptApiPath = '';
490
+ if (body.encryptedBase64String) {
491
+ encryptApiPath = `/encrypted`;
492
+ }
493
+ return sendRequest(`/api/identity-verification/id-recognition/v3/upload-frame-base64${encryptApiPath}`, 'POST', {
494
+ // body: JSON.stringify({
495
+ // scanDocumentId: documentId,
496
+ // image: base64Text,
497
+ // type,
498
+ // // fileType: 'image/jpeg',
499
+ // info: { report, index },
500
+ // }),
501
+ body: JSON.stringify(body),
475
502
  contentType: 'application/json'
476
503
  }).catch(error => {
477
504
  var _a, _b, _c;
@@ -494,22 +521,39 @@ function saveResourceImage(documentId, type, file) {
494
521
  contentType: 'multipart/form-data'
495
522
  });
496
523
  }
497
- function finishScanDocument(documentId, details, fraud) {
498
- const body = {
499
- scanDocumentId: documentId,
500
- details,
501
- fraud
502
- };
503
- return sendRequest('/api/identity-verification/id-recognition/v3/finish-scan-doc', 'POST', {
524
+ // export function finishScanDocument(
525
+ // documentId: string,
526
+ // details: { [key: string]: string | null },
527
+ // fraud: boolean | null
528
+ // ) {
529
+ function finishScanDocument(body) {
530
+ // const body = {
531
+ // scanDocumentId: documentId,
532
+ // details,
533
+ // fraud,
534
+ // };
535
+ let encryptApiPath = '';
536
+ if (body.encryptedBase64String) {
537
+ encryptApiPath = `/encrypted`;
538
+ }
539
+ return sendRequest(`/api/identity-verification/id-recognition/v3/finish-scan-doc${encryptApiPath}`, 'POST', {
504
540
  body: JSON.stringify(body)
505
541
  });
506
542
  }
507
- function confirmScan(scanId, details) {
508
- const body = {
509
- scanId,
510
- details
511
- };
512
- return sendRequest('/api/identity-verification/id-recognition/v3/confirm-scan', 'POST', {
543
+ // export function confirmScan(
544
+ // scanId: string,
545
+ // details: { [key: string]: string | null }
546
+ // ) {
547
+ function confirmScan(body) {
548
+ // const body = {
549
+ // scanId,
550
+ // details,
551
+ // };
552
+ let encryptApiPath = '';
553
+ if (body.encryptedBase64String) {
554
+ encryptApiPath = `/encrypted`;
555
+ }
556
+ return sendRequest(`/api/identity-verification/id-recognition/v3/confirm-scan${encryptApiPath}`, 'POST', {
513
557
  body: JSON.stringify(body)
514
558
  });
515
559
  }
@@ -525,6 +569,19 @@ function saveExtraDoc(params) {
525
569
  contentType: 'multipart/form-data'
526
570
  });
527
571
  }
572
+ function logCollect(message, stackTrace) {
573
+ const body = {
574
+ message: message,
575
+ stack_trace: stackTrace,
576
+ metadata: {
577
+ platform: 'web',
578
+ sdkVersion: packageInfo.version
579
+ }
580
+ };
581
+ return sendRequest('/api/identity-verification/v1/logs/collect', 'POST', {
582
+ body: JSON.stringify(body)
583
+ });
584
+ }
528
585
 
529
586
  var _a;
530
587
  var _b, _c;
@@ -532,4 +589,4 @@ const version = packageInfo.version;
532
589
  (_a = (_b = window)[_c = Symbol.for('authme-sdk')]) !== null && _a !== void 0 ? _a : _b[_c] = {};
533
590
  window[Symbol.for('authme-sdk')][packageInfo.name] = version;
534
591
 
535
- export { CardOCR, CountryCode, IdCardAntiFraudService, IdRecognitionCardName, IdRecognitionCardType, IdType, IdTypeConfig, MRZService, RecognitionFileType, ResourceImageType, ServerSideEAuthMeCardClass, cardTypeConfirmTitle, cardTypeHeader, cardTypeTitle, confirmScan, finishScanDocument, getCardSubTypes, getCardTypes, getRecognitionColumnOrder, init, initScanDocument, initScanDocumentResourceBase64, mapCardtypeToAuthmeClass, recognition, recognitionEncrypt, saveExtraDoc, saveResourceImage, thicknessDefaultConfig, twoWayAuthmeCardClassMap, uploadFrameBase64, version };
592
+ export { CardOCR, CountryCode, IdCardAntiFraudService, IdRecognitionCardName, IdRecognitionCardType, IdType, IdTypeConfig, MRZService, RecognitionFileType, ResourceImageType, ServerSideEAuthMeCardClass, cardTypeConfirmTitle, cardTypeHeader, cardTypeTitle, confirmScan, finishScanDocument, getCardSubTypes, getCardTypes, getRecognitionColumnOrder, initScan, initScanDocument, initScanDocumentResourceBase64, logCollect, mapCardtypeToAuthmeClass, recognition, recognizeBase64, saveExtraDoc, saveResourceImage, thicknessDefaultConfig, twoWayAuthmeCardClassMap, uploadFrameBase64, version };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@authme/id-recognition",
3
- "version": "2.7.4",
3
+ "version": "2.8.0",
4
4
  "peerDependencies": {
5
5
  "core-js": "^3.6.0",
6
- "@authme/core": "2.7.4",
7
- "@authme/util": "2.7.4",
8
- "@authme/engine": "2.7.4"
6
+ "@authme/core": "2.8.0",
7
+ "@authme/util": "2.8.0",
8
+ "@authme/engine": "2.8.0"
9
9
  },
10
10
  "module": "./index.js",
11
11
  "main": "./index.cjs",
@@ -11,33 +11,73 @@ interface InitScanDocumentResourceBase64Params {
11
11
  fileId: string;
12
12
  data: string;
13
13
  }
14
- export declare function init(type: IdRecognitionCardType, country: CountryCode, needConfirm: boolean, cardTypes: string[], encrypt?: boolean): Promise<InitScanResponse>;
15
- export declare function initScanDocument(scanId: string, cardType: string): Promise<InitScanDocumentParams>;
16
- export declare function initScanDocumentResourceBase64(scanId: string, ResourceId: string): Promise<InitScanDocumentResourceBase64Params>;
14
+ export declare function initScan(type: IdRecognitionCardType, country: CountryCode, needConfirm: boolean, cardTypes: string[]): Promise<InitScanResponse>;
15
+ export declare function initScanDocument(body: {
16
+ scanId?: string;
17
+ cardType?: string;
18
+ id?: string;
19
+ encryptedBase64String?: string;
20
+ }): Promise<InitScanDocumentParams>;
21
+ export declare function initScanDocumentResourceBase64(body: {
22
+ scanId?: string;
23
+ ResourceId?: string;
24
+ id?: string;
25
+ encryptedBase64String?: string;
26
+ }): Promise<InitScanDocumentResourceBase64Params>;
17
27
  export declare function recognition(documentId: string, file: Blob): Promise<{
18
28
  retry?: boolean;
19
29
  details: {
20
30
  [key: string]: string | null;
21
31
  };
22
32
  }>;
23
- export declare function recognitionEncrypt(documentId: string, base64Text: string, report: string, fileType: RecognitionFileType): Promise<{
33
+ export declare function recognizeBase64(body: {
34
+ scanDocumentId?: string;
35
+ image?: string;
36
+ fileType?: RecognitionFileType;
37
+ info?: {
38
+ report: string;
39
+ };
40
+ id?: string;
41
+ encryptedBase64String?: string;
42
+ }): Promise<{
24
43
  retry?: boolean;
25
44
  details: {
26
45
  [key: string]: string | null;
27
46
  };
28
47
  }>;
29
- export declare function uploadFrameBase64(documentId: string, base64Text: string, index: number, type?: ResourceImageType, report?: string): Promise<{
48
+ export declare function uploadFrameBase64(body: {
49
+ scanDocumentId?: string;
50
+ image?: string;
51
+ type?: ResourceImageType;
52
+ info?: {
53
+ report?: string;
54
+ index: number;
55
+ };
56
+ id?: string;
57
+ encryptedBase64String?: string;
58
+ }): Promise<{
30
59
  retry?: boolean;
31
60
  details: {
32
61
  [key: string]: string | null;
33
62
  };
34
63
  }>;
35
64
  export declare function saveResourceImage(documentId: string, type: ResourceImageType, file: Blob): Promise<any>;
36
- export declare function finishScanDocument(documentId: string, details: {
37
- [key: string]: string | null;
38
- }, fraud: boolean | null): Promise<any>;
39
- export declare function confirmScan(scanId: string, details: {
40
- [key: string]: string | null;
65
+ export declare function finishScanDocument(body: {
66
+ scanDocumentId?: string;
67
+ details?: {
68
+ [key: string]: string | null;
69
+ };
70
+ fraud?: boolean | null;
71
+ id?: string;
72
+ encryptedBase64String?: string;
73
+ }): Promise<any>;
74
+ export declare function confirmScan(body: {
75
+ scanId?: string;
76
+ details?: {
77
+ [key: string]: string | null;
78
+ };
79
+ id?: string;
80
+ encryptedBase64String?: string;
41
81
  }): Promise<any>;
42
82
  export declare function saveExtraDoc(params: {
43
83
  file: Blob;
@@ -45,4 +85,5 @@ export declare function saveExtraDoc(params: {
45
85
  [key: string]: string | null;
46
86
  };
47
87
  }): Promise<any>;
88
+ export declare function logCollect(message: string, stackTrace: string): Promise<any>;
48
89
  export {};
@@ -8,6 +8,7 @@ export declare type IdRecognitionInfoConfirmRequest = IdRecognitionResponse;
8
8
  export interface InitScanResponse {
9
9
  scanId: string;
10
10
  expiredIn: number;
11
+ shouldEncrypt: boolean;
11
12
  parameters: {
12
13
  enableManualUpload: boolean;
13
14
  fraudRetryTimes: number;