@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.
@@ -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.
@@ -49,6 +49,9 @@ var TRANSFORM_PATHS_1 = [
49
49
  var TRANSFORM_PATHS_2 = [
50
50
  { path: "calculatedDraftOrder.draftOrder.createdDate" },
51
51
  { path: "calculatedDraftOrder.draftOrder.updatedDate" },
52
+ {
53
+ path: "calculatedDraftOrder.draftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
54
+ },
52
55
  {
53
56
  path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
54
57
  },
@@ -212,6 +215,9 @@ var TRANSFORM_PATHS_10 = [
212
215
  var TRANSFORM_PATHS_11 = [
213
216
  { path: "committedDraftOrder.createdDate" },
214
217
  { path: "committedDraftOrder.updatedDate" },
218
+ {
219
+ path: "committedDraftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
220
+ },
215
221
  { path: "committedDraftOrder.lineItems.lineItem.image.urlExpirationDate" },
216
222
  { path: "committedDraftOrder.lineItems.lineItem.digitalFile.expirationDate" },
217
223
  {
@@ -352,6 +358,9 @@ var TRANSFORM_PATHS_12 = [
352
358
  var TRANSFORM_PATHS_13 = [
353
359
  { path: "committedDraftOrder.createdDate" },
354
360
  { path: "committedDraftOrder.updatedDate" },
361
+ {
362
+ path: "committedDraftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
363
+ },
355
364
  { path: "committedDraftOrder.lineItems.lineItem.image.urlExpirationDate" },
356
365
  { path: "committedDraftOrder.lineItems.lineItem.digitalFile.expirationDate" },
357
366
  {
@@ -494,6 +503,9 @@ var TRANSFORM_PATHS_15 = [
494
503
  var TRANSFORM_PATHS_16 = [
495
504
  { path: "draftOrders.createdDate" },
496
505
  { path: "draftOrders.updatedDate" },
506
+ {
507
+ path: "draftOrders.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
508
+ },
497
509
  { path: "draftOrders.lineItems.lineItem.image.urlExpirationDate" },
498
510
  { path: "draftOrders.lineItems.lineItem.digitalFile.expirationDate" },
499
511
  {
@@ -580,6 +592,9 @@ var TRANSFORM_PATHS_17 = [
580
592
  var TRANSFORM_PATHS_18 = [
581
593
  { path: "draftOrder.createdDate" },
582
594
  { path: "draftOrder.updatedDate" },
595
+ {
596
+ path: "draftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
597
+ },
583
598
  { path: "draftOrder.lineItems.lineItem.image.urlExpirationDate" },
584
599
  { path: "draftOrder.lineItems.lineItem.digitalFile.expirationDate" },
585
600
  {
@@ -1706,6 +1721,23 @@ var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
1706
1721
  JurisdictionType2["SPECIAL"] = "SPECIAL";
1707
1722
  return JurisdictionType2;
1708
1723
  })(JurisdictionType || {});
1724
+ var RepriceStatus = /* @__PURE__ */ ((RepriceStatus2) => {
1725
+ RepriceStatus2["APPLIED"] = "APPLIED";
1726
+ RepriceStatus2["KEPT"] = "KEPT";
1727
+ RepriceStatus2["STRIP_ONLY"] = "STRIP_ONLY";
1728
+ RepriceStatus2["SAME_REGION"] = "SAME_REGION";
1729
+ RepriceStatus2["SAME_COUNTRY"] = "SAME_COUNTRY";
1730
+ RepriceStatus2["NO_DESTINATION_REGION"] = "NO_DESTINATION_REGION";
1731
+ RepriceStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
1732
+ RepriceStatus2["NOT_APPLICABLE_MODIFIERS"] = "NOT_APPLICABLE_MODIFIERS";
1733
+ RepriceStatus2["CONVERTED_CURRENCY_SUBSCRIPTION"] = "CONVERTED_CURRENCY_SUBSCRIPTION";
1734
+ return RepriceStatus2;
1735
+ })(RepriceStatus || {});
1736
+ var BaseRateSource = /* @__PURE__ */ ((BaseRateSource2) => {
1737
+ BaseRateSource2["MANUAL_SPI"] = "MANUAL_SPI";
1738
+ BaseRateSource2["AVALARA_PROBE"] = "AVALARA_PROBE";
1739
+ return BaseRateSource2;
1740
+ })(BaseRateSource || {});
1709
1741
  var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
1710
1742
  DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
1711
1743
  DimensionsUnit2["MM"] = "MM";
@@ -1783,23 +1815,6 @@ var MeasurementUnit = /* @__PURE__ */ ((MeasurementUnit2) => {
1783
1815
  MeasurementUnit2["SQFT"] = "SQFT";
1784
1816
  return MeasurementUnit2;
1785
1817
  })(MeasurementUnit || {});
1786
- var RepriceStatus = /* @__PURE__ */ ((RepriceStatus2) => {
1787
- RepriceStatus2["APPLIED"] = "APPLIED";
1788
- RepriceStatus2["KEPT"] = "KEPT";
1789
- RepriceStatus2["STRIP_ONLY"] = "STRIP_ONLY";
1790
- RepriceStatus2["SAME_REGION"] = "SAME_REGION";
1791
- RepriceStatus2["SAME_COUNTRY"] = "SAME_COUNTRY";
1792
- RepriceStatus2["NO_DESTINATION_REGION"] = "NO_DESTINATION_REGION";
1793
- RepriceStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
1794
- RepriceStatus2["NOT_APPLICABLE_MODIFIERS"] = "NOT_APPLICABLE_MODIFIERS";
1795
- RepriceStatus2["CONVERTED_CURRENCY_SUBSCRIPTION"] = "CONVERTED_CURRENCY_SUBSCRIPTION";
1796
- return RepriceStatus2;
1797
- })(RepriceStatus || {});
1798
- var BaseRateSource = /* @__PURE__ */ ((BaseRateSource2) => {
1799
- BaseRateSource2["MANUAL_SPI"] = "MANUAL_SPI";
1800
- BaseRateSource2["AVALARA_PROBE"] = "AVALARA_PROBE";
1801
- return BaseRateSource2;
1802
- })(BaseRateSource || {});
1803
1818
  var VatType = /* @__PURE__ */ ((VatType2) => {
1804
1819
  VatType2["UNSPECIFIED"] = "UNSPECIFIED";
1805
1820
  VatType2["CPF"] = "CPF";