@uappi/public-sdk 1.1.8 → 1.1.10
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 +44 -0
- package/modules/Api/index.ts +5 -1
- package/modules/Api/types/endpoints/customer/customer-obsearch.ts +10 -0
- package/modules/Api/types/endpoints/customer/customer.interfaces.ts +23 -0
- package/modules/Api/types/index.ts +11 -1
- package/package.json +1 -1
|
@@ -34,6 +34,11 @@ import type {
|
|
|
34
34
|
CheckCustomerResponse,
|
|
35
35
|
UpdateCustomerDocument,
|
|
36
36
|
UpdateCustomerDocumentResponse,
|
|
37
|
+
ProductFields,
|
|
38
|
+
CustomerWishlistConditionFields,
|
|
39
|
+
CustomerWishlistSortFields,
|
|
40
|
+
CustomerListWishlistResponse,
|
|
41
|
+
CustomerDetailWishlistResponse
|
|
37
42
|
} from '../types';
|
|
38
43
|
|
|
39
44
|
export function detail(
|
|
@@ -253,3 +258,42 @@ export function listCustomerHistory(
|
|
|
253
258
|
params: options,
|
|
254
259
|
});
|
|
255
260
|
}
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
export function detailWishlist(
|
|
265
|
+
wishlistId: number,
|
|
266
|
+
options?: Pick<
|
|
267
|
+
ApiParams<ProductFields, '', ''>,
|
|
268
|
+
'fields' | 'limit' | 'offset'
|
|
269
|
+
>,
|
|
270
|
+
) {
|
|
271
|
+
return usePublicApi<
|
|
272
|
+
CustomerDetailWishlistResponse,
|
|
273
|
+
ProductFields,
|
|
274
|
+
'',
|
|
275
|
+
''
|
|
276
|
+
>({
|
|
277
|
+
endpoint: `/customer/wish-list/${wishlistId}/products`,
|
|
278
|
+
method: 'GET',
|
|
279
|
+
params: options,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export function listWishlist(
|
|
284
|
+
options?: Pick<
|
|
285
|
+
ApiParams<'', CustomerWishlistSortFields, CustomerWishlistConditionFields>,
|
|
286
|
+
'condition' | 'limit' | 'offset' | 'order'
|
|
287
|
+
>,
|
|
288
|
+
) {
|
|
289
|
+
return usePublicApi<
|
|
290
|
+
CustomerListWishlistResponse,
|
|
291
|
+
'',
|
|
292
|
+
CustomerWishlistSortFields,
|
|
293
|
+
CustomerWishlistConditionFields
|
|
294
|
+
>({
|
|
295
|
+
endpoint: '/customer/wish-list/',
|
|
296
|
+
method: 'GET',
|
|
297
|
+
params: options,
|
|
298
|
+
});
|
|
299
|
+
}
|
package/modules/Api/index.ts
CHANGED
|
@@ -43,7 +43,9 @@ import {
|
|
|
43
43
|
listOrderItemHistory,
|
|
44
44
|
listCustomerHistory,
|
|
45
45
|
addNewsletter,
|
|
46
|
-
updateDocument
|
|
46
|
+
updateDocument,
|
|
47
|
+
listWishlist,
|
|
48
|
+
detailWishlist
|
|
47
49
|
} from './endpoints/CustomerComposable';
|
|
48
50
|
import { createInterest } from './endpoints/InterestComposable';
|
|
49
51
|
import { loggout } from './endpoints/LoggoutComposable';
|
|
@@ -120,6 +122,8 @@ const customer = {
|
|
|
120
122
|
listWalletTransaction,
|
|
121
123
|
claimGiftCard,
|
|
122
124
|
updateDocument,
|
|
125
|
+
listWishlist,
|
|
126
|
+
detailWishlist
|
|
123
127
|
};
|
|
124
128
|
|
|
125
129
|
const cart = {
|
|
@@ -101,3 +101,13 @@ export type CustomerHistoryConditionFields =
|
|
|
101
101
|
| 'origin'
|
|
102
102
|
| 'action'
|
|
103
103
|
| 'createdAt';
|
|
104
|
+
|
|
105
|
+
export type CustomerWishlistConditionFields =
|
|
106
|
+
| 'id'
|
|
107
|
+
| 'customerId'
|
|
108
|
+
| 'name'
|
|
109
|
+
| 'shareList';
|
|
110
|
+
|
|
111
|
+
export type CustomerWishlistSortFields = 'id' | 'createdAt';
|
|
112
|
+
|
|
113
|
+
|
|
@@ -446,3 +446,26 @@ export interface CustomerHistoryResponse {
|
|
|
446
446
|
registers: Array<CustomerHistory>;
|
|
447
447
|
pagination: Pagination;
|
|
448
448
|
}
|
|
449
|
+
|
|
450
|
+
export interface Wishlist {
|
|
451
|
+
customerId: number;
|
|
452
|
+
name: string;
|
|
453
|
+
shareList: boolean;
|
|
454
|
+
default: boolean;
|
|
455
|
+
id: number;
|
|
456
|
+
uriCode: null;
|
|
457
|
+
createdAt: string;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export interface CustomerListWishlistResponse {
|
|
461
|
+
registers: Array<Wishlist>;
|
|
462
|
+
pagination: Pagination;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export interface CustomerDetailWishlistResponse {
|
|
466
|
+
wishList: Wishlist;
|
|
467
|
+
products: {
|
|
468
|
+
registers: Array<CustomerHistory>;
|
|
469
|
+
pagination: Pagination;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
@@ -71,6 +71,8 @@ import type {
|
|
|
71
71
|
CustomerOrderItemHistorySortFields,
|
|
72
72
|
CustomerHistoryConditionFields,
|
|
73
73
|
CustomerHistorySortFields,
|
|
74
|
+
CustomerWishlistConditionFields,
|
|
75
|
+
CustomerWishlistSortFields
|
|
74
76
|
} from './endpoints/customer/customer-obsearch';
|
|
75
77
|
import type {
|
|
76
78
|
UpdateCustomer,
|
|
@@ -99,7 +101,9 @@ import type {
|
|
|
99
101
|
AddCustomerToNewsletterRequest,
|
|
100
102
|
AddCustomerToNewsletterResponse,
|
|
101
103
|
UpdateCustomerDocument,
|
|
102
|
-
UpdateCustomerDocumentResponse
|
|
104
|
+
UpdateCustomerDocumentResponse,
|
|
105
|
+
CustomerDetailWishlistResponse,
|
|
106
|
+
CustomerListWishlistResponse
|
|
103
107
|
} from './endpoints/customer/customer.interfaces';
|
|
104
108
|
import type {
|
|
105
109
|
CustomerGender,
|
|
@@ -195,6 +199,7 @@ import type {
|
|
|
195
199
|
ShipmentQuoteProductRequest,
|
|
196
200
|
ShipmentQuoteProductResponse,
|
|
197
201
|
SelectShipimentRequest,
|
|
202
|
+
PickupPoint
|
|
198
203
|
} from './endpoints/shipment/shipment.interfaces';
|
|
199
204
|
import type { TitleType } from './endpoints/showcase/showcase.enums';
|
|
200
205
|
import type { Showcase } from './endpoints/showcase/showcase.interfaces';
|
|
@@ -307,6 +312,7 @@ export type {
|
|
|
307
312
|
ShipmentQuoteProductRequest,
|
|
308
313
|
ShipmentQuoteProductResponse,
|
|
309
314
|
SelectShipimentRequest,
|
|
315
|
+
PickupPoint,
|
|
310
316
|
|
|
311
317
|
// Avise-me/Sobconsulta = Interests
|
|
312
318
|
InterestType,
|
|
@@ -419,6 +425,8 @@ export type {
|
|
|
419
425
|
CustomerOrderItemHistorySortFields,
|
|
420
426
|
CustomerHistoryConditionFields,
|
|
421
427
|
CustomerHistorySortFields,
|
|
428
|
+
CustomerWishlistConditionFields,
|
|
429
|
+
CustomerWishlistSortFields,
|
|
422
430
|
CustomerErrorCode,
|
|
423
431
|
UpsertCustomerAddressRequest,
|
|
424
432
|
CustomerAddressResponse,
|
|
@@ -435,6 +443,8 @@ export type {
|
|
|
435
443
|
AddCustomerToNewsletterResponse,
|
|
436
444
|
UpdateCustomerDocument,
|
|
437
445
|
UpdateCustomerDocumentResponse,
|
|
446
|
+
CustomerDetailWishlistResponse,
|
|
447
|
+
CustomerListWishlistResponse,
|
|
438
448
|
|
|
439
449
|
// Order
|
|
440
450
|
Order,
|