@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.
- package/modules/Api/endpoints/PromotionalForecastComposable.ts +11 -0
- package/modules/Api/index.ts +2 -0
- package/modules/Api/types/context/api-params.types.ts +3 -0
- package/modules/Api/types/endpoints/promotional-forecast/promotional-forecast.interfaces.ts +11 -0
- package/modules/Api/types/index.ts +8 -0
- package/package.json +1 -1
|
@@ -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
|
+
}
|
package/modules/Api/index.ts
CHANGED
|
@@ -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 = {
|
|
@@ -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,
|