@appboxo/expo-boxo-sdk 0.13.0 → 0.14.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/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
- ## [0.13.0]
2
+ ## [0.14.0]
3
+ - add orderPaymentId field to Payment
4
+
5
+ ## [0.13.1]
3
6
  - add Lottie animation as a miniapp loader
4
7
 
5
8
  ## [0.12.1]
@@ -42,6 +42,6 @@ android {
42
42
  }
43
43
  }
44
44
  dependencies {
45
- implementation('io.boxo.sdk:boxo-android:1.41.0')
45
+ implementation('io.boxo.sdk:boxo-android:1.42.0')
46
46
  implementation('androidx.fragment:fragment:1.8.5')
47
47
  }
@@ -36,7 +36,4 @@ class ConfigOptions : Record {
36
36
 
37
37
  @Field
38
38
  val splashScreenOptions: SplashScreenOptions? = null
39
-
40
- @Field
41
- val lottieProgressOptions: LottieProgressOptions? = null
42
39
  }
@@ -74,14 +74,6 @@ class ExpoBoxoSdkModule : Module() {
74
74
  dark = Color.parseColor(options.darkBackground)
75
75
  )
76
76
  }
77
- options.lottieProgressOptions?.also { options->
78
- setProgressBarLottieFromAssets(
79
- lightAssetPath = options.light,
80
- darkAssetPath = options.dark,
81
- widthDp = options.width,
82
- heightDp = options.height
83
- )
84
- }
85
77
  }
86
78
  .build()
87
79
  )
