medusa-services 1.1.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/auth.d.ts +29 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +80 -0
- package/dist/cart.d.ts +148 -0
- package/dist/cart.d.ts.map +1 -0
- package/dist/cart.js +156 -0
- package/dist/categories.d.ts +20 -0
- package/dist/categories.d.ts.map +1 -0
- package/dist/categories.js +36 -0
- package/dist/collections.d.ts +27 -0
- package/dist/collections.d.ts.map +1 -0
- package/dist/collections.js +36 -0
- package/dist/contact-action.d.ts +18 -0
- package/dist/contact-action.d.ts.map +1 -0
- package/dist/contact-action.js +42 -0
- package/dist/customer.d.ts +59 -0
- package/dist/customer.d.ts.map +1 -0
- package/dist/customer.js +68 -0
- package/dist/facebook-login.d.ts +37 -0
- package/dist/facebook-login.d.ts.map +1 -0
- package/dist/facebook-login.js +146 -0
- package/dist/fulfillment.d.ts +33 -0
- package/dist/fulfillment.d.ts.map +1 -0
- package/dist/fulfillment.js +43 -0
- package/dist/gift-wrap.d.ts +30 -0
- package/dist/gift-wrap.d.ts.map +1 -0
- package/dist/gift-wrap.js +29 -0
- package/dist/google-login.d.ts +37 -0
- package/dist/google-login.d.ts.map +1 -0
- package/dist/google-login.js +150 -0
- package/dist/guest.d.ts +46 -0
- package/dist/guest.d.ts.map +1 -0
- package/dist/guest.js +91 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/locales.d.ts +13 -0
- package/dist/locales.d.ts.map +1 -0
- package/dist/locales.js +13 -0
- package/dist/medusa-auth.d.ts +17 -0
- package/dist/medusa-auth.d.ts.map +1 -0
- package/dist/medusa-auth.js +25 -0
- package/dist/middleware.d.ts +13 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +36 -0
- package/dist/orders.d.ts +105 -0
- package/dist/orders.d.ts.map +1 -0
- package/dist/orders.js +139 -0
- package/dist/payment.d.ts +55 -0
- package/dist/payment.d.ts.map +1 -0
- package/dist/payment.js +68 -0
- package/dist/product-detail.d.ts +30 -0
- package/dist/product-detail.d.ts.map +1 -0
- package/dist/product-detail.js +94 -0
- package/dist/product-listing.d.ts +81 -0
- package/dist/product-listing.d.ts.map +1 -0
- package/dist/product-listing.js +189 -0
- package/dist/products.d.ts +41 -0
- package/dist/products.d.ts.map +1 -0
- package/dist/products.js +141 -0
- package/dist/recently-viewed.d.ts +14 -0
- package/dist/recently-viewed.d.ts.map +1 -0
- package/dist/recently-viewed.js +59 -0
- package/dist/regions.d.ts +37 -0
- package/dist/regions.d.ts.map +1 -0
- package/dist/regions.js +30 -0
- package/dist/related-products.d.ts +30 -0
- package/dist/related-products.d.ts.map +1 -0
- package/dist/related-products.js +99 -0
- package/dist/returns.d.ts +75 -0
- package/dist/returns.d.ts.map +1 -0
- package/dist/returns.js +105 -0
- package/dist/reviews.d.ts +135 -0
- package/dist/reviews.d.ts.map +1 -0
- package/dist/reviews.js +202 -0
- package/dist/store-api.d.ts +20 -0
- package/dist/store-api.d.ts.map +1 -0
- package/dist/store-api.js +55 -0
- package/dist/swaps.d.ts +33 -0
- package/dist/swaps.d.ts.map +1 -0
- package/dist/swaps.js +39 -0
- package/dist/variants.d.ts +17 -0
- package/dist/variants.d.ts.map +1 -0
- package/dist/variants.js +8 -0
- package/dist/wishlist.d.ts +65 -0
- package/dist/wishlist.d.ts.map +1 -0
- package/dist/wishlist.js +149 -0
- package/middleware.ts +54 -0
- package/package.json +174 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const DEFAULT_RECENTLY_VIEWED_STORAGE_KEY = "medusa_pdp_recently_viewed";
|
|
2
|
+
const DEFAULT_MAX_ITEMS = 20;
|
|
3
|
+
function getStorageKey(options) {
|
|
4
|
+
return options?.storageKey || DEFAULT_RECENTLY_VIEWED_STORAGE_KEY;
|
|
5
|
+
}
|
|
6
|
+
function getMaxItems(options) {
|
|
7
|
+
const max = options?.maxItems ?? DEFAULT_MAX_ITEMS;
|
|
8
|
+
return max > 0 ? max : DEFAULT_MAX_ITEMS;
|
|
9
|
+
}
|
|
10
|
+
function canUseStorage() {
|
|
11
|
+
return typeof window !== "undefined" && !!window.localStorage;
|
|
12
|
+
}
|
|
13
|
+
function sanitizeIds(value) {
|
|
14
|
+
if (!Array.isArray(value))
|
|
15
|
+
return [];
|
|
16
|
+
return value.filter((id) => typeof id === "string" && id.trim() !== "");
|
|
17
|
+
}
|
|
18
|
+
function readRecentlyViewedIds(options) {
|
|
19
|
+
if (!canUseStorage())
|
|
20
|
+
return [];
|
|
21
|
+
try {
|
|
22
|
+
const raw = window.localStorage.getItem(getStorageKey(options));
|
|
23
|
+
if (!raw)
|
|
24
|
+
return [];
|
|
25
|
+
const parsed = JSON.parse(raw);
|
|
26
|
+
return sanitizeIds(parsed);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function writeRecentlyViewedIds(ids, options) {
|
|
33
|
+
if (!canUseStorage())
|
|
34
|
+
return;
|
|
35
|
+
try {
|
|
36
|
+
window.localStorage.setItem(getStorageKey(options), JSON.stringify(ids));
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// Ignore storage errors (quota/private mode)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Local-first recently viewed service.
|
|
44
|
+
* Later, swap internals with API calls without changing callers.
|
|
45
|
+
*/
|
|
46
|
+
export const recentlyViewedService = {
|
|
47
|
+
getAll(options) {
|
|
48
|
+
return readRecentlyViewedIds(options);
|
|
49
|
+
},
|
|
50
|
+
track(productId, options) {
|
|
51
|
+
const current = readRecentlyViewedIds(options);
|
|
52
|
+
const next = [productId, ...current.filter((id) => id !== productId)].slice(0, getMaxItems(options));
|
|
53
|
+
writeRecentlyViewedIds(next, options);
|
|
54
|
+
return next;
|
|
55
|
+
},
|
|
56
|
+
clear(options) {
|
|
57
|
+
writeRecentlyViewedIds([], options);
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type MedusaStoreClientOptions } from "./store-api";
|
|
2
|
+
export interface StoreRegionCountry {
|
|
3
|
+
iso_2?: string | null;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
export interface StoreRegion {
|
|
7
|
+
id: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
currency_code?: string;
|
|
10
|
+
countries?: StoreRegionCountry[];
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface StoreRegionListResponse {
|
|
14
|
+
regions: StoreRegion[];
|
|
15
|
+
}
|
|
16
|
+
export interface StoreRegionResponse {
|
|
17
|
+
region: StoreRegion;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* GET /store/regions
|
|
21
|
+
*/
|
|
22
|
+
export declare function medusaRegionList(options: MedusaStoreClientOptions, query?: {
|
|
23
|
+
fields?: string;
|
|
24
|
+
}): Promise<StoreRegionListResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* GET /store/regions/:id
|
|
27
|
+
*/
|
|
28
|
+
export declare function medusaRegionRetrieve(regionId: string, options: MedusaStoreClientOptions, query?: {
|
|
29
|
+
fields?: string;
|
|
30
|
+
}): Promise<StoreRegionResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Resolve a region by ISO-2 country code from the store regions list.
|
|
33
|
+
*/
|
|
34
|
+
export declare function medusaRegionByCountryCode(countryCode: string, options: MedusaStoreClientOptions, query?: {
|
|
35
|
+
fields?: string;
|
|
36
|
+
}): Promise<StoreRegion | null>;
|
|
37
|
+
//# sourceMappingURL=regions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regions.d.ts","sourceRoot":"","sources":["../regions.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,wBAAwB,EAChC,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,kBAAkB;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,WAAW,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,WAAW,CAAC;CACvB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAClC,OAAO,EAAE,wBAAwB,EACjC,KAAK,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,OAAO,CAAC,uBAAuB,CAAC,CAOlC;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,wBAAwB,EACjC,KAAK,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAO9B;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAC3C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,wBAAwB,EACjC,KAAK,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAe7B"}
|
package/dist/regions.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { fieldsQuery, parseStoreJson, storeFetch, } from "./store-api";
|
|
2
|
+
/**
|
|
3
|
+
* GET /store/regions
|
|
4
|
+
*/
|
|
5
|
+
export async function medusaRegionList(options, query) {
|
|
6
|
+
const response = await storeFetch(`/regions${fieldsQuery(query?.fields)}`, options, { method: "GET" });
|
|
7
|
+
return parseStoreJson(response, "Region list request");
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* GET /store/regions/:id
|
|
11
|
+
*/
|
|
12
|
+
export async function medusaRegionRetrieve(regionId, options, query) {
|
|
13
|
+
const response = await storeFetch(`/regions/${encodeURIComponent(regionId)}${fieldsQuery(query?.fields)}`, options, { method: "GET" });
|
|
14
|
+
return parseStoreJson(response, "Region retrieve request");
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a region by ISO-2 country code from the store regions list.
|
|
18
|
+
*/
|
|
19
|
+
export async function medusaRegionByCountryCode(countryCode, options, query) {
|
|
20
|
+
const { regions } = await medusaRegionList(options, query);
|
|
21
|
+
if (!regions?.length)
|
|
22
|
+
return null;
|
|
23
|
+
const normalized = countryCode?.toLowerCase();
|
|
24
|
+
for (const region of regions) {
|
|
25
|
+
const match = region.countries?.find((country) => country.iso_2?.toLowerCase() === normalized);
|
|
26
|
+
if (match)
|
|
27
|
+
return region;
|
|
28
|
+
}
|
|
29
|
+
return regions.find((region) => region.countries?.some((country) => country.iso_2?.toLowerCase() === "us")) ?? regions[0] ?? null;
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface RelatedProductsMedusaOptions {
|
|
2
|
+
backendUrl: string;
|
|
3
|
+
publishableApiKey: string;
|
|
4
|
+
regionId?: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
export interface RelatedProductCard {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
handle?: string;
|
|
12
|
+
thumbnail?: string;
|
|
13
|
+
averageRating?: number;
|
|
14
|
+
totalRatingCount?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface FetchRelatedProductsInput {
|
|
17
|
+
currentProductId: string;
|
|
18
|
+
collectionId?: string;
|
|
19
|
+
tagIds?: string[];
|
|
20
|
+
options: RelatedProductsMedusaOptions;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Deterministic fallback:
|
|
24
|
+
* 1) same collection + shared tags
|
|
25
|
+
* 2) same collection only
|
|
26
|
+
* 3) shared tags only
|
|
27
|
+
* 4) generic latest list
|
|
28
|
+
*/
|
|
29
|
+
export declare function medusaFetchRelatedProducts({ currentProductId, collectionId, tagIds, options, }: FetchRelatedProductsInput): Promise<RelatedProductCard[]>;
|
|
30
|
+
//# sourceMappingURL=related-products.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"related-products.d.ts","sourceRoot":"","sources":["../related-products.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IACtC,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,4BAA4B,CAAC;CACzC;AA2DD;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAAC,EAC7C,gBAAgB,EAChB,YAAY,EACZ,MAAW,EACX,OAAO,GACV,EAAE,yBAAyB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAgD3D"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
function getOrigin(baseUrl) {
|
|
2
|
+
return baseUrl.replace(/\/$/, '');
|
|
3
|
+
}
|
|
4
|
+
function toArray(value) {
|
|
5
|
+
if (Array.isArray(value))
|
|
6
|
+
return value;
|
|
7
|
+
if (value == null)
|
|
8
|
+
return [];
|
|
9
|
+
return [value];
|
|
10
|
+
}
|
|
11
|
+
function getPublicHeaders(options) {
|
|
12
|
+
return {
|
|
13
|
+
'x-publishable-api-key': options.publishableApiKey,
|
|
14
|
+
...options.headers,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function mapToRelatedCard(product) {
|
|
18
|
+
const id = typeof product.id === 'string' ? product.id : '';
|
|
19
|
+
const title = typeof product.title === 'string' ? product.title : '';
|
|
20
|
+
if (!id || !title)
|
|
21
|
+
return null;
|
|
22
|
+
return {
|
|
23
|
+
id,
|
|
24
|
+
title,
|
|
25
|
+
handle: typeof product.handle === 'string' ? product.handle : undefined,
|
|
26
|
+
thumbnail: typeof product.thumbnail === 'string' ? product.thumbnail : undefined,
|
|
27
|
+
averageRating: typeof product.average_rating === 'number' ? product.average_rating : undefined,
|
|
28
|
+
totalRatingCount: typeof product.total_rating_count === 'number' ? product.total_rating_count : undefined,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
async function fetchProducts(query, options) {
|
|
32
|
+
const url = `${getOrigin(options.backendUrl)}/store/products?${query.toString()}`;
|
|
33
|
+
const response = await fetch(url, {
|
|
34
|
+
method: 'GET',
|
|
35
|
+
headers: getPublicHeaders(options),
|
|
36
|
+
});
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
const data = await response.json().catch(() => ({}));
|
|
39
|
+
const message = typeof data.message === 'string'
|
|
40
|
+
? data.message
|
|
41
|
+
: `Failed related products request (${response.status})`;
|
|
42
|
+
throw new Error(message);
|
|
43
|
+
}
|
|
44
|
+
const data = (await response.json());
|
|
45
|
+
return Array.isArray(data.products) ? data.products : [];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Deterministic fallback:
|
|
49
|
+
* 1) same collection + shared tags
|
|
50
|
+
* 2) same collection only
|
|
51
|
+
* 3) shared tags only
|
|
52
|
+
* 4) generic latest list
|
|
53
|
+
*/
|
|
54
|
+
export async function medusaFetchRelatedProducts({ currentProductId, collectionId, tagIds = [], options, }) {
|
|
55
|
+
const target = options.limit && options.limit > 0 ? options.limit : 8;
|
|
56
|
+
const tagIdList = tagIds.filter((id) => typeof id === 'string' && id.trim() !== '');
|
|
57
|
+
const collected = new Map();
|
|
58
|
+
const scenarios = [
|
|
59
|
+
{ withCollection: true, withTags: true },
|
|
60
|
+
{ withCollection: true, withTags: false },
|
|
61
|
+
{ withCollection: false, withTags: true },
|
|
62
|
+
{ withCollection: false, withTags: false },
|
|
63
|
+
];
|
|
64
|
+
for (const scenario of scenarios) {
|
|
65
|
+
if (collected.size >= target)
|
|
66
|
+
break;
|
|
67
|
+
const query = new URLSearchParams();
|
|
68
|
+
query.set('limit', String(Math.max(target * 2, 12)));
|
|
69
|
+
query.set('is_giftcard', 'false');
|
|
70
|
+
if (options.regionId)
|
|
71
|
+
query.set('region_id', options.regionId);
|
|
72
|
+
if (scenario.withCollection && collectionId) {
|
|
73
|
+
query.set('collection_id', collectionId);
|
|
74
|
+
}
|
|
75
|
+
if (scenario.withTags && tagIdList.length > 0) {
|
|
76
|
+
for (const tagId of tagIdList) {
|
|
77
|
+
query.append('tag_id', tagId);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const missingFilters = (scenario.withCollection && !collectionId) ||
|
|
81
|
+
(scenario.withTags && tagIdList.length === 0);
|
|
82
|
+
if (missingFilters)
|
|
83
|
+
continue;
|
|
84
|
+
const products = await fetchProducts(query, options);
|
|
85
|
+
for (const raw of products) {
|
|
86
|
+
const card = mapToRelatedCard(raw);
|
|
87
|
+
if (!card)
|
|
88
|
+
continue;
|
|
89
|
+
if (card.id === currentProductId)
|
|
90
|
+
continue;
|
|
91
|
+
if (!collected.has(card.id)) {
|
|
92
|
+
collected.set(card.id, card);
|
|
93
|
+
}
|
|
94
|
+
if (collected.size >= target)
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return Array.from(collected.values()).slice(0, target);
|
|
99
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type MedusaStoreClientOptions } from "./store-api";
|
|
2
|
+
export interface StoreReturnReason {
|
|
3
|
+
id: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface StoreReturnReasonListResponse {
|
|
10
|
+
return_reasons: StoreReturnReason[];
|
|
11
|
+
}
|
|
12
|
+
export interface StoreReturn {
|
|
13
|
+
id?: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface StoreReturnResponse {
|
|
17
|
+
return: StoreReturn;
|
|
18
|
+
}
|
|
19
|
+
export interface StoreReturnListResponse {
|
|
20
|
+
returns?: StoreReturn[];
|
|
21
|
+
count?: number;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface CreateReturnPayload {
|
|
25
|
+
order_id: string;
|
|
26
|
+
items: Array<{
|
|
27
|
+
id: string;
|
|
28
|
+
quantity: number;
|
|
29
|
+
reason_id?: string;
|
|
30
|
+
note?: string;
|
|
31
|
+
}>;
|
|
32
|
+
return_shipping?: {
|
|
33
|
+
option_id: string;
|
|
34
|
+
location_id: string;
|
|
35
|
+
};
|
|
36
|
+
note?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* GET /store/return-reasons
|
|
40
|
+
*/
|
|
41
|
+
export declare function medusaReturnReasonList(options: MedusaStoreClientOptions): Promise<StoreReturnReason[]>;
|
|
42
|
+
/**
|
|
43
|
+
* GET /store/shipping-options?cart_id=&is_return=true
|
|
44
|
+
*/
|
|
45
|
+
export declare function medusaReturnShippingOptionsList(cartId: string, options: MedusaStoreClientOptions): Promise<import("./fulfillment").StoreShippingOption[]>;
|
|
46
|
+
/**
|
|
47
|
+
* List return shipping options; creates ephemeral cart when regionId provided and cartId empty.
|
|
48
|
+
*/
|
|
49
|
+
export declare function medusaReturnShippingOptionsResolve(options: MedusaStoreClientOptions, params: {
|
|
50
|
+
cartId?: string;
|
|
51
|
+
regionId?: string;
|
|
52
|
+
}): Promise<import("./fulfillment").StoreShippingOption[]>;
|
|
53
|
+
/**
|
|
54
|
+
* POST /store/returns
|
|
55
|
+
*/
|
|
56
|
+
export declare function medusaReturnCreate(payload: CreateReturnPayload, options: MedusaStoreClientOptions): Promise<StoreReturn>;
|
|
57
|
+
/**
|
|
58
|
+
* POST /store/guest-orders/:id/returns
|
|
59
|
+
*/
|
|
60
|
+
export declare function medusaReturnCreateGuest(orderId: string, payload: CreateReturnPayload | Record<string, unknown>, options: MedusaStoreClientOptions): Promise<StoreReturn>;
|
|
61
|
+
/**
|
|
62
|
+
* PUT /store/refund-payment-mapping/:returnId
|
|
63
|
+
*/
|
|
64
|
+
export declare function medusaReturnUpdatePayment(returnId: string, paymentId: string, options: MedusaStoreClientOptions): Promise<unknown>;
|
|
65
|
+
/**
|
|
66
|
+
* GET /store/returns
|
|
67
|
+
*/
|
|
68
|
+
export declare function medusaReturnList(options: MedusaStoreClientOptions, query?: {
|
|
69
|
+
order_id?: string;
|
|
70
|
+
}): Promise<StoreReturnListResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* GET /store/guest-orders/:id/returns
|
|
73
|
+
*/
|
|
74
|
+
export declare function medusaReturnListGuest(orderId: string, options: MedusaStoreClientOptions): Promise<StoreReturnListResponse>;
|
|
75
|
+
//# sourceMappingURL=returns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returns.d.ts","sourceRoot":"","sources":["../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AAM,EACd,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,OAAO,eAAe,EAAE,mBAAmB,EAAE,CAAC,CAKxD;AAED;;GAEG;AACH,wBAAsB,kCAAkC,CACpD,OAAO,EAAE,wBAAwB,EACjC,MAAM,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/C,OAAO,CAAC,OAAO,eAAe,EAAE,mBAAmB,EAAE,CAAC,CAwBxD;AAUD;;GAEG;AACH,wBAAsB,kBAAkB,CACpC,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,WAAW,CAAC,CAUtB;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtD,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,WAAW,CAAC,CAWtB;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAC3C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,OAAO,CAAC,CAOlB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAClC,OAAO,EAAE,wBAAwB,EACjC,KAAK,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAQlC;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACvC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,uBAAuB,CAAC,CAOlC"}
|
package/dist/returns.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { parseStoreJson, storeFetch } from "./store-api";
|
|
2
|
+
import { medusaCartCreate } from "./cart";
|
|
3
|
+
import { medusaShippingOptionsList } from "./fulfillment";
|
|
4
|
+
/**
|
|
5
|
+
* GET /store/return-reasons
|
|
6
|
+
*/
|
|
7
|
+
export async function medusaReturnReasonList(options) {
|
|
8
|
+
try {
|
|
9
|
+
const response = await storeFetch("/return-reasons", options, { method: "GET" });
|
|
10
|
+
const data = await parseStoreJson(response, "Return reason list request");
|
|
11
|
+
return data.return_reasons ?? [];
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* GET /store/shipping-options?cart_id=&is_return=true
|
|
19
|
+
*/
|
|
20
|
+
export async function medusaReturnShippingOptionsList(cartId, options) {
|
|
21
|
+
const { shipping_options } = await medusaShippingOptionsList(cartId, options, {
|
|
22
|
+
is_return: true,
|
|
23
|
+
});
|
|
24
|
+
return shipping_options;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List return shipping options; creates ephemeral cart when regionId provided and cartId empty.
|
|
28
|
+
*/
|
|
29
|
+
export async function medusaReturnShippingOptionsResolve(options, params) {
|
|
30
|
+
if (params.cartId) {
|
|
31
|
+
try {
|
|
32
|
+
const options_ = await medusaReturnShippingOptionsList(params.cartId, options);
|
|
33
|
+
if (options_.length > 0) {
|
|
34
|
+
return options_;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
// fallback below
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (params.regionId) {
|
|
42
|
+
try {
|
|
43
|
+
const { cart } = await medusaCartCreate(options, { region_id: params.regionId });
|
|
44
|
+
if (cart?.id) {
|
|
45
|
+
return medusaReturnShippingOptionsList(cart.id, options);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// ignore
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
function unwrapReturnResponse(data) {
|
|
55
|
+
const wrapped = data;
|
|
56
|
+
if (wrapped.return && typeof wrapped.return === "object") {
|
|
57
|
+
return wrapped.return;
|
|
58
|
+
}
|
|
59
|
+
return data;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* POST /store/returns
|
|
63
|
+
*/
|
|
64
|
+
export async function medusaReturnCreate(payload, options) {
|
|
65
|
+
const response = await storeFetch("/returns", options, {
|
|
66
|
+
method: "POST",
|
|
67
|
+
body: JSON.stringify(payload),
|
|
68
|
+
});
|
|
69
|
+
const data = await parseStoreJson(response, "Return create request");
|
|
70
|
+
return unwrapReturnResponse(data);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* POST /store/guest-orders/:id/returns
|
|
74
|
+
*/
|
|
75
|
+
export async function medusaReturnCreateGuest(orderId, payload, options) {
|
|
76
|
+
const response = await storeFetch(`/guest-orders/${encodeURIComponent(orderId)}/returns`, options, { method: "POST", body: JSON.stringify(payload) });
|
|
77
|
+
const data = await parseStoreJson(response, "Guest return create request");
|
|
78
|
+
return unwrapReturnResponse(data);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* PUT /store/refund-payment-mapping/:returnId
|
|
82
|
+
*/
|
|
83
|
+
export async function medusaReturnUpdatePayment(returnId, paymentId, options) {
|
|
84
|
+
const response = await storeFetch(`/refund-payment-mapping/${encodeURIComponent(returnId)}`, options, { method: "PUT", body: JSON.stringify({ payment_id: paymentId }) });
|
|
85
|
+
return parseStoreJson(response, "Return payment update request");
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* GET /store/returns
|
|
89
|
+
*/
|
|
90
|
+
export async function medusaReturnList(options, query) {
|
|
91
|
+
const params = new URLSearchParams();
|
|
92
|
+
if (query?.order_id) {
|
|
93
|
+
params.set("order_id", query.order_id);
|
|
94
|
+
}
|
|
95
|
+
const path = params.toString() ? `/returns?${params.toString()}` : "/returns";
|
|
96
|
+
const response = await storeFetch(path, options, { method: "GET" });
|
|
97
|
+
return parseStoreJson(response, "Return list request");
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* GET /store/guest-orders/:id/returns
|
|
101
|
+
*/
|
|
102
|
+
export async function medusaReturnListGuest(orderId, options) {
|
|
103
|
+
const response = await storeFetch(`/guest-orders/${encodeURIComponent(orderId)}/returns`, options, { method: "GET" });
|
|
104
|
+
return parseStoreJson(response, "Guest return list request");
|
|
105
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* medusa-review-rating Store API helpers.
|
|
3
|
+
* @see package README (store routes under /store)
|
|
4
|
+
*/
|
|
5
|
+
export interface MedusaReviewsClientOptions {
|
|
6
|
+
backendUrl: string;
|
|
7
|
+
publishableApiKey: string;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Medusa store URL + publishable key from common Next.js / Node env vars.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getMedusaReviewsClientOptionsFromEnv(): MedusaReviewsClientOptions;
|
|
14
|
+
/** Customer JWT or full `Bearer …` — required for write + “my reviews” routes */
|
|
15
|
+
export interface MedusaReviewsAuthenticatedOptions extends MedusaReviewsClientOptions {
|
|
16
|
+
authorization: string;
|
|
17
|
+
}
|
|
18
|
+
export interface MedusaProductRatingApiBody {
|
|
19
|
+
rating?: {
|
|
20
|
+
average_rating?: number;
|
|
21
|
+
total_reviews?: number;
|
|
22
|
+
total_rating_sum?: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface ProductRatingSummary {
|
|
26
|
+
averageRating: number;
|
|
27
|
+
totalReviews: number;
|
|
28
|
+
}
|
|
29
|
+
export interface MedusaStoreRatingEntry {
|
|
30
|
+
product_id?: string;
|
|
31
|
+
average_rating?: number;
|
|
32
|
+
total_reviews?: number;
|
|
33
|
+
total_rating_sum?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET /store/ratings — all product ratings, or filter by product_id.
|
|
37
|
+
*/
|
|
38
|
+
export declare function medusaListRatings(options: MedusaReviewsClientOptions, query?: {
|
|
39
|
+
product_id?: string;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
rating: MedusaStoreRatingEntry[];
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* GET /store/products/:id/rating
|
|
45
|
+
*/
|
|
46
|
+
export declare function medusaGetProductRatingSummary(productId: string, options: MedusaReviewsClientOptions): Promise<ProductRatingSummary>;
|
|
47
|
+
export interface MedusaProductReview {
|
|
48
|
+
id: string;
|
|
49
|
+
product_id: string;
|
|
50
|
+
customer_id?: string;
|
|
51
|
+
rating: number;
|
|
52
|
+
title?: string | null;
|
|
53
|
+
description?: string | null;
|
|
54
|
+
images?: string[] | null;
|
|
55
|
+
verified_purchase?: boolean;
|
|
56
|
+
status?: string;
|
|
57
|
+
created_at?: string;
|
|
58
|
+
updated_at?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface MedusaListProductReviewsQuery {
|
|
61
|
+
status?: 'approved' | 'pending' | 'rejected';
|
|
62
|
+
limit?: number;
|
|
63
|
+
offset?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* GET /store/products/:id/reviews
|
|
67
|
+
*/
|
|
68
|
+
export declare function medusaListProductReviews(productId: string, options: MedusaReviewsClientOptions, query?: MedusaListProductReviewsQuery): Promise<{
|
|
69
|
+
reviews: MedusaProductReview[];
|
|
70
|
+
}>;
|
|
71
|
+
export interface MedusaSubmitReviewBody {
|
|
72
|
+
product_id: string;
|
|
73
|
+
rating: number;
|
|
74
|
+
title?: string;
|
|
75
|
+
description?: string;
|
|
76
|
+
images?: string[];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* POST /store/reviews
|
|
80
|
+
*/
|
|
81
|
+
export declare function medusaSubmitReview(body: MedusaSubmitReviewBody, options: MedusaReviewsAuthenticatedOptions): Promise<{
|
|
82
|
+
review: MedusaProductReview;
|
|
83
|
+
}>;
|
|
84
|
+
export interface MedusaUpdateReviewBody {
|
|
85
|
+
rating?: number;
|
|
86
|
+
title?: string;
|
|
87
|
+
description?: string;
|
|
88
|
+
images?: string[];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* PUT /store/reviews/:id
|
|
92
|
+
*/
|
|
93
|
+
export declare function medusaUpdateReview(reviewId: string, body: MedusaUpdateReviewBody, options: MedusaReviewsAuthenticatedOptions): Promise<{
|
|
94
|
+
review: MedusaProductReview;
|
|
95
|
+
}>;
|
|
96
|
+
/**
|
|
97
|
+
* GET /store/reviews/:id
|
|
98
|
+
*/
|
|
99
|
+
export declare function medusaGetStoreReview(reviewId: string, options: MedusaReviewsClientOptions): Promise<{
|
|
100
|
+
review: MedusaProductReview;
|
|
101
|
+
}>;
|
|
102
|
+
export interface MedusaCustomerReviewsSummary {
|
|
103
|
+
total_reviews?: number;
|
|
104
|
+
average_rating?: number;
|
|
105
|
+
total_rating_sum?: number;
|
|
106
|
+
product_id?: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* GET /store/reviews/me
|
|
110
|
+
*/
|
|
111
|
+
export declare function medusaListCustomerReviews(options: MedusaReviewsAuthenticatedOptions, query?: {
|
|
112
|
+
product_id?: string;
|
|
113
|
+
status?: 'approved' | 'pending' | 'rejected';
|
|
114
|
+
}): Promise<{
|
|
115
|
+
reviews: MedusaProductReview[];
|
|
116
|
+
summary?: MedusaCustomerReviewsSummary;
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* GET /store/products/:id/reviews/me
|
|
120
|
+
*/
|
|
121
|
+
export declare function medusaListCustomerProductReviews(productId: string, options: MedusaReviewsAuthenticatedOptions): Promise<{
|
|
122
|
+
reviews: MedusaProductReview[];
|
|
123
|
+
summary?: MedusaCustomerReviewsSummary;
|
|
124
|
+
}>;
|
|
125
|
+
export interface MedusaUploadedFile {
|
|
126
|
+
url: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* POST /store/upload — multipart FormData with `files` field(s).
|
|
130
|
+
* Do not set Content-Type; the runtime sets the boundary.
|
|
131
|
+
*/
|
|
132
|
+
export declare function medusaUploadStoreFiles(formData: FormData, options: MedusaReviewsAuthenticatedOptions): Promise<{
|
|
133
|
+
files: MedusaUploadedFile[];
|
|
134
|
+
}>;
|
|
135
|
+
//# sourceMappingURL=reviews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../reviews.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,0BAA0B;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAUD;;GAEG;AACH,wBAAgB,oCAAoC,IAAI,0BAA0B,CAQjF;AAED,iFAAiF;AACjF,MAAM,WAAW,iCAAkC,SAAQ,0BAA0B;IACjF,aAAa,EAAE,MAAM,CAAC;CACzB;AAyCD,MAAM,WAAW,0BAA0B;IACvC,MAAM,CAAC,EAAE;QACL,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;CACL;AAED,MAAM,WAAW,oBAAoB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACnC,OAAO,EAAE,0BAA0B,EACnC,KAAK,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC,OAAO,CAAC;IAAE,MAAM,EAAE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