mobilyflow-react-native-sdk 0.3.2 → 0.4.0-alpha.4
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/MobilyflowReactNativeSdk.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/generated/java/com/mobilyflowreactnativesdk/NativeMobilyflowReactNativeSdkSpec.java +10 -2
- package/android/generated/jni/RNMobilyflowReactNativeSdkSpec-generated.cpp +16 -4
- package/android/generated/jni/react/renderer/components/RNMobilyflowReactNativeSdkSpec/RNMobilyflowReactNativeSdkSpecJSI-generated.cpp +19 -4
- package/android/generated/jni/react/renderer/components/RNMobilyflowReactNativeSdkSpec/RNMobilyflowReactNativeSdkSpecJSI.h +25 -7
- package/android/src/main/java/com/mobilyflowreactnativesdk/MobilyflowReactNativeSdkModule.kt +33 -17
- package/ios/MobilyflowReactNativeSdk.mm +23 -19
- package/ios/generated/RNMobilyflowReactNativeSdkSpec/RNMobilyflowReactNativeSdkSpec-generated.mm +17 -3
- package/ios/generated/RNMobilyflowReactNativeSdkSpec/RNMobilyflowReactNativeSdkSpec.h +12 -5
- package/ios/generated/RNMobilyflowReactNativeSdkSpecJSI-generated.cpp +19 -4
- package/ios/generated/RNMobilyflowReactNativeSdkSpecJSI.h +25 -7
- package/lib/commonjs/MobilyPurchaseSDK.js +30 -14
- package/lib/commonjs/MobilyPurchaseSDK.js.map +1 -1
- package/lib/commonjs/NativeMobilyflowReactNativeSdk.js.map +1 -1
- package/lib/commonjs/enums/mobily-environment.js +3 -3
- package/lib/commonjs/enums/mobily-environment.js.map +1 -1
- package/lib/commonjs/enums/mobily-event-type.js +25 -0
- package/lib/commonjs/enums/mobily-event-type.js.map +1 -0
- package/lib/commonjs/enums/mobily-platform.js +12 -0
- package/lib/commonjs/enums/mobily-platform.js.map +1 -0
- package/lib/commonjs/enums/mobily-product-offer-type.js +12 -0
- package/lib/commonjs/enums/mobily-product-offer-type.js.map +1 -0
- package/lib/commonjs/enums/mobily-product-status.js +13 -0
- package/lib/commonjs/enums/mobily-product-status.js.map +1 -0
- package/lib/commonjs/enums/mobily-product-type.js +12 -0
- package/lib/commonjs/enums/mobily-product-type.js.map +1 -0
- package/lib/commonjs/enums/mobily-refund-dialog-result.js +13 -0
- package/lib/commonjs/enums/mobily-refund-dialog-result.js.map +1 -0
- package/lib/commonjs/enums/mobily-transaction-status.js +13 -0
- package/lib/commonjs/enums/mobily-transaction-status.js.map +1 -0
- package/lib/commonjs/enums/mobily-transfer-ownership-status.js +14 -0
- package/lib/commonjs/enums/mobily-transfer-ownership-status.js.map +1 -0
- package/lib/commonjs/enums/mobily-webhook-status.js +13 -0
- package/lib/commonjs/enums/mobily-webhook-status.js.map +1 -0
- package/lib/commonjs/enums/period-unit.js +3 -3
- package/lib/commonjs/enums/period-unit.js.map +1 -1
- package/lib/commonjs/index.js +89 -38
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/entitlement/mobily-customer-entitlement.js +24 -0
- package/lib/commonjs/models/entitlement/mobily-customer-entitlement.js.map +1 -0
- package/lib/commonjs/models/entitlement/mobily-item.js +21 -0
- package/lib/commonjs/models/entitlement/mobily-item.js.map +1 -0
- package/lib/commonjs/models/entitlement/mobily-subscription.js +24 -0
- package/lib/commonjs/models/entitlement/mobily-subscription.js.map +1 -0
- package/lib/commonjs/models/internal/purchase-options.js +6 -0
- package/lib/commonjs/models/internal/purchase-options.js.map +1 -0
- package/lib/commonjs/models/mobily-customer.js.map +1 -0
- package/lib/commonjs/models/mobily-event.js +29 -0
- package/lib/commonjs/models/mobily-event.js.map +1 -0
- package/lib/commonjs/models/mobily-transaction.js +17 -0
- package/lib/commonjs/models/mobily-transaction.js.map +1 -0
- package/lib/commonjs/{entities → models/product}/mobily-one-time-product.js +1 -1
- package/lib/commonjs/models/product/mobily-one-time-product.js.map +1 -0
- package/lib/commonjs/{entities → models/product}/mobily-product.js +5 -4
- package/lib/commonjs/models/product/mobily-product.js.map +1 -0
- package/lib/commonjs/{entities → models/product}/mobily-subscription-group.js +4 -2
- package/lib/commonjs/models/product/mobily-subscription-group.js.map +1 -0
- package/lib/commonjs/models/product/mobily-subscription-offer.js +16 -0
- package/lib/commonjs/models/product/mobily-subscription-offer.js.map +1 -0
- package/lib/commonjs/{entities → models/product}/mobily-subscription-product.js +3 -5
- package/lib/commonjs/models/product/mobily-subscription-product.js.map +1 -0
- package/lib/commonjs/utils/object-transformer.js +8 -1
- package/lib/commonjs/utils/object-transformer.js.map +1 -1
- package/lib/module/MobilyPurchaseSDK.js +30 -14
- package/lib/module/MobilyPurchaseSDK.js.map +1 -1
- package/lib/module/NativeMobilyflowReactNativeSdk.js.map +1 -1
- package/lib/module/enums/mobily-environment.js +3 -3
- package/lib/module/enums/mobily-environment.js.map +1 -1
- package/lib/module/enums/mobily-event-type.js +21 -0
- package/lib/module/enums/mobily-event-type.js.map +1 -0
- package/lib/module/enums/mobily-platform.js +8 -0
- package/lib/module/enums/mobily-platform.js.map +1 -0
- package/lib/module/enums/mobily-product-offer-type.js +8 -0
- package/lib/module/enums/mobily-product-offer-type.js.map +1 -0
- package/lib/module/enums/mobily-product-status.js +9 -0
- package/lib/module/enums/mobily-product-status.js.map +1 -0
- package/lib/module/enums/mobily-product-type.js +8 -0
- package/lib/module/enums/mobily-product-type.js.map +1 -0
- package/lib/module/enums/mobily-refund-dialog-result.js +9 -0
- package/lib/module/enums/mobily-refund-dialog-result.js.map +1 -0
- package/lib/module/enums/mobily-transaction-status.js +9 -0
- package/lib/module/enums/mobily-transaction-status.js.map +1 -0
- package/lib/module/enums/mobily-transfer-ownership-status.js +10 -0
- package/lib/module/enums/mobily-transfer-ownership-status.js.map +1 -0
- package/lib/module/enums/mobily-webhook-status.js +9 -0
- package/lib/module/enums/mobily-webhook-status.js.map +1 -0
- package/lib/module/enums/period-unit.js +3 -3
- package/lib/module/enums/period-unit.js.map +1 -1
- package/lib/module/index.js +28 -12
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/entitlement/mobily-customer-entitlement.js +19 -0
- package/lib/module/models/entitlement/mobily-customer-entitlement.js.map +1 -0
- package/lib/module/models/entitlement/mobily-item.js +16 -0
- package/lib/module/models/entitlement/mobily-item.js.map +1 -0
- package/lib/module/models/entitlement/mobily-subscription.js +19 -0
- package/lib/module/models/entitlement/mobily-subscription.js.map +1 -0
- package/lib/module/models/internal/purchase-options.js +4 -0
- package/lib/module/models/internal/purchase-options.js.map +1 -0
- package/lib/module/models/mobily-customer.js.map +1 -0
- package/lib/module/models/mobily-event.js +24 -0
- package/lib/module/models/mobily-event.js.map +1 -0
- package/lib/module/models/mobily-transaction.js +12 -0
- package/lib/module/models/mobily-transaction.js.map +1 -0
- package/lib/module/{entities → models/product}/mobily-one-time-product.js +1 -1
- package/lib/module/models/product/mobily-one-time-product.js.map +1 -0
- package/lib/module/models/product/mobily-product.js +18 -0
- package/lib/module/models/product/mobily-product.js.map +1 -0
- package/lib/module/models/product/mobily-subscription-group.js +16 -0
- package/lib/module/models/product/mobily-subscription-group.js.map +1 -0
- package/lib/module/models/product/mobily-subscription-offer.js +11 -0
- package/lib/module/models/product/mobily-subscription-offer.js.map +1 -0
- package/lib/module/models/product/mobily-subscription-product.js +16 -0
- package/lib/module/models/product/mobily-subscription-product.js.map +1 -0
- package/lib/module/utils/object-transformer.js +8 -1
- package/lib/module/utils/object-transformer.js.map +1 -1
- package/lib/typescript/commonjs/src/MobilyPurchaseSDK.d.ts +18 -17
- package/lib/typescript/commonjs/src/MobilyPurchaseSDK.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/NativeMobilyflowReactNativeSdk.d.ts +14 -12
- package/lib/typescript/commonjs/src/NativeMobilyflowReactNativeSdk.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/enums/mobily-environment.d.ts +3 -3
- package/lib/typescript/commonjs/src/enums/mobily-environment.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/enums/mobily-event-type.d.ts +18 -0
- package/lib/typescript/commonjs/src/enums/mobily-event-type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/mobily-platform.d.ts +5 -0
- package/lib/typescript/commonjs/src/enums/mobily-platform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/mobily-product-offer-type.d.ts +5 -0
- package/lib/typescript/commonjs/src/enums/mobily-product-offer-type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/mobily-product-status.d.ts +6 -0
- package/lib/typescript/commonjs/src/enums/mobily-product-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/mobily-product-type.d.ts +5 -0
- package/lib/typescript/commonjs/src/enums/mobily-product-type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/mobily-refund-dialog-result.d.ts +6 -0
- package/lib/typescript/commonjs/src/enums/mobily-refund-dialog-result.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/mobily-transaction-status.d.ts +6 -0
- package/lib/typescript/commonjs/src/enums/mobily-transaction-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/mobily-transfer-ownership-status.d.ts +7 -0
- package/lib/typescript/commonjs/src/enums/mobily-transfer-ownership-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/mobily-webhook-status.d.ts +6 -0
- package/lib/typescript/commonjs/src/enums/mobily-webhook-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/period-unit.d.ts +3 -3
- package/lib/typescript/commonjs/src/enums/period-unit.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +21 -13
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/entitlement/mobily-customer-entitlement.d.ts +13 -0
- package/lib/typescript/commonjs/src/models/entitlement/mobily-customer-entitlement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/entitlement/mobily-item.d.ts +11 -0
- package/lib/typescript/commonjs/src/models/entitlement/mobily-item.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/entitlement/mobily-subscription.d.ts +34 -0
- package/lib/typescript/commonjs/src/models/entitlement/mobily-subscription.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/internal/purchase-options.d.ts +6 -0
- package/lib/typescript/commonjs/src/models/internal/purchase-options.d.ts.map +1 -0
- package/lib/typescript/{module/src/entities → commonjs/src/models}/mobily-customer.d.ts +1 -1
- package/lib/typescript/commonjs/src/models/mobily-customer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/mobily-event.d.ts +26 -0
- package/lib/typescript/commonjs/src/models/mobily-event.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/mobily-transaction.d.ts +29 -0
- package/lib/typescript/commonjs/src/models/mobily-transaction.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/product/mobily-one-time-product.d.ts +6 -0
- package/lib/typescript/commonjs/src/models/product/mobily-one-time-product.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/product/mobily-product.d.ts +27 -0
- package/lib/typescript/commonjs/src/models/product/mobily-product.d.ts.map +1 -0
- package/lib/typescript/{module/src/entities → commonjs/src/models/product}/mobily-subscription-group.d.ts +2 -3
- package/lib/typescript/commonjs/src/models/product/mobily-subscription-group.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/product/mobily-subscription-offer.d.ts +23 -0
- package/lib/typescript/commonjs/src/models/product/mobily-subscription-offer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/product/mobily-subscription-product.d.ts +13 -0
- package/lib/typescript/commonjs/src/models/product/mobily-subscription-product.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/object-transformer.d.ts +1 -0
- package/lib/typescript/commonjs/src/utils/object-transformer.d.ts.map +1 -1
- package/lib/typescript/module/src/MobilyPurchaseSDK.d.ts +18 -17
- package/lib/typescript/module/src/MobilyPurchaseSDK.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeMobilyflowReactNativeSdk.d.ts +14 -12
- package/lib/typescript/module/src/NativeMobilyflowReactNativeSdk.d.ts.map +1 -1
- package/lib/typescript/module/src/enums/mobily-environment.d.ts +3 -3
- package/lib/typescript/module/src/enums/mobily-environment.d.ts.map +1 -1
- package/lib/typescript/module/src/enums/mobily-event-type.d.ts +18 -0
- package/lib/typescript/module/src/enums/mobily-event-type.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/mobily-platform.d.ts +5 -0
- package/lib/typescript/module/src/enums/mobily-platform.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/mobily-product-offer-type.d.ts +5 -0
- package/lib/typescript/module/src/enums/mobily-product-offer-type.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/mobily-product-status.d.ts +6 -0
- package/lib/typescript/module/src/enums/mobily-product-status.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/mobily-product-type.d.ts +5 -0
- package/lib/typescript/module/src/enums/mobily-product-type.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/mobily-refund-dialog-result.d.ts +6 -0
- package/lib/typescript/module/src/enums/mobily-refund-dialog-result.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/mobily-transaction-status.d.ts +6 -0
- package/lib/typescript/module/src/enums/mobily-transaction-status.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/mobily-transfer-ownership-status.d.ts +7 -0
- package/lib/typescript/module/src/enums/mobily-transfer-ownership-status.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/mobily-webhook-status.d.ts +6 -0
- package/lib/typescript/module/src/enums/mobily-webhook-status.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/period-unit.d.ts +3 -3
- package/lib/typescript/module/src/enums/period-unit.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +21 -13
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/entitlement/mobily-customer-entitlement.d.ts +13 -0
- package/lib/typescript/module/src/models/entitlement/mobily-customer-entitlement.d.ts.map +1 -0
- package/lib/typescript/module/src/models/entitlement/mobily-item.d.ts +11 -0
- package/lib/typescript/module/src/models/entitlement/mobily-item.d.ts.map +1 -0
- package/lib/typescript/module/src/models/entitlement/mobily-subscription.d.ts +34 -0
- package/lib/typescript/module/src/models/entitlement/mobily-subscription.d.ts.map +1 -0
- package/lib/typescript/module/src/models/internal/purchase-options.d.ts +6 -0
- package/lib/typescript/module/src/models/internal/purchase-options.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src/entities → module/src/models}/mobily-customer.d.ts +1 -1
- package/lib/typescript/module/src/models/mobily-customer.d.ts.map +1 -0
- package/lib/typescript/module/src/models/mobily-event.d.ts +26 -0
- package/lib/typescript/module/src/models/mobily-event.d.ts.map +1 -0
- package/lib/typescript/module/src/models/mobily-transaction.d.ts +29 -0
- package/lib/typescript/module/src/models/mobily-transaction.d.ts.map +1 -0
- package/lib/typescript/module/src/models/product/mobily-one-time-product.d.ts +6 -0
- package/lib/typescript/module/src/models/product/mobily-one-time-product.d.ts.map +1 -0
- package/lib/typescript/module/src/models/product/mobily-product.d.ts +27 -0
- package/lib/typescript/module/src/models/product/mobily-product.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src/entities → module/src/models/product}/mobily-subscription-group.d.ts +2 -3
- package/lib/typescript/module/src/models/product/mobily-subscription-group.d.ts.map +1 -0
- package/lib/typescript/module/src/models/product/mobily-subscription-offer.d.ts +23 -0
- package/lib/typescript/module/src/models/product/mobily-subscription-offer.d.ts.map +1 -0
- package/lib/typescript/module/src/models/product/mobily-subscription-product.d.ts +13 -0
- package/lib/typescript/module/src/models/product/mobily-subscription-product.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/object-transformer.d.ts +1 -0
- package/lib/typescript/module/src/utils/object-transformer.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/MobilyPurchaseSDK.tsx +46 -31
- package/src/NativeMobilyflowReactNativeSdk.ts +14 -13
- package/src/enums/mobily-environment.ts +3 -3
- package/src/enums/mobily-event-type.ts +17 -0
- package/src/enums/mobily-platform.ts +4 -0
- package/src/enums/mobily-product-offer-type.ts +4 -0
- package/src/enums/mobily-product-status.ts +5 -0
- package/src/enums/mobily-product-type.ts +4 -0
- package/src/enums/mobily-refund-dialog-result.ts +5 -0
- package/src/enums/mobily-transaction-status.ts +5 -0
- package/src/enums/mobily-transfer-ownership-status.ts +6 -0
- package/src/enums/mobily-webhook-status.ts +5 -0
- package/src/enums/period-unit.ts +3 -3
- package/src/index.tsx +26 -18
- package/src/models/entitlement/mobily-customer-entitlement.ts +24 -0
- package/src/models/entitlement/mobily-item.ts +21 -0
- package/src/models/entitlement/mobily-subscription.ts +58 -0
- package/src/models/internal/purchase-options.ts +6 -0
- package/src/{entities → models}/mobily-customer.ts +5 -5
- package/src/models/mobily-event.ts +52 -0
- package/src/models/mobily-transaction.ts +44 -0
- package/src/models/product/mobily-one-time-product.ts +10 -0
- package/src/models/product/mobily-product.ts +51 -0
- package/src/{entities → models/product}/mobily-subscription-group.ts +6 -5
- package/src/models/product/mobily-subscription-offer.ts +29 -0
- package/src/models/product/mobily-subscription-product.ts +24 -0
- package/src/utils/object-transformer.ts +11 -1
- package/lib/commonjs/entities/mobily-customer-entitlement.js +0 -36
- package/lib/commonjs/entities/mobily-customer-entitlement.js.map +0 -1
- package/lib/commonjs/entities/mobily-customer.js.map +0 -1
- package/lib/commonjs/entities/mobily-one-time-product.js.map +0 -1
- package/lib/commonjs/entities/mobily-product.js.map +0 -1
- package/lib/commonjs/entities/mobily-subscription-group.js.map +0 -1
- package/lib/commonjs/entities/mobily-subscription-offer.js +0 -14
- package/lib/commonjs/entities/mobily-subscription-offer.js.map +0 -1
- package/lib/commonjs/entities/mobily-subscription-product.js.map +0 -1
- package/lib/commonjs/enums/platform.js +0 -12
- package/lib/commonjs/enums/platform.js.map +0 -1
- package/lib/commonjs/enums/product-status.js +0 -13
- package/lib/commonjs/enums/product-status.js.map +0 -1
- package/lib/commonjs/enums/product-type.js +0 -12
- package/lib/commonjs/enums/product-type.js.map +0 -1
- package/lib/commonjs/enums/transfer-ownership-status.js +0 -14
- package/lib/commonjs/enums/transfer-ownership-status.js.map +0 -1
- package/lib/commonjs/enums/webhook-status.js +0 -13
- package/lib/commonjs/enums/webhook-status.js.map +0 -1
- package/lib/module/entities/mobily-customer-entitlement.js +0 -29
- package/lib/module/entities/mobily-customer-entitlement.js.map +0 -1
- package/lib/module/entities/mobily-customer.js.map +0 -1
- package/lib/module/entities/mobily-one-time-product.js.map +0 -1
- package/lib/module/entities/mobily-product.js +0 -17
- package/lib/module/entities/mobily-product.js.map +0 -1
- package/lib/module/entities/mobily-subscription-group.js +0 -14
- package/lib/module/entities/mobily-subscription-group.js.map +0 -1
- package/lib/module/entities/mobily-subscription-offer.js +0 -9
- package/lib/module/entities/mobily-subscription-offer.js.map +0 -1
- package/lib/module/entities/mobily-subscription-product.js +0 -18
- package/lib/module/entities/mobily-subscription-product.js.map +0 -1
- package/lib/module/enums/platform.js +0 -8
- package/lib/module/enums/platform.js.map +0 -1
- package/lib/module/enums/product-status.js +0 -9
- package/lib/module/enums/product-status.js.map +0 -1
- package/lib/module/enums/product-type.js +0 -8
- package/lib/module/enums/product-type.js.map +0 -1
- package/lib/module/enums/transfer-ownership-status.js +0 -10
- package/lib/module/enums/transfer-ownership-status.js.map +0 -1
- package/lib/module/enums/webhook-status.js +0 -9
- package/lib/module/enums/webhook-status.js.map +0 -1
- package/lib/typescript/commonjs/src/entities/mobily-customer-entitlement.d.ts +0 -40
- package/lib/typescript/commonjs/src/entities/mobily-customer-entitlement.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/entities/mobily-customer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/entities/mobily-one-time-product.d.ts +0 -12
- package/lib/typescript/commonjs/src/entities/mobily-one-time-product.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/entities/mobily-product.d.ts +0 -25
- package/lib/typescript/commonjs/src/entities/mobily-product.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/entities/mobily-subscription-group.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/entities/mobily-subscription-offer.d.ts +0 -21
- package/lib/typescript/commonjs/src/entities/mobily-subscription-offer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/entities/mobily-subscription-product.d.ts +0 -14
- package/lib/typescript/commonjs/src/entities/mobily-subscription-product.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/enums/platform.d.ts +0 -5
- package/lib/typescript/commonjs/src/enums/platform.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/enums/product-status.d.ts +0 -6
- package/lib/typescript/commonjs/src/enums/product-status.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/enums/product-type.d.ts +0 -5
- package/lib/typescript/commonjs/src/enums/product-type.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/enums/transfer-ownership-status.d.ts +0 -7
- package/lib/typescript/commonjs/src/enums/transfer-ownership-status.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/enums/webhook-status.d.ts +0 -6
- package/lib/typescript/commonjs/src/enums/webhook-status.d.ts.map +0 -1
- package/lib/typescript/module/src/entities/mobily-customer-entitlement.d.ts +0 -40
- package/lib/typescript/module/src/entities/mobily-customer-entitlement.d.ts.map +0 -1
- package/lib/typescript/module/src/entities/mobily-customer.d.ts.map +0 -1
- package/lib/typescript/module/src/entities/mobily-one-time-product.d.ts +0 -12
- package/lib/typescript/module/src/entities/mobily-one-time-product.d.ts.map +0 -1
- package/lib/typescript/module/src/entities/mobily-product.d.ts +0 -25
- package/lib/typescript/module/src/entities/mobily-product.d.ts.map +0 -1
- package/lib/typescript/module/src/entities/mobily-subscription-group.d.ts.map +0 -1
- package/lib/typescript/module/src/entities/mobily-subscription-offer.d.ts +0 -21
- package/lib/typescript/module/src/entities/mobily-subscription-offer.d.ts.map +0 -1
- package/lib/typescript/module/src/entities/mobily-subscription-product.d.ts +0 -14
- package/lib/typescript/module/src/entities/mobily-subscription-product.d.ts.map +0 -1
- package/lib/typescript/module/src/enums/platform.d.ts +0 -5
- package/lib/typescript/module/src/enums/platform.d.ts.map +0 -1
- package/lib/typescript/module/src/enums/product-status.d.ts +0 -6
- package/lib/typescript/module/src/enums/product-status.d.ts.map +0 -1
- package/lib/typescript/module/src/enums/product-type.d.ts +0 -5
- package/lib/typescript/module/src/enums/product-type.d.ts.map +0 -1
- package/lib/typescript/module/src/enums/transfer-ownership-status.d.ts +0 -7
- package/lib/typescript/module/src/enums/transfer-ownership-status.d.ts.map +0 -1
- package/lib/typescript/module/src/enums/webhook-status.d.ts +0 -6
- package/lib/typescript/module/src/enums/webhook-status.d.ts.map +0 -1
- package/src/entities/mobily-customer-entitlement.ts +0 -61
- package/src/entities/mobily-one-time-product.ts +0 -16
- package/src/entities/mobily-product.ts +0 -40
- package/src/entities/mobily-subscription-offer.ts +0 -25
- package/src/entities/mobily-subscription-product.ts +0 -26
- package/src/enums/platform.ts +0 -4
- package/src/enums/product-status.ts +0 -5
- package/src/enums/product-type.ts +0 -4
- package/src/enums/transfer-ownership-status.ts +0 -6
- package/src/enums/webhook-status.ts +0 -5
- /package/lib/commonjs/{entities → models}/mobily-customer.js +0 -0
- /package/lib/module/{entities → models}/mobily-customer.js +0 -0
|
@@ -21,7 +21,7 @@ Pod::Spec.new do |s|
|
|
|
21
21
|
s.swift_versions = '5.0'
|
|
22
22
|
|
|
23
23
|
# Install MobilyFlow SDK
|
|
24
|
-
s.dependency 'MobilyflowSDK', '0.
|
|
24
|
+
s.dependency 'MobilyflowSDK', '0.4.0-alpha.5'
|
|
25
25
|
|
|
26
26
|
#s.subspec 'MobilyflowSDK' do |ss|
|
|
27
27
|
# ss.source_files = '../mobilyflow-ios-sdk/Sources/MobilyflowSDK/**/*'
|
package/android/build.gradle
CHANGED
|
@@ -100,7 +100,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
|
100
100
|
dependencies {
|
|
101
101
|
implementation "com.facebook.react:react-android"
|
|
102
102
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
103
|
-
implementation "com.mobilyflow:mobilyflow-android-sdk:0.3
|
|
103
|
+
implementation "com.mobilyflow:mobilyflow-android-sdk:0.4.0-alpha.3"
|
|
104
104
|
implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.6.2"
|
|
105
105
|
implementation "org.jetbrains.kotlin:kotlin-reflect"
|
|
106
106
|
}
|
package/android/generated/java/com/mobilyflowreactnativesdk/NativeMobilyflowReactNativeSdkSpec.java
CHANGED
|
@@ -37,7 +37,7 @@ public abstract class NativeMobilyflowReactNativeSdkSpec extends ReactContextBas
|
|
|
37
37
|
|
|
38
38
|
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
39
39
|
@DoNotStrip
|
|
40
|
-
public abstract String instantiate(String appId, String apiKey,
|
|
40
|
+
public abstract String instantiate(String appId, String apiKey, String environment, @Nullable ReadableMap options);
|
|
41
41
|
|
|
42
42
|
@ReactMethod
|
|
43
43
|
@DoNotStrip
|
|
@@ -89,7 +89,11 @@ public abstract class NativeMobilyflowReactNativeSdkSpec extends ReactContextBas
|
|
|
89
89
|
|
|
90
90
|
@ReactMethod
|
|
91
91
|
@DoNotStrip
|
|
92
|
-
public abstract void
|
|
92
|
+
public abstract void openRefundDialogForProduct(String uuid, String productId, Promise promise);
|
|
93
|
+
|
|
94
|
+
@ReactMethod
|
|
95
|
+
@DoNotStrip
|
|
96
|
+
public abstract void openRefundDialogForTransactionId(String uuid, String transactionId, Promise promise);
|
|
93
97
|
|
|
94
98
|
@ReactMethod
|
|
95
99
|
@DoNotStrip
|
|
@@ -103,6 +107,10 @@ public abstract class NativeMobilyflowReactNativeSdkSpec extends ReactContextBas
|
|
|
103
107
|
@DoNotStrip
|
|
104
108
|
public abstract void getStoreCountry(String uuid, Promise promise);
|
|
105
109
|
|
|
110
|
+
@ReactMethod
|
|
111
|
+
@DoNotStrip
|
|
112
|
+
public abstract void isBillingAvailable(String uuid, Promise promise);
|
|
113
|
+
|
|
106
114
|
@ReactMethod
|
|
107
115
|
@DoNotStrip
|
|
108
116
|
public abstract void isForwardingEnable(String uuid, String externalRef, Promise promise);
|
|
@@ -14,7 +14,7 @@ namespace facebook::react {
|
|
|
14
14
|
|
|
15
15
|
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_instantiate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
16
16
|
static jmethodID cachedMethodId = nullptr;
|
|
17
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "instantiate", "(Ljava/lang/String;Ljava/lang/String;
|
|
17
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "instantiate", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;)Ljava/lang/String;", args, count, cachedMethodId);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_close(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
@@ -77,9 +77,14 @@ static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI
|
|
|
77
77
|
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "openManageSubscription", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
static facebook::jsi::Value
|
|
80
|
+
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openRefundDialogForProduct(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
81
81
|
static jmethodID cachedMethodId = nullptr;
|
|
82
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "
|
|
82
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "openRefundDialogForProduct", "(Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openRefundDialogForTransactionId(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
86
|
+
static jmethodID cachedMethodId = nullptr;
|
|
87
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "openRefundDialogForTransactionId", "(Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_purchaseProduct(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
@@ -97,6 +102,11 @@ static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI
|
|
|
97
102
|
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getStoreCountry", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
98
103
|
}
|
|
99
104
|
|
|
105
|
+
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_isBillingAvailable(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
106
|
+
static jmethodID cachedMethodId = nullptr;
|
|
107
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "isBillingAvailable", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
108
|
+
}
|
|
109
|
+
|
|
100
110
|
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_isForwardingEnable(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
101
111
|
static jmethodID cachedMethodId = nullptr;
|
|
102
112
|
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "isForwardingEnable", "(Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
@@ -127,10 +137,12 @@ NativeMobilyflowReactNativeSdkSpecJSI::NativeMobilyflowReactNativeSdkSpecJSI(con
|
|
|
127
137
|
methodMap_["getExternalEntitlements"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_getExternalEntitlements};
|
|
128
138
|
methodMap_["requestTransferOwnership"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_requestTransferOwnership};
|
|
129
139
|
methodMap_["openManageSubscription"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openManageSubscription};
|
|
130
|
-
methodMap_["
|
|
140
|
+
methodMap_["openRefundDialogForProduct"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openRefundDialogForProduct};
|
|
141
|
+
methodMap_["openRefundDialogForTransactionId"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openRefundDialogForTransactionId};
|
|
131
142
|
methodMap_["purchaseProduct"] = MethodMetadata {3, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_purchaseProduct};
|
|
132
143
|
methodMap_["sendDiagnostic"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_sendDiagnostic};
|
|
133
144
|
methodMap_["getStoreCountry"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_getStoreCountry};
|
|
145
|
+
methodMap_["isBillingAvailable"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_isBillingAvailable};
|
|
134
146
|
methodMap_["isForwardingEnable"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_isForwardingEnable};
|
|
135
147
|
methodMap_["getCustomer"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_getCustomer};
|
|
136
148
|
methodMap_["getSDKVersion"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_getSDKVersion};
|
|
@@ -16,7 +16,7 @@ static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_instan
|
|
|
16
16
|
rt,
|
|
17
17
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
18
18
|
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
19
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].
|
|
19
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
20
20
|
count <= 3 || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asObject(rt))
|
|
21
21
|
);
|
|
22
22
|
}
|
|
@@ -103,8 +103,15 @@ static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openMa
|
|
|
103
103
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
|
-
static jsi::Value
|
|
107
|
-
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->
|
|
106
|
+
static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openRefundDialogForProduct(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
107
|
+
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->openRefundDialogForProduct(
|
|
108
|
+
rt,
|
|
109
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
110
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openRefundDialogForTransactionId(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
114
|
+
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->openRefundDialogForTransactionId(
|
|
108
115
|
rt,
|
|
109
116
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
110
117
|
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
@@ -131,6 +138,12 @@ static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getSto
|
|
|
131
138
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
132
139
|
);
|
|
133
140
|
}
|
|
141
|
+
static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_isBillingAvailable(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
142
|
+
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->isBillingAvailable(
|
|
143
|
+
rt,
|
|
144
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
134
147
|
static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_isForwardingEnable(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
135
148
|
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->isForwardingEnable(
|
|
136
149
|
rt,
|
|
@@ -166,10 +179,12 @@ NativeMobilyflowReactNativeSdkCxxSpecJSI::NativeMobilyflowReactNativeSdkCxxSpecJ
|
|
|
166
179
|
methodMap_["getExternalEntitlements"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getExternalEntitlements};
|
|
167
180
|
methodMap_["requestTransferOwnership"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_requestTransferOwnership};
|
|
168
181
|
methodMap_["openManageSubscription"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openManageSubscription};
|
|
169
|
-
methodMap_["
|
|
182
|
+
methodMap_["openRefundDialogForProduct"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openRefundDialogForProduct};
|
|
183
|
+
methodMap_["openRefundDialogForTransactionId"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openRefundDialogForTransactionId};
|
|
170
184
|
methodMap_["purchaseProduct"] = MethodMetadata {3, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_purchaseProduct};
|
|
171
185
|
methodMap_["sendDiagnostic"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_sendDiagnostic};
|
|
172
186
|
methodMap_["getStoreCountry"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getStoreCountry};
|
|
187
|
+
methodMap_["isBillingAvailable"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_isBillingAvailable};
|
|
173
188
|
methodMap_["isForwardingEnable"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_isForwardingEnable};
|
|
174
189
|
methodMap_["getCustomer"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getCustomer};
|
|
175
190
|
methodMap_["getSDKVersion"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getSDKVersion};
|
|
@@ -128,7 +128,7 @@ protected:
|
|
|
128
128
|
NativeMobilyflowReactNativeSdkCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
129
129
|
|
|
130
130
|
public:
|
|
131
|
-
virtual jsi::String instantiate(jsi::Runtime &rt, jsi::String appId, jsi::String apiKey,
|
|
131
|
+
virtual jsi::String instantiate(jsi::Runtime &rt, jsi::String appId, jsi::String apiKey, jsi::String environment, std::optional<jsi::Object> options) = 0;
|
|
132
132
|
virtual void close(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
133
133
|
virtual jsi::Value login(jsi::Runtime &rt, jsi::String uuid, jsi::String externalRef) = 0;
|
|
134
134
|
virtual void logout(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
@@ -141,10 +141,12 @@ public:
|
|
|
141
141
|
virtual jsi::Value getExternalEntitlements(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
142
142
|
virtual jsi::Value requestTransferOwnership(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
143
143
|
virtual jsi::Value openManageSubscription(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
144
|
-
virtual jsi::Value
|
|
144
|
+
virtual jsi::Value openRefundDialogForProduct(jsi::Runtime &rt, jsi::String uuid, jsi::String productId) = 0;
|
|
145
|
+
virtual jsi::Value openRefundDialogForTransactionId(jsi::Runtime &rt, jsi::String uuid, jsi::String transactionId) = 0;
|
|
145
146
|
virtual jsi::Value purchaseProduct(jsi::Runtime &rt, jsi::String uuid, jsi::String productId, std::optional<jsi::Object> options) = 0;
|
|
146
147
|
virtual void sendDiagnostic(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
147
148
|
virtual jsi::Value getStoreCountry(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
149
|
+
virtual jsi::Value isBillingAvailable(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
148
150
|
virtual jsi::Value isForwardingEnable(jsi::Runtime &rt, jsi::String uuid, jsi::String externalRef) = 0;
|
|
149
151
|
virtual jsi::Value getCustomer(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
150
152
|
virtual jsi::Value getSDKVersion(jsi::Runtime &rt, jsi::String uuid) = 0;
|
|
@@ -178,7 +180,7 @@ private:
|
|
|
178
180
|
|
|
179
181
|
}
|
|
180
182
|
|
|
181
|
-
jsi::String instantiate(jsi::Runtime &rt, jsi::String appId, jsi::String apiKey,
|
|
183
|
+
jsi::String instantiate(jsi::Runtime &rt, jsi::String appId, jsi::String apiKey, jsi::String environment, std::optional<jsi::Object> options) override {
|
|
182
184
|
static_assert(
|
|
183
185
|
bridging::getParameterCount(&T::instantiate) == 5,
|
|
184
186
|
"Expected instantiate(...) to have 5 parameters");
|
|
@@ -282,13 +284,21 @@ private:
|
|
|
282
284
|
return bridging::callFromJs<jsi::Value>(
|
|
283
285
|
rt, &T::openManageSubscription, jsInvoker_, instance_, std::move(uuid));
|
|
284
286
|
}
|
|
285
|
-
jsi::Value
|
|
287
|
+
jsi::Value openRefundDialogForProduct(jsi::Runtime &rt, jsi::String uuid, jsi::String productId) override {
|
|
286
288
|
static_assert(
|
|
287
|
-
bridging::getParameterCount(&T::
|
|
288
|
-
"Expected
|
|
289
|
+
bridging::getParameterCount(&T::openRefundDialogForProduct) == 3,
|
|
290
|
+
"Expected openRefundDialogForProduct(...) to have 3 parameters");
|
|
289
291
|
|
|
290
292
|
return bridging::callFromJs<jsi::Value>(
|
|
291
|
-
rt, &T::
|
|
293
|
+
rt, &T::openRefundDialogForProduct, jsInvoker_, instance_, std::move(uuid), std::move(productId));
|
|
294
|
+
}
|
|
295
|
+
jsi::Value openRefundDialogForTransactionId(jsi::Runtime &rt, jsi::String uuid, jsi::String transactionId) override {
|
|
296
|
+
static_assert(
|
|
297
|
+
bridging::getParameterCount(&T::openRefundDialogForTransactionId) == 3,
|
|
298
|
+
"Expected openRefundDialogForTransactionId(...) to have 3 parameters");
|
|
299
|
+
|
|
300
|
+
return bridging::callFromJs<jsi::Value>(
|
|
301
|
+
rt, &T::openRefundDialogForTransactionId, jsInvoker_, instance_, std::move(uuid), std::move(transactionId));
|
|
292
302
|
}
|
|
293
303
|
jsi::Value purchaseProduct(jsi::Runtime &rt, jsi::String uuid, jsi::String productId, std::optional<jsi::Object> options) override {
|
|
294
304
|
static_assert(
|
|
@@ -314,6 +324,14 @@ private:
|
|
|
314
324
|
return bridging::callFromJs<jsi::Value>(
|
|
315
325
|
rt, &T::getStoreCountry, jsInvoker_, instance_, std::move(uuid));
|
|
316
326
|
}
|
|
327
|
+
jsi::Value isBillingAvailable(jsi::Runtime &rt, jsi::String uuid) override {
|
|
328
|
+
static_assert(
|
|
329
|
+
bridging::getParameterCount(&T::isBillingAvailable) == 2,
|
|
330
|
+
"Expected isBillingAvailable(...) to have 2 parameters");
|
|
331
|
+
|
|
332
|
+
return bridging::callFromJs<jsi::Value>(
|
|
333
|
+
rt, &T::isBillingAvailable, jsInvoker_, instance_, std::move(uuid));
|
|
334
|
+
}
|
|
317
335
|
jsi::Value isForwardingEnable(jsi::Runtime &rt, jsi::String uuid, jsi::String externalRef) override {
|
|
318
336
|
static_assert(
|
|
319
337
|
bridging::getParameterCount(&T::isForwardingEnable) == 3,
|
package/android/src/main/java/com/mobilyflowreactnativesdk/MobilyflowReactNativeSdkModule.kt
CHANGED
|
@@ -12,7 +12,7 @@ import com.mobilyflow.mobilypurchasesdk.Exceptions.MobilyPurchaseException
|
|
|
12
12
|
import com.mobilyflow.mobilypurchasesdk.Exceptions.MobilyTransferOwnershipException
|
|
13
13
|
import com.mobilyflow.mobilypurchasesdk.MobilyPurchaseSDK
|
|
14
14
|
import com.mobilyflow.mobilypurchasesdk.MobilyPurchaseSDKOptions
|
|
15
|
-
import com.mobilyflow.mobilypurchasesdk.Models.PurchaseOptions
|
|
15
|
+
import com.mobilyflow.mobilypurchasesdk.Models.Internal.PurchaseOptions
|
|
16
16
|
import java.util.UUID
|
|
17
17
|
import java.util.concurrent.Executors
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ class MobilyflowReactNativeSdkModule(reactContext: ReactApplicationContext) : Na
|
|
|
33
33
|
return NAME
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
override fun instantiate(appId: String, apiKey: String, environment:
|
|
36
|
+
override fun instantiate(appId: String, apiKey: String, environment: String, options: ReadableMap?): String {
|
|
37
37
|
val uuid = UUID.randomUUID().toString()
|
|
38
38
|
|
|
39
39
|
var realOptions: MobilyPurchaseSDKOptions? = null
|
|
@@ -45,7 +45,7 @@ class MobilyflowReactNativeSdkModule(reactContext: ReactApplicationContext) : Na
|
|
|
45
45
|
)
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
val realEnvironment = MobilyEnvironment.entries.find { x -> x.value == environment
|
|
48
|
+
val realEnvironment = MobilyEnvironment.entries.find { x -> x.value == environment }
|
|
49
49
|
val sdk = MobilyPurchaseSDK(reactApplicationContext, appId, apiKey, realEnvironment!!, realOptions)
|
|
50
50
|
_sdkInstances[uuid] = sdk
|
|
51
51
|
|
|
@@ -73,19 +73,13 @@ class MobilyflowReactNativeSdkModule(reactContext: ReactApplicationContext) : Na
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
override fun getProducts(uuid: String, identifiers: ReadableArray?, onlyAvailable: Boolean, promise: Promise) {
|
|
76
|
-
Log.d("MobilyFlow", "[getProduct] aaa")
|
|
77
76
|
val executor = Executors.newSingleThreadExecutor()
|
|
78
77
|
executor.execute {
|
|
79
|
-
Log.d("MobilyFlow", "[getProduct] bbb")
|
|
80
78
|
try {
|
|
81
79
|
val products = _sdkInstances[uuid]!!.getProducts(identifiers.toStringArray(), onlyAvailable)
|
|
82
|
-
Log.d("MobilyFlow", "[getProduct] ccc")
|
|
83
80
|
promise.resolve(products.toReadableArray())
|
|
84
|
-
Log.d("MobilyFlow", "[getProduct] ddd")
|
|
85
81
|
} catch (error: Exception) {
|
|
86
|
-
Log.d("MobilyFlow", "[getProduct] catch")
|
|
87
82
|
throwError(error, promise)
|
|
88
|
-
Log.d("MobilyFlow", "[getProduct] catch end")
|
|
89
83
|
}
|
|
90
84
|
}
|
|
91
85
|
}
|
|
@@ -186,7 +180,11 @@ class MobilyflowReactNativeSdkModule(reactContext: ReactApplicationContext) : Na
|
|
|
186
180
|
}
|
|
187
181
|
}
|
|
188
182
|
|
|
189
|
-
override fun
|
|
183
|
+
override fun openRefundDialogForProduct(uuid: String?, productId: String?, promise: Promise) {
|
|
184
|
+
promise.reject("-1", "Not implemented")
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
override fun openRefundDialogForTransactionId(uuid: String?, transactionId: String?, promise: Promise) {
|
|
190
188
|
promise.reject("-1", "Not implemented")
|
|
191
189
|
}
|
|
192
190
|
|
|
@@ -209,12 +207,10 @@ class MobilyflowReactNativeSdkModule(reactContext: ReactApplicationContext) : Na
|
|
|
209
207
|
}
|
|
210
208
|
|
|
211
209
|
if (offerId != null) {
|
|
212
|
-
if (product.
|
|
213
|
-
purchaseOptions.setOffer(product.
|
|
214
|
-
} else if (product.subscriptionProduct!!.freeTrial?.id == offerId) {
|
|
215
|
-
purchaseOptions.setOffer(product.subscriptionProduct!!.freeTrial)
|
|
210
|
+
if (product.subscription!!.freeTrial?.id == offerId) {
|
|
211
|
+
purchaseOptions.setOffer(product.subscription!!.freeTrial)
|
|
216
212
|
} else {
|
|
217
|
-
val offer = product.
|
|
213
|
+
val offer = product.subscription!!.promotionalOffers.find { x -> x.id == offerId }
|
|
218
214
|
if (offer != null) {
|
|
219
215
|
purchaseOptions.setOffer(offer)
|
|
220
216
|
}
|
|
@@ -222,7 +218,7 @@ class MobilyflowReactNativeSdkModule(reactContext: ReactApplicationContext) : Na
|
|
|
222
218
|
}
|
|
223
219
|
|
|
224
220
|
val status = sdk.purchaseProduct(reactApplicationContext.currentActivity!!, product, purchaseOptions)
|
|
225
|
-
promise.resolve(status.
|
|
221
|
+
promise.resolve(status.toReadableMap())
|
|
226
222
|
} catch (error: Exception) {
|
|
227
223
|
throwError(error, promise)
|
|
228
224
|
}
|
|
@@ -234,7 +230,27 @@ class MobilyflowReactNativeSdkModule(reactContext: ReactApplicationContext) : Na
|
|
|
234
230
|
}
|
|
235
231
|
|
|
236
232
|
override fun getStoreCountry(uuid: String, promise: Promise) {
|
|
237
|
-
|
|
233
|
+
val executor = Executors.newSingleThreadExecutor()
|
|
234
|
+
executor.execute {
|
|
235
|
+
try {
|
|
236
|
+
val result = _sdkInstances[uuid]!!.getStoreCountry()
|
|
237
|
+
promise.resolve(result)
|
|
238
|
+
} catch (error: Exception) {
|
|
239
|
+
throwError(error, promise)
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
override fun isBillingAvailable(uuid: String, promise: Promise) {
|
|
245
|
+
val executor = Executors.newSingleThreadExecutor()
|
|
246
|
+
executor.execute {
|
|
247
|
+
try {
|
|
248
|
+
val result = _sdkInstances[uuid]!!.isBillingAvailable()
|
|
249
|
+
promise.resolve(result)
|
|
250
|
+
} catch (error: Exception) {
|
|
251
|
+
throwError(error, promise)
|
|
252
|
+
}
|
|
253
|
+
}
|
|
238
254
|
}
|
|
239
255
|
|
|
240
256
|
override fun isForwardingEnable(uuid: String, externalRef: String, promise: Promise) {
|
|
@@ -31,11 +31,11 @@ RCT_EXPORT_MODULE()
|
|
|
31
31
|
return [_sdkInstances objectForKey:uuid];
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
- (NSString *)instantiate:(NSString *)appId apiKey:(NSString *)apiKey environment:(
|
|
34
|
+
- (NSString *)instantiate:(NSString *)appId apiKey:(NSString *)apiKey environment:(NSString *)environment options:(JS::NativeMobilyflowReactNativeSdk::MobilyPurchaseSDKOptions &)options {
|
|
35
35
|
|
|
36
36
|
NSString* uuid = [[NSUUID UUID] UUIDString];
|
|
37
37
|
|
|
38
|
-
MobilyPurchaseSDK *sdk = [[MobilyPurchaseSDK alloc] initWithAppId:appId apiKey:apiKey environment:
|
|
38
|
+
MobilyPurchaseSDK *sdk = [[MobilyPurchaseSDK alloc] initWithAppId:appId apiKey:apiKey environment:environment options:[ParserMobilyPurchaseSDKOptions parseFromJSI:options]];
|
|
39
39
|
[_sdkInstances setObject:sdk forKey:uuid];
|
|
40
40
|
|
|
41
41
|
return uuid;
|
|
@@ -107,7 +107,7 @@ RCT_EXPORT_MODULE()
|
|
|
107
107
|
|
|
108
108
|
- (void)getEntitlement:(NSString *)uuid productId:(NSString *)productId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
109
109
|
|
|
110
|
-
[[self getInstance:uuid] getEntitlementWithProductId:productId completionHandler:^(MobilyCustomerEntitlement * _Nullable entitlement, NSError * _Nullable error) {
|
|
110
|
+
[[self getInstance:uuid] getEntitlementWithProductId:[[NSUUID alloc] initWithUUIDString:productId] completionHandler:^(MobilyCustomerEntitlement * _Nullable entitlement, NSError * _Nullable error) {
|
|
111
111
|
if (error) {
|
|
112
112
|
reject([NSString stringWithFormat:@"%ld", error.code], error.description, error);
|
|
113
113
|
} else {
|
|
@@ -144,11 +144,11 @@ RCT_EXPORT_MODULE()
|
|
|
144
144
|
|
|
145
145
|
- (void)requestTransferOwnership:(NSString *)uuid resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
146
146
|
|
|
147
|
-
[[self getInstance:uuid] requestTransferOwnershipWithCompletionHandler:^(
|
|
147
|
+
[[self getInstance:uuid] requestTransferOwnershipWithCompletionHandler:^(NSString * _Nullable status, NSError * _Nullable error) {
|
|
148
148
|
if (error) {
|
|
149
149
|
reject([NSString stringWithFormat:@"%ld", error.code], error.description, error);
|
|
150
150
|
} else {
|
|
151
|
-
resolve(
|
|
151
|
+
resolve(status);
|
|
152
152
|
}
|
|
153
153
|
}];
|
|
154
154
|
}
|
|
@@ -160,14 +160,20 @@ RCT_EXPORT_MODULE()
|
|
|
160
160
|
}];
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
- (void)
|
|
164
|
-
MobilyProduct* product = [[self getInstance:uuid] getProductFromCacheWithIdWithId:productId];
|
|
163
|
+
- (void)openRefundDialogForProduct:(NSString *)uuid productId:(NSString *)productId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
164
|
+
MobilyProduct* product = [[self getInstance:uuid] getProductFromCacheWithIdWithId:[[NSUUID alloc] initWithUUIDString:productId]];
|
|
165
165
|
if (product == nil) {
|
|
166
166
|
reject(@"3", @"MobilyflowSDK.MobilyError.unknown_error", [NSError errorWithDomain:@"MobilyflowSDK.MobilyError" code:3 userInfo:nil]);
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
[[self getInstance:uuid]
|
|
170
|
+
[[self getInstance:uuid] openRefundDialogForProduct:product completionHandler:^(NSString * _Nullable result) {
|
|
171
|
+
resolve([NSNumber numberWithBool:result]);
|
|
172
|
+
}];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
- (void)openRefundDialogForTransactionId:(NSString *)uuid productId:(NSString *)transactionId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
176
|
+
[[self getInstance:uuid] openRefundDialogForTransactionId:transactionId completionHandler:^(NSString * _Nullable result) {
|
|
171
177
|
resolve([NSNumber numberWithBool:result]);
|
|
172
178
|
}];
|
|
173
179
|
}
|
|
@@ -176,13 +182,13 @@ RCT_EXPORT_MODULE()
|
|
|
176
182
|
|
|
177
183
|
MobilyPurchaseSDK* sdk = [self getInstance:uuid];
|
|
178
184
|
|
|
179
|
-
MobilyProduct* product = [[self getInstance:uuid] getProductFromCacheWithIdWithId:productId];
|
|
185
|
+
MobilyProduct* product = [[self getInstance:uuid] getProductFromCacheWithIdWithId:[[NSUUID alloc] initWithUUIDString:productId]];
|
|
180
186
|
if (product == nil) {
|
|
181
187
|
reject(@"1", @"MobilyflowSDK.MobilyPurchaseError.product_unavailable", [NSError errorWithDomain:@"MobilyflowSDK.MobilyPurchaseError" code:1 userInfo:nil]);
|
|
182
188
|
return;
|
|
183
189
|
}
|
|
184
190
|
|
|
185
|
-
|
|
191
|
+
NSUUID *offerId = [[NSUUID alloc] initWithUUIDString:options.offerId()];
|
|
186
192
|
int quantity = (int)options.quantity();
|
|
187
193
|
|
|
188
194
|
PurchaseOptions *purchaseOptions = [[PurchaseOptions alloc] init];
|
|
@@ -191,25 +197,23 @@ RCT_EXPORT_MODULE()
|
|
|
191
197
|
}
|
|
192
198
|
|
|
193
199
|
if (offerId != nil) {
|
|
194
|
-
if ([product.
|
|
195
|
-
purchaseOptions = [purchaseOptions setOffer:product.
|
|
196
|
-
} else if (product.subscriptionProduct.freeTrial != nil && [product.subscriptionProduct.freeTrial.id isEqualToString:offerId]) {
|
|
197
|
-
purchaseOptions = [purchaseOptions setOffer:product.subscriptionProduct.freeTrial];
|
|
200
|
+
if (product.subscription.freeTrial != nil && [product.subscription.freeTrial.id isEqual:offerId]) {
|
|
201
|
+
purchaseOptions = [purchaseOptions setOffer:product.subscription.freeTrial];
|
|
198
202
|
} else {
|
|
199
|
-
for (MobilySubscriptionOffer *off in product.
|
|
200
|
-
if ([off.id
|
|
203
|
+
for (MobilySubscriptionOffer *off in product.subscription.promotionalOffers) {
|
|
204
|
+
if ([off.id isEqual:offerId]) {
|
|
201
205
|
purchaseOptions = [purchaseOptions setOffer:off];
|
|
202
206
|
break;
|
|
203
207
|
}
|
|
204
208
|
}
|
|
205
209
|
}
|
|
206
210
|
}
|
|
207
|
-
|
|
208
|
-
[sdk purchaseProduct:product options:purchaseOptions completionHandler:^(
|
|
211
|
+
|
|
212
|
+
[sdk purchaseProduct:product options:purchaseOptions completionHandler:^(MobilyEvent * _Nullable event, NSError * _Nullable error) {
|
|
209
213
|
if (error) {
|
|
210
214
|
reject([NSString stringWithFormat:@"%ld", error.code], error.description, error);
|
|
211
215
|
} else {
|
|
212
|
-
resolve([
|
|
216
|
+
resolve([event toDictionary]);
|
|
213
217
|
}
|
|
214
218
|
}];
|
|
215
219
|
}
|
package/ios/generated/RNMobilyflowReactNativeSdkSpec/RNMobilyflowReactNativeSdkSpec-generated.mm
CHANGED
|
@@ -89,8 +89,12 @@ namespace facebook::react {
|
|
|
89
89
|
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "openManageSubscription", @selector(openManageSubscription:resolve:reject:), args, count);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
static facebook::jsi::Value
|
|
93
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "
|
|
92
|
+
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openRefundDialogForProduct(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
93
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "openRefundDialogForProduct", @selector(openRefundDialogForProduct:productId:resolve:reject:), args, count);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openRefundDialogForTransactionId(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
97
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "openRefundDialogForTransactionId", @selector(openRefundDialogForTransactionId:transactionId:resolve:reject:), args, count);
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_purchaseProduct(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
@@ -105,6 +109,10 @@ namespace facebook::react {
|
|
|
105
109
|
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getStoreCountry", @selector(getStoreCountry:resolve:reject:), args, count);
|
|
106
110
|
}
|
|
107
111
|
|
|
112
|
+
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_isBillingAvailable(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
113
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "isBillingAvailable", @selector(isBillingAvailable:resolve:reject:), args, count);
|
|
114
|
+
}
|
|
115
|
+
|
|
108
116
|
static facebook::jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_isForwardingEnable(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
109
117
|
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "isForwardingEnable", @selector(isForwardingEnable:externalRef:resolve:reject:), args, count);
|
|
110
118
|
}
|
|
@@ -159,7 +167,10 @@ namespace facebook::react {
|
|
|
159
167
|
methodMap_["openManageSubscription"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openManageSubscription};
|
|
160
168
|
|
|
161
169
|
|
|
162
|
-
methodMap_["
|
|
170
|
+
methodMap_["openRefundDialogForProduct"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openRefundDialogForProduct};
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
methodMap_["openRefundDialogForTransactionId"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_openRefundDialogForTransactionId};
|
|
163
174
|
|
|
164
175
|
|
|
165
176
|
methodMap_["purchaseProduct"] = MethodMetadata {3, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_purchaseProduct};
|
|
@@ -171,6 +182,9 @@ namespace facebook::react {
|
|
|
171
182
|
methodMap_["getStoreCountry"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_getStoreCountry};
|
|
172
183
|
|
|
173
184
|
|
|
185
|
+
methodMap_["isBillingAvailable"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_isBillingAvailable};
|
|
186
|
+
|
|
187
|
+
|
|
174
188
|
methodMap_["isForwardingEnable"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkSpecJSI_isForwardingEnable};
|
|
175
189
|
|
|
176
190
|
|
|
@@ -69,7 +69,7 @@ namespace JS {
|
|
|
69
69
|
|
|
70
70
|
- (NSString *)instantiate:(NSString *)appId
|
|
71
71
|
apiKey:(NSString *)apiKey
|
|
72
|
-
environment:(
|
|
72
|
+
environment:(NSString *)environment
|
|
73
73
|
options:(JS::NativeMobilyflowReactNativeSdk::MobilyPurchaseSDKOptions &)options;
|
|
74
74
|
- (void)close:(NSString *)uuid;
|
|
75
75
|
- (void)login:(NSString *)uuid
|
|
@@ -112,10 +112,14 @@ namespace JS {
|
|
|
112
112
|
- (void)openManageSubscription:(NSString *)uuid
|
|
113
113
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
114
114
|
reject:(RCTPromiseRejectBlock)reject;
|
|
115
|
-
- (void)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
- (void)openRefundDialogForProduct:(NSString *)uuid
|
|
116
|
+
productId:(NSString *)productId
|
|
117
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
118
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
119
|
+
- (void)openRefundDialogForTransactionId:(NSString *)uuid
|
|
120
|
+
transactionId:(NSString *)transactionId
|
|
121
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
122
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
119
123
|
- (void)purchaseProduct:(NSString *)uuid
|
|
120
124
|
productId:(NSString *)productId
|
|
121
125
|
options:(JS::NativeMobilyflowReactNativeSdk::PurchaseOptions &)options
|
|
@@ -125,6 +129,9 @@ namespace JS {
|
|
|
125
129
|
- (void)getStoreCountry:(NSString *)uuid
|
|
126
130
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
127
131
|
reject:(RCTPromiseRejectBlock)reject;
|
|
132
|
+
- (void)isBillingAvailable:(NSString *)uuid
|
|
133
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
134
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
128
135
|
- (void)isForwardingEnable:(NSString *)uuid
|
|
129
136
|
externalRef:(NSString *)externalRef
|
|
130
137
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
@@ -16,7 +16,7 @@ static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_instan
|
|
|
16
16
|
rt,
|
|
17
17
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
18
18
|
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
19
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].
|
|
19
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
20
20
|
count <= 3 || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asObject(rt))
|
|
21
21
|
);
|
|
22
22
|
}
|
|
@@ -103,8 +103,15 @@ static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openMa
|
|
|
103
103
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
|
-
static jsi::Value
|
|
107
|
-
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->
|
|
106
|
+
static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openRefundDialogForProduct(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
107
|
+
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->openRefundDialogForProduct(
|
|
108
|
+
rt,
|
|
109
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
110
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openRefundDialogForTransactionId(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
114
|
+
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->openRefundDialogForTransactionId(
|
|
108
115
|
rt,
|
|
109
116
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
110
117
|
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
@@ -131,6 +138,12 @@ static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getSto
|
|
|
131
138
|
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
132
139
|
);
|
|
133
140
|
}
|
|
141
|
+
static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_isBillingAvailable(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
142
|
+
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->isBillingAvailable(
|
|
143
|
+
rt,
|
|
144
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
134
147
|
static jsi::Value __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_isForwardingEnable(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
135
148
|
return static_cast<NativeMobilyflowReactNativeSdkCxxSpecJSI *>(&turboModule)->isForwardingEnable(
|
|
136
149
|
rt,
|
|
@@ -166,10 +179,12 @@ NativeMobilyflowReactNativeSdkCxxSpecJSI::NativeMobilyflowReactNativeSdkCxxSpecJ
|
|
|
166
179
|
methodMap_["getExternalEntitlements"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getExternalEntitlements};
|
|
167
180
|
methodMap_["requestTransferOwnership"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_requestTransferOwnership};
|
|
168
181
|
methodMap_["openManageSubscription"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openManageSubscription};
|
|
169
|
-
methodMap_["
|
|
182
|
+
methodMap_["openRefundDialogForProduct"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openRefundDialogForProduct};
|
|
183
|
+
methodMap_["openRefundDialogForTransactionId"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_openRefundDialogForTransactionId};
|
|
170
184
|
methodMap_["purchaseProduct"] = MethodMetadata {3, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_purchaseProduct};
|
|
171
185
|
methodMap_["sendDiagnostic"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_sendDiagnostic};
|
|
172
186
|
methodMap_["getStoreCountry"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getStoreCountry};
|
|
187
|
+
methodMap_["isBillingAvailable"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_isBillingAvailable};
|
|
173
188
|
methodMap_["isForwardingEnable"] = MethodMetadata {2, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_isForwardingEnable};
|
|
174
189
|
methodMap_["getCustomer"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getCustomer};
|
|
175
190
|
methodMap_["getSDKVersion"] = MethodMetadata {1, __hostFunction_NativeMobilyflowReactNativeSdkCxxSpecJSI_getSDKVersion};
|