@fiado/type-kit 3.6.4 → 3.7.0

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 (40) hide show
  1. package/bin/circuloCredito/dtos/AccountInfo.d.ts +27 -0
  2. package/bin/circuloCredito/dtos/AccountInfo.js +6 -0
  3. package/bin/circuloCredito/dtos/AddressInfo.d.ts +11 -0
  4. package/bin/circuloCredito/dtos/AddressInfo.js +6 -0
  5. package/bin/circuloCredito/dtos/ClientInfo.d.ts +14 -0
  6. package/bin/circuloCredito/dtos/ClientInfo.js +6 -0
  7. package/bin/circuloCredito/dtos/ReportarCuentaRequest.d.ts +10 -0
  8. package/bin/circuloCredito/dtos/ReportarCuentaRequest.js +48 -0
  9. package/bin/circuloCredito/dtos/ReportarCuentaResponse.d.ts +19 -0
  10. package/bin/circuloCredito/dtos/ReportarCuentaResponse.js +12 -0
  11. package/bin/circuloCredito/enums/AccountStatus.d.ts +5 -0
  12. package/bin/circuloCredito/enums/AccountStatus.js +9 -0
  13. package/bin/circuloCredito/enums/CdcConnectorErrorCode.d.ts +8 -0
  14. package/bin/circuloCredito/enums/CdcConnectorErrorCode.js +12 -0
  15. package/bin/circuloCredito/enums/PaymentFrequency.d.ts +10 -0
  16. package/bin/circuloCredito/enums/PaymentFrequency.js +14 -0
  17. package/bin/circuloCredito/enums/PaymentPeriodStatus.d.ts +12 -0
  18. package/bin/circuloCredito/enums/PaymentPeriodStatus.js +16 -0
  19. package/bin/circuloCredito/enums/ReportType.d.ts +5 -0
  20. package/bin/circuloCredito/enums/ReportType.js +9 -0
  21. package/bin/circuloCredito/enums/ReportarCuentaResultStatus.d.ts +5 -0
  22. package/bin/circuloCredito/enums/ReportarCuentaResultStatus.js +9 -0
  23. package/bin/circuloCredito/index.d.ts +11 -0
  24. package/bin/circuloCredito/index.js +27 -0
  25. package/bin/index.d.ts +1 -0
  26. package/bin/index.js +2 -1
  27. package/package.json +1 -1
  28. package/src/circuloCredito/dtos/AccountInfo.ts +32 -0
  29. package/src/circuloCredito/dtos/AddressInfo.ts +11 -0
  30. package/src/circuloCredito/dtos/ClientInfo.ts +14 -0
  31. package/src/circuloCredito/dtos/ReportarCuentaRequest.ts +30 -0
  32. package/src/circuloCredito/dtos/ReportarCuentaResponse.ts +22 -0
  33. package/src/circuloCredito/enums/AccountStatus.ts +5 -0
  34. package/src/circuloCredito/enums/CdcConnectorErrorCode.ts +8 -0
  35. package/src/circuloCredito/enums/PaymentFrequency.ts +10 -0
  36. package/src/circuloCredito/enums/PaymentPeriodStatus.ts +12 -0
  37. package/src/circuloCredito/enums/ReportType.ts +5 -0
  38. package/src/circuloCredito/enums/ReportarCuentaResultStatus.ts +5 -0
  39. package/src/circuloCredito/index.ts +12 -0
  40. package/src/index.ts +1 -0
