@wix/auto_sdk_ecom_draft-orders 1.0.190 → 1.0.192

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.
@@ -375,6 +375,8 @@ interface LineItemTaxInfo {
375
375
  * @maxSize 7
376
376
  */
377
377
  taxBreakdown?: LineItemTaxBreakdown[];
378
+ /** Amount of the line item price that was exempt from tax. */
379
+ exemptAmount?: Price;
378
380
  }
379
381
  /**
380
382
  * TaxBreakdown represents tax information for a line item.
@@ -411,6 +413,8 @@ interface LineItemTaxBreakdown {
411
413
  nonTaxableAmount?: Price;
412
414
  /** Taxable amount of the line item price. */
413
415
  taxableAmount?: Price;
416
+ /** Amount of the line item price that was exempt from this authority. */
417
+ exemptAmount?: Price;
414
418
  }
415
419
  /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
416
420
  declare enum JurisdictionType {
@@ -423,6 +427,76 @@ declare enum JurisdictionType {
423
427
  }
424
428
  /** @enumType */
425
429
  type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
430
+ /**
431
+ * Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
432
+ * the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
433
+ *
434
+ * This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
435
+ * `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
436
+ * Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
437
+ */
438
+ interface CrossBorderPriceAdjustment {
439
+ /**
440
+ * ID of the tax region whose tax is built into the catalog prices.
441
+ * @format GUID
442
+ */
443
+ baseTaxRegionId?: string;
444
+ /**
445
+ * ID of the tax region resolved for the destination. Absent when no region matched.
446
+ * @format GUID
447
+ */
448
+ destinationTaxRegionId?: string | null;
449
+ /** Price per unit as entered by the merchant, with the base region's tax inside it. */
450
+ catalogPrice?: Price;
451
+ /** 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. */
452
+ baseTaxAmount?: Price;
453
+ /** Outcome of the repricing for this line. */
454
+ status?: RepriceStatusWithLiterals;
455
+ /** 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`. */
456
+ baseRateSource?: BaseRateSourceWithLiterals;
457
+ /**
458
+ * 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.
459
+ * @format DECIMAL_VALUE
460
+ * @decimalValue options { gte:0, maxScale:6 }
461
+ */
462
+ baseRate?: string | null;
463
+ /** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
464
+ baseRateCapturedDate?: Date | null;
465
+ /** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
466
+ destinationTaxIncluded?: boolean | null;
467
+ }
468
+ /** Outcome of the repricing for one line. */
469
+ declare enum RepriceStatus {
470
+ /** Base tax removed and the destination's tax applied. */
471
+ APPLIED = "APPLIED",
472
+ /** The caller asked for the line to be left at its price. Nothing was removed. */
473
+ KEPT = "KEPT",
474
+ /** 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`. */
475
+ STRIP_ONLY = "STRIP_ONLY",
476
+ /** The destination is the base region. Nothing was removed. */
477
+ SAME_REGION = "SAME_REGION",
478
+ /** 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. */
479
+ SAME_COUNTRY = "SAME_COUNTRY",
480
+ /** No tax region matched the destination. Base tax removed and no destination tax applied. */
481
+ NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
482
+ /** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
483
+ NOT_APPLICABLE = "NOT_APPLICABLE",
484
+ /** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
485
+ NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
486
+ /** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
487
+ CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
488
+ }
489
+ /** @enumType */
490
+ type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
491
+ /** Where the base region's rate came from. */
492
+ declare enum BaseRateSource {
493
+ /** The manual tax calculator computed the base tax for this calculation. */
494
+ MANUAL_SPI = "MANUAL_SPI",
495
+ /** The rate captured from Avalara by the embedded-rate probe. */
496
+ AVALARA_PROBE = "AVALARA_PROBE"
497
+ }
498
+ /** @enumType */
499
+ type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
426
500
  interface OrderLineItem {
427
501
  /**
428
502
  * Line item ID.
@@ -1075,76 +1149,6 @@ interface ServiceProperties {
1075
1149
  */
1076
1150
  numberOfParticipants?: number | null;
1077
1151
  }
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
1152
  interface ItemChangedDetails {
1149
1153
  /**
1150
1154
  * Line item quantity before change.
@@ -2018,6 +2022,11 @@ interface OrderTaxInfo {
2018
2022
  * @readonly
2019
2023
  */
2020
2024
  taxExempt?: boolean | null;
2025
+ /**
2026
+ * Total amount exempt from tax calculations.
2027
+ * @readonly
2028
+ */
2029
+ totalExempt?: Price;
2021
2030
  }
2022
2031
  /**
2023
2032
  * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate.
@@ -2049,6 +2058,8 @@ interface OrderTaxBreakdown {
2049
2058
  rate?: string;
2050
2059
  /** The sum of all the tax from line items that calculated by the tax identifiers. */
2051
2060
  aggregatedTaxAmount?: Price;
2061
+ /** Total amount exempt from this tax, summed across all line items. */
2062
+ aggregatedExemptAmount?: Price;
2052
2063
  }
2053
2064
  /** Cross-border repricing outcome of one calculation. Replaced on every recalculation of the order; the order-level marker that never changes is `Order.crossBorderRepricing`. */
2054
2065
  interface CrossBorderCalculation {
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";