@juspay-tech/react-native-hyperswitch 0.2.1

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.
Files changed (261) hide show
  1. package/HyperswitchSdkReactNative.podspec +31 -0
  2. package/android/build.gradle +119 -0
  3. package/android/gradle.properties +5 -0
  4. package/android/hyperswitch_autolinking.gradle +378 -0
  5. package/android/proguard-rules.pro +72 -0
  6. package/android/src/main/AndroidManifest.xml +25 -0
  7. package/android/src/main/assets/hyperswitch.bundle +1677 -0
  8. package/android/src/main/java/com/hyperswitchsdkreactnative/HyperswitchSdkReactNativePackage.kt +36 -0
  9. package/android/src/main/java/com/hyperswitchsdkreactnative/activity/RedirectActivity.kt +39 -0
  10. package/android/src/main/java/com/hyperswitchsdkreactnative/internal/DefaultReactHost.kt +314 -0
  11. package/android/src/main/java/com/hyperswitchsdkreactnative/internal/DefaultReactNativeHost.kt +131 -0
  12. package/android/src/main/java/com/hyperswitchsdkreactnative/internal/ReactDelegate.kt +423 -0
  13. package/android/src/main/java/com/hyperswitchsdkreactnative/internal/ReactFragment.kt +335 -0
  14. package/android/src/main/java/com/hyperswitchsdkreactnative/modules/HyperswitchSdkNativeModule.kt +143 -0
  15. package/android/src/main/java/com/hyperswitchsdkreactnative/modules/HyperswitchSdkReactNativeModule.kt +92 -0
  16. package/android/src/main/java/com/hyperswitchsdkreactnative/provider/HyperProvider.kt +269 -0
  17. package/android/src/main/java/com/hyperswitchsdkreactnative/views/GooglePayButtonView.kt +60 -0
  18. package/android/src/main/java/com/hyperswitchsdkreactnative/views/GooglePayButtonViewManager.kt +76 -0
  19. package/android/src/main/java/io/hyperswitch/hyperota/HyperOtaLogger.kt +122 -0
  20. package/android/src/main/java/io/hyperswitch/logs/CrashHandler.kt +29 -0
  21. package/android/src/main/java/io/hyperswitch/logs/Debouncer.kt +20 -0
  22. package/android/src/main/java/io/hyperswitch/logs/HyperLogManager.kt +113 -0
  23. package/android/src/main/java/io/hyperswitch/logs/LogData.kt +159 -0
  24. package/android/src/main/java/io/hyperswitch/logs/LogFileManager.kt +60 -0
  25. package/android/src/main/java/io/hyperswitch/networking/HyperNetworking.kt +73 -0
  26. package/android/src/main/java/io/hyperswitch/react/Utils.kt +23 -0
  27. package/android/src/main/res/values/attrs.xml +6 -0
  28. package/android/src/main/res/values/strings.xml +5 -0
  29. package/android/src/main/res/values/theme.xml +16 -0
  30. package/ios/Modules/HyperswitchModule.swift +61 -0
  31. package/ios/Modules/HyperswitchNativeModule.swift +113 -0
  32. package/ios/Modules/HyperswitchSdkNative.h +5 -0
  33. package/ios/Modules/HyperswitchSdkNative.mm +98 -0
  34. package/ios/Modules/HyperswitchSdkReactNative.h +5 -0
  35. package/ios/Modules/HyperswitchSdkReactNative.mm +53 -0
  36. package/ios/Views/ApplePayView.h +14 -0
  37. package/ios/Views/ApplePayView.mm +89 -0
  38. package/ios/hyperswitchSDK/Core/ApplePay/ApplePayHandler.swift +249 -0
  39. package/ios/hyperswitchSDK/Core/ApplePay/ApplePayViewManager.m +18 -0
  40. package/ios/hyperswitchSDK/Core/ApplePay/ApplePayViewManager.swift +123 -0
  41. package/ios/hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView+SwiftUI.swift +49 -0
  42. package/ios/hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView+UIKit.swift +49 -0
  43. package/ios/hyperswitchSDK/Core/HyperPaymentSheet/PaymentSheetView.swift +80 -0
  44. package/ios/hyperswitchSDK/Core/HyperSession/PaymentSession+UIKit.swift +176 -0
  45. package/ios/hyperswitchSDK/Core/HyperSession/PaymentSessionTypes.swift +121 -0
  46. package/ios/hyperswitchSDK/Core/Models/LogPayload.swift +53 -0
  47. package/ios/hyperswitchSDK/Core/NativeLogger/Debouncer.swift +37 -0
  48. package/ios/hyperswitchSDK/Core/NativeLogger/LogBuilder.swift +91 -0
  49. package/ios/hyperswitchSDK/Core/NativeLogger/LogFileManager.swift +75 -0
  50. package/ios/hyperswitchSDK/Core/NativeLogger/LogManager.swift +113 -0
  51. package/ios/hyperswitchSDK/Core/NativeModule/HyperHeadless.m +16 -0
  52. package/ios/hyperswitchSDK/Core/NativeModule/HyperHeadless.swift +74 -0
  53. package/ios/hyperswitchSDK/Core/NativeModule/HyperModule.m +28 -0
  54. package/ios/hyperswitchSDK/Core/NativeModule/HyperModule.swift +168 -0
  55. package/ios/hyperswitchSDK/Core/NativeModule/OTAServices.swift +113 -0
  56. package/ios/hyperswitchSDK/Core/NativeModule/RNHeadlessManager.swift +45 -0
  57. package/ios/hyperswitchSDK/Core/NativeModule/RNResponseHandler.swift +12 -0
  58. package/ios/hyperswitchSDK/Core/NativeModule/RNViewManager.swift +90 -0
  59. package/ios/hyperswitchSDK/Core/NativeModule/hyper-Bridging-Header.h +9 -0
  60. package/ios/hyperswitchSDK/Core/Resources/HyperOTA.plist +20 -0
  61. package/ios/hyperswitchSDK/Core/Resources/hyperswitch.bundle +1673 -0
  62. package/ios/hyperswitchSDK/Shared/APIClient.swift +21 -0
  63. package/ios/hyperswitchSDK/Shared/DictionaryConverter.swift +104 -0
  64. package/ios/hyperswitchSDK/Shared/Environment.swift +24 -0
  65. package/ios/hyperswitchSDK/Shared/Extensions.swift +31 -0
  66. package/ios/hyperswitchSDK/Shared/Helper.swift +16 -0
  67. package/ios/hyperswitchSDK/Shared/HyperNetworking.swift +137 -0
  68. package/ios/hyperswitchSDK/Shared/HyperParams.swift +44 -0
  69. package/ios/hyperswitchSDK/Shared/HyperUIViewController.swift +25 -0
  70. package/ios/hyperswitchSDK/Shared/PaymentSession.swift +43 -0
  71. package/ios/hyperswitchSDK/Shared/PaymentSheet.swift +30 -0
  72. package/ios/hyperswitchSDK/Shared/PaymentSheetAppearance.swift +264 -0
  73. package/ios/hyperswitchSDK/Shared/PaymentSheetConfiguration.swift +494 -0
  74. package/ios/hyperswitchSDK/Shared/SwiftUIManager.swift +28 -0
  75. package/ios/hyperswitchSDK/Shared/Version.swift +12 -0
  76. package/lib/bs/JuspayTechReactNativeHyperswitch.cmi +0 -0
  77. package/lib/bs/JuspayTechReactNativeHyperswitch.cmj +0 -0
  78. package/lib/bs/JuspayTechReactNativeHyperswitch.cmt +0 -0
  79. package/lib/bs/JuspayTechReactNativeHyperswitch.mlmap +5 -0
  80. package/lib/bs/build.ninja +29 -0
  81. package/lib/bs/install.ninja +25 -0
  82. package/lib/bs/src/context/HyperProvider-JuspayTechReactNativeHyperswitch.cmi +0 -0
  83. package/lib/bs/src/context/HyperProvider-JuspayTechReactNativeHyperswitch.cmj +0 -0
  84. package/lib/bs/src/context/HyperProvider-JuspayTechReactNativeHyperswitch.cmt +0 -0
  85. package/lib/bs/src/context/HyperProvider.ast +0 -0
  86. package/lib/bs/src/context/HyperProvider.d +1 -0
  87. package/lib/bs/src/hooks/useHyper-JuspayTechReactNativeHyperswitch.cmi +0 -0
  88. package/lib/bs/src/hooks/useHyper-JuspayTechReactNativeHyperswitch.cmj +0 -0
  89. package/lib/bs/src/hooks/useHyper-JuspayTechReactNativeHyperswitch.cmt +0 -0
  90. package/lib/bs/src/hooks/useHyper.ast +0 -0
  91. package/lib/bs/src/hooks/useHyper.d +1 -0
  92. package/lib/bs/src/modules/NativeHyperswitchSdk-JuspayTechReactNativeHyperswitch.cmi +0 -0
  93. package/lib/bs/src/modules/NativeHyperswitchSdk-JuspayTechReactNativeHyperswitch.cmj +0 -0
  94. package/lib/bs/src/modules/NativeHyperswitchSdk-JuspayTechReactNativeHyperswitch.cmt +0 -0
  95. package/lib/bs/src/modules/NativeHyperswitchSdk.ast +0 -0
  96. package/lib/bs/src/modules/NativeHyperswitchSdk.d +1 -0
  97. package/lib/bs/src/types/PaymentSheetConfiguration-JuspayTechReactNativeHyperswitch.cmi +0 -0
  98. package/lib/bs/src/types/PaymentSheetConfiguration-JuspayTechReactNativeHyperswitch.cmj +0 -0
  99. package/lib/bs/src/types/PaymentSheetConfiguration-JuspayTechReactNativeHyperswitch.cmt +0 -0
  100. package/lib/bs/src/types/PaymentSheetConfiguration.ast +0 -0
  101. package/lib/bs/src/types/PaymentSheetConfiguration.d +1 -0
  102. package/lib/commonjs/context/HyperProvider.gen.js +16 -0
  103. package/lib/commonjs/context/HyperProvider.gen.js.map +1 -0
  104. package/lib/commonjs/context/HyperProvider.res +78 -0
  105. package/lib/commonjs/context/HyperProvider.res.js +98 -0
  106. package/lib/commonjs/context/HyperProvider.res.js.map +1 -0
  107. package/lib/commonjs/hooks/useHyper.gen.js +15 -0
  108. package/lib/commonjs/hooks/useHyper.gen.js.map +1 -0
  109. package/lib/commonjs/hooks/useHyper.res +142 -0
  110. package/lib/commonjs/hooks/useHyper.res.js +152 -0
  111. package/lib/commonjs/hooks/useHyper.res.js.map +1 -0
  112. package/lib/commonjs/index.js +26 -0
  113. package/lib/commonjs/index.js.map +1 -0
  114. package/lib/commonjs/modules/NativeHyperswitchSdk.gen.js +6 -0
  115. package/lib/commonjs/modules/NativeHyperswitchSdk.gen.js.map +1 -0
  116. package/lib/commonjs/modules/NativeHyperswitchSdk.res +55 -0
  117. package/lib/commonjs/modules/NativeHyperswitchSdk.res.js +14 -0
  118. package/lib/commonjs/modules/NativeHyperswitchSdk.res.js.map +1 -0
  119. package/lib/commonjs/package.json +1 -0
  120. package/lib/commonjs/shims/Js.shim.js +2 -0
  121. package/lib/commonjs/shims/Js.shim.js.map +1 -0
  122. package/lib/commonjs/specs/ApplePayButtonNativeComponent.ts +11 -0
  123. package/lib/commonjs/specs/GooglePayButtonNativeComponent.android.js +10 -0
  124. package/lib/commonjs/specs/GooglePayButtonNativeComponent.android.js.map +1 -0
  125. package/lib/commonjs/specs/HyperswitchSdkReactNativeViewNativeComponent.ts +10 -0
  126. package/lib/commonjs/specs/NativeHyperswitchSdkNative.js +9 -0
  127. package/lib/commonjs/specs/NativeHyperswitchSdkNative.js.map +1 -0
  128. package/lib/commonjs/specs/NativeHyperswitchSdkReactNative.js +9 -0
  129. package/lib/commonjs/specs/NativeHyperswitchSdkReactNative.js.map +1 -0
  130. package/lib/commonjs/types/PaymentSheetConfiguration.gen.js +2 -0
  131. package/lib/commonjs/types/PaymentSheetConfiguration.gen.js.map +1 -0
  132. package/lib/commonjs/types/PaymentSheetConfiguration.res +215 -0
  133. package/lib/commonjs/types/PaymentSheetConfiguration.res.js +4 -0
  134. package/lib/commonjs/types/PaymentSheetConfiguration.res.js.map +1 -0
  135. package/lib/module/context/HyperProvider.gen.js +11 -0
  136. package/lib/module/context/HyperProvider.gen.js.map +1 -0
  137. package/lib/module/context/HyperProvider.res +78 -0
  138. package/lib/module/context/HyperProvider.res.js +91 -0
  139. package/lib/module/context/HyperProvider.res.js.map +1 -0
  140. package/lib/module/hooks/useHyper.gen.js +10 -0
  141. package/lib/module/hooks/useHyper.gen.js.map +1 -0
  142. package/lib/module/hooks/useHyper.res +142 -0
  143. package/lib/module/hooks/useHyper.res.js +142 -0
  144. package/lib/module/hooks/useHyper.res.js.map +1 -0
  145. package/lib/module/index.js +5 -0
  146. package/lib/module/index.js.map +1 -0
  147. package/lib/module/modules/NativeHyperswitchSdk.gen.js +4 -0
  148. package/lib/module/modules/NativeHyperswitchSdk.gen.js.map +1 -0
  149. package/lib/module/modules/NativeHyperswitchSdk.res +55 -0
  150. package/lib/module/modules/NativeHyperswitchSdk.res.js +9 -0
  151. package/lib/module/modules/NativeHyperswitchSdk.res.js.map +1 -0
  152. package/lib/module/package.json +1 -0
  153. package/lib/module/shims/Js.shim.js +2 -0
  154. package/lib/module/shims/Js.shim.js.map +1 -0
  155. package/lib/module/specs/ApplePayButtonNativeComponent.ts +11 -0
  156. package/lib/module/specs/GooglePayButtonNativeComponent.android.js +5 -0
  157. package/lib/module/specs/GooglePayButtonNativeComponent.android.js.map +1 -0
  158. package/lib/module/specs/HyperswitchSdkReactNativeViewNativeComponent.ts +10 -0
  159. package/lib/module/specs/NativeHyperswitchSdkNative.js +5 -0
  160. package/lib/module/specs/NativeHyperswitchSdkNative.js.map +1 -0
  161. package/lib/module/specs/NativeHyperswitchSdkReactNative.js +5 -0
  162. package/lib/module/specs/NativeHyperswitchSdkReactNative.js.map +1 -0
  163. package/lib/module/types/PaymentSheetConfiguration.gen.js +2 -0
  164. package/lib/module/types/PaymentSheetConfiguration.gen.js.map +1 -0
  165. package/lib/module/types/PaymentSheetConfiguration.res +215 -0
  166. package/lib/module/types/PaymentSheetConfiguration.res.js +4 -0
  167. package/lib/module/types/PaymentSheetConfiguration.res.js.map +1 -0
  168. package/lib/typescript/commonjs/babel.config.d.ts +10 -0
  169. package/lib/typescript/commonjs/babel.config.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/eslint.config.d.mts +3 -0
  171. package/lib/typescript/commonjs/eslint.config.d.mts.map +1 -0
  172. package/lib/typescript/commonjs/package.json +1 -0
  173. package/lib/typescript/commonjs/scripts/bootstrap.d.ts +2 -0
  174. package/lib/typescript/commonjs/scripts/bootstrap.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/src/context/HyperProvider.gen.d.ts +17 -0
  176. package/lib/typescript/commonjs/src/context/HyperProvider.gen.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/src/context/HyperProvider.res.d.ts +20 -0
  178. package/lib/typescript/commonjs/src/context/HyperProvider.res.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/src/hooks/useHyper.gen.d.ts +10 -0
  180. package/lib/typescript/commonjs/src/hooks/useHyper.gen.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/src/hooks/useHyper.res.d.ts +95 -0
  182. package/lib/typescript/commonjs/src/hooks/useHyper.res.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/src/index.d.ts +4 -0
  184. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/src/modules/NativeHyperswitchSdk.gen.d.ts +24 -0
  186. package/lib/typescript/commonjs/src/modules/NativeHyperswitchSdk.gen.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/src/modules/NativeHyperswitchSdk.res.d.ts +2 -0
  188. package/lib/typescript/commonjs/src/modules/NativeHyperswitchSdk.res.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/src/shims/Js.shim.d.ts +4 -0
  190. package/lib/typescript/commonjs/src/shims/Js.shim.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/src/specs/ApplePayButtonNativeComponent.d.ts +10 -0
  192. package/lib/typescript/commonjs/src/specs/ApplePayButtonNativeComponent.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/src/specs/GooglePayButtonNativeComponent.android.d.ts +11 -0
  194. package/lib/typescript/commonjs/src/specs/GooglePayButtonNativeComponent.android.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/src/specs/HyperswitchSdkReactNativeViewNativeComponent.d.ts +1 -0
  196. package/lib/typescript/commonjs/src/specs/HyperswitchSdkReactNativeViewNativeComponent.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/src/specs/NativeHyperswitchSdkNative.d.ts +17 -0
  198. package/lib/typescript/commonjs/src/specs/NativeHyperswitchSdkNative.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/src/specs/NativeHyperswitchSdkReactNative.d.ts +9 -0
  200. package/lib/typescript/commonjs/src/specs/NativeHyperswitchSdkReactNative.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/src/types/PaymentSheetConfiguration.gen.d.ts +149 -0
  202. package/lib/typescript/commonjs/src/types/PaymentSheetConfiguration.gen.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/src/types/PaymentSheetConfiguration.res.d.ts +1 -0
  204. package/lib/typescript/commonjs/src/types/PaymentSheetConfiguration.res.d.ts.map +1 -0
  205. package/lib/typescript/module/babel.config.d.ts +10 -0
  206. package/lib/typescript/module/babel.config.d.ts.map +1 -0
  207. package/lib/typescript/module/eslint.config.d.mts +3 -0
  208. package/lib/typescript/module/eslint.config.d.mts.map +1 -0
  209. package/lib/typescript/module/package.json +1 -0
  210. package/lib/typescript/module/scripts/bootstrap.d.ts +2 -0
  211. package/lib/typescript/module/scripts/bootstrap.d.ts.map +1 -0
  212. package/lib/typescript/module/src/context/HyperProvider.gen.d.ts +17 -0
  213. package/lib/typescript/module/src/context/HyperProvider.gen.d.ts.map +1 -0
  214. package/lib/typescript/module/src/context/HyperProvider.res.d.ts +20 -0
  215. package/lib/typescript/module/src/context/HyperProvider.res.d.ts.map +1 -0
  216. package/lib/typescript/module/src/hooks/useHyper.gen.d.ts +10 -0
  217. package/lib/typescript/module/src/hooks/useHyper.gen.d.ts.map +1 -0
  218. package/lib/typescript/module/src/hooks/useHyper.res.d.ts +95 -0
  219. package/lib/typescript/module/src/hooks/useHyper.res.d.ts.map +1 -0
  220. package/lib/typescript/module/src/index.d.ts +4 -0
  221. package/lib/typescript/module/src/index.d.ts.map +1 -0
  222. package/lib/typescript/module/src/modules/NativeHyperswitchSdk.gen.d.ts +24 -0
  223. package/lib/typescript/module/src/modules/NativeHyperswitchSdk.gen.d.ts.map +1 -0
  224. package/lib/typescript/module/src/modules/NativeHyperswitchSdk.res.d.ts +2 -0
  225. package/lib/typescript/module/src/modules/NativeHyperswitchSdk.res.d.ts.map +1 -0
  226. package/lib/typescript/module/src/shims/Js.shim.d.ts +4 -0
  227. package/lib/typescript/module/src/shims/Js.shim.d.ts.map +1 -0
  228. package/lib/typescript/module/src/specs/ApplePayButtonNativeComponent.d.ts +10 -0
  229. package/lib/typescript/module/src/specs/ApplePayButtonNativeComponent.d.ts.map +1 -0
  230. package/lib/typescript/module/src/specs/GooglePayButtonNativeComponent.android.d.ts +11 -0
  231. package/lib/typescript/module/src/specs/GooglePayButtonNativeComponent.android.d.ts.map +1 -0
  232. package/lib/typescript/module/src/specs/HyperswitchSdkReactNativeViewNativeComponent.d.ts +1 -0
  233. package/lib/typescript/module/src/specs/HyperswitchSdkReactNativeViewNativeComponent.d.ts.map +1 -0
  234. package/lib/typescript/module/src/specs/NativeHyperswitchSdkNative.d.ts +17 -0
  235. package/lib/typescript/module/src/specs/NativeHyperswitchSdkNative.d.ts.map +1 -0
  236. package/lib/typescript/module/src/specs/NativeHyperswitchSdkReactNative.d.ts +9 -0
  237. package/lib/typescript/module/src/specs/NativeHyperswitchSdkReactNative.d.ts.map +1 -0
  238. package/lib/typescript/module/src/types/PaymentSheetConfiguration.gen.d.ts +149 -0
  239. package/lib/typescript/module/src/types/PaymentSheetConfiguration.gen.d.ts.map +1 -0
  240. package/lib/typescript/module/src/types/PaymentSheetConfiguration.res.d.ts +1 -0
  241. package/lib/typescript/module/src/types/PaymentSheetConfiguration.res.d.ts.map +1 -0
  242. package/package.json +196 -0
  243. package/src/context/HyperProvider.gen.tsx +26 -0
  244. package/src/context/HyperProvider.res +78 -0
  245. package/src/context/HyperProvider.res.js +112 -0
  246. package/src/hooks/useHyper.gen.tsx +18 -0
  247. package/src/hooks/useHyper.res +142 -0
  248. package/src/hooks/useHyper.res.js +157 -0
  249. package/src/index.tsx +13 -0
  250. package/src/modules/NativeHyperswitchSdk.gen.tsx +25 -0
  251. package/src/modules/NativeHyperswitchSdk.res +55 -0
  252. package/src/modules/NativeHyperswitchSdk.res.js +10 -0
  253. package/src/shims/Js.shim.ts +5 -0
  254. package/src/specs/ApplePayButtonNativeComponent.ts +11 -0
  255. package/src/specs/GooglePayButtonNativeComponent.android.ts +12 -0
  256. package/src/specs/HyperswitchSdkReactNativeViewNativeComponent.ts +10 -0
  257. package/src/specs/NativeHyperswitchSdkNative.ts +33 -0
  258. package/src/specs/NativeHyperswitchSdkReactNative.ts +17 -0
  259. package/src/types/PaymentSheetConfiguration.gen.tsx +202 -0
  260. package/src/types/PaymentSheetConfiguration.res +215 -0
  261. package/src/types/PaymentSheetConfiguration.res.js +2 -0
