@uappi/public-sdk 1.5.0 → 1.6.0

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.
@@ -0,0 +1,11 @@
1
+ import { usePublicApi } from '..';
2
+
3
+ import type { PromotionalForecastResponse } from '../types';
4
+
5
+ export function getPromotionalForecast(productId: number) {
6
+ return usePublicApi<PromotionalForecastResponse>({
7
+ endpoint: '/publics/products/promotional-forecast',
8
+ method: 'GET',
9
+ params: { productId },
10
+ });
11
+ }
@@ -56,6 +56,7 @@ import { createInterest } from './endpoints/InterestComposable';
56
56
  import { loggout } from './endpoints/LoggoutComposable';
57
57
  import { listMenu } from './endpoints/MenuComposable';
58
58
  import { listPairOffers } from './endpoints/PairOfferComposable';
59
+ import { getPromotionalForecast } from './endpoints/PromotionalForecastComposable';
59
60
  import { paymentConditions } from './endpoints/PaymentComposable';
60
61
  import {
61
62
  deleteProductComment,
@@ -190,6 +191,7 @@ const promotional = {
190
191
  deleteWallet,
191
192
  applyPoint,
192
193
  deletePoint,
194
+ getPromotionalForecast,
193
195
  };
194
196
 
195
197
  const notify = {
@@ -17,6 +17,9 @@ export interface ApiParams<
17
17
  targetCountryCode?: string;
18
18
  items?: Array<{ productId: number; quantity: number }>;
19
19
 
20
+ // for promotional forecast
21
+ productId?: number;
22
+
20
23
  variationMap?: Record<string, number>;
21
24
 
22
25
  loginUrl?: string;
@@ -0,0 +1,11 @@
1
+ export interface PromotionalForecastPointSystem {
2
+ name: string;
3
+ pointValue: number;
4
+ finalAmount: number;
5
+ finalValue: number;
6
+ }
7
+
8
+ export interface PromotionalForecastResponse {
9
+ pointSystem: PromotionalForecastPointSystem | null;
10
+ promotions: Array<Record<string, unknown>>;
11
+ }
@@ -143,6 +143,10 @@ import type {
143
143
  PairOffer,
144
144
  PairOfferResponse,
145
145
  } from './endpoints/pair-offer/pair-offer.interfaces';
146
+ import type {
147
+ PromotionalForecastPointSystem,
148
+ PromotionalForecastResponse,
149
+ } from './endpoints/promotional-forecast/promotional-forecast.interfaces';
146
150
  import type {
147
151
  Payment,
148
152
  PaymentConfiguration,
@@ -354,6 +358,10 @@ export type {
354
358
  PairOffer,
355
359
  PairOfferResponse,
356
360
 
361
+ // Previsão de promocional/pontos por produto
362
+ PromotionalForecastPointSystem,
363
+ PromotionalForecastResponse,
364
+
357
365
  // Avaliaçoes
358
366
  ProductReviewRequest,
359
367
  CreateProductReviewResponse,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uappi/public-sdk",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Pacotes públicos para desenvolvimento do ecossistema Uappi",
5
5
  "main": "main.ts",
6
6
  "scripts": {