@thorprovider/medusa-extended 1.13.4 → 1.14.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/medusa-extended",
3
- "version": "1.13.4",
3
+ "version": "1.14.0",
4
4
  "description": "Thor Commerce multi-tenant admin extensions for Medusa v2",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@thorprovider/adapters": "^5.0.8",
28
- "@thorprovider/types": "^5.7.1"
28
+ "@thorprovider/types": "^5.7.8"
29
29
  },
30
30
  "devDependencies": {
31
31
  "msw": "^2.12.3",
@@ -67,6 +67,9 @@ import type {
67
67
  ConvertDropshipperDraftOrderBody,
68
68
  ConvertDropshipperDraftOrderResponse,
69
69
  DeleteDropshipperDraftOrderResponse,
70
+ // Order totals preview
71
+ PreviewDropshipperOrderTotalsBody,
72
+ PreviewDropshipperOrderTotalsResponse,
70
73
  // Dropshipper Addresses
71
74
  DropshipperAddressBody,
72
75
  DropshipperAddressResponse,
@@ -869,6 +872,28 @@ export class DropshipperClient {
869
872
  );
870
873
  }
871
874
 
875
+ /**
876
+ * Preview order totals (including taxes) without creating the order.
877
+ *
878
+ * Replicates the creation pipeline (pricing honoring `unit_price`, region,
879
+ * shipping groups) and computes tax lines with the Medusa tax module, so the
880
+ * totals match what the created order will produce.
881
+ *
882
+ * `POST /admin/thor/dropshipper/orders/preview-totals`
883
+ */
884
+ async previewOrderTotals(
885
+ body: PreviewDropshipperOrderTotalsBody,
886
+ ): Promise<PreviewDropshipperOrderTotalsResponse> {
887
+ return this.request<PreviewDropshipperOrderTotalsResponse>(
888
+ 'POST',
889
+ '/admin/thor/dropshipper/orders/preview-totals',
890
+ {
891
+ ...body,
892
+ currency_code: body.currency_code.toLowerCase(),
893
+ },
894
+ );
895
+ }
896
+
872
897
  /**
873
898
  * Set who collects payment for an order (Solo X).
874
899
  *