@getsupertab/supertab-js 3.22.3 → 3.24.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.
- package/dist/pkg/prod/{browser-ponyfill-Nxhp6aQR.js → browser-ponyfill-C10LSn33.js} +1 -1
- package/dist/pkg/prod/{sentry-NtTYZoRz.js → sentry-Bsd48veL.js} +1 -1
- package/dist/pkg/prod/supertab-BN6n_kZO.js +70847 -0
- package/dist/pkg/prod/supertab.d.ts +15 -0
- package/dist/pkg/prod/supertab.js +1 -1
- package/package.json +4 -1
- package/dist/pkg/prod/supertab-DBRkB0AO.js +0 -65954
|
@@ -374,6 +374,11 @@ declare type ConfigurationParameters = {
|
|
|
374
374
|
mockEnabled?: boolean;
|
|
375
375
|
} & SystemUrls;
|
|
376
376
|
|
|
377
|
+
declare interface CreatePurchaseResult {
|
|
378
|
+
startPurchase: () => Promise<PurchaseStateSummary>;
|
|
379
|
+
destroy: () => void;
|
|
380
|
+
}
|
|
381
|
+
|
|
377
382
|
declare interface Currency {
|
|
378
383
|
code: string;
|
|
379
384
|
name: string;
|
|
@@ -456,6 +461,8 @@ declare type PurchaseOfferingRequest = {
|
|
|
456
461
|
|
|
457
462
|
declare type PurchaseOfferingRequestClientFacing = RequireAtLeastOne<BaseForPurchaseOfferingRequestClientFacing, "offeringId" | "onetimeOfferingId" | "purchaseIntentId">;
|
|
458
463
|
|
|
464
|
+
declare type PurchaseStateSummary = ExperienceStateSummary;
|
|
465
|
+
|
|
459
466
|
declare enum PurchaseStatus {
|
|
460
467
|
COMPLETED = "completed",
|
|
461
468
|
PENDING = "pending",
|
|
@@ -474,6 +481,7 @@ export declare class Supertab extends SupertabClient {
|
|
|
474
481
|
api: ApiClient;
|
|
475
482
|
auth: AuthClient;
|
|
476
483
|
checkout: CheckoutClient;
|
|
484
|
+
clientId: string;
|
|
477
485
|
constructor(supertabConfig: SupertabConfig);
|
|
478
486
|
createPaywall({ merchantName, merchantLogoUrl, language, experienceId, purchaseMetadata, }?: {
|
|
479
487
|
merchantName?: string;
|
|
@@ -508,6 +516,13 @@ export declare class Supertab extends SupertabClient {
|
|
|
508
516
|
destroy: () => void;
|
|
509
517
|
initialState?: undefined;
|
|
510
518
|
}>;
|
|
519
|
+
createPurchase({ offeringId, merchantName, merchantLogoUrl, language, purchaseMetadata, }: {
|
|
520
|
+
offeringId: string;
|
|
521
|
+
merchantName?: string;
|
|
522
|
+
merchantLogoUrl?: string;
|
|
523
|
+
language?: string;
|
|
524
|
+
purchaseMetadata?: Metadata;
|
|
525
|
+
}): Promise<CreatePurchaseResult>;
|
|
511
526
|
private renderButton;
|
|
512
527
|
private createPaygateContainer;
|
|
513
528
|
private createPurchaseButtonContainer;
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=22.13.1"
|
|
24
24
|
},
|
|
25
|
-
"version": "3.
|
|
25
|
+
"version": "3.24.0",
|
|
26
26
|
"type": "module",
|
|
27
27
|
"scripts": {
|
|
28
28
|
"dev": "vite --config .vite/vite.dev.config.ts",
|
|
@@ -116,5 +116,8 @@
|
|
|
116
116
|
"vitest": "^3.0.5",
|
|
117
117
|
"xstate": "^5.19.1",
|
|
118
118
|
"zod": "^3.24.4"
|
|
119
|
+
},
|
|
120
|
+
"dependencies": {
|
|
121
|
+
"posthog-js": "^1.266.3"
|
|
119
122
|
}
|
|
120
123
|
}
|