@fiado/type-kit 1.0.38 → 1.0.40
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/card/dtos/CardUpdateRequest.js +1 -2
- package/bin/index.d.ts +1 -0
- package/bin/index.js +2 -1
- package/bin/notificationMessages/dtos/NotificationQueueMessageRequest.d.ts +1 -0
- package/bin/sessionActivity/dtos/SessionActivityQueueMessageRequest.d.ts +10 -0
- package/bin/sessionActivity/dtos/SessionActivityQueueMessageRequest.js +6 -0
- package/bin/sessionActivity/enums/SessionActivityActionEnum.d.ts +7 -0
- package/bin/sessionActivity/enums/SessionActivityActionEnum.js +11 -0
- package/bin/sessionActivity/enums/SessionActivityActionOriginEnum.d.ts +4 -0
- package/bin/sessionActivity/enums/SessionActivityActionOriginEnum.js +8 -0
- package/bin/sessionActivity/index.d.ts +3 -0
- package/bin/sessionActivity/index.js +19 -0
- package/package.json +23 -23
- package/src/account/dtos/AccountCreateRequest.ts +44 -44
- package/src/account/dtos/AccountCreateResponse.ts +5 -5
- package/src/account/dtos/AccountResponse.ts +26 -26
- package/src/account/dtos/PocketCreateRequest.ts +18 -18
- package/src/account/dtos/PocketCreateResponse.ts +4 -4
- package/src/account/enums/AccountStatus.ts +6 -6
- package/src/account/index.ts +16 -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/Geometry.ts +4 -4
- 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 +12 -12
- 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 +41 -41
- package/src/card/dtos/CardCreateRequest.ts +141 -141
- package/src/card/dtos/CardResponse.ts +4 -4
- package/src/card/dtos/CardUpdateRequest.ts +13 -15
- 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/IssuanceType.ts +5 -5
- package/src/card/enums/OwnershipType.ts +3 -3
- package/src/card/enums/Status.ts +5 -5
- package/src/card/enums/UpdateKey.ts +5 -5
- package/src/card/index.ts +19 -19
- 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/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/group/dtos/GroupAddDirectoryRequest.ts +27 -27
- package/src/group/dtos/GroupCreateRequest.ts +48 -48
- 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 +27 -27
- 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 +16 -16
- 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 +20 -19
- package/src/notificationMessages/dtos/NotificationQueueMessageRequest.ts +7 -6
- package/src/notificationMessages/dtos/QueueMessageDestination.ts +6 -6
- package/src/notificationMessages/dtos/QueueMessageVariableValues.ts +3 -3
- package/src/notificationMessages/index.ts +2 -2
- package/src/provider/enums/Provider.ts +5 -5
- package/src/provider/index.ts +1 -1
- package/src/servicePayment/dtos/ServicePaymentRequest.ts +33 -33
- package/src/sessionActivity/dtos/SessionActivityQueueMessageRequest.ts +11 -0
- package/src/sessionActivity/enums/SessionActivityActionEnum.ts +7 -0
- package/src/sessionActivity/enums/SessionActivityActionOriginEnum.ts +4 -0
- package/src/sessionActivity/index.ts +3 -0
- package/.idea/sonarlint/issuestore/1/2/12453d06e6e35287172e482940b954ba12dc25a2 +0 -2
- package/.idea/sonarlint/issuestore/1/f/1fcc1ef4b4c5c551f5f5833f39af79dd4d6440bd +0 -0
- package/.idea/sonarlint/issuestore/2/5/25497cc140764f84080ed16d4d408b09b411525a +0 -0
- package/.idea/sonarlint/issuestore/3/5/355a0b1b7628657539752d4cfbd8f33fcc664d5d +0 -0
- package/.idea/sonarlint/issuestore/6/9/69abfdb53d85b80c255b3ab2a88666175ceeac54 +0 -0
- package/.idea/sonarlint/issuestore/7/0/7030d0b2f71b999ff89a343de08c414af32fc93a +0 -0
- package/.idea/sonarlint/issuestore/7/3/73eee44012dacbb17c6d2e2d988e6def209267b8 +0 -0
- package/.idea/sonarlint/issuestore/8/b/8b0588db2495f22a93ce5d97cc089971f40aa4ec +0 -0
- package/.idea/sonarlint/issuestore/8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d +0 -0
- package/.idea/sonarlint/issuestore/c/5/c5fb850250c7443c48a6c12b5cf6916773da31f1 +0 -0
- package/.idea/sonarlint/issuestore/index.pb +0 -21
- package/.idea/sonarlint/securityhotspotstore/1/2/12453d06e6e35287172e482940b954ba12dc25a2 +0 -0
- package/.idea/sonarlint/securityhotspotstore/1/f/1fcc1ef4b4c5c551f5f5833f39af79dd4d6440bd +0 -0
- package/.idea/sonarlint/securityhotspotstore/2/5/25497cc140764f84080ed16d4d408b09b411525a +0 -0
- package/.idea/sonarlint/securityhotspotstore/3/5/355a0b1b7628657539752d4cfbd8f33fcc664d5d +0 -0
- package/.idea/sonarlint/securityhotspotstore/6/9/69abfdb53d85b80c255b3ab2a88666175ceeac54 +0 -0
- package/.idea/sonarlint/securityhotspotstore/7/0/7030d0b2f71b999ff89a343de08c414af32fc93a +0 -0
- package/.idea/sonarlint/securityhotspotstore/7/3/73eee44012dacbb17c6d2e2d988e6def209267b8 +0 -0
- package/.idea/sonarlint/securityhotspotstore/8/b/8b0588db2495f22a93ce5d97cc089971f40aa4ec +0 -0
- package/.idea/sonarlint/securityhotspotstore/8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d +0 -0
- package/.idea/sonarlint/securityhotspotstore/c/5/c5fb850250c7443c48a6c12b5cf6916773da31f1 +0 -0
- package/.idea/sonarlint/securityhotspotstore/index.pb +0 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export enum CardType {
|
|
2
|
-
CREDIT = 'CREDIT',
|
|
3
|
-
DEBIT = 'DEBIT',
|
|
4
|
-
PREPAID = 'PREPAID'
|
|
1
|
+
export enum CardType {
|
|
2
|
+
CREDIT = 'CREDIT',
|
|
3
|
+
DEBIT = 'DEBIT',
|
|
4
|
+
PREPAID = 'PREPAID'
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export enum CardUpdateKey {
|
|
2
|
-
CHANGE_STATUS = 'CHANGE_STATUS',
|
|
3
|
-
CHANGE_PIN = 'CHANGE_PIN',
|
|
4
|
-
}
|
|
1
|
+
export enum CardUpdateKey {
|
|
2
|
+
CHANGE_STATUS = 'CHANGE_STATUS',
|
|
3
|
+
CHANGE_PIN = 'CHANGE_PIN',
|
|
4
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum IssuanceType {
|
|
4
|
-
VIRTUAL = 'VIRTUAL',
|
|
5
|
-
PHYSICAL = 'PHYSICAL'
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum IssuanceType {
|
|
4
|
+
VIRTUAL = 'VIRTUAL',
|
|
5
|
+
PHYSICAL = 'PHYSICAL'
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export enum OwnershipType {
|
|
2
|
-
NOMINATE = 'NOMINATE',
|
|
3
|
-
INNOMINATE = 'INNOMINATE',
|
|
1
|
+
export enum OwnershipType {
|
|
2
|
+
NOMINATE = 'NOMINATE',
|
|
3
|
+
INNOMINATE = 'INNOMINATE',
|
|
4
4
|
}
|
package/src/card/enums/Status.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export enum Status {
|
|
3
|
-
ACTIVE = 'ACTIVE',
|
|
4
|
-
PENDING = 'PENDING',
|
|
5
|
-
PAUSED = 'PAUSED',
|
|
1
|
+
|
|
2
|
+
export enum Status {
|
|
3
|
+
ACTIVE = 'ACTIVE',
|
|
4
|
+
PENDING = 'PENDING',
|
|
5
|
+
PAUSED = 'PAUSED',
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum UpdateKey {
|
|
4
|
-
CHANGE_STATUS = 'CHANGE_STATUS',
|
|
5
|
-
CHANGE_PIN = 'CHANGE_PIN'
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum UpdateKey {
|
|
4
|
+
CHANGE_STATUS = 'CHANGE_STATUS',
|
|
5
|
+
CHANGE_PIN = 'CHANGE_PIN'
|
|
6
6
|
}
|
package/src/card/index.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
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
|
-
|
|
11
|
-
//enums
|
|
12
|
-
export * from './enums/CardType';
|
|
13
|
-
export * from './enums/CardUpdateKey';
|
|
14
|
-
export * from './enums/IssuanceType';
|
|
15
|
-
export * from './enums/Status';
|
|
16
|
-
export * from './enums/OwnershipType';
|
|
17
|
-
export * from './enums/Brand';
|
|
18
|
-
export * from './enums/UpdateKey';
|
|
19
|
-
export * from './enums/CardIssuanceStatus';
|
|
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
|
+
|
|
11
|
+
//enums
|
|
12
|
+
export * from './enums/CardType';
|
|
13
|
+
export * from './enums/CardUpdateKey';
|
|
14
|
+
export * from './enums/IssuanceType';
|
|
15
|
+
export * from './enums/Status';
|
|
16
|
+
export * from './enums/OwnershipType';
|
|
17
|
+
export * from './enums/Brand';
|
|
18
|
+
export * from './enums/UpdateKey';
|
|
19
|
+
export * from './enums/CardIssuanceStatus';
|
|
@@ -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,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';
|