@tagadapay/plugin-sdk 4.0.4 → 4.0.7
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 +115 -46
- package/dist/external-tracker.js +1 -1
- package/dist/external-tracker.min.js +1 -1
- package/dist/tagada-react-sdk-minimal.min.js +1 -1
- package/dist/tagada-react-sdk.js +1 -1
- package/dist/tagada-react-sdk.min.js +1 -1
- package/dist/tagada-sdk.js +1 -1
- package/dist/tagada-sdk.min.js +1 -1
- package/package.json +114 -115
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
A comprehensive React SDK for building plugins on the TagadaPay platform. Create custom checkout experiences, landing pages, and interactive components with automatic configuration injection and advanced routing capabilities.
|
|
4
4
|
|
|
5
|
-
> **🚀 V2
|
|
5
|
+
> **🚀 V2 is the supported surface.** TanStack Query integration, improved TypeScript support, and better performance. [See V2 Architecture](#-v2-architecture) for details.
|
|
6
6
|
>
|
|
7
|
-
> **Recommended**: Use `@tagadapay/plugin-sdk/
|
|
7
|
+
> **Recommended**: Use `@tagadapay/plugin-sdk/v2` for new projects. V1 (`/react`) is still supported for existing projects but no longer receives new features.
|
|
8
8
|
|
|
9
9
|
## 📚 Documentation
|
|
10
10
|
|
|
@@ -14,6 +14,7 @@ A comprehensive React SDK for building plugins on the TagadaPay platform. Create
|
|
|
14
14
|
- **[V2 Examples](#-v2-examples)** - Complete examples using the new V2 hooks
|
|
15
15
|
- **[useCheckout (V2)](#usecheckout)** - TanStack Query-based checkout management
|
|
16
16
|
- **[useOffers (V2)](#useoffers)** - Dynamic pricing with automatic caching
|
|
17
|
+
- **[usePreviewOffer (V2)](#usepreviewoffer)** - Post-checkout upsell page (auto-applies MIT/CIT)
|
|
17
18
|
- **[useProducts (V2)](#useproducts)** - Product data management
|
|
18
19
|
- **[useStoreConfig (V2)](#usestoreconfig)** - Store configuration with automatic caching
|
|
19
20
|
- **[usePayment (V2)](#usepayment)** - Payment processing with 3DS support
|
|
@@ -24,7 +25,6 @@ A comprehensive React SDK for building plugins on the TagadaPay platform. Create
|
|
|
24
25
|
- **[useCheckout (V1)](./docs/README-useCheckout.md)** - Legacy checkout state management
|
|
25
26
|
- **[setCheckoutInfo](./docs/README-setCheckoutInfo.md)** - Customer information and validation
|
|
26
27
|
- **[useOffers (V1)](./docs/README-useOffers.md)** - Legacy dynamic pricing
|
|
27
|
-
- **[usePromotionCodes](./docs/README-usePromotionCodes.md)** - Legacy promotion code management
|
|
28
28
|
- **[Money utilities](./docs/README-money.md)** - Currency formatting and calculations
|
|
29
29
|
- **[URL utilities](./docs/README-urlUtils.md)** - Navigation and routing helpers
|
|
30
30
|
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
useISOData,
|
|
147
147
|
useCheckout,
|
|
148
148
|
formatMoney,
|
|
149
|
-
} from '@tagadapay/plugin-sdk/
|
|
149
|
+
} from '@tagadapay/plugin-sdk/v2';
|
|
150
150
|
|
|
151
151
|
function MyPlugin() {
|
|
152
152
|
const { config, storeId, accountId, basePath, loading } = usePluginConfig();
|
|
@@ -199,7 +199,7 @@ export default App;
|
|
|
199
199
|
|
|
200
200
|
### What's New in V2
|
|
201
201
|
|
|
202
|
-
The TagadaPay Plugin SDK
|
|
202
|
+
The TagadaPay Plugin SDK V2 introduces a clean architecture with significant improvements:
|
|
203
203
|
|
|
204
204
|
#### **🔄 TanStack Query Integration**
|
|
205
205
|
|
|
@@ -218,7 +218,7 @@ The TagadaPay Plugin SDK v3 introduces a clean architecture with significant imp
|
|
|
218
218
|
|
|
219
219
|
```tsx
|
|
220
220
|
// V2 (Recommended)
|
|
221
|
-
import { useCheckout, useOffers, TagadaProvider } from '@tagadapay/plugin-sdk/
|
|
221
|
+
import { useCheckout, useOffers, TagadaProvider } from '@tagadapay/plugin-sdk/v2';
|
|
222
222
|
|
|
223
223
|
// Legacy (Still supported)
|
|
224
224
|
import { useCheckout, useOffers, TagadaProvider } from '@tagadapay/plugin-sdk/react';
|
|
@@ -257,7 +257,7 @@ import {
|
|
|
257
257
|
useProducts,
|
|
258
258
|
usePluginConfig,
|
|
259
259
|
formatMoney,
|
|
260
|
-
} from '@tagadapay/plugin-sdk/
|
|
260
|
+
} from '@tagadapay/plugin-sdk/v2';
|
|
261
261
|
|
|
262
262
|
function CheckoutPage() {
|
|
263
263
|
const [checkoutToken, setCheckoutToken] = useState<string>();
|
|
@@ -355,7 +355,7 @@ function App() {
|
|
|
355
355
|
|
|
356
356
|
```tsx
|
|
357
357
|
import React from 'react';
|
|
358
|
-
import { TagadaProvider, useCheckout, useOffers, formatMoney } from '@tagadapay/plugin-sdk/
|
|
358
|
+
import { TagadaProvider, useCheckout, useOffers, formatMoney } from '@tagadapay/plugin-sdk/v2';
|
|
359
359
|
|
|
360
360
|
// Component 1: Cart Summary
|
|
361
361
|
function CartSummary({ checkoutToken }: { checkoutToken: string }) {
|
|
@@ -411,7 +411,7 @@ function CheckoutWithOffers() {
|
|
|
411
411
|
|
|
412
412
|
```tsx
|
|
413
413
|
import React from 'react';
|
|
414
|
-
import { useCheckout } from '@tagadapay/plugin-sdk/
|
|
414
|
+
import { useCheckout } from '@tagadapay/plugin-sdk/v2';
|
|
415
415
|
|
|
416
416
|
function QuantitySelector({
|
|
417
417
|
checkoutToken,
|
|
@@ -555,7 +555,7 @@ interface TagadaProviderProps {
|
|
|
555
555
|
#### V2 Enhanced Provider Features
|
|
556
556
|
|
|
557
557
|
```tsx
|
|
558
|
-
import { TagadaProvider } from '@tagadapay/plugin-sdk/
|
|
558
|
+
import { TagadaProvider } from '@tagadapay/plugin-sdk/v2';
|
|
559
559
|
|
|
560
560
|
function App() {
|
|
561
561
|
return (
|
|
@@ -577,7 +577,7 @@ function App() {
|
|
|
577
577
|
}
|
|
578
578
|
```
|
|
579
579
|
|
|
580
|
-
> **Version Compatibility:** V2 features require `@tagadapay/plugin-sdk/
|
|
580
|
+
> **Version Compatibility:** V2 features require `@tagadapay/plugin-sdk/v2`. The `blockUntilSessionReady` option was added in v2.3.0. For older versions, the blocking behavior was the default and only option.
|
|
581
581
|
|
|
582
582
|
### Development vs Production
|
|
583
583
|
|
|
@@ -677,6 +677,95 @@ const {
|
|
|
677
677
|
} = useOffers({ storeId, enabled });
|
|
678
678
|
```
|
|
679
679
|
|
|
680
|
+
> ⚠️ **`useOffer` (singular) is deprecated.** Use `usePreviewOffer` for upsell
|
|
681
|
+
> pages — it skips the upfront checkout-session round-trip, recomputes
|
|
682
|
+
> pricing client-side, and auto-applies the CRM-configured MIT/CIT payment
|
|
683
|
+
> initiator. `useOffer` will be removed in a future major version.
|
|
684
|
+
|
|
685
|
+
#### usePreviewOffer()
|
|
686
|
+
|
|
687
|
+
Lightweight hook for post-checkout upsell pages. Fetches an offer with a
|
|
688
|
+
precomputed pricing summary, lets the customer pick variants and quantities,
|
|
689
|
+
and recomputes totals client-side without round-tripping the backend on every
|
|
690
|
+
change. Pay once the customer accepts.
|
|
691
|
+
|
|
692
|
+
```typescript
|
|
693
|
+
const {
|
|
694
|
+
// Query state
|
|
695
|
+
offer, // Offer | null
|
|
696
|
+
isLoading, // boolean
|
|
697
|
+
isFetching, // boolean
|
|
698
|
+
isPaying, // boolean
|
|
699
|
+
error, // Error | null
|
|
700
|
+
|
|
701
|
+
// Pricing
|
|
702
|
+
summary, // { items, totalAmount, totalAdjustedAmount, currency, options }
|
|
703
|
+
selections, // Record<lineItemId, { variantId, quantity, priceId? }>
|
|
704
|
+
|
|
705
|
+
// Selection methods (by lineItemId)
|
|
706
|
+
selectVariant, // (lineItemId, variantId) => void
|
|
707
|
+
updateQuantity, // (lineItemId, quantity) => void
|
|
708
|
+
// Selection methods (by productId — convenience for single-line steps)
|
|
709
|
+
selectVariantByProduct,
|
|
710
|
+
updateQuantityByProduct,
|
|
711
|
+
getAvailableVariants, // (productId) => Array<{ variantId, variantName, unitAmount, currency, imageUrl }>
|
|
712
|
+
|
|
713
|
+
// Actions
|
|
714
|
+
pay, // (mainOrderId?, options?: { initiatedBy }) => Promise<{ checkoutUrl }>
|
|
715
|
+
toCheckout, // (mainOrderId?) => Promise<{ checkoutToken, customerId, status }>
|
|
716
|
+
} = usePreviewOffer({
|
|
717
|
+
offerId, // required
|
|
718
|
+
currency, // optional override; defaults to ?currency= URL param or funnel context
|
|
719
|
+
initialSelections, // optional preselected variants/quantities
|
|
720
|
+
});
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
**Example — accept-or-skip upsell page:**
|
|
724
|
+
|
|
725
|
+
```tsx
|
|
726
|
+
import { usePreviewOffer } from '@tagadapay/plugin-sdk/v2';
|
|
727
|
+
|
|
728
|
+
function UpsellOffer({ offerId, mainOrderId }: { offerId: string; mainOrderId: string }) {
|
|
729
|
+
const { offer, summary, pay, isPaying } = usePreviewOffer({ offerId });
|
|
730
|
+
|
|
731
|
+
const handleAccept = async () => {
|
|
732
|
+
const { checkoutUrl } = await pay(mainOrderId);
|
|
733
|
+
if (checkoutUrl) window.location.href = checkoutUrl;
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
return (
|
|
737
|
+
<div>
|
|
738
|
+
<h2>{offer?.name}</h2>
|
|
739
|
+
<p>Total: {summary?.totalAdjustedAmount} {summary?.currency}</p>
|
|
740
|
+
<button onClick={handleAccept} disabled={isPaying}>
|
|
741
|
+
{isPaying ? 'Processing…' : 'Add to my order'}
|
|
742
|
+
</button>
|
|
743
|
+
</div>
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
**MIT vs CIT auto-pickup**
|
|
749
|
+
|
|
750
|
+
`pay()` reads `stepConfig.paymentInitiator` from the runtime
|
|
751
|
+
`window.__TGD_STEP_CONFIG__` injection and applies it automatically:
|
|
752
|
+
|
|
753
|
+
- `paymentInitiator: 'merchant'` (default) → **MIT**, sent to Stripe as
|
|
754
|
+
`off_session: true`. No 3DS challenge, higher conversion.
|
|
755
|
+
- `paymentInitiator: 'customer'` → **CIT**, sent as
|
|
756
|
+
`setup_future_usage: 'off_session'`. May trigger 3DS — useful when MIT
|
|
757
|
+
charges are being declined by the issuer.
|
|
758
|
+
|
|
759
|
+
Merchants flip the toggle from the CRM step config; no plugin code change is
|
|
760
|
+
required. To override per call, pass `{ initiatedBy }`:
|
|
761
|
+
|
|
762
|
+
```tsx
|
|
763
|
+
await pay(mainOrderId, { initiatedBy: 'customer' });
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
`OffersResource.payOffer()` and `OffersResource.payWithCheckoutSession()` share
|
|
767
|
+
the same auto-pickup under the hood.
|
|
768
|
+
|
|
680
769
|
#### usePromotions()
|
|
681
770
|
|
|
682
771
|
Hook for managing promotion codes in checkout sessions with TanStack Query.
|
|
@@ -729,7 +818,7 @@ const {
|
|
|
729
818
|
**Example:**
|
|
730
819
|
|
|
731
820
|
```tsx
|
|
732
|
-
import { useStoreConfig } from '@tagadapay/plugin-sdk/
|
|
821
|
+
import { useStoreConfig } from '@tagadapay/plugin-sdk/v2';
|
|
733
822
|
|
|
734
823
|
function StoreInfo() {
|
|
735
824
|
const { storeConfig, isLoading } = useStoreConfig();
|
|
@@ -808,7 +897,7 @@ import {
|
|
|
808
897
|
useInvalidateQuery,
|
|
809
898
|
usePreloadQuery,
|
|
810
899
|
queryKeys,
|
|
811
|
-
} from '@tagadapay/plugin-sdk/
|
|
900
|
+
} from '@tagadapay/plugin-sdk/v2';
|
|
812
901
|
|
|
813
902
|
// Custom API queries
|
|
814
903
|
const { data, isLoading } = useApiQuery({
|
|
@@ -838,7 +927,7 @@ preloadCheckout({
|
|
|
838
927
|
Enhanced money formatting with better TypeScript support:
|
|
839
928
|
|
|
840
929
|
```typescript
|
|
841
|
-
import { formatMoney, convertCurrency, getCurrencyInfo } from '@tagadapay/plugin-sdk/
|
|
930
|
+
import { formatMoney, convertCurrency, getCurrencyInfo } from '@tagadapay/plugin-sdk/v2';
|
|
842
931
|
|
|
843
932
|
// Format money with automatic currency detection
|
|
844
933
|
const formatted = formatMoney(2999, 'USD'); // "$29.99"
|
|
@@ -867,7 +956,7 @@ import {
|
|
|
867
956
|
ProductsResource,
|
|
868
957
|
PaymentsResource,
|
|
869
958
|
PluginConfigUtils,
|
|
870
|
-
} from '@tagadapay/plugin-sdk/
|
|
959
|
+
} from '@tagadapay/plugin-sdk/v2';
|
|
871
960
|
|
|
872
961
|
// Use core functions directly (useful for server-side or non-React contexts)
|
|
873
962
|
const checkoutResource = new CheckoutResource(apiClient);
|
|
@@ -883,7 +972,7 @@ const isValid = PluginConfigUtils.validateConfig(config);
|
|
|
883
972
|
V2 includes built-in debugging tools:
|
|
884
973
|
|
|
885
974
|
```tsx
|
|
886
|
-
import { TagadaProvider } from '@tagadapay/plugin-sdk/
|
|
975
|
+
import { TagadaProvider } from '@tagadapay/plugin-sdk/v2';
|
|
887
976
|
|
|
888
977
|
function App() {
|
|
889
978
|
return (
|
|
@@ -1030,7 +1119,7 @@ const handleTouchStart = (e) => {
|
|
|
1030
1119
|
### Multi-language Support
|
|
1031
1120
|
|
|
1032
1121
|
```typescript
|
|
1033
|
-
import { useTranslation } from '@tagadapay/plugin-sdk';
|
|
1122
|
+
import { useTranslation } from '@tagadapay/plugin-sdk/v2';
|
|
1034
1123
|
|
|
1035
1124
|
function CheckoutForm() {
|
|
1036
1125
|
const { t } = useTranslation();
|
|
@@ -1047,7 +1136,7 @@ function CheckoutForm() {
|
|
|
1047
1136
|
### Currency Support
|
|
1048
1137
|
|
|
1049
1138
|
```typescript
|
|
1050
|
-
import { useCurrency } from '@tagadapay/plugin-sdk';
|
|
1139
|
+
import { useCurrency } from '@tagadapay/plugin-sdk/v2';
|
|
1051
1140
|
|
|
1052
1141
|
function PriceDisplay({ amount }) {
|
|
1053
1142
|
const { formatPrice, currency } = useCurrency();
|
|
@@ -1056,39 +1145,19 @@ function PriceDisplay({ amount }) {
|
|
|
1056
1145
|
}
|
|
1057
1146
|
```
|
|
1058
1147
|
|
|
1059
|
-
## 📊 Analytics &
|
|
1148
|
+
## 📊 Analytics & Tracking
|
|
1060
1149
|
|
|
1061
|
-
|
|
1150
|
+
Pixel tracking (Facebook, TikTok, Snapchat, GTM) is configured per-step in
|
|
1151
|
+
the CRM step editor and auto-bootstrapped at runtime — no plugin code is
|
|
1152
|
+
required. For external (non-Tagadapay-hosted) pages, the lightweight
|
|
1153
|
+
external tracker is available:
|
|
1062
1154
|
|
|
1063
1155
|
```typescript
|
|
1064
|
-
import {
|
|
1065
|
-
|
|
1066
|
-
// Track user interactions
|
|
1067
|
-
trackEvent('checkout_started', {
|
|
1068
|
-
product_id: 'prod_123',
|
|
1069
|
-
value: 2999,
|
|
1070
|
-
currency: 'USD',
|
|
1071
|
-
});
|
|
1072
|
-
|
|
1073
|
-
// Track conversions
|
|
1074
|
-
trackEvent('purchase_completed', {
|
|
1075
|
-
transaction_id: 'txn_456',
|
|
1076
|
-
value: 2999,
|
|
1077
|
-
currency: 'USD',
|
|
1078
|
-
});
|
|
1156
|
+
import { TagadaExternalTracker } from '@tagadapay/plugin-sdk/external-tracker';
|
|
1079
1157
|
```
|
|
1080
1158
|
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
```typescript
|
|
1084
|
-
import { performance } from '@tagadapay/plugin-sdk';
|
|
1085
|
-
|
|
1086
|
-
// Measure load times
|
|
1087
|
-
performance.mark('checkout-start');
|
|
1088
|
-
// ... checkout logic
|
|
1089
|
-
performance.mark('checkout-end');
|
|
1090
|
-
performance.measure('checkout-duration', 'checkout-start', 'checkout-end');
|
|
1091
|
-
```
|
|
1159
|
+
See [External Page Tracker docs](../../mintlify/developer-tools/web-integration/external-page-tracker.mdx)
|
|
1160
|
+
for the full integration guide.
|
|
1092
1161
|
|
|
1093
1162
|
## 🤝 Contributing
|
|
1094
1163
|
|
package/dist/external-tracker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TagadaPay React SDK MINIMAL v4.0.
|
|
2
|
+
* TagadaPay React SDK MINIMAL v4.0.7
|
|
3
3
|
* CDN Bundle - Slim checkout SDK (TagadaProvider + essential hooks only)
|
|
4
4
|
* Requires: React 18+ loaded before this script
|
|
5
5
|
* For full SDK with all hooks, use tagada-react-sdk.min.js instead
|
package/dist/tagada-react-sdk.js
CHANGED
package/dist/tagada-sdk.js
CHANGED
package/dist/tagada-sdk.min.js
CHANGED
package/package.json
CHANGED
|
@@ -1,115 +1,114 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tagadapay/plugin-sdk",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "Modern React SDK for building Tagada Pay plugins",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"sideEffects": false,
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.js"
|
|
13
|
-
},
|
|
14
|
-
"./react": {
|
|
15
|
-
"types": "./dist/react/index.d.ts",
|
|
16
|
-
"import": "./dist/react/index.js",
|
|
17
|
-
"require": "./dist/react/index.js"
|
|
18
|
-
},
|
|
19
|
-
"./v2": {
|
|
20
|
-
"types": "./dist/v2/index.d.ts",
|
|
21
|
-
"import": "./dist/v2/index.js",
|
|
22
|
-
"require": "./dist/v2/index.js"
|
|
23
|
-
},
|
|
24
|
-
"./v2/standalone": {
|
|
25
|
-
"types": "./dist/v2/standalone/index.d.ts",
|
|
26
|
-
"import": "./dist/v2/standalone/index.js",
|
|
27
|
-
"require": "./dist/v2/standalone/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./external-tracker": {
|
|
30
|
-
"browser": "./dist/external-tracker.min.js",
|
|
31
|
-
"default": "./dist/external-tracker.min.js"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
},
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tagadapay/plugin-sdk",
|
|
3
|
+
"version": "4.0.7",
|
|
4
|
+
"description": "Modern React SDK for building Tagada Pay plugins",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./react": {
|
|
15
|
+
"types": "./dist/react/index.d.ts",
|
|
16
|
+
"import": "./dist/react/index.js",
|
|
17
|
+
"require": "./dist/react/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./v2": {
|
|
20
|
+
"types": "./dist/v2/index.d.ts",
|
|
21
|
+
"import": "./dist/v2/index.js",
|
|
22
|
+
"require": "./dist/v2/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./v2/standalone": {
|
|
25
|
+
"types": "./dist/v2/standalone/index.d.ts",
|
|
26
|
+
"import": "./dist/v2/standalone/index.js",
|
|
27
|
+
"require": "./dist/v2/standalone/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./external-tracker": {
|
|
30
|
+
"browser": "./dist/external-tracker.min.js",
|
|
31
|
+
"default": "./dist/external-tracker.min.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"tagadapay",
|
|
36
|
+
"cms",
|
|
37
|
+
"plugin",
|
|
38
|
+
"sdk",
|
|
39
|
+
"react",
|
|
40
|
+
"typescript"
|
|
41
|
+
],
|
|
42
|
+
"author": "Tagada Pay",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@basis-theory/apple-pay-js": "^2.0.2",
|
|
46
|
+
"@basis-theory/basis-theory-js": "^4.30.0",
|
|
47
|
+
"@basis-theory/basis-theory-react": "^1.32.5",
|
|
48
|
+
"@basis-theory/web-threeds": "^1.0.1",
|
|
49
|
+
"@google-pay/button-react": "^3.0.10",
|
|
50
|
+
"@stripe/react-stripe-js": "^5.6.1",
|
|
51
|
+
"@stripe/stripe-js": "^8.11.0",
|
|
52
|
+
"@tagadapay/plugin-sdk": "link:",
|
|
53
|
+
"@tanstack/react-query": "^5.90.2",
|
|
54
|
+
"@whop/checkout": "^0.0.40",
|
|
55
|
+
"axios": "^1.10.0",
|
|
56
|
+
"path-to-regexp": "^8.2.0",
|
|
57
|
+
"react-intl": "^7.1.11",
|
|
58
|
+
"swr": "^2.3.6",
|
|
59
|
+
"@tagadapay/core-js": "3.0.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/jest": "^29.5.0",
|
|
63
|
+
"@types/node": "^18.19.130",
|
|
64
|
+
"@types/react": "^19",
|
|
65
|
+
"@types/react-dom": "^19",
|
|
66
|
+
"esbuild": "^0.24.2",
|
|
67
|
+
"jest": "^29.5.0",
|
|
68
|
+
"ts-jest": "^29.1.0",
|
|
69
|
+
"typescript": "^5.0.0"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
73
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
74
|
+
},
|
|
75
|
+
"files": [
|
|
76
|
+
"dist/**/*",
|
|
77
|
+
"README.md",
|
|
78
|
+
"build-cdn.js"
|
|
79
|
+
],
|
|
80
|
+
"repository": {
|
|
81
|
+
"type": "git",
|
|
82
|
+
"url": "git+https://github.com/tagadapay/plugin-sdk.git"
|
|
83
|
+
},
|
|
84
|
+
"bugs": {
|
|
85
|
+
"url": "https://github.com/tagadapay/plugin-sdk/issues"
|
|
86
|
+
},
|
|
87
|
+
"homepage": "https://github.com/tagadapay/plugin-sdk#readme",
|
|
88
|
+
"scripts": {
|
|
89
|
+
"build": "tsc && npm run build:cdn",
|
|
90
|
+
"build:cdn": "node build-cdn.js",
|
|
91
|
+
"build:ts": "tsc",
|
|
92
|
+
"clean": "rm -rf dist",
|
|
93
|
+
"lint": "echo \"No linting configured\"",
|
|
94
|
+
"test": "jest --no-watchman",
|
|
95
|
+
"test:watch": "jest --watch --no-watchman",
|
|
96
|
+
"test:coverage": "jest --coverage --no-watchman",
|
|
97
|
+
"dev": "tsc --watch",
|
|
98
|
+
"publish:patch": "npm version patch && pnpm publish --no-git-checks",
|
|
99
|
+
"publish:minor": "npm version minor && pnpm publish --no-git-checks",
|
|
100
|
+
"publish:major": "npm version major && pnpm publish --no-git-checks",
|
|
101
|
+
"publish:beta": "npm version prerelease --preid=beta && pnpm publish --tag beta --no-git-checks",
|
|
102
|
+
"publish:alpha": "npm version prerelease --preid=alpha && pnpm publish --tag alpha --no-git-checks",
|
|
103
|
+
"version:patch": "npm version patch",
|
|
104
|
+
"version:minor": "npm version minor",
|
|
105
|
+
"version:major": "npm version major",
|
|
106
|
+
"version:beta": "npm version prerelease --preid=beta",
|
|
107
|
+
"version:alpha": "npm version prerelease --preid=alpha",
|
|
108
|
+
"version:check": "node version-sync.js check",
|
|
109
|
+
"version:sync": "node version-sync.js sync",
|
|
110
|
+
"version:list": "node version-sync.js list",
|
|
111
|
+
"version:next": "node version-sync.js next",
|
|
112
|
+
"postversion": "echo \"✅ Version updated to $(node -p 'require(\"./package.json\").version')\" && (git push && git push --tags || echo \"⚠️ Git push failed - you may need to pull and push manually\")"
|
|
113
|
+
}
|
|
114
|
+
}
|