@fiado/type-kit 1.0.6 → 1.0.8

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 (122) hide show
  1. package/README.md +36 -1
  2. package/bin/account/dtos/AccountCreateRequest.d.ts +14 -0
  3. package/bin/account/dtos/AccountCreateRequest.js +65 -0
  4. package/bin/account/dtos/AccountCreateResponse.d.ts +3 -0
  5. package/bin/account/dtos/AccountCreateResponse.js +7 -0
  6. package/bin/account/dtos/AccountResponse.js +0 -79
  7. package/bin/account/dtos/PocketCreateRequest.d.ts +4 -0
  8. package/bin/account/dtos/PocketCreateRequest.js +31 -0
  9. package/bin/account/dtos/PocketCreateResponse.d.ts +2 -0
  10. package/bin/account/dtos/PocketCreateResponse.js +6 -0
  11. package/bin/account/index.d.ts +4 -2
  12. package/bin/account/index.js +4 -2
  13. package/bin/address/dtos/AddressCreateRequest.d.ts +3 -0
  14. package/bin/address/dtos/AddressCreateRequest.js +7 -0
  15. package/bin/address/index.d.ts +1 -1
  16. package/bin/address/index.js +1 -1
  17. package/bin/app/enums/App.d.ts +9 -0
  18. package/bin/app/enums/App.js +13 -0
  19. package/bin/app/index.d.ts +1 -0
  20. package/bin/app/index.js +18 -0
  21. package/bin/authentication/dtos/SignUpAdditionalRequest.d.ts +7 -0
  22. package/bin/authentication/dtos/SignUpAdditionalRequest.js +46 -0
  23. package/bin/authentication/dtos/SignUpAdditionalResponse.d.ts +4 -0
  24. package/bin/authentication/dtos/SignUpAdditionalResponse.js +6 -0
  25. package/bin/authentication/index.d.ts +1 -0
  26. package/bin/authentication/index.js +28 -0
  27. package/bin/card/dtos/CardBalanceResponse.d.ts +9 -0
  28. package/bin/card/dtos/CardBalanceResponse.js +6 -0
  29. package/bin/card/dtos/CardCreateAdditionalRequest.d.ts +10 -0
  30. package/bin/card/dtos/CardCreateAdditionalRequest.js +59 -0
  31. package/bin/card/dtos/CardCreateRequest.d.ts +34 -0
  32. package/bin/card/dtos/CardCreateRequest.js +176 -0
  33. package/bin/card/dtos/CardResponse.d.ts +2 -0
  34. package/bin/card/dtos/CardResponse.js +6 -0
  35. package/bin/card/index.d.ts +4 -1
  36. package/bin/card/index.js +4 -1
  37. package/bin/currency/dtos/CurrencyResponse.d.ts +6 -0
  38. package/bin/currency/dtos/CurrencyResponse.js +6 -0
  39. package/bin/currency/index.d.ts +1 -0
  40. package/bin/currency/index.js +17 -0
  41. package/bin/directory/dtos/DirectoryResponse.d.ts +16 -0
  42. package/bin/directory/dtos/DirectoryResponse.js +2 -0
  43. package/bin/directory/dtos/External.d.ts +5 -0
  44. package/bin/directory/dtos/External.js +2 -0
  45. package/bin/directory/enums/Profile.d.ts +5 -0
  46. package/bin/directory/enums/Profile.js +9 -0
  47. package/bin/directory/enums/Scope.d.ts +6 -0
  48. package/bin/directory/enums/Scope.js +10 -0
  49. package/bin/directory/enums/Status.d.ts +6 -0
  50. package/bin/directory/enums/Status.js +10 -0
  51. package/bin/directory/index.d.ts +2 -0
  52. package/bin/directory/index.js +3 -1
  53. package/bin/exchangeRate/dtos/ExchangeRateCreateRequest.d.ts +17 -0
  54. package/bin/exchangeRate/dtos/ExchangeRateCreateRequest.js +74 -0
  55. package/bin/exchangeRate/dtos/ExchangeRateCreateResponse.d.ts +3 -0
  56. package/bin/exchangeRate/dtos/ExchangeRateCreateResponse.js +7 -0
  57. package/bin/exchangeRate/dtos/ExchangeRateResponse.d.ts +18 -0
  58. package/bin/exchangeRate/dtos/ExchangeRateResponse.js +6 -0
  59. package/bin/exchangeRate/enums/ExchangeRateStatus.d.ts +4 -0
  60. package/bin/exchangeRate/enums/ExchangeRateStatus.js +8 -0
  61. package/bin/exchangeRate/index.d.ts +4 -0
  62. package/bin/exchangeRate/index.js +22 -0
  63. package/bin/identity/dtos/IdentificationDocument.d.ts +22 -0
  64. package/bin/identity/dtos/IdentificationDocument.js +6 -0
  65. package/bin/identity/dtos/PeopleCreateRequest.d.ts +2 -0
  66. package/bin/identity/dtos/PeopleCreateRequest.js +6 -0
  67. package/bin/identity/dtos/PeopleResponse.d.ts +75 -0
  68. package/bin/identity/dtos/PeopleResponse.js +6 -0
  69. package/bin/identity/dtos/TypeOfDocument.d.ts +10 -0
  70. package/bin/identity/dtos/TypeOfDocument.js +6 -0
  71. package/bin/identity/enums/IdentificationDocumentStatus.d.ts +5 -0
  72. package/bin/identity/enums/IdentificationDocumentStatus.js +9 -0
  73. package/bin/identity/enums/SexDocument.d.ts +4 -0
  74. package/bin/identity/enums/SexDocument.js +8 -0
  75. package/bin/identity/index.d.ts +6 -0
  76. package/bin/identity/index.js +24 -0
  77. package/bin/index.d.ts +6 -0
  78. package/bin/index.js +7 -1
  79. package/bin/provider/index.d.ts +1 -0
  80. package/bin/provider/index.js +17 -0
  81. package/package.json +1 -1
  82. package/src/account/dtos/{CreateAccountRequest.ts → AccountCreateRequest.ts} +1 -1
  83. package/src/account/dtos/AccountCreateResponse.ts +6 -0
  84. package/src/account/dtos/AccountResponse.ts +2 -36
  85. package/src/account/dtos/{CreatePockeRequest.ts → PocketCreateRequest.ts} +1 -1
  86. package/src/account/dtos/PocketCreateResponse.ts +5 -0
  87. package/src/account/index.ts +4 -2
  88. package/src/address/dtos/AddressCreateRequest.ts +7 -0
  89. package/src/address/index.ts +1 -1
  90. package/src/app/enums/App.ts +11 -0
  91. package/src/app/index.ts +4 -0
  92. package/src/authentication/dtos/SignUpAdditionalRequest.ts +33 -0
  93. package/src/authentication/dtos/SignUpAdditionalResponse.ts +6 -0
  94. package/src/authentication/index.ts +3 -0
  95. package/src/card/dtos/CardBalanceResponse.ts +12 -0
  96. package/src/card/dtos/CardCreateAdditionalRequest.ts +41 -0
  97. package/src/card/dtos/{CreateCardRequest.ts → CardCreateRequest.ts} +1 -1
  98. package/src/card/dtos/CardResponse.ts +5 -0
  99. package/src/card/index.ts +4 -1
  100. package/src/currency/dtos/CurrencyResponse.ts +9 -0
  101. package/src/currency/index.ts +3 -0
  102. package/src/directory/dtos/DirectoryResponse.ts +18 -0
  103. package/src/directory/dtos/External.ts +7 -0
  104. package/src/directory/enums/Profile.ts +7 -0
  105. package/src/directory/enums/Scope.ts +8 -0
  106. package/src/directory/enums/Status.ts +8 -0
  107. package/src/directory/index.ts +2 -1
  108. package/src/exchangeRate/dtos/ExchangeRateCreateRequest.ts +51 -0
  109. package/src/exchangeRate/dtos/ExchangeRateCreateResponse.ts +5 -0
  110. package/src/exchangeRate/dtos/ExchangeRateResponse.ts +20 -0
  111. package/src/exchangeRate/enums/ExchangeRateStatus.ts +6 -0
  112. package/src/exchangeRate/index.ts +9 -0
  113. package/src/identity/dtos/IdentificationDocument.ts +25 -0
  114. package/src/identity/dtos/PeopleCreateRequest.ts +5 -0
  115. package/src/identity/dtos/PeopleResponse.ts +80 -0
  116. package/src/identity/dtos/TypeOfDocument.ts +12 -0
  117. package/src/identity/enums/IdentificationDocumentStatus.ts +7 -0
  118. package/src/identity/enums/SexDocument.ts +6 -0
  119. package/src/identity/index.ts +11 -0
  120. package/src/index.ts +6 -0
  121. package/src/provider/index.ts +2 -0
  122. package/src/address/dtos/CreateAddressRequest.ts +0 -7
