@fiado/type-kit 1.0.37 → 1.0.39

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.
Files changed (116) hide show
  1. package/.idea/aws.xml +11 -0
  2. package/.idea/fiado-type-kit.iml +12 -0
  3. package/.idea/modules.xml +8 -0
  4. package/.idea/vcs.xml +6 -0
  5. package/README.md +70 -70
  6. package/bin/card/dtos/CardUpdateRequest.js +1 -2
  7. package/bin/index.d.ts +2 -0
  8. package/bin/index.js +3 -1
  9. package/bin/notificationMessages/dtos/NotificationQueueMessageRequest.d.ts +6 -0
  10. package/bin/notificationMessages/dtos/NotificationQueueMessageRequest.js +6 -0
  11. package/bin/notificationMessages/dtos/QueueMessageDestination.d.ts +6 -0
  12. package/bin/notificationMessages/dtos/QueueMessageDestination.js +6 -0
  13. package/bin/notificationMessages/dtos/QueueMessageVariableValues.d.ts +4 -0
  14. package/bin/notificationMessages/dtos/QueueMessageVariableValues.js +6 -0
  15. package/bin/notificationMessages/index.d.ts +3 -0
  16. package/bin/notificationMessages/index.js +19 -0
  17. package/bin/sessionActivity/dtos/SessionActivityQueueMessageRequest.d.ts +10 -0
  18. package/bin/sessionActivity/dtos/SessionActivityQueueMessageRequest.js +6 -0
  19. package/bin/sessionActivity/enums/SessionActivityActionEnum.d.ts +7 -0
  20. package/bin/sessionActivity/enums/SessionActivityActionEnum.js +11 -0
  21. package/bin/sessionActivity/enums/SessionActivityActionOriginEnum.d.ts +4 -0
  22. package/bin/sessionActivity/enums/SessionActivityActionOriginEnum.js +8 -0
  23. package/bin/sessionActivity/index.d.ts +3 -0
  24. package/bin/sessionActivity/index.js +19 -0
  25. package/package.json +23 -23
  26. package/src/account/dtos/AccountCreateRequest.ts +44 -44
  27. package/src/account/dtos/AccountCreateResponse.ts +5 -5
  28. package/src/account/dtos/AccountResponse.ts +26 -26
  29. package/src/account/dtos/PocketCreateRequest.ts +18 -18
  30. package/src/account/dtos/PocketCreateResponse.ts +4 -4
  31. package/src/account/enums/AccountStatus.ts +6 -6
  32. package/src/account/index.ts +16 -16
  33. package/src/address/dtos/AddressBase.ts +130 -130
  34. package/src/address/dtos/AddressCreateRequest.ts +6 -6
  35. package/src/address/dtos/AddressResponse.ts +41 -41
  36. package/src/address/dtos/Geometry.ts +4 -4
  37. package/src/address/dtos/Place.ts +83 -83
  38. package/src/address/dtos/Shipping.ts +36 -36
  39. package/src/address/dtos/Timezone.ts +5 -5
  40. package/src/address/enums/AddressProvider.ts +10 -10
  41. package/src/address/enums/AddressStatus.ts +9 -9
  42. package/src/address/index.ts +12 -12
  43. package/src/app/enums/App.ts +10 -10
  44. package/src/app/index.ts +3 -3
  45. package/src/authentication/dtos/SignUpAdditionalRequest.ts +32 -32
  46. package/src/authentication/dtos/SignUpAdditionalResponse.ts +5 -5
  47. package/src/authentication/index.ts +3 -3
  48. package/src/card/dtos/CardActivateRequest.ts +12 -12
  49. package/src/card/dtos/CardApplicationRequest.ts +20 -20
  50. package/src/card/dtos/CardBalanceResponse.ts +10 -10
  51. package/src/card/dtos/CardCreateAdditionalRequest.ts +41 -41
  52. package/src/card/dtos/CardCreateRequest.ts +141 -141
  53. package/src/card/dtos/CardResponse.ts +4 -4
  54. package/src/card/dtos/CardUpdateRequest.ts +13 -15
  55. package/src/card/enums/Brand.ts +7 -7
  56. package/src/card/enums/CardIssuanceStatus.ts +5 -5
  57. package/src/card/enums/CardType.ts +4 -4
  58. package/src/card/enums/CardUpdateKey.ts +4 -4
  59. package/src/card/enums/IssuanceType.ts +5 -5
  60. package/src/card/enums/OwnershipType.ts +3 -3
  61. package/src/card/enums/Status.ts +5 -5
  62. package/src/card/enums/UpdateKey.ts +5 -5
  63. package/src/card/index.ts +19 -19
  64. package/src/card/validations/CardUpdateKeyConstraint.ts +53 -53
  65. package/src/card/validations/IsPhoneNumberConstraint.ts +26 -26
  66. package/src/country/enums/Country.ts +6 -6
  67. package/src/country/enums/CountryId.ts +6 -6
  68. package/src/country/index.ts +5 -5
  69. package/src/currency/dtos/CurrencyResponse.ts +8 -8
  70. package/src/currency/index.ts +2 -2
  71. package/src/directory/dtos/DirectoryResponse.ts +17 -17
  72. package/src/directory/dtos/External.ts +6 -6
  73. package/src/directory/enums/Profile.ts +6 -6
  74. package/src/directory/enums/Scope.ts +7 -7
  75. package/src/directory/enums/Status.ts +8 -8
  76. package/src/directory/enums/TypeOfDirectoryId.ts +6 -6
  77. package/src/directory/index.ts +7 -7
  78. package/src/exchangeRate/dtos/ExchangeRateCreateRequest.ts +50 -50
  79. package/src/exchangeRate/dtos/ExchangeRateCreateResponse.ts +4 -4
  80. package/src/exchangeRate/dtos/ExchangeRateResponse.ts +19 -19
  81. package/src/exchangeRate/enums/ExchangeRateStatus.ts +5 -5
  82. package/src/exchangeRate/index.ts +8 -8
  83. package/src/group/dtos/GroupAddDirectoryRequest.ts +27 -27
  84. package/src/group/dtos/GroupCreateRequest.ts +48 -48
  85. package/src/group/dtos/GroupDirectoryRelationsResponse.ts +20 -20
  86. package/src/group/dtos/GroupDirectoryRelationsUpdateRequest.ts +10 -10
  87. package/src/group/dtos/GroupResponse.ts +17 -17
  88. package/src/group/dtos/GroupUpdateRequest.ts +27 -27
  89. package/src/group/enums/GroupAction.ts +8 -8
  90. package/src/group/enums/GroupStatus.ts +6 -6
  91. package/src/group/enums/RelationStatus.ts +8 -8
  92. package/src/group/enums/RelationType.ts +9 -9
  93. package/src/group/index.ts +18 -18
  94. package/src/header/TokenPayload.ts +16 -16
  95. package/src/header/index.ts +3 -3
  96. package/src/helpers/ValidationUtils.ts +32 -32
  97. package/src/helpers/constans/regex.ts +12 -12
  98. package/src/identity/dtos/IdentificationDocument.ts +24 -24
  99. package/src/identity/dtos/PeopleCreateRequest.ts +4 -4
  100. package/src/identity/dtos/PeopleResponse.ts +80 -80
  101. package/src/identity/dtos/TypeOfDocument.ts +11 -11
  102. package/src/identity/enums/IdentificationDocumentStatus.ts +7 -7
  103. package/src/identity/enums/SexDocument.ts +6 -6
  104. package/src/identity/index.ts +11 -11
  105. package/src/index.ts +20 -20
  106. package/src/notificationMessages/dtos/NotificationQueueMessageRequest.ts +7 -0
  107. package/src/notificationMessages/dtos/QueueMessageDestination.ts +7 -0
  108. package/src/notificationMessages/dtos/QueueMessageVariableValues.ts +4 -0
  109. package/src/notificationMessages/index.ts +3 -0
  110. package/src/provider/enums/Provider.ts +5 -5
  111. package/src/provider/index.ts +1 -1
  112. package/src/servicePayment/dtos/ServicePaymentRequest.ts +33 -33
  113. package/src/sessionActivity/dtos/SessionActivityQueueMessageRequest.ts +11 -0
  114. package/src/sessionActivity/enums/SessionActivityActionEnum.ts +7 -0
  115. package/src/sessionActivity/enums/SessionActivityActionOriginEnum.ts +4 -0
  116. package/src/sessionActivity/index.ts +3 -0
