@tagadapay/plugin-sdk 2.7.5 → 2.7.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/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/v2/core/resources/checkout.d.ts +53 -0
- package/dist/v2/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* This main export contains non-React utilities and types.
|
|
12
12
|
*/
|
|
13
|
-
export type { Currency, Customer, Environment, EnvironmentConfig, Locale, Order, OrderAddress, OrderItem, OrderSummary, PickupPoint, Session, Store
|
|
14
|
-
export {
|
|
13
|
+
export type { Currency, Customer, Environment, EnvironmentConfig, Locale, Order, OrderAddress, OrderItem, OrderSummary, PickupPoint, Session, Store } from './react/types';
|
|
14
|
+
export type { CheckoutSessionPreview } from './react/hooks/useCheckout';
|
|
15
|
+
export { convertCurrency, formatMoney, formatMoneyWithoutSymbol, formatSimpleMoney, getCurrencyInfo, minorUnitsToMajorUnits, moneyStringOrNumberToMinorUnits } from './react/utils/money';
|
|
15
16
|
export * from './data/iso3166';
|
|
16
17
|
export * from './data/languages';
|
|
17
18
|
export * from './v2';
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* This main export contains non-React utilities and types.
|
|
12
12
|
*/
|
|
13
13
|
// Export utility functions that don't depend on React
|
|
14
|
-
export { convertCurrency, formatMoney, formatMoneyWithoutSymbol, formatSimpleMoney, getCurrencyInfo, minorUnitsToMajorUnits, moneyStringOrNumberToMinorUnits
|
|
14
|
+
export { convertCurrency, formatMoney, formatMoneyWithoutSymbol, formatSimpleMoney, getCurrencyInfo, minorUnitsToMajorUnits, moneyStringOrNumberToMinorUnits } from './react/utils/money';
|
|
15
15
|
// Export data utilities
|
|
16
16
|
export * from './data/iso3166';
|
|
17
17
|
export * from './data/languages';
|
|
@@ -100,6 +100,59 @@ export interface CheckoutSummary {
|
|
|
100
100
|
amount: number;
|
|
101
101
|
}[];
|
|
102
102
|
}
|
|
103
|
+
export interface CheckoutSessionPreviewAdjustment {
|
|
104
|
+
type: 'Promotion' | 'Tax' | 'Shipping';
|
|
105
|
+
description: string;
|
|
106
|
+
level: 'Order' | 'LineItem';
|
|
107
|
+
sourceId: string;
|
|
108
|
+
amount: number;
|
|
109
|
+
currency: string;
|
|
110
|
+
}
|
|
111
|
+
export interface CheckoutSessionPreviewItem {
|
|
112
|
+
id: string;
|
|
113
|
+
productId: string;
|
|
114
|
+
product: {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
variantId: string;
|
|
119
|
+
variant: {
|
|
120
|
+
name: string;
|
|
121
|
+
description: string;
|
|
122
|
+
imageUrl: string;
|
|
123
|
+
grams: number;
|
|
124
|
+
};
|
|
125
|
+
priceId: string;
|
|
126
|
+
sku: string;
|
|
127
|
+
unitAmount: number;
|
|
128
|
+
quantity: number;
|
|
129
|
+
amount: number;
|
|
130
|
+
adjustedAmount: number;
|
|
131
|
+
currency: string;
|
|
132
|
+
adjustments: CheckoutSessionPreviewAdjustment[];
|
|
133
|
+
recurring?: boolean;
|
|
134
|
+
rebillMode?: 'auth' | 'capture';
|
|
135
|
+
rebillStepIntervalMs?: number;
|
|
136
|
+
interval?: 'day' | 'week' | 'month' | 'year';
|
|
137
|
+
intervalCount?: number;
|
|
138
|
+
totalBillingCycles?: number;
|
|
139
|
+
unitAmountAfterFirstCycle?: number;
|
|
140
|
+
subscriptionSettings?: any;
|
|
141
|
+
orderLineItemProduct: {
|
|
142
|
+
name: string | null;
|
|
143
|
+
} | null;
|
|
144
|
+
orderLineItemVariant: {
|
|
145
|
+
name: string | null;
|
|
146
|
+
imageUrl: string | null;
|
|
147
|
+
} | null;
|
|
148
|
+
}
|
|
149
|
+
export interface CheckoutSessionPreview {
|
|
150
|
+
items: CheckoutSessionPreviewItem[];
|
|
151
|
+
adjustments: CheckoutSessionPreviewAdjustment[];
|
|
152
|
+
totalAmount: number;
|
|
153
|
+
totalAdjustedAmount: number;
|
|
154
|
+
totalPromotionAmount: number;
|
|
155
|
+
}
|
|
103
156
|
export interface Promotion {
|
|
104
157
|
id: string;
|
|
105
158
|
name: string;
|
package/dist/v2/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export * from './core/utils/currency';
|
|
|
11
11
|
export * from './core/utils/pluginConfig';
|
|
12
12
|
export * from './core/utils/products';
|
|
13
13
|
export * from './core/pathRemapping';
|
|
14
|
-
export type { CheckoutData, CheckoutInitParams, CheckoutLineItem, CheckoutSession, Promotion } from './core/resources/checkout';
|
|
14
|
+
export type { CheckoutData, CheckoutInitParams, CheckoutLineItem, CheckoutSession, CheckoutSessionPreview, Promotion } from './core/resources/checkout';
|
|
15
15
|
export type { Order, OrderLineItem } from './core/utils/order';
|
|
16
16
|
export type { PostPurchaseOffer, PostPurchaseOfferItem, PostPurchaseOfferSummary } from './core/resources/postPurchases';
|
|
17
17
|
export type { Offer, OfferItem, OfferSummary } from './core/resources/offers';
|