expo-iap 6.2.0 → 6.3.0

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 (41) hide show
  1. package/.prettierignore +3 -1
  2. package/build/index.d.ts +12 -9
  3. package/build/index.d.ts.map +1 -1
  4. package/build/index.js +3 -2
  5. package/build/index.js.map +1 -1
  6. package/build/index.kepler.d.ts +6 -6
  7. package/build/index.kepler.d.ts.map +1 -1
  8. package/build/index.kepler.js +3 -2
  9. package/build/index.kepler.js.map +1 -1
  10. package/build/purchase-flow-confirmers.d.ts +99 -0
  11. package/build/purchase-flow-confirmers.d.ts.map +1 -0
  12. package/build/purchase-flow-confirmers.js +201 -0
  13. package/build/purchase-flow-confirmers.js.map +1 -0
  14. package/build/purchase-flow-core.d.ts +206 -0
  15. package/build/purchase-flow-core.d.ts.map +1 -0
  16. package/build/purchase-flow-core.js +343 -0
  17. package/build/purchase-flow-core.js.map +1 -0
  18. package/build/purchase-flow.d.ts +20 -297
  19. package/build/purchase-flow.d.ts.map +1 -1
  20. package/build/purchase-flow.js +13 -531
  21. package/build/purchase-flow.js.map +1 -1
  22. package/build/useIAP.d.ts +1 -1
  23. package/build/useIAP.d.ts.map +1 -1
  24. package/build/useIAP.js.map +1 -1
  25. package/build/utils/purchaseFlowBinding.d.ts +1 -1
  26. package/build/utils/purchaseFlowBinding.d.ts.map +1 -1
  27. package/build/utils/purchaseFlowBinding.js +1 -1
  28. package/build/utils/purchaseFlowBinding.js.map +1 -1
  29. package/build/vega-adapter.d.ts.map +1 -1
  30. package/build/vega-adapter.js +6 -5
  31. package/build/vega-adapter.js.map +1 -1
  32. package/openiap-versions.json +3 -3
  33. package/package.json +1 -1
  34. package/src/index.kepler.ts +9 -11
  35. package/src/index.ts +20 -19
  36. package/src/purchase-flow-confirmers.ts +346 -0
  37. package/src/purchase-flow-core.ts +604 -0
  38. package/src/purchase-flow.ts +43 -923
  39. package/src/useIAP.ts +1 -1
  40. package/src/utils/purchaseFlowBinding.ts +1 -1
  41. package/src/vega-adapter.ts +9 -7
