@uappi/public-sdk 1.1.11 → 1.1.13
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/modules/Api/endpoints/CustomerComposable.ts +18 -1
- package/modules/Api/index.ts +6 -2
- package/modules/Api/types/endpoints/customer/customer.interfaces.ts +4 -0
- package/modules/Api/types/endpoints/product/product.interfaces.ts +6 -0
- package/modules/Api/types/index.ts +3 -1
- package/package.json +1 -1
|
@@ -38,7 +38,8 @@ import type {
|
|
|
38
38
|
CustomerWishlistConditionFields,
|
|
39
39
|
CustomerWishlistSortFields,
|
|
40
40
|
CustomerListWishlistResponse,
|
|
41
|
-
CustomerDetailWishlistResponse
|
|
41
|
+
CustomerDetailWishlistResponse,
|
|
42
|
+
AddProductToWishlistRequest
|
|
42
43
|
} from '../types';
|
|
43
44
|
|
|
44
45
|
export function detail(
|
|
@@ -297,3 +298,19 @@ export function listWishlist(
|
|
|
297
298
|
params: options,
|
|
298
299
|
});
|
|
299
300
|
}
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
export function addProductToWishlist(payload: AddProductToWishlistRequest) {
|
|
304
|
+
return usePublicApi<true>({
|
|
305
|
+
endpoint: '/customer/wish-list/product',
|
|
306
|
+
method: 'POST',
|
|
307
|
+
payload,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export function removeProductToWishlist(productId: number) {
|
|
312
|
+
return usePublicApi<true>({
|
|
313
|
+
endpoint: `/customer/wish-list/product/${productId}`,
|
|
314
|
+
method: 'DELETE'
|
|
315
|
+
});
|
|
316
|
+
}
|
package/modules/Api/index.ts
CHANGED
|
@@ -45,7 +45,9 @@ import {
|
|
|
45
45
|
addNewsletter,
|
|
46
46
|
updateDocument,
|
|
47
47
|
listWishlist,
|
|
48
|
-
detailWishlist
|
|
48
|
+
detailWishlist,
|
|
49
|
+
addProductToWishlist,
|
|
50
|
+
removeProductToWishlist
|
|
49
51
|
} from './endpoints/CustomerComposable';
|
|
50
52
|
import { createInterest } from './endpoints/InterestComposable';
|
|
51
53
|
import { loggout } from './endpoints/LoggoutComposable';
|
|
@@ -123,7 +125,9 @@ const customer = {
|
|
|
123
125
|
claimGiftCard,
|
|
124
126
|
updateDocument,
|
|
125
127
|
listWishlist,
|
|
126
|
-
detailWishlist
|
|
128
|
+
detailWishlist,
|
|
129
|
+
addProductToWishlist,
|
|
130
|
+
removeProductToWishlist
|
|
127
131
|
};
|
|
128
132
|
|
|
129
133
|
const cart = {
|
|
@@ -103,7 +103,8 @@ import type {
|
|
|
103
103
|
UpdateCustomerDocument,
|
|
104
104
|
UpdateCustomerDocumentResponse,
|
|
105
105
|
CustomerDetailWishlistResponse,
|
|
106
|
-
CustomerListWishlistResponse
|
|
106
|
+
CustomerListWishlistResponse,
|
|
107
|
+
AddProductToWishlistRequest,
|
|
107
108
|
} from './endpoints/customer/customer.interfaces';
|
|
108
109
|
import type {
|
|
109
110
|
CustomerGender,
|
|
@@ -445,6 +446,7 @@ export type {
|
|
|
445
446
|
UpdateCustomerDocumentResponse,
|
|
446
447
|
CustomerDetailWishlistResponse,
|
|
447
448
|
CustomerListWishlistResponse,
|
|
449
|
+
AddProductToWishlistRequest,
|
|
448
450
|
|
|
449
451
|
// Order
|
|
450
452
|
Order,
|