@fiado/type-kit 3.0.6 → 3.0.7

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 (62) hide show
  1. package/bin/card/validations/CardUpdateKeyConstraint.js +2 -2
  2. package/bin/card/validations/IsPhoneNumberConstraint.js +2 -2
  3. package/bin/index.d.ts +0 -1
  4. package/bin/index.js +18 -9
  5. package/package.json +1 -1
  6. package/src/index.ts +0 -1
  7. package/bin/bankAccount/dtos/ExternalAccountType.d.ts +0 -4
  8. package/bin/bankAccount/dtos/ExternalAccountType.js +0 -6
  9. package/bin/centralPayments/dtos/CentralPaymentsDocumentImages.d.ts +0 -6
  10. package/bin/centralPayments/dtos/CentralPaymentsDocumentImages.js +0 -6
  11. package/bin/centralPayments/dtos/CentralPaymentsDocumentUploadRequest.d.ts +0 -6
  12. package/bin/centralPayments/dtos/CentralPaymentsDocumentUploadRequest.js +0 -6
  13. package/bin/directorySetting/dtos/DirectorySettingCreateResponse.d.ts +0 -0
  14. package/bin/directorySetting/dtos/DirectorySettingCreateResponse.js +0 -0
  15. package/bin/pricelist/dtos/GetPriceListDirectoriesResponse.d.ts +0 -28
  16. package/bin/pricelist/dtos/GetPriceListDirectoriesResponse.js +0 -6
  17. package/bin/services/dtos/GetMembershipListAppResponse.d.ts +0 -4
  18. package/bin/services/dtos/GetMembershipListAppResponse.js +0 -6
  19. package/bin/services/dtos/GetServiceMembershipListAResponse.d.ts +0 -4
  20. package/bin/services/dtos/GetServiceMembershipListAResponse.js +0 -6
  21. package/bin/services/enums/ServiceProviderEnum.d.ts +0 -5
  22. package/bin/services/enums/ServiceProviderEnum.js +0 -9
  23. package/src/credit/dtos/CreditBannerStateResponse.ts +0 -11
  24. package/src/credit/dtos/CreditDetailResponse.ts +0 -24
  25. package/src/credit/dtos/CreditEligibilityResponse.ts +0 -10
  26. package/src/credit/dtos/CreditMovementResponse.ts +0 -22
  27. package/src/credit/dtos/CreditOfferConfigureRequest.ts +0 -21
  28. package/src/credit/dtos/CreditOfferConfigureResponse.ts +0 -26
  29. package/src/credit/dtos/CreditRequestCreate.ts +0 -12
  30. package/src/credit/dtos/CreditRequestResponse.ts +0 -8
  31. package/src/credit/dtos/CreditScheduleResponse.ts +0 -19
  32. package/src/credit/dtos/CreditStatementResponse.ts +0 -12
  33. package/src/credit/dtos/EarlyPaymentRequest.ts +0 -21
  34. package/src/credit/dtos/EarlyPaymentResponse.ts +0 -12
  35. package/src/credit/dtos/internal/CreditBalanceRequest.ts +0 -8
  36. package/src/credit/dtos/internal/CreditBalanceResponse.ts +0 -10
  37. package/src/credit/dtos/internal/CreditCollectionRequest.ts +0 -39
  38. package/src/credit/dtos/internal/CreditCollectionResponse.ts +0 -12
  39. package/src/credit/dtos/internal/CreditDisbursementRequest.ts +0 -26
  40. package/src/credit/dtos/internal/CreditDisbursementResponse.ts +0 -8
  41. package/src/credit/dtos/internal/CreditProfileRequest.ts +0 -10
  42. package/src/credit/dtos/internal/CreditProfileResponse.ts +0 -14
  43. package/src/credit/dtos/internal/CreditQueueMessage.ts +0 -20
  44. package/src/credit/dtos/internal/CreditReversalRequest.ts +0 -16
  45. package/src/credit/dtos/internal/CreditReversalResponse.ts +0 -7
  46. package/src/credit/dtos/internal/CreditTransferLoancoRequest.ts +0 -28
  47. package/src/credit/dtos/internal/CreditTransferLoancoResponse.ts +0 -9
  48. package/src/credit/dtos/internal/DocumentGenerateRequest.ts +0 -34
  49. package/src/credit/dtos/internal/DocumentGenerateResponse.ts +0 -12
  50. package/src/credit/dtos/internal/DocumentSignRequest.ts +0 -8
  51. package/src/credit/dtos/internal/LienApplyRequest.ts +0 -28
  52. package/src/credit/dtos/internal/LienStatusResponse.ts +0 -9
  53. package/src/credit/enums/CollectionFrequencyEnum.ts +0 -5
  54. package/src/credit/enums/CreditOperationEnum.ts +0 -11
  55. package/src/credit/enums/CreditStatusEnum.ts +0 -12
  56. package/src/credit/enums/DelinquencyLevelEnum.ts +0 -9
  57. package/src/credit/enums/DocumentTypeEnum.ts +0 -8
  58. package/src/credit/enums/OfferStatusEnum.ts +0 -8
  59. package/src/credit/enums/PaymentTypeEnum.ts +0 -9
  60. package/src/credit/enums/ReconciliationStatusEnum.ts +0 -6
  61. package/src/credit/enums/TransferStatusEnum.ts +0 -8
  62. package/src/credit/index.ts +0 -44
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.IsValueValid = exports.CardUpdateKeyConstraint = exports.IsReasonRequiredForCancelledStatusConstraint = void 0;
9
+ exports.CardUpdateKeyConstraint = exports.IsReasonRequiredForCancelledStatusConstraint = void 0;
10
+ exports.IsValueValid = IsValueValid;
10
11
  const class_validator_1 = require("class-validator");
