@fiado/type-kit 1.0.59 → 1.0.60
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/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/AddressShippingCardResponse.ts +11 -11
- package/src/address/dtos/Geometry.ts +4 -4
- package/src/address/dtos/OfficeDetails.ts +30 -30
- package/src/address/dtos/OperationSchedule.ts +8 -8
- package/src/address/dtos/Place.ts +83 -83
- package/src/address/dtos/Shipping.ts +36 -36
- package/src/address/dtos/Timezone.ts +5 -5
- package/src/address/enums/AddressProvider.ts +10 -10
- package/src/address/enums/AddressStatus.ts +9 -9
- package/src/address/index.ts +15 -15
- package/src/app/enums/App.ts +10 -10
- package/src/app/index.ts +3 -3
- package/src/authentication/dtos/SignUpAdditionalRequest.ts +32 -32
- package/src/authentication/dtos/SignUpAdditionalResponse.ts +5 -5
- package/src/authentication/index.ts +3 -3
- package/src/card/dtos/CardActivateRequest.ts +12 -12
- package/src/card/dtos/CardApplicationRequest.ts +20 -20
- package/src/card/dtos/CardBalanceResponse.ts +10 -10
- package/src/card/dtos/CardCreateAdditionalRequest.ts +40 -40
- package/src/card/dtos/CardCreateRequest.ts +141 -141
- package/src/card/dtos/CardResponse.ts +4 -4
- package/src/card/dtos/CardShipmentQueueMessage.ts +7 -7
- package/src/card/dtos/CardShipmentUpdateRequest.ts +19 -19
- package/src/card/dtos/CardUpdateRequest.ts +13 -13
- package/src/card/enums/Brand.ts +7 -7
- package/src/card/enums/CardIssuanceStatus.ts +5 -5
- package/src/card/enums/CardType.ts +4 -4
- package/src/card/enums/CardUpdateKey.ts +4 -4
- package/src/card/enums/CreditOrDebit.ts +5 -5
- package/src/card/enums/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/pomelo/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
//dtos
|
|
3
|
-
export * from './dtos/PomeloCreateUserRequest'
|
|
4
|
-
export * from './dtos/PomeloCreateUserResponse';
|
|
5
|
-
|
|
6
|
-
//enums
|
|
7
|
-
export * from './enums/CountryEnum';
|
|
8
|
-
export * from './enums/IdentificationTypeEnum';
|
|
9
|
-
export * from './enums/SexEnum';
|
|
10
|
-
export * from './enums/TaxTypeEnum';
|
|
11
|
-
export * from './enums/UserStatusEnum';
|
|
1
|
+
|
|
2
|
+
//dtos
|
|
3
|
+
export * from './dtos/PomeloCreateUserRequest'
|
|
4
|
+
export * from './dtos/PomeloCreateUserResponse';
|
|
5
|
+
|
|
6
|
+
//enums
|
|
7
|
+
export * from './enums/CountryEnum';
|
|
8
|
+
export * from './enums/IdentificationTypeEnum';
|
|
9
|
+
export * from './enums/SexEnum';
|
|
10
|
+
export * from './enums/TaxTypeEnum';
|
|
11
|
+
export * from './enums/UserStatusEnum';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum Provider {
|
|
4
|
-
TERN = 'TERN',
|
|
5
|
-
POMELO = 'POMELO'
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum Provider {
|
|
4
|
+
TERN = 'TERN',
|
|
5
|
+
POMELO = 'POMELO'
|
|
6
6
|
}
|
package/src/provider/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
export * from './enums/Provider';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { IsEnum, IsString } from "class-validator";
|
|
2
|
-
import { Provider } from "../../provider";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export class QueueMessageBase<T> {
|
|
6
|
-
|
|
7
|
-
@IsEnum(Provider)
|
|
8
|
-
provider: string;
|
|
9
|
-
|
|
10
|
-
@IsString()
|
|
11
|
-
eventType: string;
|
|
12
|
-
|
|
13
|
-
message: T
|
|
1
|
+
import { IsEnum, IsString } from "class-validator";
|
|
2
|
+
import { Provider } from "../../provider";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class QueueMessageBase<T> {
|
|
6
|
+
|
|
7
|
+
@IsEnum(Provider)
|
|
8
|
+
provider: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
eventType: string;
|
|
12
|
+
|
|
13
|
+
message: T
|
|
14
14
|
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { IsNotEmpty, Length, Min } from 'class-validator';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export class ServicePaymentRequest {
|
|
7
|
-
|
|
8
|
-
@IsNotEmpty()
|
|
9
|
-
@Length(1, 50)
|
|
10
|
-
serviceId: string;
|
|
11
|
-
|
|
12
|
-
@IsNotEmpty()
|
|
13
|
-
@Length(1, 100)
|
|
14
|
-
directoryId: string;
|
|
15
|
-
|
|
16
|
-
@IsNotEmpty()
|
|
17
|
-
@Length(1, 100)
|
|
18
|
-
reference: string;
|
|
19
|
-
|
|
20
|
-
@IsNotEmpty()
|
|
21
|
-
@Length(1, 50)
|
|
22
|
-
productId: string;
|
|
23
|
-
|
|
24
|
-
@IsNotEmpty()
|
|
25
|
-
@Min(0.01)
|
|
26
|
-
amount: number;
|
|
27
|
-
|
|
28
|
-
@IsNotEmpty()
|
|
29
|
-
@Length(1, 50)
|
|
30
|
-
transactionNumber: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import { IsNotEmpty, Length, Min } from 'class-validator';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class ServicePaymentRequest {
|
|
7
|
+
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
@Length(1, 50)
|
|
10
|
+
serviceId: string;
|
|
11
|
+
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
@Length(1, 100)
|
|
14
|
+
directoryId: string;
|
|
15
|
+
|
|
16
|
+
@IsNotEmpty()
|
|
17
|
+
@Length(1, 100)
|
|
18
|
+
reference: string;
|
|
19
|
+
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
@Length(1, 50)
|
|
22
|
+
productId: string;
|
|
23
|
+
|
|
24
|
+
@IsNotEmpty()
|
|
25
|
+
@Min(0.01)
|
|
26
|
+
amount: number;
|
|
27
|
+
|
|
28
|
+
@IsNotEmpty()
|
|
29
|
+
@Length(1, 50)
|
|
30
|
+
transactionNumber: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {SessionActivityActionEnum} from "../enums/SessionActivityActionEnum";
|
|
2
|
-
import {SessionActivityActionOriginEnum} from "../enums/SessionActivityActionOriginEnum";
|
|
3
|
-
|
|
4
|
-
export class SessionActivityQueueMessageRequest {
|
|
5
|
-
id: string; // requestId de la peticion
|
|
6
|
-
sessionId: string; // Id de la sesion que realizo el request
|
|
7
|
-
operationName: string; // nombre de la operacion asociada al request
|
|
8
|
-
source: string; // Tabla|lambda|componente desde donde vino el mensaje
|
|
9
|
-
action: SessionActivityActionEnum; // Accion realizada
|
|
10
|
-
actionOrigin: SessionActivityActionOriginEnum; // Si la peticion fue realizada desde la APP o backoffice
|
|
1
|
+
import {SessionActivityActionEnum} from "../enums/SessionActivityActionEnum";
|
|
2
|
+
import {SessionActivityActionOriginEnum} from "../enums/SessionActivityActionOriginEnum";
|
|
3
|
+
|
|
4
|
+
export class SessionActivityQueueMessageRequest {
|
|
5
|
+
id: string; // requestId de la peticion
|
|
6
|
+
sessionId: string; // Id de la sesion que realizo el request
|
|
7
|
+
operationName: string; // nombre de la operacion asociada al request
|
|
8
|
+
source: string; // Tabla|lambda|componente desde donde vino el mensaje
|
|
9
|
+
action: SessionActivityActionEnum; // Accion realizada
|
|
10
|
+
actionOrigin: SessionActivityActionOriginEnum; // Si la peticion fue realizada desde la APP o backoffice
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export enum SessionActivityActionEnum {
|
|
2
|
-
"GET" = "GET",
|
|
3
|
-
"POST" = "POST",
|
|
4
|
-
"PUT" = "PUT",
|
|
5
|
-
"DELETE" = "DELETE",
|
|
6
|
-
"PATCH" = "PATCH",
|
|
7
|
-
"OPTIONS" = "OPTIONS"
|
|
1
|
+
export enum SessionActivityActionEnum {
|
|
2
|
+
"GET" = "GET",
|
|
3
|
+
"POST" = "POST",
|
|
4
|
+
"PUT" = "PUT",
|
|
5
|
+
"DELETE" = "DELETE",
|
|
6
|
+
"PATCH" = "PATCH",
|
|
7
|
+
"OPTIONS" = "OPTIONS"
|
|
8
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export enum SessionActivityActionOriginEnum {
|
|
2
|
-
MOBILE_APP = "USERS_APP",
|
|
3
|
-
BACKOFFICE = "BACKOFFICE",
|
|
4
|
-
UNKNOWN = "UNKNOWN"
|
|
1
|
+
export enum SessionActivityActionOriginEnum {
|
|
2
|
+
MOBILE_APP = "USERS_APP",
|
|
3
|
+
BACKOFFICE = "BACKOFFICE",
|
|
4
|
+
UNKNOWN = "UNKNOWN"
|
|
5
5
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './dtos/SessionActivityQueueMessageRequest';
|
|
2
|
-
export * from './enums/SessionActivityActionEnum';
|
|
1
|
+
export * from './dtos/SessionActivityQueueMessageRequest';
|
|
2
|
+
export * from './enums/SessionActivityActionEnum';
|
|
3
3
|
export * from './enums/SessionActivityActionOriginEnum';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {IsString} from "class-validator";
|
|
2
|
-
|
|
3
|
-
export class TernAddress {
|
|
4
|
-
@IsString()
|
|
5
|
-
address1?: string;
|
|
6
|
-
|
|
7
|
-
@IsString()
|
|
8
|
-
address2?: string;
|
|
9
|
-
|
|
10
|
-
@IsString()
|
|
11
|
-
city?: string;
|
|
12
|
-
|
|
13
|
-
@IsString()
|
|
14
|
-
province?: string;
|
|
15
|
-
|
|
16
|
-
@IsString()
|
|
17
|
-
postalCode?: string;
|
|
18
|
-
|
|
19
|
-
@IsString()
|
|
20
|
-
country?: string;
|
|
1
|
+
import {IsString} from "class-validator";
|
|
2
|
+
|
|
3
|
+
export class TernAddress {
|
|
4
|
+
@IsString()
|
|
5
|
+
address1?: string;
|
|
6
|
+
|
|
7
|
+
@IsString()
|
|
8
|
+
address2?: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
city?: string;
|
|
12
|
+
|
|
13
|
+
@IsString()
|
|
14
|
+
province?: string;
|
|
15
|
+
|
|
16
|
+
@IsString()
|
|
17
|
+
postalCode?: string;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
country?: string;
|
|
21
21
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
-
import {IsEnum, IsString} from "class-validator";
|
|
3
|
-
|
|
4
|
-
export class TernCreateAccountRequest {
|
|
5
|
-
@IsString()
|
|
6
|
-
externalUserId?: string;
|
|
7
|
-
|
|
8
|
-
@IsString()
|
|
9
|
-
name: string;
|
|
10
|
-
|
|
11
|
-
@IsString()
|
|
12
|
-
lastName: string;
|
|
13
|
-
|
|
14
|
-
@IsEnum(TernAccountTypeEnum)
|
|
15
|
-
type: TernAccountTypeEnum;
|
|
1
|
+
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
+
import {IsEnum, IsString} from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class TernCreateAccountRequest {
|
|
5
|
+
@IsString()
|
|
6
|
+
externalUserId?: string;
|
|
7
|
+
|
|
8
|
+
@IsString()
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
@IsString()
|
|
12
|
+
lastName: string;
|
|
13
|
+
|
|
14
|
+
@IsEnum(TernAccountTypeEnum)
|
|
15
|
+
type: TernAccountTypeEnum;
|
|
16
16
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {Provider} from "../../provider";
|
|
2
|
-
import {IsEnum, IsString} from "class-validator";
|
|
3
|
-
|
|
4
|
-
export class TernCreateAccountResponse {
|
|
5
|
-
@IsString()
|
|
6
|
-
externalAccountId: string;
|
|
7
|
-
|
|
8
|
-
@IsEnum(Provider)
|
|
9
|
-
provider: Provider;
|
|
1
|
+
import {Provider} from "../../provider";
|
|
2
|
+
import {IsEnum, IsString} from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class TernCreateAccountResponse {
|
|
5
|
+
@IsString()
|
|
6
|
+
externalAccountId: string;
|
|
7
|
+
|
|
8
|
+
@IsEnum(Provider)
|
|
9
|
+
provider: Provider;
|
|
10
10
|
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import {SexDocument} from "../../identity";
|
|
2
|
-
import {IsDateString, IsEmail, IsEnum, IsString, Length, Matches, ValidateNested} from "class-validator";
|
|
3
|
-
import {regexUuidV4} from "../../helpers/constans/regex";
|
|
4
|
-
import {TypeOfDirectoryId} from "../../directory";
|
|
5
|
-
import {IsPhoneNumberFiado} from "../../card/validations/IsPhoneNumberConstraint";
|
|
6
|
-
import {AddressResponse} from "../../address";
|
|
7
|
-
|
|
8
|
-
export class TernCreateUserRequest {
|
|
9
|
-
@IsString()
|
|
10
|
-
@Matches(regexUuidV4,
|
|
11
|
-
{
|
|
12
|
-
message: 'directoryId must be a valid UUID v4',
|
|
13
|
-
})
|
|
14
|
-
directoryId: string;
|
|
15
|
-
|
|
16
|
-
@IsEnum(TypeOfDirectoryId)
|
|
17
|
-
typeOfDirectoryId: string;
|
|
18
|
-
|
|
19
|
-
@IsString()
|
|
20
|
-
firstName: string;
|
|
21
|
-
|
|
22
|
-
@IsString()
|
|
23
|
-
lastName: string;
|
|
24
|
-
|
|
25
|
-
@IsPhoneNumberFiado()
|
|
26
|
-
phoneNumber: string;
|
|
27
|
-
|
|
28
|
-
@ValidateNested()
|
|
29
|
-
address: AddressResponse;
|
|
30
|
-
|
|
31
|
-
@IsEmail()
|
|
32
|
-
email: string;
|
|
33
|
-
|
|
34
|
-
@IsDateString()
|
|
35
|
-
dob: string;
|
|
36
|
-
|
|
37
|
-
@IsString()
|
|
38
|
-
@Length(1, 30)
|
|
39
|
-
documentNumber: string;
|
|
40
|
-
|
|
41
|
-
@IsString()
|
|
42
|
-
@Length(1, 30)
|
|
43
|
-
documentType?: string;
|
|
44
|
-
|
|
45
|
-
@IsEnum(SexDocument)
|
|
46
|
-
gender?: SexDocument;
|
|
1
|
+
import {SexDocument} from "../../identity";
|
|
2
|
+
import {IsDateString, IsEmail, IsEnum, IsString, Length, Matches, ValidateNested} from "class-validator";
|
|
3
|
+
import {regexUuidV4} from "../../helpers/constans/regex";
|
|
4
|
+
import {TypeOfDirectoryId} from "../../directory";
|
|
5
|
+
import {IsPhoneNumberFiado} from "../../card/validations/IsPhoneNumberConstraint";
|
|
6
|
+
import {AddressResponse} from "../../address";
|
|
7
|
+
|
|
8
|
+
export class TernCreateUserRequest {
|
|
9
|
+
@IsString()
|
|
10
|
+
@Matches(regexUuidV4,
|
|
11
|
+
{
|
|
12
|
+
message: 'directoryId must be a valid UUID v4',
|
|
13
|
+
})
|
|
14
|
+
directoryId: string;
|
|
15
|
+
|
|
16
|
+
@IsEnum(TypeOfDirectoryId)
|
|
17
|
+
typeOfDirectoryId: string;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
firstName: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
lastName: string;
|
|
24
|
+
|
|
25
|
+
@IsPhoneNumberFiado()
|
|
26
|
+
phoneNumber: string;
|
|
27
|
+
|
|
28
|
+
@ValidateNested()
|
|
29
|
+
address: AddressResponse;
|
|
30
|
+
|
|
31
|
+
@IsEmail()
|
|
32
|
+
email: string;
|
|
33
|
+
|
|
34
|
+
@IsDateString()
|
|
35
|
+
dob: string;
|
|
36
|
+
|
|
37
|
+
@IsString()
|
|
38
|
+
@Length(1, 30)
|
|
39
|
+
documentNumber: string;
|
|
40
|
+
|
|
41
|
+
@IsString()
|
|
42
|
+
@Length(1, 30)
|
|
43
|
+
documentType?: string;
|
|
44
|
+
|
|
45
|
+
@IsEnum(SexDocument)
|
|
46
|
+
gender?: SexDocument;
|
|
47
47
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {Provider} from "../../provider";
|
|
2
|
-
import {IsEnum, IsString} from "class-validator";
|
|
3
|
-
|
|
4
|
-
export class TernCreateUserResponse {
|
|
5
|
-
@IsString()
|
|
6
|
-
externalUserId: string;
|
|
7
|
-
|
|
8
|
-
@IsString()
|
|
9
|
-
externalAccountId?: string;
|
|
10
|
-
|
|
11
|
-
@IsEnum(Provider)
|
|
12
|
-
provider: Provider;
|
|
13
|
-
|
|
14
|
-
@IsString()
|
|
15
|
-
accountNumber?: string;
|
|
16
|
-
|
|
17
|
-
@IsString()
|
|
18
|
-
routingNumber?: string;
|
|
1
|
+
import {Provider} from "../../provider";
|
|
2
|
+
import {IsEnum, IsString} from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class TernCreateUserResponse {
|
|
5
|
+
@IsString()
|
|
6
|
+
externalUserId: string;
|
|
7
|
+
|
|
8
|
+
@IsString()
|
|
9
|
+
externalAccountId?: string;
|
|
10
|
+
|
|
11
|
+
@IsEnum(Provider)
|
|
12
|
+
provider: Provider;
|
|
13
|
+
|
|
14
|
+
@IsString()
|
|
15
|
+
accountNumber?: string;
|
|
16
|
+
|
|
17
|
+
@IsString()
|
|
18
|
+
routingNumber?: string;
|
|
19
19
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
-
import {IsEnum, IsString} from "class-validator";
|
|
3
|
-
|
|
4
|
-
export class TernGetAccountRequest {
|
|
5
|
-
@IsString()
|
|
6
|
-
externalAccountId: string;
|
|
7
|
-
|
|
8
|
-
@IsEnum(TernAccountTypeEnum)
|
|
9
|
-
accountType?: TernAccountTypeEnum;
|
|
1
|
+
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
+
import {IsEnum, IsString} from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class TernGetAccountRequest {
|
|
5
|
+
@IsString()
|
|
6
|
+
externalAccountId: string;
|
|
7
|
+
|
|
8
|
+
@IsEnum(TernAccountTypeEnum)
|
|
9
|
+
accountType?: TernAccountTypeEnum;
|
|
10
10
|
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
-
import {TernAddress} from "./TernAddress";
|
|
3
|
-
import {TernAccountStatusEnum} from "../enums/TernAccountStatusEnum";
|
|
4
|
-
import {IsBoolean, IsEnum, IsNumber,
|
|
5
|
-
|
|
6
|
-
export class TernGetAccountResponse {
|
|
7
|
-
@IsString()
|
|
8
|
-
id: string;
|
|
9
|
-
|
|
10
|
-
@IsString()
|
|
11
|
-
businessId: string;
|
|
12
|
-
|
|
13
|
-
@IsString()
|
|
14
|
-
userId: string;
|
|
15
|
-
|
|
16
|
-
@IsString()
|
|
17
|
-
name: string;
|
|
18
|
-
|
|
19
|
-
@IsString()
|
|
20
|
-
accountNumber: string;
|
|
21
|
-
|
|
22
|
-
@IsString()
|
|
23
|
-
routingNumber: string;
|
|
24
|
-
|
|
25
|
-
@IsEnum(TernAccountTypeEnum)
|
|
26
|
-
accountType: TernAccountTypeEnum;
|
|
27
|
-
|
|
28
|
-
@IsBoolean()
|
|
29
|
-
active: boolean;
|
|
30
|
-
|
|
31
|
-
@IsBoolean()
|
|
32
|
-
isPrimary: boolean;
|
|
33
|
-
|
|
34
|
-
@IsString()
|
|
35
|
-
createdDate: string;
|
|
36
|
-
|
|
37
|
-
@IsString()
|
|
38
|
-
updatedDate: string;
|
|
39
|
-
|
|
40
|
-
@IsString()
|
|
41
|
-
deletedDate: string;
|
|
42
|
-
|
|
43
|
-
@IsString()
|
|
44
|
-
updatedBy: string;
|
|
45
|
-
|
|
46
|
-
@IsNumber()
|
|
47
|
-
balance: number;
|
|
48
|
-
|
|
49
|
-
@ValidateNested()
|
|
50
|
-
address?: TernAddress;
|
|
51
|
-
|
|
52
|
-
@IsString()
|
|
53
|
-
kybStatus?: string;
|
|
54
|
-
|
|
55
|
-
@IsEnum(TernAccountStatusEnum)
|
|
56
|
-
statusName?: TernAccountStatusEnum;
|
|
1
|
+
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
+
import {TernAddress} from "./TernAddress";
|
|
3
|
+
import {TernAccountStatusEnum} from "../enums/TernAccountStatusEnum";
|
|
4
|
+
import {IsBoolean, IsEnum, IsNumber, IsString, ValidateNested} from "class-validator";
|
|
5
|
+
|
|
6
|
+
export class TernGetAccountResponse {
|
|
7
|
+
@IsString()
|
|
8
|
+
id: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
businessId: string;
|
|
12
|
+
|
|
13
|
+
@IsString()
|
|
14
|
+
userId: string;
|
|
15
|
+
|
|
16
|
+
@IsString()
|
|
17
|
+
name: string;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
accountNumber: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
routingNumber: string;
|
|
24
|
+
|
|
25
|
+
@IsEnum(TernAccountTypeEnum)
|
|
26
|
+
accountType: TernAccountTypeEnum;
|
|
27
|
+
|
|
28
|
+
@IsBoolean()
|
|
29
|
+
active: boolean;
|
|
30
|
+
|
|
31
|
+
@IsBoolean()
|
|
32
|
+
isPrimary: boolean;
|
|
33
|
+
|
|
34
|
+
@IsString()
|
|
35
|
+
createdDate: string;
|
|
36
|
+
|
|
37
|
+
@IsString()
|
|
38
|
+
updatedDate: string;
|
|
39
|
+
|
|
40
|
+
@IsString()
|
|
41
|
+
deletedDate: string;
|
|
42
|
+
|
|
43
|
+
@IsString()
|
|
44
|
+
updatedBy: string;
|
|
45
|
+
|
|
46
|
+
@IsNumber()
|
|
47
|
+
balance: number;
|
|
48
|
+
|
|
49
|
+
@ValidateNested()
|
|
50
|
+
address?: TernAddress;
|
|
51
|
+
|
|
52
|
+
@IsString()
|
|
53
|
+
kybStatus?: string;
|
|
54
|
+
|
|
55
|
+
@IsEnum(TernAccountStatusEnum)
|
|
56
|
+
statusName?: TernAccountStatusEnum;
|
|
57
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {IsString} from "class-validator";
|
|
2
|
-
|
|
3
|
-
export class TernGetUserRequest {
|
|
4
|
-
@IsString()
|
|
5
|
-
externalUserId: string;
|
|
1
|
+
import {IsString} from "class-validator";
|
|
2
|
+
|
|
3
|
+
export class TernGetUserRequest {
|
|
4
|
+
@IsString()
|
|
5
|
+
externalUserId: string;
|
|
6
6
|
}
|