@@ -0,0 +1,27 @@
1
+ import { AccountStatus } from "../enums/AccountStatus";
2
+ import { PaymentFrequency } from "../enums/PaymentFrequency";
3
+ import { PaymentPeriodStatus } from "../enums/PaymentPeriodStatus";
4
+ import { ReportType } from "../enums/ReportType";
5
+ export declare class AccountInfo {
6
+ accountNumber: string;
7
+ reportType: ReportType;
8
+ status: AccountStatus;
9
+ openedAt: string;
10
+ cutoffDate: string;
11
+ closedAt?: string;
12
+ lastPaymentAt?: string;
13
+ numberOfPayments: number;
14
+ paymentFrequency: PaymentFrequency;
15
+ paymentAmount: number;
16
+ currency: 'MXN' | 'USD';
17
+ originalAmount: number;
18
+ maxCredit: number;
19
+ currentBalance: number;
20
+ outstandingBalance: number;
21
+ overdueBalance: number;
22
+ overduePaymentsCount: number;
23
+ overdueDays: number;
24
+ totalReportedPayments: number;
25
+ lastPaymentAmount?: number;
26
+ paymentHistory: Array<PaymentPeriodStatus>;
27
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountInfo = void 0;
4
+ class AccountInfo {
5
+ }
6
+ exports.AccountInfo = AccountInfo;
@@ -0,0 +1,11 @@
1
+ export declare class AddressInfo {
2
+ street: string;
3
+ addressNumber: string;
4
+ internalNumber?: string;
5
+ neighborhood?: string;
6
+ municipality?: string;
7
+ city: string;
8
+ state: string;
9
+ country: string;
10
+ postalCode?: string;
11
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddressInfo = void 0;
4
+ class AddressInfo {
5
+ }
6
+ exports.AddressInfo = AddressInfo;
@@ -0,0 +1,14 @@
1
+ export declare class ClientInfo {
2
+ firstName: string;
3
+ middleName?: string;
4
+ lastNamePaterno: string;
5
+ lastNameMaterno: string;
6
+ rfc: string;
7
+ curp?: string;
8
+ dateOfBirth: string;
9
+ sex?: 'M' | 'F';
10
+ nationality?: string;
11
+ ineKey?: string;
12
+ email?: string;
13
+ phone?: string;
14
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientInfo = void 0;
4
+ class ClientInfo {
5
+ }
6
+ exports.ClientInfo = ClientInfo;
@@ -0,0 +1,10 @@
1
+ import { ClientInfo } from "./ClientInfo";
2
+ import { AddressInfo } from "./AddressInfo";
3
+ import { AccountInfo } from "./AccountInfo";
4
+ export declare class ReportarCuentaRequest {
5
+ partnerId: string;
6
+ idempotencyKey: string;
7
+ client: ClientInfo;
8
+ address: AddressInfo;
9
+ account: AccountInfo;
10
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ReportarCuentaRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const ClientInfo_1 = require("./ClientInfo");
16
+ const AddressInfo_1 = require("./AddressInfo");
17
+ const AccountInfo_1 = require("./AccountInfo");
18
+ class ReportarCuentaRequest {
19
+ }
20
+ exports.ReportarCuentaRequest = ReportarCuentaRequest;
21
+ __decorate([
22
+ (0, class_validator_1.IsString)(),
23
+ (0, class_validator_1.IsNotEmpty)(),
24
+ __metadata("design:type", String)
25
+ ], ReportarCuentaRequest.prototype, "partnerId", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsString)(),
28
+ (0, class_validator_1.IsNotEmpty)(),
29
+ __metadata("design:type", String)
30
+ ], ReportarCuentaRequest.prototype, "idempotencyKey", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsDefined)(),
33
+ (0, class_validator_1.ValidateNested)(),
34
+ (0, class_transformer_1.Type)(() => ClientInfo_1.ClientInfo),
35
+ __metadata("design:type", ClientInfo_1.ClientInfo)
36
+ ], ReportarCuentaRequest.prototype, "client", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsDefined)(),
39
+ (0, class_validator_1.ValidateNested)(),
40
+ (0, class_transformer_1.Type)(() => AddressInfo_1.AddressInfo),
41
+ __metadata("design:type", AddressInfo_1.AddressInfo)
42
+ ], ReportarCuentaRequest.prototype, "address", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsDefined)(),
45
+ (0, class_validator_1.ValidateNested)(),
46
+ (0, class_transformer_1.Type)(() => AccountInfo_1.AccountInfo),
47
+ __metadata("design:type", AccountInfo_1.AccountInfo)
48
+ ], ReportarCuentaRequest.prototype, "account", void 0);
@@ -0,0 +1,19 @@
1
+ import { ReportarCuentaResultStatus } from "../enums/ReportarCuentaResultStatus";
2
+ import { CdcConnectorErrorCode } from "../enums/CdcConnectorErrorCode";
3
+ export declare class FieldError {
4
+ field: string;
5
+ reason: string;
6
+ }
7
+ export declare class ReportarCuentaError {
8
+ code: CdcConnectorErrorCode;
9
+ message: string;
10
+ fieldErrors?: FieldError[];
11
+ }
12
+ export declare class ReportarCuentaResponse {
13
+ status: ReportarCuentaResultStatus;
14
+ externalId: string | null;
15
+ sentAt: string;
16
+ payloadHash: string;
17
+ error?: ReportarCuentaError;
18
+ providerResponseRaw?: Record<string, unknown>;
19
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReportarCuentaResponse = exports.ReportarCuentaError = exports.FieldError = void 0;
4
+ class FieldError {
5
+ }
6
+ exports.FieldError = FieldError;
7
+ class ReportarCuentaError {
8
+ }
9
+ exports.ReportarCuentaError = ReportarCuentaError;
10
+ class ReportarCuentaResponse {
11
+ }
12
+ exports.ReportarCuentaResponse = ReportarCuentaResponse;
@@ -0,0 +1,5 @@
1
+ export declare enum AccountStatus {
2
+ ACTIVE = "ACTIVE",
3
+ DELINQUENT = "DELINQUENT",
4
+ PAID_OFF = "PAID_OFF"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountStatus = void 0;
4
+ var AccountStatus;
5
+ (function (AccountStatus) {
6
+ AccountStatus["ACTIVE"] = "ACTIVE";
7
+ AccountStatus["DELINQUENT"] = "DELINQUENT";
8
+ AccountStatus["PAID_OFF"] = "PAID_OFF";
9
+ })(AccountStatus || (exports.AccountStatus = AccountStatus = {}));
@@ -0,0 +1,8 @@
1
+ export declare enum CdcConnectorErrorCode {
2
+ VALIDATION_ERROR = "VALIDATION_ERROR",
3
+ AUTH_ERROR = "AUTH_ERROR",
4
+ RATE_LIMIT = "RATE_LIMIT",
5
+ PROVIDER_ERROR = "PROVIDER_ERROR",
6
+ TIMEOUT = "TIMEOUT",
7
+ PARTNER_NOT_CONFIGURED = "PARTNER_NOT_CONFIGURED"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CdcConnectorErrorCode = void 0;
4
+ var CdcConnectorErrorCode;
5
+ (function (CdcConnectorErrorCode) {
6
+ CdcConnectorErrorCode["VALIDATION_ERROR"] = "VALIDATION_ERROR";
7
+ CdcConnectorErrorCode["AUTH_ERROR"] = "AUTH_ERROR";
8
+ CdcConnectorErrorCode["RATE_LIMIT"] = "RATE_LIMIT";
9
+ CdcConnectorErrorCode["PROVIDER_ERROR"] = "PROVIDER_ERROR";
10
+ CdcConnectorErrorCode["TIMEOUT"] = "TIMEOUT";
11
+ CdcConnectorErrorCode["PARTNER_NOT_CONFIGURED"] = "PARTNER_NOT_CONFIGURED";
12
+ })(CdcConnectorErrorCode || (exports.CdcConnectorErrorCode = CdcConnectorErrorCode = {}));
@@ -0,0 +1,10 @@
1
+ export declare enum PaymentFrequency {
2
+ WEEKLY = "WEEKLY",
3
+ BIWEEKLY = "BIWEEKLY",
4
+ FORTNIGHTLY = "FORTNIGHTLY",
5
+ MONTHLY = "MONTHLY",
6
+ QUARTERLY = "QUARTERLY",
7
+ SEMESTRAL = "SEMESTRAL",
8
+ ANNUAL = "ANNUAL",
9
+ ONE_TIME = "ONE_TIME"
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentFrequency = void 0;
4
+ var PaymentFrequency;
5
+ (function (PaymentFrequency) {
6
+ PaymentFrequency["WEEKLY"] = "WEEKLY";
7
+ PaymentFrequency["BIWEEKLY"] = "BIWEEKLY";
8
+ PaymentFrequency["FORTNIGHTLY"] = "FORTNIGHTLY";
9
+ PaymentFrequency["MONTHLY"] = "MONTHLY";
10
+ PaymentFrequency["QUARTERLY"] = "QUARTERLY";
11
+ PaymentFrequency["SEMESTRAL"] = "SEMESTRAL";
12
+ PaymentFrequency["ANNUAL"] = "ANNUAL";
13
+ PaymentFrequency["ONE_TIME"] = "ONE_TIME";
14
+ })(PaymentFrequency || (exports.PaymentFrequency = PaymentFrequency = {}));
@@ -0,0 +1,12 @@
1
+ export declare enum PaymentPeriodStatus {
2
+ ON_TIME = "ON_TIME",
3
+ OVERDUE_1 = "OVERDUE_1",
4
+ OVERDUE_2 = "OVERDUE_2",
5
+ OVERDUE_3 = "OVERDUE_3",
6
+ OVERDUE_4 = "OVERDUE_4",
7
+ OVERDUE_5 = "OVERDUE_5",
8
+ OVERDUE_6 = "OVERDUE_6",
9
+ OVERDUE_7_PLUS = "OVERDUE_7_PLUS",
10
+ WRITTEN_OFF = "WRITTEN_OFF",
11
+ NO_DATA = "NO_DATA"
12
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentPeriodStatus = void 0;
4
+ var PaymentPeriodStatus;
5
+ (function (PaymentPeriodStatus) {
6
+ PaymentPeriodStatus["ON_TIME"] = "ON_TIME";
7
+ PaymentPeriodStatus["OVERDUE_1"] = "OVERDUE_1";
8
+ PaymentPeriodStatus["OVERDUE_2"] = "OVERDUE_2";
9
+ PaymentPeriodStatus["OVERDUE_3"] = "OVERDUE_3";
10
+ PaymentPeriodStatus["OVERDUE_4"] = "OVERDUE_4";
11
+ PaymentPeriodStatus["OVERDUE_5"] = "OVERDUE_5";
12
+ PaymentPeriodStatus["OVERDUE_6"] = "OVERDUE_6";
13
+ PaymentPeriodStatus["OVERDUE_7_PLUS"] = "OVERDUE_7_PLUS";
14
+ PaymentPeriodStatus["WRITTEN_OFF"] = "WRITTEN_OFF";
15
+ PaymentPeriodStatus["NO_DATA"] = "NO_DATA";
16
+ })(PaymentPeriodStatus || (exports.PaymentPeriodStatus = PaymentPeriodStatus = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum ReportType {
2
+ NEW = "NEW",
3
+ UPDATE = "UPDATE",
4
+ CLOSURE = "CLOSURE"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReportType = void 0;
4
+ var ReportType;
5
+ (function (ReportType) {
6
+ ReportType["NEW"] = "NEW";
7
+ ReportType["UPDATE"] = "UPDATE";
8
+ ReportType["CLOSURE"] = "CLOSURE";
9
+ })(ReportType || (exports.ReportType = ReportType = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum ReportarCuentaResultStatus {
2
+ CONFIRMED = "CONFIRMED",
3
+ REJECTED = "REJECTED",
4
+ ERROR = "ERROR"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReportarCuentaResultStatus = void 0;
4
+ var ReportarCuentaResultStatus;
5
+ (function (ReportarCuentaResultStatus) {
6
+ ReportarCuentaResultStatus["CONFIRMED"] = "CONFIRMED";
7
+ ReportarCuentaResultStatus["REJECTED"] = "REJECTED";
8
+ ReportarCuentaResultStatus["ERROR"] = "ERROR";
9
+ })(ReportarCuentaResultStatus || (exports.ReportarCuentaResultStatus = ReportarCuentaResultStatus = {}));
@@ -0,0 +1,11 @@
1
+ export * from './dtos/ClientInfo';
2
+ export * from './dtos/AddressInfo';
3
+ export * from './dtos/AccountInfo';
4
+ export * from './dtos/ReportarCuentaRequest';
5
+ export * from './dtos/ReportarCuentaResponse';
6
+ export * from './enums/PaymentPeriodStatus';
7
+ export * from './enums/PaymentFrequency';
8
+ export * from './enums/ReportType';
9
+ export * from './enums/AccountStatus';
10
+ export * from './enums/ReportarCuentaResultStatus';
11
+ export * from './enums/CdcConnectorErrorCode';
@@ -0,0 +1,27 @@
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("./dtos/ClientInfo"), exports);
18
+ __exportStar(require("./dtos/AddressInfo"), exports);
19
+ __exportStar(require("./dtos/AccountInfo"), exports);
20
+ __exportStar(require("./dtos/ReportarCuentaRequest"), exports);
21
+ __exportStar(require("./dtos/ReportarCuentaResponse"), exports);
22
+ __exportStar(require("./enums/PaymentPeriodStatus"), exports);
23
+ __exportStar(require("./enums/PaymentFrequency"), exports);
24
+ __exportStar(require("./enums/ReportType"), exports);
25
+ __exportStar(require("./enums/AccountStatus"), exports);
26
+ __exportStar(require("./enums/ReportarCuentaResultStatus"), exports);
27
+ __exportStar(require("./enums/CdcConnectorErrorCode"), exports);
package/bin/index.d.ts CHANGED
@@ -69,3 +69,4 @@ export * as Funnel from './funnel';
69
69
  export * as AiEngine from './aiEngine';
70
70
  export * as Sentry from './sentry';
71
71
  export * as CreditStatements from './credit-statements';
72
+ export * as CirculoCredito from './circuloCredito';
package/bin/index.js CHANGED
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  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.BenefitCenter = 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;
37
- exports.CreditStatements = exports.Sentry = exports.AiEngine = exports.Funnel = exports.TeamsConnector = exports.PlatformErrorEvents = exports.CustomerFile = exports.CreditBackoffice = exports.CreditDashboard = exports.CreditEngine = exports.Credit = exports.ComissionBusiness = exports.ReferralBusiness = exports.ZendeskMessaging = exports.NotificationWS = exports.Event = exports.PayrollBusiness = exports.Cnbv = exports.DirectorySetting = exports.InvoiceCollector = exports.Collector = void 0;
37
+ exports.CirculoCredito = exports.CreditStatements = exports.Sentry = exports.AiEngine = exports.Funnel = exports.TeamsConnector = exports.PlatformErrorEvents = exports.CustomerFile = exports.CreditBackoffice = exports.CreditDashboard = exports.CreditEngine = exports.Credit = exports.ComissionBusiness = exports.ReferralBusiness = exports.ZendeskMessaging = exports.NotificationWS = exports.Event = exports.PayrollBusiness = exports.Cnbv = exports.DirectorySetting = exports.InvoiceCollector = exports.Collector = void 0;
38
38
  exports.Crypto = __importStar(require("./crypto"));
39
39
  exports.Account = __importStar(require("./account"));
40
40
  exports.Activity = __importStar(require("./activity"));
@@ -106,3 +106,4 @@ exports.Funnel = __importStar(require("./funnel"));
106
106
  exports.AiEngine = __importStar(require("./aiEngine"));
107
107
  exports.Sentry = __importStar(require("./sentry"));
108
108
  exports.CreditStatements = __importStar(require("./credit-statements"));
109
+ exports.CirculoCredito = __importStar(require("./circuloCredito"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.6.4",
3
+ "version": "3.7.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -0,0 +1,32 @@
1
+ import { AccountStatus } from "../enums/AccountStatus";
2
+ import { PaymentFrequency } from "../enums/PaymentFrequency";
3
+ import { PaymentPeriodStatus } from "../enums/PaymentPeriodStatus";
4
+ import { ReportType } from "../enums/ReportType";
5
+
6
+ export class AccountInfo {
7
+ accountNumber!: string; // credit_id
8
+ reportType!: ReportType;
9
+ status!: AccountStatus;
10
+
11
+ openedAt!: string; // ISO date YYYY-MM-DD
12
+ cutoffDate!: string;
13
+ closedAt?: string;
14
+ lastPaymentAt?: string;
15
+
16
+ numberOfPayments!: number;
17
+ paymentFrequency!: PaymentFrequency;
18
+ paymentAmount!: number;
19
+ currency!: 'MXN' | 'USD';
20
+
21
+ originalAmount!: number;
22
+ maxCredit!: number;
23
+ currentBalance!: number;
24
+ outstandingBalance!: number;
25
+ overdueBalance!: number;
26
+ overduePaymentsCount!: number;
27
+ overdueDays!: number;
28
+ totalReportedPayments!: number;
29
+ lastPaymentAmount?: number;
30
+
31
+ paymentHistory!: Array<PaymentPeriodStatus>;
32
+ }
@@ -0,0 +1,11 @@
1
+ export class AddressInfo {
2
+ street!: string;
3
+ addressNumber!: string;
4
+ internalNumber?: string;
5
+ neighborhood?: string;
6
+ municipality?: string;
7
+ city!: string;
8
+ state!: string;
9
+ country!: string; // ISO-2 ej: "MX", "US"
10
+ postalCode?: string;
11
+ }
@@ -0,0 +1,14 @@
1
+ export class ClientInfo {
2
+ firstName!: string;
3
+ middleName?: string;
4
+ lastNamePaterno!: string;
5
+ lastNameMaterno!: string;
6
+ rfc!: string;
7
+ curp?: string;
8
+ dateOfBirth!: string; // ISO YYYY-MM-DD
9
+ sex?: 'M' | 'F';
10
+ nationality?: string; // ISO-2 ej: "MX", "US"
11
+ ineKey?: string;
12
+ email?: string;
13
+ phone?: string;
14
+ }
@@ -0,0 +1,30 @@
1
+ import { IsString, IsNotEmpty, ValidateNested, IsDefined } from "class-validator";
2
+ import { Type } from "class-transformer";
3
+ import { ClientInfo } from "./ClientInfo";
4
+ import { AddressInfo } from "./AddressInfo";
5
+ import { AccountInfo } from "./AccountInfo";
6
+
7
+ export class ReportarCuentaRequest {
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ partnerId!: string;
11
+
12
+ @IsString()
13
+ @IsNotEmpty()
14
+ idempotencyKey!: string;
15
+
16
+ @IsDefined()
17
+ @ValidateNested()
18
+ @Type(() => ClientInfo)
19
+ client!: ClientInfo;
20
+
21
+ @IsDefined()
22
+ @ValidateNested()
23
+ @Type(() => AddressInfo)
24
+ address!: AddressInfo;
25
+
26
+ @IsDefined()
27
+ @ValidateNested()
28
+ @Type(() => AccountInfo)
29
+ account!: AccountInfo;
30
+ }
@@ -0,0 +1,22 @@
1
+ import { ReportarCuentaResultStatus } from "../enums/ReportarCuentaResultStatus";
2
+ import { CdcConnectorErrorCode } from "../enums/CdcConnectorErrorCode";
3
+
4
+ export class FieldError {
5
+ field!: string;
6
+ reason!: string;
7
+ }
8
+
9
+ export class ReportarCuentaError {
10
+ code!: CdcConnectorErrorCode;
11
+ message!: string;
12
+ fieldErrors?: FieldError[];
13
+ }
14
+
15
+ export class ReportarCuentaResponse {
16
+ status!: ReportarCuentaResultStatus;
17
+ externalId!: string | null;
18
+ sentAt!: string; // ISO timestamp
19
+ payloadHash!: string; // SHA-256 hex de bytes firmados
20
+ error?: ReportarCuentaError;
21
+ providerResponseRaw?: Record<string, unknown>;
22
+ }
@@ -0,0 +1,5 @@
1
+ export enum AccountStatus {
2
+ ACTIVE = "ACTIVE",
3
+ DELINQUENT = "DELINQUENT",
4
+ PAID_OFF = "PAID_OFF",
5
+ }
@@ -0,0 +1,8 @@
1
+ export enum CdcConnectorErrorCode {
2
+ VALIDATION_ERROR = "VALIDATION_ERROR",
3
+ AUTH_ERROR = "AUTH_ERROR",
4
+ RATE_LIMIT = "RATE_LIMIT",
5
+ PROVIDER_ERROR = "PROVIDER_ERROR",
6
+ TIMEOUT = "TIMEOUT",
7
+ PARTNER_NOT_CONFIGURED = "PARTNER_NOT_CONFIGURED",
8
+ }
@@ -0,0 +1,10 @@
1
+ export enum PaymentFrequency {
2
+ WEEKLY = "WEEKLY",
3
+ BIWEEKLY = "BIWEEKLY",
4
+ FORTNIGHTLY = "FORTNIGHTLY",
5
+ MONTHLY = "MONTHLY",
6
+ QUARTERLY = "QUARTERLY",
7
+ SEMESTRAL = "SEMESTRAL",
8
+ ANNUAL = "ANNUAL",
9
+ ONE_TIME = "ONE_TIME",
10
+ }
@@ -0,0 +1,12 @@
1
+ export enum PaymentPeriodStatus {
2
+ ON_TIME = "ON_TIME",
3
+ OVERDUE_1 = "OVERDUE_1",
4
+ OVERDUE_2 = "OVERDUE_2",
5
+ OVERDUE_3 = "OVERDUE_3",
6
+ OVERDUE_4 = "OVERDUE_4",
7
+ OVERDUE_5 = "OVERDUE_5",
8
+ OVERDUE_6 = "OVERDUE_6",
9
+ OVERDUE_7_PLUS = "OVERDUE_7_PLUS",
10
+ WRITTEN_OFF = "WRITTEN_OFF",
11
+ NO_DATA = "NO_DATA",
12
+ }
@@ -0,0 +1,5 @@
1
+ export enum ReportType {
2
+ NEW = "NEW",
3
+ UPDATE = "UPDATE",
4
+ CLOSURE = "CLOSURE",
5
+ }
@@ -0,0 +1,5 @@
1
+ export enum ReportarCuentaResultStatus {
2
+ CONFIRMED = "CONFIRMED",
3
+ REJECTED = "REJECTED",
4
+ ERROR = "ERROR",
5
+ }
@@ -0,0 +1,12 @@
1
+ export * from './dtos/ClientInfo';
2
+ export * from './dtos/AddressInfo';
3
+ export * from './dtos/AccountInfo';
4
+ export * from './dtos/ReportarCuentaRequest';
5
+ export * from './dtos/ReportarCuentaResponse';
6
+
7
+ export * from './enums/PaymentPeriodStatus';
8
+ export * from './enums/PaymentFrequency';
9
+ export * from './enums/ReportType';
10
+ export * from './enums/AccountStatus';
11
+ export * from './enums/ReportarCuentaResultStatus';
12
+ export * from './enums/CdcConnectorErrorCode';
package/src/index.ts CHANGED
@@ -69,3 +69,4 @@ export * as Funnel from './funnel';
69
69
  export * as AiEngine from './aiEngine';
70
70
  export * as Sentry from './sentry';
71
71
  export * as CreditStatements from './credit-statements';
72
+ export * as CirculoCredito from './circuloCredito';