@uappi/public-sdk 1.1.17 → 1.1.19

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.
@@ -2,6 +2,7 @@ import { usePublicApi } from '..';
2
2
 
3
3
  import type {
4
4
  ApiParams,
5
+ CreateProductReviewResponse,
5
6
  ProductReviewRequest,
6
7
  ProductReviewResponse,
7
8
  ReviewConditionFields,
@@ -31,7 +32,7 @@ export function createProductReview(
31
32
  productId: number,
32
33
  payload: ProductReviewRequest,
33
34
  ) {
34
- return usePublicApi<ProductReviewRequest>({
35
+ return usePublicApi<CreateProductReviewResponse>({
35
36
  endpoint: `/review/product/${productId}`,
36
37
  method: 'POST',
37
38
  payload,
@@ -62,6 +62,7 @@ import {
62
62
  import { listShipmentQuoteProduct } from './endpoints/ProductQuoteShipment';
63
63
  import {
64
64
  createProductReview,
65
+ createImageProductReview,
65
66
  listProductReview,
66
67
  listStoreReview,
67
68
  listCustomerReview,
@@ -97,6 +98,7 @@ const customization = {
97
98
  const customer = {
98
99
  addNewsletter,
99
100
  createProductReview,
101
+ createImageProductReview,
100
102
  listProductReview,
101
103
  listStoreReview,
102
104
  createInterest,
@@ -1,4 +1,4 @@
1
- import type { Pagination, SimpleProduct } from '../..';
1
+ import type { Pagination, SimpleProduct } from "../..";
2
2
 
3
3
  export interface ProductReview {
4
4
  id: number;
@@ -34,3 +34,20 @@ export interface ProductReviewRequest {
34
34
  recommended: boolean;
35
35
  score: number;
36
36
  }
37
+
38
+ export interface CreateProductReviewResponse {
39
+ active: boolean;
40
+ comment: string;
41
+ createdAt: string;
42
+ customerId: number;
43
+ email: string;
44
+ id: number;
45
+ masked: boolean;
46
+ medias: null;
47
+ name: string;
48
+ product: null;
49
+ productId: number;
50
+ recommended: boolean;
51
+ score: number;
52
+ updatedAt: string;
53
+ }
@@ -187,6 +187,7 @@ import type {
187
187
  ProductReviewRequest,
188
188
  ProductReviewResponse,
189
189
  ProductReview,
190
+ CreateProductReviewResponse,
190
191
  } from './endpoints/review/review.interfaces';
191
192
  import type { Seal, SealSetting } from './endpoints/seal/seal.interfaces';
192
193
  import type { Seals } from './endpoints/seal/seal.types';
@@ -327,6 +328,7 @@ export type {
327
328
 
328
329
  // Avaliaçoes
329
330
  ProductReviewRequest,
331
+ CreateProductReviewResponse,
330
332
  ProductReviewResponse,
331
333
  ProductReview,
332
334
  ReviewConditionFields,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uappi/public-sdk",
3
- "version": "1.1.17",
3
+ "version": "1.1.19",
4
4
  "description": "Pacotes públicos para desenvolvimento do ecossistema Uappi",
5
5
  "main": "main.ts",
6
6
  "scripts": {