@tagadapay/plugin-sdk 2.7.6 → 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.
@@ -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;
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagadapay/plugin-sdk",
3
- "version": "2.7.6",
3
+ "version": "2.7.7",
4
4
  "description": "Modern React SDK for building Tagada Pay plugins",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",