@@ -0,0 +1,75 @@
1
+ import { App } from '../../app/enums/App';
2
+ import { SexDocument } from '../enums/SexDocument';
3
+ import { IdentificationDocument } from './IdentificationDocument';
4
+ export declare class PeopleResponse {
5
+ id: string;
6
+ createDate: string;
7
+ lastUpdateDate: string;
8
+ creationMethod: App;
9
+ indexName: string;
10
+ preferredName: string;
11
+ usSuffix: string | null;
12
+ usLastNames: string | null;
13
+ usNames: string | null;
14
+ latNames: string | null;
15
+ latLastNamePaternal: string | null;
16
+ latLastNameMaternal: string | null;
17
+ aliasNames: string[] | null;
18
+ preferredPronoun: string | null;
19
+ SSN_ITIN: string | null;
20
+ rfc: string | null;
21
+ curp: string | null;
22
+ passportNumber: string | null;
23
+ countryOfPassport: string | null;
24
+ documents: IdentificationDocument[] | null;
25
+ countryOfBirth: string | null;
26
+ dateOfBirth: string | null;
27
+ stateOfBirth: string | null;
28
+ nationalities: string[] | null;
29
+ docSex: SexDocument | null;
30
+ internalEmail: string | null;
31
+ occupation: string | null;
32
+ incomeSource: string | null;
33
+ operationId: string | null;
34
+ tenantId: string | null;
35
+ photoOfpersonImageName: string | null;
36
+ videoOfPersonImageName: string | null;
37
+ USA_DebitAccount: boolean;
38
+ MEX_DebitAccount: boolean;
39
+ MEX_CreditClient: boolean;
40
+ MEX_CreditAdditional: boolean;
41
+ magicNumber: boolean;
42
+ USA_UploadDocument: boolean;
43
+ MEX_UploadDocument: boolean;
44
+ videoSelfieVerified: boolean;
45
+ MEX_ValidDocument: string;
46
+ USA_ValidDocument: string;
47
+ USA_FacematchVerified: boolean | null;
48
+ MEX_FacematchVerified: boolean | null;
49
+ fiadoListApproved: boolean | null;
50
+ ofacListApproved: boolean | null;
51
+ cnbvListApproved: boolean | null;
52
+ blackListApproved: boolean | null;
53
+ whiteList: boolean | null;
54
+ hasOwner: boolean;
55
+ older18: boolean | null;
56
+ USA_Address: boolean;
57
+ MEX_Address: boolean;
58
+ COL_Address: boolean;
59
+ GTM_Address: boolean;
60
+ HND_Address: boolean;
61
+ CRI_Address: boolean;
62
+ PER_Address: boolean;
63
+ MEX_ProofAddress: boolean;
64
+ MEX_SendWish: boolean;
65
+ COL_SendWish: boolean;
66
+ GTM_SendWish: boolean;
67
+ HND_SendWish: boolean;
68
+ CRI_SendWish: boolean;
69
+ PER_SendWish: boolean;
70
+ USA_DebitAccountWish: boolean;
71
+ MEX_DebitAccountWish: boolean;
72
+ MEX_CreditAdditionalWish: boolean;
73
+ MEX_CreditClientWish: boolean;
74
+ SSN_ITINRequired: boolean | null;
75
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PeopleResponse = void 0;
4
+ class PeopleResponse {
5
+ }
6
+ exports.PeopleResponse = PeopleResponse;
@@ -0,0 +1,10 @@
1
+ export declare class TypeOfDocument {
2
+ id: string;
3
+ countryId: string;
4
+ isEnabled: boolean;
5
+ name: string;
6
+ side: number;
7
+ order: number;
8
+ subtype: string;
9
+ type: string;
10
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypeOfDocument = void 0;
4
+ class TypeOfDocument {
5
+ }
6
+ exports.TypeOfDocument = TypeOfDocument;
@@ -0,0 +1,5 @@
1
+ export declare enum IdentificationDocumentStatus {
2
+ VERIFIED = "VERIFIED",
3
+ REJECTED = "REJECTED",
4
+ UNVERIFIED = "UNVERIFIED"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IdentificationDocumentStatus = void 0;
4
+ var IdentificationDocumentStatus;
5
+ (function (IdentificationDocumentStatus) {
6
+ IdentificationDocumentStatus["VERIFIED"] = "VERIFIED";
7
+ IdentificationDocumentStatus["REJECTED"] = "REJECTED";
8
+ IdentificationDocumentStatus["UNVERIFIED"] = "UNVERIFIED";
9
+ })(IdentificationDocumentStatus || (exports.IdentificationDocumentStatus = IdentificationDocumentStatus = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum SexDocument {
2
+ M = "M",
3
+ F = "F"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SexDocument = void 0;
4
+ var SexDocument;
5
+ (function (SexDocument) {
6
+ SexDocument["M"] = "M";
7
+ SexDocument["F"] = "F";
8
+ })(SexDocument || (exports.SexDocument = SexDocument = {}));
@@ -0,0 +1,6 @@
1
+ export * from './dtos/IdentificationDocument';
2
+ export * from './dtos/PeopleCreateRequest';
3
+ export * from './dtos/PeopleResponse';
4
+ export * from './dtos/TypeOfDocument';
5
+ export * from './enums/IdentificationDocumentStatus';
6
+ export * from './enums/SexDocument';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ //dtos
18
+ __exportStar(require("./dtos/IdentificationDocument"), exports);
19
+ __exportStar(require("./dtos/PeopleCreateRequest"), exports);
20
+ __exportStar(require("./dtos/PeopleResponse"), exports);
21
+ __exportStar(require("./dtos/TypeOfDocument"), exports);
22
+ //enums
23
+ __exportStar(require("./enums/IdentificationDocumentStatus"), exports);
24
+ __exportStar(require("./enums/SexDocument"), exports);
package/bin/index.d.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  export * as Account from './account';
2
2
  export * as Address from './address';
3
+ export * as App from './app';
4
+ export * as Authentication from './authentication';
3
5
  export * as Card from './card';
4
6
  export * as Country from './country';
7
+ export * as Currency from './currency';
5
8
  export * as Directory from './directory';
9
+ export * as ExchangeRate from './exchangeRate';
10
+ export * as File from './identity';
11
+ export * as Identity from './provider';
package/bin/index.js CHANGED
@@ -23,9 +23,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Directory = exports.Country = exports.Card = exports.Address = exports.Account = void 0;
26
+ exports.Identity = exports.File = exports.ExchangeRate = exports.Directory = exports.Currency = exports.Country = exports.Card = exports.Authentication = exports.App = exports.Address = exports.Account = void 0;
27
27
  exports.Account = __importStar(require("./account"));
28
28
  exports.Address = __importStar(require("./address"));
29
+ exports.App = __importStar(require("./app"));
30
+ exports.Authentication = __importStar(require("./authentication"));
29
31
  exports.Card = __importStar(require("./card"));
30
32
  exports.Country = __importStar(require("./country"));
33
+ exports.Currency = __importStar(require("./currency"));
31
34
  exports.Directory = __importStar(require("./directory"));
35
+ exports.ExchangeRate = __importStar(require("./exchangeRate"));
36
+ exports.File = __importStar(require("./identity"));
37
+ exports.Identity = __importStar(require("./provider"));
@@ -0,0 +1 @@
1
+ export * from './enums/Provider';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./enums/Provider"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -5,7 +5,7 @@ import { regexUuidV4 } from '../../helpers/constans/regex';
5
5
  import { TypeOfDirectoryId } from '../../directory/enums/TypeOfDirectoryId';
6
6
  import { IsPhoneNumberFiado } from '../../card/validations/IsPhoneNumberConstraint';
7
7
 
8
- export class CreateAccountRequest {
8
+ export class AccountCreateRequest {
9
9
 
10
10
  @IsString()
11
11
  @Matches(regexUuidV4,
@@ -0,0 +1,6 @@
1
+ import { AccountResponse } from "./AccountResponse";
2
+
3
+
4
+ export class AccountCreateResponse extends AccountResponse {
5
+
6
+ }
@@ -1,60 +1,26 @@
1
1
 
2
2
 
3
- import { IsEnum, IsNumber, IsOptional, IsString, IsDateString } from 'class-validator';
4
3
  import { Provider } from '../../provider/enums/Provider';
5
4
  import { Country } from '../../country/enums/Country';
6
5
  import { AccountStatus } from '../enums/AccountStatus';
7
6
  import { TypeOfDirectoryId } from '../../directory/enums/TypeOfDirectoryId';
8
7
 
9
-
10
8
  export class AccountResponse {
11
- @IsString()
9
+
12
10
  id: string;
13
-
14
- @IsOptional()
15
- @IsString()
16
11
  typeOfAccountId: string;
17
-
18
- @IsOptional()
19
- @IsString()
20
12
  externalAccountId: string;
21
-
22
- @IsOptional()
23
- @IsString()
24
13
  externalSubAccountId: string | null;
25
-
26
- @IsEnum(Provider)
27
14
  provider: Provider;
28
-
29
- @IsString()
30
15
  directoryId: string;
31
-
32
- @IsEnum(TypeOfDirectoryId)
33
16
  typeOfDirectoryId: TypeOfDirectoryId;
34
-
35
- @IsNumber()
36
17
  currentBalance: number;
37
-
38
- @IsNumber()
39
18
  balanceLock: number;
40
-
41
- @IsEnum(Country)
42
19
  countryId: Country;
43
-
44
- @IsDateString()
45
20
  createDate: string;
46
-
47
- @IsDateString()
48
21
  lastUpdateDate: string;
49
-
50
- @IsOptional()
51
- @IsString()
52
22
  accountNumber: string
53
-
54
- @IsOptional()
55
- @IsString()
56
23
  routingNumber: string;
57
-
58
- @IsEnum(AccountStatus)
59
24
  status: AccountStatus;
25
+
60
26
  }
@@ -1,7 +1,7 @@
1
1
  import { IsString, Matches } from "class-validator";
2
2
  import { regexUuidV4 } from "../../helpers/constans/regex";
3
3
 
4
- export class CreatePocketRequest {
4
+ export class PocketCreateRequest {
5
5
 
6
6
  @IsString()
7
7
  @Matches(regexUuidV4,
@@ -0,0 +1,5 @@
1
+
2
+
3
+ export class PocketCreateResponse {
4
+
5
+ }
@@ -1,8 +1,10 @@
1
1
 
2
2
  //dtos
3
3
  export * from './dtos/AccountResponse';
4
- export * from './dtos/CreateAccountRequest';
5
- export * from './dtos/CreatePockeRequest';
4
+ export * from './dtos/AccountCreateRequest';
5
+ export * from './dtos/AccountCreateResponse';
6
+ export * from './dtos/PocketCreateRequest';
7
+ export * from './dtos/PocketCreateResponse';
6
8
 
7
9
 
8
10
  //enums
@@ -0,0 +1,7 @@
1
+ import { AddressBase } from "./AddressBase";
2
+
3
+
4
+ export class AddressCreateRequest extends AddressBase {
5
+
6
+
7
+ }
@@ -1,6 +1,6 @@
1
1
  //dtos
2
2
  export * from './dtos/Shipping';
3
- export * from './dtos/CreateAddressRequest';
3
+ export * from './dtos/AddressCreateRequest';
4
4
  export * from './dtos/AddressResponse';
5
5
  export * from './dtos/Geometry';
6
6
  export * from './dtos/Place';
@@ -0,0 +1,11 @@
1
+
2
+
3
+ export enum App {
4
+ USER = "USER",
5
+ MERCHANT = "MERCHANT",
6
+ BACKOFFICE = "BACKOFFICE",
7
+ AGENT = "AGENT",
8
+ USER_APP = "APP",
9
+ USER_WEB = "WEB",
10
+ HYBRID = "HYBRID"
11
+ }
@@ -0,0 +1,4 @@
1
+
2
+
3
+ //enums
4
+ export * from './enums/App';
@@ -0,0 +1,33 @@
1
+ import { IsBoolean, IsNotEmpty, IsOptional, IsString, Length, Matches } from "class-validator";
2
+ import { IsPhoneNumberFiado } from "../../card/validations/IsPhoneNumberConstraint";
3
+ import { regexUuidV4 } from "../../helpers/constans/regex";
4
+
5
+
6
+
7
+ export class SignUpAdditionalRequest {
8
+
9
+ @IsNotEmpty()
10
+ @IsString()
11
+ @Length(3, 70)
12
+ name: string;
13
+
14
+ @IsNotEmpty()
15
+ @IsString()
16
+ @IsPhoneNumberFiado()
17
+ phoneNumber: string;
18
+
19
+ @IsBoolean()
20
+ mexCreditAdditionalWish: boolean;
21
+
22
+ @IsString()
23
+ @Matches(regexUuidV4,
24
+ {
25
+ message: 'ownerDirectoryId must be a valid UUID v4',
26
+ })
27
+ ownerDirectoryId?: string;
28
+
29
+ @IsOptional()
30
+ @IsString()
31
+ ownerRelation: string
32
+
33
+ }
@@ -0,0 +1,6 @@
1
+
2
+
3
+ export class SignUpAdditionalResponse {
4
+ direcrtoryId: string;
5
+ peopleId: string;
6
+ }
@@ -0,0 +1,3 @@
1
+
2
+ //dtos
3
+ export * as authentication from './dtos/SignUpAdditionalRequest';
@@ -0,0 +1,12 @@
1
+ import { IsEnum, IsNumber, IsUUID } from "class-validator"
2
+ import { TypeOfDirectoryId } from "../../directory"
3
+ import { CountryId } from "../../country"
4
+
5
+ export class CardBalanceResponse {
6
+
7
+ cardBalanceId: string
8
+ currentBalance: number
9
+ directoryId: string
10
+ typeOfDirectoryId: TypeOfDirectoryId
11
+ currencyId: CountryId
12
+ }
@@ -0,0 +1,41 @@
1
+ import { IsDateString, IsString, Length, ValidateNested } from "class-validator";
2
+ import { IsNotEmpty } from "class-validator/types/decorator/common/IsNotEmpty";
3
+ import { IsPhoneNumberFiado } from "../validations/IsPhoneNumberConstraint";
4
+ import { Type } from "class-transformer";
5
+ import { AddressCreateRequest } from "../../address";
6
+
7
+ export class CardCreateAdditionalRequest {
8
+
9
+ @IsNotEmpty()
10
+ @IsString()
11
+ @Length(3, 40)
12
+ name: string;
13
+
14
+ @IsNotEmpty()
15
+ @IsString()
16
+ @Length(3, 20)
17
+ lastNamePaternal: string;
18
+
19
+ @IsNotEmpty()
20
+ @IsString()
21
+ @Length(3, 20)
22
+ lastNameMaternal: string;
23
+
24
+ @IsNotEmpty()
25
+ @IsString()
26
+ @IsPhoneNumberFiado()
27
+ phoneNumber: string;
28
+
29
+ @IsDateString()
30
+ dateOfBirth: string;
31
+
32
+ @IsNotEmpty()
33
+ @IsString()
34
+ @Length(3, 20)
35
+ ownerRelation: string;
36
+
37
+ @ValidateNested()
38
+ @Type(() => AddressCreateRequest)
39
+ address: AddressCreateRequest;
40
+ }
41
+
@@ -8,7 +8,7 @@ import { Status } from '../enums/Status';
8
8
  import { regexIso8601, regexUuidV4 } from '../../helpers/constans/regex';
9
9
  import { Shipping } from '../../address';
10
10
 
11
- export class CreateCardRequest {
11
+ export class CardCreateRequest {
12
12
 
13
13
  @IsOptional()
14
14
  @IsString()
@@ -0,0 +1,5 @@
1
+
2
+
3
+ export class CardResponse {
4
+
5
+ }
package/src/card/index.ts CHANGED
@@ -2,8 +2,11 @@
2
2
  //dtos
3
3
  export * from './dtos/CardActivateRequest';
4
4
  export * from './dtos/CardApplicationRequest';
5
- export * from './dtos/CreateCardRequest';
5
+ export * from './dtos/CardCreateRequest';
6
6
  export * from './dtos/CardUpdateRequest';
7
+ export * from './dtos/CardCreateAdditionalRequest';
8
+ export * from './dtos/CardBalanceResponse';
9
+ export * from './dtos/CardResponse';
7
10
 
8
11
  //enums
9
12
  export * from './enums/CardType';
@@ -0,0 +1,9 @@
1
+
2
+ export class CurrencyResponse {
3
+
4
+ currencyId: string;
5
+ iso: string;
6
+ name: string;
7
+ symbol: string;
8
+
9
+ }
@@ -0,0 +1,3 @@
1
+
2
+
3
+ export * from './dtos/CurrencyResponse';
@@ -0,0 +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 Directory {
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
+ }
@@ -0,0 +1,7 @@
1
+ import { Provider } from "../../provider/enums/Provider";
2
+
3
+
4
+ export type External = {
5
+ provider: Provider;
6
+ user: string;
7
+ };
@@ -0,0 +1,7 @@
1
+
2
+
3
+ export enum Profile {
4
+ HOST = "HOST",
5
+ GUEST = "GUEST",
6
+ GUEST_MINOR = "GUEST_MINOR"
7
+ }
@@ -0,0 +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"
8
+ }
@@ -0,0 +1,8 @@
1
+
2
+
3
+ export enum Status {
4
+ ACTIVE = "ACTIVE",
5
+ PAUSED = "PAUSED",
6
+ PROHIBITED = "PROHIBITED",
7
+ SIGN_UP = "SIGN_UP"
8
+ }
@@ -1,6 +1,7 @@
1
1
 
2
2
  //dtos
3
-
3
+ export * from './dtos/DirectoryResponse';
4
+ export * from './dtos/External';
4
5
 
5
6
 
6
7
  //enums
@@ -0,0 +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;
51
+ }
@@ -0,0 +1,5 @@
1
+ import { ExchangeRateResponse } from "./ExchangeRateResponse";
2
+
3
+ export class ExchangeRateCreateResponse extends ExchangeRateResponse {
4
+
5
+ }