@uappi/public-sdk 1.1.19 → 1.1.21

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
+ CreateProductReviewMediaResponse,
5
6
  CreateProductReviewResponse,
6
7
  ProductReviewRequest,
7
8
  ProductReviewResponse,
@@ -50,7 +51,7 @@ export function createImageProductReview(
50
51
  formData.append(`medias[${index}]`, file);
51
52
  });
52
53
 
53
- return usePublicApi<ProductReviewRequest>({
54
+ return usePublicApi<Array<CreateProductReviewMediaResponse>>({
54
55
  endpoint: `/review/${productReviewId}/product/media`,
55
56
  method: 'POST',
56
57
  payload: formData,
@@ -438,6 +438,7 @@ export interface CustomerHistory {
438
438
  after:
439
439
  | CustomerResponse
440
440
  | { id: number }
441
+ | { amount: number; available: boolean; expiresAt: string; }
441
442
  | CustomerAddressResponse
442
443
  | { amount: number };
443
444
  orderId: null | number;
@@ -51,3 +51,10 @@ export interface CreateProductReviewResponse {
51
51
  score: number;
52
52
  updatedAt: string;
53
53
  }
54
+
55
+ export interface CreateProductReviewMediaResponse {
56
+ createdAt: string;
57
+ image: string;
58
+ mediaId: number;
59
+ reviewId: number;
60
+ }
@@ -188,6 +188,7 @@ import type {
188
188
  ProductReviewResponse,
189
189
  ProductReview,
190
190
  CreateProductReviewResponse,
191
+ CreateProductReviewMediaResponse,
191
192
  } from './endpoints/review/review.interfaces';
192
193
  import type { Seal, SealSetting } from './endpoints/seal/seal.interfaces';
193
194
  import type { Seals } from './endpoints/seal/seal.types';
@@ -329,6 +330,7 @@ export type {
329
330
  // Avaliaçoes
330
331
  ProductReviewRequest,
331
332
  CreateProductReviewResponse,
333
+ CreateProductReviewMediaResponse,
332
334
  ProductReviewResponse,
333
335
  ProductReview,
334
336
  ReviewConditionFields,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uappi/public-sdk",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "description": "Pacotes públicos para desenvolvimento do ecossistema Uappi",
5
5
  "main": "main.ts",
6
6
  "scripts": {