@@ -0,0 +1,202 @@
1
+ /* TypeScript file generated from PaymentSheetConfiguration.res by genType. */
2
+
3
+ /* eslint-disable */
4
+ /* tslint:disable */
5
+
6
+ export type localeTypes =
7
+ "En"
8
+ | "He"
9
+ | "Fr"
10
+ | "En_GB"
11
+ | "Ar"
12
+ | "Ja"
13
+ | "De"
14
+ | "Fr_BE"
15
+ | "Es"
16
+ | "Ca"
17
+ | "Pt"
18
+ | "It"
19
+ | "Pl"
20
+ | "Nl"
21
+ | "NI_BE"
22
+ | "Sv"
23
+ | "Ru"
24
+ | "Lt"
25
+ | "Cs"
26
+ | "Sk"
27
+ | "Ls"
28
+ | "Cy"
29
+ | "El"
30
+ | "Et"
31
+ | "Fi"
32
+ | "Nb"
33
+ | "Bs"
34
+ | "Da"
35
+ | "Ms"
36
+ | "Tr_CY";
37
+
38
+ export type fontFamilyTypes =
39
+ "DefaultIOS"
40
+ | "DefaultAndroid"
41
+ | "DefaultWeb"
42
+ | { TAG: "CustomFont"; _0: string };
43
+
44
+ export type placeholder = {
45
+ readonly cardNumber?: string;
46
+ readonly expiryDate?: string;
47
+ readonly cvv?: string
48
+ };
49
+
50
+ export type address = {
51
+ readonly first_name?: string;
52
+ readonly last_name?: string;
53
+ readonly city?: string;
54
+ readonly country?: string;
55
+ readonly line1?: string;
56
+ readonly line2?: string;
57
+ readonly zip?: string;
58
+ readonly state?: string
59
+ };
60
+
61
+ export type phone = { readonly number?: string; readonly country_code?: string };
62
+
63
+ export type addressDetails = {
64
+ readonly address?: address;
65
+ readonly email?: string;
66
+ readonly phone?: phone
67
+ };
68
+
69
+ export type customerConfiguration = { readonly id?: string; readonly ephemeralKeySecret?: string };
70
+
71
+ export type colors = {
72
+ readonly primary?: string;
73
+ readonly background?: string;
74
+ readonly componentBackground?: string;
75
+ readonly componentBorder?: string;
76
+ readonly componentDivider?: string;
77
+ readonly componentText?: string;
78
+ readonly primaryText?: string;
79
+ readonly secondaryText?: string;
80
+ readonly placeholderText?: string;
81
+ readonly icon?: string;
82
+ readonly error?: string;
83
+ readonly loaderBackground?: string;
84
+ readonly loaderForeground?: string
85
+ };
86
+
87
+ export type colorType = { readonly light?: colors; readonly dark?: colors };
88
+
89
+ export type offsetType = { readonly x?: number; readonly y?: number };
90
+
91
+ export type shadowConfig = {
92
+ readonly color?: string;
93
+ readonly opacity?: number;
94
+ readonly blurRadius?: number;
95
+ readonly offset?: offsetType;
96
+ readonly intensity?: number
97
+ };
98
+
99
+ export type shapes = {
100
+ readonly borderRadius?: number;
101
+ readonly borderWidth?: number;
102
+ readonly shadow?: shadowConfig
103
+ };
104
+
105
+ export type font = {
106
+ readonly family?: fontFamilyTypes;
107
+ readonly scale?: number;
108
+ readonly headingTextSizeAdjust?: number;
109
+ readonly subHeadingTextSizeAdjust?: number;
110
+ readonly placeholderTextSizeAdjust?: number;
111
+ readonly buttonTextSizeAdjust?: number;
112
+ readonly errorTextSizeAdjust?: number;
113
+ readonly linkTextSizeAdjust?: number;
114
+ readonly modalTextSizeAdjust?: number;
115
+ readonly cardTextSizeAdjust?: number
116
+ };
117
+
118
+ export type primaryButtonColor = {
119
+ readonly background?: string;
120
+ readonly text?: string;
121
+ readonly border?: string
122
+ };
123
+
124
+ export type primaryButtonColorType = { readonly light?: primaryButtonColor; readonly dark?: primaryButtonColor };
125
+
126
+ export type primaryButton = { readonly shapes?: shapes; readonly primaryButtonColor?: primaryButtonColorType };
127
+
128
+ export type googlePayButtonType =
129
+ "BUY"
130
+ | "BOOK"
131
+ | "CHECKOUT"
132
+ | "DONATE"
133
+ | "ORDER"
134
+ | "PAY"
135
+ | "SUBSCRIBE"
136
+ | "PLAIN";
137
+
138
+ export type googlePayButtonStyle = "light" | "dark";
139
+
140
+ export type googlePayThemeBaseStyle = { readonly light?: googlePayButtonStyle; readonly dark?: googlePayButtonStyle };
141
+
142
+ export type googlePayConfiguration = { readonly buttonType?: googlePayButtonType; readonly buttonStyle?: googlePayThemeBaseStyle };
143
+
144
+ export type applePayButtonType =
145
+ "buy"
146
+ | "setUp"
147
+ | "inStore"
148
+ | "donate"
149
+ | "checkout"
150
+ | "book"
151
+ | "subscribe"
152
+ | "plain";
153
+
154
+ export type applePayButtonStyle = "white" | "whiteOutline" | "black";
155
+
156
+ export type applePayThemeBaseStyle = { readonly light?: applePayButtonStyle; readonly dark?: applePayButtonStyle };
157
+
158
+ export type applePayConfiguration = { readonly buttonType?: applePayButtonType; readonly buttonStyle?: applePayThemeBaseStyle };
159
+
160
+ export type themeType =
161
+ "Default"
162
+ | "Light"
163
+ | "Dark"
164
+ | "Minimal"
165
+ | "FlatMinimal";
166
+
167
+ export type layoutType = "tabs" | "accordion" | "spacedAccordion";
168
+
169
+ export type appearance = {
170
+ readonly locale?: localeTypes;
171
+ readonly colors?: colorType;
172
+ readonly shapes?: shapes;
173
+ readonly font?: font;
174
+ readonly primaryButton?: primaryButton;
175
+ readonly googlePay?: googlePayConfiguration;
176
+ readonly applePay?: applePayConfiguration;
177
+ readonly theme?: themeType;
178
+ readonly layout?: layoutType
179
+ };
180
+
181
+ export type options = {
182
+ readonly allowsDelayedPaymentMethods?: boolean;
183
+ readonly appearance?: appearance;
184
+ readonly shippingDetails?: addressDetails;
185
+ readonly primaryButtonLabel?: string;
186
+ readonly paymentSheetHeaderText?: string;
187
+ readonly savedPaymentScreenHeaderText?: string;
188
+ readonly merchantDisplayName?: string;
189
+ readonly defaultBillingDetails?: addressDetails;
190
+ readonly primaryButtonColor?: string;
191
+ readonly allowsPaymentMethodsRequiringShippingAddress?: boolean;
192
+ readonly displaySavedPaymentMethodsCheckbox?: boolean;
193
+ readonly displaySavedPaymentMethods?: boolean;
194
+ readonly placeholder?: placeholder;
195
+ readonly defaultView?: boolean;
196
+ readonly netceteraSDKApiKey?: string;
197
+ readonly displayDefaultSavedPaymentIcon?: boolean;
198
+ readonly enablePartialLoading?: boolean;
199
+ readonly customer?: customerConfiguration;
200
+ readonly paymentSheetHeaderLabel?: string;
201
+ readonly savedPaymentSheetHeaderLabel?: string
202
+ };
@@ -0,0 +1,215 @@
1
+ type localeTypes =
2
+ | En
3
+ | He
4
+ | Fr
5
+ | En_GB
6
+ | Ar
7
+ | Ja
8
+ | De
9
+ | Fr_BE
10
+ | Es
11
+ | Ca
12
+ | Pt
13
+ | It
14
+ | Pl
15
+ | Nl
16
+ | NI_BE
17
+ | Sv
18
+ | Ru
19
+ | Lt
20
+ | Cs
21
+ | Sk
22
+ | Ls
23
+ | Cy
24
+ | El
25
+ | Et
26
+ | Fi
27
+ | Nb
28
+ | Bs
29
+ | Da
30
+ | Ms
31
+ | Tr_CY
32
+
33
+ type fontFamilyTypes = DefaultIOS | DefaultAndroid | CustomFont(string) | DefaultWeb
34
+
35
+ type placeholder = {
36
+ cardNumber?: string,
37
+ expiryDate?: string,
38
+ cvv?: string,
39
+ }
40
+
41
+ type address = {
42
+ first_name?: string,
43
+ last_name?: string,
44
+ city?: string,
45
+ country?: string,
46
+ line1?: string,
47
+ line2?: string,
48
+ zip?: string,
49
+ state?: string,
50
+ }
51
+
52
+ type phone = {
53
+ number?: string,
54
+ country_code?: string,
55
+ }
56
+
57
+ type addressDetails = {
58
+ address?: address,
59
+ email?: string,
60
+ phone?: phone,
61
+ }
62
+
63
+ type customerConfiguration = {
64
+ id?: string,
65
+ ephemeralKeySecret?: string,
66
+ }
67
+
68
+ type colors = {
69
+ primary?: string,
70
+ background?: string,
71
+ componentBackground?: string,
72
+ componentBorder?: string,
73
+ componentDivider?: string,
74
+ componentText?: string,
75
+ primaryText?: string,
76
+ secondaryText?: string,
77
+ placeholderText?: string,
78
+ icon?: string,
79
+ error?: string,
80
+ loaderBackground?: string,
81
+ loaderForeground?: string,
82
+ }
83
+
84
+ type colorType = {
85
+ light?: colors,
86
+ dark?: colors,
87
+ }
88
+
89
+ // IOS Specific
90
+ type offsetType = {
91
+ x?: float,
92
+ y?: float,
93
+ }
94
+ type shadowConfig = {
95
+ color?: string,
96
+ opacity?: float,
97
+ blurRadius?: float,
98
+ offset?: offsetType,
99
+ intensity?: float,
100
+ }
101
+
102
+ type shapes = {
103
+ borderRadius?: float,
104
+ borderWidth?: float,
105
+ shadow?: shadowConfig, // IOS Specific
106
+ }
107
+
108
+ type font = {
109
+ family?: fontFamilyTypes,
110
+ scale?: float,
111
+ headingTextSizeAdjust?: float,
112
+ subHeadingTextSizeAdjust?: float,
113
+ placeholderTextSizeAdjust?: float,
114
+ buttonTextSizeAdjust?: float,
115
+ errorTextSizeAdjust?: float,
116
+ linkTextSizeAdjust?: float,
117
+ modalTextSizeAdjust?: float,
118
+ cardTextSizeAdjust?: float,
119
+ }
120
+
121
+ type primaryButtonColor = {
122
+ background?: string,
123
+ text?: string,
124
+ border?: string,
125
+ }
126
+ type primaryButtonColorType = {
127
+ light?: primaryButtonColor,
128
+ dark?: primaryButtonColor
129
+ }
130
+
131
+ type primaryButton = {
132
+ shapes?: shapes,
133
+ primaryButtonColor?: primaryButtonColorType,
134
+ }
135
+
136
+ type googlePayButtonType = BUY | BOOK | CHECKOUT | DONATE | ORDER | PAY | SUBSCRIBE | PLAIN
137
+
138
+ type googlePayButtonStyle = [#light | #dark]
139
+
140
+ type googlePayThemeBaseStyle = {
141
+ light?: googlePayButtonStyle,
142
+ dark?: googlePayButtonStyle,
143
+ }
144
+
145
+ type googlePayConfiguration = {
146
+ buttonType?: googlePayButtonType,
147
+ buttonStyle?: googlePayThemeBaseStyle,
148
+ }
149
+
150
+ type applePayButtonType = [
151
+ | #buy
152
+ | #setUp
153
+ | #inStore
154
+ | #donate
155
+ | #checkout
156
+ | #book
157
+ | #subscribe
158
+ | #plain
159
+ ]
160
+ type applePayButtonStyle = [#white | #whiteOutline | #black]
161
+
162
+ type applePayThemeBaseStyle = {
163
+ light?: applePayButtonStyle,
164
+ dark?: applePayButtonStyle,
165
+ }
166
+
167
+ type applePayConfiguration = {
168
+ buttonType?: applePayButtonType,
169
+ buttonStyle?: applePayThemeBaseStyle,
170
+ }
171
+
172
+ type themeType =
173
+ | Default
174
+ | Light
175
+ | Dark
176
+ | Minimal
177
+ | FlatMinimal
178
+
179
+ type layoutType = [#tabs | #accordion | #spacedAccordion]
180
+
181
+ type appearance = {
182
+ locale?: localeTypes,
183
+ colors?: colorType,
184
+ shapes?: shapes,
185
+ font?: font,
186
+ primaryButton?: primaryButton,
187
+ googlePay?: googlePayConfiguration,
188
+ applePay?: applePayConfiguration,
189
+ theme?: themeType,
190
+ layout?: layoutType,
191
+ }
192
+
193
+ @genType
194
+ type options = {
195
+ allowsDelayedPaymentMethods?: bool,
196
+ appearance?: appearance,
197
+ shippingDetails?: addressDetails,
198
+ primaryButtonLabel?: string,
199
+ paymentSheetHeaderText?: string,
200
+ savedPaymentScreenHeaderText?: string,
201
+ merchantDisplayName?: string,
202
+ defaultBillingDetails?: addressDetails,
203
+ primaryButtonColor?: string,
204
+ allowsPaymentMethodsRequiringShippingAddress?: bool,
205
+ displaySavedPaymentMethodsCheckbox?: bool,
206
+ displaySavedPaymentMethods?: bool,
207
+ placeholder?: placeholder,
208
+ defaultView?: bool,
209
+ netceteraSDKApiKey?: string,
210
+ displayDefaultSavedPaymentIcon?: bool,
211
+ enablePartialLoading?: bool,
212
+ customer?: customerConfiguration,
213
+ paymentSheetHeaderLabel?: string,
214
+ savedPaymentSheetHeaderLabel?: string,
215
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+ /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */