@fiado/api-invoker 3.3.6 → 3.4.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/circuloCredito/api/CirculoCreditoApi.d.ts +9 -0
- package/bin/circuloCredito/api/CirculoCreditoApi.js +32 -0
- package/bin/circuloCredito/api/interfaces/ICirculoCreditoApi.d.ts +4 -0
- package/bin/circuloCredito/index.d.ts +2 -0
- package/bin/{card-business → circuloCredito}/index.js +2 -2
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +46 -0
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +2 -0
- package/bin/container.config.js +2 -2
- package/bin/estafeta/EstafetaApi.d.ts +0 -0
- package/bin/estafeta/EstafetaApi.js +0 -0
- package/bin/index.d.ts +1 -1
- package/bin/index.js +1 -1
- package/bin/report-processor-business/api/IReportProcessorBusiness.d.ts +3 -0
- package/bin/report-processor-business/api/IReportProcessorBusiness.js +2 -0
- package/package.json +2 -2
- package/src/circuloCredito/api/CirculoCreditoApi.ts +18 -0
- package/src/circuloCredito/api/interfaces/ICirculoCreditoApi.ts +7 -0
- package/src/circuloCredito/index.ts +2 -0
- package/src/container.config.ts +2 -3
- package/src/index.ts +1 -1
- package/bin/card-business/index.d.ts +0 -2
- package/bin/card-business/queue/CardBusinessPublisher.d.ts +0 -5
- package/bin/card-business/queue/CardBusinessPublisher.js +0 -33
- package/bin/card-business/queue/ICardBusinessPublisher.d.ts +0 -7
- package/src/card-business/index.ts +0 -2
- package/src/card-business/queue/CardBusinessPublisher.ts +0 -22
- package/src/card-business/queue/ICardBusinessPublisher.ts +0 -8
- /package/bin/{card-business/queue/ICardBusinessPublisher.js → circuloCredito/api/interfaces/ICirculoCreditoApi.js} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { ReportarCuentaRequest, ReportarCuentaResponse } from "@fiado/type-kit/bin/circuloCredito";
|
|
3
|
+
import { ICirculoCreditoApi } from "./interfaces/ICirculoCreditoApi";
|
|
4
|
+
export declare class CirculoCreditoApi implements ICirculoCreditoApi {
|
|
5
|
+
private httpRequest;
|
|
6
|
+
private readonly baseUrl;
|
|
7
|
+
constructor(httpRequest: IHttpRequest);
|
|
8
|
+
reportarCuenta(request: ReportarCuentaRequest): Promise<ReportarCuentaResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CirculoCreditoApi = void 0;
|
|
16
|
+
const inversify_1 = require("inversify");
|
|
17
|
+
let CirculoCreditoApi = class CirculoCreditoApi {
|
|
18
|
+
constructor(httpRequest) {
|
|
19
|
+
this.httpRequest = httpRequest;
|
|
20
|
+
this.baseUrl = process.env.CIRCULO_CREDITO_CONNECTOR_URL || "";
|
|
21
|
+
}
|
|
22
|
+
async reportarCuenta(request) {
|
|
23
|
+
const url = `${this.baseUrl}/private/reportar/cuenta`;
|
|
24
|
+
return await this.httpRequest.post(url, request);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.CirculoCreditoApi = CirculoCreditoApi;
|
|
28
|
+
exports.CirculoCreditoApi = CirculoCreditoApi = __decorate([
|
|
29
|
+
(0, inversify_1.injectable)(),
|
|
30
|
+
__param(0, (0, inversify_1.inject)("IHttpRequest")),
|
|
31
|
+
__metadata("design:paramtypes", [Object])
|
|
32
|
+
], CirculoCreditoApi);
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./api/CirculoCreditoApi"), exports);
|
|
18
|
+
__exportStar(require("./api/interfaces/ICirculoCreditoApi"), exports);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ChangePasswordRequest, GetUserRequest, GetUserResponse, RefreshTokenRequest, RefreshTokenResponse, RespondToAuthChallengeRequest, SetPasswordRequest, SignInRequest, SignInResponse, SignUpConfirmRequest, SignUpRequest, SignUpResponse } from "@fiado/type-kit/bin/cognitoConnector";
|
|
2
|
+
export interface ICognitoApi {
|
|
3
|
+
/**
|
|
4
|
+
* Healthcheck for the cognito-connector
|
|
5
|
+
*/
|
|
6
|
+
healthcheck(): Promise<HealthcheckResponse>;
|
|
7
|
+
/**
|
|
8
|
+
* Create a new user in Cognito
|
|
9
|
+
*/
|
|
10
|
+
signUp(request: SignUpRequest): Promise<SignUpResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Confirm sign-up for a user in Cognito
|
|
13
|
+
*/
|
|
14
|
+
signUpConfirm(request: SignUpConfirmRequest): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Sign in a user
|
|
17
|
+
*/
|
|
18
|
+
signIn(request: SignInRequest): Promise<SignInResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Sign out a user
|
|
21
|
+
*/
|
|
22
|
+
signOut(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Change a user's password
|
|
25
|
+
*/
|
|
26
|
+
changePassword(request: ChangePasswordRequest): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve user details
|
|
29
|
+
*/
|
|
30
|
+
getUser(request: GetUserRequest): Promise<GetUserResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Refresh a user's tokens
|
|
33
|
+
*/
|
|
34
|
+
refreshToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Respond to an auth challenge
|
|
37
|
+
*/
|
|
38
|
+
respondToAuthChallenge(request: RespondToAuthChallengeRequest): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* Reset a user's password
|
|
41
|
+
*/
|
|
42
|
+
resetPassword(request: SetPasswordRequest): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export interface HealthcheckResponse {
|
|
45
|
+
status: string;
|
|
46
|
+
}
|
package/bin/container.config.js
CHANGED
|
@@ -37,7 +37,6 @@ const group_1 = require("./group");
|
|
|
37
37
|
const ActivityApi_1 = __importDefault(require("./activity-business/ActivityApi"));
|
|
38
38
|
const TransactionProcessorApi_1 = __importDefault(require("./transactionProcessor/api/TransactionProcessorApi"));
|
|
39
39
|
const ActivityPublisher_1 = __importDefault(require("./activity-business/queue/ActivityPublisher"));
|
|
40
|
-
const CardBusinessPublisher_1 = __importDefault(require("./card-business/queue/CardBusinessPublisher"));
|
|
41
40
|
const RiskProfileApi_1 = __importDefault(require("./riskProfile/api/RiskProfileApi"));
|
|
42
41
|
const riskProfile_1 = require("./riskProfile");
|
|
43
42
|
const contactInformation_1 = require("./contactInformation");
|
|
@@ -76,6 +75,7 @@ const STPBusinessApi_1 = __importDefault(require("./stp-business/api/STPBusiness
|
|
|
76
75
|
const MulticommServicePaymentApi_1 = __importDefault(require("./multicommServicePayment/api/MulticommServicePaymentApi"));
|
|
77
76
|
const ProductPaymentApi_1 = __importDefault(require("./product-payment/api/ProductPaymentApi"));
|
|
78
77
|
const commission_business_1 = require("./commission-business");
|
|
78
|
+
const circuloCredito_1 = require("./circuloCredito");
|
|
79
79
|
// Credit module - API clients
|
|
80
80
|
const credit_engine_1 = require("./credit-engine");
|
|
81
81
|
const credit_payment_1 = require("./credit-payment");
|
|
@@ -135,7 +135,6 @@ exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
|
|
|
135
135
|
bind("IActivityApi").to(ActivityApi_1.default);
|
|
136
136
|
bind("ITransactionProcessorApi").to(TransactionProcessorApi_1.default);
|
|
137
137
|
bind("IActivityPublisher").to(ActivityPublisher_1.default);
|
|
138
|
-
bind("ICardBusinessPublisher").to(CardBusinessPublisher_1.default);
|
|
139
138
|
bind("IRiskProfileApi").to(RiskProfileApi_1.default);
|
|
140
139
|
bind("ITransactionAlarmPublisher").to(riskProfile_1.TransactionAlarmPublisher);
|
|
141
140
|
bind("IContactInformationApi").to(contactInformation_1.ContactInformationApi);
|
|
@@ -171,6 +170,7 @@ exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
|
|
|
171
170
|
bind("ISTPBusinessApi").to(STPBusinessApi_1.default);
|
|
172
171
|
bind("IProductPaymentApi").to(ProductPaymentApi_1.default);
|
|
173
172
|
bind("ICommissionBusinessApi").to(commission_business_1.CommissionBusinessApi);
|
|
173
|
+
bind("ICirculoCreditoApi").to(circuloCredito_1.CirculoCreditoApi);
|
|
174
174
|
// Credit module - API clients
|
|
175
175
|
bind("ICreditEngineApi").to(credit_engine_1.CreditEngineApi);
|
|
176
176
|
bind("ICreditPaymentApi").to(credit_payment_1.CreditPaymentApi);
|
|
File without changes
|
|
File without changes
|
package/bin/index.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ export * from "./bbvaRst";
|
|
|
27
27
|
export * from "./fraudPreventionEngine";
|
|
28
28
|
export * from "./group";
|
|
29
29
|
export * from "./activity-business";
|
|
30
|
-
export * from "./card-business";
|
|
31
30
|
export * from "./transactionProcessor";
|
|
32
31
|
export * from "./riskProfile";
|
|
33
32
|
export * from "./fiadoMessages";
|
|
@@ -37,6 +36,7 @@ export * from "./disputes";
|
|
|
37
36
|
export * from "./directories";
|
|
38
37
|
export * from "./cognitoConnector";
|
|
39
38
|
export * from "./centralPayments";
|
|
39
|
+
export * from "./circuloCredito";
|
|
40
40
|
export * from "./zendesk";
|
|
41
41
|
export * from "./blacklist";
|
|
42
42
|
export * from "./legalDocument";
|
package/bin/index.js
CHANGED
|
@@ -43,7 +43,6 @@ __exportStar(require("./bbvaRst"), exports);
|
|
|
43
43
|
__exportStar(require("./fraudPreventionEngine"), exports);
|
|
44
44
|
__exportStar(require("./group"), exports);
|
|
45
45
|
__exportStar(require("./activity-business"), exports);
|
|
46
|
-
__exportStar(require("./card-business"), exports);
|
|
47
46
|
__exportStar(require("./transactionProcessor"), exports);
|
|
48
47
|
__exportStar(require("./riskProfile"), exports);
|
|
49
48
|
__exportStar(require("./fiadoMessages"), exports);
|
|
@@ -53,6 +52,7 @@ __exportStar(require("./disputes"), exports);
|
|
|
53
52
|
__exportStar(require("./directories"), exports);
|
|
54
53
|
__exportStar(require("./cognitoConnector"), exports);
|
|
55
54
|
__exportStar(require("./centralPayments"), exports);
|
|
55
|
+
__exportStar(require("./circuloCredito"), exports);
|
|
56
56
|
__exportStar(require("./zendesk"), exports);
|
|
57
57
|
__exportStar(require("./blacklist"), exports);
|
|
58
58
|
__exportStar(require("./legalDocument"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.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
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@fiado/gateway-adapter": "^1.1.50",
|
|
17
17
|
"@fiado/http-client": "^1.0.7",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^3.
|
|
19
|
+
"@fiado/type-kit": "^3.7.0",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"i": "^0.3.7",
|
|
22
22
|
"inversify": "^6.2.2",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import { ReportarCuentaRequest, ReportarCuentaResponse } from "@fiado/type-kit/bin/circuloCredito";
|
|
4
|
+
import { ICirculoCreditoApi } from "./interfaces/ICirculoCreditoApi";
|
|
5
|
+
|
|
6
|
+
@injectable()
|
|
7
|
+
export class CirculoCreditoApi implements ICirculoCreditoApi {
|
|
8
|
+
private readonly baseUrl = process.env.CIRCULO_CREDITO_CONNECTOR_URL || "";
|
|
9
|
+
|
|
10
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
11
|
+
|
|
12
|
+
async reportarCuenta(
|
|
13
|
+
request: ReportarCuentaRequest,
|
|
14
|
+
): Promise<ReportarCuentaResponse> {
|
|
15
|
+
const url = `${this.baseUrl}/private/reportar/cuenta`;
|
|
16
|
+
return await this.httpRequest.post(url, request);
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/container.config.ts
CHANGED
|
@@ -47,8 +47,6 @@ import ActivityApi from "./activity-business/ActivityApi";
|
|
|
47
47
|
import TransactionProcessorApi from "./transactionProcessor/api/TransactionProcessorApi";
|
|
48
48
|
import { ITransactionProcessorApi } from "./transactionProcessor";
|
|
49
49
|
import ActivityPublisher from "./activity-business/queue/ActivityPublisher";
|
|
50
|
-
import { ICardBusinessPublisher } from "./card-business";
|
|
51
|
-
import CardBusinessPublisher from "./card-business/queue/CardBusinessPublisher";
|
|
52
50
|
import RiskProfileApi from "./riskProfile/api/RiskProfileApi";
|
|
53
51
|
import {
|
|
54
52
|
IRiskProfileApi,
|
|
@@ -103,6 +101,7 @@ import MulticommServicePaymentApi from "./multicommServicePayment/api/MulticommS
|
|
|
103
101
|
import { IProductPaymentApi } from "./product-payment";
|
|
104
102
|
import ProductPaymentApi from "./product-payment/api/ProductPaymentApi";
|
|
105
103
|
import { CommissionBusinessApi, ICommissionBusinessApi } from "./commission-business";
|
|
104
|
+
import { CirculoCreditoApi, ICirculoCreditoApi } from "./circuloCredito";
|
|
106
105
|
// Credit module - API clients
|
|
107
106
|
import { CreditEngineApi, ICreditEngineApi } from "./credit-engine";
|
|
108
107
|
import { CreditPaymentApi, ICreditPaymentApi } from "./credit-payment";
|
|
@@ -183,7 +182,6 @@ export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) =>
|
|
|
183
182
|
bind<IActivityApi>("IActivityApi").to(ActivityApi);
|
|
184
183
|
bind<ITransactionProcessorApi>("ITransactionProcessorApi").to(TransactionProcessorApi);
|
|
185
184
|
bind<IActivityPublisher>("IActivityPublisher").to(ActivityPublisher);
|
|
186
|
-
bind<ICardBusinessPublisher>("ICardBusinessPublisher").to(CardBusinessPublisher);
|
|
187
185
|
bind<IRiskProfileApi>("IRiskProfileApi").to(RiskProfileApi);
|
|
188
186
|
bind<ITransactionAlarmPublisher>("ITransactionAlarmPublisher").to(TransactionAlarmPublisher);
|
|
189
187
|
bind<IContactInformationApi>("IContactInformationApi").to(ContactInformationApi);
|
|
@@ -219,6 +217,7 @@ export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) =>
|
|
|
219
217
|
bind<ISTPBusinessApi>("ISTPBusinessApi").to(STPBusinessApi);
|
|
220
218
|
bind<IProductPaymentApi>("IProductPaymentApi").to(ProductPaymentApi);
|
|
221
219
|
bind<ICommissionBusinessApi>("ICommissionBusinessApi").to(CommissionBusinessApi);
|
|
220
|
+
bind<ICirculoCreditoApi>("ICirculoCreditoApi").to(CirculoCreditoApi);
|
|
222
221
|
|
|
223
222
|
// Credit module - API clients
|
|
224
223
|
bind<ICreditEngineApi>("ICreditEngineApi").to(CreditEngineApi);
|
package/src/index.ts
CHANGED
|
@@ -27,7 +27,6 @@ export * from "./bbvaRst";
|
|
|
27
27
|
export * from "./fraudPreventionEngine";
|
|
28
28
|
export * from "./group";
|
|
29
29
|
export * from "./activity-business";
|
|
30
|
-
export * from "./card-business";
|
|
31
30
|
export * from "./transactionProcessor";
|
|
32
31
|
export * from "./riskProfile";
|
|
33
32
|
export * from "./fiadoMessages";
|
|
@@ -37,6 +36,7 @@ export * from "./disputes";
|
|
|
37
36
|
export * from "./directories";
|
|
38
37
|
export * from "./cognitoConnector";
|
|
39
38
|
export * from "./centralPayments";
|
|
39
|
+
export * from "./circuloCredito";
|
|
40
40
|
export * from "./zendesk";
|
|
41
41
|
export * from "./blacklist";
|
|
42
42
|
export * from "./legalDocument";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { CardBusinessQueueMessage, ICardBusinessPublisher } from "./ICardBusinessPublisher";
|
|
2
|
-
export default class CardBusinessPublisher implements ICardBusinessPublisher {
|
|
3
|
-
private readonly SQS_CARD_BUSINESS_QUEUE;
|
|
4
|
-
publish(message: CardBusinessQueueMessage): Promise<void>;
|
|
5
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const client_sqs_1 = require("@aws-sdk/client-sqs");
|
|
10
|
-
const inversify_1 = require("inversify");
|
|
11
|
-
let CardBusinessPublisher = class CardBusinessPublisher {
|
|
12
|
-
constructor() {
|
|
13
|
-
this.SQS_CARD_BUSINESS_QUEUE = process.env.SQS_CARD_BUSINESS_QUEUE;
|
|
14
|
-
}
|
|
15
|
-
async publish(message) {
|
|
16
|
-
try {
|
|
17
|
-
const client = new client_sqs_1.SQSClient();
|
|
18
|
-
const sendMessageRequest = {
|
|
19
|
-
QueueUrl: this.SQS_CARD_BUSINESS_QUEUE,
|
|
20
|
-
MessageBody: JSON.stringify(message),
|
|
21
|
-
};
|
|
22
|
-
const command = new client_sqs_1.SendMessageCommand(sendMessageRequest);
|
|
23
|
-
await client.send(command);
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
throw new Error(`Error publishing message to queue ${': ' + error.message}`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
CardBusinessPublisher = __decorate([
|
|
31
|
-
(0, inversify_1.injectable)()
|
|
32
|
-
], CardBusinessPublisher);
|
|
33
|
-
exports.default = CardBusinessPublisher;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SendMessageCommand, SendMessageRequest, SQSClient } from "@aws-sdk/client-sqs";
|
|
2
|
-
import { injectable } from "inversify";
|
|
3
|
-
import { CardBusinessQueueMessage, ICardBusinessPublisher } from "./ICardBusinessPublisher";
|
|
4
|
-
|
|
5
|
-
@injectable()
|
|
6
|
-
export default class CardBusinessPublisher implements ICardBusinessPublisher {
|
|
7
|
-
private readonly SQS_CARD_BUSINESS_QUEUE = process.env.SQS_CARD_BUSINESS_QUEUE;
|
|
8
|
-
|
|
9
|
-
async publish(message: CardBusinessQueueMessage): Promise<void> {
|
|
10
|
-
try {
|
|
11
|
-
const client: SQSClient = new SQSClient();
|
|
12
|
-
const sendMessageRequest: SendMessageRequest = {
|
|
13
|
-
QueueUrl: this.SQS_CARD_BUSINESS_QUEUE,
|
|
14
|
-
MessageBody: JSON.stringify(message),
|
|
15
|
-
};
|
|
16
|
-
const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
|
|
17
|
-
await client.send(command);
|
|
18
|
-
} catch (error) {
|
|
19
|
-
throw new Error(`Error publishing message to queue ${': ' + error.message}`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
File without changes
|