@fiado/api-invoker 1.0.73 → 1.0.75
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/README.md +64 -64
- package/bin/tern/api/TernApi.d.ts +2 -1
- package/bin/tern/api/TernApi.js +4 -0
- package/bin/tern/api/interfaces/ITernApi.d.ts +1 -0
- package/package.json +28 -28
- package/src/account-fiadoinc/AccountFiadoIncApi.ts +37 -37
- package/src/account-fiadoinc/index.ts +1 -1
- package/src/account-fiadoinc/interfaces/IAccountFiadoIncApi.ts +17 -17
- package/src/account-fiadosa/AccountFiadoSAApi.ts +22 -22
- package/src/account-fiadosa/index.ts +1 -1
- package/src/account-fiadosa/interfaces/IAccountFiadoSAApi.ts +9 -9
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +22 -22
- package/src/account-pagoconfiado/index.ts +2 -2
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +8 -8
- package/src/address/AddressApi.ts +46 -46
- package/src/address/index.ts +3 -3
- package/src/address/interfaces/IAddressApi.ts +30 -30
- package/src/authentication/AuthenticationApi.ts +16 -16
- package/src/authentication/index.ts +4 -4
- package/src/authentication/interfaces/IAuthenticationApi.ts +5 -5
- package/src/card/CardApi.ts +33 -33
- package/src/card/index.ts +3 -3
- package/src/card/interfaces/ICardApi.ts +10 -10
- package/src/container.config.ts +49 -49
- package/src/contract-generator/ContractGeneratorApi.ts +18 -18
- package/src/contract-generator/index.ts +2 -2
- package/src/contract-generator/interfaces/IContractGeneratorApi.ts +16 -16
- package/src/directory/DirectoryApi.ts +74 -74
- package/src/directory/index.ts +3 -3
- package/src/directory/interfaces/IDirectoryApi.ts +53 -53
- package/src/exchangeRates/ExchangeRatesApi.ts +18 -18
- package/src/exchangeRates/index.ts +1 -1
- package/src/exchangeRates/interfaces/IExchangeRatesApi.ts +5 -5
- package/src/identity/IdentityApi.ts +47 -47
- package/src/identity/index.ts +3 -3
- package/src/identity/interfaces/IIdentityApi.ts +33 -33
- package/src/index.ts +16 -16
- package/src/notificationMessages/index.ts +1 -1
- package/src/notificationMessages/queue/NotificationMessagePublisher.ts +22 -22
- package/src/notificationMessages/queue/interfaces/INotificationMessagesPublisher.ts +4 -4
- package/src/pomelo/api/PomeloApi.ts +99 -99
- package/src/pomelo/api/interfaces/IPomeloApi.ts +27 -27
- package/src/pomelo/index.ts +1 -1
- package/src/product-catalog/ProductCatalogApi.ts +17 -17
- package/src/product-catalog/index.ts +1 -1
- package/src/product-catalog/interfaces/IProductCatalogApi.ts +6 -6
- package/src/sessionActivity/index.ts +2 -2
- package/src/sessionActivity/queue/SessionActivityPublisher.ts +22 -22
- package/src/sessionActivity/queue/interfaces/ISessionActivityPublisher.ts +4 -4
- package/src/stpAccount/api/STPAccountApi.ts +102 -102
- package/src/stpAccount/api/interfaces/ISTPAccountApi.ts +6 -6
- package/src/stpAccount/index.ts +1 -1
- package/src/tern/api/TernApi.ts +96 -85
- package/src/tern/api/interfaces/ITernApi.ts +29 -27
- package/src/tern/index.ts +1 -1
- package/src/transaction/index.ts +2 -2
- package/src/transaction/queue/TransactionPublisher.ts +24 -24
- package/src/transaction/queue/interfaces/ITransactionPublisher.ts +4 -4
- package/tsconfig.json +21 -21
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import {CreateBankAccountRequest, CreateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
|
|
2
|
-
import {GetBankAccountUserRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountUserRequest";
|
|
3
|
-
import {GetBankAccountRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountRequest";
|
|
4
|
-
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
5
|
-
|
|
6
|
-
export interface ITernApi {
|
|
7
|
-
getUser(request: GetBankAccountUserRequest): Promise<any>;
|
|
8
|
-
|
|
9
|
-
getAccount(request: GetBankAccountRequest): Promise<any>;
|
|
10
|
-
|
|
11
|
-
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
12
|
-
|
|
13
|
-
createAccount(request: CreateBankAccountRequest): Promise<any>
|
|
14
|
-
|
|
15
|
-
getCardsById(externalCardId: string): Promise<any>;
|
|
16
|
-
|
|
17
|
-
createCard(request: CreateBankAccountCardRequest): Promise<any>;
|
|
18
|
-
|
|
19
|
-
blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
20
|
-
|
|
21
|
-
changePin(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
22
|
-
|
|
23
|
-
updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
24
|
-
|
|
25
|
-
activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
|
|
26
|
-
|
|
27
|
-
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
|
1
|
+
import {CreateBankAccountRequest, CreateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
|
|
2
|
+
import {GetBankAccountUserRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountUserRequest";
|
|
3
|
+
import {GetBankAccountRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountRequest";
|
|
4
|
+
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
5
|
+
|
|
6
|
+
export interface ITernApi {
|
|
7
|
+
getUser(request: GetBankAccountUserRequest): Promise<any>;
|
|
8
|
+
|
|
9
|
+
getAccount(request: GetBankAccountRequest): Promise<any>;
|
|
10
|
+
|
|
11
|
+
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
12
|
+
|
|
13
|
+
createAccount(request: CreateBankAccountRequest): Promise<any>
|
|
14
|
+
|
|
15
|
+
getCardsById(externalCardId: string): Promise<any>;
|
|
16
|
+
|
|
17
|
+
createCard(request: CreateBankAccountCardRequest): Promise<any>;
|
|
18
|
+
|
|
19
|
+
blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
20
|
+
|
|
21
|
+
changePin(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
22
|
+
|
|
23
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
24
|
+
|
|
25
|
+
activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
|
|
26
|
+
|
|
27
|
+
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
|
28
|
+
|
|
29
|
+
p2pTransfer(request: any): Promise<any>
|
|
28
30
|
}
|
package/src/tern/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './api/TernApi';
|
|
1
|
+
export * from './api/TernApi';
|
|
2
2
|
export * from './api/interfaces/ITernApi';
|
package/src/transaction/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './queue/TransactionPublisher';
|
|
2
|
-
export * from './queue/interfaces/ITransactionPublisher';
|
|
1
|
+
export * from './queue/TransactionPublisher';
|
|
2
|
+
export * from './queue/interfaces/ITransactionPublisher';
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {SendMessageCommand, SendMessageRequest, SQSClient} from "@aws-sdk/client-sqs";
|
|
2
|
-
import {ITransactionPublisher} from "./interfaces/ITransactionPublisher";
|
|
3
|
-
import {injectable} from "inversify";
|
|
4
|
-
import {TransactionCreateRequest} from "@fiado/type-kit/bin/transaction";
|
|
5
|
-
|
|
6
|
-
@injectable()
|
|
7
|
-
export class TransactionPublisher implements ITransactionPublisher {
|
|
8
|
-
private readonly TRANSACTION_QUEUE = process.env.TRANSACTION_QUEUE
|
|
9
|
-
|
|
10
|
-
async publish(message: TransactionCreateRequest): Promise<void> {
|
|
11
|
-
try {
|
|
12
|
-
const client: SQSClient = new SQSClient();
|
|
13
|
-
const sendMessageRequest: SendMessageRequest = {
|
|
14
|
-
QueueUrl: this.TRANSACTION_QUEUE,
|
|
15
|
-
MessageBody: JSON.stringify(message),
|
|
16
|
-
MessageGroupId: message.transactionNumber,
|
|
17
|
-
MessageDeduplicationId: message.transactionNumber
|
|
18
|
-
};
|
|
19
|
-
const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
|
|
20
|
-
await client.send(command);
|
|
21
|
-
} catch (error) {
|
|
22
|
-
throw new Error(`Error publishing message to queue ${': ' + error.message ?? ''}`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
import {SendMessageCommand, SendMessageRequest, SQSClient} from "@aws-sdk/client-sqs";
|
|
2
|
+
import {ITransactionPublisher} from "./interfaces/ITransactionPublisher";
|
|
3
|
+
import {injectable} from "inversify";
|
|
4
|
+
import {TransactionCreateRequest} from "@fiado/type-kit/bin/transaction";
|
|
5
|
+
|
|
6
|
+
@injectable()
|
|
7
|
+
export class TransactionPublisher implements ITransactionPublisher {
|
|
8
|
+
private readonly TRANSACTION_QUEUE = process.env.TRANSACTION_QUEUE
|
|
9
|
+
|
|
10
|
+
async publish(message: TransactionCreateRequest): Promise<void> {
|
|
11
|
+
try {
|
|
12
|
+
const client: SQSClient = new SQSClient();
|
|
13
|
+
const sendMessageRequest: SendMessageRequest = {
|
|
14
|
+
QueueUrl: this.TRANSACTION_QUEUE,
|
|
15
|
+
MessageBody: JSON.stringify(message),
|
|
16
|
+
MessageGroupId: message.transactionNumber,
|
|
17
|
+
MessageDeduplicationId: message.transactionNumber
|
|
18
|
+
};
|
|
19
|
+
const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
|
|
20
|
+
await client.send(command);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
throw new Error(`Error publishing message to queue ${': ' + error.message ?? ''}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TransactionCreateRequest } from "@fiado/type-kit/bin/transaction";
|
|
2
|
-
|
|
3
|
-
export interface ITransactionPublisher {
|
|
4
|
-
publish(message: TransactionCreateRequest): Promise<void>;
|
|
1
|
+
import { TransactionCreateRequest } from "@fiado/type-kit/bin/transaction";
|
|
2
|
+
|
|
3
|
+
export interface ITransactionPublisher {
|
|
4
|
+
publish(message: TransactionCreateRequest): Promise<void>;
|
|
5
5
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"forceConsistentCasingInFileNames": true,
|
|
8
|
-
"experimentalDecorators": true,
|
|
9
|
-
"emitDecoratorMetadata": true,
|
|
10
|
-
"outDir": "./bin",
|
|
11
|
-
"rootDir": "./src",
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"declaration": true,
|
|
14
|
-
},
|
|
15
|
-
"include": [
|
|
16
|
-
"./src/**/*"
|
|
17
|
-
],
|
|
18
|
-
"exclude": [
|
|
19
|
-
"node_modules"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"esModuleInterop": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"emitDecoratorMetadata": true,
|
|
10
|
+
"outDir": "./bin",
|
|
11
|
+
"rootDir": "./src",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"declaration": true,
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"./src/**/*"
|
|
17
|
+
],
|
|
18
|
+
"exclude": [
|
|
19
|
+
"node_modules"
|
|
20
|
+
]
|
|
21
|
+
}
|