@thorprovider/medusa-extended 1.11.9 → 1.13.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/dist/index.d.mts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +32 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/dropshipper.live-smoke.test.ts +127 -73
- package/src/dropshipper.test.ts +90 -36
- package/src/dropshipper.ts +45 -16
package/dist/index.mjs
CHANGED
|
@@ -637,6 +637,29 @@ var DropshipperClient = class {
|
|
|
637
637
|
`/admin/thor/dropshipper/notifications?${qs}`
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
|
+
/**
|
|
641
|
+
* Get the authenticated dropshipper's notification preferences.
|
|
642
|
+
*
|
|
643
|
+
* `GET /admin/thor/dropshipper/notifications/preferences`
|
|
644
|
+
*/
|
|
645
|
+
async getNotificationPreferences() {
|
|
646
|
+
return this.request(
|
|
647
|
+
"GET",
|
|
648
|
+
"/admin/thor/dropshipper/notifications/preferences"
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Update the authenticated dropshipper's notification preferences.
|
|
653
|
+
*
|
|
654
|
+
* `PATCH /admin/thor/dropshipper/notifications/preferences`
|
|
655
|
+
*/
|
|
656
|
+
async updateNotificationPreferences(body) {
|
|
657
|
+
return this.request(
|
|
658
|
+
"PATCH",
|
|
659
|
+
"/admin/thor/dropshipper/notifications/preferences",
|
|
660
|
+
body
|
|
661
|
+
);
|
|
662
|
+
}
|
|
640
663
|
// -------------------------------------------------------------------------
|
|
641
664
|
// Onboarding (Solo X)
|
|
642
665
|
// -------------------------------------------------------------------------
|
|
@@ -817,20 +840,18 @@ var DropshipperClient = class {
|
|
|
817
840
|
);
|
|
818
841
|
}
|
|
819
842
|
/**
|
|
820
|
-
* List shipping options for a manual dropshipper order.
|
|
843
|
+
* List shipping groups and their valid options for a manual dropshipper order.
|
|
821
844
|
*
|
|
822
|
-
* `
|
|
845
|
+
* `POST /admin/thor/dropshipper/orders/shipping-options`
|
|
823
846
|
*/
|
|
824
|
-
async getOrderShippingOptions(
|
|
825
|
-
const qs = new URLSearchParams({
|
|
826
|
-
currency_code: params.currency_code.toLowerCase(),
|
|
827
|
-
...params.country_code ? { country_code: params.country_code.toLowerCase() } : {},
|
|
828
|
-
...params.province ? { province: params.province } : {},
|
|
829
|
-
...params.city ? { city: params.city } : {}
|
|
830
|
-
});
|
|
847
|
+
async getOrderShippingOptions(body) {
|
|
831
848
|
return this.request(
|
|
832
|
-
"
|
|
833
|
-
|
|
849
|
+
"POST",
|
|
850
|
+
"/admin/thor/dropshipper/orders/shipping-options",
|
|
851
|
+
{
|
|
852
|
+
...body,
|
|
853
|
+
currency_code: body.currency_code.toLowerCase()
|
|
854
|
+
}
|
|
834
855
|
);
|
|
835
856
|
}
|
|
836
857
|
/**
|