@regulaforensics/cordova-plugin-document-reader-api 8.1.129-nightly → 8.1.131-nightly

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.
@@ -1,11 +1,3 @@
1
- //
2
- // RGLWJSONConstructor.h
3
- // DocumentReader
4
- //
5
- // Created by Pavel Masiuk on 21.09.2023.
6
- // Copyright © 2023 Regula. All rights reserved.
7
- //
8
-
9
1
  #ifndef RGLWJSONConstructor_h
10
2
  #define RGLWJSONConstructor_h
11
3
 
@@ -17,6 +9,7 @@
17
9
 
18
10
  @interface RGLWJSONConstructor : NSObject
19
11
 
12
+ +(NSString* _Nullable)toSendable:(id _Nullable)input;
20
13
  +(NSString* _Nullable)dictToString:(NSDictionary* _Nullable)input;
21
14
  +(NSString* _Nullable)arrayToString:(NSArray* _Nullable)input;
22
15
  +(NSString* _Nullable)base64WithImage:(UIImage* _Nullable)input;
@@ -1,11 +1,3 @@
1
- //
2
- // RGLWJSONConstructor.m
3
- // DocumentReader
4
- //
5
- // Created by Pavel Masiuk on 21.09.2023.
6
- // Copyright © 2023 Regula. All rights reserved.
7
- //
8
-
9
1
  #import <Foundation/Foundation.h>
10
2
  #import "RGLWJSONConstructor.h"
11
3
 
@@ -18,6 +10,16 @@ static NSMutableArray* weakReferencesHolder;
18
10
  [weakReferencesHolder addObject:reference];
19
11
  }
20
12
 
13
+ +(id)toSendable:(id)input {
14
+ if (!input || [input isEqual:[NSNull null]]) return nil;
15
+ if ([input isKindOfClass:[NSDictionary class]] || [input isKindOfClass:[NSArray class]])
16
+ return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:input
17
+ options:NSJSONWritingPrettyPrinted
18
+ error:nil]
19
+ encoding:NSUTF8StringEncoding];
20
+ return input;
21
+ }
22
+
21
23
  +(NSString*)dictToString:(NSDictionary*)input {
22
24
  if(input == nil) return nil;
23
25
  return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:input options:NSJSONWritingPrettyPrinted error:nil] encoding:NSUTF8StringEncoding];
@@ -928,7 +930,7 @@ static NSMutableArray* weakReferencesHolder;
928
930
  +(NSDictionary*)generateImageQuality:(RGLImageQuality*)input {
929
931
  if(input == nil) return nil;
930
932
  NSMutableDictionary* result = [NSMutableDictionary new];
931
-
933
+
932
934
  result[@"type"] = [RGLWConfig generateImageQualityCheckType:input.type];
933
935
  result[@"result"] = @(input.result);
934
936
  result[@"featureType"] = @(input.featureType);
@@ -940,7 +942,7 @@ static NSMutableArray* weakReferencesHolder;
940
942
  }
941
943
  result[@"boundRects"] = array;
942
944
  }
943
-
945
+
944
946
  return result;
945
947
  }
946
948
 
@@ -0,0 +1,36 @@
1
+ #import <DocumentReader/DocumentReader.h>
2
+ #import "RGLWJSONConstructor.h"
3
+ #import "RGLWConfig.h"
4
+
5
+ typedef void (^RGLWCallback)(id _Nullable response);
6
+ typedef void (^RGLWEventSender)(NSString* _Nonnull event, id _Nullable data);
7
+ typedef void (^RGLWRFIDSignatureCallback)(NSData * _Nonnull signature);
8
+ extern UIViewController*_Nonnull(^ _Nonnull RGLWRootViewController)(void);
9
+
10
+ @interface RGLWMain: NSObject<RGLRecordScanningProcessDelegate,
11
+ RGLDocReaderRFIDDelegate,
12
+ RGLCustomizationActionDelegate,
13
+ RGLDocReaderDatabaseFetchDelegate,
14
+ RGLBluetoothDelegate>
15
+
16
+ +(void)methodCall:(NSString* _Nonnull)method
17
+ :(NSArray* _Nonnull)args
18
+ :(RGLWCallback _Nonnull)callback
19
+ :(RGLWEventSender _Nonnull)eventSender;
20
+
21
+ @property NSNumber* _Nonnull doRequestPACertificates;
22
+ @property NSNumber* _Nonnull doRequestTACertificates;
23
+ @property NSNumber* _Nonnull doRequestTASignature;
24
+
25
+ @end
26
+
27
+ static NSString* _Nonnull completionEvent = @"completion";
28
+ static NSString* _Nonnull databaseProgressEvent = @"database_progress";
29
+ static NSString* _Nonnull rfidOnProgressEvent = @"rfidOnProgressCompletion";
30
+ static NSString* _Nonnull rfidOnChipDetectedEvent = @"rfidOnChipDetectedEvent";
31
+ static NSString* _Nonnull rfidOnRetryReadChipEvent = @"rfidOnRetryReadChipEvent";
32
+ static NSString* _Nonnull paCertificateCompletionEvent = @"pa_certificate_completion";
33
+ static NSString* _Nonnull taCertificateCompletionEvent = @"ta_certificate_completion";
34
+ static NSString* _Nonnull taSignatureCompletionEvent = @"ta_signature_completion";
35
+ static NSString* _Nonnull videoEncoderCompletionEvent = @"video_encoder_completion";
36
+ static NSString* _Nonnull onCustomButtonTappedEvent = @"onCustomButtonTappedEvent";