@alphabite/medusa-sdk 0.5.1 → 0.5.3
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 +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -13,6 +13,24 @@ interface PaginatedOutputMeta extends RemoteQueryFunctionReturnPagination {
|
|
|
13
13
|
}
|
|
14
14
|
interface PaginatedInput extends FindParams {
|
|
15
15
|
}
|
|
16
|
+
interface MedusaImage {
|
|
17
|
+
id: string;
|
|
18
|
+
url: string;
|
|
19
|
+
rank: number;
|
|
20
|
+
metadata: Record<string, unknown> | null;
|
|
21
|
+
created_at: string;
|
|
22
|
+
updated_at: string;
|
|
23
|
+
deleted_at: string | null;
|
|
24
|
+
}
|
|
25
|
+
interface ProductCategoryImage extends MedusaImage {
|
|
26
|
+
product_category_id: string;
|
|
27
|
+
}
|
|
28
|
+
interface ProductCollectionImage extends MedusaImage {
|
|
29
|
+
product_collection_id: string;
|
|
30
|
+
}
|
|
31
|
+
interface ProductVariantImage extends MedusaImage {
|
|
32
|
+
product_variant_id: string;
|
|
33
|
+
}
|
|
16
34
|
|
|
17
35
|
interface Wishlist {
|
|
18
36
|
id: string;
|
|
@@ -178,6 +196,7 @@ interface ListReviewsOutput extends PaginatedOutput<Review> {
|
|
|
178
196
|
}
|
|
179
197
|
interface ListProductReviewsInput extends Omit<ListReviewsInput, 'product_ids'> {
|
|
180
198
|
product_id: string;
|
|
199
|
+
include_aggregated_counts?: boolean;
|
|
181
200
|
}
|
|
182
201
|
interface ListProductReviewsOutput extends PaginatedOutput<Omit<Review, 'product'>>, AggregateCounts {
|
|
183
202
|
}
|
|
@@ -218,4 +237,4 @@ declare class AlphabiteMedusaSdk<TPlugins extends readonly Plugin<any, any>[], T
|
|
|
218
237
|
constructor(medusaOptions: ConstructorParameters<typeof Medusa>[0], plugins: TPlugins, options?: TOptions);
|
|
219
238
|
}
|
|
220
239
|
|
|
221
|
-
export { type AddItemToWishlistInput, type AddItemToWishlistOutput, type AggregateCounts, type AggregateCountsInput, type AggregateCountsOutput, type AlphabiteClientOptions, AlphabiteMedusaSdk, type CreateClientTokenOutput, type CreateReviewInput, type CreateReviewOutput, type CreateWishlistInput, type CreateWishlistOutput, type DeleteReviewInput, type DeleteReviewOutput, type DeleteWishlistInput, type DeleteWishlistOutput, type ImportWishlistInput, type ImportWishlistOutput, type ListItemsInput, type ListItemsOutput, type ListProductReviewsInput, type ListProductReviewsOutput, type ListReviewsInput, type ListReviewsOutput, type ListWishlistsInput, type ListWishlistsOutput, type PaypalPaymentSessionInputData, type Plugin, type PluginsToAlphabite, type RemoveItemFromWishlistInput, type RemoveItemFromWishlistOutput, type RetrieveWishlistInput, type RetrieveWishlistOutput, type Review, type ShareWishlistInput, type ShareWishlistOutput, type TotalItemsCountInput, type TotalItemsCountOutput, type TransferWishlistInput, type TransferWishlistOutput, type UpdateWishlistInput, type UpdateWishlistOutput, type Wishlist, type WishlistItem, paypalPlugin, reviewsPlugin, wishlistPlugin };
|
|
240
|
+
export { type AddItemToWishlistInput, type AddItemToWishlistOutput, type AggregateCounts, type AggregateCountsInput, type AggregateCountsOutput, type AlphabiteClientOptions, AlphabiteMedusaSdk, type CreateClientTokenOutput, type CreateReviewInput, type CreateReviewOutput, type CreateWishlistInput, type CreateWishlistOutput, type DeleteReviewInput, type DeleteReviewOutput, type DeleteWishlistInput, type DeleteWishlistOutput, type ImportWishlistInput, type ImportWishlistOutput, type ListItemsInput, type ListItemsOutput, type ListProductReviewsInput, type ListProductReviewsOutput, type ListReviewsInput, type ListReviewsOutput, type ListWishlistsInput, type ListWishlistsOutput, type PaypalPaymentSessionInputData, type Plugin, type PluginsToAlphabite, type ProductCategoryImage, type ProductCollectionImage, type ProductVariantImage, type RemoveItemFromWishlistInput, type RemoveItemFromWishlistOutput, type RetrieveWishlistInput, type RetrieveWishlistOutput, type Review, type ShareWishlistInput, type ShareWishlistOutput, type TotalItemsCountInput, type TotalItemsCountOutput, type TransferWishlistInput, type TransferWishlistOutput, type UpdateWishlistInput, type UpdateWishlistOutput, type Wishlist, type WishlistItem, paypalPlugin, reviewsPlugin, wishlistPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,24 @@ interface PaginatedOutputMeta extends RemoteQueryFunctionReturnPagination {
|
|
|
13
13
|
}
|
|
14
14
|
interface PaginatedInput extends FindParams {
|
|
15
15
|
}
|
|
16
|
+
interface MedusaImage {
|
|
17
|
+
id: string;
|
|
18
|
+
url: string;
|
|
19
|
+
rank: number;
|
|
20
|
+
metadata: Record<string, unknown> | null;
|
|
21
|
+
created_at: string;
|
|
22
|
+
updated_at: string;
|
|
23
|
+
deleted_at: string | null;
|
|
24
|
+
}
|
|
25
|
+
interface ProductCategoryImage extends MedusaImage {
|
|
26
|
+
product_category_id: string;
|
|
27
|
+
}
|
|
28
|
+
interface ProductCollectionImage extends MedusaImage {
|
|
29
|
+
product_collection_id: string;
|
|
30
|
+
}
|
|
31
|
+
interface ProductVariantImage extends MedusaImage {
|
|
32
|
+
product_variant_id: string;
|
|
33
|
+
}
|
|
16
34
|
|
|
17
35
|
interface Wishlist {
|
|
18
36
|
id: string;
|
|
@@ -178,6 +196,7 @@ interface ListReviewsOutput extends PaginatedOutput<Review> {
|
|
|
178
196
|
}
|
|
179
197
|
interface ListProductReviewsInput extends Omit<ListReviewsInput, 'product_ids'> {
|
|
180
198
|
product_id: string;
|
|
199
|
+
include_aggregated_counts?: boolean;
|
|
181
200
|
}
|
|
182
201
|
interface ListProductReviewsOutput extends PaginatedOutput<Omit<Review, 'product'>>, AggregateCounts {
|
|
183
202
|
}
|
|
@@ -218,4 +237,4 @@ declare class AlphabiteMedusaSdk<TPlugins extends readonly Plugin<any, any>[], T
|
|
|
218
237
|
constructor(medusaOptions: ConstructorParameters<typeof Medusa>[0], plugins: TPlugins, options?: TOptions);
|
|
219
238
|
}
|
|
220
239
|
|
|
221
|
-
export { type AddItemToWishlistInput, type AddItemToWishlistOutput, type AggregateCounts, type AggregateCountsInput, type AggregateCountsOutput, type AlphabiteClientOptions, AlphabiteMedusaSdk, type CreateClientTokenOutput, type CreateReviewInput, type CreateReviewOutput, type CreateWishlistInput, type CreateWishlistOutput, type DeleteReviewInput, type DeleteReviewOutput, type DeleteWishlistInput, type DeleteWishlistOutput, type ImportWishlistInput, type ImportWishlistOutput, type ListItemsInput, type ListItemsOutput, type ListProductReviewsInput, type ListProductReviewsOutput, type ListReviewsInput, type ListReviewsOutput, type ListWishlistsInput, type ListWishlistsOutput, type PaypalPaymentSessionInputData, type Plugin, type PluginsToAlphabite, type RemoveItemFromWishlistInput, type RemoveItemFromWishlistOutput, type RetrieveWishlistInput, type RetrieveWishlistOutput, type Review, type ShareWishlistInput, type ShareWishlistOutput, type TotalItemsCountInput, type TotalItemsCountOutput, type TransferWishlistInput, type TransferWishlistOutput, type UpdateWishlistInput, type UpdateWishlistOutput, type Wishlist, type WishlistItem, paypalPlugin, reviewsPlugin, wishlistPlugin };
|
|
240
|
+
export { type AddItemToWishlistInput, type AddItemToWishlistOutput, type AggregateCounts, type AggregateCountsInput, type AggregateCountsOutput, type AlphabiteClientOptions, AlphabiteMedusaSdk, type CreateClientTokenOutput, type CreateReviewInput, type CreateReviewOutput, type CreateWishlistInput, type CreateWishlistOutput, type DeleteReviewInput, type DeleteReviewOutput, type DeleteWishlistInput, type DeleteWishlistOutput, type ImportWishlistInput, type ImportWishlistOutput, type ListItemsInput, type ListItemsOutput, type ListProductReviewsInput, type ListProductReviewsOutput, type ListReviewsInput, type ListReviewsOutput, type ListWishlistsInput, type ListWishlistsOutput, type PaypalPaymentSessionInputData, type Plugin, type PluginsToAlphabite, type ProductCategoryImage, type ProductCollectionImage, type ProductVariantImage, type RemoveItemFromWishlistInput, type RemoveItemFromWishlistOutput, type RetrieveWishlistInput, type RetrieveWishlistOutput, type Review, type ShareWishlistInput, type ShareWishlistOutput, type TotalItemsCountInput, type TotalItemsCountOutput, type TransferWishlistInput, type TransferWishlistOutput, type UpdateWishlistInput, type UpdateWishlistOutput, type Wishlist, type WishlistItem, paypalPlugin, reviewsPlugin, wishlistPlugin };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
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:(s,i)=>({create:async({...e},t)=>s.client.fetch("/store/wishlists",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),list:async({limit:e=10,offset:t=0,...r},n)=>s.client.fetch("/store/wishlists",{method:"GET",headers:{...await i?.getAuthHeader?.(),...n},query:{limit:e,offset:t,...r}}),retrieve:async({id:e,...t},r)=>s.client.fetch(`/store/wishlists/${e}`,{method:"GET",headers:{...await i?.getAuthHeader?.(),...r},query:t}),update:async({id:e,...t},r)=>s.client.fetch(`/store/wishlists/${e}`,{method:"PUT",body:t,headers:{...await i?.getAuthHeader?.(),...r}}),delete:async({id:e},t)=>s.client.fetch(`/store/wishlists/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...t}}),totalItemsCount:async({wishlist_id:e},t)=>s.client.fetch("store/wishlists/total-items-count",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:{wishlist_id:e}}),transfer:async({id:e},t)=>s.client.fetch(`/store/wishlists/${e}/transfer`,{method:"POST",headers:{...await i?.getAuthHeader?.(),...t}}),share:async({id:e},t)=>s.client.fetch(`/store/wishlists/${e}/share`,{method:"POST",headers:{...await i?.getAuthHeader?.(),...t}}),import:async(e,t)=>s.client.fetch("/store/wishlists/import",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),addItem:async({id:e,...t},r)=>s.client.fetch(`/store/wishlists/${e}/add-item`,{method:"POST",body:t,headers:{...await i?.getAuthHeader?.(),...r}}),listItems:async({id:e,limit:t=10,offset:r=0,...n},o)=>s.client.fetch(`/store/wishlists/${e}/items`,{method:"GET",headers:{...await i?.getAuthHeader?.(),...o},query:{limit:t,offset:r,...n}}),removeItem:async({wishlist_item_id:e,id:t},r)=>s.client.fetch(`/store/wishlists/${t}/items/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...r}})})};var l={name:"paypal",endpoints:(s,i)=>({createClientToken:async e=>s.client.fetch("/store/paypal/client-token",{method:"POST",headers:{...await i?.getAuthHeader?.(),...e}})})};var c={name:"reviews",endpoints:(s,i)=>({create:async(e,t)=>s.client.fetch("/store/reviews",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),list:async({...e},t)=>s.client.fetch("/store/products/reviews",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:e}),listProductReviews:async({product_id:e,...t},r)=>s.client.fetch(`store/reviews/product/${e}`,{method:"GET",query:t,headers:{...await i?.getAuthHeader?.(),...r}}),aggregateCounts:async({product_id:e,...t},r)=>s.client.fetch(`/store/reviews/product/${e}/aggregate-counts`,{method:"GET",query:t,headers:{...await i?.getAuthHeader?.(),...r}}),delete:async({id:e},t)=>s.client.fetch(`/store/reviews/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...t}})})};var a=class extends u__default.default{constructor(i,e,t){super(i),this.options=t;let r={};e.forEach(n=>{r[n.name]=n.endpoints(this,this.options);}),this.alphabite=r;}};exports.AlphabiteMedusaSdk=a;exports.paypalPlugin=l;exports.reviewsPlugin=c;exports.wishlistPlugin=d;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import u from'@medusajs/js-sdk';var
|
|
1
|
+
import u from'@medusajs/js-sdk';var d={name:"wishlist",endpoints:(s,i)=>({create:async({...e},t)=>s.client.fetch("/store/wishlists",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),list:async({limit:e=10,offset:t=0,...r},n)=>s.client.fetch("/store/wishlists",{method:"GET",headers:{...await i?.getAuthHeader?.(),...n},query:{limit:e,offset:t,...r}}),retrieve:async({id:e,...t},r)=>s.client.fetch(`/store/wishlists/${e}`,{method:"GET",headers:{...await i?.getAuthHeader?.(),...r},query:t}),update:async({id:e,...t},r)=>s.client.fetch(`/store/wishlists/${e}`,{method:"PUT",body:t,headers:{...await i?.getAuthHeader?.(),...r}}),delete:async({id:e},t)=>s.client.fetch(`/store/wishlists/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...t}}),totalItemsCount:async({wishlist_id:e},t)=>s.client.fetch("store/wishlists/total-items-count",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:{wishlist_id:e}}),transfer:async({id:e},t)=>s.client.fetch(`/store/wishlists/${e}/transfer`,{method:"POST",headers:{...await i?.getAuthHeader?.(),...t}}),share:async({id:e},t)=>s.client.fetch(`/store/wishlists/${e}/share`,{method:"POST",headers:{...await i?.getAuthHeader?.(),...t}}),import:async(e,t)=>s.client.fetch("/store/wishlists/import",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),addItem:async({id:e,...t},r)=>s.client.fetch(`/store/wishlists/${e}/add-item`,{method:"POST",body:t,headers:{...await i?.getAuthHeader?.(),...r}}),listItems:async({id:e,limit:t=10,offset:r=0,...n},o)=>s.client.fetch(`/store/wishlists/${e}/items`,{method:"GET",headers:{...await i?.getAuthHeader?.(),...o},query:{limit:t,offset:r,...n}}),removeItem:async({wishlist_item_id:e,id:t},r)=>s.client.fetch(`/store/wishlists/${t}/items/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...r}})})};var l={name:"paypal",endpoints:(s,i)=>({createClientToken:async e=>s.client.fetch("/store/paypal/client-token",{method:"POST",headers:{...await i?.getAuthHeader?.(),...e}})})};var c={name:"reviews",endpoints:(s,i)=>({create:async(e,t)=>s.client.fetch("/store/reviews",{method:"POST",body:e,headers:{...await i?.getAuthHeader?.(),...t}}),list:async({...e},t)=>s.client.fetch("/store/products/reviews",{method:"GET",headers:{...await i?.getAuthHeader?.(),...t},query:e}),listProductReviews:async({product_id:e,...t},r)=>s.client.fetch(`store/reviews/product/${e}`,{method:"GET",query:t,headers:{...await i?.getAuthHeader?.(),...r}}),aggregateCounts:async({product_id:e,...t},r)=>s.client.fetch(`/store/reviews/product/${e}/aggregate-counts`,{method:"GET",query:t,headers:{...await i?.getAuthHeader?.(),...r}}),delete:async({id:e},t)=>s.client.fetch(`/store/reviews/${e}`,{method:"DELETE",headers:{...await i?.getAuthHeader?.(),...t}})})};var a=class extends u{constructor(i,e,t){super(i),this.options=t;let r={};e.forEach(n=>{r[n.name]=n.endpoints(this,this.options);}),this.alphabite=r;}};export{a as AlphabiteMedusaSdk,l as paypalPlugin,c as reviewsPlugin,d as wishlistPlugin};
|