@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/es/meta.mjs CHANGED
@@ -41,6 +41,9 @@ var TRANSFORM_PATHS_1 = [
41
41
  var TRANSFORM_PATHS_2 = [
42
42
  { path: "calculatedDraftOrder.draftOrder.createdDate" },
43
43
  { path: "calculatedDraftOrder.draftOrder.updatedDate" },
44
+ {
45
+ path: "calculatedDraftOrder.draftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
46
+ },
44
47
  {
45
48
  path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
46
49
  },
@@ -204,6 +207,9 @@ var TRANSFORM_PATHS_10 = [
204
207
  var TRANSFORM_PATHS_11 = [
205
208
  { path: "committedDraftOrder.createdDate" },
206
209
  { path: "committedDraftOrder.updatedDate" },
210
+ {
211
+ path: "committedDraftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
212
+ },
207
213
  { path: "committedDraftOrder.lineItems.lineItem.image.urlExpirationDate" },
208
214
  { path: "committedDraftOrder.lineItems.lineItem.digitalFile.expirationDate" },
209
215
  {
@@ -344,6 +350,9 @@ var TRANSFORM_PATHS_12 = [
344
350
  var TRANSFORM_PATHS_13 = [
345
351
  { path: "committedDraftOrder.createdDate" },
346
352
  { path: "committedDraftOrder.updatedDate" },
353
+ {
354
+ path: "committedDraftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
355
+ },
347
356
  { path: "committedDraftOrder.lineItems.lineItem.image.urlExpirationDate" },
348
357
  { path: "committedDraftOrder.lineItems.lineItem.digitalFile.expirationDate" },
349
358
  {
@@ -486,6 +495,9 @@ var TRANSFORM_PATHS_15 = [
486
495
  var TRANSFORM_PATHS_16 = [
487
496
  { path: "draftOrders.createdDate" },
488
497
  { path: "draftOrders.updatedDate" },
498
+ {
499
+ path: "draftOrders.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
500
+ },
489
501
  { path: "draftOrders.lineItems.lineItem.image.urlExpirationDate" },
490
502
  { path: "draftOrders.lineItems.lineItem.digitalFile.expirationDate" },
491
503
  {
@@ -572,6 +584,9 @@ var TRANSFORM_PATHS_17 = [
572
584
  var TRANSFORM_PATHS_18 = [
573
585
  { path: "draftOrder.createdDate" },
574
586
  { path: "draftOrder.updatedDate" },
587
+ {
588
+ path: "draftOrder.lineItems.changedImplicitly.crossBorderAdjustmentBeforeChange.baseRateCapturedDate"
589
+ },
575
590
  { path: "draftOrder.lineItems.lineItem.image.urlExpirationDate" },
576
591
  { path: "draftOrder.lineItems.lineItem.digitalFile.expirationDate" },
577
592
  {
@@ -1530,6 +1545,23 @@ var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
1530
1545
  JurisdictionType2["SPECIAL"] = "SPECIAL";
1531
1546
  return JurisdictionType2;
1532
1547
  })(JurisdictionType || {});
1548
+ var RepriceStatus = /* @__PURE__ */ ((RepriceStatus2) => {
1549
+ RepriceStatus2["APPLIED"] = "APPLIED";
1550
+ RepriceStatus2["KEPT"] = "KEPT";
1551
+ RepriceStatus2["STRIP_ONLY"] = "STRIP_ONLY";
1552
+ RepriceStatus2["SAME_REGION"] = "SAME_REGION";
1553
+ RepriceStatus2["SAME_COUNTRY"] = "SAME_COUNTRY";
1554
+ RepriceStatus2["NO_DESTINATION_REGION"] = "NO_DESTINATION_REGION";
1555
+ RepriceStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
1556
+ RepriceStatus2["NOT_APPLICABLE_MODIFIERS"] = "NOT_APPLICABLE_MODIFIERS";
1557
+ RepriceStatus2["CONVERTED_CURRENCY_SUBSCRIPTION"] = "CONVERTED_CURRENCY_SUBSCRIPTION";
1558
+ return RepriceStatus2;
1559
+ })(RepriceStatus || {});
1560
+ var BaseRateSource = /* @__PURE__ */ ((BaseRateSource2) => {
1561
+ BaseRateSource2["MANUAL_SPI"] = "MANUAL_SPI";
1562
+ BaseRateSource2["AVALARA_PROBE"] = "AVALARA_PROBE";
1563
+ return BaseRateSource2;
1564
+ })(BaseRateSource || {});
1533
1565
  var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
1534
1566
  DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
1535
1567
  DimensionsUnit2["MM"] = "MM";
@@ -1607,23 +1639,6 @@ var MeasurementUnit = /* @__PURE__ */ ((MeasurementUnit2) => {
1607
1639
  MeasurementUnit2["SQFT"] = "SQFT";
1608
1640
  return MeasurementUnit2;
1609
1641
  })(MeasurementUnit || {});
1610
- var RepriceStatus = /* @__PURE__ */ ((RepriceStatus2) => {
1611
- RepriceStatus2["APPLIED"] = "APPLIED";
1612
- RepriceStatus2["KEPT"] = "KEPT";
1613
- RepriceStatus2["STRIP_ONLY"] = "STRIP_ONLY";
1614
- RepriceStatus2["SAME_REGION"] = "SAME_REGION";
1615
- RepriceStatus2["SAME_COUNTRY"] = "SAME_COUNTRY";
1616
- RepriceStatus2["NO_DESTINATION_REGION"] = "NO_DESTINATION_REGION";
1617
- RepriceStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
1618
- RepriceStatus2["NOT_APPLICABLE_MODIFIERS"] = "NOT_APPLICABLE_MODIFIERS";
1619
- RepriceStatus2["CONVERTED_CURRENCY_SUBSCRIPTION"] = "CONVERTED_CURRENCY_SUBSCRIPTION";
1620
- return RepriceStatus2;
1621
- })(RepriceStatus || {});
1622
- var BaseRateSource = /* @__PURE__ */ ((BaseRateSource2) => {
1623
- BaseRateSource2["MANUAL_SPI"] = "MANUAL_SPI";
1624
- BaseRateSource2["AVALARA_PROBE"] = "AVALARA_PROBE";
1625
- return BaseRateSource2;
1626
- })(BaseRateSource || {});
1627
1642
  var VatType = /* @__PURE__ */ ((VatType2) => {
1628
1643
  VatType2["UNSPECIFIED"] = "UNSPECIFIED";
1629
1644
  VatType2["CPF"] = "CPF";