@getvouch/react-native-sdk 0.0.4 → 0.2.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.
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ #Mon Feb 16 09:20:44 CET 2026
2
+ gradle.version=9.2.0
File without changes
@@ -45,5 +45,5 @@ repositories {
45
45
 
46
46
  dependencies {
47
47
  implementation "com.facebook.react:react-android"
48
- implementation "io.getvouch:android-sdk:0.2.1"
48
+ implementation "io.getvouch:android-sdk:0.3.2"
49
49
  }
@@ -24,7 +24,7 @@ class VouchRNModule(reactContext: ReactApplicationContext) :
24
24
 
25
25
  override fun getName(): String = NAME
26
26
 
27
- override fun initialize(customerId: String, style: ReadableMap?) {
27
+ override fun initialize(customerId: String) {
28
28
  if (this.customerId != null) {
29
29
  Log.w(NAME, "VouchSDK is already initialized")
30
30
  return
package/ios/VouchRN.mm CHANGED
@@ -26,52 +26,16 @@ RCT_EXPORT_MODULE(VouchRN)
26
26
  return self;
27
27
  }
28
28
 
29
- #ifdef RCT_NEW_ARCH_ENABLED
30
- RCT_EXPORT_METHOD(initialize : (NSString *)customerId
31
- style : (JS::NativeVouch::VouchStyle &)style) {
32
- #else
33
- RCT_EXPORT_METHOD(initialize : (NSString *)customerId
34
- style : (NSDictionary *)style) {
35
- #endif
29
+ RCT_EXPORT_METHOD(initialize : (NSString *)customerId) {
36
30
  if (self.initialized) {
37
31
  RCTLogWarn(@"VouchSDK is already initialized");
38
32
  return;
39
33
  }
40
34
 
41
- // VouchSDK uses WebKit components which must be initialized on the main thread
35
+ // VouchSDK uses WebKit components which must be initialized on the main
36
+ // thread
42
37
  dispatch_async(dispatch_get_main_queue(), ^{
43
- VouchStyleObjC *styleObjC = nil;
44
- #ifdef RCT_NEW_ARCH_ENABLED
45
- NSString *logoName = style.logo();
46
- NSString *logoSmallName = style.logoSmall();
47
- NSString *footerLogoName = style.footerLogo();
48
-
49
- UIImage *logo = logoName.length > 0 ? [RCTConvert UIImage:logoName] : nil;
50
- UIImage *logoSmall = logoSmallName.length > 0 ? [RCTConvert UIImage:logoSmallName] : nil;
51
- UIImage *footerLogo = footerLogoName.length > 0 ? [RCTConvert UIImage:footerLogoName] : nil;
52
-
53
- if (logo || logoSmall || footerLogo) {
54
- styleObjC = [[VouchStyleObjC alloc] initWithLogo:logo
55
- logoSmall:logoSmall
56
- footerLogo:footerLogo];
57
- }
58
- #else
59
- if ([style isKindOfClass:[NSDictionary class]] && style.count > 0) {
60
- id logoValue = style[@"logo"];
61
- id logoSmallValue = style[@"logoSmall"];
62
- id footerLogoValue = style[@"footerLogo"];
63
-
64
- UIImage *logo = logoValue == [NSNull null] ? nil : [RCTConvert UIImage:logoValue];
65
- UIImage *logoSmall = logoSmallValue == [NSNull null] ? nil : [RCTConvert UIImage:logoSmallValue];
66
- UIImage *footerLogo = footerLogoValue == [NSNull null] ? nil : [RCTConvert UIImage:footerLogoValue];
67
-
68
- styleObjC = [[VouchStyleObjC alloc] initWithLogo:logo
69
- logoSmall:logoSmall
70
- footerLogo:footerLogo];
71
- }
72
- #endif
73
-
74
- self.sdk = [[VouchSDKBridge alloc] initWithCustomerId:customerId style:styleObjC];
38
+ self.sdk = [[VouchSDKBridge alloc] initWithCustomerId:customerId];
75
39
  self.initialized = YES;
76
40
 
77
41
  RCTLogInfo(@"VouchSDK initialized with customerId: %@", customerId);
@@ -82,12 +46,10 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSNumber *, isInitialized) {
82
46
  return @(self.initialized);
83
47
  }
84
48
 
85
- RCT_EXPORT_METHOD(start
86
- : (NSString *)dataSourceId webhookUrl
87
- : (NSString *)webhookUrl inputs
88
- : (NSDictionary *)inputs onSuccess
89
- : (RCTResponseSenderBlock)onSuccess onError
90
- : (RCTResponseSenderBlock)onError) {
49
+ RCT_EXPORT_METHOD(start : (NSString *)dataSourceId webhookUrl : (NSString *)
50
+ webhookUrl inputs : (NSDictionary *)inputs onSuccess : (
51
+ RCTResponseSenderBlock)
52
+ onSuccess onError : (RCTResponseSenderBlock)onError) {
91
53
  if (!self.initialized) {
92
54
  RCTLogError(@"VouchSDK must be initialized before calling start");
93
55
  NSDictionary *errorDict = @{
@@ -112,41 +74,47 @@ RCT_EXPORT_METHOD(start
112
74
  }
113
75
 
114
76
  // Call the Swift start method to get the view controller
115
- UIViewController *viewController =
116
- [bridge startWithDataSourceId:dataSourceId
117
- webhookUrl:webhookUrl
118
- inputs:inputsDict
119
- completion:^(VouchSuccessObjC *success, VouchErrorObjC *error) {
120
- dispatch_async(dispatch_get_main_queue(), ^{
121
- // Dismiss the view controller
122
- UIViewController *presentedVC =
123
- [self getRootViewController].presentedViewController;
124
- if (presentedVC) {
125
- [presentedVC dismissViewControllerAnimated:YES
126
- completion:^{
127
- if (success) {
128
- NSDictionary *successDict =
129
- @{@"proofId" : success.proofId};
130
- onSuccess(@[ successDict ]);
131
- } else if (error) {
132
- NSDictionary *errorDict = @{
133
- @"proofId" : error.proofId,
134
- @"reason" : @(error.reason),
135
- @"description" : error.localizedDescription
136
- };
137
- onError(@[ errorDict ]);
138
- }
139
- }];
140
- }
141
- });
142
- }];
77
+ UIViewController *viewController = [bridge
78
+ startWithDataSourceId:dataSourceId
79
+ webhookUrl:webhookUrl
80
+ inputs:inputsDict
81
+ completion:^(VouchSuccessObjC *success,
82
+ VouchErrorObjC *error) {
83
+ dispatch_async(dispatch_get_main_queue(), ^{
84
+ // Dismiss the view controller
85
+ UIViewController *presentedVC =
86
+ [self getRootViewController].presentedViewController;
87
+ if (presentedVC) {
88
+ [presentedVC
89
+ dismissViewControllerAnimated:YES
90
+ completion:^{
91
+ if (success) {
92
+ NSDictionary *successDict =
93
+ @{
94
+ @"proofId" :
95
+ success.proofId
96
+ };
97
+ onSuccess(@[ successDict ]);
98
+ } else if (error) {
99
+ NSDictionary *errorDict = @{
100
+ @"proofId" :
101
+ error.proofId,
102
+ @"reason" :
103
+ @(error.reason),
104
+ @"description" : error
105
+ .localizedDescription
106
+ };
107
+ onError(@[ errorDict ]);
108
+ }
109
+ }];
110
+ }
111
+ });
112
+ }];
143
113
 
144
114
  // Present the view controller modally
145
115
  UIViewController *rootVC = [self getRootViewController];
146
116
  if (rootVC) {
147
- [rootVC presentViewController:viewController
148
- animated:YES
149
- completion:nil];
117
+ [rootVC presentViewController:viewController animated:YES completion:nil];
150
118
  } else {
151
119
  RCTLogError(@"Could not find root view controller to present VouchSDK");
152
120
  NSDictionary *errorDict = @{
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVouch.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAgDpCC,gCAAmB,CAACC,YAAY,CAAO,SAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVouch.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GA0CpCC,gCAAmB,CAACC,YAAY,CAAO,SAAS,CAAC","ignoreList":[]}
@@ -12,7 +12,7 @@ class VouchSDK {
12
12
  * @param config - Configuration object with customerId
13
13
  */
14
14
  initialize(config) {
15
- _NativeVouch.default.initialize(config.customerId, config.style ?? {});
15
+ _NativeVouch.default.initialize(config.customerId);
16
16
  }
17
17
 
18
18
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["_NativeVouch","_interopRequireDefault","require","e","__esModule","default","VouchSDK","initialize","config","NativeVouch","customerId","style","isInitialized","start","params","Promise","resolve","reject","dataSourceId","webhookUrl","inputs","result","error","_default","exports"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAkF,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAelF,MAAMG,QAAQ,CAAC;EACb;AACF;AACA;AACA;EACEC,UAAUA,CAACC,MAAsB,EAAQ;IACvCC,oBAAW,CAACF,UAAU,CAACC,MAAM,CAACE,UAAU,EAAEF,MAAM,CAACG,KAAK,IAAI,CAAC,CAAC,CAAC;EAC/D;;EAEA;AACF;AACA;AACA;EACEC,aAAaA,CAAA,EAAY;IACvB,OAAOH,oBAAW,CAACG,aAAa,CAAC,CAAC;EACpC;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,KAAKA,CAACC,MAAwB,EAAyB;IACrD,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;MACtCR,oBAAW,CAACI,KAAK,CACfC,MAAM,CAACI,YAAY,EACnBJ,MAAM,CAACK,UAAU,EACjBL,MAAM,CAACM,MAAM,IAAI,IAAI,EACpBC,MAAM,IAAKL,OAAO,CAACK,MAAM,CAAC,EAC1BC,KAAK,IAAKL,MAAM,CAACK,KAAK,CACzB,CAAC;IACH,CAAC,CAAC;EACJ;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAnB,OAAA,GAEc,IAAIC,QAAQ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_NativeVouch","_interopRequireDefault","require","e","__esModule","default","VouchSDK","initialize","config","NativeVouch","customerId","isInitialized","start","params","Promise","resolve","reject","dataSourceId","webhookUrl","inputs","result","error","_default","exports"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsE,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AActE,MAAMG,QAAQ,CAAC;EACb;AACF;AACA;AACA;EACEC,UAAUA,CAACC,MAAsB,EAAQ;IACvCC,oBAAW,CAACF,UAAU,CAACC,MAAM,CAACE,UAAU,CAAC;EAC3C;;EAEA;AACF;AACA;AACA;EACEC,aAAaA,CAAA,EAAY;IACvB,OAAOF,oBAAW,CAACE,aAAa,CAAC,CAAC;EACpC;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,KAAKA,CAACC,MAAwB,EAAyB;IACrD,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;MACtCP,oBAAW,CAACG,KAAK,CACfC,MAAM,CAACI,YAAY,EACnBJ,MAAM,CAACK,UAAU,EACjBL,MAAM,CAACM,MAAM,IAAI,IAAI,EACpBC,MAAM,IAAKL,OAAO,CAACK,MAAM,CAAC,EAC1BC,KAAK,IAAKL,MAAM,CAACK,KAAK,CACzB,CAAC;IACH,CAAC,CAAC;EACJ;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAlB,OAAA,GAEc,IAAIC,QAAQ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVouch.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAgDlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,SAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVouch.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AA0ClD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,SAAS,CAAC","ignoreList":[]}
@@ -7,7 +7,7 @@ class VouchSDK {
7
7
  * @param config - Configuration object with customerId
8
8
  */
9
9
  initialize(config) {
10
- NativeVouch.initialize(config.customerId, config.style ?? {});
10
+ NativeVouch.initialize(config.customerId);
11
11
  }
12
12
 
13
13
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["NativeVouch","VouchSDK","initialize","config","customerId","style","isInitialized","start","params","Promise","resolve","reject","dataSourceId","webhookUrl","inputs","result","error"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAOA,WAAW,MAAgD,eAAe;AAejF,MAAMC,QAAQ,CAAC;EACb;AACF;AACA;AACA;EACEC,UAAUA,CAACC,MAAsB,EAAQ;IACvCH,WAAW,CAACE,UAAU,CAACC,MAAM,CAACC,UAAU,EAAED,MAAM,CAACE,KAAK,IAAI,CAAC,CAAC,CAAC;EAC/D;;EAEA;AACF;AACA;AACA;EACEC,aAAaA,CAAA,EAAY;IACvB,OAAON,WAAW,CAACM,aAAa,CAAC,CAAC;EACpC;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,KAAKA,CAACC,MAAwB,EAAyB;IACrD,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;MACtCX,WAAW,CAACO,KAAK,CACfC,MAAM,CAACI,YAAY,EACnBJ,MAAM,CAACK,UAAU,EACjBL,MAAM,CAACM,MAAM,IAAI,IAAI,EACpBC,MAAM,IAAKL,OAAO,CAACK,MAAM,CAAC,EAC1BC,KAAK,IAAKL,MAAM,CAACK,KAAK,CACzB,CAAC;IACH,CAAC,CAAC;EACJ;AACF;AAEA,eAAe,IAAIf,QAAQ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["NativeVouch","VouchSDK","initialize","config","customerId","isInitialized","start","params","Promise","resolve","reject","dataSourceId","webhookUrl","inputs","result","error"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAOA,WAAW,MAAoC,eAAe;AAcrE,MAAMC,QAAQ,CAAC;EACb;AACF;AACA;AACA;EACEC,UAAUA,CAACC,MAAsB,EAAQ;IACvCH,WAAW,CAACE,UAAU,CAACC,MAAM,CAACC,UAAU,CAAC;EAC3C;;EAEA;AACF;AACA;AACA;EACEC,aAAaA,CAAA,EAAY;IACvB,OAAOL,WAAW,CAACK,aAAa,CAAC,CAAC;EACpC;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,KAAKA,CAACC,MAAwB,EAAyB;IACrD,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;MACtCV,WAAW,CAACM,KAAK,CACfC,MAAM,CAACI,YAAY,EACnBJ,MAAM,CAACK,UAAU,EACjBL,MAAM,CAACM,MAAM,IAAI,IAAI,EACpBC,MAAM,IAAKL,OAAO,CAACK,MAAM,CAAC,EAC1BC,KAAK,IAAKL,MAAM,CAACK,KAAK,CACzB,CAAC;IACH,CAAC,CAAC;EACJ;AACF;AAEA,eAAe,IAAId,QAAQ,CAAC,CAAC","ignoreList":[]}
@@ -7,17 +7,12 @@ export interface VouchError {
7
7
  reason: number;
8
8
  description: string;
9
9
  }
10
- export interface VouchStyle {
11
- logo?: string;
12
- logoSmall?: string;
13
- footerLogo?: string;
14
- }
15
10
  export interface Spec extends TurboModule {
16
11
  /**
17
12
  * Initialize the Vouch SDK with a customer ID
18
13
  * @param customerId - Your customer ID provided by Vouch
19
14
  */
20
- initialize(customerId: string, style: VouchStyle): void;
15
+ initialize(customerId: string): void;
21
16
  /**
22
17
  * Check if the SDK is initialized
23
18
  * @returns true if initialized, false otherwise
@@ -1 +1 @@
1
- {"version":3,"file":"NativeVouch.d.ts","sourceRoot":"","sources":["../../src/NativeVouch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC;;;OAGG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IAExD;;;OAGG;IACH,aAAa,IAAI,OAAO,CAAC;IAEzB;;;;;;;OAOG;IACH,KAAK,CACH,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,SAAS,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,EACzC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GACnC,IAAI,CAAC;CACT;;AAED,wBAAiE"}
1
+ {"version":3,"file":"NativeVouch.d.ts","sourceRoot":"","sources":["../../src/NativeVouch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC;;;OAGG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;;OAGG;IACH,aAAa,IAAI,OAAO,CAAC;IAEzB;;;;;;;OAOG;IACH,KAAK,CACH,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,SAAS,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,EACzC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GACnC,IAAI,CAAC;CACT;;AAED,wBAAiE"}
@@ -1,14 +1,13 @@
1
- import { VouchSuccess, VouchError, VouchStyle } from './NativeVouch';
1
+ import { VouchSuccess, VouchError } from './NativeVouch';
2
2
  export interface VouchSDKConfig {
3
3
  customerId: string;
4
- style?: VouchStyle;
5
4
  }
6
5
  export interface VouchStartParams {
7
6
  dataSourceId: string;
8
7
  webhookUrl: string;
9
8
  inputs?: Object;
10
9
  }
11
- export type { VouchSuccess, VouchError, VouchStyle };
10
+ export type { VouchSuccess, VouchError };
12
11
  declare class VouchSDK {
13
12
  /**
14
13
  * Initialize the Vouch SDK
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAoB,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAElF,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAErD,cAAM,QAAQ;IACZ;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAIxC;;;OAGG;IACH,aAAa,IAAI,OAAO;IAIxB;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;CAWvD;;AAED,wBAA8B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAoB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEtE,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AAEzC,cAAM,QAAQ;IACZ;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAIxC;;;OAGG;IACH,aAAa,IAAI,OAAO;IAIxB;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;CAWvD;;AAED,wBAA8B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getvouch/react-native-sdk",
3
- "version": "0.0.4",
3
+ "version": "0.2.0",
4
4
  "description": "React Native turbo module for Vouch SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -11,18 +11,12 @@ export interface VouchError {
11
11
  description: string;
12
12
  }
13
13
 
14
- export interface VouchStyle {
15
- logo?: string;
16
- logoSmall?: string;
17
- footerLogo?: string;
18
- }
19
-
20
14
  export interface Spec extends TurboModule {
21
15
  /**
22
16
  * Initialize the Vouch SDK with a customer ID
23
17
  * @param customerId - Your customer ID provided by Vouch
24
18
  */
25
- initialize(customerId: string, style: VouchStyle): void;
19
+ initialize(customerId: string): void;
26
20
 
27
21
  /**
28
22
  * Check if the SDK is initialized
package/src/index.ts CHANGED
@@ -1,8 +1,7 @@
1
- import NativeVouch, { VouchSuccess, VouchError, VouchStyle } from './NativeVouch';
1
+ import NativeVouch, { VouchSuccess, VouchError } from './NativeVouch';
2
2
 
3
3
  export interface VouchSDKConfig {
4
4
  customerId: string;
5
- style?: VouchStyle;
6
5
  }
7
6
 
8
7
  export interface VouchStartParams {
@@ -11,7 +10,7 @@ export interface VouchStartParams {
11
10
  inputs?: Object;
12
11
  }
13
12
 
14
- export type { VouchSuccess, VouchError, VouchStyle };
13
+ export type { VouchSuccess, VouchError };
15
14
 
16
15
  class VouchSDK {
17
16
  /**
@@ -19,7 +18,7 @@ class VouchSDK {
19
18
  * @param config - Configuration object with customerId
20
19
  */
21
20
  initialize(config: VouchSDKConfig): void {
22
- NativeVouch.initialize(config.customerId, config.style ?? {});
21
+ NativeVouch.initialize(config.customerId);
23
22
  }
24
23
 
25
24
  /**
package/vouch-rn.podspec CHANGED
@@ -19,5 +19,5 @@ Pod::Spec.new do |s|
19
19
  install_modules_dependencies(s)
20
20
 
21
21
  # Vouch SDK dependency
22
- s.dependency "vouch-ios-sdk", "~> 0.0.9"
22
+ s.dependency "vouch-ios-sdk", "~> 0.2.1"
23
23
  end