@fiado/api-invoker 1.3.78 → 1.3.81
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/account-fiadoinc/AccountFiadoIncApi.d.ts +1 -0
- package/bin/account-fiadoinc/AccountFiadoIncApi.js +4 -0
- package/bin/account-fiadoinc/interfaces/IAccountFiadoIncApi.d.ts +1 -0
- package/bin/activity-business/queue/ActivityPublisher.js +1 -1
- package/package.json +1 -1
- package/src/account-fiadoinc/AccountFiadoIncApi.ts +5 -0
- package/src/account-fiadoinc/interfaces/IAccountFiadoIncApi.ts +2 -0
- package/src/activity-business/queue/ActivityPublisher.ts +2 -1
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
- package/bin/estafeta/EstafetaApi.d.ts +0 -0
- package/bin/estafeta/EstafetaApi.js +0 -0
|
@@ -14,6 +14,7 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
|
14
14
|
confirmUserCreation(provider: Provider, externalUserId: string, request: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>>;
|
|
15
15
|
createAccount(provider: Provider, data: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>>;
|
|
16
16
|
getAccountByDirectoryId(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetAccountResponse[]>>;
|
|
17
|
+
getAccountByExternalAccountId(provider: Provider, externalAccountId: string): Promise<FiadoApiResponse<GetAccountResponse[]>>;
|
|
17
18
|
/** POCKETS **/
|
|
18
19
|
getPocketBalance(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>>;
|
|
19
20
|
updatePocketBalance(provider: Provider, pocketId: string, request: AccountUpdateBalanceRequest): Promise<FiadoApiResponse<null>>;
|
|
@@ -36,6 +36,10 @@ let AccountFiadoIncApi = class AccountFiadoIncApi {
|
|
|
36
36
|
const url = `${this.baseUrl}${provider}/users/${directoryId}/`;
|
|
37
37
|
return await this.httpRequest.get(url);
|
|
38
38
|
}
|
|
39
|
+
async getAccountByExternalAccountId(provider, externalAccountId) {
|
|
40
|
+
const url = `${this.baseUrl}${provider}/accounts/external/${externalAccountId}`;
|
|
41
|
+
return await this.httpRequest.get(url);
|
|
42
|
+
}
|
|
39
43
|
/** POCKETS **/
|
|
40
44
|
async getPocketBalance(provider, directoryId) {
|
|
41
45
|
const url = `${this.baseUrl}${provider}/pockets/users/${directoryId}/balance`;
|
|
@@ -14,4 +14,5 @@ export interface IAccountFiadoIncApi extends IPublisher {
|
|
|
14
14
|
deletePocket(provider: Provider, pocketId: string): Promise<FiadoApiResponse<void>>;
|
|
15
15
|
update(provider: Provider, directoryId: string, data: AccountUpdateRequest): Promise<FiadoApiResponse<void>>;
|
|
16
16
|
replaceExternalAccount(provider: Provider, directoryId: string, externalAccountId: string, isPrincipal: boolean): Promise<FiadoApiResponse<void>>;
|
|
17
|
+
getAccountByExternalAccountId(provider: Provider, externalAccountId: string): Promise<FiadoApiResponse<GetAccountResponse[]>>;
|
|
17
18
|
}
|
|
@@ -14,7 +14,7 @@ let ActivityPublisher = class ActivityPublisher {
|
|
|
14
14
|
}
|
|
15
15
|
async publish(message) {
|
|
16
16
|
try {
|
|
17
|
-
const desduplicationId = message.message.directoryId
|
|
17
|
+
const desduplicationId = `${message.message.directoryId}|${message.message.typeOfActivity}|${message.message.date}`;
|
|
18
18
|
const client = new client_sqs_1.SQSClient();
|
|
19
19
|
const sendMessageRequest = {
|
|
20
20
|
QueueUrl: this.ACTIVITY_QUEUE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.81",
|
|
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",
|
|
@@ -48,6 +48,11 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
|
48
48
|
return await this.httpRequest.get(url);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
async getAccountByExternalAccountId(provider: Provider, externalAccountId: string): Promise<FiadoApiResponse<GetAccountResponse[]>> {
|
|
52
|
+
const url = `${this.baseUrl}${provider}/accounts/external/${externalAccountId}`;
|
|
53
|
+
return await this.httpRequest.get(url);
|
|
54
|
+
}
|
|
55
|
+
|
|
51
56
|
/** POCKETS **/
|
|
52
57
|
async getPocketBalance(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>> {
|
|
53
58
|
const url = `${this.baseUrl}${provider}/pockets/users/${directoryId}/balance`;
|
|
@@ -38,4 +38,6 @@ export interface IAccountFiadoIncApi extends IPublisher {
|
|
|
38
38
|
update(provider: Provider, directoryId: string, data: AccountUpdateRequest): Promise<FiadoApiResponse<void>>
|
|
39
39
|
|
|
40
40
|
replaceExternalAccount(provider: Provider, directoryId: string, externalAccountId:string, isPrincipal:boolean): Promise<FiadoApiResponse<void>>
|
|
41
|
+
|
|
42
|
+
getAccountByExternalAccountId(provider: Provider, externalAccountId: string): Promise<FiadoApiResponse<GetAccountResponse[]>>
|
|
41
43
|
}
|
|
@@ -11,7 +11,8 @@ export default class ActivityPublisher implements IActivityPublisher {
|
|
|
11
11
|
async publish(message: ActivityQueueMessage): Promise<void> {
|
|
12
12
|
try {
|
|
13
13
|
|
|
14
|
-
const desduplicationId = message.message.directoryId
|
|
14
|
+
const desduplicationId = `${message.message.directoryId}|${message.message.typeOfActivity}|${message.message.date}`;
|
|
15
|
+
|
|
15
16
|
const client: SQSClient = new SQSClient();
|
|
16
17
|
const sendMessageRequest: SendMessageRequest = {
|
|
17
18
|
QueueUrl: this.ACTIVITY_QUEUE,
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
}
|
|
File without changes
|
|
File without changes
|