react-native-tpay 1.3.5 → 1.3.7

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 (243) hide show
  1. package/README.md +2 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/com/tpay/util/JsonUtil.kt +5 -0
  4. package/ios/Source/Configuration/TransactionConfiguration.swift +11 -11
  5. package/ios/Source/Model/Domain/BankPayment.swift +1 -1
  6. package/ios/Source/Model/Domain/BlikPayment.swift +1 -1
  7. package/ios/Source/Model/Domain/CardPayment.swift +1 -1
  8. package/ios/Source/Model/Domain/DigitalWalletPayment.swift +1 -1
  9. package/ios/Source/Model/Domain/PayPoPayment.swift +1 -1
  10. package/ios/Source/TpaySDK.swift +15 -3
  11. package/lib/commonjs/NativeTpay.js +9 -0
  12. package/lib/commonjs/NativeTpay.js.map +1 -0
  13. package/lib/commonjs/component/tpay_button.js +10 -7
  14. package/lib/commonjs/component/tpay_button.js.map +1 -1
  15. package/lib/commonjs/index.js.map +1 -1
  16. package/lib/commonjs/model/language/language.js.map +1 -1
  17. package/lib/commonjs/model/language/languages.js.map +1 -1
  18. package/lib/commonjs/model/language/localized_string.js.map +1 -1
  19. package/lib/commonjs/model/merchant/apple_pay_configuration.js.map +1 -1
  20. package/lib/commonjs/model/merchant/certificate_configuration.js.map +1 -1
  21. package/lib/commonjs/model/merchant/google_pay_configuration.js.map +1 -1
  22. package/lib/commonjs/model/merchant/merchant.js.map +1 -1
  23. package/lib/commonjs/model/merchant/merchant_authorization.js.map +1 -1
  24. package/lib/commonjs/model/merchant/merchant_details.js.map +1 -1
  25. package/lib/commonjs/model/merchant/tpay_environment.js.map +1 -1
  26. package/lib/commonjs/model/merchant/wallet_configuration.js.map +1 -1
  27. package/lib/commonjs/model/payer/address.js.map +1 -1
  28. package/lib/commonjs/model/payer/payer.js.map +1 -1
  29. package/lib/commonjs/model/payer/payer_context.js.map +1 -1
  30. package/lib/commonjs/model/payment_channel/payment_channel.js.map +1 -1
  31. package/lib/commonjs/model/payment_channel/payment_constraint.js.map +1 -1
  32. package/lib/commonjs/model/payment_channel/payment_group.js.map +1 -1
  33. package/lib/commonjs/model/payment_method/automatic_payment_methods.js.map +1 -1
  34. package/lib/commonjs/model/payment_method/blik_alias.js.map +1 -1
  35. package/lib/commonjs/model/payment_method/credit_card_brand.js.map +1 -1
  36. package/lib/commonjs/model/payment_method/digital_wallet.js.map +1 -1
  37. package/lib/commonjs/model/payment_method/installment_payment.js.map +1 -1
  38. package/lib/commonjs/model/payment_method/payment_method.js.map +1 -1
  39. package/lib/commonjs/model/payment_method/payment_methods.js.map +1 -1
  40. package/lib/commonjs/model/payment_method/tokenized_card.js.map +1 -1
  41. package/lib/commonjs/model/result/google_pay_configure_result.js +4 -1
  42. package/lib/commonjs/model/result/google_pay_configure_result.js.map +1 -1
  43. package/lib/commonjs/model/result/google_pay_open_result.js +10 -3
  44. package/lib/commonjs/model/result/google_pay_open_result.js.map +1 -1
  45. package/lib/commonjs/model/result/payment_channels_result.js +2 -0
  46. package/lib/commonjs/model/result/payment_channels_result.js.map +1 -1
  47. package/lib/commonjs/model/result/result.js +17 -4
  48. package/lib/commonjs/model/result/result.js.map +1 -1
  49. package/lib/commonjs/model/result/screenless_result.js +7 -0
  50. package/lib/commonjs/model/result/screenless_result.js.map +1 -1
  51. package/lib/commonjs/model/screenless/ambiguous_alias.js.map +1 -1
  52. package/lib/commonjs/model/screenless/ambiguous_blik_payment.js.map +1 -1
  53. package/lib/commonjs/model/screenless/apple_pay_payment.js.map +1 -1
  54. package/lib/commonjs/model/screenless/blik_payment.js.map +1 -1
  55. package/lib/commonjs/model/screenless/callbacks.js.map +1 -1
  56. package/lib/commonjs/model/screenless/credit_card.js.map +1 -1
  57. package/lib/commonjs/model/screenless/credit_card_config.js.map +1 -1
  58. package/lib/commonjs/model/screenless/credit_card_payment.js.map +1 -1
  59. package/lib/commonjs/model/screenless/expiration_date.js.map +1 -1
  60. package/lib/commonjs/model/screenless/frequency.js.map +1 -1
  61. package/lib/commonjs/model/screenless/google_pay_environment.js.map +1 -1
  62. package/lib/commonjs/model/screenless/google_pay_payment.js.map +1 -1
  63. package/lib/commonjs/model/screenless/google_pay_utils_configuration.js.map +1 -1
  64. package/lib/commonjs/model/screenless/notifications.js.map +1 -1
  65. package/lib/commonjs/model/screenless/pay_po_payment.js.map +1 -1
  66. package/lib/commonjs/model/screenless/payment_details.js.map +1 -1
  67. package/lib/commonjs/model/screenless/raty_pekao_payment.js.map +1 -1
  68. package/lib/commonjs/model/screenless/recursive.js.map +1 -1
  69. package/lib/commonjs/model/screenless/redirects.js.map +1 -1
  70. package/lib/commonjs/model/screenless/screenless_payment.js.map +1 -1
  71. package/lib/commonjs/model/screenless/transfer_payment.js.map +1 -1
  72. package/lib/commonjs/model/tokenization/tokenization.js.map +1 -1
  73. package/lib/commonjs/model/tpay_configuration.js.map +1 -1
  74. package/lib/commonjs/model/transaction/single_transaction.js +3 -2
  75. package/lib/commonjs/model/transaction/single_transaction.js.map +1 -1
  76. package/lib/commonjs/model/transaction/token_payment.js +3 -2
  77. package/lib/commonjs/model/transaction/token_payment.js.map +1 -1
  78. package/lib/commonjs/model/transaction/transaction.js +3 -1
  79. package/lib/commonjs/model/transaction/transaction.js.map +1 -1
  80. package/lib/commonjs/package.json +1 -0
  81. package/lib/commonjs/util/google_pay_configuration_util.js.map +1 -1
  82. package/lib/commonjs/util/google_pay_open_util.js.map +1 -1
  83. package/lib/commonjs/util/payment_channels_util.js.map +1 -1
  84. package/lib/commonjs/util/result_util.js.map +1 -1
  85. package/lib/commonjs/util/screenless_result_util.js.map +1 -1
  86. package/lib/module/NativeTpay.js +5 -0
  87. package/lib/module/NativeTpay.js.map +1 -0
  88. package/lib/module/component/tpay_button.js +12 -7
  89. package/lib/module/component/tpay_button.js.map +1 -1
  90. package/lib/module/index.js +2 -0
  91. package/lib/module/index.js.map +1 -1
  92. package/lib/module/model/language/language.js +2 -0
  93. package/lib/module/model/language/language.js.map +1 -1
  94. package/lib/module/model/language/languages.js +2 -0
  95. package/lib/module/model/language/languages.js.map +1 -1
  96. package/lib/module/model/language/localized_string.js +2 -0
  97. package/lib/module/model/language/localized_string.js.map +1 -1
  98. package/lib/module/model/merchant/apple_pay_configuration.js +2 -0
  99. package/lib/module/model/merchant/apple_pay_configuration.js.map +1 -1
  100. package/lib/module/model/merchant/certificate_configuration.js +2 -0
  101. package/lib/module/model/merchant/certificate_configuration.js.map +1 -1
  102. package/lib/module/model/merchant/google_pay_configuration.js +2 -0
  103. package/lib/module/model/merchant/google_pay_configuration.js.map +1 -1
  104. package/lib/module/model/merchant/merchant.js +2 -0
  105. package/lib/module/model/merchant/merchant.js.map +1 -1
  106. package/lib/module/model/merchant/merchant_authorization.js +2 -0
  107. package/lib/module/model/merchant/merchant_authorization.js.map +1 -1
  108. package/lib/module/model/merchant/merchant_details.js +2 -0
  109. package/lib/module/model/merchant/merchant_details.js.map +1 -1
  110. package/lib/module/model/merchant/tpay_environment.js +2 -0
  111. package/lib/module/model/merchant/tpay_environment.js.map +1 -1
  112. package/lib/module/model/merchant/wallet_configuration.js +2 -0
  113. package/lib/module/model/merchant/wallet_configuration.js.map +1 -1
  114. package/lib/module/model/payer/address.js +2 -0
  115. package/lib/module/model/payer/address.js.map +1 -1
  116. package/lib/module/model/payer/payer.js +2 -0
  117. package/lib/module/model/payer/payer.js.map +1 -1
  118. package/lib/module/model/payer/payer_context.js +2 -0
  119. package/lib/module/model/payer/payer_context.js.map +1 -1
  120. package/lib/module/model/payment_channel/payment_channel.js +2 -0
  121. package/lib/module/model/payment_channel/payment_channel.js.map +1 -1
  122. package/lib/module/model/payment_channel/payment_constraint.js +2 -0
  123. package/lib/module/model/payment_channel/payment_constraint.js.map +1 -1
  124. package/lib/module/model/payment_channel/payment_group.js +2 -0
  125. package/lib/module/model/payment_channel/payment_group.js.map +1 -1
  126. package/lib/module/model/payment_method/automatic_payment_methods.js +2 -0
  127. package/lib/module/model/payment_method/automatic_payment_methods.js.map +1 -1
  128. package/lib/module/model/payment_method/blik_alias.js +2 -0
  129. package/lib/module/model/payment_method/blik_alias.js.map +1 -1
  130. package/lib/module/model/payment_method/credit_card_brand.js +2 -0
  131. package/lib/module/model/payment_method/credit_card_brand.js.map +1 -1
  132. package/lib/module/model/payment_method/digital_wallet.js +2 -0
  133. package/lib/module/model/payment_method/digital_wallet.js.map +1 -1
  134. package/lib/module/model/payment_method/installment_payment.js +2 -0
  135. package/lib/module/model/payment_method/installment_payment.js.map +1 -1
  136. package/lib/module/model/payment_method/payment_method.js +2 -0
  137. package/lib/module/model/payment_method/payment_method.js.map +1 -1
  138. package/lib/module/model/payment_method/payment_methods.js +2 -0
  139. package/lib/module/model/payment_method/payment_methods.js.map +1 -1
  140. package/lib/module/model/payment_method/tokenized_card.js +2 -0
  141. package/lib/module/model/payment_method/tokenized_card.js.map +1 -1
  142. package/lib/module/model/result/google_pay_configure_result.js +6 -1
  143. package/lib/module/model/result/google_pay_configure_result.js.map +1 -1
  144. package/lib/module/model/result/google_pay_open_result.js +12 -3
  145. package/lib/module/model/result/google_pay_open_result.js.map +1 -1
  146. package/lib/module/model/result/payment_channels_result.js +4 -0
  147. package/lib/module/model/result/payment_channels_result.js.map +1 -1
  148. package/lib/module/model/result/result.js +19 -4
  149. package/lib/module/model/result/result.js.map +1 -1
  150. package/lib/module/model/result/screenless_result.js +9 -0
  151. package/lib/module/model/result/screenless_result.js.map +1 -1
  152. package/lib/module/model/screenless/ambiguous_alias.js +2 -0
  153. package/lib/module/model/screenless/ambiguous_alias.js.map +1 -1
  154. package/lib/module/model/screenless/ambiguous_blik_payment.js +2 -0
  155. package/lib/module/model/screenless/ambiguous_blik_payment.js.map +1 -1
  156. package/lib/module/model/screenless/apple_pay_payment.js +2 -0
  157. package/lib/module/model/screenless/apple_pay_payment.js.map +1 -1
  158. package/lib/module/model/screenless/blik_payment.js +2 -0
  159. package/lib/module/model/screenless/blik_payment.js.map +1 -1
  160. package/lib/module/model/screenless/callbacks.js +2 -0
  161. package/lib/module/model/screenless/callbacks.js.map +1 -1
  162. package/lib/module/model/screenless/credit_card.js +2 -0
  163. package/lib/module/model/screenless/credit_card.js.map +1 -1
  164. package/lib/module/model/screenless/credit_card_config.js +2 -0
  165. package/lib/module/model/screenless/credit_card_config.js.map +1 -1
  166. package/lib/module/model/screenless/credit_card_payment.js +2 -0
  167. package/lib/module/model/screenless/credit_card_payment.js.map +1 -1
  168. package/lib/module/model/screenless/expiration_date.js +2 -0
  169. package/lib/module/model/screenless/expiration_date.js.map +1 -1
  170. package/lib/module/model/screenless/frequency.js +2 -0
  171. package/lib/module/model/screenless/frequency.js.map +1 -1
  172. package/lib/module/model/screenless/google_pay_environment.js +2 -0
  173. package/lib/module/model/screenless/google_pay_environment.js.map +1 -1
  174. package/lib/module/model/screenless/google_pay_payment.js +2 -0
  175. package/lib/module/model/screenless/google_pay_payment.js.map +1 -1
  176. package/lib/module/model/screenless/google_pay_utils_configuration.js +2 -0
  177. package/lib/module/model/screenless/google_pay_utils_configuration.js.map +1 -1
  178. package/lib/module/model/screenless/notifications.js +2 -0
  179. package/lib/module/model/screenless/notifications.js.map +1 -1
  180. package/lib/module/model/screenless/pay_po_payment.js +2 -0
  181. package/lib/module/model/screenless/pay_po_payment.js.map +1 -1
  182. package/lib/module/model/screenless/payment_details.js +2 -0
  183. package/lib/module/model/screenless/payment_details.js.map +1 -1
  184. package/lib/module/model/screenless/raty_pekao_payment.js +2 -0
  185. package/lib/module/model/screenless/raty_pekao_payment.js.map +1 -1
  186. package/lib/module/model/screenless/recursive.js +2 -0
  187. package/lib/module/model/screenless/recursive.js.map +1 -1
  188. package/lib/module/model/screenless/redirects.js +2 -0
  189. package/lib/module/model/screenless/redirects.js.map +1 -1
  190. package/lib/module/model/screenless/screenless_payment.js +2 -0
  191. package/lib/module/model/screenless/screenless_payment.js.map +1 -1
  192. package/lib/module/model/screenless/transfer_payment.js +2 -0
  193. package/lib/module/model/screenless/transfer_payment.js.map +1 -1
  194. package/lib/module/model/tokenization/tokenization.js +2 -0
  195. package/lib/module/model/tokenization/tokenization.js.map +1 -1
  196. package/lib/module/model/tpay_configuration.js +2 -0
  197. package/lib/module/model/tpay_configuration.js.map +1 -1
  198. package/lib/module/model/transaction/single_transaction.js +5 -2
  199. package/lib/module/model/transaction/single_transaction.js.map +1 -1
  200. package/lib/module/model/transaction/token_payment.js +5 -2
  201. package/lib/module/model/transaction/token_payment.js.map +1 -1
  202. package/lib/module/model/transaction/transaction.js +5 -1
  203. package/lib/module/model/transaction/transaction.js.map +1 -1
  204. package/lib/module/util/google_pay_configuration_util.js +2 -0
  205. package/lib/module/util/google_pay_configuration_util.js.map +1 -1
  206. package/lib/module/util/google_pay_open_util.js +2 -0
  207. package/lib/module/util/google_pay_open_util.js.map +1 -1
  208. package/lib/module/util/payment_channels_util.js +2 -0
  209. package/lib/module/util/payment_channels_util.js.map +1 -1
  210. package/lib/module/util/result_util.js +2 -0
  211. package/lib/module/util/result_util.js.map +1 -1
  212. package/lib/module/util/screenless_result_util.js +2 -0
  213. package/lib/module/util/screenless_result_util.js.map +1 -1
  214. package/lib/typescript/src/NativeTpay.d.ts +22 -0
  215. package/lib/typescript/src/NativeTpay.d.ts.map +1 -0
  216. package/lib/typescript/src/component/tpay_button.d.ts +1 -2
  217. package/lib/typescript/src/component/tpay_button.d.ts.map +1 -1
  218. package/lib/typescript/src/model/result/google_pay_configure_result.d.ts +11 -1
  219. package/lib/typescript/src/model/result/google_pay_configure_result.d.ts.map +1 -1
  220. package/lib/typescript/src/model/result/google_pay_open_result.d.ts +25 -1
  221. package/lib/typescript/src/model/result/google_pay_open_result.d.ts.map +1 -1
  222. package/lib/typescript/src/model/result/payment_channels_result.d.ts +15 -1
  223. package/lib/typescript/src/model/result/payment_channels_result.d.ts.map +1 -1
  224. package/lib/typescript/src/model/result/result.d.ts +26 -1
  225. package/lib/typescript/src/model/result/result.d.ts.map +1 -1
  226. package/lib/typescript/src/model/result/screenless_result.d.ts +32 -1
  227. package/lib/typescript/src/model/result/screenless_result.d.ts.map +1 -1
  228. package/lib/typescript/src/model/transaction/single_transaction.d.ts +2 -1
  229. package/lib/typescript/src/model/transaction/single_transaction.d.ts.map +1 -1
  230. package/lib/typescript/src/model/transaction/token_payment.d.ts +2 -1
  231. package/lib/typescript/src/model/transaction/token_payment.d.ts.map +1 -1
  232. package/lib/typescript/src/model/transaction/transaction.d.ts +3 -1
  233. package/lib/typescript/src/model/transaction/transaction.d.ts.map +1 -1
  234. package/package.json +34 -26
  235. package/src/NativeTpay.ts +33 -0
  236. package/src/model/result/google_pay_configure_result.ts +15 -2
  237. package/src/model/result/google_pay_open_result.ts +36 -4
  238. package/src/model/result/payment_channels_result.ts +18 -1
  239. package/src/model/result/result.ts +38 -5
  240. package/src/model/result/screenless_result.ts +38 -1
  241. package/src/model/transaction/single_transaction.ts +3 -1
  242. package/src/model/transaction/token_payment.ts +3 -1
  243. package/src/model/transaction/transaction.ts +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"tpay_button.d.ts","sourceRoot":"","sources":["../../../../src/component/tpay_button.tsx"],"names":[],"mappings":";AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,OAAO,EAAE,QAAQ,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,UAAU,2BAA4B,eAAe,gBAqBjE,CAAC"}