@@ -105,6 +97,7 @@ class ExpoBoxoSdkModule : Module() {
105
97
  "paymentEvent", mapOf(
106
98
  "appId" to miniapp.appId,
107
99
  "transactionToken" to paymentData.transactionToken,
100
+ "orderPaymentId" to paymentData.orderPaymentId,
108
101
  "miniappOrderId" to paymentData.miniappOrderId,
109
102
  "amount" to paymentData.amount,
110
103
  "currency" to paymentData.currency,
@@ -238,6 +231,7 @@ class ExpoBoxoSdkModule : Module() {
238
231
  .sendPaymentResult(
239
232
  PaymentData(
240
233
  transactionToken = paymentEvent.transactionToken ?: "",
234
+ orderPaymentId = paymentEvent.orderPaymentId ?: "",
241
235
  miniappOrderId = paymentEvent.miniappOrderId ?: "",
242
236
  amount = paymentEvent.amount ?: 0.0,
243
237
  currency = paymentEvent.currency ?: "",
@@ -10,6 +10,9 @@ class PaymentEventData : Record {
10
10
  @Field
11
11
  val transactionToken: String? = null
12
12
 
13
+ @Field
14
+ val orderPaymentId: String? = null
15
+
13
16
  @Field
14
17
  val miniappOrderId: String? = null
15
18
 
@@ -4,6 +4,7 @@ export type AuthEventPayload = {
4
4
  export type PaymentData = {
5
5
  appId: string;
6
6
  transactionToken?: string;
7
+ orderPaymentId?: string;
7
8
  miniappOrderId?: string;
8
9
  amount?: number;
9
10
  currency?: string;
@@ -81,10 +82,6 @@ export type ConfigOptions = {
81
82
  * use it to customize the splash screen
82
83
  */
83
84
  splashScreenOptions?: SplashScreenOptions;
84
- /**
85
- * use it to customize miniapp progress with lottie
86
- */
87
- lottieProgressOptions?: LottieProgressOptions;
88
85
  };
89
86
  export type MiniappOptions = {
90
87
  /**
@@ -150,10 +147,4 @@ export type SplashScreenOptions = {
150
147
  darkProgressIndicator: string;
151
148
  darkProgressTrack: string;
152
149
  };
153
- export type LottieProgressOptions = {
154
- light: string;
155
- dark?: string;
156
- width?: number;
157
- height?: number;
158
- };
159
150
  //# sourceMappingURL=ExpoBoxoSdk.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoBoxoSdk.types.d.ts","sourceRoot":"","sources":["../src/ExpoBoxoSdk.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM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YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,SAAS,CAAC;CACnG,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoBoxoSdk.types.js","sourceRoot":"","sources":["../src/ExpoBoxoSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["export type AuthEventPayload = {\n appId: string;\n};\n\nexport type PaymentData = {\n appId: string;\n transactionToken?: string;\n miniappOrderId?: string;\n amount?: number;\n currency?: string;\n extraParams?: Record<string, any>;\n hostappOrderId?: string;\n status?: string;\n};\n\nexport type CustomEventData = {\n appId: string;\n requestId?: number;\n type?: string;\n errorType?: string;\n payload?: Record<string, any>;\n};\n\nexport type LifecycleData = {\n appId: string;\n /**\n * onLaunch - Called when the miniapp will launch with Boxo.open(...)\n * onResume - Called when the miniapp will start interacting with the user\n * onPause - Called when the miniapp loses foreground state\n * onClose - Called when clicked close button in miniapp or when destroyed miniapp page\n * onError - Called when miniapp fails to launch due to internet connection issues\n * onUserInteraction - Called whenever touch event is dispatched to the miniapp page.\n */\n lifecycle: string;\n error?: string\n};\n\nexport type ConfigOptions = {\n /**\n * your client id from dashboard\n */\n clientId: string;\n /**\n * hostapp userId, will be used for the Consent Management\n */\n userId?: string;\n /**\n * language value will be passed to the miniapp\n */\n language?: string;\n /**\n * switch to sandbox mode\n */\n sandboxMode?: boolean;\n /**\n * Each miniapp appears as a task in the Recents screen.\n * !It works only on android devices.\n */\n multitaskMode?: boolean;\n /**\n * theme for splash screen and other native components used inside miniapp.\n */\n theme?: 'light' | 'dark' | 'system';\n /**\n * enables webview debugging\n */\n isDebug?: boolean;\n /**\n * use it to hide \"Settings\" from Miniapp menu\n */\n showPermissionsPage?: boolean;\n /**\n * use it to hide \"Clear cache\" from Miniapp menu\n */\n showClearCache?: boolean;\n\n /**\n * use it to hide \"About Page\" from Miniapp menu\n */\n showAboutPage?: boolean;\n\n /**\n * use it to customize the consent screen\n */\n consentScreenConfig?: ConsentScreenConfig;\n\n /**\n * use it to customize the splash screen\n */\n splashScreenOptions?: SplashScreenOptions;\n\n /**\n * use it to customize miniapp progress with lottie\n */\n lottieProgressOptions?: LottieProgressOptions;\n};\n\nexport type MiniappOptions = {\n /**\n * miniapp id\n */\n appId: string;\n /**\n * (optional) data as Map that is sent to miniapp\n */\n data?: Record<string, any>;\n /**\n * (optional) miniapp theme 'dark' | 'light' | 'system' (by default is system theme)\n */\n theme?: 'light' | 'dark' | 'system';\n /**\n * (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test)\n */\n extraUrlParams?: Record<string, string>;\n /**\n * (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test)\n */\n urlSuffix?: string;\n /**\n * (optional) provide colors to miniapp if miniapp supports\n */\n colors?: Record<string, string>;\n /**\n * (optional) use to skip miniapp splash screen\n */\n enableSplash?: boolean;\n /**\n * (optional) use to save state on close miniapp\n */\n saveState?: boolean;\n /**\n * (optional) use to change launch animation for miniapp.\n */\n pageAnimation?: 'BOTTOM_TO_TOP' | 'TOP_TO_BOTTOM' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FADE_IN';\n};\n\nexport type MiniappListResult = {\n miniapps?: Array<MiniappData>;\n error?: string;\n}\n\nexport type MiniappData = {\n appId: string;\n name: string;\n category: string;\n description: string;\n logo: string;\n}\n\nexport type ConsentScreenConfig = {\n title?: string;\n noRequiredFieldsDescription?: string;\n requiredFieldsDescription?: string;\n allowButtonTitle?: string;\n cancelButtonTitle?: string;\n};\n\nexport type SplashScreenOptions = {\n lightBackground: string;\n darkBackground: string;\n lightProgressIndicator: string;\n lightProgressTrack: string;\n darkProgressIndicator: string;\n darkProgressTrack: string;\n};\n\nexport type LottieProgressOptions = {\n light: string;\n dark?: string;\n width?: number;\n height?: number;\n};"]}
1
+ {"version":3,"file":"ExpoBoxoSdk.types.js","sourceRoot":"","sources":["../src/ExpoBoxoSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["export type AuthEventPayload = {\n appId: string;\n};\n\nexport type PaymentData = {\n appId: string;\n transactionToken?: string;\n orderPaymentId?: string;\n miniappOrderId?: string;\n amount?: number;\n currency?: string;\n extraParams?: Record<string, any>;\n hostappOrderId?: string;\n status?: string;\n};\n\nexport type CustomEventData = {\n appId: string;\n requestId?: number;\n type?: string;\n errorType?: string;\n payload?: Record<string, any>;\n};\n\nexport type LifecycleData = {\n appId: string;\n /**\n * onLaunch - Called when the miniapp will launch with Boxo.open(...)\n * onResume - Called when the miniapp will start interacting with the user\n * onPause - Called when the miniapp loses foreground state\n * onClose - Called when clicked close button in miniapp or when destroyed miniapp page\n * onError - Called when miniapp fails to launch due to internet connection issues\n * onUserInteraction - Called whenever touch event is dispatched to the miniapp page.\n */\n lifecycle: string;\n error?: string\n};\n\nexport type ConfigOptions = {\n /**\n * your client id from dashboard\n */\n clientId: string;\n /**\n * hostapp userId, will be used for the Consent Management\n */\n userId?: string;\n /**\n * language value will be passed to the miniapp\n */\n language?: string;\n /**\n * switch to sandbox mode\n */\n sandboxMode?: boolean;\n /**\n * Each miniapp appears as a task in the Recents screen.\n * !It works only on android devices.\n */\n multitaskMode?: boolean;\n /**\n * theme for splash screen and other native components used inside miniapp.\n */\n theme?: 'light' | 'dark' | 'system';\n /**\n * enables webview debugging\n */\n isDebug?: boolean;\n /**\n * use it to hide \"Settings\" from Miniapp menu\n */\n showPermissionsPage?: boolean;\n /**\n * use it to hide \"Clear cache\" from Miniapp menu\n */\n showClearCache?: boolean;\n\n /**\n * use it to hide \"About Page\" from Miniapp menu\n */\n showAboutPage?: boolean;\n\n /**\n * use it to customize the consent screen\n */\n consentScreenConfig?: ConsentScreenConfig;\n\n /**\n * use it to customize the splash screen\n */\n splashScreenOptions?: SplashScreenOptions;\n};\n\nexport type MiniappOptions = {\n /**\n * miniapp id\n */\n appId: string;\n /**\n * (optional) data as Map that is sent to miniapp\n */\n data?: Record<string, any>;\n /**\n * (optional) miniapp theme 'dark' | 'light' | 'system' (by default is system theme)\n */\n theme?: 'light' | 'dark' | 'system';\n /**\n * (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test)\n */\n extraUrlParams?: Record<string, string>;\n /**\n * (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test)\n */\n urlSuffix?: string;\n /**\n * (optional) provide colors to miniapp if miniapp supports\n */\n colors?: Record<string, string>;\n /**\n * (optional) use to skip miniapp splash screen\n */\n enableSplash?: boolean;\n /**\n * (optional) use to save state on close miniapp\n */\n saveState?: boolean;\n /**\n * (optional) use to change launch animation for miniapp.\n */\n pageAnimation?: 'BOTTOM_TO_TOP' | 'TOP_TO_BOTTOM' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FADE_IN';\n};\n\nexport type MiniappListResult = {\n miniapps?: Array<MiniappData>;\n error?: string;\n}\n\nexport type MiniappData = {\n appId: string;\n name: string;\n category: string;\n description: string;\n logo: string;\n}\n\nexport type ConsentScreenConfig = {\n title?: string;\n noRequiredFieldsDescription?: string;\n requiredFieldsDescription?: string;\n allowButtonTitle?: string;\n cancelButtonTitle?: string;\n};\n\nexport type SplashScreenOptions = {\n lightBackground: string;\n darkBackground: string;\n lightProgressIndicator: string;\n lightProgressTrack: string;\n darkProgressIndicator: string;\n darkProgressTrack: string;\n};"]}
@@ -40,8 +40,4 @@ struct ConfigOptions: Record {
40
40
 
41
41
  @Field
42
42
  var splashScreenOptions: SplashScreenOptions?
43
-
44
- @Field
45
- var lottieProgressOptions: LottieProgressOptions?
46
43
  }
47
-
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.static_framework = true
17
17
 
18
18
  s.dependency 'ExpoModulesCore'
19
- s.dependency 'BoxoSDK', '1.27.4'
19
+ s.dependency 'BoxoSDK', '1.28.0'
20
20
 
21
21
  # Swift/Objective-C compatibility
22
22
  s.pod_target_xcconfig = {
@@ -52,17 +52,6 @@ public class ExpoBoxoSdkModule: Module {
52
52
  config.progressBarColors = ProgressBarColors(lightIndicator: lightProgressIndicatorColor, lightTrack: lightProgressTrackColor, darkIndicator: darkProgressIndicatorColor, darkTrack: darkProgressTrackColor)
53
53
  }
54
54
  }
55
-
56
- if let lottie = options.lottieProgressOptions {
57
- let width = Double(lottie.width ?? 80)
58
- let height = Double(lottie.height ?? 80)
59
- config.progressBarLottieAssets = .init(
60
- lightAssetPath: lottie.light,
61
- darkAssetPath: lottie.dark ?? "",
62
- width: width,
63
- height: height
64
- )
65
- }
66
55
 
67
56
  Boxo.shared.setConfig(config: config)
68
57
  }
@@ -112,7 +101,8 @@ public class ExpoBoxoSdkModule: Module {
112
101
 
113
102
  miniApp.setConfig(config: miniappConfig)
114
103
  DispatchQueue.main.async {
115
- miniApp.open(viewController: UIApplication.shared.delegate!.window!!.rootViewController!)
104
+ guard let rootViewController = self.resolveRootViewController() else { return }
105
+ miniApp.open(viewController: rootViewController)
116
106
  }
117
107
  }
118
108
 
@@ -143,6 +133,7 @@ public class ExpoBoxoSdkModule: Module {
143
133
  Function("sendPaymentEvent") { (paymentEvent : PaymentEventData) in
144
134
  let paymentData = PaymentData()
145
135
  paymentData.transactionToken = paymentEvent.transactionToken ?? ""
136
+ paymentData.orderPaymentId = paymentEvent.orderPaymentId ?? ""
146
137
  paymentData.miniappOrderId = paymentEvent.miniappOrderId ?? ""
147
138
  paymentData.amount = paymentEvent.amount ?? 0.0
148
139
  paymentData.currency = paymentEvent.currency ?? ""
@@ -193,6 +184,20 @@ public class ExpoBoxoSdkModule: Module {
193
184
  }
194
185
  }
195
186
  }
187
+
188
+ private func resolveRootViewController() -> UIViewController? {
189
+ if #available(iOS 13.0, *) {
190
+ let windows = UIApplication.shared.connectedScenes
191
+ .compactMap { $0 as? UIWindowScene }
192
+ .filter { $0.activationState == .foregroundActive || $0.activationState == .foregroundInactive }
193
+ .flatMap { $0.windows }
194
+ let keyWindow = windows.first { $0.isKeyWindow } ?? windows.first
195
+ if let rootViewController = keyWindow?.rootViewController {
196
+ return rootViewController
197
+ }
198
+ }
199
+ return (UIApplication.shared.delegate?.window ?? nil)?.rootViewController
200
+ }
196
201
  }
197
202
 
198
203
  extension ExpoBoxoSdkModule : MiniappDelegate {
@@ -200,6 +205,7 @@ extension ExpoBoxoSdkModule : MiniappDelegate {
200
205
  let dict = [
201
206
  "appId" : miniapp.appId,
202
207
  "transactionToken" : paymentData.transactionToken,
208
+ "orderPaymentId" : paymentData.orderPaymentId,
203
209
  "miniappOrderId" : paymentData.miniappOrderId,
204
210
  "amount" : paymentData.amount,
205
211
  "currency" : paymentData.currency,
@@ -14,6 +14,9 @@ struct PaymentEventData : Record {
14
14
  @Field
15
15
  var transactionToken: String?
16
16
 
17
+ @Field
18
+ var orderPaymentId: String?
19
+
17
20
  @Field
18
21
  var miniappOrderId: String?
19
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appboxo/expo-boxo-sdk",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Expo wrapper over Boxo SDK for IOS and Android.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -5,6 +5,7 @@ export type AuthEventPayload = {
5
5
  export type PaymentData = {
6
6
  appId: string;
7
7
  transactionToken?: string;
8
+ orderPaymentId?: string;
8
9
  miniappOrderId?: string;
9
10
  amount?: number;
10
11
  currency?: string;
@@ -88,11 +89,6 @@ export type ConfigOptions = {
88
89
  * use it to customize the splash screen
89
90
  */
90
91
  splashScreenOptions?: SplashScreenOptions;
91
-
92
- /**
93
- * use it to customize miniapp progress with lottie
94
- */
95
- lottieProgressOptions?: LottieProgressOptions;
96
92
  };
97
93
 
98
94
  export type MiniappOptions = {
@@ -162,11 +158,4 @@ export type SplashScreenOptions = {
162
158
  lightProgressTrack: string;
163
159
  darkProgressIndicator: string;
164
160
  darkProgressTrack: string;
165
- };
166
-
167
- export type LottieProgressOptions = {
168
- light: string;
169
- dark?: string;
170
- width?: number;
171
- height?: number;
172
161
  };
@@ -1,19 +0,0 @@
1
- package io.boxo.expo
2
-
3
- import expo.modules.kotlin.records.Field
4
- import expo.modules.kotlin.records.Record
5
-
6
- class LottieProgressOptions : Record {
7
- @Field
8
- val light: String = ""
9
-
10
- @Field
11
- val dark: String? = null
12
-
13
- @Field
14
- val width: Int? = null
15
-
16
- @Field
17
- val height: Int? = null
18
-
19
- }
@@ -1,20 +0,0 @@
1
- //
2
- // LottieProgressOptions.swift
3
- // ExpoBoxoSdk
4
- //
5
-
6
- import ExpoModulesCore
7
-
8
- struct LottieProgressOptions: Record {
9
- @Field
10
- var light: String = ""
11
-
12
- @Field
13
- var dark: String?
14
-
15
- @Field
16
- var width: Int?
17
-
18
- @Field
19
- var height: Int?
20
- }