@fiado/api-invoker 4.48.0 → 4.49.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 +4 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +1 -0
- package/bin/sns-ses-connector/api/SnsSesConnectorApi.d.ts +11 -0
- package/bin/sns-ses-connector/api/SnsSesConnectorApi.js +30 -0
- package/bin/sns-ses-connector/api/interfaces/ISnsSesConnectorApi.d.ts +6 -0
- package/bin/sns-ses-connector/api/interfaces/ISnsSesConnectorApi.js +1 -0
- package/bin/sns-ses-connector/index.d.ts +2 -0
- package/bin/sns-ses-connector/index.js +2 -0
- package/package.json +1 -1
- package/src/container.config.ts +5 -0
- package/src/index.ts +1 -0
- package/src/sns-ses-connector/api/SnsSesConnectorApi.ts +18 -0
- package/src/sns-ses-connector/api/interfaces/ISnsSesConnectorApi.ts +7 -0
- package/src/sns-ses-connector/index.ts +2 -0
package/bin/container.config.js
CHANGED
|
@@ -110,6 +110,8 @@ import { EqualityConnectorApi } from "./equality-connector/index.js";
|
|
|
110
110
|
import { ContactsBusinessApi } from "./contacts-business/index.js";
|
|
111
111
|
// Wallet funding settlement — TransactWriteItems atómico del money path cash-in (spec 15)
|
|
112
112
|
import { WalletFundingSettlementApi } from "./walletFundingSettlement/index.js";
|
|
113
|
+
// SNS/SES connector — envío SMS/MAIL síncrono (restaurado para RBAC — DEC-002 messages-business)
|
|
114
|
+
import { SnsSesConnectorApi } from "./sns-ses-connector/index.js";
|
|
113
115
|
export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
114
116
|
// UTILS bindings
|
|
115
117
|
bind("InvokerUtils").to(InvokerUtils);
|
|
@@ -232,4 +234,6 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
|
232
234
|
// Wallet funding settlement — TransactWriteItems atómico del money path cash-in
|
|
233
235
|
// (consumido por equality-connector post processor.walletFundingValidate). Ver spec 15.
|
|
234
236
|
bind("IWalletFundingSettlementApi").to(WalletFundingSettlementApi);
|
|
237
|
+
// SNS/SES connector — envío SMS/MAIL síncrono (restaurado para RBAC — DEC-002 messages-business)
|
|
238
|
+
bind("ISnsSesConnectorApi").to(SnsSesConnectorApi);
|
|
235
239
|
});
|
package/bin/index.d.ts
CHANGED
package/bin/index.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IHttpRequest } from '@fiado/http-client';
|
|
2
|
+
import { MessageDeliveryRequest, MessageDeliveryResponse } from '@fiado/type-kit/bin/messaging/index.js';
|
|
3
|
+
import { ISnsSesConnectorApi } from './interfaces/ISnsSesConnectorApi.js';
|
|
4
|
+
type FiadoApiResponse<T> = import('@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js').default<T>;
|
|
5
|
+
export declare class SnsSesConnectorApi implements ISnsSesConnectorApi {
|
|
6
|
+
private readonly httpRequest;
|
|
7
|
+
private readonly baseUrl;
|
|
8
|
+
constructor(httpRequest: IHttpRequest);
|
|
9
|
+
send(request: MessageDeliveryRequest): Promise<FiadoApiResponse<MessageDeliveryResponse>>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
let SnsSesConnectorApi = class SnsSesConnectorApi {
|
|
15
|
+
httpRequest;
|
|
16
|
+
baseUrl = process.env.SNS_SES_CONNECTOR_LAMBDA_URL || '';
|
|
17
|
+
constructor(httpRequest) {
|
|
18
|
+
this.httpRequest = httpRequest;
|
|
19
|
+
}
|
|
20
|
+
async send(request) {
|
|
21
|
+
const url = `${this.baseUrl}send`;
|
|
22
|
+
return await this.httpRequest.post(url, request, { 'operationName': 'privateSend' });
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
SnsSesConnectorApi = __decorate([
|
|
26
|
+
injectable(),
|
|
27
|
+
__param(0, inject('IHttpRequest')),
|
|
28
|
+
__metadata("design:paramtypes", [Object])
|
|
29
|
+
], SnsSesConnectorApi);
|
|
30
|
+
export { SnsSesConnectorApi };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MessageDeliveryRequest, MessageDeliveryResponse } from '@fiado/type-kit/bin/messaging/index.js';
|
|
2
|
+
type FiadoApiResponse<T> = import('@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js').default<T>;
|
|
3
|
+
export interface ISnsSesConnectorApi {
|
|
4
|
+
send(request: MessageDeliveryRequest): Promise<FiadoApiResponse<MessageDeliveryResponse>>;
|
|
5
|
+
}
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.49.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",
|
package/src/container.config.ts
CHANGED
|
@@ -169,6 +169,8 @@ import { IEqualityConnectorApi, EqualityConnectorApi } from "./equality-connecto
|
|
|
169
169
|
import { IContactsBusinessApi, ContactsBusinessApi } from "./contacts-business/index.js";
|
|
170
170
|
// Wallet funding settlement — TransactWriteItems atómico del money path cash-in (spec 15)
|
|
171
171
|
import { IWalletFundingSettlementApi, WalletFundingSettlementApi } from "./walletFundingSettlement/index.js";
|
|
172
|
+
// SNS/SES connector — envío SMS/MAIL síncrono (restaurado para RBAC — DEC-002 messages-business)
|
|
173
|
+
import { ISnsSesConnectorApi, SnsSesConnectorApi } from "./sns-ses-connector/index.js";
|
|
172
174
|
|
|
173
175
|
export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
174
176
|
// UTILS bindings
|
|
@@ -309,4 +311,7 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
|
309
311
|
// Wallet funding settlement — TransactWriteItems atómico del money path cash-in
|
|
310
312
|
// (consumido por equality-connector post processor.walletFundingValidate). Ver spec 15.
|
|
311
313
|
bind<IWalletFundingSettlementApi>("IWalletFundingSettlementApi").to(WalletFundingSettlementApi);
|
|
314
|
+
|
|
315
|
+
// SNS/SES connector — envío SMS/MAIL síncrono (restaurado para RBAC — DEC-002 messages-business)
|
|
316
|
+
bind<ISnsSesConnectorApi>("ISnsSesConnectorApi").to(SnsSesConnectorApi);
|
|
312
317
|
});
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { inject, injectable } from 'inversify';
|
|
2
|
+
import type { IHttpRequest } from '@fiado/http-client';
|
|
3
|
+
import { MessageDeliveryRequest, MessageDeliveryResponse } from '@fiado/type-kit/bin/messaging/index.js';
|
|
4
|
+
import { ISnsSesConnectorApi } from './interfaces/ISnsSesConnectorApi.js';
|
|
5
|
+
|
|
6
|
+
type FiadoApiResponse<T> = import('@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js').default<T>;
|
|
7
|
+
|
|
8
|
+
@injectable()
|
|
9
|
+
export class SnsSesConnectorApi implements ISnsSesConnectorApi {
|
|
10
|
+
private readonly baseUrl = process.env.SNS_SES_CONNECTOR_LAMBDA_URL || '';
|
|
11
|
+
|
|
12
|
+
constructor(@inject('IHttpRequest') private readonly httpRequest: IHttpRequest) {}
|
|
13
|
+
|
|
14
|
+
async send(request: MessageDeliveryRequest): Promise<FiadoApiResponse<MessageDeliveryResponse>> {
|
|
15
|
+
const url = `${this.baseUrl}send`;
|
|
16
|
+
return await this.httpRequest.post(url, request, { 'operationName': 'privateSend' });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MessageDeliveryRequest, MessageDeliveryResponse } from '@fiado/type-kit/bin/messaging/index.js';
|
|
2
|
+
|
|
3
|
+
type FiadoApiResponse<T> = import('@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js').default<T>;
|
|
4
|
+
|
|
5
|
+
export interface ISnsSesConnectorApi {
|
|
6
|
+
send(request: MessageDeliveryRequest): Promise<FiadoApiResponse<MessageDeliveryResponse>>;
|
|
7
|
+
}
|