@uappi/public-sdk 1.1.12 → 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.
@@ -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
+ }
@@ -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 = {
@@ -470,3 +470,7 @@ export interface CustomerDetailWishlistResponse {
470
470
  pagination: Pagination;
471
471
  }
472
472
  }
473
+
474
+ export interface AddProductToWishlistRequest {
475
+ productId: number;
476
+ }
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uappi/public-sdk",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "Pacotes públicos para desenvolvimento do ecossistema Uappi",
5
5
  "main": "main.ts",
6
6
  "scripts": {