1
+ {"version":3,"file":"tpay_button.d.ts","sourceRoot":"","sources":["../../../../src/component/tpay_button.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,OAAO,EAAE,QAAQ,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,wBAAwB,eAAe,4CAqBjE,CAAC"}
@@ -1,17 +1,27 @@
1
1
  /**
2
2
  * Indicates a result of Google Pay configuration
3
3
  */
4
- export declare class GooglePayConfigureResult {
4
+ export declare abstract class GooglePayConfigureResult {
5
+ /**
6
+ * Type identifier for the result
7
+ */
8
+ abstract readonly type: string;
9
+ /**
10
+ * Optional error message or additional information
11
+ */
12
+ message?: string;
5
13
  }
6
14
  /**
7
15
  * Indicates that Google Pay configuration was successful
8
16
  */
9
17
  export declare class GooglePayConfigureSuccess extends GooglePayConfigureResult {
18
+ readonly type = "success";
10
19
  }
11
20
  /**
12
21
  * Indicates that there was an error during Google Pay configuration
13
22
  */
14
23
  export declare class GooglePayConfigureError extends GooglePayConfigureResult {
24
+ readonly type = "error";
15
25
  /**
16
26
  * Error message
17
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"google_pay_configure_result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/google_pay_configure_result.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,qBAAa,wBAAwB;CAAG;AAExC;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,wBAAwB;CAAG;AAE1E;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,wBAAwB;IACnE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B"}
1
+ {"version":3,"file":"google_pay_configure_result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/google_pay_configure_result.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,8BAAsB,wBAAwB;IAC5C;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,wBAAwB;IACrE,QAAQ,CAAC,IAAI,aAAa;CAC3B;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,wBAAwB;IACnE,QAAQ,CAAC,IAAI,WAAW;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B"}
@@ -1,12 +1,33 @@
1
1
  /**
2
2
  * Indicates a result of Google Pay open
3
3
  */
4
- export declare class GooglePayOpenResult {
4
+ export declare abstract class GooglePayOpenResult {
5
+ /**
6
+ * Type identifier for the result
7
+ */
8
+ abstract readonly type: string;
9
+ /**
10
+ * Google Pay card token when available
11
+ */
12
+ token?: string;
13
+ /**
14
+ * Credit card description when available
15
+ */
16
+ description?: string;
17
+ /**
18
+ * Credit card network when available
19
+ */
20
+ cardNetwork?: string;
21
+ /**
22
+ * Last digits of credit card number when available
23
+ */
24
+ cardTail?: string;
5
25
  }
6
26
  /**
7
27
  * Indicates that Google Pay was successfully opened and user has selected a credit card
8
28
  */
9
29
  export declare class GooglePayOpenSuccess extends GooglePayOpenResult {
30
+ readonly type = "success";
10
31
  /**
11
32
  * Google Pay card token, use it with GooglePayPayment
12
33
  */
@@ -29,16 +50,19 @@ export declare class GooglePayOpenSuccess extends GooglePayOpenResult {
29
50
  * Indicates that Google Pay was opened successfully but user closed it without selecting a credit card
30
51
  */
31
52
  export declare class GooglePayOpenCancelled extends GooglePayOpenResult {
53
+ readonly type = "cancelled";
32
54
  }
33
55
  /**
34
56
  * Indicates that there was a unknown error
35
57
  */
36
58
  export declare class GooglePayOpenUnknownError extends GooglePayOpenResult {
59
+ readonly type = "unknownError";
37
60
  }
38
61
  /**
39
62
  * Indicates that Google Pay utils were not configured before trying to open Google Pay.
40
63
  * Configure utils via configureGooglePayUtils(...) method
41
64
  */
42
65
  export declare class GooglePayOpenNotConfigured extends GooglePayOpenResult {
66
+ readonly type = "notConfigured";
43
67
  }
44
68
  //# sourceMappingURL=google_pay_open_result.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"google_pay_open_result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/google_pay_open_result.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,mBAAmB;CAAG;AAEnC;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,mBAAmB;IAC3D;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;gBAGf,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM;CAQnB;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,mBAAmB;CAAG;AAElE;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB;CAAG;AAErE;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,mBAAmB;CAAG"}
1
+ {"version":3,"file":"google_pay_open_result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/google_pay_open_result.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,8BAAsB,mBAAmB;IACvC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,mBAAmB;IAC3D,QAAQ,CAAC,IAAI,aAAa;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;gBAGf,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM;CAQnB;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,IAAI,eAAe;CAC7B;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB;IAChE,QAAQ,CAAC,IAAI,kBAAkB;CAChC;AAED;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,IAAI,mBAAmB;CACjC"}
@@ -2,12 +2,25 @@ import type { PaymentChannel } from '../payment_channel/payment_channel';
2
2
  /**
3
3
  * Indicates a result of payment channels
4
4
  */
5
- export declare class PaymentChannelsResult {
5
+ export declare abstract class PaymentChannelsResult {
6
+ /**
7
+ * Type identifier for the result
8
+ */
9
+ abstract readonly type: string;
10
+ /**
11
+ * Optional error message or additional information
12
+ */
13
+ message?: string;
14
+ /**
15
+ * Payment channels array when available
16
+ */
17
+ channels?: Array<PaymentChannel>;
6
18
  }
7
19
  /**
8
20
  * Indicates that payment channels were successfully received
9
21
  */
10
22
  export declare class PaymentChannelsSuccess extends PaymentChannelsResult {
23
+ readonly type = "success";
11
24
  /**
12
25
  * Payment channels
13
26
  */
@@ -18,6 +31,7 @@ export declare class PaymentChannelsSuccess extends PaymentChannelsResult {
18
31
  * Indicates that there was an error while fetching payment channels
19
32
  */
20
33
  export declare class PaymentChannelsError extends PaymentChannelsResult {
34
+ readonly type = "error";
21
35
  /**
22
36
  * Error message
23
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"payment_channels_result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/payment_channels_result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;GAEG;AACH,qBAAa,qBAAqB;CAAG;AAErC;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,qBAAqB;IAC/D;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;gBAEpB,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC;CAI5C;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,qBAAqB;IAC7D;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B"}
1
+ {"version":3,"file":"payment_channels_result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/payment_channels_result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;GAEG;AACH,8BAAsB,qBAAqB;IACzC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,qBAAqB;IAC/D,QAAQ,CAAC,IAAI,aAAa;IAC1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;gBAEpB,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC;CAI5C;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,qBAAqB;IAC7D,QAAQ,CAAC,IAAI,WAAW;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B"}
@@ -1,32 +1,53 @@
1
1
  /**
2
2
  * Indicates a result of Tpay UI module action
3
3
  */
4
- export declare class Result {
4
+ export declare abstract class Result {
5
+ /**
6
+ * Type identifier for the result
7
+ */
8
+ abstract readonly type: string;
9
+ /**
10
+ * Optional error message or additional information
11
+ */
12
+ message?: string;
13
+ /**
14
+ * Transaction ID when applicable
15
+ */
16
+ transactionId?: string | null;
17
+ /**
18
+ * Payment URL for continuation (used in screenless payments)
19
+ */
20
+ paymentUrl?: string;
5
21
  }
6
22
  /**
7
23
  * Indicates that credit card tokenization was successful and module was closed
8
24
  */
9
25
  export declare class TokenizationCompleted extends Result {
26
+ readonly type = "tokenizationCompleted";
10
27
  }
11
28
  /**
12
29
  * Indicates that credit card tokenization failed and module was closed
13
30
  */
14
31
  export declare class TokenizationFailure extends Result {
32
+ readonly type = "tokenizationFailure";
15
33
  }
16
34
  /**
17
35
  * Indicates that configuration was successful
18
36
  */
19
37
  export declare class ConfigurationSuccess extends Result {
38
+ readonly type = "configurationSuccess";
20
39
  }
21
40
  /**
22
41
  * Indicates that user closed the module without making a payment/tokenization
23
42
  */
24
43
  export declare class ModuleClosed extends Result {
44
+ readonly type = "moduleClosed";
25
45
  }
26
46
  /**
27
47
  * Indicates that some data passed to module is invalid
28
48
  */
29
49
  export declare class ValidationError extends Result {
50
+ readonly type = "validationError";
30
51
  /**
31
52
  * Validation error message
32
53
  */
@@ -37,6 +58,7 @@ export declare class ValidationError extends Result {
37
58
  * Indicates that payment was successfully created
38
59
  */
39
60
  export declare class PaymentCreated extends Result {
61
+ readonly type = "paymentCreated";
40
62
  /**
41
63
  * Transaction id of the created transaction
42
64
  */
@@ -47,6 +69,7 @@ export declare class PaymentCreated extends Result {
47
69
  * Indicates that payment was successful and module was closed
48
70
  */
49
71
  export declare class PaymentCompleted extends Result {
72
+ readonly type = "paymentCompleted";
50
73
  /**
51
74
  * Transaction id of the completed transaction
52
75
  */
@@ -57,6 +80,7 @@ export declare class PaymentCompleted extends Result {
57
80
  * Indicates that payment failed and module was closed
58
81
  */
59
82
  export declare class PaymentCancelled extends Result {
83
+ readonly type = "paymentCancelled";
60
84
  /**
61
85
  * If exists, id of the transaction
62
86
  */
@@ -67,6 +91,7 @@ export declare class PaymentCancelled extends Result {
67
91
  * Indicates a module error
68
92
  */
69
93
  export declare class MethodCallError extends Result {
94
+ readonly type = "methodCallError";
70
95
  /**
71
96
  * Error message
72
97
  */
@@ -1 +1 @@
1
- {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/result.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,MAAM;CAAG;AAEtB;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,MAAM;CAAG;AAEpD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,MAAM;CAAG;AAElD;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,MAAM;CAAG;AAEnD;;GAEG;AACH,qBAAa,YAAa,SAAQ,MAAM;CAAG;AAE3C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,MAAM;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,MAAM;IACxC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,aAAa,EAAE,MAAM;CAIlC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAC1C;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,aAAa,EAAE,MAAM;CAIlC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAC1C;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEjB,aAAa,EAAE,MAAM,GAAG,IAAI;CAIzC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,MAAM;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B"}
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/result.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,8BAAsB,MAAM;IAC1B;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,MAAM;IAC/C,QAAQ,CAAC,IAAI,2BAA2B;CACzC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,MAAM;IAC7C,QAAQ,CAAC,IAAI,yBAAyB;CACvC;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,MAAM;IAC9C,QAAQ,CAAC,IAAI,0BAA0B;CACxC;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,MAAM;IACtC,QAAQ,CAAC,IAAI,kBAAkB;CAChC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,MAAM;IACzC,QAAQ,CAAC,IAAI,qBAAqB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,oBAAoB;IACjC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,aAAa,EAAE,MAAM;CAIlC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAC1C,QAAQ,CAAC,IAAI,sBAAsB;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,aAAa,EAAE,MAAM;CAIlC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAC1C,QAAQ,CAAC,IAAI,sBAAsB;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEjB,aAAa,EAAE,MAAM,GAAG,IAAI;CAIzC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,MAAM;IACzC,QAAQ,CAAC,IAAI,qBAAqB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B"}
@@ -2,12 +2,37 @@ import { AmbiguousAlias } from 'react-native-tpay';
2
2
  /**
3
3
  * Indicates a result of screenless action
4
4
  */
5
- export declare class ScreenlessResult {
5
+ export declare abstract class ScreenlessResult {
6
+ /**
7
+ * Type identifier for the result
8
+ */
9
+ abstract readonly type: string;
10
+ /**
11
+ * Optional error message or additional information
12
+ */
13
+ message?: string;
14
+ /**
15
+ * Transaction ID when applicable
16
+ */
17
+ transactionId?: string;
18
+ /**
19
+ * Payment URL for continuation when applicable
20
+ */
21
+ paymentUrl?: string | null;
22
+ /**
23
+ * Error message when applicable
24
+ */
25
+ error?: string | null;
26
+ /**
27
+ * Ambiguous aliases for BLIK payments when applicable
28
+ */
29
+ aliases?: Array<AmbiguousAlias>;
6
30
  }
7
31
  /**
8
32
  * Indicates that some data passed to payment is invalid
9
33
  */
10
34
  export declare class ScreenlessValidationError extends ScreenlessResult {
35
+ readonly type = "validationError";
11
36
  /**
12
37
  * Validation error message
13
38
  */
@@ -18,6 +43,7 @@ export declare class ScreenlessValidationError extends ScreenlessResult {
18
43
  * Indicates a module error
19
44
  */
20
45
  export declare class ScreenlessMethodCallError extends ScreenlessResult {
46
+ readonly type = "methodCallError";
21
47
  /**
22
48
  * Error message
23
49
  */
@@ -28,6 +54,7 @@ export declare class ScreenlessMethodCallError extends ScreenlessResult {
28
54
  * Indicates that payment was completed successfully
29
55
  */
30
56
  export declare class ScreenlessPaid extends ScreenlessResult {
57
+ readonly type = "paid";
31
58
  /**
32
59
  * Transaction id of the completed transaction
33
60
  */
@@ -43,6 +70,7 @@ export declare class ScreenlessPaid extends ScreenlessResult {
43
70
  * payment status via transactionId.
44
71
  */
45
72
  export declare class ScreenlessPaymentCreated extends ScreenlessResult {
73
+ readonly type = "paymentCreated";
46
74
  /**
47
75
  * Transaction id of the created transaction
48
76
  */
@@ -59,6 +87,7 @@ export declare class ScreenlessPaymentCreated extends ScreenlessResult {
59
87
  * - BLIK code or BLIK alias
60
88
  */
61
89
  export declare class ScreenlessConfiguredPaymentFailed extends ScreenlessResult {
90
+ readonly type = "configuredPaymentFailed";
62
91
  /**
63
92
  * Transaction id of the created transaction
64
93
  */
@@ -75,6 +104,7 @@ export declare class ScreenlessConfiguredPaymentFailed extends ScreenlessResult
75
104
  * continue the payment.
76
105
  */
77
106
  export declare class ScreenlessBlikAmbiguousAlias extends ScreenlessResult {
107
+ readonly type = "ambiguousAlias";
78
108
  /**
79
109
  * Transaction id of the created transaction
80
110
  */
@@ -89,6 +119,7 @@ export declare class ScreenlessBlikAmbiguousAlias extends ScreenlessResult {
89
119
  * Indicates that payment was not created because of an error
90
120
  */
91
121
  export declare class ScreenlessPaymentError extends ScreenlessResult {
122
+ readonly type = "error";
92
123
  /**
93
124
  * Optional error message
94
125
  */
@@ -1 +1 @@
1
- {"version":3,"file":"screenless_result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/screenless_result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,qBAAa,gBAAgB;CAAG;AAEhC;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,gBAAgB;IAClD;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,aAAa,EAAE,MAAM;CAIlC;AAED;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,gBAAgB;IAC5D;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEd,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;CAK7D;AAED;;;;GAIG;AACH,qBAAa,iCAAkC,SAAQ,gBAAgB;IACrE;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;gBAET,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAKxD;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,gBAAgB;IAChE;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;gBAEnB,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC;CAKlE;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,gBAAgB;IAC1D;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;gBAET,KAAK,EAAE,MAAM,GAAG,IAAI;CAIjC"}
1
+ {"version":3,"file":"screenless_result.d.ts","sourceRoot":"","sources":["../../../../../src/model/result/screenless_result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,8BAAsB,gBAAgB;IACpC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;IAC7D,QAAQ,CAAC,IAAI,qBAAqB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;IAC7D,QAAQ,CAAC,IAAI,qBAAqB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,gBAAgB;IAClD,QAAQ,CAAC,IAAI,UAAU;IACvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;gBAEV,aAAa,EAAE,MAAM;CAIlC;AAED;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,gBAAgB;IAC5D,QAAQ,CAAC,IAAI,oBAAoB;IACjC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEd,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;CAK7D;AAED;;;;GAIG;AACH,qBAAa,iCAAkC,SAAQ,gBAAgB;IACrE,QAAQ,CAAC,IAAI,6BAA6B;IAC1C;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;gBAET,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAKxD;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,gBAAgB;IAChE,QAAQ,CAAC,IAAI,oBAAoB;IACjC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;gBAEnB,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC;CAKlE;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,gBAAgB;IAC1D,QAAQ,CAAC,IAAI,WAAW;IACxB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;gBAET,KAAK,EAAE,MAAM,GAAG,IAAI;CAIjC"}
@@ -10,8 +10,9 @@ export declare class SingleTransaction extends Transaction {
10
10
  * @param payerContext - information about payer and automatic payment methods
11
11
  * @param amount - amount of money payer has to pay
12
12
  * @param description - description of payment shown to payer
13
+ * @param hiddenDescription - description of payment shown to merchant
13
14
  * @param notifications - payment notification url and email
14
15
  */
15
- constructor(payerContext: PayerContext, amount: number, description: string, notifications: Notifications | null);
16
+ constructor(payerContext: PayerContext, amount: number, description: string, hiddenDescription: string | null, notifications: Notifications | null);
16
17
  }
17
18
  //# sourceMappingURL=single_transaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"single_transaction.d.ts","sourceRoot":"","sources":["../../../../../src/model/transaction/single_transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,YAAY,EAAE,YAAY,CAAC;IAE3B;;;;;OAKG;gBAED,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,GAAG,IAAI;CAKtC"}
1
+ {"version":3,"file":"single_transaction.d.ts","sourceRoot":"","sources":["../../../../../src/model/transaction/single_transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,YAAY,EAAE,YAAY,CAAC;IAE3B;;;;;;OAMG;gBAED,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,aAAa,EAAE,aAAa,GAAG,IAAI;CAKtC"}
@@ -12,8 +12,9 @@ export declare class TokenPayment extends Transaction {
12
12
  * @param payer - payer information
13
13
  * @param amount - amount of money payer has to pay
14
14
  * @param description - description of payment shown to payer
15
+ * @param hiddenDescription - description of payment shown to merchant
15
16
  * @param notifications - payment notification url and email
16
17
  */
17
- constructor(cardToken: string, payer: Payer, amount: number, description: string, notifications: Notifications | null);
18
+ constructor(cardToken: string, payer: Payer, amount: number, description: string, hiddenDescription: string | null, notifications: Notifications | null);
18
19
  }
19
20
  //# sourceMappingURL=token_payment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"token_payment.d.ts","sourceRoot":"","sources":["../../../../../src/model/transaction/token_payment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IAEb;;;;;;OAMG;gBAED,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,GAAG,IAAI;CAMtC"}
1
+ {"version":3,"file":"token_payment.d.ts","sourceRoot":"","sources":["../../../../../src/model/transaction/token_payment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IAEb;;;;;;;OAOG;gBAED,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,aAAa,EAAE,aAAa,GAAG,IAAI;CAMtC"}
@@ -5,12 +5,14 @@ import type { Notifications } from "../screenless/notifications";
5
5
  export declare class Transaction {
6
6
  amount: number;
7
7
  description: string;
8
+ hiddenDescription: string | null;
8
9
  notifications: Notifications | null;
9
10
  /**
10
11
  * @param amount - amount of money payer has to pay
11
12
  * @param description - description of payment shown to payer
13
+ * @param hiddenDescription - description of payment shown to merchant
12
14
  * @param notifications - payment notification url and email
13
15
  */
14
- constructor(amount: number, description: string, notifications: Notifications | null);
16
+ constructor(amount: number, description: string, hiddenDescription: string | null, notifications: Notifications | null);
15
17
  }
16
18
  //# sourceMappingURL=transaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../../../src/model/transaction/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;GAEG;AACH,qBAAa,WAAW;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAEpC;;;;OAIG;gBAED,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,GAAG,IAAI;CAMtC"}
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../../../src/model/transaction/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;GAEG;AACH,qBAAa,WAAW;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAEpC;;;;;OAKG;gBAED,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,aAAa,EAAE,aAAa,GAAG,IAAI;CAOtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tpay",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "The Tpay SDK empowers your app to seamlessly integrate Tpay’s payment functionalities, providing a comprehensive and developer-friendly solution for managing payments.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -50,31 +50,31 @@
50
50
  "registry": "https://registry.npmjs.org/"
51
51
  },
52
52
  "devDependencies": {
53
- "@commitlint/config-conventional": "^17.0.2",
54
- "@react-native/eslint-config": "^0.72.2",
55
- "@release-it/conventional-changelog": "^5.0.0",
56
- "@types/jest": "^28.1.2",
57
- "@types/react": "~17.0.21",
58
- "@types/react-native": "0.70.0",
59
- "commitlint": "^17.0.2",
60
- "del-cli": "^5.0.0",
61
- "eslint": "^8.4.1",
62
- "eslint-config-prettier": "^8.5.0",
63
- "eslint-plugin-prettier": "^4.0.0",
64
- "jest": "^28.1.1",
65
- "metro-config": "^0.80.5",
66
- "pod-install": "^0.1.0",
67
- "prettier": "^2.0.5",
68
- "react": "18.2.0",
69
- "react-native": "0.72.6",
70
- "react-native-builder-bob": "^0.20.0",
71
- "release-it": "^15.0.0",
53
+ "@commitlint/config-conventional": "^19.6.0",
54
+ "@eslint/compat": "^1.2.7",
55
+ "@eslint/eslintrc": "^3.3.0",
56
+ "@eslint/js": "^9.22.0",
57
+ "@evilmartians/lefthook": "^1.5.0",
58
+ "@react-native-community/cli": "15.0.0-alpha.2",
59
+ "@react-native/babel-preset": "0.79.2",
60
+ "@react-native/eslint-config": "^0.78.0",
61
+ "@release-it/conventional-changelog": "^9.0.2",
62
+ "@types/jest": "^29.5.5",
63
+ "@types/react": "^19.0.0",
64
+ "commitlint": "^19.6.1",
65
+ "del-cli": "^5.1.0",
66
+ "eslint": "^9.22.0",
67
+ "eslint-config-prettier": "^10.1.1",
68
+ "eslint-plugin-prettier": "^5.2.3",
69
+ "jest": "^29.7.0",
70
+ "pod-install": "^0.3.9",
71
+ "prettier": "^3.0.3",
72
+ "react": "19.0.0",
73
+ "react-native": "0.79.2",
74
+ "react-native-builder-bob": "^0.40.11",
75
+ "release-it": "^17.10.0",
72
76
  "turbo": "^1.10.7",
73
- "typedoc": "^0.25.8",
74
- "typescript": "^5.0.2"
75
- },
76
- "resolutions": {
77
- "@types/react": "17.0.21"
77
+ "typescript": "^5.8.3"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "react": "*",
@@ -85,7 +85,7 @@
85
85
  ],
86
86
  "packageManager": "yarn@3.6.1",
87
87
  "engines": {
88
- "node": ">= 18.0.0"
88
+ "node": ">= 20.0.0"
89
89
  },
90
90
  "jest": {
91
91
  "preset": "react-native",
@@ -146,6 +146,14 @@
146
146
  "trailingComma": "es5",
147
147
  "useTabs": false
148
148
  },
149
+ "codegenConfig": {
150
+ "name": "TpayRNModule",
151
+ "type": "modules",
152
+ "jsSrcsDir": "src",
153
+ "android": {
154
+ "javaPackageName": "com.tpay"
155
+ }
156
+ },
149
157
  "react-native-builder-bob": {
150
158
  "source": "src",
151
159
  "output": "lib",
@@ -0,0 +1,33 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export interface Spec extends TurboModule {
5
+ // Configuration
6
+ configure(configuration: string): Promise<string>;
7
+
8
+ // Payment methods
9
+ startPayment(transaction: string): Promise<string>;
10
+ startCardTokenPayment(tokenPayment: string): Promise<string>;
11
+ tokenizeCard(tokenization: string): Promise<string>;
12
+
13
+ // Screenless payments
14
+ screenlessBLIKPayment(blikPayment: string): Promise<string>;
15
+ screenlessAmbiguousBLIKPayment(ambiguousBlikPayment: string): Promise<string>;
16
+ screenlessCreditCardPayment(creditCardPayment: string): Promise<string>;
17
+ screenlessTransferPayment(transferPayment: string): Promise<string>;
18
+ screenlessGooglePayPayment(googlePayPayment: string): Promise<string>;
19
+ screenlessApplePayPayment(applePayPayment: string): Promise<string>;
20
+ screenlessRatyPekaoPayment(ratyPekaoPayment: string): Promise<string>;
21
+ screenlessPayPoPayment(payPoPayment: string): Promise<string>;
22
+
23
+ // Google Pay utilities
24
+ configureGooglePayUtils(configuration: string): Promise<string>;
25
+ isGooglePayAvailable(): Promise<boolean>;
26
+ openGooglePay(): Promise<string>;
27
+
28
+ // Payment channels
29
+ getAvailablePaymentChannels(): Promise<string>;
30
+ }
31
+
32
+
33
+ export default TurboModuleRegistry.get<Spec>('TpayRNModule');
@@ -2,17 +2,30 @@
2
2
  /**
3
3
  * Indicates a result of Google Pay configuration
4
4
  */
5
- export class GooglePayConfigureResult {}
5
+ export abstract class GooglePayConfigureResult {
6
+ /**
7
+ * Type identifier for the result
8
+ */
9
+ abstract readonly type: string;
10
+
11
+ /**
12
+ * Optional error message or additional information
13
+ */
14
+ message?: string;
15
+ }
6
16
 
7
17
  /**
8
18
  * Indicates that Google Pay configuration was successful
9
19
  */
10
- export class GooglePayConfigureSuccess extends GooglePayConfigureResult {}
20
+ export class GooglePayConfigureSuccess extends GooglePayConfigureResult {
21
+ readonly type = 'success';
22
+ }
11
23
 
12
24
  /**
13
25
  * Indicates that there was an error during Google Pay configuration
14
26
  */
15
27
  export class GooglePayConfigureError extends GooglePayConfigureResult {
28
+ readonly type = 'error';
16
29
  /**
17
30
  * Error message
18
31
  */
@@ -1,12 +1,38 @@
1
1
  /**
2
2
  * Indicates a result of Google Pay open
3
3
  */
4
- export class GooglePayOpenResult {}
4
+ export abstract class GooglePayOpenResult {
5
+ /**
6
+ * Type identifier for the result
7
+ */
8
+ abstract readonly type: string;
9
+
10
+ /**
11
+ * Google Pay card token when available
12
+ */
13
+ token?: string;
14
+
15
+ /**
16
+ * Credit card description when available
17
+ */
18
+ description?: string;
19
+
20
+ /**
21
+ * Credit card network when available
22
+ */
23
+ cardNetwork?: string;
24
+
25
+ /**
26
+ * Last digits of credit card number when available
27
+ */
28
+ cardTail?: string;
29
+ }
5
30
 
6
31
  /**
7
32
  * Indicates that Google Pay was successfully opened and user has selected a credit card
8
33
  */
9
34
  export class GooglePayOpenSuccess extends GooglePayOpenResult {
35
+ readonly type = 'success';
10
36
  /**
11
37
  * Google Pay card token, use it with GooglePayPayment
12
38
  */
@@ -44,15 +70,21 @@ export class GooglePayOpenSuccess extends GooglePayOpenResult {
44
70
  /**
45
71
  * Indicates that Google Pay was opened successfully but user closed it without selecting a credit card
46
72
  */
47
- export class GooglePayOpenCancelled extends GooglePayOpenResult {}
73
+ export class GooglePayOpenCancelled extends GooglePayOpenResult {
74
+ readonly type = 'cancelled';
75
+ }
48
76
 
49
77
  /**
50
78
  * Indicates that there was a unknown error
51
79
  */
52
- export class GooglePayOpenUnknownError extends GooglePayOpenResult {}
80
+ export class GooglePayOpenUnknownError extends GooglePayOpenResult {
81
+ readonly type = 'unknownError';
82
+ }
53
83
 
54
84
  /**
55
85
  * Indicates that Google Pay utils were not configured before trying to open Google Pay.
56
86
  * Configure utils via configureGooglePayUtils(...) method
57
87
  */
58
- export class GooglePayOpenNotConfigured extends GooglePayOpenResult {}
88
+ export class GooglePayOpenNotConfigured extends GooglePayOpenResult {
89
+ readonly type = 'notConfigured';
90
+ }
@@ -3,12 +3,28 @@ import type { PaymentChannel } from '../payment_channel/payment_channel';
3
3
  /**
4
4
  * Indicates a result of payment channels
5
5
  */
6
- export class PaymentChannelsResult {}
6
+ export abstract class PaymentChannelsResult {
7
+ /**
8
+ * Type identifier for the result
9
+ */
10
+ abstract readonly type: string;
11
+
12
+ /**
13
+ * Optional error message or additional information
14
+ */
15
+ message?: string;
16
+
17
+ /**
18
+ * Payment channels array when available
19
+ */
20
+ channels?: Array<PaymentChannel>;
21
+ }
7
22
 
8
23
  /**
9
24
  * Indicates that payment channels were successfully received
10
25
  */
11
26
  export class PaymentChannelsSuccess extends PaymentChannelsResult {
27
+ readonly type = 'success';
12
28
  /**
13
29
  * Payment channels
14
30
  */
@@ -24,6 +40,7 @@ export class PaymentChannelsSuccess extends PaymentChannelsResult {
24
40
  * Indicates that there was an error while fetching payment channels
25
41
  */
26
42
  export class PaymentChannelsError extends PaymentChannelsResult {
43
+ readonly type = 'error';
27
44
  /**
28
45
  * Error message
29
46
  */