@getsupertab/supertab-js 3.21.0 → 3.22.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.
@@ -110,11 +110,11 @@ declare class ApiClient {
110
110
  };
111
111
  amount: number;
112
112
  };
113
- entitlementDetails: {
113
+ entitlementDetails: null[] | {
114
114
  contentKey: string;
115
115
  duration: string;
116
116
  isRecurring: boolean;
117
- } | null[] | {
117
+ } | {
118
118
  contentKey: string;
119
119
  duration: string;
120
120
  isRecurring: boolean;
@@ -174,7 +174,7 @@ declare class ApiClient {
174
174
  }[] | null;
175
175
  metadata?: unknown;
176
176
  }>;
177
- purchase({ offeringId, purchaseIntentId, currencyCode, metadata, }: PurchaseOfferingRequestClientFacing): Promise<{
177
+ purchase({ offeringId, purchaseIntentId, onetimeOfferingId, currencyCode, metadata, }: PurchaseOfferingRequestClientFacing): Promise<{
178
178
  purchase: {
179
179
  status: "completed" | "pending" | "abandoned";
180
180
  id: string;
@@ -210,6 +210,42 @@ declare class ApiClient {
210
210
  next: string;
211
211
  reason: string;
212
212
  } | null;
213
+ } | {
214
+ purchases: {
215
+ status: "completed" | "pending" | "abandoned";
216
+ id: string;
217
+ offeringId: string;
218
+ onetimeOfferingId: string | null;
219
+ purchasedAt: string | (string | null)[] | null;
220
+ completedAt: string | (string | null)[] | null;
221
+ description: string;
222
+ price: {
223
+ currency: {
224
+ symbol: string;
225
+ code: string;
226
+ name: string;
227
+ baseUnit: number;
228
+ };
229
+ amount: number;
230
+ };
231
+ entitlementStatus: {
232
+ contentKey: string;
233
+ hasEntitlement: boolean;
234
+ expires: string | (string | null)[] | null;
235
+ recursAt: string | (string | null)[] | null;
236
+ } | null[] | {
237
+ contentKey: string;
238
+ hasEntitlement: boolean;
239
+ expires: string | (string | null)[] | null;
240
+ recursAt: string | (string | null)[] | null;
241
+ }[] | null;
242
+ metadata?: unknown;
243
+ }[];
244
+ actionRequired: boolean;
245
+ actionRequiredDetails: {
246
+ next: string;
247
+ reason: string;
248
+ } | null;
213
249
  } | undefined>;
214
250
  }
215
251
 
@@ -301,7 +337,11 @@ declare enum AuthStatus {
301
337
 
302
338
  declare type BaseForPurchaseOfferingRequestClientFacing = Omit<PurchaseOfferingRequest, "metadata"> & {
303
339
  metadata?: Metadata;
304
- purchaseIntentId: string;
340
+ onetimeOfferingId?: string;
341
+ /**
342
+ * @deprecated Use onetimeOfferingId instead.
343
+ */
344
+ purchaseIntentId?: string;
305
345
  };
306
346
 
307
347
  declare class CheckoutClient {
@@ -414,7 +454,7 @@ declare type PurchaseOfferingRequest = {
414
454
  metadata: Metadata;
415
455
  };
416
456
 
417
- declare type PurchaseOfferingRequestClientFacing = RequireAtLeastOne<BaseForPurchaseOfferingRequestClientFacing, "offeringId" | "purchaseIntentId">;
457
+ declare type PurchaseOfferingRequestClientFacing = RequireAtLeastOne<BaseForPurchaseOfferingRequestClientFacing, "offeringId" | "onetimeOfferingId" | "purchaseIntentId">;
418
458
 
419
459
  declare enum PurchaseStatus {
420
460
  COMPLETED = "completed",
@@ -1,4 +1,4 @@
1
- import { S as e } from "./supertab-BpwqQ2BB.js";
1
+ import { S as e } from "./supertab-CsEpZyRy.js";
2
2
  export {
3
3
  e as Supertab
4
4
  };
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "engines": {
23
23
  "node": ">=22.13.1"
24
24
  },
25
- "version": "3.21.0",
25
+ "version": "3.22.1",
26
26
  "type": "module",
27
27
  "scripts": {
28
28
  "dev": "vite --config .vite/vite.dev.config.ts",