11
12
  const Status_1 = require("../enums/Status");
12
13
  const UpdateKey_1 = require("../enums/UpdateKey");
@@ -70,4 +71,3 @@ function IsValueValid(validationOptions) {
70
71
  });
71
72
  };
72
73
  }
73
- exports.IsValueValid = IsValueValid;
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.IsPhoneNumberFiado = exports.IsPhoneNumberConstraint = void 0;
9
+ exports.IsPhoneNumberConstraint = void 0;
10
+ exports.IsPhoneNumberFiado = IsPhoneNumberFiado;
10
11
  const class_validator_1 = require("class-validator");
11
12
  const regex_1 = require("../../helpers/constans/regex");
12
13
  let IsPhoneNumberConstraint = class IsPhoneNumberConstraint {
@@ -36,4 +37,3 @@ function IsPhoneNumberFiado(validationOptions) {
36
37
  });
37
38
  };
38
39
  }
39
- exports.IsPhoneNumberFiado = IsPhoneNumberFiado;
package/bin/index.d.ts CHANGED
@@ -55,6 +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';
59
58
  export * as ReferralBusiness from './referral-business';
60
59
  export * as ComissionBusiness from './comission-business';
package/bin/index.js CHANGED
@@ -15,16 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Collector = exports.Pricelist = exports.Company = exports.Services = exports.AccountIssuanceBusiness = exports.AppSelectionData = exports.Device = exports.Observations = exports.IssuanceBusiness = exports.Blacklist = exports.CentralPayments = exports.Helpdesk = exports.FiadoApiResponse = exports.Auth = exports.LegalDocumentsBusiness = exports.Role = exports.STPAccount = exports.RiskProfile = exports.FraudPreventionEngine = exports.BBVARst = exports.Stp = exports.BankAccount = exports.P2pContact = exports.CreditContract = exports.Contract = exports.ProductCatalog = exports.ContactInfo = exports.Transaction = exports.TransactionProcessor = exports.GenericMessage = exports.EventBridgeMessage = exports.SessionActivity = exports.NotificationMessages = exports.ServicePayment = exports.Header = exports.Identity = exports.Group = exports.File = exports.ExchangeRate = exports.Directory = exports.Currency = exports.Country = exports.Card = exports.Authentication = exports.App = exports.Address = exports.Beneficiary = exports.Activity = exports.Account = exports.Crypto = void 0;
27
- exports.ComissionBusiness = exports.ReferralBusiness = exports.Credit = exports.ZendeskMessaging = exports.NotificationWS = exports.Event = exports.PayrollBusiness = exports.Cnbv = exports.DirectorySetting = exports.InvoiceCollector = void 0;
37
+ exports.ComissionBusiness = exports.ReferralBusiness = exports.ZendeskMessaging = exports.NotificationWS = exports.Event = exports.PayrollBusiness = exports.Cnbv = exports.DirectorySetting = exports.InvoiceCollector = void 0;
28
38
  exports.Crypto = __importStar(require("./crypto"));
