@qonversion/react-native-sdk 10.0.0-RC1
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/README.md +129 -0
- package/android/build.gradle +92 -0
- package/android/gradle.properties +6 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/qonversion/reactnativesdk/EntitiesConverter.kt +135 -0
- package/android/src/main/java/com/qonversion/reactnativesdk/NoCodesModule.kt +76 -0
- package/android/src/main/java/com/qonversion/reactnativesdk/QonversionModule.kt +278 -0
- package/android/src/main/java/com/qonversion/reactnativesdk/QonversionPackage.kt +43 -0
- package/android/src/main/java/com/qonversion/reactnativesdk/Utils.kt +32 -0
- package/ios/RNNoCodes.h +5 -0
- package/ios/RNNoCodes.mm +61 -0
- package/ios/RNNoCodesImpl.swift +69 -0
- package/ios/RNQonversion.h +5 -0
- package/ios/RNQonversion.mm +189 -0
- package/ios/RNQonversionImpl.swift +250 -0
- package/ios/qonversion-react-native-sdk-Bridging-Header.h +6 -0
- package/lib/module/NoCodes.js +32 -0
- package/lib/module/NoCodes.js.map +1 -0
- package/lib/module/NoCodesApi.js +2 -0
- package/lib/module/NoCodesApi.js.map +1 -0
- package/lib/module/NoCodesConfig.js +10 -0
- package/lib/module/NoCodesConfig.js.map +1 -0
- package/lib/module/NoCodesConfigBuilder.js +35 -0
- package/lib/module/NoCodesConfigBuilder.js.map +1 -0
- package/lib/module/Qonversion.js +35 -0
- package/lib/module/Qonversion.js.map +1 -0
- package/lib/module/QonversionApi.js +4 -0
- package/lib/module/QonversionApi.js.map +1 -0
- package/lib/module/QonversionConfig.js +16 -0
- package/lib/module/QonversionConfig.js.map +1 -0
- package/lib/module/QonversionConfigBuilder.js +90 -0
- package/lib/module/QonversionConfigBuilder.js.map +1 -0
- package/lib/module/dto/Entitlement.js +24 -0
- package/lib/module/dto/Entitlement.js.map +1 -0
- package/lib/module/dto/EntitlementsUpdateListener.js +4 -0
- package/lib/module/dto/EntitlementsUpdateListener.js.map +1 -0
- package/lib/module/dto/Experiment.js +11 -0
- package/lib/module/dto/Experiment.js.map +1 -0
- package/lib/module/dto/ExperimentGroup.js +11 -0
- package/lib/module/dto/ExperimentGroup.js.map +1 -0
- package/lib/module/dto/IntroEligibility.js +9 -0
- package/lib/module/dto/IntroEligibility.js.map +1 -0
- package/lib/module/dto/NoCodesAction.js +11 -0
- package/lib/module/dto/NoCodesAction.js.map +1 -0
- package/lib/module/dto/NoCodesError.js +13 -0
- package/lib/module/dto/NoCodesError.js.map +1 -0
- package/lib/module/dto/NoCodesListener.js +4 -0
- package/lib/module/dto/NoCodesListener.js.map +1 -0
- package/lib/module/dto/Offering.js +14 -0
- package/lib/module/dto/Offering.js.map +1 -0
- package/lib/module/dto/Offerings.js +13 -0
- package/lib/module/dto/Offerings.js.map +1 -0
- package/lib/module/dto/Product.js +114 -0
- package/lib/module/dto/Product.js.map +1 -0
- package/lib/module/dto/PromoPurchasesListener.js +4 -0
- package/lib/module/dto/PromoPurchasesListener.js.map +1 -0
- package/lib/module/dto/PromotionalOffer.js +10 -0
- package/lib/module/dto/PromotionalOffer.js.map +1 -0
- package/lib/module/dto/PurchaseModel.js +26 -0
- package/lib/module/dto/PurchaseModel.js.map +1 -0
- package/lib/module/dto/PurchaseOptions.js +15 -0
- package/lib/module/dto/PurchaseOptions.js.map +1 -0
- package/lib/module/dto/PurchaseOptionsBuilder.js +117 -0
- package/lib/module/dto/PurchaseOptionsBuilder.js.map +1 -0
- package/lib/module/dto/PurchaseUpdateModel.js +32 -0
- package/lib/module/dto/PurchaseUpdateModel.js.map +1 -0
- package/lib/module/dto/QonversionError.js +15 -0
- package/lib/module/dto/QonversionError.js.map +1 -0
- package/lib/module/dto/RemoteConfig.js +11 -0
- package/lib/module/dto/RemoteConfig.js.map +1 -0
- package/lib/module/dto/RemoteConfigList.js +18 -0
- package/lib/module/dto/RemoteConfigList.js.map +1 -0
- package/lib/module/dto/RemoteConfigurationSource.js +13 -0
- package/lib/module/dto/RemoteConfigurationSource.js.map +1 -0
- package/lib/module/dto/ScreenPresentationConfig.js +22 -0
- package/lib/module/dto/ScreenPresentationConfig.js.map +1 -0
- package/lib/module/dto/SubscriptionPeriod.js +26 -0
- package/lib/module/dto/SubscriptionPeriod.js.map +1 -0
- package/lib/module/dto/Transaction.js +18 -0
- package/lib/module/dto/Transaction.js.map +1 -0
- package/lib/module/dto/User.js +10 -0
- package/lib/module/dto/User.js.map +1 -0
- package/lib/module/dto/UserProperties.js +71 -0
- package/lib/module/dto/UserProperties.js.map +1 -0
- package/lib/module/dto/UserProperty.js +17 -0
- package/lib/module/dto/UserProperty.js.map +1 -0
- package/lib/module/dto/enums.js +425 -0
- package/lib/module/dto/enums.js.map +1 -0
- package/lib/module/dto/storeProducts/ProductInAppDetails.js +16 -0
- package/lib/module/dto/storeProducts/ProductInAppDetails.js.map +1 -0
- package/lib/module/dto/storeProducts/ProductInstallmentPlanDetails.js +25 -0
- package/lib/module/dto/storeProducts/ProductInstallmentPlanDetails.js.map +1 -0
- package/lib/module/dto/storeProducts/ProductOfferDetails.js +76 -0
- package/lib/module/dto/storeProducts/ProductOfferDetails.js.map +1 -0
- package/lib/module/dto/storeProducts/ProductPrice.js +37 -0
- package/lib/module/dto/storeProducts/ProductPrice.js.map +1 -0
- package/lib/module/dto/storeProducts/ProductPricingPhase.js +52 -0
- package/lib/module/dto/storeProducts/ProductPricingPhase.js.map +1 -0
- package/lib/module/dto/storeProducts/ProductStoreDetails.js +114 -0
- package/lib/module/dto/storeProducts/ProductStoreDetails.js.map +1 -0
- package/lib/module/dto/storeProducts/SKPaymentDiscount.js +13 -0
- package/lib/module/dto/storeProducts/SKPaymentDiscount.js.map +1 -0
- package/lib/module/dto/storeProducts/SKProduct.js +22 -0
- package/lib/module/dto/storeProducts/SKProduct.js.map +1 -0
- package/lib/module/dto/storeProducts/SKProductDiscount.js +16 -0
- package/lib/module/dto/storeProducts/SKProductDiscount.js.map +1 -0
- package/lib/module/dto/storeProducts/SKSubscriptionPeriod.js +10 -0
- package/lib/module/dto/storeProducts/SKSubscriptionPeriod.js.map +1 -0
- package/lib/module/dto/storeProducts/SkuDetails.js +30 -0
- package/lib/module/dto/storeProducts/SkuDetails.js.map +1 -0
- package/lib/module/index.js +40 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal/Mapper.js +676 -0
- package/lib/module/internal/Mapper.js.map +1 -0
- package/lib/module/internal/NoCodesInternal.js +70 -0
- package/lib/module/internal/NoCodesInternal.js.map +1 -0
- package/lib/module/internal/QonversionInternal.js +237 -0
- package/lib/module/internal/QonversionInternal.js.map +1 -0
- package/lib/module/internal/specs/NativeNoCodesModule.js +5 -0
- package/lib/module/internal/specs/NativeNoCodesModule.js.map +1 -0
- package/lib/module/internal/specs/NativeQonversionModule.js +5 -0
- package/lib/module/internal/specs/NativeQonversionModule.js.map +1 -0
- package/lib/module/internal/utils.js +10 -0
- package/lib/module/internal/utils.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NoCodes.d.ts +23 -0
- package/lib/typescript/src/NoCodes.d.ts.map +1 -0
- package/lib/typescript/src/NoCodesApi.d.ts +20 -0
- package/lib/typescript/src/NoCodesApi.d.ts.map +1 -0
- package/lib/typescript/src/NoCodesConfig.d.ts +8 -0
- package/lib/typescript/src/NoCodesConfig.d.ts.map +1 -0
- package/lib/typescript/src/NoCodesConfigBuilder.d.ts +26 -0
- package/lib/typescript/src/NoCodesConfigBuilder.d.ts.map +1 -0
- package/lib/typescript/src/Qonversion.d.ts +26 -0
- package/lib/typescript/src/Qonversion.d.ts.map +1 -0
- package/lib/typescript/src/QonversionApi.d.ts +285 -0
- package/lib/typescript/src/QonversionApi.d.ts.map +1 -0
- package/lib/typescript/src/QonversionConfig.d.ts +14 -0
- package/lib/typescript/src/QonversionConfig.d.ts.map +1 -0
- package/lib/typescript/src/QonversionConfigBuilder.d.ts +65 -0
- package/lib/typescript/src/QonversionConfigBuilder.d.ts.map +1 -0
- package/lib/typescript/src/dto/Entitlement.d.ts +22 -0
- package/lib/typescript/src/dto/Entitlement.d.ts.map +1 -0
- package/lib/typescript/src/dto/EntitlementsUpdateListener.d.ts +10 -0
- package/lib/typescript/src/dto/EntitlementsUpdateListener.d.ts.map +1 -0
- package/lib/typescript/src/dto/Experiment.d.ts +9 -0
- package/lib/typescript/src/dto/Experiment.d.ts.map +1 -0
- package/lib/typescript/src/dto/ExperimentGroup.d.ts +9 -0
- package/lib/typescript/src/dto/ExperimentGroup.d.ts.map +1 -0
- package/lib/typescript/src/dto/IntroEligibility.d.ts +7 -0
- package/lib/typescript/src/dto/IntroEligibility.d.ts.map +1 -0
- package/lib/typescript/src/dto/NoCodesAction.d.ts +10 -0
- package/lib/typescript/src/dto/NoCodesAction.d.ts.map +1 -0
- package/lib/typescript/src/dto/NoCodesError.d.ts +12 -0
- package/lib/typescript/src/dto/NoCodesError.d.ts.map +1 -0
- package/lib/typescript/src/dto/NoCodesListener.d.ts +34 -0
- package/lib/typescript/src/dto/NoCodesListener.d.ts.map +1 -0
- package/lib/typescript/src/dto/Offering.d.ts +11 -0
- package/lib/typescript/src/dto/Offering.d.ts.map +1 -0
- package/lib/typescript/src/dto/Offerings.d.ts +9 -0
- package/lib/typescript/src/dto/Offerings.d.ts.map +1 -0
- package/lib/typescript/src/dto/Product.d.ts +95 -0
- package/lib/typescript/src/dto/Product.d.ts.map +1 -0
- package/lib/typescript/src/dto/PromoPurchasesListener.d.ts +12 -0
- package/lib/typescript/src/dto/PromoPurchasesListener.d.ts.map +1 -0
- package/lib/typescript/src/dto/PromotionalOffer.d.ts +9 -0
- package/lib/typescript/src/dto/PromotionalOffer.d.ts.map +1 -0
- package/lib/typescript/src/dto/PurchaseModel.d.ts +19 -0
- package/lib/typescript/src/dto/PurchaseModel.d.ts.map +1 -0
- package/lib/typescript/src/dto/PurchaseOptions.d.ts +15 -0
- package/lib/typescript/src/dto/PurchaseOptions.d.ts.map +1 -0
- package/lib/typescript/src/dto/PurchaseOptionsBuilder.d.ts +84 -0
- package/lib/typescript/src/dto/PurchaseOptionsBuilder.d.ts.map +1 -0
- package/lib/typescript/src/dto/PurchaseUpdateModel.d.ts +25 -0
- package/lib/typescript/src/dto/PurchaseUpdateModel.d.ts.map +1 -0
- package/lib/typescript/src/dto/QonversionError.d.ts +11 -0
- package/lib/typescript/src/dto/QonversionError.d.ts.map +1 -0
- package/lib/typescript/src/dto/RemoteConfig.d.ts +10 -0
- package/lib/typescript/src/dto/RemoteConfig.d.ts.map +1 -0
- package/lib/typescript/src/dto/RemoteConfigList.d.ts +10 -0
- package/lib/typescript/src/dto/RemoteConfigList.d.ts.map +1 -0
- package/lib/typescript/src/dto/RemoteConfigurationSource.d.ts +11 -0
- package/lib/typescript/src/dto/RemoteConfigurationSource.d.ts.map +1 -0
- package/lib/typescript/src/dto/ScreenPresentationConfig.d.ts +18 -0
- package/lib/typescript/src/dto/ScreenPresentationConfig.d.ts.map +1 -0
- package/lib/typescript/src/dto/SubscriptionPeriod.d.ts +21 -0
- package/lib/typescript/src/dto/SubscriptionPeriod.d.ts.map +1 -0
- package/lib/typescript/src/dto/Transaction.d.ts +16 -0
- package/lib/typescript/src/dto/Transaction.d.ts.map +1 -0
- package/lib/typescript/src/dto/User.d.ts +7 -0
- package/lib/typescript/src/dto/User.d.ts.map +1 -0
- package/lib/typescript/src/dto/UserProperties.d.ts +49 -0
- package/lib/typescript/src/dto/UserProperties.d.ts.map +1 -0
- package/lib/typescript/src/dto/UserProperty.d.ts +13 -0
- package/lib/typescript/src/dto/UserProperty.d.ts.map +1 -0
- package/lib/typescript/src/dto/enums.d.ts +343 -0
- package/lib/typescript/src/dto/enums.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/ProductInAppDetails.d.ts +13 -0
- package/lib/typescript/src/dto/storeProducts/ProductInAppDetails.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/ProductInstallmentPlanDetails.d.ts +20 -0
- package/lib/typescript/src/dto/storeProducts/ProductInstallmentPlanDetails.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/ProductOfferDetails.d.ts +63 -0
- package/lib/typescript/src/dto/storeProducts/ProductOfferDetails.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/ProductPrice.d.ts +29 -0
- package/lib/typescript/src/dto/storeProducts/ProductPrice.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/ProductPricingPhase.d.ts +44 -0
- package/lib/typescript/src/dto/storeProducts/ProductPricingPhase.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/ProductStoreDetails.d.ts +97 -0
- package/lib/typescript/src/dto/storeProducts/ProductStoreDetails.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/SKPaymentDiscount.d.ts +10 -0
- package/lib/typescript/src/dto/storeProducts/SKPaymentDiscount.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/SKProduct.d.ts +21 -0
- package/lib/typescript/src/dto/storeProducts/SKProduct.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/SKProductDiscount.d.ts +15 -0
- package/lib/typescript/src/dto/storeProducts/SKProductDiscount.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/SKSubscriptionPeriod.d.ts +8 -0
- package/lib/typescript/src/dto/storeProducts/SKSubscriptionPeriod.d.ts.map +1 -0
- package/lib/typescript/src/dto/storeProducts/SkuDetails.d.ts +27 -0
- package/lib/typescript/src/dto/storeProducts/SkuDetails.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +41 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/internal/Mapper.d.ts +312 -0
- package/lib/typescript/src/internal/Mapper.d.ts.map +1 -0
- package/lib/typescript/src/internal/NoCodesInternal.d.ts +14 -0
- package/lib/typescript/src/internal/NoCodesInternal.d.ts.map +1 -0
- package/lib/typescript/src/internal/QonversionInternal.d.ts +60 -0
- package/lib/typescript/src/internal/QonversionInternal.d.ts.map +1 -0
- package/lib/typescript/src/internal/specs/NativeNoCodesModule.d.ts +17 -0
- package/lib/typescript/src/internal/specs/NativeNoCodesModule.d.ts.map +1 -0
- package/lib/typescript/src/internal/specs/NativeQonversionModule.d.ts +56 -0
- package/lib/typescript/src/internal/specs/NativeQonversionModule.d.ts.map +1 -0
- package/lib/typescript/src/internal/utils.d.ts +3 -0
- package/lib/typescript/src/internal/utils.d.ts.map +1 -0
- package/package.json +151 -0
- package/qonversion-react-native-sdk.podspec +21 -0
- package/src/NoCodes.ts +37 -0
- package/src/NoCodesApi.ts +22 -0
- package/src/NoCodesConfig.ts +16 -0
- package/src/NoCodesConfigBuilder.ts +40 -0
- package/src/Qonversion.ts +40 -0
- package/src/QonversionApi.ts +318 -0
- package/src/QonversionConfig.ts +32 -0
- package/src/QonversionConfigBuilder.ts +102 -0
- package/src/dto/Entitlement.ts +57 -0
- package/src/dto/EntitlementsUpdateListener.ts +11 -0
- package/src/dto/Experiment.ts +15 -0
- package/src/dto/ExperimentGroup.ts +15 -0
- package/src/dto/IntroEligibility.ts +11 -0
- package/src/dto/NoCodesAction.ts +21 -0
- package/src/dto/NoCodesError.ts +26 -0
- package/src/dto/NoCodesListener.ts +39 -0
- package/src/dto/Offering.ts +20 -0
- package/src/dto/Offerings.ts +17 -0
- package/src/dto/Product.ts +159 -0
- package/src/dto/PromoPurchasesListener.ts +13 -0
- package/src/dto/PromotionalOffer.ts +17 -0
- package/src/dto/PurchaseModel.ts +29 -0
- package/src/dto/PurchaseOptions.ts +33 -0
- package/src/dto/PurchaseOptionsBuilder.ts +127 -0
- package/src/dto/PurchaseUpdateModel.ts +43 -0
- package/src/dto/QonversionError.ts +24 -0
- package/src/dto/RemoteConfig.ts +16 -0
- package/src/dto/RemoteConfigList.ts +23 -0
- package/src/dto/RemoteConfigurationSource.ts +26 -0
- package/src/dto/ScreenPresentationConfig.ts +24 -0
- package/src/dto/SubscriptionPeriod.ts +33 -0
- package/src/dto/Transaction.ts +40 -0
- package/src/dto/User.ts +11 -0
- package/src/dto/UserProperties.ts +78 -0
- package/src/dto/UserProperty.ts +21 -0
- package/src/dto/enums.ts +389 -0
- package/src/dto/storeProducts/ProductInAppDetails.ts +17 -0
- package/src/dto/storeProducts/ProductInstallmentPlanDetails.ts +28 -0
- package/src/dto/storeProducts/ProductOfferDetails.ts +102 -0
- package/src/dto/storeProducts/ProductPrice.ts +46 -0
- package/src/dto/storeProducts/ProductPricingPhase.ts +71 -0
- package/src/dto/storeProducts/ProductStoreDetails.ts +151 -0
- package/src/dto/storeProducts/SKPaymentDiscount.ts +23 -0
- package/src/dto/storeProducts/SKProduct.ts +53 -0
- package/src/dto/storeProducts/SKProductDiscount.ts +38 -0
- package/src/dto/storeProducts/SKSubscriptionPeriod.ts +13 -0
- package/src/dto/storeProducts/SkuDetails.ts +68 -0
- package/src/index.ts +43 -0
- package/src/internal/Mapper.ts +1221 -0
- package/src/internal/NoCodesInternal.ts +84 -0
- package/src/internal/QonversionInternal.ts +370 -0
- package/src/internal/specs/NativeNoCodesModule.ts +20 -0
- package/src/internal/specs/NativeQonversionModule.ts +74 -0
- package/src/internal/utils.ts +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["dto/NoCodesListener.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class Offering {
|
|
4
|
+
constructor(id, tag, products) {
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.tag = tag;
|
|
7
|
+
this.products = products;
|
|
8
|
+
}
|
|
9
|
+
productForIdentifier(identifier) {
|
|
10
|
+
return this.products.find(object => object.qonversionId === identifier);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export default Offering;
|
|
14
|
+
//# sourceMappingURL=Offering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Offering","constructor","id","tag","products","productForIdentifier","identifier","find","object","qonversionId"],"sourceRoot":"../../../src","sources":["dto/Offering.ts"],"mappings":";;AAGA,MAAMA,QAAQ,CAAC;EAKbC,WAAWA,CAACC,EAAU,EAAEC,GAAiB,EAAEC,QAAmB,EAAE;IAC9D,IAAI,CAACF,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,QAAQ,GAAGA,QAAQ;EAC1B;EAEAC,oBAAoBA,CAACC,UAAkB,EAAuB;IAC5D,OAAO,IAAI,CAACF,QAAQ,CAACG,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACC,YAAY,KAAKH,UAAU,CAAC;EAC3E;AACF;AAEA,eAAeN,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class Offerings {
|
|
4
|
+
constructor(main, availableOfferings) {
|
|
5
|
+
this.main = main;
|
|
6
|
+
this.availableOffering = availableOfferings;
|
|
7
|
+
}
|
|
8
|
+
offeringForIdentifier(identifier) {
|
|
9
|
+
return this.availableOffering.find(object => object.id === identifier);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export default Offerings;
|
|
13
|
+
//# sourceMappingURL=Offerings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Offerings","constructor","main","availableOfferings","availableOffering","offeringForIdentifier","identifier","find","object","id"],"sourceRoot":"../../../src","sources":["dto/Offerings.ts"],"mappings":";;AAEA,MAAMA,SAAS,CAAC;EAIdC,WAAWA,CAACC,IAAqB,EAAEC,kBAAmC,EAAE;IACtE,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACE,iBAAiB,GAAGD,kBAAkB;EAC7C;EAEAE,qBAAqBA,CAACC,UAAkB,EAAwB;IAC9D,OAAO,IAAI,CAACF,iBAAiB,CAACG,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACC,EAAE,KAAKH,UAAU,CAAC;EAC1E;AACF;AAEA,eAAeN,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import PurchaseModel from "./PurchaseModel.js";
|
|
4
|
+
import PurchaseUpdateModel from "./PurchaseUpdateModel.js";
|
|
5
|
+
class Product {
|
|
6
|
+
/**
|
|
7
|
+
* Identifier of the base plan for Google product.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Google Play Store details of this product.
|
|
12
|
+
* Android only. Null for iOS, or if the product was not found.
|
|
13
|
+
* Doesn't take into account {@link basePlanId}.
|
|
14
|
+
* @deprecated Consider using {@link storeDetails} instead.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Google Play Store details of this product.
|
|
19
|
+
* Android only. Null for iOS, or if the product was not found.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* App store details of this product.
|
|
24
|
+
* iOS only. Null for Android, or if the product was not found.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* For Android - the subscription base plan duration. If the {@link basePlanId} is not specified,
|
|
29
|
+
* the duration is calculated using the deprecated {@link skuDetails}.
|
|
30
|
+
* For iOS - the duration of the {@link skProduct}.
|
|
31
|
+
* Null, if it's not a subscription product or the product was not found in the store.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The subscription trial duration of the default offer for Android or of the product for iOS.
|
|
36
|
+
* See {@link ProductStoreDetails.defaultSubscriptionOfferDetails} for the information on how we
|
|
37
|
+
* choose the default offer for Android.
|
|
38
|
+
* Null, if it's not a subscription product or the product was not found the store.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The calculated type of this product based on the store information.
|
|
43
|
+
* On Android uses deprecated {@link skuDetails} for the old subscription products
|
|
44
|
+
* where {@link basePlanId} is not specified, and {@link storeDetails} for all the other products.
|
|
45
|
+
* On iOS uses {@link skProduct} information.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Formatted price of for this product, including the currency sign.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
constructor(qonversionId, storeId, basePlanId, skuDetails, storeDetails, skProduct, offeringId, subscriptionPeriod, trialPeriod, type, prettyPrice, price, currencyCode, storeTitle, storeDescription, prettyIntroductoryPrice) {
|
|
53
|
+
this.qonversionId = qonversionId;
|
|
54
|
+
this.storeId = storeId;
|
|
55
|
+
this.basePlanId = basePlanId;
|
|
56
|
+
this.skuDetails = skuDetails;
|
|
57
|
+
this.storeDetails = storeDetails;
|
|
58
|
+
this.skProduct = skProduct;
|
|
59
|
+
this.offeringId = offeringId;
|
|
60
|
+
this.subscriptionPeriod = subscriptionPeriod;
|
|
61
|
+
this.trialPeriod = trialPeriod;
|
|
62
|
+
this.type = type;
|
|
63
|
+
this.prettyPrice = prettyPrice;
|
|
64
|
+
this.price = price;
|
|
65
|
+
this.currencyCode = currencyCode;
|
|
66
|
+
this.storeTitle = storeTitle;
|
|
67
|
+
this.storeDescription = storeDescription;
|
|
68
|
+
this.prettyIntroductoryPrice = prettyIntroductoryPrice;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Converts this product to purchase model to pass to {@link Qonversion.purchase}.
|
|
73
|
+
* @param offerId concrete Android offer identifier if necessary.
|
|
74
|
+
* If the products' base plan id is specified, but offer id is not provided for
|
|
75
|
+
* purchase, then default offer will be used.
|
|
76
|
+
* Ignored if base plan id is not specified.
|
|
77
|
+
* Ignored for iOS.
|
|
78
|
+
* To know how we choose the default offer, see {@link ProductStoreDetails.defaultSubscriptionOfferDetails}.
|
|
79
|
+
* @returns purchase model to pass to the purchase method.
|
|
80
|
+
*/
|
|
81
|
+
toPurchaseModel(offerId = null) {
|
|
82
|
+
return new PurchaseModel(this.qonversionId, offerId);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Converts this product to purchase model to pass to {@link Qonversion.purchase}.
|
|
87
|
+
* @param offer concrete Android offer which you'd like to purchase.
|
|
88
|
+
* @return purchase model to pass to the purchase method.
|
|
89
|
+
*/
|
|
90
|
+
toPurchaseModelWithOffer(offer) {
|
|
91
|
+
const model = this.toPurchaseModel(offer.offerId);
|
|
92
|
+
// Remove offer for the case when provided offer details are for bare base plan.
|
|
93
|
+
if (offer.offerId == null) {
|
|
94
|
+
model.removeOffer();
|
|
95
|
+
}
|
|
96
|
+
return model;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Android only.
|
|
101
|
+
*
|
|
102
|
+
* Converts this product to purchase update (upgrade/downgrade) model
|
|
103
|
+
* to pass to {@link Qonversion.updatePurchase}.
|
|
104
|
+
* @param oldProductId Qonversion product identifier from which the upgrade/downgrade
|
|
105
|
+
* will be initialized.
|
|
106
|
+
* @param updatePolicy purchase update policy.
|
|
107
|
+
* @return purchase model to pass to the update purchase method.
|
|
108
|
+
*/
|
|
109
|
+
toPurchaseUpdateModel(oldProductId, updatePolicy = null) {
|
|
110
|
+
return new PurchaseUpdateModel(this.qonversionId, oldProductId, updatePolicy);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
export default Product;
|
|
114
|
+
//# sourceMappingURL=Product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PurchaseModel","PurchaseUpdateModel","Product","constructor","qonversionId","storeId","basePlanId","skuDetails","storeDetails","skProduct","offeringId","subscriptionPeriod","trialPeriod","type","prettyPrice","price","currencyCode","storeTitle","storeDescription","prettyIntroductoryPrice","toPurchaseModel","offerId","toPurchaseModelWithOffer","offer","model","removeOffer","toPurchaseUpdateModel","oldProductId","updatePolicy"],"sourceRoot":"../../../src","sources":["dto/Product.ts"],"mappings":";;AAKA,OAAOA,aAAa,MAAM,oBAAiB;AAC3C,OAAOC,mBAAmB,MAAM,0BAAuB;AAGvD,MAAMC,OAAO,CAAC;EAIZ;AACF;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;;EAGE;AACF;AACA;AACA;;EAKE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;;EASEC,WAAWA,CACTC,YAAoB,EACpBC,OAAe,EACfC,UAAyB,EACzBC,UAA6B,EAC7BC,YAAwC,EACxCC,SAA2B,EAC3BC,UAAyB,EACzBC,kBAA6C,EAC7CC,WAAsC,EACtCC,IAAiB,EACjBC,WAA0B,EAC1BC,KAAyB,EACzBC,YAAgC,EAChCC,UAA8B,EAC9BC,gBAAoC,EACpCC,uBAA2C,EAC3C;IACA,IAAI,CAACf,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,kBAAkB,GAAGA,kBAAkB;IAC5C,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;IACxC,IAAI,CAACC,uBAAuB,GAAGA,uBAAuB;EACxD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,eAAeA,CAACC,OAAsB,GAAG,IAAI,EAAiB;IAC5D,OAAO,IAAIrB,aAAa,CAAC,IAAI,CAACI,YAAY,EAAEiB,OAAO,CAAC;EACtD;;EAEA;AACF;AACA;AACA;AACA;EACEC,wBAAwBA,CAACC,KAA0B,EAAiB;IAClE,MAAMC,KAAK,GAAG,IAAI,CAACJ,eAAe,CAACG,KAAK,CAACF,OAAO,CAAC;IACjD;IACA,IAAIE,KAAK,CAACF,OAAO,IAAI,IAAI,EAAE;MACzBG,KAAK,CAACC,WAAW,CAAC,CAAC;IACrB;IAEA,OAAOD,KAAK;EACd;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,qBAAqBA,CACnBC,YAAoB,EACpBC,YAAyC,GAAG,IAAI,EAC3B;IACrB,OAAO,IAAI3B,mBAAmB,CAAC,IAAI,CAACG,YAAY,EAAEuB,YAAY,EAAEC,YAAY,CAAC;EAC/E;AACF;AAEA,eAAe1B,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["dto/PromoPurchasesListener.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class PromotionalOffer {
|
|
4
|
+
constructor(productDiscount, paymentDiscount) {
|
|
5
|
+
this.productDiscount = productDiscount;
|
|
6
|
+
this.paymentDiscount = paymentDiscount;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export default PromotionalOffer;
|
|
10
|
+
//# sourceMappingURL=PromotionalOffer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PromotionalOffer","constructor","productDiscount","paymentDiscount"],"sourceRoot":"../../../src","sources":["dto/PromotionalOffer.ts"],"mappings":";;AAGA,MAAMA,gBAAgB,CAAC;EAInBC,WAAWA,CACPC,eAAkC,EAClCC,eAAkC,EACpC;IACE,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,eAAe,GAAGA,eAAe;EAC1C;AACJ;AAEA,eAAeH,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Used to provide all the necessary purchase data to the {@link Qonversion.purchase} method.
|
|
5
|
+
* Can be created manually or using the {@link Product.toPurchaseModel} method.
|
|
6
|
+
*
|
|
7
|
+
* If {@link offerId} is not specified for Android, then the default offer will be applied.
|
|
8
|
+
* To know how we choose the default offer, see {@link ProductStoreDetails.defaultSubscriptionOfferDetails}.
|
|
9
|
+
*
|
|
10
|
+
* If you want to remove any intro/trial offer from the purchase on Android (use only a bare base plan),
|
|
11
|
+
* call the {@link removeOffer} method.
|
|
12
|
+
*/
|
|
13
|
+
class PurchaseModel {
|
|
14
|
+
offerId = null;
|
|
15
|
+
applyOffer = true;
|
|
16
|
+
constructor(productId, offerId = null) {
|
|
17
|
+
this.productId = productId;
|
|
18
|
+
this.offerId = offerId;
|
|
19
|
+
}
|
|
20
|
+
removeOffer() {
|
|
21
|
+
this.applyOffer = false;
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export default PurchaseModel;
|
|
26
|
+
//# sourceMappingURL=PurchaseModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PurchaseModel","offerId","applyOffer","constructor","productId","removeOffer"],"sourceRoot":"../../../src","sources":["dto/PurchaseModel.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,aAAa,CAAC;EAGXC,OAAO,GAAkB,IAAI;EAE7BC,UAAU,GAAY,IAAI;EAEjCC,WAAWA,CAACC,SAAiB,EAAEH,OAAsB,GAAG,IAAI,EAAE;IAC5D,IAAI,CAACG,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACH,OAAO,GAAGA,OAAO;EACxB;EAEAI,WAAWA,CAAA,EAAkB;IAC3B,IAAI,CAACH,UAAU,GAAG,KAAK;IACvB,OAAO,IAAI;EACb;AACF;AAEA,eAAeF,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class PurchaseOptions {
|
|
4
|
+
constructor(offerId, applyOffer, oldProduct, updatePolicy, contextKeys, quantity, promotionalOffer) {
|
|
5
|
+
this.offerId = offerId;
|
|
6
|
+
this.applyOffer = applyOffer;
|
|
7
|
+
this.oldProduct = oldProduct;
|
|
8
|
+
this.updatePolicy = updatePolicy;
|
|
9
|
+
this.contextKeys = contextKeys;
|
|
10
|
+
this.quantity = quantity;
|
|
11
|
+
this.promotionalOffer = promotionalOffer;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export default PurchaseOptions;
|
|
15
|
+
//# sourceMappingURL=PurchaseOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PurchaseOptions","constructor","offerId","applyOffer","oldProduct","updatePolicy","contextKeys","quantity","promotionalOffer"],"sourceRoot":"../../../src","sources":["dto/PurchaseOptions.ts"],"mappings":";;AAIA,MAAMA,eAAe,CAAC;EASlBC,WAAWA,CACPC,OAAsB,EACtBC,UAAmB,EACnBC,UAA0B,EAC1BC,YAAyC,EACzCC,WAA4B,EAC5BC,QAAgB,EAChBC,gBAAyC,EAC3C;IACE,IAAI,CAACN,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;EAC5C;AACJ;AAEA,eAAeR,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import PurchaseOptions from "./PurchaseOptions.js";
|
|
4
|
+
class PurchaseOptionsBuilder {
|
|
5
|
+
offerId = null;
|
|
6
|
+
applyOffer = true;
|
|
7
|
+
oldProduct = null;
|
|
8
|
+
updatePolicy = null;
|
|
9
|
+
contextKeys = null;
|
|
10
|
+
quantity = 1;
|
|
11
|
+
promoOffer = null;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* iOS only.
|
|
15
|
+
* Set quantity of product purchasing. Use for consumable in-app products.
|
|
16
|
+
* @param quantity of product purchasing.
|
|
17
|
+
* @return builder instance for chain calls.
|
|
18
|
+
*/
|
|
19
|
+
setQuantity(quantity) {
|
|
20
|
+
this.quantity = quantity;
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Android only.
|
|
26
|
+
* Set offer for the purchase.
|
|
27
|
+
* If offer is not specified, then the default offer will be applied. To know how we choose
|
|
28
|
+
* the default offer, see {@link ProductStoreDetails.defaultSubscriptionOfferDetails}.
|
|
29
|
+
* @param offer concrete offer which you'd like to purchase.
|
|
30
|
+
* @return builder instance for chain calls.
|
|
31
|
+
*/
|
|
32
|
+
setOffer(offer) {
|
|
33
|
+
this.offerId = offer.offerId;
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Android only.
|
|
39
|
+
* Set the offer Id to the purchase.
|
|
40
|
+
* If {@link offerId} is not specified, then the default offer will be applied. To know how we choose
|
|
41
|
+
* the default offer, see {@link ProductStoreDetails.defaultSubscriptionOfferDetails}.
|
|
42
|
+
* @param offerId concrete offer Id which you'd like to purchase.
|
|
43
|
+
* @return builder instance for chain calls.
|
|
44
|
+
*/
|
|
45
|
+
setOfferId(offerId) {
|
|
46
|
+
this.offerId = offerId;
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Android only.
|
|
52
|
+
* Call this function to remove any intro/trial offer from the purchase (use only a bare base plan).
|
|
53
|
+
* @return builder instance for chain calls.
|
|
54
|
+
*/
|
|
55
|
+
removeOffer() {
|
|
56
|
+
this.applyOffer = false;
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Android only.
|
|
62
|
+
* Set Qonversion product from which the upgrade/downgrade will be initialized.
|
|
63
|
+
*
|
|
64
|
+
* @param oldProduct Qonversion product from which the upgrade/downgrade
|
|
65
|
+
* will be initialized.
|
|
66
|
+
* @return builder instance for chain calls.
|
|
67
|
+
*/
|
|
68
|
+
setOldProduct(oldProduct) {
|
|
69
|
+
this.oldProduct = oldProduct;
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Android only.
|
|
75
|
+
* Set the update policy for the purchase.
|
|
76
|
+
* If the {@link updatePolicy} is not provided, then default one
|
|
77
|
+
* will be selected - {@link PurchaseUpdatePolicy.WITH_TIME_PRORATION}.
|
|
78
|
+
* @param updatePolicy update policy for the purchase.
|
|
79
|
+
* @return builder instance for chain calls.
|
|
80
|
+
*/
|
|
81
|
+
setUpdatePolicy(updatePolicy) {
|
|
82
|
+
this.updatePolicy = updatePolicy;
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Set the context keys associated with a purchase.
|
|
88
|
+
*
|
|
89
|
+
* @param contextKeys context keys for the purchase.
|
|
90
|
+
* @return builder instance for chain calls.
|
|
91
|
+
*/
|
|
92
|
+
setContextKeys(contextKeys) {
|
|
93
|
+
this.contextKeys = contextKeys;
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Set the promotional offer details.
|
|
99
|
+
*
|
|
100
|
+
* @param promoOffer promotional offer details.
|
|
101
|
+
* @return builder instance for chain calls.
|
|
102
|
+
*/
|
|
103
|
+
setPromotionalOffer(promoOffer) {
|
|
104
|
+
this.promoOffer = promoOffer;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Generate {@link PurchaseOptions} instance with all the provided options.
|
|
110
|
+
* @return the complete {@link PurchaseOptions} instance.
|
|
111
|
+
*/
|
|
112
|
+
build() {
|
|
113
|
+
return new PurchaseOptions(this.offerId, this.applyOffer, this.oldProduct, this.updatePolicy, this.contextKeys, this.quantity, this.promoOffer);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export default PurchaseOptionsBuilder;
|
|
117
|
+
//# sourceMappingURL=PurchaseOptionsBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PurchaseOptions","PurchaseOptionsBuilder","offerId","applyOffer","oldProduct","updatePolicy","contextKeys","quantity","promoOffer","setQuantity","setOffer","offer","setOfferId","removeOffer","setOldProduct","setUpdatePolicy","setContextKeys","setPromotionalOffer","build"],"sourceRoot":"../../../src","sources":["dto/PurchaseOptionsBuilder.ts"],"mappings":";;AAGA,OAAOA,eAAe,MAAM,sBAAmB;AAG/C,MAAMC,sBAAsB,CAAC;EACjBC,OAAO,GAAkB,IAAI;EAC7BC,UAAU,GAAY,IAAI;EAC1BC,UAAU,GAAmB,IAAI;EACjCC,YAAY,GAAgC,IAAI;EAChDC,WAAW,GAAoB,IAAI;EACnCC,QAAQ,GAAW,CAAC;EACpBC,UAAU,GAA4B,IAAI;;EAElD;AACJ;AACA;AACA;AACA;AACA;EACIC,WAAWA,CAACF,QAAgB,EAA0B;IAClD,IAAI,CAACA,QAAQ,GAAGA,QAAQ;IACxB,OAAO,IAAI;EACf;;EAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EACIG,QAAQA,CAACC,KAA0B,EAAE;IACjC,IAAI,CAACT,OAAO,GAAGS,KAAK,CAACT,OAAO;IAC5B,OAAO,IAAI;EACf;;EAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EACIU,UAAUA,CAACV,OAAe,EAA0B;IAChD,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,OAAO,IAAI;EACf;;EAEA;AACJ;AACA;AACA;AACA;EACIW,WAAWA,CAAA,EAA2B;IAClC,IAAI,CAACV,UAAU,GAAG,KAAK;IACvB,OAAO,IAAI;EACf;;EAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EACIW,aAAaA,CAACV,UAAmB,EAA0B;IACvD,IAAI,CAACA,UAAU,GAAGA,UAAU;IAC5B,OAAO,IAAI;EACf;;EAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EACIW,eAAeA,CAACV,YAAkC,EAA0B;IACxE,IAAI,CAACA,YAAY,GAAGA,YAAY;IAChC,OAAO,IAAI;EACf;;EAEA;AACJ;AACA;AACA;AACA;AACA;EACIW,cAAcA,CAACV,WAAqB,EAA0B;IAC1D,IAAI,CAACA,WAAW,GAAGA,WAAW;IAC9B,OAAO,IAAI;EACf;;EAEA;AACJ;AACA;AACA;AACA;AACA;EACIW,mBAAmBA,CAACT,UAA4B,EAA0B;IACtE,IAAI,CAACA,UAAU,GAAGA,UAAU;IAC5B,OAAO,IAAI;EACf;;EAEA;AACJ;AACA;AACA;EACIU,KAAKA,CAAA,EAAoB;IACrB,OAAO,IAAIlB,eAAe,CACtB,IAAI,CAACE,OAAO,EACZ,IAAI,CAACC,UAAU,EACf,IAAI,CAACC,UAAU,EACf,IAAI,CAACC,YAAY,EACjB,IAAI,CAACC,WAAW,EAChB,IAAI,CAACC,QAAQ,EACb,IAAI,CAACC,UAAU,CAAC;EACxB;AACJ;AAEA,eAAeP,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Used to provide all the necessary purchase data to the {@link Qonversion.updatePurchase} method.
|
|
5
|
+
* Can be created manually or using the {@link Product.toPurchaseUpdateModel} method.
|
|
6
|
+
*
|
|
7
|
+
* Requires Qonversion product identifiers - {@link productId} for the purchasing one and
|
|
8
|
+
* {@link oldProductId} for the purchased one.
|
|
9
|
+
*
|
|
10
|
+
* If {@link offerId} is not specified for Android, then the default offer will be applied.
|
|
11
|
+
* To know how we choose the default offer, see {@link ProductStoreDetails.defaultSubscriptionOfferDetails}.
|
|
12
|
+
*
|
|
13
|
+
* If you want to remove any intro/trial offer from the purchase on Android (use only a bare base plan),
|
|
14
|
+
* call the {@link removeOffer} method.
|
|
15
|
+
*/
|
|
16
|
+
class PurchaseUpdateModel {
|
|
17
|
+
updatePolicy = null;
|
|
18
|
+
offerId = null;
|
|
19
|
+
applyOffer = true;
|
|
20
|
+
constructor(productId, oldProductId, updatePolicy = null, offerId = null) {
|
|
21
|
+
this.productId = productId;
|
|
22
|
+
this.oldProductId = oldProductId;
|
|
23
|
+
this.updatePolicy = updatePolicy;
|
|
24
|
+
this.offerId = offerId;
|
|
25
|
+
}
|
|
26
|
+
removeOffer() {
|
|
27
|
+
this.applyOffer = false;
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export default PurchaseUpdateModel;
|
|
32
|
+
//# sourceMappingURL=PurchaseUpdateModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PurchaseUpdateModel","updatePolicy","offerId","applyOffer","constructor","productId","oldProductId","removeOffer"],"sourceRoot":"../../../src","sources":["dto/PurchaseUpdateModel.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,mBAAmB,CAAC;EAIjBC,YAAY,GAAgC,IAAI;EAChDC,OAAO,GAAkB,IAAI;EAE7BC,UAAU,GAAY,IAAI;EAEjCC,WAAWA,CACTC,SAAiB,EACjBC,YAAoB,EACpBL,YAAyC,GAAG,IAAI,EAChDC,OAAsB,GAAG,IAAI,EAC7B;IACA,IAAI,CAACG,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACL,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,OAAO,GAAGA,OAAO;EACxB;EAEAK,WAAWA,CAAA,EAAwB;IACjC,IAAI,CAACJ,UAAU,GAAG,KAAK;IACvB,OAAO,IAAI;EACb;AACF;AAEA,eAAeH,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { QonversionErrorCode } from "./enums.js";
|
|
4
|
+
class QonversionError {
|
|
5
|
+
userCanceled = false;
|
|
6
|
+
constructor(code, description, additionalMessage, domain) {
|
|
7
|
+
this.code = code;
|
|
8
|
+
this.domain = domain;
|
|
9
|
+
this.description = description;
|
|
10
|
+
this.additionalMessage = additionalMessage;
|
|
11
|
+
this.userCanceled = code === QonversionErrorCode.PURCHASE_CANCELED;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export default QonversionError;
|
|
15
|
+
//# sourceMappingURL=QonversionError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["QonversionErrorCode","QonversionError","userCanceled","constructor","code","description","additionalMessage","domain","PURCHASE_CANCELED"],"sourceRoot":"../../../src","sources":["dto/QonversionError.ts"],"mappings":";;AAAA,SAAQA,mBAAmB,QAAO,YAAS;AAE3C,MAAMC,eAAe,CAAC;EAKpBC,YAAY,GAAY,KAAK;EAE7BC,WAAWA,CACTC,IAAyB,EACzBC,WAA2B,EAC3BC,iBAAiC,EACjCC,MAAsB,EACtB;IACA,IAAI,CAACH,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACG,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACF,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,iBAAiB,GAAGA,iBAAiB;IAC1C,IAAI,CAACJ,YAAY,GAAGE,IAAI,KAAKJ,mBAAmB,CAACQ,iBAAiB;EACpE;AACF;AAEA,eAAeP,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RemoteConfig","constructor","payload","experiment","source"],"sourceRoot":"../../../src","sources":["dto/RemoteConfig.ts"],"mappings":";;AAGA,MAAMA,YAAY,CAAC;EAKfC,WAAWA,CAACC,OAA+B,EAAEC,UAA6B,EAAEC,MAAiC,EAAE;IAC3G,IAAI,CAACF,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,MAAM,GAAGA,MAAM;EACxB;AACJ;AAEA,eAAeJ,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class RemoteConfigList {
|
|
4
|
+
constructor(remoteConfigs) {
|
|
5
|
+
this.remoteConfigs = remoteConfigs;
|
|
6
|
+
}
|
|
7
|
+
remoteConfigForContextKey(contextKey) {
|
|
8
|
+
return this.findRemoteConfigForContextKey(contextKey);
|
|
9
|
+
}
|
|
10
|
+
remoteConfigForEmptyContextKey() {
|
|
11
|
+
return this.findRemoteConfigForContextKey(null);
|
|
12
|
+
}
|
|
13
|
+
findRemoteConfigForContextKey(contextKey) {
|
|
14
|
+
return this.remoteConfigs.find(config => config.source.contextKey == contextKey);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export default RemoteConfigList;
|
|
18
|
+
//# sourceMappingURL=RemoteConfigList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RemoteConfigList","constructor","remoteConfigs","remoteConfigForContextKey","contextKey","findRemoteConfigForContextKey","remoteConfigForEmptyContextKey","find","config","source"],"sourceRoot":"../../../src","sources":["dto/RemoteConfigList.ts"],"mappings":";;AAEA,MAAMA,gBAAgB,CAAC;EAGnBC,WAAWA,CAACC,aAAkC,EAAE;IAC5C,IAAI,CAACA,aAAa,GAAGA,aAAa;EACtC;EAEAC,yBAAyBA,CAACC,UAAkB,EAA4B;IACpE,OAAO,IAAI,CAACC,6BAA6B,CAACD,UAAU,CAAC;EACzD;EAEAE,8BAA8BA,CAAA,EAA6B;IACvD,OAAO,IAAI,CAACD,6BAA6B,CAAC,IAAI,CAAC;EACnD;EAEQA,6BAA6BA,CAACD,UAAyB,EAA4B;IACvF,OAAO,IAAI,CAACF,aAAa,CAACK,IAAI,CAACC,MAAM,IAAIA,MAAM,CAACC,MAAM,CAACL,UAAU,IAAIA,UAAU,CAAC;EACpF;AACJ;AAEA,eAAeJ,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class RemoteConfigurationSource {
|
|
4
|
+
constructor(id, name, type, assignmentType, contextKey) {
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.name = name;
|
|
7
|
+
this.type = type;
|
|
8
|
+
this.assignmentType = assignmentType;
|
|
9
|
+
this.contextKey = contextKey;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export default RemoteConfigurationSource;
|
|
13
|
+
//# sourceMappingURL=RemoteConfigurationSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RemoteConfigurationSource","constructor","id","name","type","assignmentType","contextKey"],"sourceRoot":"../../../src","sources":["dto/RemoteConfigurationSource.ts"],"mappings":";;AAGA,MAAMA,yBAAyB,CAAC;EAO5BC,WAAWA,CACTC,EAAU,EACVC,IAAY,EACZC,IAAmC,EACnCC,cAAiD,EACjDC,UAAyB,EACzB;IACE,IAAI,CAACJ,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,cAAc,GAAGA,cAAc;IACpC,IAAI,CAACC,UAAU,GAAGA,UAAU;EAChC;AACJ;AAEA,eAAeN,yBAAyB","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class ScreenPresentationConfig {
|
|
4
|
+
/**
|
|
5
|
+
* Describes how screens will be displayed.
|
|
6
|
+
* For mode details see the enum description.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* iOS only. For Android consider using {@link ScreenPresentationStyle.NO_ANIMATION}.
|
|
11
|
+
*
|
|
12
|
+
* Describes whether should transaction be animated or not.
|
|
13
|
+
* Default value is true.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
constructor(presentationStyle, animated) {
|
|
17
|
+
this.presentationStyle = presentationStyle;
|
|
18
|
+
this.animated = animated === undefined ? true : animated;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export default ScreenPresentationConfig;
|
|
22
|
+
//# sourceMappingURL=ScreenPresentationConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ScreenPresentationConfig","constructor","presentationStyle","animated","undefined"],"sourceRoot":"../../../src","sources":["dto/ScreenPresentationConfig.ts"],"mappings":";;AAEA,MAAMA,wBAAwB,CAAC;EAC7B;AACF;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGEC,WAAWA,CAACC,iBAA0C,EAAEC,QAAkB,EAAE;IAC1E,IAAI,CAACD,iBAAiB,GAAGA,iBAAiB;IAC1C,IAAI,CAACC,QAAQ,GAAGA,QAAQ,KAAKC,SAAS,GAAG,IAAI,GAAGD,QAAQ;EAC1D;AACF;AAEA,eAAeH,wBAAwB","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A class describing a subscription period
|
|
5
|
+
*/
|
|
6
|
+
class SubscriptionPeriod {
|
|
7
|
+
/**
|
|
8
|
+
* A count of subsequent intervals.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Interval unit.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* ISO 8601 representation of the period, e.g. "P7D", meaning 7 days period.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
constructor(unitCount, unit, iso) {
|
|
20
|
+
this.unitCount = unitCount;
|
|
21
|
+
this.unit = unit;
|
|
22
|
+
this.iso = iso;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export default SubscriptionPeriod;
|
|
26
|
+
//# sourceMappingURL=SubscriptionPeriod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SubscriptionPeriod","constructor","unitCount","unit","iso"],"sourceRoot":"../../../src","sources":["dto/SubscriptionPeriod.ts"],"mappings":";;AAEA;AACA;AACA;AACA,MAAMA,kBAAkB,CAAC;EACvB;AACF;AACA;;EAGE;AACF;AACA;;EAGE;AACF;AACA;;EAGEC,WAAWA,CACTC,SAAiB,EACjBC,IAA4B,EAC5BC,GAAW,EACX;IACA,IAAI,CAACF,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,GAAG,GAAGA,GAAG;EAChB;AACF;AAEA,eAAeJ,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class Transaction {
|
|
4
|
+
constructor(originalTransactionId, transactionId, transactionTimestamp, environment, ownershipType, type, expirationTimestamp, transactionRevocationTimestamp, offerCode, promoOfferId) {
|
|
5
|
+
this.originalTransactionId = originalTransactionId;
|
|
6
|
+
this.transactionId = transactionId;
|
|
7
|
+
this.transactionDate = new Date(transactionTimestamp);
|
|
8
|
+
this.environment = environment;
|
|
9
|
+
this.ownershipType = ownershipType;
|
|
10
|
+
this.type = type;
|
|
11
|
+
this.expirationDate = expirationTimestamp ? new Date(expirationTimestamp) : undefined;
|
|
12
|
+
this.transactionRevocationDate = transactionRevocationTimestamp ? new Date(transactionRevocationTimestamp) : undefined;
|
|
13
|
+
this.offerCode = offerCode;
|
|
14
|
+
this.promoOfferId = promoOfferId;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export default Transaction;
|
|
18
|
+
//# sourceMappingURL=Transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Transaction","constructor","originalTransactionId","transactionId","transactionTimestamp","environment","ownershipType","type","expirationTimestamp","transactionRevocationTimestamp","offerCode","promoOfferId","transactionDate","Date","expirationDate","undefined","transactionRevocationDate"],"sourceRoot":"../../../src","sources":["dto/Transaction.ts"],"mappings":";;AAEA,MAAMA,WAAW,CAAC;EAYdC,WAAWA,CACPC,qBAA6B,EAC7BC,aAAqB,EACrBC,oBAA4B,EAC5BC,WAAmC,EACnCC,aAAuC,EACvCC,IAAqB,EACrBC,mBAAuC,EACvCC,8BAAkD,EAClDC,SAA6B,EAC7BC,YAAgC,EAClC;IACE,IAAI,CAACT,qBAAqB,GAAGA,qBAAqB;IAClD,IAAI,CAACC,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACS,eAAe,GAAG,IAAIC,IAAI,CAACT,oBAAoB,CAAC;IACrD,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACO,cAAc,GAAGN,mBAAmB,GAAG,IAAIK,IAAI,CAACL,mBAAmB,CAAC,GAAGO,SAAS;IACrF,IAAI,CAACC,yBAAyB,GAAGP,8BAA8B,GAAG,IAAII,IAAI,CAACJ,8BAA8B,CAAC,GAAGM,SAAS;IACtH,IAAI,CAACL,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,YAAY,GAAGA,YAAY;EACpC;AACJ;AAEA,eAAeX,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["User","constructor","qonversionId","identityId"],"sourceRoot":"../../../src","sources":["dto/User.ts"],"mappings":";;AAAA,MAAMA,IAAI,CAAC;EAITC,WAAWA,CAACC,YAAoB,EAAEC,UAA0B,EAAE;IAC5D,IAAI,CAACD,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,UAAU,GAAGA,UAAU;EAC9B;AACF;AAEA,eAAeH,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { UserPropertyKey } from "./enums.js";
|
|
4
|
+
class UserProperties {
|
|
5
|
+
/**
|
|
6
|
+
* List of all user properties.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* List of user properties, set for the Qonversion defined keys.
|
|
11
|
+
* This is a subset of all {@link properties} list.
|
|
12
|
+
* See {@link QonversionApi.setUserProperty}.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* List of user properties, set for custom keys.
|
|
17
|
+
* This is a subset of all {@link properties} list.
|
|
18
|
+
* See {@link QonversionApi.setCustomUserProperty}.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Map of all user properties.
|
|
23
|
+
* This is a flattened version of the {@link properties} list as a key-value map.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Map of user properties, set for the Qonversion defined keys.
|
|
28
|
+
* This is a flattened version of the {@link definedProperties} list as a key-value map.
|
|
29
|
+
* See {@link QonversionApi.setUserProperty}.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Map of user properties, set for custom keys.
|
|
34
|
+
* This is a flattened version of the {@link customProperties} list as a key-value map.
|
|
35
|
+
* See {@link QonversionApi.setCustomUserProperty}.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
constructor(properties) {
|
|
39
|
+
this.properties = properties;
|
|
40
|
+
this.definedProperties = properties.filter(property => property.definedKey !== UserPropertyKey.CUSTOM);
|
|
41
|
+
this.customProperties = properties.filter(property => property.definedKey === UserPropertyKey.CUSTOM);
|
|
42
|
+
this.flatPropertiesMap = new Map();
|
|
43
|
+
this.flatDefinedPropertiesMap = new Map();
|
|
44
|
+
this.flatCustomPropertiesMap = new Map();
|
|
45
|
+
properties.forEach(property => {
|
|
46
|
+
this.flatPropertiesMap.set(property.key, property.value);
|
|
47
|
+
if (property.definedKey == UserPropertyKey.CUSTOM) {
|
|
48
|
+
this.flatCustomPropertiesMap.set(property.key, property.value);
|
|
49
|
+
} else {
|
|
50
|
+
this.flatDefinedPropertiesMap.set(property.definedKey, property.value);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Searches for a property with the given property {@link key} in all properties list.
|
|
57
|
+
*/
|
|
58
|
+
getProperty(key) {
|
|
59
|
+
return this.properties.find(userProperty => userProperty.key == key);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Searches for a property with the given Qonversion defined property {@link key}
|
|
64
|
+
* in defined properties list.
|
|
65
|
+
*/
|
|
66
|
+
getDefinedProperty(key) {
|
|
67
|
+
return this.definedProperties.find(userProperty => userProperty.definedKey == key);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export default UserProperties;
|
|
71
|
+
//# sourceMappingURL=UserProperties.js.map
|