@fiado/type-kit 2.1.46 → 2.1.48
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/bin/card/validations/CardUpdateKeyConstraint.js +2 -2
- package/bin/card/validations/IsPhoneNumberConstraint.js +2 -2
- package/bin/credit/dtos/CreditBannerStateResponse.d.ts +10 -0
- package/bin/credit/dtos/CreditBannerStateResponse.js +6 -0
- package/bin/credit/dtos/CreditDetailResponse.d.ts +23 -0
- package/bin/credit/dtos/CreditDetailResponse.js +6 -0
- package/bin/credit/dtos/CreditEligibilityResponse.d.ts +9 -0
- package/bin/credit/dtos/CreditEligibilityResponse.js +6 -0
- package/bin/credit/dtos/CreditMovementResponse.d.ts +20 -0
- package/bin/credit/dtos/CreditMovementResponse.js +9 -0
- package/bin/credit/dtos/CreditOfferConfigureRequest.d.ts +6 -0
- package/bin/credit/dtos/CreditOfferConfigureRequest.js +36 -0
- package/bin/credit/dtos/CreditOfferConfigureResponse.d.ts +24 -0
- package/bin/credit/dtos/CreditOfferConfigureResponse.js +9 -0
- package/bin/credit/dtos/CreditRequestCreate.d.ts +4 -0
- package/bin/credit/dtos/CreditRequestCreate.js +26 -0
- package/bin/credit/dtos/CreditRequestResponse.d.ts +7 -0
- package/bin/credit/dtos/CreditRequestResponse.js +6 -0
- package/bin/credit/dtos/CreditScheduleResponse.d.ts +18 -0
- package/bin/credit/dtos/CreditScheduleResponse.js +9 -0
- package/bin/credit/dtos/CreditStatementResponse.d.ts +11 -0
- package/bin/credit/dtos/CreditStatementResponse.js +9 -0
- package/bin/credit/dtos/EarlyPaymentRequest.d.ts +7 -0
- package/bin/credit/dtos/EarlyPaymentRequest.js +37 -0
- package/bin/credit/dtos/EarlyPaymentResponse.d.ts +11 -0
- package/bin/credit/dtos/EarlyPaymentResponse.js +6 -0
- package/bin/credit/dtos/internal/CreditBalanceRequest.d.ts +3 -0
- package/bin/credit/dtos/internal/CreditBalanceRequest.js +21 -0
- package/bin/credit/dtos/internal/CreditBalanceResponse.d.ts +10 -0
- package/bin/credit/dtos/internal/CreditBalanceResponse.js +6 -0
- package/bin/credit/dtos/internal/CreditCollectionRequest.d.ts +11 -0
- package/bin/credit/dtos/internal/CreditCollectionRequest.js +59 -0
- package/bin/credit/dtos/internal/CreditCollectionResponse.d.ts +12 -0
- package/bin/credit/dtos/internal/CreditCollectionResponse.js +6 -0
- package/bin/credit/dtos/internal/CreditDisbursementRequest.d.ts +7 -0
- package/bin/credit/dtos/internal/CreditDisbursementRequest.js +43 -0
- package/bin/credit/dtos/internal/CreditDisbursementResponse.d.ts +8 -0
- package/bin/credit/dtos/internal/CreditDisbursementResponse.js +6 -0
- package/bin/credit/dtos/internal/CreditProfileRequest.d.ts +3 -0
- package/bin/credit/dtos/internal/CreditProfileRequest.js +23 -0
- package/bin/credit/dtos/internal/CreditProfileResponse.d.ts +13 -0
- package/bin/credit/dtos/internal/CreditProfileResponse.js +6 -0
- package/bin/credit/dtos/internal/CreditQueueMessage.d.ts +9 -0
- package/bin/credit/dtos/internal/CreditQueueMessage.js +6 -0
- package/bin/credit/dtos/internal/CreditReversalRequest.d.ts +5 -0
- package/bin/credit/dtos/internal/CreditReversalRequest.js +31 -0
- package/bin/credit/dtos/internal/CreditReversalResponse.d.ts +7 -0
- package/bin/credit/dtos/internal/CreditReversalResponse.js +6 -0
- package/bin/credit/dtos/internal/CreditTransferLoancoRequest.d.ts +8 -0
- package/bin/credit/dtos/internal/CreditTransferLoancoRequest.js +46 -0
- package/bin/credit/dtos/internal/CreditTransferLoancoResponse.d.ts +8 -0
- package/bin/credit/dtos/internal/CreditTransferLoancoResponse.js +6 -0
- package/bin/credit/dtos/internal/DocumentGenerateRequest.d.ts +10 -0
- package/bin/credit/dtos/internal/DocumentGenerateRequest.js +53 -0
- package/bin/credit/dtos/internal/DocumentGenerateResponse.d.ts +12 -0
- package/bin/credit/dtos/internal/DocumentGenerateResponse.js +6 -0
- package/bin/credit/dtos/internal/DocumentSignRequest.d.ts +3 -0
- package/bin/credit/dtos/internal/DocumentSignRequest.js +21 -0
- package/bin/credit/dtos/internal/LienApplyRequest.d.ts +7 -0
- package/bin/credit/dtos/internal/LienApplyRequest.js +45 -0
- package/bin/credit/dtos/internal/LienStatusResponse.d.ts +9 -0
- package/bin/credit/dtos/internal/LienStatusResponse.js +6 -0
- package/bin/credit/enums/CollectionFrequencyEnum.d.ts +5 -0
- package/bin/credit/enums/CollectionFrequencyEnum.js +9 -0
- package/bin/credit/enums/CreditOperationEnum.d.ts +11 -0
- package/bin/credit/enums/CreditOperationEnum.js +15 -0
- package/bin/credit/enums/CreditStatusEnum.d.ts +12 -0
- package/bin/credit/enums/CreditStatusEnum.js +16 -0
- package/bin/credit/enums/DelinquencyLevelEnum.d.ts +9 -0
- package/bin/credit/enums/DelinquencyLevelEnum.js +13 -0
- package/bin/credit/enums/DocumentTypeEnum.d.ts +8 -0
- package/bin/credit/enums/DocumentTypeEnum.js +12 -0
- package/bin/credit/enums/OfferStatusEnum.d.ts +8 -0
- package/bin/credit/enums/OfferStatusEnum.js +12 -0
- package/bin/credit/enums/PaymentTypeEnum.d.ts +9 -0
- package/bin/credit/enums/PaymentTypeEnum.js +13 -0
- package/bin/credit/enums/ReconciliationStatusEnum.d.ts +6 -0
- package/bin/credit/enums/ReconciliationStatusEnum.js +10 -0
- package/bin/credit/enums/TransferStatusEnum.d.ts +8 -0
- package/bin/credit/enums/TransferStatusEnum.js +12 -0
- package/bin/credit/index.d.ts +39 -0
- package/bin/credit/index.js +58 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +19 -8
- package/bin/zendeskMessaging/dtos/SendProactiveMessageRequest.d.ts +5 -0
- package/bin/zendeskMessaging/dtos/SendProactiveMessageRequest.js +31 -0
- package/bin/zendeskMessaging/dtos/SunshineCreateConversationRequest.d.ts +10 -0
- package/bin/zendeskMessaging/dtos/SunshineCreateConversationRequest.js +46 -0
- package/bin/zendeskMessaging/dtos/SunshineCreateUserRequest.d.ts +10 -0
- package/bin/zendeskMessaging/dtos/SunshineCreateUserRequest.js +45 -0
- package/bin/zendeskMessaging/dtos/SunshinePostMessageRequest.d.ts +15 -0
- package/bin/zendeskMessaging/dtos/SunshinePostMessageRequest.js +65 -0
- package/bin/zendeskMessaging/index.d.ts +6 -0
- package/bin/zendeskMessaging/index.js +9 -0
- package/bin/zendeskMessaging/interfaces/IProactiveMessagingEnums.d.ts +9 -0
- package/bin/zendeskMessaging/interfaces/IProactiveMessagingEnums.js +13 -0
- package/bin/zendeskMessaging/interfaces/ISunshineConversations.d.ts +7 -3
- package/bin/zendeskMessaging/interfaces/ISunshineProactiveResponses.d.ts +38 -0
- package/bin/zendeskMessaging/interfaces/ISunshineProactiveResponses.js +2 -0
- package/package.json +1 -1
- package/src/credit/dtos/CreditBannerStateResponse.ts +11 -0
- package/src/credit/dtos/CreditDetailResponse.ts +24 -0
- package/src/credit/dtos/CreditEligibilityResponse.ts +10 -0
- package/src/credit/dtos/CreditMovementResponse.ts +22 -0
- package/src/credit/dtos/CreditOfferConfigureRequest.ts +21 -0
- package/src/credit/dtos/CreditOfferConfigureResponse.ts +26 -0
- package/src/credit/dtos/CreditRequestCreate.ts +12 -0
- package/src/credit/dtos/CreditRequestResponse.ts +8 -0
- package/src/credit/dtos/CreditScheduleResponse.ts +19 -0
- package/src/credit/dtos/CreditStatementResponse.ts +12 -0
- package/src/credit/dtos/EarlyPaymentRequest.ts +21 -0
- package/src/credit/dtos/EarlyPaymentResponse.ts +12 -0
- package/src/credit/dtos/internal/CreditBalanceRequest.ts +8 -0
- package/src/credit/dtos/internal/CreditBalanceResponse.ts +10 -0
- package/src/credit/dtos/internal/CreditCollectionRequest.ts +39 -0
- package/src/credit/dtos/internal/CreditCollectionResponse.ts +12 -0
- package/src/credit/dtos/internal/CreditDisbursementRequest.ts +26 -0
- package/src/credit/dtos/internal/CreditDisbursementResponse.ts +8 -0
- package/src/credit/dtos/internal/CreditProfileRequest.ts +10 -0
- package/src/credit/dtos/internal/CreditProfileResponse.ts +14 -0
- package/src/credit/dtos/internal/CreditQueueMessage.ts +20 -0
- package/src/credit/dtos/internal/CreditReversalRequest.ts +16 -0
- package/src/credit/dtos/internal/CreditReversalResponse.ts +7 -0
- package/src/credit/dtos/internal/CreditTransferLoancoRequest.ts +28 -0
- package/src/credit/dtos/internal/CreditTransferLoancoResponse.ts +9 -0
- package/src/credit/dtos/internal/DocumentGenerateRequest.ts +34 -0
- package/src/credit/dtos/internal/DocumentGenerateResponse.ts +12 -0
- package/src/credit/dtos/internal/DocumentSignRequest.ts +8 -0
- package/src/credit/dtos/internal/LienApplyRequest.ts +28 -0
- package/src/credit/dtos/internal/LienStatusResponse.ts +9 -0
- package/src/credit/enums/CollectionFrequencyEnum.ts +5 -0
- package/src/credit/enums/CreditOperationEnum.ts +11 -0
- package/src/credit/enums/CreditStatusEnum.ts +12 -0
- package/src/credit/enums/DelinquencyLevelEnum.ts +9 -0
- package/src/credit/enums/DocumentTypeEnum.ts +8 -0
- package/src/credit/enums/OfferStatusEnum.ts +8 -0
- package/src/credit/enums/PaymentTypeEnum.ts +9 -0
- package/src/credit/enums/ReconciliationStatusEnum.ts +6 -0
- package/src/credit/enums/TransferStatusEnum.ts +8 -0
- package/src/credit/index.ts +44 -0
- package/src/index.ts +1 -0
- package/src/zendeskMessaging/dtos/SendProactiveMessageRequest.ts +15 -0
- package/src/zendeskMessaging/dtos/SunshineCreateConversationRequest.ts +28 -0
- package/src/zendeskMessaging/dtos/SunshineCreateUserRequest.ts +27 -0
- package/src/zendeskMessaging/dtos/SunshinePostMessageRequest.ts +44 -0
- package/src/zendeskMessaging/index.ts +11 -0
- package/src/zendeskMessaging/interfaces/IProactiveMessagingEnums.ts +9 -0
- package/src/zendeskMessaging/interfaces/ISunshineConversations.ts +8 -1
- package/src/zendeskMessaging/interfaces/ISunshineProactiveResponses.ts +47 -0
- package/bin/bankAccount/dtos/ExternalAccountType.d.ts +0 -4
- package/bin/bankAccount/dtos/ExternalAccountType.js +0 -6
- package/bin/centralPayments/dtos/CentralPaymentsDocumentImages.d.ts +0 -6
- package/bin/centralPayments/dtos/CentralPaymentsDocumentImages.js +0 -6
- package/bin/centralPayments/dtos/CentralPaymentsDocumentUploadRequest.d.ts +0 -6
- package/bin/centralPayments/dtos/CentralPaymentsDocumentUploadRequest.js +0 -6
- package/bin/directorySetting/dtos/DirectorySettingCreateResponse.d.ts +0 -0
- package/bin/directorySetting/dtos/DirectorySettingCreateResponse.js +0 -0
- package/bin/pricelist/dtos/GetPriceListDirectoriesResponse.d.ts +0 -28
- package/bin/pricelist/dtos/GetPriceListDirectoriesResponse.js +0 -6
- package/bin/services/dtos/GetMembershipListAppResponse.d.ts +0 -4
- package/bin/services/dtos/GetMembershipListAppResponse.js +0 -6
- package/bin/services/dtos/GetServiceMembershipListAResponse.d.ts +0 -4
- package/bin/services/dtos/GetServiceMembershipListAResponse.js +0 -6
- package/bin/services/enums/ServiceProviderEnum.d.ts +0 -5
- package/bin/services/enums/ServiceProviderEnum.js +0 -9
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString } from "class-validator";
|
|
2
|
+
import { PaymentTypeEnum } from "../enums/PaymentTypeEnum";
|
|
3
|
+
|
|
4
|
+
export class EarlyPaymentRequest {
|
|
5
|
+
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
creditId: string;
|
|
9
|
+
|
|
10
|
+
@IsEnum(PaymentTypeEnum)
|
|
11
|
+
@IsNotEmpty()
|
|
12
|
+
type: PaymentTypeEnum;
|
|
13
|
+
|
|
14
|
+
@IsNumber()
|
|
15
|
+
@IsOptional()
|
|
16
|
+
amount?: number;
|
|
17
|
+
|
|
18
|
+
@IsNumber()
|
|
19
|
+
@IsOptional()
|
|
20
|
+
numberOfCoupons?: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PaymentTypeEnum } from "../enums/PaymentTypeEnum";
|
|
2
|
+
|
|
3
|
+
export class EarlyPaymentResponse {
|
|
4
|
+
creditId: string;
|
|
5
|
+
type: PaymentTypeEnum;
|
|
6
|
+
amountCharged: number;
|
|
7
|
+
principalPaid: number;
|
|
8
|
+
interestSaved: number;
|
|
9
|
+
newBalance: number;
|
|
10
|
+
newMaturityDate: string | null;
|
|
11
|
+
transactionId: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString, Matches } from "class-validator";
|
|
2
|
+
import { regexUuidV4 } from "../../../helpers/constans/regex";
|
|
3
|
+
import { PaymentTypeEnum } from "../../enums/PaymentTypeEnum";
|
|
4
|
+
|
|
5
|
+
export class CreditCollectionRequest {
|
|
6
|
+
|
|
7
|
+
@IsString()
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
creditId: string;
|
|
10
|
+
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
@Matches(regexUuidV4, { message: 'directoryId must be a valid UUID v4' })
|
|
14
|
+
directoryId: string;
|
|
15
|
+
|
|
16
|
+
@IsNumber()
|
|
17
|
+
@IsNotEmpty()
|
|
18
|
+
amount: number;
|
|
19
|
+
|
|
20
|
+
@IsNumber()
|
|
21
|
+
@IsNotEmpty()
|
|
22
|
+
couponNumber: number;
|
|
23
|
+
|
|
24
|
+
@IsEnum(PaymentTypeEnum)
|
|
25
|
+
@IsNotEmpty()
|
|
26
|
+
paymentType: PaymentTypeEnum;
|
|
27
|
+
|
|
28
|
+
@IsString()
|
|
29
|
+
@IsNotEmpty()
|
|
30
|
+
pagoConfiadoAccountId: string;
|
|
31
|
+
|
|
32
|
+
@IsString()
|
|
33
|
+
@IsNotEmpty()
|
|
34
|
+
fiadoIncAccountId: string;
|
|
35
|
+
|
|
36
|
+
@IsString()
|
|
37
|
+
@IsOptional()
|
|
38
|
+
idempotencyKey?: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class CreditCollectionResponse {
|
|
2
|
+
creditId: string;
|
|
3
|
+
transactionId: string;
|
|
4
|
+
idempotencyKey: string;
|
|
5
|
+
amountCollected: number;
|
|
6
|
+
principal: number;
|
|
7
|
+
interest: number;
|
|
8
|
+
iva: number;
|
|
9
|
+
newBalance: number;
|
|
10
|
+
status: 'COMPLETED' | 'FAILED' | 'INSUFFICIENT_FUNDS';
|
|
11
|
+
timestamp: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IsNotEmpty, IsNumber, IsString, Matches } from "class-validator";
|
|
2
|
+
import { regexUuidV4 } from "../../../helpers/constans/regex";
|
|
3
|
+
|
|
4
|
+
export class CreditDisbursementRequest {
|
|
5
|
+
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
creditId: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
@IsNotEmpty()
|
|
12
|
+
@Matches(regexUuidV4, { message: 'directoryId must be a valid UUID v4' })
|
|
13
|
+
directoryId: string;
|
|
14
|
+
|
|
15
|
+
@IsNumber()
|
|
16
|
+
@IsNotEmpty()
|
|
17
|
+
amount: number;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
pagoConfiadoAccountId: string;
|
|
22
|
+
|
|
23
|
+
@IsString()
|
|
24
|
+
@IsNotEmpty()
|
|
25
|
+
fiadoIncAccountId: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IsNotEmpty, IsString, Matches } from "class-validator";
|
|
2
|
+
import { regexUuidV4 } from "../../../helpers/constans/regex";
|
|
3
|
+
|
|
4
|
+
export class CreditProfileRequest {
|
|
5
|
+
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
@Matches(regexUuidV4, { message: 'directoryId must be a valid UUID v4' })
|
|
9
|
+
directoryId: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CreditStatusEnum } from "../../enums/CreditStatusEnum";
|
|
2
|
+
import { OfferStatusEnum } from "../../enums/OfferStatusEnum";
|
|
3
|
+
|
|
4
|
+
export class CreditProfileResponse {
|
|
5
|
+
directoryId: string;
|
|
6
|
+
hasActiveCredit: boolean;
|
|
7
|
+
creditId: string | null;
|
|
8
|
+
creditStatus: CreditStatusEnum | null;
|
|
9
|
+
offerStatus: OfferStatusEnum | null;
|
|
10
|
+
currentBalance: number | null;
|
|
11
|
+
overdueAmount: number | null;
|
|
12
|
+
financialScore: number | null;
|
|
13
|
+
lastUpdated: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type CreditQueueMessageType =
|
|
2
|
+
| 'INCOME_DETECTION'
|
|
3
|
+
| 'SCORING'
|
|
4
|
+
| 'OFFER_GENERATION'
|
|
5
|
+
| 'COLLECTION'
|
|
6
|
+
| 'DELINQUENCY'
|
|
7
|
+
| 'TRANSFER'
|
|
8
|
+
| 'NOTIFICATION'
|
|
9
|
+
| 'STATEMENT'
|
|
10
|
+
| 'RECONCILIATION'
|
|
11
|
+
| 'LIEN_COLLECTION';
|
|
12
|
+
|
|
13
|
+
export class CreditQueueMessage {
|
|
14
|
+
type: CreditQueueMessageType;
|
|
15
|
+
directoryId: string;
|
|
16
|
+
creditId: string | null;
|
|
17
|
+
payload: Record<string, any>;
|
|
18
|
+
timestamp: string;
|
|
19
|
+
correlationId: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IsNotEmpty, IsString } from "class-validator";
|
|
2
|
+
|
|
3
|
+
export class CreditReversalRequest {
|
|
4
|
+
|
|
5
|
+
@IsString()
|
|
6
|
+
@IsNotEmpty()
|
|
7
|
+
originalTransactionId: string;
|
|
8
|
+
|
|
9
|
+
@IsString()
|
|
10
|
+
@IsNotEmpty()
|
|
11
|
+
creditId: string;
|
|
12
|
+
|
|
13
|
+
@IsString()
|
|
14
|
+
@IsNotEmpty()
|
|
15
|
+
reason: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IsNotEmpty, IsNumber, IsString } from "class-validator";
|
|
2
|
+
|
|
3
|
+
export class CreditTransferLoancoRequest {
|
|
4
|
+
|
|
5
|
+
@IsString()
|
|
6
|
+
@IsNotEmpty()
|
|
7
|
+
transferId: string;
|
|
8
|
+
|
|
9
|
+
@IsString()
|
|
10
|
+
@IsNotEmpty()
|
|
11
|
+
creditId: string;
|
|
12
|
+
|
|
13
|
+
@IsNumber()
|
|
14
|
+
@IsNotEmpty()
|
|
15
|
+
amount: number;
|
|
16
|
+
|
|
17
|
+
@IsString()
|
|
18
|
+
@IsNotEmpty()
|
|
19
|
+
fiadoIncAccountId: string;
|
|
20
|
+
|
|
21
|
+
@IsString()
|
|
22
|
+
@IsNotEmpty()
|
|
23
|
+
loancoAccountId: string;
|
|
24
|
+
|
|
25
|
+
@IsString()
|
|
26
|
+
@IsNotEmpty()
|
|
27
|
+
concept: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IsBoolean, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString, Matches } from "class-validator";
|
|
2
|
+
import { regexUuidV4 } from "../../../helpers/constans/regex";
|
|
3
|
+
import { DocumentTypeEnum } from "../../enums/DocumentTypeEnum";
|
|
4
|
+
|
|
5
|
+
export class DocumentGenerateRequest {
|
|
6
|
+
|
|
7
|
+
@IsString()
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
templateId: string;
|
|
10
|
+
|
|
11
|
+
@IsEnum(DocumentTypeEnum)
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
referenceType: DocumentTypeEnum;
|
|
14
|
+
|
|
15
|
+
@IsString()
|
|
16
|
+
@IsNotEmpty()
|
|
17
|
+
referenceId: string;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
@Matches(regexUuidV4, { message: 'directoryId must be a valid UUID v4' })
|
|
22
|
+
directoryId: string;
|
|
23
|
+
|
|
24
|
+
@IsNotEmpty()
|
|
25
|
+
variables: Record<string, any>;
|
|
26
|
+
|
|
27
|
+
@IsBoolean()
|
|
28
|
+
@IsOptional()
|
|
29
|
+
sign?: boolean;
|
|
30
|
+
|
|
31
|
+
@IsNumber()
|
|
32
|
+
@IsOptional()
|
|
33
|
+
expiresInDays?: number | null;
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class DocumentGenerateResponse {
|
|
2
|
+
documentId: string;
|
|
3
|
+
referenceType: string;
|
|
4
|
+
referenceId: string;
|
|
5
|
+
directoryId: string;
|
|
6
|
+
s3Key: string;
|
|
7
|
+
signed: boolean;
|
|
8
|
+
signedAt: string | null;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
expiresAt: string | null;
|
|
11
|
+
downloadUrl: string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IsBoolean, IsNotEmpty, IsNumber, IsOptional, IsString, Matches, Max, Min } from "class-validator";
|
|
2
|
+
import { regexUuidV4 } from "../../../helpers/constans/regex";
|
|
3
|
+
|
|
4
|
+
export class LienApplyRequest {
|
|
5
|
+
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
@Matches(regexUuidV4, { message: 'directoryId must be a valid UUID v4' })
|
|
9
|
+
directoryId: string;
|
|
10
|
+
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
creditId: string;
|
|
14
|
+
|
|
15
|
+
@IsBoolean()
|
|
16
|
+
@IsNotEmpty()
|
|
17
|
+
active: boolean;
|
|
18
|
+
|
|
19
|
+
@IsNumber()
|
|
20
|
+
@IsOptional()
|
|
21
|
+
@Min(1)
|
|
22
|
+
@Max(100)
|
|
23
|
+
percentage?: number;
|
|
24
|
+
|
|
25
|
+
@IsNumber()
|
|
26
|
+
@IsOptional()
|
|
27
|
+
maxAmount?: number;
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export enum CreditOperationEnum {
|
|
2
|
+
DISBURSEMENT = 'DISBURSEMENT',
|
|
3
|
+
COLLECTION = 'COLLECTION',
|
|
4
|
+
COLLECTION_PARTIAL = 'COLLECTION_PARTIAL',
|
|
5
|
+
COLLECTION_LIEN = 'COLLECTION_LIEN',
|
|
6
|
+
EARLY_PAYMENT = 'EARLY_PAYMENT',
|
|
7
|
+
TRANSFER_LOANCO = 'TRANSFER_LOANCO',
|
|
8
|
+
REVERSAL = 'REVERSAL',
|
|
9
|
+
INTEREST_ACCRUAL = 'INTEREST_ACCRUAL',
|
|
10
|
+
FEE_CHARGE = 'FEE_CHARGE'
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export enum CreditStatusEnum {
|
|
2
|
+
PENDING_APPROVAL = 'PENDING_APPROVAL',
|
|
3
|
+
APPROVED = 'APPROVED',
|
|
4
|
+
ACTIVE = 'ACTIVE',
|
|
5
|
+
CURRENT = 'CURRENT',
|
|
6
|
+
DELINQUENT = 'DELINQUENT',
|
|
7
|
+
DEFAULTED = 'DEFAULTED',
|
|
8
|
+
PAID_OFF = 'PAID_OFF',
|
|
9
|
+
CANCELLED = 'CANCELLED',
|
|
10
|
+
RETURNED_TO_LOANCO = 'RETURNED_TO_LOANCO',
|
|
11
|
+
WRITTEN_OFF = 'WRITTEN_OFF'
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export enum DocumentTypeEnum {
|
|
2
|
+
CREDIT_CONTRACT = 'CREDIT_CONTRACT',
|
|
3
|
+
CREDIT_STATEMENT = 'CREDIT_STATEMENT',
|
|
4
|
+
CREDIT_AMORTIZATION = 'CREDIT_AMORTIZATION',
|
|
5
|
+
CREDIT_COVER_SHEET = 'CREDIT_COVER_SHEET',
|
|
6
|
+
ONBOARDING_CONTRACT = 'ONBOARDING_CONTRACT',
|
|
7
|
+
ONBOARDING_IFPE = 'ONBOARDING_IFPE'
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//dtos
|
|
2
|
+
export * from './dtos/CreditBannerStateResponse';
|
|
3
|
+
export * from './dtos/CreditEligibilityResponse';
|
|
4
|
+
export * from './dtos/CreditOfferConfigureRequest';
|
|
5
|
+
export * from './dtos/CreditOfferConfigureResponse';
|
|
6
|
+
export * from './dtos/CreditRequestCreate';
|
|
7
|
+
export * from './dtos/CreditRequestResponse';
|
|
8
|
+
export * from './dtos/CreditDetailResponse';
|
|
9
|
+
export * from './dtos/CreditMovementResponse';
|
|
10
|
+
export * from './dtos/CreditScheduleResponse';
|
|
11
|
+
export * from './dtos/CreditStatementResponse';
|
|
12
|
+
export * from './dtos/EarlyPaymentRequest';
|
|
13
|
+
export * from './dtos/EarlyPaymentResponse';
|
|
14
|
+
|
|
15
|
+
//dtos/internal
|
|
16
|
+
export * from './dtos/internal/CreditProfileRequest';
|
|
17
|
+
export * from './dtos/internal/CreditProfileResponse';
|
|
18
|
+
export * from './dtos/internal/CreditDisbursementRequest';
|
|
19
|
+
export * from './dtos/internal/CreditDisbursementResponse';
|
|
20
|
+
export * from './dtos/internal/CreditCollectionRequest';
|
|
21
|
+
export * from './dtos/internal/CreditCollectionResponse';
|
|
22
|
+
export * from './dtos/internal/CreditTransferLoancoRequest';
|
|
23
|
+
export * from './dtos/internal/CreditTransferLoancoResponse';
|
|
24
|
+
export * from './dtos/internal/CreditReversalRequest';
|
|
25
|
+
export * from './dtos/internal/CreditReversalResponse';
|
|
26
|
+
export * from './dtos/internal/CreditBalanceRequest';
|
|
27
|
+
export * from './dtos/internal/CreditBalanceResponse';
|
|
28
|
+
export * from './dtos/internal/LienStatusResponse';
|
|
29
|
+
export * from './dtos/internal/LienApplyRequest';
|
|
30
|
+
export * from './dtos/internal/CreditQueueMessage';
|
|
31
|
+
export * from './dtos/internal/DocumentGenerateRequest';
|
|
32
|
+
export * from './dtos/internal/DocumentGenerateResponse';
|
|
33
|
+
export * from './dtos/internal/DocumentSignRequest';
|
|
34
|
+
|
|
35
|
+
//enums
|
|
36
|
+
export * from './enums/CreditStatusEnum';
|
|
37
|
+
export * from './enums/DelinquencyLevelEnum';
|
|
38
|
+
export * from './enums/PaymentTypeEnum';
|
|
39
|
+
export * from './enums/CollectionFrequencyEnum';
|
|
40
|
+
export * from './enums/CreditOperationEnum';
|
|
41
|
+
export * from './enums/OfferStatusEnum';
|
|
42
|
+
export * from './enums/TransferStatusEnum';
|
|
43
|
+
export * from './enums/ReconciliationStatusEnum';
|
|
44
|
+
export * from './enums/DocumentTypeEnum';
|
package/src/index.ts
CHANGED
|
@@ -55,4 +55,5 @@ export * as PayrollBusiness from './payroll-business';
|
|
|
55
55
|
export * as Event from './event';
|
|
56
56
|
export * as NotificationWS from './notificationWS';
|
|
57
57
|
export * as ZendeskMessaging from './zendeskMessaging';
|
|
58
|
+
export * as Credit from './credit';
|
|
58
59
|
export * as ReferralBusiness from './referral-business';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IsNotEmpty, IsOptional, IsString } from "class-validator";
|
|
2
|
+
|
|
3
|
+
export class SendProactiveMessageRequest {
|
|
4
|
+
@IsString()
|
|
5
|
+
@IsNotEmpty()
|
|
6
|
+
directoryId: string;
|
|
7
|
+
|
|
8
|
+
@IsString()
|
|
9
|
+
@IsNotEmpty()
|
|
10
|
+
message: string;
|
|
11
|
+
|
|
12
|
+
@IsString()
|
|
13
|
+
@IsOptional()
|
|
14
|
+
displayName?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IsArray, IsBoolean, IsIn, IsNotEmpty, IsOptional, IsString, ValidateNested } from "class-validator";
|
|
2
|
+
import { Type } from "class-transformer";
|
|
3
|
+
|
|
4
|
+
class ConversationParticipantDto {
|
|
5
|
+
@IsString()
|
|
6
|
+
@IsOptional()
|
|
7
|
+
userId?: string;
|
|
8
|
+
|
|
9
|
+
@IsString()
|
|
10
|
+
@IsOptional()
|
|
11
|
+
userExternalId?: string;
|
|
12
|
+
|
|
13
|
+
@IsBoolean()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
subscribeSDKClient?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class SunshineCreateConversationRequest {
|
|
19
|
+
@IsString()
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
@IsIn(['personal', 'sdkGroup'])
|
|
22
|
+
type: 'personal' | 'sdkGroup';
|
|
23
|
+
|
|
24
|
+
@IsArray()
|
|
25
|
+
@ValidateNested({ each: true })
|
|
26
|
+
@Type(() => ConversationParticipantDto)
|
|
27
|
+
participants: ConversationParticipantDto[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IsNotEmpty, IsOptional, IsString, ValidateNested } from "class-validator";
|
|
2
|
+
import { Type } from "class-transformer";
|
|
3
|
+
|
|
4
|
+
class SunshineUserProfileDto {
|
|
5
|
+
@IsString()
|
|
6
|
+
@IsOptional()
|
|
7
|
+
givenName?: string;
|
|
8
|
+
|
|
9
|
+
@IsString()
|
|
10
|
+
@IsOptional()
|
|
11
|
+
surname?: string;
|
|
12
|
+
|
|
13
|
+
@IsString()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
email?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class SunshineCreateUserRequest {
|
|
19
|
+
@IsString()
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
externalId: string;
|
|
22
|
+
|
|
23
|
+
@ValidateNested()
|
|
24
|
+
@Type(() => SunshineUserProfileDto)
|
|
25
|
+
@IsOptional()
|
|
26
|
+
profile?: SunshineUserProfileDto;
|
|
27
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IsIn, IsNotEmpty, IsOptional, IsString, ValidateNested } from "class-validator";
|
|
2
|
+
import { Type } from "class-transformer";
|
|
3
|
+
|
|
4
|
+
class MessageAuthorDto {
|
|
5
|
+
@IsString()
|
|
6
|
+
@IsNotEmpty()
|
|
7
|
+
@IsIn(['user', 'business'])
|
|
8
|
+
type: 'user' | 'business';
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
@IsOptional()
|
|
12
|
+
userId?: string;
|
|
13
|
+
|
|
14
|
+
@IsString()
|
|
15
|
+
@IsOptional()
|
|
16
|
+
userExternalId?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class MessageContentDto {
|
|
20
|
+
@IsString()
|
|
21
|
+
@IsNotEmpty()
|
|
22
|
+
@IsIn(['text', 'image', 'file'])
|
|
23
|
+
type: 'text' | 'image' | 'file';
|
|
24
|
+
|
|
25
|
+
@IsString()
|
|
26
|
+
@IsOptional()
|
|
27
|
+
text?: string;
|
|
28
|
+
|
|
29
|
+
@IsString()
|
|
30
|
+
@IsOptional()
|
|
31
|
+
mediaUrl?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class SunshinePostMessageRequest {
|
|
35
|
+
@ValidateNested()
|
|
36
|
+
@Type(() => MessageAuthorDto)
|
|
37
|
+
@IsNotEmpty()
|
|
38
|
+
author: MessageAuthorDto;
|
|
39
|
+
|
|
40
|
+
@ValidateNested()
|
|
41
|
+
@Type(() => MessageContentDto)
|
|
42
|
+
@IsNotEmpty()
|
|
43
|
+
content: MessageContentDto;
|
|
44
|
+
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
// Interfaces existentes
|
|
1
2
|
export * from './interfaces/IZendeskWebhook';
|
|
2
3
|
export * from './interfaces/INormalizedNotificationEvent';
|
|
3
4
|
export * from './interfaces/ISunshineConversations';
|
|
5
|
+
|
|
6
|
+
// Nuevas interfaces para Proactive Messaging
|
|
7
|
+
export * from './interfaces/ISunshineProactiveResponses';
|
|
8
|
+
export * from './interfaces/IProactiveMessagingEnums';
|
|
9
|
+
|
|
10
|
+
// DTOs para Proactive Messaging
|
|
11
|
+
export * from './dtos/SendProactiveMessageRequest';
|
|
12
|
+
export * from './dtos/SunshineCreateUserRequest';
|
|
13
|
+
export * from './dtos/SunshineCreateConversationRequest';
|
|
14
|
+
export * from './dtos/SunshinePostMessageRequest';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export enum ProactiveMessagingErrorCode {
|
|
2
|
+
INVALID_DIRECTORY_ID = 'INVALID_DIRECTORY_ID',
|
|
3
|
+
INVALID_MESSAGE = 'INVALID_MESSAGE',
|
|
4
|
+
USER_CREATION_FAILED = 'USER_CREATION_FAILED',
|
|
5
|
+
CONVERSATION_CREATION_FAILED = 'CONVERSATION_CREATION_FAILED',
|
|
6
|
+
MESSAGE_SEND_FAILED = 'MESSAGE_SEND_FAILED',
|
|
7
|
+
CREDENTIALS_NOT_FOUND = 'CREDENTIALS_NOT_FOUND',
|
|
8
|
+
SUNSHINE_API_ERROR = 'SUNSHINE_API_ERROR'
|
|
9
|
+
}
|