@alphabite/medusa-sdk 0.7.5 → 0.7.6
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 +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -487,6 +487,13 @@ interface ListCitiesInput {
|
|
|
487
487
|
* Search query to filter cities by name or nameEn
|
|
488
488
|
*/
|
|
489
489
|
q?: string;
|
|
490
|
+
/**
|
|
491
|
+
* Filter by whether the city has at least one Econt office
|
|
492
|
+
* - `true`: only cities with offices (old default behavior)
|
|
493
|
+
* - `false`: only cities/villages without offices
|
|
494
|
+
* - omitted: all cities
|
|
495
|
+
*/
|
|
496
|
+
hasOffice?: boolean;
|
|
490
497
|
/**
|
|
491
498
|
* Comma-separated list of fields to include
|
|
492
499
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -487,6 +487,13 @@ interface ListCitiesInput {
|
|
|
487
487
|
* Search query to filter cities by name or nameEn
|
|
488
488
|
*/
|
|
489
489
|
q?: string;
|
|
490
|
+
/**
|
|
491
|
+
* Filter by whether the city has at least one Econt office
|
|
492
|
+
* - `true`: only cities with offices (old default behavior)
|
|
493
|
+
* - `false`: only cities/villages without offices
|
|
494
|
+
* - omitted: all cities
|
|
495
|
+
*/
|
|
496
|
+
hasOffice?: boolean;
|
|
490
497
|
/**
|
|
491
498
|
* Comma-separated list of fields to include
|
|
492
499
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var u=require('@medusajs/js-sdk');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var u__default=/*#__PURE__*/_interopDefault(u);var d={name:"wishlist",endpoints:(r,i)=>({create:async({...e},t)=>r.client.fetch("/store/wishlists",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),list:async({limit:e=10,offset:t=0,...s},n)=>r.client.fetch("/store/wishlists",{method:"GET",headers:{...await i?.getAuthHeader?.(),...n},query:{limit:e,offset:t,...s}}),retrieve:async({id:e,...t},s)=>r.client.fetch(`/store/wishlists/${e}`,{method:"GET",headers:{...await i?.getAuthHeader?.(),...s},query:t}),update:async({id:e,...t},s)=>r.client.fetch(`/store/wishlists/${e}`,{method:"PUT",body:t,headers:{...await i?.getAuthHeader?.(),...s}}),delete:async({id:e},t)=>r.client.fetch(`/store/wishlists/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...t}}),totalItemsCount:async({wishlist_id:e},t)=>r.client.fetch("store/wishlists/total-items-count",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:{wishlist_id:e}}),transfer:async({id:e},t)=>r.client.fetch(`/store/wishlists/${e}/transfer`,{method:"POST",headers:{...await i?.getAuthHeader?.(),...t}}),share:async({id:e},t)=>r.client.fetch(`/store/wishlists/${e}/share`,{method:"POST",headers:{...await i?.getAuthHeader?.(),...t}}),import:async(e,t)=>r.client.fetch("/store/wishlists/import",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),addItem:async({id:e,...t},s)=>r.client.fetch(`/store/wishlists/${e}/add-item`,{method:"POST",body:t,headers:{...await i?.getAuthHeader?.(),...s}}),listItems:async({id:e,limit:t=10,offset:s=0,...n},o)=>r.client.fetch(`/store/wishlists/${e}/items`,{method:"GET",headers:{...await i?.getAuthHeader?.(),...o},query:{limit:t,offset:s,...n}}),removeItem:async({wishlist_item_id:e,id:t},s)=>r.client.fetch(`/store/wishlists/${t}/items/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...s}})})};var p={name:"paypal",endpoints:(r,i)=>({createClientToken:async e=>r.client.fetch("/store/paypal/client-token",{method:"POST",headers:{...await i?.getAuthHeader?.(),...e}})})};var h={name:"reviews",endpoints:(r,i)=>({create:async(e,t)=>r.client.fetch("/store/reviews",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),list:async({...e},t)=>r.client.fetch("/store/products/reviews",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:e}),listProductReviews:async({product_id:e,...t},s)=>r.client.fetch(`/store/reviews/product/${e}`,{method:"GET",query:t,headers:{...await i?.getAuthHeader?.(),...s}}),aggregateCounts:async({product_id:e,...t},s)=>r.client.fetch(`/store/reviews/product/${e}/aggregate-counts`,{method:"GET",query:t,headers:{...await i?.getAuthHeader?.(),...s}}),delete:async({id:e},t)=>r.client.fetch(`/store/reviews/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...t}}),uploadImageFiles:async(e,t)=>r.client.fetch("/store/reviews/files/images/upload",{method:"POST",body:e.formData,headers:{...await i?.getAuthHeader?.(),...t,"content-type":null}})})};var g={name:"econt",endpoints:(r,i)=>({validateAddress:async(e,t)=>r.client.fetch("/store/econt/validate-address",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),listCities:async({countryCode:e="BGR",...t},s)=>r.client.fetch("/store/econt/cities",{method:"GET",headers:{...await i?.getAuthHeader?.(),...s},query:{countryCode:e,...t}}),listQuarters:async({cityId:e,countryCode:t="BGR",...s},n)=>r.client.fetch("/store/econt/quarters",{method:"GET",headers:{...await i?.getAuthHeader?.(),...n},query:{cityId:e,countryCode:t,...s}}),listOffices:async({countryCode:e="BGR",...t},s)=>r.client.fetch("/store/econt/offices",{method:"GET",headers:{...await i?.getAuthHeader?.(),...s},query:{countryCode:e,...t}}),listStreets:async({cityId:e,countryCode:t="BGR",...s},n)=>r.client.fetch("/store/econt/streets",{method:"GET",headers:{...await i?.getAuthHeader?.(),...n},query:{cityId:e,countryCode:t,...s}}),listRegions:async({...e},t)=>r.client.fetch("/store/econt/regions",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:{...e}})})};var a=class extends u__default.default{constructor(i,e,t){super(i),this.options=t,this.medusaConfig=i;let s={};e.forEach(n=>{s[n.name]=n.endpoints(this,this.options,this.medusaConfig);}),this.alphabite=s;}};exports.AlphabiteMedusaSdk=a;exports.econtPlugin=g;exports.paypalPlugin=p;exports.reviewsPlugin=h;exports.wishlistPlugin=d;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import u from'@medusajs/js-sdk';var d={name:"wishlist",endpoints:(r,i)=>({create:async({...e},t)=>r.client.fetch("/store/wishlists",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),list:async({limit:e=10,offset:t=0,...s},n)=>r.client.fetch("/store/wishlists",{method:"GET",headers:{...await i?.getAuthHeader?.(),...n},query:{limit:e,offset:t,...s}}),retrieve:async({id:e,...t},s)=>r.client.fetch(`/store/wishlists/${e}`,{method:"GET",headers:{...await i?.getAuthHeader?.(),...s},query:t}),update:async({id:e,...t},s)=>r.client.fetch(`/store/wishlists/${e}`,{method:"PUT",body:t,headers:{...await i?.getAuthHeader?.(),...s}}),delete:async({id:e},t)=>r.client.fetch(`/store/wishlists/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...t}}),totalItemsCount:async({wishlist_id:e},t)=>r.client.fetch("store/wishlists/total-items-count",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:{wishlist_id:e}}),transfer:async({id:e},t)=>r.client.fetch(`/store/wishlists/${e}/transfer`,{method:"POST",headers:{...await i?.getAuthHeader?.(),...t}}),share:async({id:e},t)=>r.client.fetch(`/store/wishlists/${e}/share`,{method:"POST",headers:{...await i?.getAuthHeader?.(),...t}}),import:async(e,t)=>r.client.fetch("/store/wishlists/import",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),addItem:async({id:e,...t},s)=>r.client.fetch(`/store/wishlists/${e}/add-item`,{method:"POST",body:t,headers:{...await i?.getAuthHeader?.(),...s}}),listItems:async({id:e,limit:t=10,offset:s=0,...n},o)=>r.client.fetch(`/store/wishlists/${e}/items`,{method:"GET",headers:{...await i?.getAuthHeader?.(),...o},query:{limit:t,offset:s,...n}}),removeItem:async({wishlist_item_id:e,id:t},s)=>r.client.fetch(`/store/wishlists/${t}/items/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...s}})})};var p={name:"paypal",endpoints:(r,i)=>({createClientToken:async e=>r.client.fetch("/store/paypal/client-token",{method:"POST",headers:{...await i?.getAuthHeader?.(),...e}})})};var h={name:"reviews",endpoints:(r,i)=>({create:async(e,t)=>r.client.fetch("/store/reviews",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),list:async({...e},t)=>r.client.fetch("/store/products/reviews",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:e}),listProductReviews:async({product_id:e,...t},s)=>r.client.fetch(`/store/reviews/product/${e}`,{method:"GET",query:t,headers:{...await i?.getAuthHeader?.(),...s}}),aggregateCounts:async({product_id:e,...t},s)=>r.client.fetch(`/store/reviews/product/${e}/aggregate-counts`,{method:"GET",query:t,headers:{...await i?.getAuthHeader?.(),...s}}),delete:async({id:e},t)=>r.client.fetch(`/store/reviews/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...t}}),uploadImageFiles:async(e,t)=>r.client.fetch("/store/reviews/files/images/upload",{method:"POST",body:e.formData,headers:{...await i?.getAuthHeader?.(),...t,"content-type":null}})})};var g={name:"econt",endpoints:(r,i)=>({validateAddress:async(e,t)=>r.client.fetch("/store/econt/validate-address",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),listCities:async({countryCode:e="BGR",...t},s)=>r.client.fetch("/store/econt/cities",{method:"GET",headers:{...await i?.getAuthHeader?.(),...s},query:{countryCode:e,...t}}),listQuarters:async({cityId:e,countryCode:t="BGR",...s},n)=>r.client.fetch("/store/econt/quarters",{method:"GET",headers:{...await i?.getAuthHeader?.(),...n},query:{cityId:e,countryCode:t,...s}}),listOffices:async({countryCode:e="BGR",...t},s)=>r.client.fetch("/store/econt/offices",{method:"GET",headers:{...await i?.getAuthHeader?.(),...s},query:{countryCode:e,...t}}),listStreets:async({cityId:e,countryCode:t="BGR",...s},n)=>r.client.fetch("/store/econt/streets",{method:"GET",headers:{...await i?.getAuthHeader?.(),...n},query:{cityId:e,countryCode:t,...s}}),listRegions:async({...e},t)=>r.client.fetch("/store/econt/regions",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:{...e}})})};var a=class extends u{constructor(i,e,t){super(i),this.options=t,this.medusaConfig=i;let s={};e.forEach(n=>{s[n.name]=n.endpoints(this,this.options,this.medusaConfig);}),this.alphabite=s;}};export{a as AlphabiteMedusaSdk,g as econtPlugin,p as paypalPlugin,h as reviewsPlugin,d as wishlistPlugin};
|