-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.js
4447 lines (4100 loc) · 169 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { NativeModules } from 'react-native'
export const { RNRegulaDocumentReader } = NativeModules
// Classes
export class DocumentReaderScenario {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderScenario()
result.name = jsonObject["name"]
result.caption = jsonObject["caption"]
result.description = jsonObject["description"]
result.multiPageOff = jsonObject["multiPageOff"]
result.frameKWHLandscape = jsonObject["frameKWHLandscape"]
result.frameKWHPortrait = jsonObject["frameKWHPortrait"]
result.frameKWHDoublePageSpreadPortrait = jsonObject["frameKWHDoublePageSpreadPortrait"]
result.frameKWHDoublePageSpreadLandscape = jsonObject["frameKWHDoublePageSpreadLandscape"]
result.frameOrientation = jsonObject["frameOrientation"]
result.uvTorch = jsonObject["uvTorch"]
result.faceExt = jsonObject["faceExt"]
result.seriesProcessMode = jsonObject["seriesProcessMode"]
result.manualCrop = jsonObject["manualCrop"]
return result
}
}
export class Rect {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Rect()
result.bottom = jsonObject["bottom"]
result.top = jsonObject["top"]
result.left = jsonObject["left"]
result.right = jsonObject["right"]
return result
}
}
export class DocumentReaderGraphicField {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderGraphicField()
result.sourceType = jsonObject["sourceType"]
result.fieldType = jsonObject["fieldType"]
result.light = jsonObject["light"]
result.pageIndex = jsonObject["pageIndex"]
result.originalPageIndex = jsonObject["originalPageIndex"]
result.fieldName = jsonObject["fieldName"]
result.lightName = jsonObject["lightName"]
result.value = jsonObject["value"]
result.fieldRect = Rect.fromJson(jsonObject["fieldRect"])
return result
}
}
export class DocumentReaderGraphicResult {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderGraphicResult()
result.fields = []
if (jsonObject["fields"] != null)
for (const i in jsonObject["fields"])
result.fields.push(DocumentReaderGraphicField.fromJson(jsonObject["fields"][i]))
return result
}
}
export class DocumentReaderValue {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderValue()
result.pageIndex = jsonObject["pageIndex"]
result.sourceType = jsonObject["sourceType"]
result.probability = jsonObject["probability"]
result.value = jsonObject["value"]
result.originalValue = jsonObject["originalValue"]
result.boundRect = Rect.fromJson(jsonObject["boundRect"])
result.originalSymbols = []
if (jsonObject["originalSymbols"] != null)
for (const i in jsonObject["originalSymbols"])
result.originalSymbols.push(DocumentReaderSymbol.fromJson(jsonObject["originalSymbols"][i]))
result.rfidOrigin = DocumentReaderRfidOrigin.fromJson(jsonObject["rfidOrigin"])
return result
}
}
export class DocumentReaderTextField {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderTextField()
result.fieldType = jsonObject["fieldType"]
result.lcid = jsonObject["lcid"]
result.status = jsonObject["status"]
result.lcidName = jsonObject["lcidName"]
result.fieldName = jsonObject["fieldName"]
result.value = jsonObject["value"]
result.getValue = DocumentReaderValue.fromJson(jsonObject["getValue"])
result.values = []
if (jsonObject["values"] != null)
for (const i in jsonObject["values"])
result.values.push(DocumentReaderValue.fromJson(jsonObject["values"][i]))
result.comparisonList = []
if (jsonObject["comparisonList"] != null)
for (const i in jsonObject["comparisonList"])
result.comparisonList.push(DocumentReaderComparison.fromJson(jsonObject["comparisonList"][i]))
result.validityList = []
if (jsonObject["validityList"] != null)
for (const i in jsonObject["validityList"])
result.validityList.push(DocumentReaderValidity.fromJson(jsonObject["validityList"][i]))
result.comparisonStatus = jsonObject["comparisonStatus"]
result.validityStatus = jsonObject["validityStatus"]
return result
}
}
export class DocumentReaderTextResult {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderTextResult()
result.status = jsonObject["status"]
result.comparisonStatus = jsonObject["comparisonStatus"]
result.validityStatus = jsonObject["validityStatus"]
result.availableSourceList = []
if (jsonObject["availableSourceList"] != null)
for (const i in jsonObject["availableSourceList"])
result.availableSourceList.push(DocumentReaderTextSource.fromJson(jsonObject["availableSourceList"][i]))
result.fields = []
if (jsonObject["fields"] != null)
for (const i in jsonObject["fields"])
result.fields.push(DocumentReaderTextField.fromJson(jsonObject["fields"][i]))
return result
}
}
export class Coordinate {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Coordinate()
result.x = jsonObject["x"]
result.y = jsonObject["y"]
return result
}
}
export class ElementPosition {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ElementPosition()
result.docFormat = jsonObject["docFormat"]
result.width = jsonObject["width"]
result.height = jsonObject["height"]
result.dpi = jsonObject["dpi"]
result.pageIndex = jsonObject["pageIndex"]
result.inverse = jsonObject["inverse"]
result.perspectiveTr = jsonObject["perspectiveTr"]
result.objArea = jsonObject["objArea"]
result.objIntAngleDev = jsonObject["objIntAngleDev"]
result.resultStatus = jsonObject["resultStatus"]
result.angle = jsonObject["angle"]
result.center = Coordinate.fromJson(jsonObject["center"])
result.leftTop = Coordinate.fromJson(jsonObject["leftTop"])
result.leftBottom = Coordinate.fromJson(jsonObject["leftBottom"])
result.rightTop = Coordinate.fromJson(jsonObject["rightTop"])
result.rightBottom = Coordinate.fromJson(jsonObject["rightBottom"])
return result
}
}
export class ImageQuality {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageQuality()
result.featureType = jsonObject["featureType"]
result.result = jsonObject["result"]
result.type = jsonObject["type"]
result.boundRects = []
if (jsonObject["boundRects"] != null)
for (const i in jsonObject["boundRects"])
result.boundRects.push(Rect.fromJson(jsonObject["boundRects"][i]))
return result
}
}
export class ImageQualityGroup {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageQualityGroup()
result.count = jsonObject["count"]
result.result = jsonObject["result"]
result.imageQualityList = []
if (jsonObject["imageQualityList"] != null)
for (const i in jsonObject["imageQualityList"])
result.imageQualityList.push(ImageQuality.fromJson(jsonObject["imageQualityList"][i]))
result.pageIndex = jsonObject["pageIndex"]
return result
}
}
export class DocumentReaderDocumentType {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderDocumentType()
result.pageIndex = jsonObject["pageIndex"]
result.documentID = jsonObject["documentID"]
result.dType = jsonObject["dType"]
result.dFormat = jsonObject["dFormat"]
result.dMRZ = jsonObject["dMRZ"]
result.isDeprecated = jsonObject["isDeprecated"]
result.name = jsonObject["name"]
result.ICAOCode = jsonObject["ICAOCode"]
result.dDescription = jsonObject["dDescription"]
result.dYear = jsonObject["dYear"]
result.dCountryName = jsonObject["dCountryName"]
result.FDSID = []
if (jsonObject["FDSID"] != null)
for (const i in jsonObject["FDSID"])
result.FDSID.push(jsonObject["FDSID"][i])
return result
}
}
export class DocumentReaderNotification {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderNotification()
result.notificationCode = jsonObject["notificationCode"]
result.dataFileType = jsonObject["dataFileType"]
result.progress = jsonObject["progress"]
return result
}
}
export class AccessControlProcedureType {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new AccessControlProcedureType()
result.activeOptionIdx = jsonObject["activeOptionIdx"]
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
return result
}
}
export class FileData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new FileData()
result.length = jsonObject["length"]
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.data = jsonObject["data"]
return result
}
}
export class CertificateData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new CertificateData()
result.length = jsonObject["length"]
result.data = jsonObject["data"]
return result
}
}
export class SecurityObjectCertificates {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new SecurityObjectCertificates()
result.securityObject = CertificateData.fromJson(jsonObject["securityObject"])
return result
}
}
export class File {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new File()
result.readingTime = jsonObject["readingTime"]
result.type = jsonObject["type"]
result.typeName = jsonObject["typeName"]
result.pAStatus = jsonObject["pAStatus"]
result.readingStatus = jsonObject["readingStatus"]
result.fileID = jsonObject["fileID"]
result.fileData = FileData.fromJson(jsonObject["fileData"])
result.certificates = SecurityObjectCertificates.fromJson(jsonObject["certificates"])
result.docFieldsText = []
if (jsonObject["docFieldsText"] != null)
for (const i in jsonObject["docFieldsText"])
result.docFieldsText.push(jsonObject["docFieldsText"][i])
result.docFieldsGraphics = []
if (jsonObject["docFieldsGraphics"] != null)
for (const i in jsonObject["docFieldsGraphics"])
result.docFieldsGraphics.push(jsonObject["docFieldsGraphics"][i])
result.docFieldsOriginals = []
if (jsonObject["docFieldsOriginals"] != null)
for (const i in jsonObject["docFieldsOriginals"])
result.docFieldsOriginals.push(jsonObject["docFieldsOriginals"][i])
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
return result
}
}
export class Application {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Application()
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.applicationID = jsonObject["applicationID"]
result.dataHashAlgorithm = jsonObject["dataHashAlgorithm"]
result.unicodeVersion = jsonObject["unicodeVersion"]
result.version = jsonObject["version"]
result.files = []
if (jsonObject["files"] != null)
for (const i in jsonObject["files"])
result.files.push(File.fromJson(jsonObject["files"][i]))
return result
}
}
export class Value {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Value()
result.length = jsonObject["length"]
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.data = jsonObject["data"]
result.format = jsonObject["format"]
return result
}
}
export class Attribute {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Attribute()
result.type = jsonObject["type"]
result.value = Value.fromJson(jsonObject["value"])
return result
}
}
export class Authority {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Authority()
result.data = jsonObject["data"]
result.friendlyName = Value.fromJson(jsonObject["friendlyName"])
result.attributes = []
if (jsonObject["attributes"] != null)
for (const i in jsonObject["attributes"])
result.attributes.push(Attribute.fromJson(jsonObject["attributes"][i]))
return result
}
}
export class Extension {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Extension()
result.data = jsonObject["data"]
result.type = jsonObject["type"]
return result
}
}
export class Validity {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new Validity()
result.notAfter = Value.fromJson(jsonObject["notAfter"])
result.notBefore = Value.fromJson(jsonObject["notBefore"])
return result
}
}
export class CertificateChain {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new CertificateChain()
result.origin = jsonObject["origin"]
result.type = jsonObject["type"]
result.version = jsonObject["version"]
result.paStatus = jsonObject["paStatus"]
result.serialNumber = jsonObject["serialNumber"]
result.signatureAlgorithm = jsonObject["signatureAlgorithm"]
result.subjectPKAlgorithm = jsonObject["subjectPKAlgorithm"]
result.fileName = Value.fromJson(jsonObject["fileName"])
result.validity = Validity.fromJson(jsonObject["validity"])
result.issuer = Authority.fromJson(jsonObject["issuer"])
result.subject = Authority.fromJson(jsonObject["subject"])
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
result.extensions = []
if (jsonObject["extensions"] != null)
for (const i in jsonObject["extensions"])
result.extensions.push(Extension.fromJson(jsonObject["extensions"][i]))
return result
}
}
export class SignerInfo {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new SignerInfo()
result.version = jsonObject["version"]
result.paStatus = jsonObject["paStatus"]
result.dataToHash = jsonObject["dataToHash"]
result.digestAlgorithm = jsonObject["digestAlgorithm"]
result.signatureAlgorithm = jsonObject["signatureAlgorithm"]
result.serialNumber = Value.fromJson(jsonObject["serialNumber"])
result.signature = Value.fromJson(jsonObject["signature"])
result.subjectKeyIdentifier = Value.fromJson(jsonObject["subjectKeyIdentifier"])
result.issuer = Authority.fromJson(jsonObject["issuer"])
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
result.signedAttributes = []
if (jsonObject["signedAttributes"] != null)
for (const i in jsonObject["signedAttributes"])
result.signedAttributes.push(Extension.fromJson(jsonObject["signedAttributes"][i]))
result.certificateChain = []
if (jsonObject["certificateChain"] != null)
for (const i in jsonObject["certificateChain"])
result.certificateChain.push(CertificateChain.fromJson(jsonObject["certificateChain"][i]))
return result
}
}
export class SecurityObject {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new SecurityObject()
result.fileReference = jsonObject["fileReference"]
result.version = jsonObject["version"]
result.objectType = jsonObject["objectType"]
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
result.signerInfos = []
if (jsonObject["signerInfos"] != null)
for (const i in jsonObject["signerInfos"])
result.signerInfos.push(SignerInfo.fromJson(jsonObject["signerInfos"][i]))
return result
}
}
export class CardProperties {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new CardProperties()
result.aTQA = jsonObject["aTQA"]
result.bitRateR = jsonObject["bitRateR"]
result.bitRateS = jsonObject["bitRateS"]
result.chipTypeA = jsonObject["chipTypeA"]
result.mifareMemory = jsonObject["mifareMemory"]
result.rfidType = jsonObject["rfidType"]
result.sAK = jsonObject["sAK"]
result.support4 = jsonObject["support4"]
result.supportMifare = jsonObject["supportMifare"]
result.aTQB = jsonObject["aTQB"]
result.aTR = jsonObject["aTR"]
result.baudrate1 = jsonObject["baudrate1"]
result.baudrate2 = jsonObject["baudrate2"]
result.uID = jsonObject["uID"]
return result
}
}
export class RFIDSessionData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new RFIDSessionData()
result.totalBytesReceived = jsonObject["totalBytesReceived"]
result.totalBytesSent = jsonObject["totalBytesSent"]
result.status = jsonObject["status"]
result.extLeSupport = jsonObject["extLeSupport"]
result.processTime = jsonObject["processTime"]
result.cardProperties = CardProperties.fromJson(jsonObject["cardProperties"])
result.accessControls = []
if (jsonObject["accessControls"] != null)
for (const i in jsonObject["accessControls"])
result.accessControls.push(AccessControlProcedureType.fromJson(jsonObject["accessControls"][i]))
result.applications = []
if (jsonObject["applications"] != null)
for (const i in jsonObject["applications"])
result.applications.push(Application.fromJson(jsonObject["applications"][i]))
result.securityObjects = []
if (jsonObject["securityObjects"] != null)
for (const i in jsonObject["securityObjects"])
result.securityObjects.push(SecurityObject.fromJson(jsonObject["securityObjects"][i]))
result.dataGroups = []
if (jsonObject["dataGroups"] != null)
for (const i in jsonObject["dataGroups"])
result.dataGroups.push(jsonObject["dataGroups"][i])
result.dataFields = []
if (jsonObject["dataFields"] != null)
for (const i in jsonObject["dataFields"])
result.dataFields.push(DataField.fromJson(jsonObject["dataFields"][i]))
return result
}
}
export class DataField {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DataField()
result.data = jsonObject["data"]
result.fieldType = jsonObject["fieldType"]
return result
}
}
export class DocumentReaderAuthenticityCheck {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderAuthenticityCheck()
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.typeName = jsonObject["typeName"]
result.pageIndex = jsonObject["pageIndex"]
result.elements = []
if (jsonObject["elements"] != null)
for (const i in jsonObject["elements"])
result.elements.push(DocumentReaderAuthenticityElement.fromJson(jsonObject["elements"][i]))
return result
}
}
export class PDF417Info {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new PDF417Info()
result.errorLevel = jsonObject["errorLevel"]
result.columns = jsonObject["columns"]
result.rows = jsonObject["rows"]
return result
}
}
export class DocumentReaderBarcodeResult {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderBarcodeResult()
result.fields = []
if (jsonObject["fields"] != null)
for (const i in jsonObject["fields"])
result.fields.push(DocumentReaderBarcodeField.fromJson(jsonObject["fields"][i]))
return result
}
}
export class DocumentReaderBarcodeField {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderBarcodeField()
result.barcodeType = jsonObject["barcodeType"]
result.status = jsonObject["status"]
result.pageIndex = jsonObject["pageIndex"]
result.pdf417Info = PDF417Info.fromJson(jsonObject["pdf417Info"])
result.data = jsonObject["data"]
return result
}
}
export class DocumentReaderAuthenticityResult {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderAuthenticityResult()
result.status = jsonObject["status"]
result.checks = []
if (jsonObject["checks"] != null)
for (const i in jsonObject["checks"])
result.checks.push(DocumentReaderAuthenticityCheck.fromJson(jsonObject["checks"][i]))
return result
}
}
export class DocumentReaderAuthenticityElement {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderAuthenticityElement()
result.status = jsonObject["status"]
result.elementType = jsonObject["elementType"]
result.elementDiagnose = jsonObject["elementDiagnose"]
result.elementTypeName = jsonObject["elementTypeName"]
result.elementDiagnoseName = jsonObject["elementDiagnoseName"]
return result
}
}
export class DocumentReaderCompletion {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderCompletion()
result.action = jsonObject["action"]
result.results = DocumentReaderResults.fromJson(jsonObject["results"])
result.error = RegulaException.fromJson(jsonObject["error"])
return result
}
}
export class RfidNotificationCompletion {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new RfidNotificationCompletion()
result.notification = jsonObject["notification"]
result.value = jsonObject["value"]
return result
}
}
export class RegulaException {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new RegulaException()
result.code = jsonObject["code"]
result.message = jsonObject["message"]
return result
}
}
export class PKDCertificate {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new PKDCertificate()
result.binaryData = jsonObject["binaryData"]
result.resourceType = jsonObject["resourceType"]
result.privateKey = jsonObject["privateKey"]
return result
}
}
export class TccParams {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new TccParams()
result.serviceUrlTA = jsonObject["serviceUrlTA"]
result.serviceUrlPA = jsonObject["serviceUrlPA"]
result.pfxCertUrl = jsonObject["pfxCertUrl"]
result.pfxPassPhrase = jsonObject["pfxPassPhrase"]
result.pfxCert = jsonObject["pfxCert"]
return result
}
}
export class ImageInputParam {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageInputParam()
result.width = jsonObject["width"]
result.height = jsonObject["height"]
result.type = jsonObject["type"]
result.disableFrameShiftIR = jsonObject["disableFrameShiftIR"]
result.doFlipYAxis = jsonObject["doFlipYAxis"]
return result
}
}
export class PAResourcesIssuer {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new PAResourcesIssuer()
result.data = jsonObject["data"]
result.friendlyName = jsonObject["friendlyName"]
result.attributes = []
if (jsonObject["attributes"] != null)
for (const i in jsonObject["attributes"])
result.attributes.push(PAAttribute.fromJson(jsonObject["attributes"][i]))
return result
}
}
export class PAAttribute {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new PAAttribute()
result.type = jsonObject["type"]
result.value = jsonObject["value"]
return result
}
}
export class TAChallenge {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new TAChallenge()
result.data = jsonObject["data"]
result.auxPCD = jsonObject["auxPCD"]
result.challengePICC = jsonObject["challengePICC"]
result.hashPK = jsonObject["hashPK"]
result.idPICC = jsonObject["idPICC"]
return result
}
}
export class DocumentReaderResultsStatus {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderResultsStatus()
result.overallStatus = jsonObject["overallStatus"]
result.optical = jsonObject["optical"]
result.detailsOptical = DetailsOptical.fromJson(jsonObject["detailsOptical"])
result.rfid = jsonObject["rfid"]
result.detailsRFID = DetailsRFID.fromJson(jsonObject["detailsRFID"])
result.portrait = jsonObject["portrait"]
result.stopList = jsonObject["stopList"]
return result
}
}
export class DetailsOptical {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DetailsOptical()
result.overallStatus = jsonObject["overallStatus"]
result.mrz = jsonObject["mrz"]
result.text = jsonObject["text"]
result.docType = jsonObject["docType"]
result.security = jsonObject["security"]
result.imageQA = jsonObject["imageQA"]
result.expiry = jsonObject["expiry"]
result.vds = jsonObject["vds"]
result.pagesCount = jsonObject["pagesCount"]
return result
}
}
export class DetailsRFID {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DetailsRFID()
result.pa = jsonObject["pa"]
result.ca = jsonObject["ca"]
result.aa = jsonObject["aa"]
result.ta = jsonObject["ta"]
result.bac = jsonObject["bac"]
result.pace = jsonObject["pace"]
result.overallStatus = jsonObject["overallStatus"]
return result
}
}
export class VDSNCData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new VDSNCData()
result.type = jsonObject["type"]
result.version = jsonObject["version"]
result.issuingCountry = jsonObject["issuingCountry"]
result.message = jsonObject["message"]
result.signatureAlgorithm = jsonObject["signatureAlgorithm"]
result.signature = BytesData.fromJson(jsonObject["signature"])
result.certificate = BytesData.fromJson(jsonObject["certificate"])
result.certificateChain = []
if (jsonObject["certificateChain"] != null)
for (const i in jsonObject["certificateChain"])
result.certificateChain.push(CertificateChain.fromJson(jsonObject["certificateChain"][i]))
result.notifications = []
if (jsonObject["notifications"] != null)
for (const i in jsonObject["notifications"])
result.notifications.push(jsonObject["notifications"][i])
return result
}
}
export class BytesData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new BytesData()
result.data = jsonObject["data"]
result.length = jsonObject["length"]
result.status = jsonObject["status"]
result.type = jsonObject["type"]
return result
}
}
export class ImageInputData {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new ImageInputData()
result.pageIndex = jsonObject["pageIndex"]
result.light = jsonObject["light"]
result.type = jsonObject["type"]
result.width = jsonObject["width"]
result.height = jsonObject["height"]
result.bitmap = jsonObject["bitmap"]
result.imgBytes = jsonObject["imgBytes"]
return result
}
}
export class DocReaderDocumentsDatabase {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocReaderDocumentsDatabase()
result.databaseID = jsonObject["databaseID"]
result.version = jsonObject["version"]
result.date = jsonObject["date"]
result.databaseDescription = jsonObject["databaseDescription"]
result.countriesNumber = jsonObject["countriesNumber"]
result.documentsNumber = jsonObject["documentsNumber"]
result.size = jsonObject["size"]
return result
}
}
export class DocumentReaderComparison {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderComparison()
result.sourceTypeLeft = jsonObject["sourceTypeLeft"]
result.sourceTypeRight = jsonObject["sourceTypeRight"]
result.status = jsonObject["status"]
return result
}
}
export class DocumentReaderRfidOrigin {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderRfidOrigin()
result.dg = jsonObject["dg"]
result.dgTag = jsonObject["dgTag"]
result.entryView = jsonObject["entryView"]
result.tagEntry = jsonObject["tagEntry"]
return result
}
}
export class DocumentReaderTextSource {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderTextSource()
result.sourceType = jsonObject["sourceType"]
result.source = jsonObject["source"]
result.validityStatus = jsonObject["validityStatus"]
return result
}
}
export class DocumentReaderSymbol {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderSymbol()
result.code = jsonObject["code"]
result.rect = Rect.fromJson(jsonObject["rect"])
result.probability = jsonObject["probability"]
return result
}
}
export class DocumentReaderValidity {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new DocumentReaderValidity()
result.sourceType = jsonObject["sourceType"]
result.status = jsonObject["status"]
return result
}
}
export class OnlineProcessingConfig {
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new OnlineProcessingConfig()
result.mode = jsonObject["mode"]
result.url = jsonObject["url"]
result.processParams = ProcessParams.fromJson(jsonObject["processParams"])
result.imageFormat = jsonObject["imageFormat"]
result.imageCompressionQuality = jsonObject["imageCompressionQuality"]