@fiado/api-invoker 5.137.0 → 5.138.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/bin/retailPromotions/api/RetailPromotionsBusinessApi.d.ts +2 -1
- package/bin/retailPromotions/api/RetailPromotionsBusinessApi.js +3 -0
- package/bin/retailPromotions/api/interfaces/IRetailPromotionsBusinessApi.d.ts +6 -1
- package/package.json +1 -1
- package/src/retailPromotions/api/RetailPromotionsBusinessApi.ts +5 -0
- package/src/retailPromotions/api/interfaces/IRetailPromotionsBusinessApi.ts +7 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
import type { ActiveSalePromotionsBySkusRequest, ActiveSalePromotionsBySkusResponse, PrivateReleaseSalePromotionResponse } from "@fiado/type-kit/bin/retailPromotions/index.js";
|
|
3
|
+
import type { ActiveSalePromotionsBySkusRequest, ActiveSalePromotionsBySkusResponse, PrivateReleaseSalePromotionResponse, WelcomeBonusPromotionResponse } from "@fiado/type-kit/bin/retailPromotions/index.js";
|
|
4
4
|
import { IRetailPromotionsBusinessApi } from "./interfaces/IRetailPromotionsBusinessApi.js";
|
|
5
5
|
/** Publisher HTTP de los privados de `retail-promotions-business`. Contrato -> `IRetailPromotionsBusinessApi`. */
|
|
6
6
|
export default class RetailPromotionsBusinessApi implements IRetailPromotionsBusinessApi {
|
|
@@ -9,4 +9,5 @@ export default class RetailPromotionsBusinessApi implements IRetailPromotionsBus
|
|
|
9
9
|
constructor(httpRequest: IHttpRequest);
|
|
10
10
|
releaseSalePromotion(tenantId: string, sessionId: string): Promise<StandardResponse<PrivateReleaseSalePromotionResponse>>;
|
|
11
11
|
listActiveSalePromotionsBySkus(input: ActiveSalePromotionsBySkusRequest): Promise<StandardResponse<ActiveSalePromotionsBySkusResponse>>;
|
|
12
|
+
getWelcomeBonus(retailerId: string): Promise<StandardResponse<WelcomeBonusPromotionResponse>>;
|
|
12
13
|
}
|
|
@@ -27,6 +27,9 @@ let RetailPromotionsBusinessApi = class RetailPromotionsBusinessApi {
|
|
|
27
27
|
async listActiveSalePromotionsBySkus(input) {
|
|
28
28
|
return await this.httpRequest.post(`${this.baseUrl}/private/sale-promotions/active-by-skus`, input);
|
|
29
29
|
}
|
|
30
|
+
async getWelcomeBonus(retailerId) {
|
|
31
|
+
return await this.httpRequest.get(`${this.baseUrl}/private/retailers/${encodeURIComponent(retailerId)}/welcome-bonus`);
|
|
32
|
+
}
|
|
30
33
|
};
|
|
31
34
|
RetailPromotionsBusinessApi = __decorate([
|
|
32
35
|
injectable(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import type { ActiveSalePromotionsBySkusRequest, ActiveSalePromotionsBySkusResponse, PrivateReleaseSalePromotionResponse } from "@fiado/type-kit/bin/retailPromotions/index.js";
|
|
2
|
+
import type { ActiveSalePromotionsBySkusRequest, ActiveSalePromotionsBySkusResponse, PrivateReleaseSalePromotionResponse, WelcomeBonusPromotionResponse } from "@fiado/type-kit/bin/retailPromotions/index.js";
|
|
3
3
|
export interface IRetailPromotionsBusinessApi {
|
|
4
4
|
/**
|
|
5
5
|
* `DELETE /private/sessions/{sessionId}/sale-promotion`: suelta el apartado de la promo de venta.
|
|
@@ -11,4 +11,9 @@ export interface IRetailPromotionsBusinessApi {
|
|
|
11
11
|
* Una entrada por SKU en el orden pedido; `UNAVAILABLE` por entrada si no se pudieron leer.
|
|
12
12
|
*/
|
|
13
13
|
listActiveSalePromotionsBySkus(input: ActiveSalePromotionsBySkusRequest): Promise<StandardResponse<ActiveSalePromotionsBySkusResponse>>;
|
|
14
|
+
/**
|
|
15
|
+
* `GET /private/retailers/{retailerId}/welcome-bonus`: promo de sistema del bono de bienvenida.
|
|
16
|
+
* Sin `tenantId`; la siembra si no existe. `active=false` = pausada, el wizard no paga bono.
|
|
17
|
+
*/
|
|
18
|
+
getWelcomeBonus(retailerId: string): Promise<StandardResponse<WelcomeBonusPromotionResponse>>;
|
|
14
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.138.0",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "bin/index.js",
|
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
ActiveSalePromotionsBySkusRequest,
|
|
6
6
|
ActiveSalePromotionsBySkusResponse,
|
|
7
7
|
PrivateReleaseSalePromotionResponse,
|
|
8
|
+
WelcomeBonusPromotionResponse,
|
|
8
9
|
} from "@fiado/type-kit/bin/retailPromotions/index.js";
|
|
9
10
|
import { IRetailPromotionsBusinessApi } from "./interfaces/IRetailPromotionsBusinessApi.js";
|
|
10
11
|
|
|
@@ -30,4 +31,8 @@ export default class RetailPromotionsBusinessApi implements IRetailPromotionsBus
|
|
|
30
31
|
): Promise<StandardResponse<ActiveSalePromotionsBySkusResponse>> {
|
|
31
32
|
return await this.httpRequest.post(`${this.baseUrl}/private/sale-promotions/active-by-skus`, input);
|
|
32
33
|
}
|
|
34
|
+
|
|
35
|
+
async getWelcomeBonus(retailerId: string): Promise<StandardResponse<WelcomeBonusPromotionResponse>> {
|
|
36
|
+
return await this.httpRequest.get(`${this.baseUrl}/private/retailers/${encodeURIComponent(retailerId)}/welcome-bonus`);
|
|
37
|
+
}
|
|
33
38
|
}
|
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
ActiveSalePromotionsBySkusRequest,
|
|
4
4
|
ActiveSalePromotionsBySkusResponse,
|
|
5
5
|
PrivateReleaseSalePromotionResponse,
|
|
6
|
+
WelcomeBonusPromotionResponse,
|
|
6
7
|
} from "@fiado/type-kit/bin/retailPromotions/index.js";
|
|
7
8
|
|
|
8
9
|
// Contrato de los privados de `retail-promotions-business`; el caller manda `tenantId` por query o en el body.
|
|
@@ -24,4 +25,10 @@ export interface IRetailPromotionsBusinessApi {
|
|
|
24
25
|
listActiveSalePromotionsBySkus(
|
|
25
26
|
input: ActiveSalePromotionsBySkusRequest,
|
|
26
27
|
): Promise<StandardResponse<ActiveSalePromotionsBySkusResponse>>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* `GET /private/retailers/{retailerId}/welcome-bonus`: promo de sistema del bono de bienvenida.
|
|
31
|
+
* Sin `tenantId`; la siembra si no existe. `active=false` = pausada, el wizard no paga bono.
|
|
32
|
+
*/
|
|
33
|
+
getWelcomeBonus(retailerId: string): Promise<StandardResponse<WelcomeBonusPromotionResponse>>;
|
|
27
34
|
}
|