@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.
@@ -1052,76 +1126,6 @@ interface ServiceProperties {
1052
1126
  */
1053
1127
  numberOfParticipants?: number | null;
1054
1128
  }
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
1129
  interface ItemChangedDetails {
1126
1130
  /**
1127
1131
  * Line item quantity before change.
@@ -1995,6 +1999,11 @@ interface OrderTaxInfo {
1995
1999
  * @readonly
1996
2000
  */
1997
2001
  taxExempt?: boolean | null;
2002
+ /**
2003
+ * Total amount exempt from tax calculations.
2004
+ * @readonly
2005
+ */
2006
+ totalExempt?: Price;
1998
2007
  }
1999
2008
  /**
2000
2009
  * 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.
@@ -2026,6 +2035,8 @@ interface OrderTaxBreakdown {
2026
2035
  rate?: string;
2027
2036
  /** The sum of all the tax from line items that calculated by the tax identifiers. */
2028
2037
  aggregatedTaxAmount?: Price;
2038
+ /** Total amount exempt from this tax, summed across all line items. */
2039
+ aggregatedExemptAmount?: Price;
2029
2040
  }
2030
2041
  /** Cross-border repricing outcome of one calculation. Replaced on every recalculation of the order; the order-level marker that never changes is `Order.crossBorderRepricing`. */
2031
2042
  interface CrossBorderCalculation {
@@ -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";