@fiado/type-kit 1.0.59 → 1.0.61
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 +70 -70
- package/bin/address/dtos/AddressShippingCardRequest.d.ts +9 -0
- package/bin/address/dtos/AddressShippingCardRequest.js +7 -0
- package/bin/address/index.d.ts +1 -0
- package/bin/address/index.js +1 -0
- package/bin/card/enums/DeliveryChannel.d.ts +5 -0
- package/bin/card/enums/DeliveryChannel.js +9 -0
- package/bin/card/enums/ExternalShippingStatus.d.ts +14 -0
- package/bin/card/enums/ExternalShippingStatus.js +18 -0
- package/bin/card/enums/ExternalShippingStatusDetails.d.ts +54 -0
- package/bin/card/enums/ExternalShippingStatusDetails.js +58 -0
- package/bin/card/index.d.ts +3 -0
- package/bin/card/index.js +3 -0
- package/bin/group/dtos/GroupDirectoryRetationsUpdateRequest.d.ts +3 -0
- package/bin/group/dtos/GroupDirectoryRetationsUpdateRequest.js +22 -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 -4
- 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/AddressShippingCardRequest.ts +12 -0
- 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 +16 -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/DeliveryChannel.ts +7 -0
- package/src/card/enums/ExternalShippingStatus.ts +15 -0
- package/src/card/enums/ExternalShippingStatusDetails.ts +54 -0
- 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 +33 -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 -24
- 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 +30 -30
- package/src/pomelo/dtos/PomeloCreateUserResponse.ts +35 -35
- package/src/pomelo/enums/CountryEnum.ts +8 -8
- package/src/pomelo/enums/IdentificationTypeEnum.ts +10 -10
- package/src/pomelo/enums/SexEnum.ts +3 -3
- package/src/pomelo/enums/TaxTypeEnum.ts +7 -7
- package/src/pomelo/enums/UserStatusEnum.ts +6 -6
- package/src/pomelo/index.ts +11 -11
- 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 +20 -20
- package/src/tern/dtos/TernCreateAccountRequest.ts +15 -15
- package/src/tern/dtos/TernCreateAccountResponse.ts +9 -9
- package/src/tern/dtos/TernCreateUserRequest.ts +46 -46
- package/src/tern/dtos/TernCreateUserResponse.ts +18 -18
- package/src/tern/dtos/TernGetAccountRequest.ts +9 -9
- package/src/tern/dtos/TernGetAccountResponse.ts +56 -56
- package/src/tern/dtos/TernGetUserRequest.ts +5 -5
- package/src/tern/dtos/TernGetUserResponse.ts +63 -63
- package/src/tern/enums/TernAccountStatusEnum.ts +3 -3
- package/src/tern/enums/TernAccountTypeEnum.ts +4 -4
- package/src/tern/index.ts +14 -14
- package/.idea/aws.xml +0 -11
- package/.idea/fiado-type-kit.iml +0 -12
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
package/src/card/index.ts
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
//dtos
|
|
3
|
-
export * from './dtos/CardActivateRequest';
|
|
4
|
-
export * from './dtos/CardApplicationRequest';
|
|
5
|
-
export * from './dtos/CardCreateRequest';
|
|
6
|
-
export * from './dtos/CardUpdateRequest';
|
|
7
|
-
export * from './dtos/CardCreateAdditionalRequest';
|
|
8
|
-
export * from './dtos/CardBalanceResponse';
|
|
9
|
-
export * from './dtos/CardResponse';
|
|
10
|
-
export * from './dtos/CardShipmentQueueMessage'
|
|
11
|
-
export * from './dtos/CardShipmentUpdateRequest'
|
|
12
|
-
|
|
13
|
-
//enums
|
|
14
|
-
export * from './enums/CardType';
|
|
15
|
-
export * from './enums/CardUpdateKey';
|
|
16
|
-
export * from './enums/IssuanceType';
|
|
17
|
-
export * from './enums/Status';
|
|
18
|
-
export * from './enums/OwnershipType';
|
|
19
|
-
export * from './enums/Brand';
|
|
20
|
-
export * from './enums/UpdateKey';
|
|
21
|
-
export * from './enums/CardIssuanceStatus';
|
|
22
|
-
export * from './enums/NominatedOrInnominated'
|
|
23
|
-
export * from './enums/CreditOrDebit'
|
|
24
|
-
export * from './enums/ShippingStatus'
|
|
25
|
-
export * from './enums/Status'
|
|
26
|
-
export * from './enums/VirtualOrPhysical'
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
|
|
2
|
+
//dtos
|
|
3
|
+
export * from './dtos/CardActivateRequest';
|
|
4
|
+
export * from './dtos/CardApplicationRequest';
|
|
5
|
+
export * from './dtos/CardCreateRequest';
|
|
6
|
+
export * from './dtos/CardUpdateRequest';
|
|
7
|
+
export * from './dtos/CardCreateAdditionalRequest';
|
|
8
|
+
export * from './dtos/CardBalanceResponse';
|
|
9
|
+
export * from './dtos/CardResponse';
|
|
10
|
+
export * from './dtos/CardShipmentQueueMessage'
|
|
11
|
+
export * from './dtos/CardShipmentUpdateRequest'
|
|
12
|
+
|
|
13
|
+
//enums
|
|
14
|
+
export * from './enums/CardType';
|
|
15
|
+
export * from './enums/CardUpdateKey';
|
|
16
|
+
export * from './enums/IssuanceType';
|
|
17
|
+
export * from './enums/Status';
|
|
18
|
+
export * from './enums/OwnershipType';
|
|
19
|
+
export * from './enums/Brand';
|
|
20
|
+
export * from './enums/UpdateKey';
|
|
21
|
+
export * from './enums/CardIssuanceStatus';
|
|
22
|
+
export * from './enums/NominatedOrInnominated'
|
|
23
|
+
export * from './enums/CreditOrDebit'
|
|
24
|
+
export * from './enums/ShippingStatus'
|
|
25
|
+
export * from './enums/Status'
|
|
26
|
+
export * from './enums/VirtualOrPhysical'
|
|
27
|
+
export * from './enums/DeliveryChannel'
|
|
28
|
+
export * from './enums/ExternalShippingStatus'
|
|
29
|
+
export * from './enums/ExternalShippingStatusDetails'
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
@@ -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';
|