@fiado/api-invoker 5.7.0 → 5.9.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/container.config.js +2 -0
- package/bin/estafeta/api/EstafetaApi.d.ts +7 -5
- package/bin/estafeta/api/EstafetaApi.js +4 -0
- package/bin/estafeta/api/interfaces/IEstafetaApi.d.ts +6 -0
- package/bin/identity/IdentityApi.d.ts +2 -1
- package/bin/identity/IdentityApi.js +7 -0
- package/bin/identity/interfaces/IIdentityApi.d.ts +3 -1
- package/bin/index.d.ts +1 -0
- package/bin/index.js +1 -0
- package/bin/membership/MembershipApi.d.ts +12 -0
- package/bin/membership/MembershipApi.js +32 -0
- package/bin/membership/index.d.ts +2 -0
- package/bin/membership/index.js +2 -0
- package/bin/membership/interfaces/IMembershipApi.d.ts +15 -0
- package/bin/membership/interfaces/IMembershipApi.js +1 -0
- package/bin/notificationWebsockets/NotificationWebsocketApi.d.ts +12 -0
- package/bin/notificationWebsockets/NotificationWebsocketApi.js +32 -0
- package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.d.ts +15 -0
- package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.js +1 -0
- package/bin/performance-profile/PerformanceProfileApi.d.ts +12 -0
- package/bin/performance-profile/PerformanceProfileApi.js +32 -0
- package/bin/performance-profile/index.d.ts +2 -0
- package/bin/performance-profile/index.js +2 -0
- package/bin/performance-profile/interfaces/IPerformanceProfileApi.d.ts +15 -0
- package/bin/performance-profile/interfaces/IPerformanceProfileApi.js +1 -0
- package/bin/presence-websocket/PresenceWebsocketApi.d.ts +12 -0
- package/bin/presence-websocket/PresenceWebsocketApi.js +32 -0
- package/bin/presence-websocket/index.d.ts +2 -0
- package/bin/presence-websocket/index.js +2 -0
- package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.d.ts +15 -0
- package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.js +1 -0
- package/bin/shipping/api/ShippingStatusApi.d.ts +10 -0
- package/bin/shipping/api/ShippingStatusApi.js +29 -0
- package/bin/shipping/api/interfaces/IShippingStatusApi.d.ts +11 -0
- package/bin/shipping/api/interfaces/IShippingStatusApi.js +1 -0
- package/bin/shipping/index.d.ts +2 -0
- package/bin/shipping/index.js +2 -0
- package/package.json +2 -2
- package/src/container.config.ts +3 -0
- package/src/estafeta/api/EstafetaApi.ts +11 -5
- package/src/estafeta/api/interfaces/IEstafetaApi.ts +7 -0
- package/src/identity/IdentityApi.ts +9 -0
- package/src/identity/interfaces/IIdentityApi.ts +3 -0
- package/src/index.ts +1 -0
- package/src/shipping/api/ShippingStatusApi.ts +19 -0
- package/src/shipping/api/interfaces/IShippingStatusApi.ts +12 -0
- package/src/shipping/index.ts +2 -0
package/bin/container.config.js
CHANGED
|
@@ -58,6 +58,7 @@ import { ServiceApi } from "./service-business/index.js";
|
|
|
58
58
|
import { DocumentImageProcessorApi } from "./document-image-processor/index.js";
|
|
59
59
|
import { OrderCollectorApi } from "./order-collector-business/index.js";
|
|
60
60
|
import EstafetaApi from "./estafeta/api/EstafetaApi.js";
|
|
61
|
+
import ShippingStatusApi from "./shipping/api/ShippingStatusApi.js";
|
|
61
62
|
import { AppSelectionDataApi } from "./appselectondata/index.js";
|
|
62
63
|
import { DirectorySettingApi } from "./directorySetting/index.js";
|
|
63
64
|
import { FirebaseConnectorApi } from "./firebase-connector/index.js";
|
|
@@ -189,6 +190,7 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
|
189
190
|
bind("IDocumentImageProcessorApi").to(DocumentImageProcessorApi);
|
|
190
191
|
bind("IOrderCollectorApi").to(OrderCollectorApi);
|
|
191
192
|
bind("IEstafetaApi").to(EstafetaApi);
|
|
193
|
+
bind("IShippingStatusApi").to(ShippingStatusApi);
|
|
192
194
|
bind("IAppSelectionDataApi").to(AppSelectionDataApi);
|
|
193
195
|
bind("IDirectorySettingApi").to(DirectorySettingApi);
|
|
194
196
|
bind("IFirebaseConnectorApi").to(FirebaseConnectorApi);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
1
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { IEstafetaApi } from "./interfaces/IEstafetaApi.js";
|
|
3
|
-
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardShippingRequest, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
4
|
-
import { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card/index.js";
|
|
3
|
+
import type { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardShippingRequest, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
4
|
+
import type { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card/index.js";
|
|
5
5
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
6
|
-
import { UpdateBankAccountUserRequest, CreateBankAccountUserRequest, CreateBankAccountRequest } from "@fiado/type-kit/bin/account/index.js";
|
|
7
|
-
import { OfficeDetails } from "@fiado/type-kit/bin/address/index.js";
|
|
6
|
+
import type { UpdateBankAccountUserRequest, CreateBankAccountUserRequest, CreateBankAccountRequest } from "@fiado/type-kit/bin/account/index.js";
|
|
7
|
+
import type { OfficeDetails } from "@fiado/type-kit/bin/address/index.js";
|
|
8
|
+
import type { CreateShippingRequest, CreateShippingResponse } from "@fiado/type-kit/bin/shipping/index.js";
|
|
8
9
|
export default class EstafetaApi implements IEstafetaApi {
|
|
9
10
|
private httpRequest;
|
|
10
11
|
private readonly baseUrl;
|
|
@@ -22,6 +23,7 @@ export default class EstafetaApi implements IEstafetaApi {
|
|
|
22
23
|
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
|
23
24
|
getShipment(object: GetBankAccountShippingRequest): Promise<any>;
|
|
24
25
|
createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>;
|
|
26
|
+
createShipping(object: CreateShippingRequest): Promise<FiadoApiResponse<CreateShippingResponse>>;
|
|
25
27
|
getLocations(params: any): Promise<FiadoApiResponse<OfficeDetails[]>>;
|
|
26
28
|
}
|
|
27
29
|
export {};
|
|
@@ -57,6 +57,10 @@ let EstafetaApi = class EstafetaApi {
|
|
|
57
57
|
const url = `${this.baseUrl}estafeta/shipping/card`;
|
|
58
58
|
return await this.httpRequest.post(url, object);
|
|
59
59
|
}
|
|
60
|
+
async createShipping(object) {
|
|
61
|
+
const url = `${this.baseUrl}estafeta/shipping`;
|
|
62
|
+
return await this.httpRequest.post(url, object);
|
|
63
|
+
}
|
|
60
64
|
async getLocations(params) {
|
|
61
65
|
const url = `${this.baseUrl}estafeta/locations?latitude=${params.latitude}&longitude=${params.longitude}`;
|
|
62
66
|
return await this.httpRequest.get(url);
|
|
@@ -2,8 +2,14 @@ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCar
|
|
|
2
2
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
3
3
|
import { CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account/index.js";
|
|
4
4
|
import { OfficeDetails } from "@fiado/type-kit/bin/address/index.js";
|
|
5
|
+
import { CreateShippingRequest, CreateShippingResponse } from "@fiado/type-kit/bin/shipping/index.js";
|
|
5
6
|
export interface IEstafetaApi {
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated El conector retiro el path `estafeta/shipping/card`. Usar `createShipping`.
|
|
9
|
+
* No se borra porque la consumen varias lambdas y borrar un metodo es un major.
|
|
10
|
+
*/
|
|
6
11
|
createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>;
|
|
12
|
+
createShipping(object: CreateShippingRequest): Promise<FiadoApiResponse<CreateShippingResponse>>;
|
|
7
13
|
updateUser(object: UpdateBankAccountUserRequest): Promise<any>;
|
|
8
14
|
getUserById(externalUserId: string): Promise<any>;
|
|
9
15
|
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IIdentityApi } from "./interfaces/IIdentityApi.js";
|
|
2
2
|
import { LegacyApiResponse } from "./interfaces/LegacyApiResponse.js";
|
|
3
3
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
4
|
-
import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse } from "@fiado/type-kit/bin/identity/index.js";
|
|
4
|
+
import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse, PeopleSelfieResponse } from "@fiado/type-kit/bin/identity/index.js";
|
|
5
5
|
export declare class IdentityApi implements IIdentityApi {
|
|
6
6
|
private httpRequest;
|
|
7
7
|
private readonly baseUrl;
|
|
@@ -20,4 +20,5 @@ export declare class IdentityApi implements IIdentityApi {
|
|
|
20
20
|
privateUpdatePeopleSelfVerified(directoryId: string, data: PeopleSelfVerifiedRequest): Promise<LegacyApiResponse<unknown>>;
|
|
21
21
|
privateSearchPeople(fullName: string): Promise<LegacyApiResponse<PeopleResponse[]>>;
|
|
22
22
|
privateUpdatePeople(directoryId: string, data: PeopleUpdateRequest): Promise<LegacyApiResponse<unknown>>;
|
|
23
|
+
privateGetPeopleSelfie(directoryId: string): Promise<LegacyApiResponse<PeopleSelfieResponse>>;
|
|
23
24
|
}
|
|
@@ -123,6 +123,13 @@ let IdentityApi = class IdentityApi {
|
|
|
123
123
|
const url = `${this.baseUrl}identities/private/agents/people/${directoryId}`;
|
|
124
124
|
return await this.httpRequest.put(url, data);
|
|
125
125
|
}
|
|
126
|
+
async privateGetPeopleSelfie(directoryId) {
|
|
127
|
+
if (!directoryId) {
|
|
128
|
+
throw new Error('Directory ID is required.');
|
|
129
|
+
}
|
|
130
|
+
const url = `${this.baseUrl}identities/private/people/${encodeURIComponent(directoryId)}/selfie`;
|
|
131
|
+
return await this.httpRequest.get(url);
|
|
132
|
+
}
|
|
126
133
|
};
|
|
127
134
|
IdentityApi = __decorate([
|
|
128
135
|
injectable(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse } from "@fiado/type-kit/bin/identity/index.js";
|
|
1
|
+
import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse, PeopleSelfieResponse } from "@fiado/type-kit/bin/identity/index.js";
|
|
2
2
|
import { LegacyApiResponse } from "./LegacyApiResponse.js";
|
|
3
3
|
/**
|
|
4
4
|
* Interfaz para el servicio Directory que permite operaciones sobre directorios.
|
|
@@ -48,4 +48,6 @@ export interface IIdentityApi {
|
|
|
48
48
|
privateSearchPeople(fullName: string): Promise<LegacyApiResponse<PeopleResponse[]>>;
|
|
49
49
|
/** Gemelo private de editar persona (PUT sin /selfverified). */
|
|
50
50
|
privateUpdatePeople(directoryId: string, data: PeopleUpdateRequest): Promise<LegacyApiResponse<unknown>>;
|
|
51
|
+
/** Selfie del KYC del usuario: URL presignado de S3 (el userPhotoLink del facematch) + vigencia. */
|
|
52
|
+
privateGetPeopleSelfie(directoryId: string): Promise<LegacyApiResponse<PeopleSelfieResponse>>;
|
|
51
53
|
}
|
package/bin/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export * from "./card/index.js";
|
|
|
51
51
|
export * from "./document-image-processor/index.js";
|
|
52
52
|
export * from "./order-collector-business/index.js";
|
|
53
53
|
export * from "./estafeta/index.js";
|
|
54
|
+
export * from "./shipping/index.js";
|
|
54
55
|
export * from "./appselectondata/index.js";
|
|
55
56
|
export * from "./directorySetting/index.js";
|
|
56
57
|
export * from "./firebase-connector/index.js";
|
package/bin/index.js
CHANGED
|
@@ -51,6 +51,7 @@ export * from "./card/index.js";
|
|
|
51
51
|
export * from "./document-image-processor/index.js";
|
|
52
52
|
export * from "./order-collector-business/index.js";
|
|
53
53
|
export * from "./estafeta/index.js";
|
|
54
|
+
export * from "./shipping/index.js";
|
|
54
55
|
export * from "./appselectondata/index.js";
|
|
55
56
|
export * from "./directorySetting/index.js";
|
|
56
57
|
export * from "./firebase-connector/index.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { IMembershipApi } from "./interfaces/IMembershipApi.js";
|
|
3
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
4
|
+
export declare class MembershipApi implements IMembershipApi {
|
|
5
|
+
private httpRequest;
|
|
6
|
+
private readonly baseUrl;
|
|
7
|
+
constructor(httpRequest: IHttpRequest);
|
|
8
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
9
|
+
deletedCount: number;
|
|
10
|
+
}>>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from "inversify";
|
|
14
|
+
import dotenv from 'dotenv';
|
|
15
|
+
dotenv.config();
|
|
16
|
+
let MembershipApi = class MembershipApi {
|
|
17
|
+
httpRequest;
|
|
18
|
+
baseUrl = process.env.MEMBERSHIP_BUSINESS_LAMBDA_URL || "";
|
|
19
|
+
constructor(httpRequest) {
|
|
20
|
+
this.httpRequest = httpRequest;
|
|
21
|
+
}
|
|
22
|
+
async deleteByDirectoryId(directoryId) {
|
|
23
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
24
|
+
return await this.httpRequest.delete(url);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
MembershipApi = __decorate([
|
|
28
|
+
injectable(),
|
|
29
|
+
__param(0, inject("IHttpRequest")),
|
|
30
|
+
__metadata("design:paramtypes", [Object])
|
|
31
|
+
], MembershipApi);
|
|
32
|
+
export { MembershipApi };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
|
+
/**
|
|
3
|
+
* Interfaz para el servicio Membership (membership-business).
|
|
4
|
+
*/
|
|
5
|
+
export interface IMembershipApi {
|
|
6
|
+
/**
|
|
7
|
+
* Borra en cascada las membresías asociadas a un directoryId.
|
|
8
|
+
* @param directoryId ID del directorio.
|
|
9
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
10
|
+
*/
|
|
11
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
12
|
+
deletedCount: number;
|
|
13
|
+
}>>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { INotificationWebsocketApi } from "./interfaces/INotificationWebsocketApi.js";
|
|
3
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
4
|
+
export declare class NotificationWebsocketApi implements INotificationWebsocketApi {
|
|
5
|
+
private httpRequest;
|
|
6
|
+
private readonly baseUrl;
|
|
7
|
+
constructor(httpRequest: IHttpRequest);
|
|
8
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
9
|
+
deletedCount: number;
|
|
10
|
+
}>>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from "inversify";
|
|
14
|
+
import dotenv from 'dotenv';
|
|
15
|
+
dotenv.config();
|
|
16
|
+
let NotificationWebsocketApi = class NotificationWebsocketApi {
|
|
17
|
+
httpRequest;
|
|
18
|
+
baseUrl = process.env.NOTIFICATIONS_WEBSOCKET_LAMBDA_URL || "";
|
|
19
|
+
constructor(httpRequest) {
|
|
20
|
+
this.httpRequest = httpRequest;
|
|
21
|
+
}
|
|
22
|
+
async deleteByDirectoryId(directoryId) {
|
|
23
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
24
|
+
return await this.httpRequest.delete(url);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
NotificationWebsocketApi = __decorate([
|
|
28
|
+
injectable(),
|
|
29
|
+
__param(0, inject("IHttpRequest")),
|
|
30
|
+
__metadata("design:paramtypes", [Object])
|
|
31
|
+
], NotificationWebsocketApi);
|
|
32
|
+
export { NotificationWebsocketApi };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
|
+
/**
|
|
3
|
+
* Interfaz para el servicio Notifications Websocket (notifications-websocket).
|
|
4
|
+
*/
|
|
5
|
+
export interface INotificationWebsocketApi {
|
|
6
|
+
/**
|
|
7
|
+
* Borra en cascada las conexiones/notificaciones WS asociadas a un directoryId.
|
|
8
|
+
* @param directoryId ID del directorio.
|
|
9
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
10
|
+
*/
|
|
11
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
12
|
+
deletedCount: number;
|
|
13
|
+
}>>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { IPerformanceProfileApi } from "./interfaces/IPerformanceProfileApi.js";
|
|
3
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
4
|
+
export declare class PerformanceProfileApi implements IPerformanceProfileApi {
|
|
5
|
+
private httpRequest;
|
|
6
|
+
private readonly baseUrl;
|
|
7
|
+
constructor(httpRequest: IHttpRequest);
|
|
8
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
9
|
+
deletedCount: number;
|
|
10
|
+
}>>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from "inversify";
|
|
14
|
+
import dotenv from 'dotenv';
|
|
15
|
+
dotenv.config();
|
|
16
|
+
let PerformanceProfileApi = class PerformanceProfileApi {
|
|
17
|
+
httpRequest;
|
|
18
|
+
baseUrl = process.env.PERFORMANCE_PROFILE_BUSINESS_LAMBDA_URL || "";
|
|
19
|
+
constructor(httpRequest) {
|
|
20
|
+
this.httpRequest = httpRequest;
|
|
21
|
+
}
|
|
22
|
+
async deleteByDirectoryId(directoryId) {
|
|
23
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
24
|
+
return await this.httpRequest.delete(url);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
PerformanceProfileApi = __decorate([
|
|
28
|
+
injectable(),
|
|
29
|
+
__param(0, inject("IHttpRequest")),
|
|
30
|
+
__metadata("design:paramtypes", [Object])
|
|
31
|
+
], PerformanceProfileApi);
|
|
32
|
+
export { PerformanceProfileApi };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
|
+
/**
|
|
3
|
+
* Interfaz para el servicio Performance Profile (performance-profile-business).
|
|
4
|
+
*/
|
|
5
|
+
export interface IPerformanceProfileApi {
|
|
6
|
+
/**
|
|
7
|
+
* Borra en cascada los perfiles de desempeño asociados a un directoryId.
|
|
8
|
+
* @param directoryId ID del directorio.
|
|
9
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
10
|
+
*/
|
|
11
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
12
|
+
deletedCount: number;
|
|
13
|
+
}>>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { IPresenceWebsocketApi } from "./interfaces/IPresenceWebsocketApi.js";
|
|
3
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
4
|
+
export declare class PresenceWebsocketApi implements IPresenceWebsocketApi {
|
|
5
|
+
private httpRequest;
|
|
6
|
+
private readonly baseUrl;
|
|
7
|
+
constructor(httpRequest: IHttpRequest);
|
|
8
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
9
|
+
deletedCount: number;
|
|
10
|
+
}>>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from "inversify";
|
|
14
|
+
import dotenv from 'dotenv';
|
|
15
|
+
dotenv.config();
|
|
16
|
+
let PresenceWebsocketApi = class PresenceWebsocketApi {
|
|
17
|
+
httpRequest;
|
|
18
|
+
baseUrl = process.env.PRESENCE_WEBSOCKET_LAMBDA_URL || "";
|
|
19
|
+
constructor(httpRequest) {
|
|
20
|
+
this.httpRequest = httpRequest;
|
|
21
|
+
}
|
|
22
|
+
async deleteByDirectoryId(directoryId) {
|
|
23
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
24
|
+
return await this.httpRequest.delete(url);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
PresenceWebsocketApi = __decorate([
|
|
28
|
+
injectable(),
|
|
29
|
+
__param(0, inject("IHttpRequest")),
|
|
30
|
+
__metadata("design:paramtypes", [Object])
|
|
31
|
+
], PresenceWebsocketApi);
|
|
32
|
+
export { PresenceWebsocketApi };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
|
+
/**
|
|
3
|
+
* Interfaz para el servicio Presence Websocket (presence-websocket).
|
|
4
|
+
*/
|
|
5
|
+
export interface IPresenceWebsocketApi {
|
|
6
|
+
/**
|
|
7
|
+
* Borra en cascada los registros de presencia asociados a un directoryId.
|
|
8
|
+
* @param directoryId ID del directorio.
|
|
9
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
10
|
+
*/
|
|
11
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
12
|
+
deletedCount: number;
|
|
13
|
+
}>>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { IShippingStatusApi } from "./interfaces/IShippingStatusApi.js";
|
|
3
|
+
import type { UpdateShippingStatusRequest } from "@fiado/type-kit/bin/shipping/index.js";
|
|
4
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
5
|
+
export default class ShippingStatusApi implements IShippingStatusApi {
|
|
6
|
+
private httpRequest;
|
|
7
|
+
constructor(httpRequest: IHttpRequest);
|
|
8
|
+
updateShippingStatus(baseUrl: string, path: string, request: UpdateShippingStatusRequest): Promise<FiadoApiResponse<void>>;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { injectable, inject } from "inversify";
|
|
14
|
+
let ShippingStatusApi = class ShippingStatusApi {
|
|
15
|
+
httpRequest;
|
|
16
|
+
constructor(httpRequest) {
|
|
17
|
+
this.httpRequest = httpRequest;
|
|
18
|
+
}
|
|
19
|
+
async updateShippingStatus(baseUrl, path, request) {
|
|
20
|
+
const url = `${baseUrl.replace(/\/+$/, "")}/${path.replace(/^\/+/, "")}`;
|
|
21
|
+
return await this.httpRequest.post(url, request);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
ShippingStatusApi = __decorate([
|
|
25
|
+
injectable(),
|
|
26
|
+
__param(0, inject("IHttpRequest")),
|
|
27
|
+
__metadata("design:paramtypes", [Object])
|
|
28
|
+
], ShippingStatusApi);
|
|
29
|
+
export default ShippingStatusApi;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UpdateShippingStatusRequest } from "@fiado/type-kit/bin/shipping/index.js";
|
|
2
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
3
|
+
/**
|
|
4
|
+
* Publisher generico de notificacion de status de envio. A diferencia del resto de los Api de la
|
|
5
|
+
* lib, la baseUrl NO sale de una env del constructor: el conector la resuelve por consumidor desde
|
|
6
|
+
* su tabla de configuracion, asi que baseUrl y path viajan por llamada.
|
|
7
|
+
*/
|
|
8
|
+
export interface IShippingStatusApi {
|
|
9
|
+
updateShippingStatus(baseUrl: string, path: string, request: UpdateShippingStatusRequest): Promise<FiadoApiResponse<void>>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@fiado/gateway-adapter": "^3.9.0",
|
|
35
35
|
"@fiado/http-client": "^2.0.1",
|
|
36
36
|
"@fiado/logger": "^1.1.3",
|
|
37
|
-
"@fiado/type-kit": "^3.
|
|
37
|
+
"@fiado/type-kit": "^3.235.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
package/src/container.config.ts
CHANGED
|
@@ -85,6 +85,8 @@ import { IDocumentImageProcessorApi, DocumentImageProcessorApi } from "./documen
|
|
|
85
85
|
import { IOrderCollectorApi, OrderCollectorApi } from "./order-collector-business/index.js";
|
|
86
86
|
import { IEstafetaApi } from "./estafeta/index.js";
|
|
87
87
|
import EstafetaApi from "./estafeta/api/EstafetaApi.js";
|
|
88
|
+
import { IShippingStatusApi } from "./shipping/index.js";
|
|
89
|
+
import ShippingStatusApi from "./shipping/api/ShippingStatusApi.js";
|
|
88
90
|
import { AppSelectionDataApi, IAppSelectionDataApi } from "./appselectondata/index.js";
|
|
89
91
|
import { DirectorySettingApi, IDirectorySettingApi } from "./directorySetting/index.js";
|
|
90
92
|
import { FirebaseConnectorApi, IFirebaseConnectorApi } from "./firebase-connector/index.js";
|
|
@@ -252,6 +254,7 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
|
252
254
|
bind<IDocumentImageProcessorApi>("IDocumentImageProcessorApi").to(DocumentImageProcessorApi);
|
|
253
255
|
bind<IOrderCollectorApi>("IOrderCollectorApi").to(OrderCollectorApi);
|
|
254
256
|
bind<IEstafetaApi>("IEstafetaApi").to(EstafetaApi);
|
|
257
|
+
bind<IShippingStatusApi>("IShippingStatusApi").to(ShippingStatusApi);
|
|
255
258
|
bind<IAppSelectionDataApi>("IAppSelectionDataApi").to(AppSelectionDataApi);
|
|
256
259
|
bind<IDirectorySettingApi>("IDirectorySettingApi").to(DirectorySettingApi);
|
|
257
260
|
bind<IFirebaseConnectorApi>("IFirebaseConnectorApi").to(FirebaseConnectorApi);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { injectable, inject } from "inversify";
|
|
2
2
|
|
|
3
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
4
4
|
|
|
5
5
|
import { IEstafetaApi } from "./interfaces/IEstafetaApi.js";
|
|
6
|
-
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardShippingRequest, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
7
|
-
import { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card/index.js";
|
|
6
|
+
import type { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardShippingRequest, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
7
|
+
import type { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card/index.js";
|
|
8
8
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
9
|
-
import { UpdateBankAccountUserRequest, CreateBankAccountUserRequest, CreateBankAccountRequest } from "@fiado/type-kit/bin/account/index.js";
|
|
10
|
-
import { OfficeDetails } from "@fiado/type-kit/bin/address/index.js";
|
|
9
|
+
import type { UpdateBankAccountUserRequest, CreateBankAccountUserRequest, CreateBankAccountRequest } from "@fiado/type-kit/bin/account/index.js";
|
|
10
|
+
import type { OfficeDetails } from "@fiado/type-kit/bin/address/index.js";
|
|
11
|
+
import type { CreateShippingRequest, CreateShippingResponse } from "@fiado/type-kit/bin/shipping/index.js";
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
@injectable()
|
|
@@ -60,6 +61,11 @@ export default class EstafetaApi implements IEstafetaApi {
|
|
|
60
61
|
return await this.httpRequest.post(url, object);
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
public async createShipping(object: CreateShippingRequest): Promise<FiadoApiResponse<CreateShippingResponse>> {
|
|
65
|
+
const url: string = `${this.baseUrl}estafeta/shipping`;
|
|
66
|
+
return await this.httpRequest.post(url, object);
|
|
67
|
+
}
|
|
68
|
+
|
|
63
69
|
public async getLocations(params: any): Promise<FiadoApiResponse<OfficeDetails[]>> {
|
|
64
70
|
|
|
65
71
|
const url = `${this.baseUrl}estafeta/locations?latitude=${params.latitude}&longitude=${params.longitude}`;
|
|
@@ -2,12 +2,19 @@ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCar
|
|
|
2
2
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
3
3
|
import { CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account/index.js";
|
|
4
4
|
import { OfficeDetails } from "@fiado/type-kit/bin/address/index.js";
|
|
5
|
+
import { CreateShippingRequest, CreateShippingResponse } from "@fiado/type-kit/bin/shipping/index.js";
|
|
5
6
|
|
|
6
7
|
export interface IEstafetaApi {
|
|
7
8
|
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated El conector retiro el path `estafeta/shipping/card`. Usar `createShipping`.
|
|
12
|
+
* No se borra porque la consumen varias lambdas y borrar un metodo es un major.
|
|
13
|
+
*/
|
|
9
14
|
createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>
|
|
10
15
|
|
|
16
|
+
createShipping(object: CreateShippingRequest): Promise<FiadoApiResponse<CreateShippingResponse>>
|
|
17
|
+
|
|
11
18
|
updateUser(object: UpdateBankAccountUserRequest): Promise<any>
|
|
12
19
|
getUserById(externalUserId: string): Promise<any>
|
|
13
20
|
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
@@ -6,6 +6,7 @@ import dotenv from 'dotenv';
|
|
|
6
6
|
import {
|
|
7
7
|
PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse,
|
|
8
8
|
PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse,
|
|
9
|
+
PeopleSelfieResponse,
|
|
9
10
|
} from "@fiado/type-kit/bin/identity/index.js";
|
|
10
11
|
|
|
11
12
|
dotenv.config();
|
|
@@ -151,4 +152,12 @@ export class IdentityApi implements IIdentityApi {
|
|
|
151
152
|
const url = `${this.baseUrl}identities/private/agents/people/${directoryId}`;
|
|
152
153
|
return await this.httpRequest.put<LegacyApiResponse<unknown>>(url, data);
|
|
153
154
|
}
|
|
155
|
+
|
|
156
|
+
async privateGetPeopleSelfie(directoryId: string): Promise<LegacyApiResponse<PeopleSelfieResponse>> {
|
|
157
|
+
if (!directoryId) {
|
|
158
|
+
throw new Error('Directory ID is required.');
|
|
159
|
+
}
|
|
160
|
+
const url = `${this.baseUrl}identities/private/people/${encodeURIComponent(directoryId)}/selfie`;
|
|
161
|
+
return await this.httpRequest.get<LegacyApiResponse<PeopleSelfieResponse>>(url);
|
|
162
|
+
}
|
|
154
163
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse,
|
|
3
3
|
PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse,
|
|
4
|
+
PeopleSelfieResponse,
|
|
4
5
|
} from "@fiado/type-kit/bin/identity/index.js";
|
|
5
6
|
import { LegacyApiResponse } from "./LegacyApiResponse.js";
|
|
6
7
|
|
|
@@ -63,4 +64,6 @@ export interface IIdentityApi {
|
|
|
63
64
|
privateSearchPeople(fullName: string): Promise<LegacyApiResponse<PeopleResponse[]>>;
|
|
64
65
|
/** Gemelo private de editar persona (PUT sin /selfverified). */
|
|
65
66
|
privateUpdatePeople(directoryId: string, data: PeopleUpdateRequest): Promise<LegacyApiResponse<unknown>>;
|
|
67
|
+
/** Selfie del KYC del usuario: URL presignado de S3 (el userPhotoLink del facematch) + vigencia. */
|
|
68
|
+
privateGetPeopleSelfie(directoryId: string): Promise<LegacyApiResponse<PeopleSelfieResponse>>;
|
|
66
69
|
}
|
package/src/index.ts
CHANGED
|
@@ -51,6 +51,7 @@ export * from "./card/index.js";
|
|
|
51
51
|
export * from "./document-image-processor/index.js";
|
|
52
52
|
export * from "./order-collector-business/index.js";
|
|
53
53
|
export * from "./estafeta/index.js";
|
|
54
|
+
export * from "./shipping/index.js";
|
|
54
55
|
export * from "./appselectondata/index.js";
|
|
55
56
|
export * from "./directorySetting/index.js";
|
|
56
57
|
export * from "./firebase-connector/index.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { injectable, inject } from "inversify";
|
|
2
|
+
|
|
3
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
4
|
+
|
|
5
|
+
import { IShippingStatusApi } from "./interfaces/IShippingStatusApi.js";
|
|
6
|
+
import type { UpdateShippingStatusRequest } from "@fiado/type-kit/bin/shipping/index.js";
|
|
7
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
8
|
+
|
|
9
|
+
@injectable()
|
|
10
|
+
export default class ShippingStatusApi implements IShippingStatusApi {
|
|
11
|
+
|
|
12
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public async updateShippingStatus(baseUrl: string, path: string, request: UpdateShippingStatusRequest): Promise<FiadoApiResponse<void>> {
|
|
16
|
+
const url: string = `${baseUrl.replace(/\/+$/, "")}/${path.replace(/^\/+/, "")}`;
|
|
17
|
+
return await this.httpRequest.post(url, request);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UpdateShippingStatusRequest } from "@fiado/type-kit/bin/shipping/index.js";
|
|
2
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Publisher generico de notificacion de status de envio. A diferencia del resto de los Api de la
|
|
6
|
+
* lib, la baseUrl NO sale de una env del constructor: el conector la resuelve por consumidor desde
|
|
7
|
+
* su tabla de configuracion, asi que baseUrl y path viajan por llamada.
|
|
8
|
+
*/
|
|
9
|
+
export interface IShippingStatusApi {
|
|
10
|
+
|
|
11
|
+
updateShippingStatus(baseUrl: string, path: string, request: UpdateShippingStatusRequest): Promise<FiadoApiResponse<void>>
|
|
12
|
+
}
|