29
39
  exports.Account = __importStar(require("./account"));
30
40
  exports.Activity = __importStar(require("./activity"));
@@ -82,6 +92,5 @@ exports.PayrollBusiness = __importStar(require("./payroll-business"));
82
92
  exports.Event = __importStar(require("./event"));
83
93
  exports.NotificationWS = __importStar(require("./notificationWS"));
84
94
  exports.ZendeskMessaging = __importStar(require("./zendeskMessaging"));
85
- exports.Credit = __importStar(require("./credit"));
86
95
  exports.ReferralBusiness = __importStar(require("./referral-business"));
87
96
  exports.ComissionBusiness = __importStar(require("./comission-business"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
package/src/index.ts CHANGED
@@ -55,6 +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';
59
58
  export * as ReferralBusiness from './referral-business';
60
59
  export * as ComissionBusiness from './comission-business';
@@ -1,4 +0,0 @@
1
- export declare class ExternalAccountType {
2
- id?: number;
3
- name?: string;
4
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExternalAccountType = void 0;
4
- class ExternalAccountType {
5
- }
6
- exports.ExternalAccountType = ExternalAccountType;
@@ -1,6 +0,0 @@
1
- import { DocumentSideEnum } from "../../identity";
2
- export declare class CentralPaymentsDocumentImages {
3
- side: DocumentSideEnum;
4
- url: string;
5
- extension: string;
6
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CentralPaymentsDocumentImages = void 0;
4
- class CentralPaymentsDocumentImages {
5
- }
6
- exports.CentralPaymentsDocumentImages = CentralPaymentsDocumentImages;
@@ -1,6 +0,0 @@
1
- import { IdentificationDocument } from "../../identity";
2
- import { CentralPaymentsDocumentImages } from "./CentralPaymentsDocumentImages";
3
- export declare class CentralPaymentsDocumentUploadRequest {
4
- documentInfo: IdentificationDocument;
5
- documentImages: CentralPaymentsDocumentImages[];
6
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CentralPaymentsDocumentUploadRequest = void 0;
4
- class CentralPaymentsDocumentUploadRequest {
5
- }
6
- exports.CentralPaymentsDocumentUploadRequest = CentralPaymentsDocumentUploadRequest;
@@ -1,28 +0,0 @@
1
- import { Company } from "../../company";
2
- import { Provider } from "../../provider";
3
- import { ServiceTypeEnum } from "../../services";
4
- import { ServiceRecurrenceEnum } from "../../services/enums/ServiceRecurrenceEnum";
5
- export declare class GetPriceListDirectoriesResponse {
6
- serviceId: string;
7
- company: Company;
8
- provider: Provider;
9
- type: ServiceTypeEnum;
10
- basePrice: number;
11
- recurrence: ServiceRecurrenceEnum;
12
- currencyId: string;
13
- fees: any;
14
- taxes: any;
15
- globalDiscounts: {
16
- discountType: string;
17
- discountValue: number;
18
- }[];
19
- directories: {
20
- directoryId: string;
21
- appliedDiscounts: {
22
- discountType: string;
23
- discountValue: number;
24
- source: string;
25
- referenceId: string;
26
- }[];
27
- }[];
28
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetPriceListDirectoriesResponse = void 0;
4
- class GetPriceListDirectoriesResponse {
5
- }
6
- exports.GetPriceListDirectoriesResponse = GetPriceListDirectoriesResponse;
@@ -1,4 +0,0 @@
1
- export declare class GetServiceListAppResponse {
2
- items: any[];
3
- index: string | null;
4
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetServiceListAppResponse = void 0;
4
- class GetServiceListAppResponse {
5
- }
6
- exports.GetServiceListAppResponse = GetServiceListAppResponse;
@@ -1,4 +0,0 @@
1
- export declare class GetServiceMembershipListAResponse {
2
- items: any[];
3
- index: string | null;
4
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetServiceMembershipListAResponse = void 0;
4
- class GetServiceMembershipListAResponse {
5
- }
6
- exports.GetServiceMembershipListAResponse = GetServiceMembershipListAResponse;
@@ -1,5 +0,0 @@
1
- export declare enum ServiceProviderEnum {
2
- CP = "CP",
3
- TERN = "TERN",
4
- PAGOCONFIADO = "PAGOCONFIADO"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceProviderEnum = void 0;
4
- var ServiceProviderEnum;
5
- (function (ServiceProviderEnum) {
6
- ServiceProviderEnum["CP"] = "CP";
7
- ServiceProviderEnum["TERN"] = "TERN";
8
- ServiceProviderEnum["PAGOCONFIADO"] = "PAGOCONFIADO";
9
- })(ServiceProviderEnum || (exports.ServiceProviderEnum = ServiceProviderEnum = {}));
@@ -1,11 +0,0 @@
1
- import { OfferStatusEnum } from "../enums/OfferStatusEnum";
2
- import { CreditStatusEnum } from "../enums/CreditStatusEnum";
3
-
4
- export class CreditBannerStateResponse {
5
- showBanner: boolean;
6
- bannerType: 'NURTURING' | 'OFFER_AVAILABLE' | 'ACTIVE_CREDIT' | 'NONE';
7
- offerStatus: OfferStatusEnum | null;
8
- creditStatus: CreditStatusEnum | null;
9
- message: string | null;
10
- maxOfferAmount: number | null;
11
- }
@@ -1,24 +0,0 @@
1
- import { CreditStatusEnum } from "../enums/CreditStatusEnum";
2
- import { DelinquencyLevelEnum } from "../enums/DelinquencyLevelEnum";
3
- import { CollectionFrequencyEnum } from "../enums/CollectionFrequencyEnum";
4
-
5
- export class CreditDetailResponse {
6
- creditId: string;
7
- status: CreditStatusEnum;
8
- delinquencyLevel: DelinquencyLevelEnum;
9
- originalAmount: number;
10
- currentBalance: number;
11
- paidAmount: number;
12
- nextPaymentAmount: number;
13
- nextPaymentDate: string;
14
- overdueDays: number;
15
- overdueAmount: number;
16
- termWeeks: number;
17
- currentWeek: number;
18
- frequency: CollectionFrequencyEnum;
19
- annualInterestRate: number;
20
- cat: number;
21
- disbursementDate: string;
22
- maturityDate: string;
23
- contractDocumentId: string;
24
- }
@@ -1,10 +0,0 @@
1
- import { OfferStatusEnum } from "../enums/OfferStatusEnum";
2
-
3
- export class CreditEligibilityResponse {
4
- eligible: boolean;
5
- status: OfferStatusEnum;
6
- maxAmount: number | null;
7
- minAmount: number | null;
8
- reason: string | null;
9
- expiresAt: string | null;
10
- }
@@ -1,22 +0,0 @@
1
- import { CreditOperationEnum } from "../enums/CreditOperationEnum";
2
-
3
- export class CreditMovementItem {
4
- movementId: string;
5
- date: string;
6
- type: CreditOperationEnum;
7
- description: string;
8
- amount: number;
9
- principal: number;
10
- interest: number;
11
- iva: number;
12
- balance: number;
13
- }
14
-
15
- export class CreditMovementResponse {
16
- creditId: string;
17
- movements: CreditMovementItem[];
18
- pagination: {
19
- lastKey: string | null;
20
- hasMore: boolean;
21
- };
22
- }
@@ -1,21 +0,0 @@
1
- import { IsEnum, IsNotEmpty, IsNumber, IsString, Max, Min } from "class-validator";
2
- import { CollectionFrequencyEnum } from "../enums/CollectionFrequencyEnum";
3
-
4
- export class CreditOfferConfigureRequest {
5
-
6
- @IsNumber()
7
- @IsNotEmpty()
8
- @Min(500)
9
- @Max(50000)
10
- amount: number;
11
-
12
- @IsNumber()
13
- @IsNotEmpty()
14
- @Min(4)
15
- @Max(52)
16
- termWeeks: number;
17
-
18
- @IsEnum(CollectionFrequencyEnum)
19
- @IsNotEmpty()
20
- frequency: CollectionFrequencyEnum;
21
- }
@@ -1,26 +0,0 @@
1
- import { CollectionFrequencyEnum } from "../enums/CollectionFrequencyEnum";
2
-
3
- export class AmortizationRow {
4
- couponNumber: number;
5
- dueDate: string;
6
- principal: number;
7
- interest: number;
8
- iva: number;
9
- payment: number;
10
- balance: number;
11
- }
12
-
13
- export class CreditOfferConfigureResponse {
14
- offerId: string;
15
- amount: number;
16
- termWeeks: number;
17
- frequency: CollectionFrequencyEnum;
18
- annualInterestRate: number;
19
- weeklyPayment: number;
20
- totalInterest: number;
21
- totalIva: number;
22
- totalPayment: number;
23
- cat: number;
24
- amortizationTable: AmortizationRow[];
25
- expiresAt: string;
26
- }
@@ -1,12 +0,0 @@
1
- import { IsNotEmpty, IsString } from "class-validator";
2
-
3
- export class CreditRequestCreate {
4
-
5
- @IsString()
6
- @IsNotEmpty()
7
- offerId: string;
8
-
9
- @IsString()
10
- @IsNotEmpty()
11
- acceptedTerms: string;
12
- }
@@ -1,8 +0,0 @@
1
- import { CreditStatusEnum } from "../enums/CreditStatusEnum";
2
-
3
- export class CreditRequestResponse {
4
- creditId: string;
5
- status: CreditStatusEnum;
6
- contractDocumentId: string;
7
- message: string;
8
- }
@@ -1,19 +0,0 @@
1
- export class ScheduleItem {
2
- couponNumber: number;
3
- dueDate: string;
4
- principal: number;
5
- interest: number;
6
- iva: number;
7
- payment: number;
8
- balance: number;
9
- status: 'PENDING' | 'PAID' | 'OVERDUE' | 'PARTIAL';
10
- paidDate: string | null;
11
- paidAmount: number | null;
12
- }
13
-
14
- export class CreditScheduleResponse {
15
- creditId: string;
16
- schedule: ScheduleItem[];
17
- totalPaid: number;
18
- totalRemaining: number;
19
- }
@@ -1,12 +0,0 @@
1
- export class CreditStatementItem {
2
- statementId: string;
3
- period: string;
4
- generatedAt: string;
5
- documentId: string;
6
- downloadUrl: string | null;
7
- }
8
-
9
- export class CreditStatementListResponse {
10
- creditId: string;
11
- statements: CreditStatementItem[];
12
- }
@@ -1,21 +0,0 @@
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
- }
@@ -1,12 +0,0 @@
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
- }
@@ -1,8 +0,0 @@
1
- import { IsNotEmpty, IsString } from "class-validator";
2
-
3
- export class CreditBalanceRequest {
4
-
5
- @IsString()
6
- @IsNotEmpty()
7
- creditId: string;
8
- }
@@ -1,10 +0,0 @@
1
- export class CreditBalanceResponse {
2
- creditId: string;
3
- currentBalance: number;
4
- principalBalance: number;
5
- accruedInterest: number;
6
- overdueAmount: number;
7
- nextPaymentAmount: number;
8
- nextPaymentDate: string;
9
- availableForEarlyPayment: number;
10
- }
@@ -1,39 +0,0 @@
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
- }
@@ -1,12 +0,0 @@
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
- }
@@ -1,26 +0,0 @@
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
- }
@@ -1,8 +0,0 @@
1
- export class CreditDisbursementResponse {
2
- creditId: string;
3
- transactionId: string;
4
- idempotencyKey: string;
5
- amount: number;
6
- status: 'COMPLETED' | 'FAILED';
7
- timestamp: string;
8
- }
@@ -1,10 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
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
- }
@@ -1,20 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
1
- export class CreditReversalResponse {
2
- reversalTransactionId: string;
3
- originalTransactionId: string;
4
- amount: number;
5
- status: 'COMPLETED' | 'FAILED';
6
- timestamp: string;
7
- }
@@ -1,28 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
1
- import { TransferStatusEnum } from "../../enums/TransferStatusEnum";
2
-
3
- export class CreditTransferLoancoResponse {
4
- transferId: string;
5
- transactionId: string;
6
- amount: number;
7
- status: TransferStatusEnum;
8
- timestamp: string;
9
- }
@@ -1,34 +0,0 @@
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
- }
@@ -1,12 +0,0 @@
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
- }
@@ -1,8 +0,0 @@
1
- import { IsNotEmpty, IsString } from "class-validator";
2
-
3
- export class DocumentSignRequest {
4
-
5
- @IsString()
6
- @IsNotEmpty()
7
- documentId: string;
8
- }
@@ -1,28 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
1
- export class LienStatusResponse {
2
- directoryId: string;
3
- creditId: string;
4
- lienActive: boolean;
5
- lienPercentage: number;
6
- lienMaxAmount: number | null;
7
- totalCollectedByLien: number;
8
- lastLienDate: string | null;
9
- }
@@ -1,5 +0,0 @@
1
- export enum CollectionFrequencyEnum {
2
- WEEKLY = 'WEEKLY',
3
- BIWEEKLY = 'BIWEEKLY',
4
- MONTHLY = 'MONTHLY'
5
- }
@@ -1,11 +0,0 @@
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
- }
@@ -1,12 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
1
- export enum DelinquencyLevelEnum {
2
- CURRENT = 'CURRENT',
3
- EARLY_1_7 = 'EARLY_1_7',
4
- EARLY_8_14 = 'EARLY_8_14',
5
- LATE_15_30 = 'LATE_15_30',
6
- LATE_31_60 = 'LATE_31_60',
7
- SEVERE_61_90 = 'SEVERE_61_90',
8
- DEFAULT_90_PLUS = 'DEFAULT_90_PLUS'
9
- }
@@ -1,8 +0,0 @@
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
- }
@@ -1,8 +0,0 @@
1
- export enum OfferStatusEnum {
2
- NOT_ELIGIBLE = 'NOT_ELIGIBLE',
3
- PRE_QUALIFIED = 'PRE_QUALIFIED',
4
- OFFER_AVAILABLE = 'OFFER_AVAILABLE',
5
- OFFER_CONFIGURED = 'OFFER_CONFIGURED',
6
- OFFER_ACCEPTED = 'OFFER_ACCEPTED',
7
- OFFER_EXPIRED = 'OFFER_EXPIRED'
8
- }
@@ -1,9 +0,0 @@
1
- export enum PaymentTypeEnum {
2
- REGULAR = 'REGULAR',
3
- PARTIAL = 'PARTIAL',
4
- EARLY_ANTICIPATED = 'EARLY_ANTICIPATED',
5
- EARLY_ADVANCED = 'EARLY_ADVANCED',
6
- EARLY_SETTLEMENT = 'EARLY_SETTLEMENT',
7
- LIEN = 'LIEN',
8
- REVERSAL = 'REVERSAL'
9
- }
@@ -1,6 +0,0 @@
1
- export enum ReconciliationStatusEnum {
2
- PENDING = 'PENDING',
3
- MATCHED = 'MATCHED',
4
- DISCREPANCY = 'DISCREPANCY',
5
- RESOLVED = 'RESOLVED'
6
- }
@@ -1,8 +0,0 @@
1
- export enum TransferStatusEnum {
2
- PENDING = 'PENDING',
3
- APPROVED = 'APPROVED',
4
- IN_PROGRESS = 'IN_PROGRESS',
5
- COMPLETED = 'COMPLETED',
6
- FAILED = 'FAILED',
7
- REJECTED = 'REJECTED'
8
- }
@@ -1,44 +0,0 @@
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';