@usethrottle/cart 1.0.0 → 3.0.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/README.md +4 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,8 +95,10 @@ const estimate = await quotes.quote({
|
|
|
95
95
|
});
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
For provider-owned totals, set the store to `
|
|
99
|
-
final snapshot
|
|
98
|
+
For provider-owned totals, set the store to `byo` mode on the shipping or tax
|
|
99
|
+
axis (or both) and push the final snapshot through
|
|
100
|
+
`/api/v1/shipping-tax/external-snapshots`. Throttle accepts external pushes
|
|
101
|
+
when at least one axis is in `byo` mode:
|
|
100
102
|
|
|
101
103
|
```ts
|
|
102
104
|
await client.shippingTax.pushExternalSnapshot({
|
package/dist/index.d.cts
CHANGED
|
@@ -57,8 +57,9 @@ interface SelectedShipping {
|
|
|
57
57
|
estimatedDeliveryDays: number | null;
|
|
58
58
|
}
|
|
59
59
|
interface AppliedDiscount {
|
|
60
|
+
discountId?: string | null;
|
|
60
61
|
code: string;
|
|
61
|
-
type: 'percentage' | 'fixed_amount'
|
|
62
|
+
type: 'percentage' | 'fixed_amount';
|
|
62
63
|
amount: number;
|
|
63
64
|
currency: string;
|
|
64
65
|
freeShipping: boolean;
|
|
@@ -212,7 +213,7 @@ interface ShippingTaxCalculationResponse {
|
|
|
212
213
|
snapshotId?: string;
|
|
213
214
|
kind: 'quote' | 'cart_estimate' | 'checkout_final' | 'external_snapshot';
|
|
214
215
|
status: 'estimated' | 'final' | 'failed';
|
|
215
|
-
source: '
|
|
216
|
+
source: 'off' | 'byo' | 'calculated' | 'app_based' | 'external_push';
|
|
216
217
|
storeId: string;
|
|
217
218
|
merchantId?: string;
|
|
218
219
|
currency: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -57,8 +57,9 @@ interface SelectedShipping {
|
|
|
57
57
|
estimatedDeliveryDays: number | null;
|
|
58
58
|
}
|
|
59
59
|
interface AppliedDiscount {
|
|
60
|
+
discountId?: string | null;
|
|
60
61
|
code: string;
|
|
61
|
-
type: 'percentage' | 'fixed_amount'
|
|
62
|
+
type: 'percentage' | 'fixed_amount';
|
|
62
63
|
amount: number;
|
|
63
64
|
currency: string;
|
|
64
65
|
freeShipping: boolean;
|
|
@@ -212,7 +213,7 @@ interface ShippingTaxCalculationResponse {
|
|
|
212
213
|
snapshotId?: string;
|
|
213
214
|
kind: 'quote' | 'cart_estimate' | 'checkout_final' | 'external_snapshot';
|
|
214
215
|
status: 'estimated' | 'final' | 'failed';
|
|
215
|
-
source: '
|
|
216
|
+
source: 'off' | 'byo' | 'calculated' | 'app_based' | 'external_push';
|
|
216
217
|
storeId: string;
|
|
217
218
|
merchantId?: string;
|
|
218
219
|
currency: string;
|