@@ -1,304 +1,27 @@
1
- /** Purchase fields the flow reads. Every OpenIAP `Purchase` matches. */
2
- export interface PurchaseFlowPurchase {
3
- id: string;
4
- productId: string;
5
- purchaseState: string;
6
- purchaseToken?: string | null;
7
- store: string;
8
- storeId?: string | null;
9
- ids?: string[] | null;
10
- quantity?: number;
11
- isAcknowledgedAndroid?: boolean | null;
12
- /**
13
- * A requested plan change that has not applied yet: Google Play waits for
14
- * its payment, Amazon applies it at the next renewal.
15
- */
16
- pendingPurchaseUpdateAndroid?: {
17
- products: string[];
18
- } | null;
19
- /** Apple's `Sandbox` or `Production`, matched against IAPKit's answer. */
20
- environmentIOS?: string | null;
21
- /** The Amazon user the receipt belongs to, which Amazon RVS checks. */
22
- userIdAmazon?: string | null;
23
- revocationDateIOS?: number | null;
24
- isUpgradedIOS?: boolean | null;
25
- expirationDateIOS?: number | null;
26
- }
27
- /** Body the app sends its backend, which takes the user from its own session. */
28
- export interface PurchaseConfirmationRequest {
29
- store: "apple" | "google";
30
- /** Apple JWS or Google Play purchase token, forwarded to IAPKit as is. */
31
- purchaseToken: string;
32
- /** The product the app expected; IAPKit rejects a store mismatch. */
33
- productId: string;
34
- }
35
- /**
36
- * The app backend's verdict on one purchase. Only `entitled` grants access;
37
- * `verified` and `linked` mean the purchase is valid but access is not granted
38
- * yet. `ownership_conflict` sets `alreadyGranted` when another account already
39
- * got access, which lets the app finish it. `invalid` and
40
- * `test_account_restricted` are settled rejections: return
41
- * `verification_delayed` for any answer that may still change.
42
- */
43
- export type PurchaseConfirmation = {
44
- status: "store_pending";
45
- } | {
46
- status: "verification_delayed";
47
- retryAfterMs: number;
48
- } | {
49
- status: "ownership_conflict";
50
- alreadyGranted: boolean;
51
- } | {
52
- status: "test_account_restricted";
53
- } | {
54
- status: "invalid";
55
- reason?: string;
56
- } | {
57
- status: "verified";
58
- retryAfterMs?: number;
59
- } | {
60
- status: "linked";
61
- retryAfterMs?: number;
62
- } | {
63
- status: "entitled";
64
- alreadyGranted: boolean;
65
- };
66
- type Finishable = "entitled" | "ownership_conflict" | "test_account_restricted";
67
- /**
68
- * Where a purchase stands after the flow ran. `finishError` means finishing
69
- * failed and recovery retries it; an `entitled` status still grants access.
70
- * `changePending` marks an `entitled` purchase whose requested upgrade,
71
- * downgrade, or prepaid top-up has not applied yet (Google Play waits for its
72
- * payment, Amazon applies it at the next renewal): access stays on the current
73
- * plan. `recovered` marks an `invalid` purchase recovery found, not one the
74
- * user just bought.
75
- */
76
- export type PurchaseFlowStatus = Exclude<PurchaseConfirmation, {
77
- status: Finishable | "invalid";
78
- }> | (Extract<PurchaseConfirmation, {
79
- status: "entitled";
80
- }> & {
81
- finishError?: unknown;
82
- changePending?: true;
83
- }) | (Extract<PurchaseConfirmation, {
84
- status: "ownership_conflict" | "test_account_restricted";
85
- }> & {
86
- finishError?: unknown;
87
- }) | (Extract<PurchaseConfirmation, {
88
- status: "invalid";
89
- }> & {
90
- finishError?: unknown;
91
- recovered?: true;
92
- }) | {
93
- status: "failed";
94
- error: unknown;
95
- };
96
- export interface PurchaseFlowOutcome<P extends PurchaseFlowPurchase> {
97
- purchase: P;
98
- status: PurchaseFlowStatus;
99
- }
100
- export interface PurchaseFlowOptions<P extends PurchaseFlowPurchase> {
101
- /**
102
- * Confirms the purchase and grants access before it resolves `entitled`:
103
- * the flow finishes, and so consumes, the purchase right after. Usually a
104
- * call to the app backend, which holds the IAPKit secret key; an app without
105
- * one passes the SDK's `confirmWithIapkit`.
106
- */
107
- confirmWithBackend: (purchase: P, context: {
108
- isConsumable: boolean;
109
- }) => Promise<PurchaseConfirmation>;
110
- /**
111
- * Milliseconds `confirmWithBackend` may take before the purchase ends as
112
- * `failed`, so a hung call cannot hold it for the session. Default 30000.
113
- */
114
- confirmTimeoutMs?: number;
115
- finishTransaction: (args: {
116
- purchase: P;
117
- isConsumable: boolean;
118
- }) => Promise<unknown>;
119
- /**
120
- * From the app's product config. On Android a wrong answer consumes a
121
- * non-consumable or blocks rebuying a consumable.
122
- */
123
- isConsumable: (productId: string) => boolean;
124
- getAvailablePurchases: () => Promise<P[]>;
125
- /**
126
- * The SDK's `getPendingTransactionsIOS` on iOS, `undefined` elsewhere: off
127
- * iOS an SDK may answer `[]`, which would hide unacknowledged Android
128
- * purchases.
129
- * Recovery reads unfinished StoreKit transactions, consumables included,
130
- * from it. If it throws, recovery confirms every Apple purchase
131
- * `getAvailablePurchases` lists instead.
132
- */
133
- getPendingTransactionsIOS: (() => Promise<P[]>) | undefined;
134
- /**
135
- * Registers for the store's purchase deliveries; the flow processes each one
136
- * until `dispose`. SDKs pass their purchase listener.
137
- */
138
- listenForPurchases?: (onPurchase: (purchase: P) => void) => {
139
- remove: () => void;
140
- };
141
- /**
142
- * Whether the user's own request produced a delivered purchase. Only then
143
- * may an `invalid` delivery offer buying again; without this, no delivery
144
- * the flow listened for does.
145
- */
146
- wasRequested?: (purchase: P) => boolean;
147
- }
148
- export interface RecoverPurchasesOptions {
149
- /** Also re-confirm purchases that were already finished, for a restore button. */
150
- includeFinished?: boolean;
151
- }
152
- export interface PurchaseFlow<P extends PurchaseFlowPurchase> {
153
- /**
154
- * Confirms one purchase the user just bought. Finishes it once access is
155
- * granted to this or another account, and a settled rejection on iOS only:
156
- * Google Play refunds a rejected purchase left unacknowledged, while iOS
157
- * would redeliver it forever.
158
- */
159
- processPurchase: (purchase: P) => Promise<PurchaseFlowStatus>;
160
- /**
161
- * Runs unfinished purchases (or every owned one) through the flow, one at a
162
- * time; a call made while a pass runs shares it. Throws if it meets an
163
- * Apple purchase without `getPendingTransactionsIOS`.
164
- */
165
- recoverPurchases: (options?: RecoverPurchasesOptions) => Promise<PurchaseFlowOutcome<P>[]>;
166
- /**
167
- * Calls `listener` with every outcome: once per confirmation, however many
168
- * deliveries shared it, and once per delivery of an already settled
169
- * purchase. Returns the function that unsubscribes it.
170
- */
171
- subscribe: (listener: (outcome: PurchaseFlowOutcome<P>) => void) => () => void;
172
- /**
173
- * Stops listening and publishing, and stops a recovery pass from confirming
174
- * anything more; confirmations already running still finish. Call it when
175
- * the signed-in account changes, then create the next account's flow.
176
- */
177
- dispose: () => void;
178
- }
179
- /**
180
- * How far a store's purchase time may trail the moment the app asked for it
181
- * and still count as that request: device clocks run ahead. A redelivered
182
- * receipt is far older.
183
- */
184
- export declare const PURCHASE_REQUEST_CLOCK_SKEW_MS = 600000;
185
- /**
186
- * Single-product, single-unit purchases only. Create one flow per
187
- * authenticated app account. Capture that session in confirmWithBackend and
188
- * dispose the flow after switching accounts.
189
- */
190
- export declare function createPurchaseFlow<P extends PurchaseFlowPurchase>(options: PurchaseFlowOptions<P>): PurchaseFlow<P>;
191
- /** Builds the backend request body; throws for a purchase without Apple or Google evidence. */
192
- export declare function toPurchaseConfirmationRequest(purchase: PurchaseFlowPurchase): PurchaseConfirmationRequest;
193
- type IapkitStore = "apple" | "google" | "amazon" | "horizon";
194
- /** How an app without its own backend confirms purchases with IAPKit. */
195
- export interface IapkitConfirmationOptions<P extends PurchaseFlowPurchase = PurchaseFlowPurchase> {
196
- /**
197
- * A publishable key (`openiap-kit_pk_...`), which is safe to ship in an
198
- * app. Leave it out where the SDK has one configured, such as Expo's
199
- * `iapkitApiKey`.
200
- */
201
- apiKey?: string;
202
- /** A self-hosted or local IAPKit origin. Defaults to https://kit.openiap.dev. */
203
- baseUrl?: string;
204
- amazon?: {
205
- /** Verify App Tester receipts with the Amazon RVS Cloud Sandbox. */
206
- sandbox?: boolean;
207
- /** RVS reports a subscription term under its parent SKU; maps one to the other. */
208
- verifiedProductId?: (productId: string) => string;
209
- };
210
- /** The IAPKit store that verifies a community store's evidence, such as an Amazon RVS adapter. */
211
- verifyAs?: (purchase: P) => IapkitStore | undefined;
212
- /**
213
- * Gives the user what they bought, before the flow finishes (and so
214
- * consumes) the purchase. Required for consumables. Must be idempotent per
215
- * `purchase.id`: after a crash the same purchase is confirmed again. Access
216
- * read from ownership, such as an active subscription, needs nothing here.
217
- */
1
+ import type { PurchaseFlowPurchase, PurchaseFlowOptions, PurchaseConfirmation } from './purchase-flow-core';
2
+ import { type IapkitConfirmationOptions as ConfirmationOptions, type IapkitVerificationProps as VerificationProps, type IapkitVerificationResult as VerificationResult } from './purchase-flow-confirmers';
3
+ export * from './purchase-flow-core';
4
+ /** @deprecated Use the SDK's IapkitConfirmationOptions. Removed in the next major release. */
5
+ export interface IapkitConfirmationOptions<P extends PurchaseFlowPurchase = PurchaseFlowPurchase> extends ConfirmationOptions<P> {
6
+ }
7
+ /** @deprecated Use the SDK's VerifyPurchaseWithProviderProps. Removed in the next major release. */
8
+ export interface IapkitVerificationProps extends VerificationProps {
9
+ }
10
+ /** @deprecated Use the SDK's VerifyPurchaseWithProviderResult. Removed in the next major release. */
11
+ export interface IapkitVerificationResult extends VerificationResult {
12
+ }
13
+ /** @deprecated Use the SDK's confirmWithIapkit. Removed in the next major release. */
14
+ export declare function createIapkitConfirmation<P extends PurchaseFlowPurchase>(verify: (props: IapkitVerificationProps) => Promise<IapkitVerificationResult>, options: IapkitConfirmationOptions<P>): PurchaseFlowOptions<P>['confirmWithBackend'];
15
+ /** @deprecated Use the SDK's confirmOnDeviceIOS. Removed in the next major release. */
16
+ export declare function createDeviceConfirmationIOS<P extends PurchaseFlowPurchase>(getPendingTransactionsIOS: () => Promise<P[]>, options?: {
218
17
  grant?: (purchase: P, context: {
219
18
  isConsumable: boolean;
220
19
  }) => Promise<void>;
221
- }
222
- /** The SDK's `VerifyPurchaseWithProviderProps` for IAPKit. */
223
- export interface IapkitVerificationProps {
224
- provider: "iapkit";
225
- iapkit: {
226
- apiKey?: string;
227
- baseUrl?: string;
228
- apple?: {
229
- jws: string;
230
- };
231
- google?: {
232
- purchaseToken: string;
233
- };
234
- amazon?: {
235
- receiptId: string;
236
- expectedProductId: string;
237
- sandbox: boolean;
238
- userId?: string;
239
- };
240
- horizon?: {
241
- sku: string;
242
- };
243
- };
244
- }
245
- /** Fields of the SDK's `VerifyPurchaseWithProviderResult` the flow reads. */
246
- export interface IapkitVerificationResult {
247
- iapkit?: {
248
- store: string;
249
- storeId: string;
250
- environment?: string | null;
251
- isValid: boolean;
252
- state: string;
253
- productId?: string | null;
254
- } | null;
255
- errors?: {
256
- code?: string | null;
257
- message: string;
258
- }[] | null;
259
- }
260
- /**
261
- * The SDK's `confirmWithIapkit`, given its `verifyPurchaseWithProvider`:
262
- * verifies the purchase with IAPKit, then runs `grant` before the flow
263
- * finishes it.
264
- */
265
- export declare function createIapkitConfirmation<P extends PurchaseFlowPurchase>(verifyPurchaseWithProvider: (props: IapkitVerificationProps) => Promise<IapkitVerificationResult>, options: IapkitConfirmationOptions<P>): (purchase: P, context: {
266
- isConsumable: boolean;
267
- }) => Promise<PurchaseConfirmation>;
268
- /**
269
- * The SDK's `confirmOnDeviceIOS`, given its `getPendingTransactionsIOS`, for an
270
- * app with neither a backend nor IAPKit. StoreKit verified the transaction if
271
- * it is still unfinished, unrevoked, not upgraded, unexpired, and from the
272
- * purchase's environment; `grant` then runs before the flow finishes it.
273
- */
274
- export declare function createDeviceConfirmationIOS<P extends PurchaseFlowPurchase>(getPendingTransactionsIOS: () => Promise<P[]>, options?: Pick<IapkitConfirmationOptions<P>, "grant">): (purchase: P, context: {
275
- isConsumable: boolean;
276
- }) => Promise<PurchaseConfirmation>;
277
- /** Builds the IAPKit request for a purchase; throws for a store IAPKit cannot verify. */
20
+ }): PurchaseFlowOptions<P>['confirmWithBackend'];
21
+ /** @deprecated Use the SDK's confirmWithIapkit. Removed in the next major release. */
278
22
  export declare function toIapkitVerificationProps<P extends PurchaseFlowPurchase>(purchase: P, options: IapkitConfirmationOptions<P>): IapkitVerificationProps;
