@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.
@@ -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.
@@ -1075,76 +1145,6 @@ interface ServiceProperties {
1075
1145
  */
1076
1146
  numberOfParticipants?: number | null;
1077
1147
  }
1078
- /**
1079
- * Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
1080
- * the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
1081
- *
1082
- * This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
1083
- * `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
1084
- * Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
1085
- */
1086
- interface CrossBorderPriceAdjustment {
1087
- /**
1088
- * ID of the tax region whose tax is built into the catalog prices.
1089
- * @format GUID
1090
- */
1091
- baseTaxRegionId?: string;
1092
- /**
1093
- * ID of the tax region resolved for the destination. Absent when no region matched.
1094
- * @format GUID
1095
- */
1096
- destinationTaxRegionId?: string | null;
1097
- /** Price per unit as entered by the merchant, with the base region's tax inside it. */
1098
- catalogPrice?: Price;
1099
- /** 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. */
1100
- baseTaxAmount?: Price;
1101
- /** Outcome of the repricing for this line. */
1102
- status?: RepriceStatusWithLiterals;
1103
- /** 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`. */
1104
- baseRateSource?: BaseRateSourceWithLiterals;
1105
- /**
1106
- * 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.
1107
- * @format DECIMAL_VALUE
1108
- * @decimalValue options { gte:0, maxScale:6 }
1109
- */
1110
- baseRate?: string | null;
1111
- /** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
1112
- baseRateCapturedDate?: Date | null;
1113
- /** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
1114
- destinationTaxIncluded?: boolean | null;
1115
- }
1116
- /** Outcome of the repricing for one line. */
1117
- declare enum RepriceStatus {
1118
- /** Base tax removed and the destination's tax applied. */
1119
- APPLIED = "APPLIED",
1120
- /** The caller asked for the line to be left at its price. Nothing was removed. */
1121
- KEPT = "KEPT",
1122
- /** 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`. */
1123
- STRIP_ONLY = "STRIP_ONLY",
1124
- /** The destination is the base region. Nothing was removed. */
1125
- SAME_REGION = "SAME_REGION",
1126
- /** 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. */
1127
- SAME_COUNTRY = "SAME_COUNTRY",
1128
- /** No tax region matched the destination. Base tax removed and no destination tax applied. */
1129
- NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
1130
- /** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
1131
- NOT_APPLICABLE = "NOT_APPLICABLE",
1132
- /** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
1133
- NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
1134
- /** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
1135
- CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
1136
- }
1137
- /** @enumType */
1138
- type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
1139
- /** Where the base region's rate came from. */
1140
- declare enum BaseRateSource {
1141
- /** The manual tax calculator computed the base tax for this calculation. */
1142
- MANUAL_SPI = "MANUAL_SPI",
1143
- /** The rate captured from Avalara by the embedded-rate probe. */
1144
- AVALARA_PROBE = "AVALARA_PROBE"
1145
- }
1146
- /** @enumType */
1147
- type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
1148
1148
  interface ItemChangedDetails {
1149
1149
  /**
1150
1150
  * Line item quantity before change.
package/build/cjs/meta.js CHANGED
@@ -135,6 +135,9 @@ var TRANSFORM_PATHS_1 = [
135
135
  var TRANSFORM_PATHS_2 = [
136
136
  { path: "calculatedDraftOrder.draftOrder.createdDate" },
137
137
  { path: "calculatedDraftOrder.draftOrder.updatedDate" },
138
+ {
139
+ path: "calculatedDraftOrder.draftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
140
+ },
138
141
  {
139
142
  path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
140
143
  },
@@ -298,6 +301,9 @@ var TRANSFORM_PATHS_10 = [
298
301
  var TRANSFORM_PATHS_11 = [
299
302
  { path: "committedDraftOrder.createdDate" },
300
303
  { path: "committedDraftOrder.updatedDate" },
304
+ {
305
+ path: "committedDraftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
306
+ },
301
307
  { path: "committedDraftOrder.lineItems.lineItem.image.urlExpirationDate" },
302
308
  { path: "committedDraftOrder.lineItems.lineItem.digitalFile.expirationDate" },
303
309
  {
@@ -438,6 +444,9 @@ var TRANSFORM_PATHS_12 = [
438
444
  var TRANSFORM_PATHS_13 = [
439
445
  { path: "committedDraftOrder.createdDate" },
440
446
  { path: "committedDraftOrder.updatedDate" },
447
+ {
448
+ path: "committedDraftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
449
+ },
441
450
  { path: "committedDraftOrder.lineItems.lineItem.image.urlExpirationDate" },
442
451
  { path: "committedDraftOrder.lineItems.lineItem.digitalFile.expirationDate" },
443
452
  {
@@ -580,6 +589,9 @@ var TRANSFORM_PATHS_15 = [
580
589
  var TRANSFORM_PATHS_16 = [
581
590
  { path: "draftOrders.createdDate" },
582
591
  { path: "draftOrders.updatedDate" },
592
+ {
593
+ path: "draftOrders.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
594
+ },
583
595
  { path: "draftOrders.lineItems.lineItem.image.urlExpirationDate" },
584
596
  { path: "draftOrders.lineItems.lineItem.digitalFile.expirationDate" },
585
597
  {
@@ -666,6 +678,9 @@ var TRANSFORM_PATHS_17 = [
666
678
  var TRANSFORM_PATHS_18 = [
667
679
  { path: "draftOrder.createdDate" },
668
680
  { path: "draftOrder.updatedDate" },
681
+ {
682
+ path: "draftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
683
+ },
669
684
  { path: "draftOrder.lineItems.lineItem.image.urlExpirationDate" },
670
685
  { path: "draftOrder.lineItems.lineItem.digitalFile.expirationDate" },
671
686
  {
@@ -1624,6 +1639,23 @@ var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
1624
1639
  JurisdictionType2["SPECIAL"] = "SPECIAL";
1625
1640
  return JurisdictionType2;
1626
1641
  })(JurisdictionType || {});
1642
+ var RepriceStatus = /* @__PURE__ */ ((RepriceStatus2) => {
1643
+ RepriceStatus2["APPLIED"] = "APPLIED";
1644
+ RepriceStatus2["KEPT"] = "KEPT";
1645
+ RepriceStatus2["STRIP_ONLY"] = "STRIP_ONLY";
1646
+ RepriceStatus2["SAME_REGION"] = "SAME_REGION";
1647
+ RepriceStatus2["SAME_COUNTRY"] = "SAME_COUNTRY";
1648
+ RepriceStatus2["NO_DESTINATION_REGION"] = "NO_DESTINATION_REGION";
1649
+ RepriceStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
1650
+ RepriceStatus2["NOT_APPLICABLE_MODIFIERS"] = "NOT_APPLICABLE_MODIFIERS";
1651
+ RepriceStatus2["CONVERTED_CURRENCY_SUBSCRIPTION"] = "CONVERTED_CURRENCY_SUBSCRIPTION";
1652
+ return RepriceStatus2;
1653
+ })(RepriceStatus || {});
1654
+ var BaseRateSource = /* @__PURE__ */ ((BaseRateSource2) => {
1655
+ BaseRateSource2["MANUAL_SPI"] = "MANUAL_SPI";
1656
+ BaseRateSource2["AVALARA_PROBE"] = "AVALARA_PROBE";
1657
+ return BaseRateSource2;
1658
+ })(BaseRateSource || {});
1627
1659
  var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
1628
1660
  DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
1629
1661
  DimensionsUnit2["MM"] = "MM";
@@ -1701,23 +1733,6 @@ var MeasurementUnit = /* @__PURE__ */ ((MeasurementUnit2) => {
1701
1733
  MeasurementUnit2["SQFT"] = "SQFT";
1702
1734
  return MeasurementUnit2;
1703
1735
  })(MeasurementUnit || {});
1704
- var RepriceStatus = /* @__PURE__ */ ((RepriceStatus2) => {
1705
- RepriceStatus2["APPLIED"] = "APPLIED";
1706
- RepriceStatus2["KEPT"] = "KEPT";
1707
- RepriceStatus2["STRIP_ONLY"] = "STRIP_ONLY";
1708
- RepriceStatus2["SAME_REGION"] = "SAME_REGION";
1709
- RepriceStatus2["SAME_COUNTRY"] = "SAME_COUNTRY";
1710
- RepriceStatus2["NO_DESTINATION_REGION"] = "NO_DESTINATION_REGION";
1711
- RepriceStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
1712
- RepriceStatus2["NOT_APPLICABLE_MODIFIERS"] = "NOT_APPLICABLE_MODIFIERS";
1713
- RepriceStatus2["CONVERTED_CURRENCY_SUBSCRIPTION"] = "CONVERTED_CURRENCY_SUBSCRIPTION";
1714
- return RepriceStatus2;
1715
- })(RepriceStatus || {});
1716
- var BaseRateSource = /* @__PURE__ */ ((BaseRateSource2) => {
1717
- BaseRateSource2["MANUAL_SPI"] = "MANUAL_SPI";
1718
- BaseRateSource2["AVALARA_PROBE"] = "AVALARA_PROBE";
1719
- return BaseRateSource2;
1720
- })(BaseRateSource || {});
1721
1736
  var VatType = /* @__PURE__ */ ((VatType2) => {
1722
1737
  VatType2["UNSPECIFIED"] = "UNSPECIFIED";
1723
1738
  VatType2["CPF"] = "CPF";