expo-iap 1.0.3 → 2.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.eslintrc.js +9 -0
  2. package/.prettierrc.js +9 -0
  3. package/.swiftlint.yml +10 -0
  4. package/README.md +28 -21
  5. package/android/build.gradle +34 -72
  6. package/android/src/main/AndroidManifest.xml +1 -4
  7. package/android/src/main/java/expo/modules/iap/ExpoIapModule.kt +535 -0
  8. package/android/src/main/java/expo/modules/iap/MissingCurrentActivityException.kt +6 -0
  9. package/android/src/main/java/expo/modules/iap/PlayUtils.kt +124 -0
  10. package/build/ExpoIap.types.d.ts +89 -0
  11. package/build/ExpoIap.types.d.ts.map +1 -0
  12. package/build/ExpoIap.types.js +59 -0
  13. package/build/ExpoIap.types.js.map +1 -0
  14. package/build/ExpoIapModule.d.ts +3 -0
  15. package/build/ExpoIapModule.d.ts.map +1 -0
  16. package/build/ExpoIapModule.js +5 -0
  17. package/build/ExpoIapModule.js.map +1 -0
  18. package/build/index.d.ts +38 -0
  19. package/build/index.d.ts.map +1 -0
  20. package/build/index.js +202 -0
  21. package/build/index.js.map +1 -0
  22. package/build/modules/android.d.ts +40 -0
  23. package/build/modules/android.d.ts.map +1 -0
  24. package/build/modules/android.js +54 -0
  25. package/build/modules/android.js.map +1 -0
  26. package/build/modules/ios.d.ts +41 -0
  27. package/build/modules/ios.d.ts.map +1 -0
  28. package/build/modules/ios.js +44 -0
  29. package/build/modules/ios.js.map +1 -0
  30. package/build/types/ExpoIapAndroid.types.d.ts +113 -0
  31. package/build/types/ExpoIapAndroid.types.d.ts.map +1 -0
  32. package/build/types/ExpoIapAndroid.types.js +23 -0
  33. package/build/types/ExpoIapAndroid.types.js.map +1 -0
  34. package/build/types/ExpoIapIos.types.d.ts +122 -0
  35. package/build/types/ExpoIapIos.types.d.ts.map +1 -0
  36. package/build/types/ExpoIapIos.types.js +2 -0
  37. package/build/types/ExpoIapIos.types.js.map +1 -0
  38. package/bun.lockb +0 -0
  39. package/expo-module.config.json +4 -8
  40. package/ios/ExpoIap.podspec +27 -0
  41. package/ios/ExpoIapModule.swift +498 -0
  42. package/ios/ProductStore.swift +27 -0
  43. package/ios/Types.swift +54 -0
  44. package/package.json +33 -62
  45. package/src/ExpoIap.types.ts +125 -0
  46. package/src/ExpoIapModule.ts +5 -0
  47. package/src/index.ts +397 -0
  48. package/src/modules/android.ts +89 -0
  49. package/src/modules/ios.ts +81 -0
  50. package/src/types/ExpoIapAndroid.types.ts +123 -0
  51. package/src/types/ExpoIapIos.types.ts +141 -0
  52. package/tsconfig.json +9 -0
  53. package/.editorconfig +0 -10
  54. package/.flowconfig +0 -11
  55. package/.monolinterrc +0 -3
  56. package/.yarn/install-state.gz +0 -0
  57. package/.yarn/releases/yarn-3.1.1.cjs +0 -768
  58. package/.yarnrc.yml +0 -3
  59. package/LICENSE +0 -21
  60. package/RNIap.podspec +0 -18
  61. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  62. package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  63. package/android/gradle.properties +0 -2
  64. package/android/gradlew +0 -160
  65. package/android/gradlew.bat +0 -90
  66. package/android/libs/in-app-purchasing-2.0.76.jar +0 -0
  67. package/android/src/amazon/AndroidManifest.xml +0 -12
  68. package/android/src/amazon/java/com/dooboolab/RNIap/RNIapAmazonListener.kt +0 -356
  69. package/android/src/amazon/java/com/dooboolab/RNIap/RNIapAmazonModule.kt +0 -128
  70. package/android/src/amazon/java/com/dooboolab/RNIap/RNIapPackage.kt +0 -20
  71. package/android/src/main/java/com/dooboolab/RNIap/DoobooUtils.kt +0 -180
  72. package/android/src/play/java/com/dooboolab/RNIap/PlayUtils.kt +0 -77
  73. package/android/src/play/java/com/dooboolab/RNIap/RNIapModule.kt +0 -698
  74. package/android/src/play/java/com/dooboolab/RNIap/RNIapPackage.kt +0 -20
  75. package/babel.config.js +0 -10
  76. package/index.d.ts +0 -3
  77. package/index.js +0 -3
  78. package/index.js.flow +0 -9
  79. package/ios/RNIap.xcodeproj/project.pbxproj +0 -370
  80. package/ios/RNIap.xcodeproj/xcshareddata/xcschemes/RNIap.xcscheme +0 -80
  81. package/ios/RNIapIos.m +0 -60
  82. package/ios/RNIapIos.swift +0 -932
  83. package/ios/RNIapQueue.swift +0 -35
  84. package/jest.config.js +0 -194
  85. package/src/__test__/iap.test.d.ts +0 -1
  86. package/src/__test__/iap.test.js +0 -59
  87. package/src/hooks/useIAP.d.ts +0 -21
  88. package/src/hooks/useIAP.js +0 -140
  89. package/src/hooks/withIAPContext.d.ts +0 -21
  90. package/src/hooks/withIAPContext.js +0 -142
  91. package/src/iap.d.ts +0 -197
  92. package/src/iap.js +0 -625
  93. package/src/index.d.ts +0 -4
  94. package/src/index.js +0 -4
  95. package/src/types/amazon.d.ts +0 -23
  96. package/src/types/amazon.js +0 -1
  97. package/src/types/android.d.ts +0 -47
  98. package/src/types/android.js +0 -22
  99. package/src/types/apple.d.ts +0 -424
  100. package/src/types/apple.js +0 -165
  101. package/src/types/index.d.ts +0 -117
  102. package/src/types/index.js +0 -40
  103. package/test/mocks/react-native-modules.js +0 -14
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/modules/ios.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACf,MAAM,2BAA2B,CAAC;AAGnC,KAAK,gBAAgB,GAAG;IACtB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAGF,eAAO,MAAM,qBAAqB,aACtB,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,6CAO5C,CAAC;AAGF,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,UAAU,CAEpE;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,IAAI,sBAAsB,CAEnC;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,QAAO,QAAQ,IAAI,CAAyB,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,uBAAuB,YAAa,MAAM,KAAG,QAAQ,OAAO,CACzB,CAAC;AAEjD;;GAEG;AAEH,eAAO,MAAM,kBAAkB,QAAS,MAAM,KAAG,QAAQ,gBAAgB,EAAE,CACpC,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAS,MAAM,KAAG,QAAQ,cAAc,CAChC,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAS,MAAM,KAAG,QAAQ,cAAc,CAChC,CAAC;AAEvC;;GAEG;AACH,KAAK,mBAAmB,GAAG,SAAS,GAAG,eAAe,CAAC;AACvD,eAAO,MAAM,kBAAkB,QAAS,MAAM,KAAG,QAAQ,mBAAmB,CACrC,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,QAAQ,IAAI,CACd,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { Platform } from 'react-native';
2
+ import { emitter, IapEvent } from '..';
3
+ import ExpoIapModule from '../ExpoIapModule';
4
+ // Listeners
5
+ export const transactionUpdatedIos = (listener) => {
6
+ if (Platform.OS !== 'ios') {
7
+ throw new Error('This method is only available on iOS');
8
+ }
9
+ return emitter.addListener(IapEvent.TransactionIapUpdated, listener);
10
+ };
11
+ // Functions
12
+ export function isProductIos(product) {
13
+ return product?.displayName !== undefined;
14
+ }
15
+ export function isSubscriptionProductIos(product) {
16
+ return product?.displayName !== undefined;
17
+ }
18
+ /**
19
+ * Sync state with Appstore (iOS only)
20
+ * https://developer.apple.com/documentation/storekit/appstore/3791906-sync
21
+ */
22
+ export const sync = () => ExpoIapModule.sync();
23
+ /**
24
+ *
25
+ */
26
+ export const isEligibleForIntroOffer = (groupID) => ExpoIapModule.isEligibleForIntroOffer(groupID);
27
+ /**
28
+ *
29
+ */
30
+ export const subscriptionStatus = (sku) => ExpoIapModule.subscriptionStatus(sku);
31
+ /**
32
+ *
33
+ */
34
+ export const currentEntitlement = (sku) => ExpoIapModule.currentEntitlement(sku);
35
+ /**
36
+ *
37
+ */
38
+ export const latestTransaction = (sku) => ExpoIapModule.latestTransaction(sku);
39
+ export const beginRefundRequest = (sku) => ExpoIapModule.beginRefundRequest(sku);
40
+ /**
41
+ *
42
+ */
43
+ export const showManageSubscriptions = () => ExpoIapModule.showManageSubscriptions();
44
+ //# sourceMappingURL=ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ios.js","sourceRoot":"","sources":["../../src/modules/ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AACtC,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,IAAI,CAAC;AAQrC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAO7C,YAAY;AACZ,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,QAA2C,EAC3C,EAAE;IACF,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IAED,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,YAAY;AACZ,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAQ,OAAsB,EAAE,WAAW,KAAK,SAAS,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAA4B;IAE5B,OAAQ,OAAkC,EAAE,WAAW,KAAK,SAAS,CAAC;AACxE,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,GAAkB,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAe,EAAoB,EAAE,CAC3E,aAAa,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAEjD;;GAEG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAA+B,EAAE,CAC7E,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAA2B,EAAE,CACzE,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAA2B,EAAE,CACxE,aAAa,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAMvC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAAgC,EAAE,CAC9E,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAkB,EAAE,CACzD,aAAa,CAAC,uBAAuB,EAAE,CAAC","sourcesContent":["import {Platform} from 'react-native';\nimport {emitter, IapEvent} from '..';\nimport {Product, PurchaseError, SubscriptionProduct} from '../ExpoIap.types';\nimport type {\n ProductIos,\n ProductStatusIos,\n SubscriptionProductIos,\n TransactionSk2,\n} from '../types/ExpoIapIos.types';\nimport ExpoIapModule from '../ExpoIapModule';\n\ntype TransactionEvent = {\n transaction?: TransactionSk2;\n error?: PurchaseError;\n};\n\n// Listeners\nexport const transactionUpdatedIos = (\n listener: (event: TransactionEvent) => void,\n) => {\n if (Platform.OS !== 'ios') {\n throw new Error('This method is only available on iOS');\n }\n\n return emitter.addListener(IapEvent.TransactionIapUpdated, listener);\n};\n\n// Functions\nexport function isProductIos(product: Product): product is ProductIos {\n return (product as ProductIos)?.displayName !== undefined;\n}\n\nexport function isSubscriptionProductIos(\n product: SubscriptionProduct,\n): product is SubscriptionProductIos {\n return (product as SubscriptionProductIos)?.displayName !== undefined;\n}\n\n/**\n * Sync state with Appstore (iOS only)\n * https://developer.apple.com/documentation/storekit/appstore/3791906-sync\n */\nexport const sync = (): Promise<null> => ExpoIapModule.sync();\n\n/**\n *\n */\nexport const isEligibleForIntroOffer = (groupID: string): Promise<boolean> =>\n ExpoIapModule.isEligibleForIntroOffer(groupID);\n\n/**\n *\n */\n\nexport const subscriptionStatus = (sku: string): Promise<ProductStatusIos[]> =>\n ExpoIapModule.subscriptionStatus(sku);\n\n/**\n *\n */\nexport const currentEntitlement = (sku: string): Promise<TransactionSk2> =>\n ExpoIapModule.currentEntitlement(sku);\n\n/**\n *\n */\nexport const latestTransaction = (sku: string): Promise<TransactionSk2> =>\n ExpoIapModule.latestTransaction(sku);\n\n/**\n *\n */\ntype RefundRequestStatus = 'success' | 'userCancelled';\nexport const beginRefundRequest = (sku: string): Promise<RefundRequestStatus> =>\n ExpoIapModule.beginRefundRequest(sku);\n\n/**\n *\n */\nexport const showManageSubscriptions = (): Promise<null> =>\n ExpoIapModule.showManageSubscriptions();\n"]}
@@ -0,0 +1,113 @@
1
+ type OneTimePurchaseOfferDetails = {
2
+ priceCurrencyCode: string;
3
+ formattedPrice: string;
4
+ priceAmountMicros: string;
5
+ };
6
+ type SubscriptionOfferDetail = {
7
+ basePlanId: string;
8
+ offerId: string;
9
+ offerToken: string;
10
+ offerTags: string[];
11
+ pricingPhases: PricingPhases;
12
+ };
13
+ type PricingPhases = {
14
+ pricingPhaseList: PricingPhase[];
15
+ };
16
+ type PricingPhase = {
17
+ formattedPrice: string;
18
+ priceCurrencyCode: string;
19
+ billingPeriod: string;
20
+ billingCycleCount: number;
21
+ priceAmountMicros: string;
22
+ recurrenceMode: number;
23
+ };
24
+ export type ProductAndroid = {
25
+ productId: string;
26
+ title: string;
27
+ description: string;
28
+ productType: string;
29
+ name: string;
30
+ oneTimePurchaseOfferDetails?: OneTimePurchaseOfferDetails;
31
+ subscriptionOfferDetails?: SubscriptionOfferDetail[];
32
+ };
33
+ type PricingPhaseAndroid = {
34
+ formattedPrice: string;
35
+ priceCurrencyCode: string;
36
+ billingPeriod: string;
37
+ billingCycleCount: number;
38
+ priceAmountMicros: string;
39
+ recurrenceMode: number;
40
+ };
41
+ type SubscriptionOfferAndroid = {
42
+ basePlanId: string;
43
+ offerId: string | null;
44
+ offerToken: string;
45
+ pricingPhases: {
46
+ pricingPhaseList: PricingPhaseAndroid[];
47
+ };
48
+ offerTags: string[];
49
+ };
50
+ export type SubscriptionProductAndroid = ProductAndroid & {
51
+ name: string;
52
+ title: string;
53
+ description: string;
54
+ productId: string;
55
+ subscriptionOfferDetails: SubscriptionOfferAndroid[];
56
+ };
57
+ export type RequestPurchaseAndroidProps = {
58
+ skus: string[];
59
+ obfuscatedAccountIdAndroid?: string;
60
+ obfuscatedProfileIdAndroid?: string;
61
+ isOfferPersonalized?: boolean;
62
+ };
63
+ declare enum ReplacementModesAndroid {
64
+ UNKNOWN_REPLACEMENT_MODE = 0,
65
+ WITH_TIME_PRORATION = 1,
66
+ CHARGE_PRORATED_PRICE = 2,
67
+ WITHOUT_PRORATION = 3,
68
+ CHARGE_FULL_PRICE = 5,
69
+ DEFERRED = 6
70
+ }
71
+ type SubscriptionOffer = {
72
+ sku: string;
73
+ offerToken: string;
74
+ };
75
+ export type RequestSubscriptionAndroidProps = RequestPurchaseAndroidProps & {
76
+ purchaseTokenAndroid?: string;
77
+ replacementModeAndroid?: ReplacementModesAndroid;
78
+ subscriptionOffers: SubscriptionOffer[];
79
+ };
80
+ export type ReceiptAndroid = {
81
+ autoRenewing: boolean;
82
+ betaProduct: boolean;
83
+ cancelDate: number | null;
84
+ cancelReason: string;
85
+ deferredDate: number | null;
86
+ deferredSku: number | null;
87
+ freeTrialEndDate: number;
88
+ gracePeriodEndDate: number;
89
+ parentProductId: string;
90
+ productId: string;
91
+ productType: string;
92
+ purchaseDate: number;
93
+ quantity: number;
94
+ receiptId: string;
95
+ renewalDate: number;
96
+ term: string;
97
+ termSku: string;
98
+ testTransaction: boolean;
99
+ };
100
+ export declare enum FeatureTypeAndroid {
101
+ /** Show in-app messages. Included in documentation by the annotations: */
102
+ IN_APP_MESSAGING = "IN_APP_MESSAGING",
103
+ /** Launch a price change confirmation flow. */
104
+ PRICE_CHANGE_CONFIRMATION = "PRICE_CHANGE_CONFIRMATION",
105
+ /** Play billing library support for querying and purchasing with ProductDetails. */
106
+ PRODUCT_DETAILS = "PRODUCT_DETAILS",
107
+ /** Purchase/query for subscriptions. */
108
+ SUBSCRIPTIONS = "SUBSCRIPTIONS",
109
+ /** Subscriptions update/replace. */
110
+ SUBSCRIPTIONS_UPDATE = "SUBSCRIPTIONS_UPDATE"
111
+ }
112
+ export {};
113
+ //# sourceMappingURL=ExpoIapAndroid.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoIapAndroid.types.d.ts","sourceRoot":"","sources":["../../src/types/ExpoIapAndroid.types.ts"],"names":[],"mappings":"AAAA,KAAK,2BAA2B,GAAG;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,gBAAgB,EAAE,YAAY,EAAE,CAAC;CAClC,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAA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;IAC/B,oCAAoC;IACpC,oBAAoB,yBAAyB;CAC9C"}
@@ -0,0 +1,23 @@
1
+ var ReplacementModesAndroid;
2
+ (function (ReplacementModesAndroid) {
3
+ ReplacementModesAndroid[ReplacementModesAndroid["UNKNOWN_REPLACEMENT_MODE"] = 0] = "UNKNOWN_REPLACEMENT_MODE";
4
+ ReplacementModesAndroid[ReplacementModesAndroid["WITH_TIME_PRORATION"] = 1] = "WITH_TIME_PRORATION";
5
+ ReplacementModesAndroid[ReplacementModesAndroid["CHARGE_PRORATED_PRICE"] = 2] = "CHARGE_PRORATED_PRICE";
6
+ ReplacementModesAndroid[ReplacementModesAndroid["WITHOUT_PRORATION"] = 3] = "WITHOUT_PRORATION";
7
+ ReplacementModesAndroid[ReplacementModesAndroid["CHARGE_FULL_PRICE"] = 5] = "CHARGE_FULL_PRICE";
8
+ ReplacementModesAndroid[ReplacementModesAndroid["DEFERRED"] = 6] = "DEFERRED";
9
+ })(ReplacementModesAndroid || (ReplacementModesAndroid = {}));
10
+ export var FeatureTypeAndroid;
11
+ (function (FeatureTypeAndroid) {
12
+ /** Show in-app messages. Included in documentation by the annotations: */
13
+ FeatureTypeAndroid["IN_APP_MESSAGING"] = "IN_APP_MESSAGING";
14
+ /** Launch a price change confirmation flow. */
15
+ FeatureTypeAndroid["PRICE_CHANGE_CONFIRMATION"] = "PRICE_CHANGE_CONFIRMATION";
16
+ /** Play billing library support for querying and purchasing with ProductDetails. */
17
+ FeatureTypeAndroid["PRODUCT_DETAILS"] = "PRODUCT_DETAILS";
18
+ /** Purchase/query for subscriptions. */
19
+ FeatureTypeAndroid["SUBSCRIPTIONS"] = "SUBSCRIPTIONS";
20
+ /** Subscriptions update/replace. */
21
+ FeatureTypeAndroid["SUBSCRIPTIONS_UPDATE"] = "SUBSCRIPTIONS_UPDATE";
22
+ })(FeatureTypeAndroid || (FeatureTypeAndroid = {}));
23
+ //# sourceMappingURL=ExpoIapAndroid.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoIapAndroid.types.js","sourceRoot":"","sources":["../../src/types/ExpoIapAndroid.types.ts"],"names":[],"mappings":"AAsEA,IAAK,uBAOJ;AAPD,WAAK,uBAAuB;IAC1B,6GAA4B,CAAA;IAC5B,mGAAuB,CAAA;IACvB,uGAAyB,CAAA;IACzB,+FAAqB,CAAA;IACrB,+FAAqB,CAAA;IACrB,6EAAY,CAAA;AACd,CAAC,EAPI,uBAAuB,KAAvB,uBAAuB,QAO3B;AAkCD,MAAM,CAAN,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC5B,0EAA0E;IAC1E,2DAAqC,CAAA;IACrC,+CAA+C;IAC/C,6EAAuD,CAAA;IACvD,oFAAoF;IACpF,yDAAmC,CAAA;IACnC,wCAAwC;IACxC,qDAA+B,CAAA;IAC/B,oCAAoC;IACpC,mEAA6C,CAAA;AAC/C,CAAC,EAXW,kBAAkB,KAAlB,kBAAkB,QAW7B","sourcesContent":["type OneTimePurchaseOfferDetails = {\n priceCurrencyCode: string;\n formattedPrice: string;\n priceAmountMicros: string;\n};\n\ntype SubscriptionOfferDetail = {\n basePlanId: string;\n offerId: string;\n offerToken: string;\n offerTags: string[];\n pricingPhases: PricingPhases;\n};\n\ntype PricingPhases = {\n pricingPhaseList: PricingPhase[];\n};\n\ntype PricingPhase = {\n formattedPrice: string;\n priceCurrencyCode: string;\n billingPeriod: string;\n billingCycleCount: number;\n priceAmountMicros: string;\n recurrenceMode: number;\n};\n\nexport type ProductAndroid = {\n productId: string;\n title: string;\n description: string;\n productType: string;\n name: string;\n oneTimePurchaseOfferDetails?: OneTimePurchaseOfferDetails;\n subscriptionOfferDetails?: SubscriptionOfferDetail[];\n};\n\ntype PricingPhaseAndroid = {\n formattedPrice: string;\n priceCurrencyCode: string;\n // P1W, P1M, P1Y\n billingPeriod: string;\n billingCycleCount: number;\n priceAmountMicros: string;\n recurrenceMode: number;\n};\n\ntype SubscriptionOfferAndroid = {\n basePlanId: string;\n offerId: string | null;\n offerToken: string;\n pricingPhases: {pricingPhaseList: PricingPhaseAndroid[]};\n offerTags: string[];\n};\n\nexport type SubscriptionProductAndroid = ProductAndroid & {\n name: string;\n title: string;\n description: string;\n productId: string;\n subscriptionOfferDetails: SubscriptionOfferAndroid[];\n};\n\nexport type RequestPurchaseAndroidProps = {\n skus: string[];\n obfuscatedAccountIdAndroid?: string;\n obfuscatedProfileIdAndroid?: string;\n isOfferPersonalized?: boolean; // For AndroidBilling V5 https://developer.android.com/google/play/billing/integrate#personalized-price\n};\n\nenum ReplacementModesAndroid {\n UNKNOWN_REPLACEMENT_MODE = 0,\n WITH_TIME_PRORATION = 1,\n CHARGE_PRORATED_PRICE = 2,\n WITHOUT_PRORATION = 3,\n CHARGE_FULL_PRICE = 5,\n DEFERRED = 6,\n}\n\ntype SubscriptionOffer = {\n sku: string;\n offerToken: string;\n};\n\nexport type RequestSubscriptionAndroidProps = RequestPurchaseAndroidProps & {\n purchaseTokenAndroid?: string;\n replacementModeAndroid?: ReplacementModesAndroid;\n subscriptionOffers: SubscriptionOffer[];\n};\n\nexport type ReceiptAndroid = {\n autoRenewing: boolean;\n betaProduct: boolean;\n cancelDate: number | null;\n cancelReason: string;\n deferredDate: number | null;\n deferredSku: number | null;\n freeTrialEndDate: number;\n gracePeriodEndDate: number;\n parentProductId: string;\n productId: string;\n productType: string;\n purchaseDate: number;\n quantity: number;\n receiptId: string;\n renewalDate: number;\n term: string;\n termSku: string;\n testTransaction: boolean;\n};\n\nexport enum FeatureTypeAndroid {\n /** Show in-app messages. Included in documentation by the annotations: */\n IN_APP_MESSAGING = 'IN_APP_MESSAGING',\n /** Launch a price change confirmation flow. */\n PRICE_CHANGE_CONFIRMATION = 'PRICE_CHANGE_CONFIRMATION',\n /** Play billing library support for querying and purchasing with ProductDetails. */\n PRODUCT_DETAILS = 'PRODUCT_DETAILS',\n /** Purchase/query for subscriptions. */\n SUBSCRIPTIONS = 'SUBSCRIPTIONS',\n /** Subscriptions update/replace. */\n SUBSCRIPTIONS_UPDATE = 'SUBSCRIPTIONS_UPDATE',\n}\n"]}
@@ -0,0 +1,122 @@
1
+ type SubscriptionIosPeriod = 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | '';
2
+ type PaymentMode = '' | 'FREETRIAL' | 'PAYASYOUGO' | 'PAYUPFRONT';
3
+ type SubscriptionOffer = {
4
+ displayPrice: string;
5
+ id: string;
6
+ paymentMode: PaymentMode;
7
+ period: SubscriptionIosPeriod;
8
+ periodCount: number;
9
+ price: number;
10
+ type: 'introductory' | 'promotional';
11
+ };
12
+ type SubscriptionInfo = {
13
+ introductoryOffer?: SubscriptionOffer;
14
+ promotionalOffers?: SubscriptionOffer[];
15
+ subscriptionGroupID: string;
16
+ subscriptionPeriod: SubscriptionIosPeriod;
17
+ };
18
+ export type ProductIos = {
19
+ currency: string;
20
+ description: string;
21
+ displayName: string;
22
+ displayPrice: string;
23
+ id: string;
24
+ type: 'autoRenewable' | 'consumable' | 'nonConsumable' | 'nonRenewable';
25
+ isFamilyShareable: boolean;
26
+ jsonRepresentation: string;
27
+ price: number;
28
+ subscription: SubscriptionInfo;
29
+ introductoryPriceNumberOfPeriodsIOS?: string;
30
+ introductoryPriceSubscriptionPeriodIOS?: SubscriptionIosPeriod;
31
+ };
32
+ type Discount = {
33
+ identifier: string;
34
+ type: string;
35
+ numberOfPeriods: string;
36
+ price: string;
37
+ localizedPrice: string;
38
+ paymentMode: PaymentMode;
39
+ subscriptionPeriod: string;
40
+ };
41
+ export type SubscriptionProductIos = ProductIos & {
42
+ discounts?: Discount[];
43
+ introductoryPrice?: string;
44
+ introductoryPriceAsAmountIOS?: string;
45
+ introductoryPricePaymentModeIOS?: PaymentMode;
46
+ introductoryPriceNumberOfPeriodsIOS?: string;
47
+ introductoryPriceSubscriptionPeriodIOS?: SubscriptionIosPeriod;
48
+ subscriptionPeriodNumberIOS?: string;
49
+ subscriptionPeriodUnitIOS?: SubscriptionIosPeriod;
50
+ };
51
+ export type PaymentDiscount = {
52
+ /**
53
+ * A string used to uniquely identify a discount offer for a product.
54
+ */
55
+ identifier: string;
56
+ /**
57
+ * A string that identifies the key used to generate the signature.
58
+ */
59
+ keyIdentifier: string;
60
+ /**
61
+ * A universally unique ID (UUID) value that you define.
62
+ */
63
+ nonce: string;
64
+ /**
65
+ * A UTF-8 string representing the properties of a specific discount offer, cryptographically signed.
66
+ */
67
+ signature: string;
68
+ /**
69
+ * The date and time of the signature's creation in milliseconds, formatted in Unix epoch time.
70
+ */
71
+ timestamp: number;
72
+ };
73
+ export type RequestPurchaseIosProps = {
74
+ sku: string;
75
+ andDangerouslyFinishTransactionAutomaticallyIOS?: boolean;
76
+ /**
77
+ * UUID representing user account
78
+ */
79
+ appAccountToken?: string;
80
+ quantity?: number;
81
+ withOffer?: PaymentDiscount;
82
+ };
83
+ export type RequestSubscriptionIosProps = RequestPurchaseIosProps;
84
+ export type TransactionSk2 = {
85
+ appAccountToken: string;
86
+ appBundleID: string;
87
+ debugDescription: string;
88
+ deviceVerification: string;
89
+ deviceVerificationNonce: string;
90
+ expirationDate: number;
91
+ environment?: 'Production' | 'Sandbox' | 'Xcode';
92
+ id: number;
93
+ isUpgraded: boolean;
94
+ jsonRepresentation: string;
95
+ offerID: string;
96
+ offerType: string;
97
+ originalID: string;
98
+ originalPurchaseDate: number;
99
+ ownershipType: string;
100
+ productID: string;
101
+ productType: string;
102
+ purchaseDate: number;
103
+ purchasedQuantity: number;
104
+ revocationDate: number;
105
+ revocationReason: string;
106
+ signedDate: number;
107
+ subscriptionGroupID: number;
108
+ webOrderLineItemID: number;
109
+ verificationResult?: string;
110
+ };
111
+ type SubscriptionStatus = 'expired' | 'inBillingRetryPeriod' | 'inGracePeriod' | 'revoked' | 'subscribed';
112
+ type RenewalInfo = {
113
+ jsonRepresentation?: string;
114
+ willAutoRenew: boolean;
115
+ autoRenewPreference?: string;
116
+ };
117
+ export type ProductStatusIos = {
118
+ state: SubscriptionStatus;
119
+ renewalInfo?: RenewalInfo;
120
+ };
121
+ export {};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
1
+ {"version":3,"file":"ExpoIapIos.types.js","sourceRoot":"","sources":["../../src/types/ExpoIapIos.types.ts"],"names":[],"mappings":"","sourcesContent":["type SubscriptionIosPeriod = 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | '';\ntype PaymentMode = '' | 'FREETRIAL' | 'PAYASYOUGO' | 'PAYUPFRONT';\n\ntype SubscriptionOffer = {\n displayPrice: string;\n id: string;\n paymentMode: PaymentMode;\n period: SubscriptionIosPeriod;\n periodCount: number;\n price: number;\n type: 'introductory' | 'promotional';\n};\n\ntype SubscriptionInfo = {\n introductoryOffer?: SubscriptionOffer;\n promotionalOffers?: SubscriptionOffer[];\n subscriptionGroupID: string;\n subscriptionPeriod: SubscriptionIosPeriod;\n};\n\nexport type ProductIos = {\n currency: string;\n description: string;\n displayName: string;\n displayPrice: string;\n id: string;\n type: 'autoRenewable' | 'consumable' | 'nonConsumable' | 'nonRenewable';\n isFamilyShareable: boolean;\n jsonRepresentation: string;\n price: number;\n subscription: SubscriptionInfo;\n introductoryPriceNumberOfPeriodsIOS?: string;\n introductoryPriceSubscriptionPeriodIOS?: SubscriptionIosPeriod;\n};\n\ntype Discount = {\n identifier: string;\n type: string;\n numberOfPeriods: string;\n price: string;\n localizedPrice: string;\n paymentMode: PaymentMode;\n subscriptionPeriod: string;\n};\n\nexport type SubscriptionProductIos = ProductIos & {\n discounts?: Discount[];\n introductoryPrice?: string;\n introductoryPriceAsAmountIOS?: string;\n introductoryPricePaymentModeIOS?: PaymentMode;\n introductoryPriceNumberOfPeriodsIOS?: string;\n introductoryPriceSubscriptionPeriodIOS?: SubscriptionIosPeriod;\n subscriptionPeriodNumberIOS?: string;\n subscriptionPeriodUnitIOS?: SubscriptionIosPeriod;\n};\n\nexport type PaymentDiscount = {\n /**\n * A string used to uniquely identify a discount offer for a product.\n */\n identifier: string;\n\n /**\n * A string that identifies the key used to generate the signature.\n */\n keyIdentifier: string;\n\n /**\n * A universally unique ID (UUID) value that you define.\n */\n nonce: string;\n\n /**\n * A UTF-8 string representing the properties of a specific discount offer, cryptographically signed.\n */\n signature: string;\n\n /**\n * The date and time of the signature's creation in milliseconds, formatted in Unix epoch time.\n */\n timestamp: number;\n};\n\nexport type RequestPurchaseIosProps = {\n sku: string;\n andDangerouslyFinishTransactionAutomaticallyIOS?: boolean;\n /**\n * UUID representing user account\n */\n appAccountToken?: string;\n quantity?: number;\n withOffer?: PaymentDiscount;\n};\n\nexport type RequestSubscriptionIosProps = RequestPurchaseIosProps;\n\nexport type TransactionSk2 = {\n appAccountToken: string;\n appBundleID: string;\n debugDescription: string;\n deviceVerification: string;\n deviceVerificationNonce: string;\n expirationDate: number;\n environment?: 'Production' | 'Sandbox' | 'Xcode'; // Could be undefined in some cases on iOS 15, but it's stable since iOS 16\n id: number;\n isUpgraded: boolean;\n jsonRepresentation: string;\n offerID: string;\n offerType: string;\n originalID: string;\n originalPurchaseDate: number;\n ownershipType: string;\n productID: string;\n productType: string;\n purchaseDate: number;\n purchasedQuantity: number;\n revocationDate: number;\n revocationReason: string;\n signedDate: number;\n subscriptionGroupID: number;\n webOrderLineItemID: number;\n verificationResult?: string;\n};\n\ntype SubscriptionStatus =\n | 'expired'\n | 'inBillingRetryPeriod'\n | 'inGracePeriod'\n | 'revoked'\n | 'subscribed';\n\ntype RenewalInfo = {\n jsonRepresentation?: string;\n willAutoRenew: boolean;\n autoRenewPreference?: string;\n};\n\nexport type ProductStatusIos = {\n state: SubscriptionStatus;\n renewalInfo?: RenewalInfo;\n};\n"]}
package/bun.lockb ADDED
Binary file
@@ -1,13 +1,9 @@
1
1
  {
2
- "name": "expo-iap",
3
- "platforms": [
4
- "ios",
5
- "android"
6
- ],
2
+ "platforms": ["ios", "android"],
7
3
  "ios": {
8
- "modulesClassNames": ["RNIapIos"]
4
+ "modules": ["ExpoIapModule"]
9
5
  },
10
6
  "android": {
11
- "modulesClassNames": ["com.dooboolab.RNIap"]
7
+ "modules": ["expo.modules.iap.ExpoIapModule"]
12
8
  }
13
- }
9
+ }
@@ -0,0 +1,27 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'ExpoIap'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.description = package['description']
10
+ s.license = package['license']
11
+ s.author = package['author']
12
+ s.homepage = package['homepage']
13
+ s.platforms = { :ios => '13.4', :tvos => '13.4' }
14
+ s.swift_version = '5.4'
15
+ s.source = { git: 'https://github.com/hyochan/expo-iap' }
16
+ s.static_framework = true
17
+
18
+ s.dependency 'ExpoModulesCore'
19
+
20
+ # Swift/Objective-C compatibility
21
+ s.pod_target_xcconfig = {
22
+ 'DEFINES_MODULE' => 'YES',
23
+ 'SWIFT_COMPILATION_MODE' => 'wholemodule'
24
+ }
25
+
26
+ s.source_files = "**/*.{h,m,swift}"
27
+ end