279
- /**
280
- * Turns IAPKit's answer into the flow's confirmation. Anything that may be a
281
- * configuration error rather than a rejected payment throws, so the flow
282
- * reports `failed` and leaves the purchase unfinished: evidence for another
283
- * store, product, or environment, `inauthentic` (IAPKit's answer to a product
284
- * or package mismatch, and to every Horizon rejection), and a valid state this
285
- * product type cannot be granted from.
286
- */
23
+ /** @deprecated Use the SDK's confirmWithIapkit. Removed in the next major release. */
287
24
  export declare function readIapkitVerification<P extends PurchaseFlowPurchase>(result: IapkitVerificationResult, purchase: P, context: {
288
25
  isConsumable: boolean;
289
- }, options?: Omit<IapkitConfirmationOptions<P>, "apiKey">): PurchaseConfirmation;
290
- export type PurchaseFlowGuidanceKey = "payment_pending" | "change_pending" | "verification_delayed" | "owned_by_another_account" | "test_purchase_not_accepted" | "purchase_not_valid" | "access_pending" | "access_granted" | "try_again_later";
291
- /** Neutral guidance an app maps to its own copy. */
292
- export interface PurchaseFlowGuidance {
293
- key: PurchaseFlowGuidanceKey;
294
- /**
295
- * True only for an `invalid` purchase the user just made. False whenever the
296
- * user may already have paid: never ask them to buy again.
297
- */
298
- offerPurchase: boolean;
299
- /** Earliest time to run the purchase through the flow again. */
300
- retryAfterMs?: number;
301
- }
302
- export declare function describePurchaseFlowStatus(status: PurchaseFlowStatus): PurchaseFlowGuidance;
303
- export {};
26
+ }, options?: Omit<IapkitConfirmationOptions<P>, 'apiKey'>): PurchaseConfirmation;
304
27
  //# sourceMappingURL=purchase-flow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"purchase-flow.d.ts","sourceRoot":"","sources":["../src/purchase-flow.ts"],"names":[],"mappings":"AAMA,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvC;;;OAGG;IACH,4BAA4B,C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