@fiado/api-invoker 5.135.0 → 5.136.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/retailCustomer/api/RetailCustomerBusinessApi.d.ts +1 -2
- package/bin/retailCustomer/api/RetailCustomerBusinessApi.js +0 -4
- package/bin/retailCustomer/api/interfaces/IRetailCustomerBusinessApi.d.ts +1 -10
- package/package.json +1 -1
- package/src/retailCustomer/api/RetailCustomerBusinessApi.ts +0 -10
- package/src/retailCustomer/api/interfaces/IRetailCustomerBusinessApi.ts +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
import { UpsertCustomerFromKycRequest,
|
|
3
|
+
import { UpsertCustomerFromKycRequest, AccountResultRequest, CustomerResponse, PromotionBonusEntryResponse, UpsertPromotionBonusRequest, WelcomeAccreditationRequest, WelcomeAccreditationResponse, WelcomeAccreditationResultRequest, WelcomeBonusResponse } from "@fiado/type-kit/bin/retailCustomer/index.js";
|
|
4
4
|
import { CustomersBatchRequest, CustomersBatchResponse } from "./dtos/CustomersBatch.js";
|
|
5
5
|
import { CustomersPageQuery, PrivateCustomerListItem } from "./dtos/CustomersPage.js";
|
|
6
6
|
import { PaginatedResult } from "@fiado/type-kit/bin/retailOrg/index.js";
|
|
@@ -24,7 +24,6 @@ export default class RetailCustomerBusinessApi implements IRetailCustomerBusines
|
|
|
24
24
|
private readonly baseUrl;
|
|
25
25
|
constructor(httpRequest: IHttpRequest);
|
|
26
26
|
upsertCustomerFromKyc(payload: UpsertCustomerFromKycRequest, tenantId: string): Promise<StandardResponse<CustomerResponse>>;
|
|
27
|
-
ensureCustomerByPhone(payload: EnsureCustomerByPhoneRequest, tenantId: string): Promise<StandardResponse<EnsureCustomerByPhoneResponse>>;
|
|
28
27
|
setAccountResult(customerId: string, payload: AccountResultRequest, tenantId: string): Promise<StandardResponse<CustomerResponse>>;
|
|
29
28
|
getCustomerByPhone(phone: string, tenantId: string): Promise<StandardResponse<CustomerResponse>>;
|
|
30
29
|
getCustomer(customerId: string, tenantId: string): Promise<StandardResponse<CustomerResponse>>;
|
|
@@ -35,10 +35,6 @@ let RetailCustomerBusinessApi = class RetailCustomerBusinessApi {
|
|
|
35
35
|
const url = `${this.baseUrl}/private/customers/upsert-from-kyc?tenantId=${encodeURIComponent(tenantId)}`;
|
|
36
36
|
return await this.httpRequest.post(url, payload);
|
|
37
37
|
}
|
|
38
|
-
async ensureCustomerByPhone(payload, tenantId) {
|
|
39
|
-
const url = `${this.baseUrl}/private/customers/ensure-by-phone?tenantId=${encodeURIComponent(tenantId)}`;
|
|
40
|
-
return await this.httpRequest.post(url, payload);
|
|
41
|
-
}
|
|
42
38
|
async setAccountResult(customerId, payload, tenantId) {
|
|
43
39
|
const url = `${this.baseUrl}/private/customers/${encodeURIComponent(customerId)}/account-result?tenantId=${encodeURIComponent(tenantId)}`;
|
|
44
40
|
return await this.httpRequest.put(url, payload);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { UpsertCustomerFromKycRequest,
|
|
2
|
+
import { UpsertCustomerFromKycRequest, AccountResultRequest, CustomerResponse, PromotionBonusEntryResponse, UpsertPromotionBonusRequest, WelcomeAccreditationRequest, WelcomeAccreditationResponse, WelcomeAccreditationResultRequest, WelcomeBonusResponse } from "@fiado/type-kit/bin/retailCustomer/index.js";
|
|
3
3
|
import { CustomersBatchRequest, CustomersBatchResponse } from "../dtos/CustomersBatch.js";
|
|
4
4
|
import { CustomersPageQuery, PrivateCustomerListItem } from "../dtos/CustomersPage.js";
|
|
5
5
|
import { PaginatedResult } from "@fiado/type-kit/bin/retailOrg/index.js";
|
|
@@ -54,15 +54,6 @@ export interface IRetailCustomerBusinessApi {
|
|
|
54
54
|
* aditivo al type-kit (backlog) — no acá.
|
|
55
55
|
*/
|
|
56
56
|
upsertCustomerFromKyc(payload: UpsertCustomerFromKycRequest, tenantId: string): Promise<StandardResponse<CustomerResponse>>;
|
|
57
|
-
/**
|
|
58
|
-
* POST /private/customers/ensure-by-phone?tenantId= — devuelve el cliente de ese celular o lo da
|
|
59
|
-
* de alta solo con el celular (ya verificado por OTP). Idempotente: dos llamadas con el mismo
|
|
60
|
-
* número devuelven el mismo cliente. `created=true` solo cuando esta llamada lo dio de alta.
|
|
61
|
-
*
|
|
62
|
-
* @throws `422 CUSTOMER_INACTIVE` si el número es de un cliente dado de baja.
|
|
63
|
-
* @throws `400 VALIDATION_ERROR` si el celular no trae 10 dígitos o falta la tienda.
|
|
64
|
-
*/
|
|
65
|
-
ensureCustomerByPhone(payload: EnsureCustomerByPhoneRequest, tenantId: string): Promise<StandardResponse<EnsureCustomerByPhoneResponse>>;
|
|
66
57
|
/**
|
|
67
58
|
* PUT /private/customers/{customerId}/account-result?tenantId= — aterriza el resultado terminal de
|
|
68
59
|
* la apertura de cuenta async (D35). Solo acepta OPEN/FAILED (nunca el intermedio OPENING). OPEN
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.136.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",
|
|
@@ -3,8 +3,6 @@ import type { IHttpRequest } from "@fiado/http-client";
|
|
|
3
3
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
4
4
|
import {
|
|
5
5
|
UpsertCustomerFromKycRequest,
|
|
6
|
-
EnsureCustomerByPhoneRequest,
|
|
7
|
-
EnsureCustomerByPhoneResponse,
|
|
8
6
|
AccountResultRequest,
|
|
9
7
|
CustomerResponse,
|
|
10
8
|
PromotionBonusEntryResponse,
|
|
@@ -47,14 +45,6 @@ export default class RetailCustomerBusinessApi implements IRetailCustomerBusines
|
|
|
47
45
|
return await this.httpRequest.post(url, payload);
|
|
48
46
|
}
|
|
49
47
|
|
|
50
|
-
async ensureCustomerByPhone(
|
|
51
|
-
payload: EnsureCustomerByPhoneRequest,
|
|
52
|
-
tenantId: string,
|
|
53
|
-
): Promise<StandardResponse<EnsureCustomerByPhoneResponse>> {
|
|
54
|
-
const url = `${this.baseUrl}/private/customers/ensure-by-phone?tenantId=${encodeURIComponent(tenantId)}`;
|
|
55
|
-
return await this.httpRequest.post(url, payload);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
48
|
async setAccountResult(
|
|
59
49
|
customerId: string,
|
|
60
50
|
payload: AccountResultRequest,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import {
|
|
3
3
|
UpsertCustomerFromKycRequest,
|
|
4
|
-
EnsureCustomerByPhoneRequest,
|
|
5
|
-
EnsureCustomerByPhoneResponse,
|
|
6
4
|
AccountResultRequest,
|
|
7
5
|
CustomerResponse,
|
|
8
6
|
PromotionBonusEntryResponse,
|
|
@@ -71,19 +69,6 @@ export interface IRetailCustomerBusinessApi {
|
|
|
71
69
|
tenantId: string,
|
|
72
70
|
): Promise<StandardResponse<CustomerResponse>>;
|
|
73
71
|
|
|
74
|
-
/**
|
|
75
|
-
* POST /private/customers/ensure-by-phone?tenantId= — devuelve el cliente de ese celular o lo da
|
|
76
|
-
* de alta solo con el celular (ya verificado por OTP). Idempotente: dos llamadas con el mismo
|
|
77
|
-
* número devuelven el mismo cliente. `created=true` solo cuando esta llamada lo dio de alta.
|
|
78
|
-
*
|
|
79
|
-
* @throws `422 CUSTOMER_INACTIVE` si el número es de un cliente dado de baja.
|
|
80
|
-
* @throws `400 VALIDATION_ERROR` si el celular no trae 10 dígitos o falta la tienda.
|
|
81
|
-
*/
|
|
82
|
-
ensureCustomerByPhone(
|
|
83
|
-
payload: EnsureCustomerByPhoneRequest,
|
|
84
|
-
tenantId: string,
|
|
85
|
-
): Promise<StandardResponse<EnsureCustomerByPhoneResponse>>;
|
|
86
|
-
|
|
87
72
|
/**
|
|
88
73
|
* PUT /private/customers/{customerId}/account-result?tenantId= — aterriza el resultado terminal de
|
|
89
74
|
* la apertura de cuenta async (D35). Solo acepta OPEN/FAILED (nunca el intermedio OPENING). OPEN
|