@fiado/type-kit 1.0.57 → 1.0.59
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/.idea/aws.xml +11 -0
- package/.idea/fiado-type-kit.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +70 -70
- package/bin/account/dtos/AccountCreateRequest.d.ts +2 -2
- package/bin/account/dtos/AccountCreateRequest.js +6 -6
- package/bin/account/index.d.ts +0 -4
- package/bin/account/index.js +0 -6
- package/bin/index.d.ts +2 -0
- package/bin/index.js +3 -1
- package/bin/pomelo/dtos/PomeloCreateUserRequest.d.ts +28 -0
- package/bin/pomelo/dtos/PomeloCreateUserRequest.js +2 -0
- package/bin/pomelo/dtos/PomeloCreateUserResponse.d.ts +35 -0
- package/bin/pomelo/dtos/PomeloCreateUserResponse.js +2 -0
- package/bin/pomelo/enums/CountryEnum.d.ts +8 -0
- package/bin/pomelo/enums/CountryEnum.js +12 -0
- package/bin/pomelo/enums/IdentificationTypeEnum.d.ts +7 -0
- package/bin/pomelo/enums/IdentificationTypeEnum.js +11 -0
- package/bin/pomelo/enums/SexEnum.d.ts +4 -0
- package/bin/pomelo/enums/SexEnum.js +8 -0
- package/bin/pomelo/enums/TaxTypeEnum.d.ts +7 -0
- package/bin/pomelo/enums/TaxTypeEnum.js +11 -0
- package/bin/pomelo/enums/UserStatusEnum.d.ts +4 -0
- package/bin/pomelo/enums/UserStatusEnum.js +8 -0
- package/bin/pomelo/index.d.ts +7 -0
- package/bin/pomelo/index.js +25 -0
- package/bin/tern/dtos/TernAddress.d.ts +8 -0
- package/bin/tern/dtos/TernAddress.js +40 -0
- package/bin/tern/dtos/TernCreateAccountRequest.d.ts +7 -0
- package/bin/tern/dtos/TernCreateAccountRequest.js +33 -0
- package/bin/tern/dtos/TernCreateAccountResponse.d.ts +5 -0
- package/bin/tern/dtos/TernCreateAccountResponse.js +25 -0
- package/bin/tern/dtos/TernCreateUserRequest.d.ts +15 -0
- package/bin/tern/dtos/TernCreateUserRequest.js +70 -0
- package/bin/tern/dtos/TernCreateUserResponse.d.ts +8 -0
- package/bin/tern/dtos/TernCreateUserResponse.js +37 -0
- package/bin/tern/dtos/TernGetAccountRequest.d.ts +5 -0
- package/bin/tern/dtos/TernGetAccountRequest.js +25 -0
- package/bin/tern/dtos/TernGetAccountResponse.d.ts +22 -0
- package/bin/tern/dtos/TernGetAccountResponse.js +87 -0
- package/bin/tern/dtos/TernGetUserRequest.d.ts +3 -0
- package/bin/tern/dtos/TernGetUserRequest.js +20 -0
- package/bin/tern/dtos/TernGetUserResponse.d.ts +24 -0
- package/bin/tern/dtos/TernGetUserResponse.js +96 -0
- package/bin/tern/enums/TernAccountStatusEnum.d.ts +4 -0
- package/bin/tern/enums/TernAccountStatusEnum.js +8 -0
- package/bin/tern/enums/TernAccountTypeEnum.d.ts +5 -0
- package/bin/tern/enums/TernAccountTypeEnum.js +9 -0
- package/bin/tern/index.d.ts +11 -0
- package/bin/tern/index.js +29 -0
- package/package.json +23 -23
- package/src/account/dtos/AccountCreateRequest.ts +58 -58
- package/src/account/dtos/AccountCreateResponse.ts +7 -7
- package/src/account/index.ts +4 -16
- package/src/address/dtos/AddressBase.ts +130 -130
- package/src/address/dtos/AddressCreateRequest.ts +6 -6
- package/src/address/dtos/AddressResponse.ts +41 -41
- package/src/address/dtos/AddressShippingCardResponse.ts +11 -11
- package/src/address/dtos/Geometry.ts +4 -4
- package/src/address/dtos/OfficeDetails.ts +30 -30
- package/src/address/dtos/OperationSchedule.ts +8 -8
- package/src/address/dtos/Place.ts +83 -83
- package/src/address/dtos/Shipping.ts +36 -36
- package/src/address/dtos/Timezone.ts +5 -5
- package/src/address/enums/AddressProvider.ts +10 -10
- package/src/address/enums/AddressStatus.ts +9 -9
- package/src/address/index.ts +15 -15
- package/src/app/enums/App.ts +10 -10
- package/src/app/index.ts +3 -3
- package/src/authentication/dtos/SignUpAdditionalRequest.ts +32 -32
- package/src/authentication/dtos/SignUpAdditionalResponse.ts +5 -5
- package/src/authentication/index.ts +3 -3
- package/src/card/dtos/CardActivateRequest.ts +12 -12
- package/src/card/dtos/CardApplicationRequest.ts +20 -20
- package/src/card/dtos/CardBalanceResponse.ts +10 -10
- package/src/card/dtos/CardCreateAdditionalRequest.ts +40 -40
- package/src/card/dtos/CardCreateRequest.ts +141 -141
- package/src/card/dtos/CardResponse.ts +4 -4
- package/src/card/dtos/CardShipmentQueueMessage.ts +7 -7
- package/src/card/dtos/CardShipmentUpdateRequest.ts +19 -19
- package/src/card/dtos/CardUpdateRequest.ts +13 -13
- package/src/card/enums/Brand.ts +7 -7
- package/src/card/enums/CardIssuanceStatus.ts +5 -5
- package/src/card/enums/CardType.ts +4 -4
- package/src/card/enums/CardUpdateKey.ts +4 -4
- package/src/card/enums/CreditOrDebit.ts +5 -5
- package/src/card/enums/IssuanceType.ts +5 -5
- package/src/card/enums/NominatedOrInnominated.ts +8 -8
- package/src/card/enums/OwnershipType.ts +3 -3
- package/src/card/enums/ShippingStatus.ts +8 -8
- package/src/card/enums/Status.ts +5 -5
- package/src/card/enums/UpdateKey.ts +5 -5
- package/src/card/enums/VirtualOrPhysical.ts +6 -6
- package/src/card/index.ts +28 -28
- package/src/card/validations/CardUpdateKeyConstraint.ts +53 -53
- package/src/card/validations/IsPhoneNumberConstraint.ts +26 -26
- package/src/country/enums/Country.ts +6 -6
- package/src/country/enums/CountryId.ts +6 -6
- package/src/country/index.ts +5 -5
- package/src/currency/dtos/CurrencyResponse.ts +8 -8
- package/src/currency/index.ts +2 -2
- package/src/directory/dtos/DirectoryResponse.ts +17 -17
- package/src/directory/dtos/External.ts +6 -6
- package/src/directory/enums/Profile.ts +6 -6
- package/src/directory/enums/Scope.ts +7 -7
- package/src/directory/enums/Status.ts +8 -8
- package/src/directory/enums/TypeOfDirectoryId.ts +6 -6
- package/src/directory/index.ts +7 -7
- package/src/eventBridge/dto/EventBridgeMessageRequest.ts +4 -4
- package/src/eventBridge/index.ts +1 -1
- package/src/exchangeRate/dtos/ExchangeRateCreateRequest.ts +50 -50
- package/src/exchangeRate/dtos/ExchangeRateCreateResponse.ts +4 -4
- package/src/exchangeRate/dtos/ExchangeRateResponse.ts +19 -19
- package/src/exchangeRate/enums/ExchangeRateStatus.ts +5 -5
- package/src/exchangeRate/index.ts +8 -8
- package/src/genericMessage/dto/GenericMessageRequest.ts +17 -17
- package/src/genericMessage/enums/GenericMessageSourceEnum.ts +3 -3
- package/src/genericMessage/index.ts +1 -1
- package/src/group/dtos/GroupAddDirectoryRequest.ts +27 -27
- package/src/group/dtos/GroupCreateRequest.ts +54 -54
- package/src/group/dtos/GroupDirectoryRelationsResponse.ts +20 -20
- package/src/group/dtos/GroupDirectoryRelationsUpdateRequest.ts +10 -10
- package/src/group/dtos/GroupResponse.ts +17 -17
- package/src/group/dtos/GroupUpdateRequest.ts +31 -31
- package/src/group/enums/GroupAction.ts +8 -8
- package/src/group/enums/GroupStatus.ts +6 -6
- package/src/group/enums/RelationStatus.ts +8 -8
- package/src/group/enums/RelationType.ts +9 -9
- package/src/group/index.ts +18 -18
- package/src/header/TokenPayload.ts +17 -17
- package/src/header/index.ts +3 -3
- package/src/helpers/ValidationUtils.ts +32 -32
- package/src/helpers/constans/regex.ts +12 -12
- package/src/identity/dtos/IdentificationDocument.ts +24 -24
- package/src/identity/dtos/PeopleCreateRequest.ts +4 -4
- package/src/identity/dtos/PeopleResponse.ts +80 -80
- package/src/identity/dtos/TypeOfDocument.ts +11 -11
- package/src/identity/enums/IdentificationDocumentStatus.ts +7 -7
- package/src/identity/enums/SexDocument.ts +6 -6
- package/src/identity/index.ts +11 -11
- package/src/index.ts +24 -22
- package/src/notificationMessages/dtos/NotificationQueueMessageRequest.ts +7 -7
- package/src/notificationMessages/dtos/QueueMessageDestination.ts +6 -6
- package/src/notificationMessages/dtos/QueueMessageVariableValues.ts +3 -3
- package/src/notificationMessages/enums/NotificationId.ts +13 -13
- package/src/notificationMessages/index.ts +5 -5
- package/src/pomelo/dtos/PomeloCreateUserRequest.ts +31 -0
- package/src/pomelo/dtos/PomeloCreateUserResponse.ts +36 -0
- package/src/pomelo/enums/CountryEnum.ts +9 -0
- package/src/pomelo/enums/IdentificationTypeEnum.ts +11 -0
- package/src/pomelo/enums/SexEnum.ts +4 -0
- package/src/pomelo/enums/TaxTypeEnum.ts +8 -0
- package/src/pomelo/enums/UserStatusEnum.ts +7 -0
- package/src/pomelo/index.ts +11 -0
- package/src/provider/enums/Provider.ts +5 -5
- package/src/provider/index.ts +1 -1
- package/src/queue/dtos/QueueMessageBase.ts +13 -13
- package/src/servicePayment/dtos/ServicePaymentRequest.ts +33 -33
- package/src/sessionActivity/dtos/SessionActivityQueueMessageRequest.ts +10 -10
- package/src/sessionActivity/enums/SessionActivityActionEnum.ts +7 -7
- package/src/sessionActivity/enums/SessionActivityActionOriginEnum.ts +4 -4
- package/src/sessionActivity/index.ts +2 -2
- package/src/tern/dtos/TernAddress.ts +21 -0
- package/src/tern/dtos/TernCreateAccountRequest.ts +16 -0
- package/src/tern/dtos/TernCreateAccountResponse.ts +10 -0
- package/src/tern/dtos/TernCreateUserRequest.ts +47 -0
- package/src/tern/dtos/TernCreateUserResponse.ts +19 -0
- package/src/tern/dtos/TernGetAccountRequest.ts +10 -0
- package/src/tern/dtos/TernGetAccountResponse.ts +57 -0
- package/src/tern/dtos/TernGetUserRequest.ts +6 -0
- package/src/tern/dtos/TernGetUserResponse.ts +64 -0
- package/src/tern/enums/TernAccountStatusEnum.ts +4 -0
- package/src/tern/enums/TernAccountTypeEnum.ts +5 -0
- package/src/tern/index.ts +14 -0
- package/src/account/enums/AccountStatus.ts +0 -7
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { ValidationArguments, ValidationOptions, ValidatorConstraint, registerDecorator } from "class-validator";
|
|
2
|
-
import { CardUpdateRequest } from "../dtos/CardUpdateRequest";
|
|
3
|
-
import { Status } from "../enums/Status";
|
|
4
|
-
import { UpdateKey } from "../enums/UpdateKey";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@ValidatorConstraint({ async: true })
|
|
8
|
-
export class CardUpdateKeyConstraint {
|
|
9
|
-
|
|
10
|
-
public static validateUpdateKey(value: string | Status, arg: ValidationArguments) {
|
|
11
|
-
|
|
12
|
-
const cardUpdateRequest = arg.object as CardUpdateRequest;
|
|
13
|
-
|
|
14
|
-
// Validar si el valor es uno de los status válidos
|
|
15
|
-
if (cardUpdateRequest.type === UpdateKey.CHANGE_STATUS) {
|
|
16
|
-
return Object.values(Status).includes(value as Status);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Validar si el valor es un string de 4 dígitos no consecutivos
|
|
20
|
-
if (cardUpdateRequest.type === UpdateKey.CHANGE_PIN) {
|
|
21
|
-
|
|
22
|
-
if (!/^\d{4}$/.test(value)) return false; // Debe ser un string de 4 dígitos
|
|
23
|
-
|
|
24
|
-
// Verifica que no sean consecutivos asc o desc
|
|
25
|
-
for (let i = 0; i < value.length - 1; i++) {
|
|
26
|
-
if (Math.abs(parseInt(value[i]) - parseInt(value[i + 1])) !== 1) {
|
|
27
|
-
continue;
|
|
28
|
-
} else {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// En caso de que type no sea ninguno de los esperados
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
defaultMessage(args: ValidationArguments) {
|
|
40
|
-
return "The value is not valid for the update type.";
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function IsValueValid(validationOptions?: ValidationOptions) {
|
|
45
|
-
return function (object: Object, propertyName: string) {
|
|
46
|
-
registerDecorator({
|
|
47
|
-
target: object.constructor,
|
|
48
|
-
propertyName: propertyName,
|
|
49
|
-
options: validationOptions,
|
|
50
|
-
constraints: [],
|
|
51
|
-
validator: CardUpdateKeyConstraint,
|
|
52
|
-
});
|
|
53
|
-
};
|
|
1
|
+
import { ValidationArguments, ValidationOptions, ValidatorConstraint, registerDecorator } from "class-validator";
|
|
2
|
+
import { CardUpdateRequest } from "../dtos/CardUpdateRequest";
|
|
3
|
+
import { Status } from "../enums/Status";
|
|
4
|
+
import { UpdateKey } from "../enums/UpdateKey";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@ValidatorConstraint({ async: true })
|
|
8
|
+
export class CardUpdateKeyConstraint {
|
|
9
|
+
|
|
10
|
+
public static validateUpdateKey(value: string | Status, arg: ValidationArguments) {
|
|
11
|
+
|
|
12
|
+
const cardUpdateRequest = arg.object as CardUpdateRequest;
|
|
13
|
+
|
|
14
|
+
// Validar si el valor es uno de los status válidos
|
|
15
|
+
if (cardUpdateRequest.type === UpdateKey.CHANGE_STATUS) {
|
|
16
|
+
return Object.values(Status).includes(value as Status);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Validar si el valor es un string de 4 dígitos no consecutivos
|
|
20
|
+
if (cardUpdateRequest.type === UpdateKey.CHANGE_PIN) {
|
|
21
|
+
|
|
22
|
+
if (!/^\d{4}$/.test(value)) return false; // Debe ser un string de 4 dígitos
|
|
23
|
+
|
|
24
|
+
// Verifica que no sean consecutivos asc o desc
|
|
25
|
+
for (let i = 0; i < value.length - 1; i++) {
|
|
26
|
+
if (Math.abs(parseInt(value[i]) - parseInt(value[i + 1])) !== 1) {
|
|
27
|
+
continue;
|
|
28
|
+
} else {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// En caso de que type no sea ninguno de los esperados
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
defaultMessage(args: ValidationArguments) {
|
|
40
|
+
return "The value is not valid for the update type.";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function IsValueValid(validationOptions?: ValidationOptions) {
|
|
45
|
+
return function (object: Object, propertyName: string) {
|
|
46
|
+
registerDecorator({
|
|
47
|
+
target: object.constructor,
|
|
48
|
+
propertyName: propertyName,
|
|
49
|
+
options: validationOptions,
|
|
50
|
+
constraints: [],
|
|
51
|
+
validator: CardUpdateKeyConstraint,
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
54
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments, registerDecorator, ValidationOptions } from 'class-validator';
|
|
2
|
-
import { regexPhoneNumber } from '../../helpers/constans/regex';
|
|
3
|
-
|
|
4
|
-
@ValidatorConstraint({ async: true })
|
|
5
|
-
export class IsPhoneNumberConstraint implements ValidatorConstraintInterface {
|
|
6
|
-
validate(phoneNumber: string, args: ValidationArguments) {
|
|
7
|
-
return regexPhoneNumber.test(phoneNumber);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
defaultMessage(args: ValidationArguments) {
|
|
11
|
-
return "The phone number is not valid. The expected format is +############.";
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Decorador que usaremos en nuestras clases DTO
|
|
16
|
-
export function IsPhoneNumberFiado(validationOptions?: ValidationOptions) {
|
|
17
|
-
return function (object: Object, propertyName: string) {
|
|
18
|
-
registerDecorator({
|
|
19
|
-
target: object.constructor,
|
|
20
|
-
propertyName: propertyName,
|
|
21
|
-
options: validationOptions,
|
|
22
|
-
constraints: [],
|
|
23
|
-
validator: IsPhoneNumberConstraint,
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
}
|
|
1
|
+
import { ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments, registerDecorator, ValidationOptions } from 'class-validator';
|
|
2
|
+
import { regexPhoneNumber } from '../../helpers/constans/regex';
|
|
3
|
+
|
|
4
|
+
@ValidatorConstraint({ async: true })
|
|
5
|
+
export class IsPhoneNumberConstraint implements ValidatorConstraintInterface {
|
|
6
|
+
validate(phoneNumber: string, args: ValidationArguments) {
|
|
7
|
+
return regexPhoneNumber.test(phoneNumber);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
defaultMessage(args: ValidationArguments) {
|
|
11
|
+
return "The phone number is not valid. The expected format is +############.";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Decorador que usaremos en nuestras clases DTO
|
|
16
|
+
export function IsPhoneNumberFiado(validationOptions?: ValidationOptions) {
|
|
17
|
+
return function (object: Object, propertyName: string) {
|
|
18
|
+
registerDecorator({
|
|
19
|
+
target: object.constructor,
|
|
20
|
+
propertyName: propertyName,
|
|
21
|
+
options: validationOptions,
|
|
22
|
+
constraints: [],
|
|
23
|
+
validator: IsPhoneNumberConstraint,
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum Country {
|
|
4
|
-
MEX = "MEX",
|
|
5
|
-
USA = "USA"
|
|
6
|
-
}
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum Country {
|
|
4
|
+
MEX = "MEX",
|
|
5
|
+
USA = "USA"
|
|
6
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
//*
|
|
3
|
-
|
|
4
|
-
export enum CountryId {
|
|
5
|
-
MEX = "484",
|
|
6
|
-
USA = "840"
|
|
1
|
+
|
|
2
|
+
//*
|
|
3
|
+
|
|
4
|
+
export enum CountryId {
|
|
5
|
+
MEX = "484",
|
|
6
|
+
USA = "840"
|
|
7
7
|
}
|
package/src/country/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//dto
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//enums
|
|
5
|
-
export * from './enums/CountryId';
|
|
1
|
+
//dto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//enums
|
|
5
|
+
export * from './enums/CountryId';
|
|
6
6
|
export * from './enums/Country';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export class CurrencyResponse {
|
|
3
|
-
|
|
4
|
-
currencyId: string;
|
|
5
|
-
iso: string;
|
|
6
|
-
name: string;
|
|
7
|
-
symbol: string;
|
|
8
|
-
|
|
1
|
+
|
|
2
|
+
export class CurrencyResponse {
|
|
3
|
+
|
|
4
|
+
currencyId: string;
|
|
5
|
+
iso: string;
|
|
6
|
+
name: string;
|
|
7
|
+
symbol: string;
|
|
8
|
+
|
|
9
9
|
}
|
package/src/currency/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
3
|
export * from './dtos/CurrencyResponse';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Profile } from "../enums/Profile";
|
|
2
|
-
import { Scope } from "../enums/Scope";
|
|
3
|
-
import { Status } from "../enums/Status";
|
|
4
|
-
import { External } from "./External";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export interface DirectoryResponse {
|
|
8
|
-
identityId: string | null;
|
|
9
|
-
lastSession: string | null;
|
|
10
|
-
ownerDirectoryId: string | null;
|
|
11
|
-
password: string;
|
|
12
|
-
peopleId: string;
|
|
13
|
-
phoneNumber: string;
|
|
14
|
-
scope: Array<Scope>;
|
|
15
|
-
status: Status;
|
|
16
|
-
userProfile: Profile;
|
|
17
|
-
external: Array<External>;
|
|
1
|
+
import { Profile } from "../enums/Profile";
|
|
2
|
+
import { Scope } from "../enums/Scope";
|
|
3
|
+
import { Status } from "../enums/Status";
|
|
4
|
+
import { External } from "./External";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export interface DirectoryResponse {
|
|
8
|
+
identityId: string | null;
|
|
9
|
+
lastSession: string | null;
|
|
10
|
+
ownerDirectoryId: string | null;
|
|
11
|
+
password: string;
|
|
12
|
+
peopleId: string;
|
|
13
|
+
phoneNumber: string;
|
|
14
|
+
scope: Array<Scope>;
|
|
15
|
+
status: Status;
|
|
16
|
+
userProfile: Profile;
|
|
17
|
+
external: Array<External>;
|
|
18
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Provider } from "../../provider/enums/Provider";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type External = {
|
|
5
|
-
provider: Provider;
|
|
6
|
-
user: string;
|
|
1
|
+
import { Provider } from "../../provider/enums/Provider";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export type External = {
|
|
5
|
+
provider: Provider;
|
|
6
|
+
user: string;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum Profile {
|
|
4
|
-
HOST = "HOST",
|
|
5
|
-
GUEST = "GUEST",
|
|
6
|
-
GUEST_MINOR = "GUEST_MINOR"
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum Profile {
|
|
4
|
+
HOST = "HOST",
|
|
5
|
+
GUEST = "GUEST",
|
|
6
|
+
GUEST_MINOR = "GUEST_MINOR"
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum Scope {
|
|
4
|
-
FIADO_MX = "fiado.mx",
|
|
5
|
-
FIADO_US = "fiado.us",
|
|
6
|
-
US_ONBOARDING_PROFILE = "fiado.on_us",
|
|
7
|
-
MX_ONBOARDING_PROFILE = "fiado.on_mx"
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum Scope {
|
|
4
|
+
FIADO_MX = "fiado.mx",
|
|
5
|
+
FIADO_US = "fiado.us",
|
|
6
|
+
US_ONBOARDING_PROFILE = "fiado.on_us",
|
|
7
|
+
MX_ONBOARDING_PROFILE = "fiado.on_mx"
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum Status {
|
|
4
|
-
ACTIVE = "ACTIVE",
|
|
5
|
-
PAUSED = "PAUSED",
|
|
6
|
-
PROHIBITED = "PROHIBITED",
|
|
7
|
-
SIGN_UP = "SIGN_UP"
|
|
8
|
-
}
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum Status {
|
|
4
|
+
ACTIVE = "ACTIVE",
|
|
5
|
+
PAUSED = "PAUSED",
|
|
6
|
+
PROHIBITED = "PROHIBITED",
|
|
7
|
+
SIGN_UP = "SIGN_UP"
|
|
8
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum TypeOfDirectoryId {
|
|
4
|
-
USER = "USER",
|
|
5
|
-
BACKOFFICE = "BACKOFFICE",
|
|
6
|
-
AGENT = "AGENT"
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum TypeOfDirectoryId {
|
|
4
|
+
USER = "USER",
|
|
5
|
+
BACKOFFICE = "BACKOFFICE",
|
|
6
|
+
AGENT = "AGENT"
|
|
7
7
|
}
|
package/src/directory/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
//dtos
|
|
3
|
-
export * from './dtos/DirectoryResponse';
|
|
4
|
-
export * from './dtos/External';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
//enums
|
|
1
|
+
|
|
2
|
+
//dtos
|
|
3
|
+
export * from './dtos/DirectoryResponse';
|
|
4
|
+
export * from './dtos/External';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
//enums
|
|
8
8
|
export * from './enums/TypeOfDirectoryId';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GenericMessageRequest } from "../../genericMessage/dto/GenericMessageRequest";
|
|
2
|
-
|
|
3
|
-
export class EventBridgeMessageRequest<T> extends GenericMessageRequest<T>{
|
|
4
|
-
|
|
1
|
+
import { GenericMessageRequest } from "../../genericMessage/dto/GenericMessageRequest";
|
|
2
|
+
|
|
3
|
+
export class EventBridgeMessageRequest<T> extends GenericMessageRequest<T>{
|
|
4
|
+
|
|
5
5
|
}
|
package/src/eventBridge/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
//dto
|
|
1
|
+
//dto
|
|
2
2
|
export * from './dto/EventBridgeMessageRequest';
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
import { IsEnum, IsNumber, IsString, IsUUID, Max, Min, ValidateNested } from "class-validator";
|
|
3
|
-
import { CurrencyResponse } from "../../currency/dtos/CurrencyResponse";
|
|
4
|
-
import { Type } from "class-transformer";
|
|
5
|
-
import { CountryId } from "../../country";
|
|
6
|
-
import { ExchangeRateStatus } from "../enums/ExchangeRateStatus";
|
|
7
|
-
|
|
8
|
-
export class ExchangeRateCreateRequest {
|
|
9
|
-
|
|
10
|
-
@IsUUID()
|
|
11
|
-
id: string;
|
|
12
|
-
|
|
13
|
-
@IsNumber()
|
|
14
|
-
adjustmentExchangeRate: number;
|
|
15
|
-
|
|
16
|
-
@IsNumber()
|
|
17
|
-
adjustmentPercentage: number;
|
|
18
|
-
|
|
19
|
-
@ValidateNested()
|
|
20
|
-
@Type(() => CurrencyResponse)
|
|
21
|
-
destinationCurrency: CurrencyResponse;
|
|
22
|
-
|
|
23
|
-
@IsString()
|
|
24
|
-
destinationCurrencyId: CountryId;
|
|
25
|
-
|
|
26
|
-
@IsNumber()
|
|
27
|
-
exchangeRate: number;
|
|
28
|
-
|
|
29
|
-
@IsNumber()
|
|
30
|
-
fxFactor: number;
|
|
31
|
-
|
|
32
|
-
@IsNumber()
|
|
33
|
-
@Max(50000)
|
|
34
|
-
@Min(10)
|
|
35
|
-
maxRequestAmount: number;
|
|
36
|
-
|
|
37
|
-
@IsNumber()
|
|
38
|
-
@Max(50000)
|
|
39
|
-
@Min(10)
|
|
40
|
-
minRequestAmount: number;
|
|
41
|
-
|
|
42
|
-
@ValidateNested()
|
|
43
|
-
@Type(() => CurrencyResponse)
|
|
44
|
-
originCurrency: CurrencyResponse;
|
|
45
|
-
|
|
46
|
-
@IsString()
|
|
47
|
-
originCurrencyId: string;
|
|
48
|
-
|
|
49
|
-
@IsEnum(ExchangeRateStatus)
|
|
50
|
-
status: ExchangeRateStatus;
|
|
1
|
+
|
|
2
|
+
import { IsEnum, IsNumber, IsString, IsUUID, Max, Min, ValidateNested } from "class-validator";
|
|
3
|
+
import { CurrencyResponse } from "../../currency/dtos/CurrencyResponse";
|
|
4
|
+
import { Type } from "class-transformer";
|
|
5
|
+
import { CountryId } from "../../country";
|
|
6
|
+
import { ExchangeRateStatus } from "../enums/ExchangeRateStatus";
|
|
7
|
+
|
|
8
|
+
export class ExchangeRateCreateRequest {
|
|
9
|
+
|
|
10
|
+
@IsUUID()
|
|
11
|
+
id: string;
|
|
12
|
+
|
|
13
|
+
@IsNumber()
|
|
14
|
+
adjustmentExchangeRate: number;
|
|
15
|
+
|
|
16
|
+
@IsNumber()
|
|
17
|
+
adjustmentPercentage: number;
|
|
18
|
+
|
|
19
|
+
@ValidateNested()
|
|
20
|
+
@Type(() => CurrencyResponse)
|
|
21
|
+
destinationCurrency: CurrencyResponse;
|
|
22
|
+
|
|
23
|
+
@IsString()
|
|
24
|
+
destinationCurrencyId: CountryId;
|
|
25
|
+
|
|
26
|
+
@IsNumber()
|
|
27
|
+
exchangeRate: number;
|
|
28
|
+
|
|
29
|
+
@IsNumber()
|
|
30
|
+
fxFactor: number;
|
|
31
|
+
|
|
32
|
+
@IsNumber()
|
|
33
|
+
@Max(50000)
|
|
34
|
+
@Min(10)
|
|
35
|
+
maxRequestAmount: number;
|
|
36
|
+
|
|
37
|
+
@IsNumber()
|
|
38
|
+
@Max(50000)
|
|
39
|
+
@Min(10)
|
|
40
|
+
minRequestAmount: number;
|
|
41
|
+
|
|
42
|
+
@ValidateNested()
|
|
43
|
+
@Type(() => CurrencyResponse)
|
|
44
|
+
originCurrency: CurrencyResponse;
|
|
45
|
+
|
|
46
|
+
@IsString()
|
|
47
|
+
originCurrencyId: string;
|
|
48
|
+
|
|
49
|
+
@IsEnum(ExchangeRateStatus)
|
|
50
|
+
status: ExchangeRateStatus;
|
|
51
51
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExchangeRateResponse } from "./ExchangeRateResponse";
|
|
2
|
-
|
|
3
|
-
export class ExchangeRateCreateResponse extends ExchangeRateResponse {
|
|
4
|
-
|
|
1
|
+
import { ExchangeRateResponse } from "./ExchangeRateResponse";
|
|
2
|
+
|
|
3
|
+
export class ExchangeRateCreateResponse extends ExchangeRateResponse {
|
|
4
|
+
|
|
5
5
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { CurrencyResponse } from "../../currency/dtos/CurrencyResponse";
|
|
2
|
-
import { CountryId } from "../../country";
|
|
3
|
-
import { ExchangeRateStatus } from "../enums/ExchangeRateStatus";
|
|
4
|
-
|
|
5
|
-
export class ExchangeRateResponse {
|
|
6
|
-
|
|
7
|
-
id: string;
|
|
8
|
-
adjustmentExchangeRate: number;
|
|
9
|
-
adjustmentPercentage: number;
|
|
10
|
-
createDate: string;
|
|
11
|
-
destinationCurrency: CurrencyResponse;
|
|
12
|
-
destinationCurrencyId: CountryId;
|
|
13
|
-
exchangeRate: number;
|
|
14
|
-
fxFactor: number;
|
|
15
|
-
maxRequestAmount: number;
|
|
16
|
-
minRequestAmount: number;
|
|
17
|
-
originCurrency: CurrencyResponse;
|
|
18
|
-
originCurrencyId: string;
|
|
19
|
-
status: ExchangeRateStatus;
|
|
1
|
+
import { CurrencyResponse } from "../../currency/dtos/CurrencyResponse";
|
|
2
|
+
import { CountryId } from "../../country";
|
|
3
|
+
import { ExchangeRateStatus } from "../enums/ExchangeRateStatus";
|
|
4
|
+
|
|
5
|
+
export class ExchangeRateResponse {
|
|
6
|
+
|
|
7
|
+
id: string;
|
|
8
|
+
adjustmentExchangeRate: number;
|
|
9
|
+
adjustmentPercentage: number;
|
|
10
|
+
createDate: string;
|
|
11
|
+
destinationCurrency: CurrencyResponse;
|
|
12
|
+
destinationCurrencyId: CountryId;
|
|
13
|
+
exchangeRate: number;
|
|
14
|
+
fxFactor: number;
|
|
15
|
+
maxRequestAmount: number;
|
|
16
|
+
minRequestAmount: number;
|
|
17
|
+
originCurrency: CurrencyResponse;
|
|
18
|
+
originCurrencyId: string;
|
|
19
|
+
status: ExchangeRateStatus;
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum ExchangeRateStatus {
|
|
4
|
-
ENABLED = 'ENABLED',
|
|
5
|
-
DISABLED = 'DISABLED'
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum ExchangeRateStatus {
|
|
4
|
+
ENABLED = 'ENABLED',
|
|
5
|
+
DISABLED = 'DISABLED'
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
//dtos
|
|
2
|
-
export * from './dtos/ExchangeRateResponse';
|
|
3
|
-
export * from './dtos/ExchangeRateCreateRequest';
|
|
4
|
-
export * from './dtos/ExchangeRateCreateResponse';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
//enums
|
|
1
|
+
//dtos
|
|
2
|
+
export * from './dtos/ExchangeRateResponse';
|
|
3
|
+
export * from './dtos/ExchangeRateCreateRequest';
|
|
4
|
+
export * from './dtos/ExchangeRateCreateResponse';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
//enums
|
|
9
9
|
export * from './enums/ExchangeRateStatus';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { IsString, IsUUID, IsEnum } from "class-validator";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { GenericMessageSourceEnum } from "../enums/GenericMessageSourceEnum";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export class GenericMessageRequest<T> {
|
|
8
|
-
|
|
9
|
-
@IsUUID()
|
|
10
|
-
id?: string;
|
|
11
|
-
@IsEnum(GenericMessageSourceEnum)
|
|
12
|
-
source: GenericMessageSourceEnum;
|
|
13
|
-
@IsString()
|
|
14
|
-
process:string
|
|
15
|
-
|
|
16
|
-
payload(input:T){ return input}
|
|
17
|
-
}
|
|
1
|
+
import { IsString, IsUUID, IsEnum } from "class-validator";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { GenericMessageSourceEnum } from "../enums/GenericMessageSourceEnum";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class GenericMessageRequest<T> {
|
|
8
|
+
|
|
9
|
+
@IsUUID()
|
|
10
|
+
id?: string;
|
|
11
|
+
@IsEnum(GenericMessageSourceEnum)
|
|
12
|
+
source: GenericMessageSourceEnum;
|
|
13
|
+
@IsString()
|
|
14
|
+
process:string
|
|
15
|
+
|
|
16
|
+
payload(input:T){ return input}
|
|
17
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export enum GenericMessageSourceEnum {
|
|
2
|
-
EVENT_BRIDGE='EVENT_BRIDGE'
|
|
3
|
-
}
|
|
1
|
+
export enum GenericMessageSourceEnum {
|
|
2
|
+
EVENT_BRIDGE='EVENT_BRIDGE'
|
|
3
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
//enums
|
|
1
|
+
//enums
|
|
2
2
|
export * from './enums/GenericMessageSourceEnum';
|