@@ -1,16 +1,14 @@
1
- import { IsEnum } from "class-validator/types/decorator/typechecker/IsEnum";
2
- import { UpdateKey } from "../enums/UpdateKey";
3
- import { IsString } from "class-validator";
4
- import { IsValueValid } from "../validations/CardUpdateKeyConstraint";
5
-
6
-
7
-
8
- export class CardUpdateRequest {
9
-
10
- @IsEnum(UpdateKey)
11
- type: string;
12
-
13
- @IsString()
14
- @IsValueValid()
15
- value: string;
1
+ import {UpdateKey} from "../enums/UpdateKey";
2
+ import {IsEnum, IsString} from "class-validator";
3
+ import {IsValueValid} from "../validations/CardUpdateKeyConstraint";
4
+
5
+
6
+ export class CardUpdateRequest {
7
+
8
+ @IsEnum(UpdateKey)
9
+ type: string;
10
+
11
+ @IsString()
12
+ @IsValueValid()
13
+ value: string;
16
14
  }
@@ -1,8 +1,8 @@
1
- export enum Brand {
2
- VISA = "VISA",
3
- MASTERCARD = 'MASTERCARD',
4
- AMERICAN_EXPRESS = 'AMERICAN_EXPRESS',
5
- DISCOVER = 'DISCOVER',
6
- DINERS_CLUB = 'DINERS_CLUB',
7
- JCB = 'JCB'
1
+ export enum Brand {
2
+ VISA = "VISA",
3
+ MASTERCARD = 'MASTERCARD',
4
+ AMERICAN_EXPRESS = 'AMERICAN_EXPRESS',
5
+ DISCOVER = 'DISCOVER',
6
+ DINERS_CLUB = 'DINERS_CLUB',
7
+ JCB = 'JCB'
8
8
  };
@@ -1,6 +1,6 @@
1
-
2
- export enum CardIssuanceStatus {
3
- IN_PROCESS = "IN_PROCESS",
4
- COMPLETED = "COMPLETED",
5
- FAILED = "FAILED"
1
+
2
+ export enum CardIssuanceStatus {
3
+ IN_PROCESS = "IN_PROCESS",
4
+ COMPLETED = "COMPLETED",
5
+ FAILED = "FAILED"
6
6
  }
@@ -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
  }
@@ -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
  }
@@ -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
  }
@@ -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
  }
@@ -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
  }