@wix/auto_sdk_ecom_draft-orders 1.0.190 → 1.0.191
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/build/cjs/index.js +41 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +70 -70
- package/build/cjs/index.typings.js +32 -17
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +70 -70
- package/build/cjs/meta.js +32 -17
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +41 -17
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +70 -70
- package/build/es/index.typings.mjs +32 -17
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +70 -70
- package/build/es/meta.mjs +32 -17
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +75 -70
- package/build/internal/cjs/meta.d.ts +75 -70
- package/build/internal/es/index.typings.d.mts +75 -70
- package/build/internal/es/meta.d.mts +75 -70
- package/package.json +2 -2
|
@@ -423,6 +423,76 @@ declare enum JurisdictionType {
|
|
|
423
423
|
}
|
|
424
424
|
/** @enumType */
|
|
425
425
|
type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
|
|
426
|
+
/**
|
|
427
|
+
* Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
|
|
428
|
+
* the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
|
|
429
|
+
*
|
|
430
|
+
* This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
|
|
431
|
+
* `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
|
|
432
|
+
* Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
|
|
433
|
+
*/
|
|
434
|
+
interface CrossBorderPriceAdjustment {
|
|
435
|
+
/**
|
|
436
|
+
* ID of the tax region whose tax is built into the catalog prices.
|
|
437
|
+
* @format GUID
|
|
438
|
+
*/
|
|
439
|
+
baseTaxRegionId?: string;
|
|
440
|
+
/**
|
|
441
|
+
* ID of the tax region resolved for the destination. Absent when no region matched.
|
|
442
|
+
* @format GUID
|
|
443
|
+
*/
|
|
444
|
+
destinationTaxRegionId?: string | null;
|
|
445
|
+
/** Price per unit as entered by the merchant, with the base region's tax inside it. */
|
|
446
|
+
catalogPrice?: Price;
|
|
447
|
+
/** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
|
|
448
|
+
baseTaxAmount?: Price;
|
|
449
|
+
/** Outcome of the repricing for this line. */
|
|
450
|
+
status?: RepriceStatusWithLiterals;
|
|
451
|
+
/** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
|
|
452
|
+
baseRateSource?: BaseRateSourceWithLiterals;
|
|
453
|
+
/**
|
|
454
|
+
* Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
|
|
455
|
+
* @format DECIMAL_VALUE
|
|
456
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
457
|
+
*/
|
|
458
|
+
baseRate?: string | null;
|
|
459
|
+
/** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
|
|
460
|
+
baseRateCapturedDate?: Date | null;
|
|
461
|
+
/** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
|
|
462
|
+
destinationTaxIncluded?: boolean | null;
|
|
463
|
+
}
|
|
464
|
+
/** Outcome of the repricing for one line. */
|
|
465
|
+
declare enum RepriceStatus {
|
|
466
|
+
/** Base tax removed and the destination's tax applied. */
|
|
467
|
+
APPLIED = "APPLIED",
|
|
468
|
+
/** The caller asked for the line to be left at its price. Nothing was removed. */
|
|
469
|
+
KEPT = "KEPT",
|
|
470
|
+
/** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
|
|
471
|
+
STRIP_ONLY = "STRIP_ONLY",
|
|
472
|
+
/** The destination is the base region. Nothing was removed. */
|
|
473
|
+
SAME_REGION = "SAME_REGION",
|
|
474
|
+
/** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
|
|
475
|
+
SAME_COUNTRY = "SAME_COUNTRY",
|
|
476
|
+
/** No tax region matched the destination. Base tax removed and no destination tax applied. */
|
|
477
|
+
NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
|
|
478
|
+
/** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
|
|
479
|
+
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
480
|
+
/** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
|
|
481
|
+
NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
|
|
482
|
+
/** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
|
|
483
|
+
CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
|
|
484
|
+
}
|
|
485
|
+
/** @enumType */
|
|
486
|
+
type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
|
|
487
|
+
/** Where the base region's rate came from. */
|
|
488
|
+
declare enum BaseRateSource {
|
|
489
|
+
/** The manual tax calculator computed the base tax for this calculation. */
|
|
490
|
+
MANUAL_SPI = "MANUAL_SPI",
|
|
491
|
+
/** The rate captured from Avalara by the embedded-rate probe. */
|
|
492
|
+
AVALARA_PROBE = "AVALARA_PROBE"
|
|
493
|
+
}
|
|
494
|
+
/** @enumType */
|
|
495
|
+
type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
|
|
426
496
|
interface OrderLineItem {
|
|
427
497
|
/**
|
|
428
498
|
* Line item ID.
|
|
@@ -1052,76 +1122,6 @@ interface ServiceProperties {
|
|
|
1052
1122
|
*/
|
|
1053
1123
|
numberOfParticipants?: number | null;
|
|
1054
1124
|
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
|
|
1057
|
-
* the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
|
|
1058
|
-
*
|
|
1059
|
-
* This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
|
|
1060
|
-
* `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
|
|
1061
|
-
* Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
|
|
1062
|
-
*/
|
|
1063
|
-
interface CrossBorderPriceAdjustment {
|
|
1064
|
-
/**
|
|
1065
|
-
* ID of the tax region whose tax is built into the catalog prices.
|
|
1066
|
-
* @format GUID
|
|
1067
|
-
*/
|
|
1068
|
-
baseTaxRegionId?: string;
|
|
1069
|
-
/**
|
|
1070
|
-
* ID of the tax region resolved for the destination. Absent when no region matched.
|
|
1071
|
-
* @format GUID
|
|
1072
|
-
*/
|
|
1073
|
-
destinationTaxRegionId?: string | null;
|
|
1074
|
-
/** Price per unit as entered by the merchant, with the base region's tax inside it. */
|
|
1075
|
-
catalogPrice?: Price;
|
|
1076
|
-
/** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
|
|
1077
|
-
baseTaxAmount?: Price;
|
|
1078
|
-
/** Outcome of the repricing for this line. */
|
|
1079
|
-
status?: RepriceStatusWithLiterals;
|
|
1080
|
-
/** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
|
|
1081
|
-
baseRateSource?: BaseRateSourceWithLiterals;
|
|
1082
|
-
/**
|
|
1083
|
-
* Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
|
|
1084
|
-
* @format DECIMAL_VALUE
|
|
1085
|
-
* @decimalValue options { gte:0, maxScale:6 }
|
|
1086
|
-
*/
|
|
1087
|
-
baseRate?: string | null;
|
|
1088
|
-
/** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
|
|
1089
|
-
baseRateCapturedDate?: Date | null;
|
|
1090
|
-
/** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
|
|
1091
|
-
destinationTaxIncluded?: boolean | null;
|
|
1092
|
-
}
|
|
1093
|
-
/** Outcome of the repricing for one line. */
|
|
1094
|
-
declare enum RepriceStatus {
|
|
1095
|
-
/** Base tax removed and the destination's tax applied. */
|
|
1096
|
-
APPLIED = "APPLIED",
|
|
1097
|
-
/** The caller asked for the line to be left at its price. Nothing was removed. */
|
|
1098
|
-
KEPT = "KEPT",
|
|
1099
|
-
/** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
|
|
1100
|
-
STRIP_ONLY = "STRIP_ONLY",
|
|
1101
|
-
/** The destination is the base region. Nothing was removed. */
|
|
1102
|
-
SAME_REGION = "SAME_REGION",
|
|
1103
|
-
/** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
|
|
1104
|
-
SAME_COUNTRY = "SAME_COUNTRY",
|
|
1105
|
-
/** No tax region matched the destination. Base tax removed and no destination tax applied. */
|
|
1106
|
-
NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
|
|
1107
|
-
/** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
|
|
1108
|
-
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
1109
|
-
/** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
|
|
1110
|
-
NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
|
|
1111
|
-
/** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
|
|
1112
|
-
CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
|
|
1113
|
-
}
|
|
1114
|
-
/** @enumType */
|
|
1115
|
-
type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
|
|
1116
|
-
/** Where the base region's rate came from. */
|
|
1117
|
-
declare enum BaseRateSource {
|
|
1118
|
-
/** The manual tax calculator computed the base tax for this calculation. */
|
|
1119
|
-
MANUAL_SPI = "MANUAL_SPI",
|
|
1120
|
-
/** The rate captured from Avalara by the embedded-rate probe. */
|
|
1121
|
-
AVALARA_PROBE = "AVALARA_PROBE"
|
|
1122
|
-
}
|
|
1123
|
-
/** @enumType */
|
|
1124
|
-
type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
|
|
1125
1125
|
interface ItemChangedDetails {
|
|
1126
1126
|
/**
|
|
1127
1127
|
* Line item quantity before change.
|
|
@@ -142,6 +142,9 @@ var TRANSFORM_PATHS_1 = [
|
|
|
142
142
|
var TRANSFORM_PATHS_2 = [
|
|
143
143
|
{ path: "calculatedDraftOrder.draftOrder.createdDate" },
|
|
144
144
|
{ path: "calculatedDraftOrder.draftOrder.updatedDate" },
|
|
145
|
+
{
|
|
146
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
|
|
147
|
+
},
|
|
145
148
|
{
|
|
146
149
|
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
|
|
147
150
|
},
|
|
@@ -305,6 +308,9 @@ var TRANSFORM_PATHS_10 = [
|
|
|
305
308
|
var TRANSFORM_PATHS_11 = [
|
|
306
309
|
{ path: "committedDraftOrder.createdDate" },
|
|
307
310
|
{ path: "committedDraftOrder.updatedDate" },
|
|
311
|
+
{
|
|
312
|
+
path: "committedDraftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
|
|
313
|
+
},
|
|
308
314
|
{ path: "committedDraftOrder.lineItems.lineItem.image.urlExpirationDate" },
|
|
309
315
|
{ path: "committedDraftOrder.lineItems.lineItem.digitalFile.expirationDate" },
|
|
310
316
|
{
|
|
@@ -445,6 +451,9 @@ var TRANSFORM_PATHS_12 = [
|
|
|
445
451
|
var TRANSFORM_PATHS_13 = [
|
|
446
452
|
{ path: "committedDraftOrder.createdDate" },
|
|
447
453
|
{ path: "committedDraftOrder.updatedDate" },
|
|
454
|
+
{
|
|
455
|
+
path: "committedDraftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
|
|
456
|
+
},
|
|
448
457
|
{ path: "committedDraftOrder.lineItems.lineItem.image.urlExpirationDate" },
|
|
449
458
|
{ path: "committedDraftOrder.lineItems.lineItem.digitalFile.expirationDate" },
|
|
450
459
|
{
|
|
@@ -587,6 +596,9 @@ var TRANSFORM_PATHS_15 = [
|
|
|
587
596
|
var TRANSFORM_PATHS_16 = [
|
|
588
597
|
{ path: "draftOrders.createdDate" },
|
|
589
598
|
{ path: "draftOrders.updatedDate" },
|
|
599
|
+
{
|
|
600
|
+
path: "draftOrders.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
|
|
601
|
+
},
|
|
590
602
|
{ path: "draftOrders.lineItems.lineItem.image.urlExpirationDate" },
|
|
591
603
|
{ path: "draftOrders.lineItems.lineItem.digitalFile.expirationDate" },
|
|
592
604
|
{
|
|
@@ -673,6 +685,9 @@ var TRANSFORM_PATHS_17 = [
|
|
|
673
685
|
var TRANSFORM_PATHS_18 = [
|
|
674
686
|
{ path: "draftOrder.createdDate" },
|
|
675
687
|
{ path: "draftOrder.updatedDate" },
|
|
688
|
+
{
|
|
689
|
+
path: "draftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
|
|
690
|
+
},
|
|
676
691
|
{ path: "draftOrder.lineItems.lineItem.image.urlExpirationDate" },
|
|
677
692
|
{ path: "draftOrder.lineItems.lineItem.digitalFile.expirationDate" },
|
|
678
693
|
{
|
|
@@ -1799,6 +1814,23 @@ var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
|
|
|
1799
1814
|
JurisdictionType2["SPECIAL"] = "SPECIAL";
|
|
1800
1815
|
return JurisdictionType2;
|
|
1801
1816
|
})(JurisdictionType || {});
|
|
1817
|
+
var RepriceStatus = /* @__PURE__ */ ((RepriceStatus2) => {
|
|
1818
|
+
RepriceStatus2["APPLIED"] = "APPLIED";
|
|
1819
|
+
RepriceStatus2["KEPT"] = "KEPT";
|
|
1820
|
+
RepriceStatus2["STRIP_ONLY"] = "STRIP_ONLY";
|
|
1821
|
+
RepriceStatus2["SAME_REGION"] = "SAME_REGION";
|
|
1822
|
+
RepriceStatus2["SAME_COUNTRY"] = "SAME_COUNTRY";
|
|
1823
|
+
RepriceStatus2["NO_DESTINATION_REGION"] = "NO_DESTINATION_REGION";
|
|
1824
|
+
RepriceStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
|
|
1825
|
+
RepriceStatus2["NOT_APPLICABLE_MODIFIERS"] = "NOT_APPLICABLE_MODIFIERS";
|
|
1826
|
+
RepriceStatus2["CONVERTED_CURRENCY_SUBSCRIPTION"] = "CONVERTED_CURRENCY_SUBSCRIPTION";
|
|
1827
|
+
return RepriceStatus2;
|
|
1828
|
+
})(RepriceStatus || {});
|
|
1829
|
+
var BaseRateSource = /* @__PURE__ */ ((BaseRateSource2) => {
|
|
1830
|
+
BaseRateSource2["MANUAL_SPI"] = "MANUAL_SPI";
|
|
1831
|
+
BaseRateSource2["AVALARA_PROBE"] = "AVALARA_PROBE";
|
|
1832
|
+
return BaseRateSource2;
|
|
1833
|
+
})(BaseRateSource || {});
|
|
1802
1834
|
var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
|
|
1803
1835
|
DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
|
|
1804
1836
|
DimensionsUnit2["MM"] = "MM";
|
|
@@ -1876,23 +1908,6 @@ var MeasurementUnit = /* @__PURE__ */ ((MeasurementUnit2) => {
|
|
|
1876
1908
|
MeasurementUnit2["SQFT"] = "SQFT";
|
|
1877
1909
|
return MeasurementUnit2;
|
|
1878
1910
|
})(MeasurementUnit || {});
|
|
1879
|
-
var RepriceStatus = /* @__PURE__ */ ((RepriceStatus2) => {
|
|
1880
|
-
RepriceStatus2["APPLIED"] = "APPLIED";
|
|
1881
|
-
RepriceStatus2["KEPT"] = "KEPT";
|
|
1882
|
-
RepriceStatus2["STRIP_ONLY"] = "STRIP_ONLY";
|
|
1883
|
-
RepriceStatus2["SAME_REGION"] = "SAME_REGION";
|
|
1884
|
-
RepriceStatus2["SAME_COUNTRY"] = "SAME_COUNTRY";
|
|
1885
|
-
RepriceStatus2["NO_DESTINATION_REGION"] = "NO_DESTINATION_REGION";
|
|
1886
|
-
RepriceStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
|
|
1887
|
-
RepriceStatus2["NOT_APPLICABLE_MODIFIERS"] = "NOT_APPLICABLE_MODIFIERS";
|
|
1888
|
-
RepriceStatus2["CONVERTED_CURRENCY_SUBSCRIPTION"] = "CONVERTED_CURRENCY_SUBSCRIPTION";
|
|
1889
|
-
return RepriceStatus2;
|
|
1890
|
-
})(RepriceStatus || {});
|
|
1891
|
-
var BaseRateSource = /* @__PURE__ */ ((BaseRateSource2) => {
|
|
1892
|
-
BaseRateSource2["MANUAL_SPI"] = "MANUAL_SPI";
|
|
1893
|
-
BaseRateSource2["AVALARA_PROBE"] = "AVALARA_PROBE";
|
|
1894
|
-
return BaseRateSource2;
|
|
1895
|
-
})(BaseRateSource || {});
|
|
1896
1911
|
var VatType = /* @__PURE__ */ ((VatType2) => {
|
|
1897
1912
|
VatType2["UNSPECIFIED"] = "UNSPECIFIED";
|
|
1898
1913
|
VatType2["CPF"] = "CPF";
|