cecon-interfaces 1.2.78 → 1.2.80

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/dist/esm2022/transaction/entities/fee-detail.entity.mjs +15 -0
  2. package/dist/esm2022/transaction/entities/index.mjs +6 -0
  3. package/dist/esm2022/transaction/entities/transaction-balance.entity.mjs +14 -0
  4. package/dist/esm2022/transaction/entities/transaction-payment-method.entity.mjs +16 -0
  5. package/dist/esm2022/transaction/entities/transaction-total.entity.mjs +15 -0
  6. package/dist/esm2022/transaction/entities/transaction.entity.mjs +43 -0
  7. package/dist/esm2022/transaction/index.mjs +2 -1
  8. package/dist/esm2022/transaction/interfaces/i-fee-detail.mjs +1 -1
  9. package/dist/esm2022/transaction/interfaces/i-transaction.mjs +1 -1
  10. package/dist/esm2022/transaction/interfaces/index.mjs +1 -1
  11. package/dist/fesm2022/cecon-interfaces.mjs +102 -1
  12. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  13. package/dist/package.json +1 -1
  14. package/dist/transaction/entities/fee-detail.entity.d.ts +7 -0
  15. package/dist/transaction/entities/fee-detail.entity.js +19 -0
  16. package/dist/transaction/entities/index.d.ts +5 -0
  17. package/dist/transaction/entities/index.js +13 -0
  18. package/dist/transaction/entities/transaction-balance.entity.d.ts +6 -0
  19. package/dist/transaction/entities/transaction-balance.entity.js +18 -0
  20. package/dist/transaction/entities/transaction-payment-method.entity.d.ts +8 -0
  21. package/dist/transaction/entities/transaction-payment-method.entity.js +20 -0
  22. package/dist/transaction/entities/transaction-total.entity.d.ts +7 -0
  23. package/dist/transaction/entities/transaction-total.entity.js +19 -0
  24. package/dist/transaction/entities/transaction.entity.d.ts +38 -0
  25. package/dist/transaction/entities/transaction.entity.js +47 -0
  26. package/dist/transaction/index.d.ts +1 -0
  27. package/dist/transaction/index.js +1 -0
  28. package/dist/transaction/interfaces/i-fee-detail.d.ts +1 -1
  29. package/dist/transaction/interfaces/i-transaction.d.ts +14 -12
  30. package/dist/transaction/interfaces/index.d.ts +2 -2
  31. package/package.json +1 -1
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.2.78",
3
+ "version": "1.2.80",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,7 @@
1
+ import { IFeeDetail } from '../interfaces';
2
+ export declare class FeeDetailEntity implements IFeeDetail {
3
+ amount: number;
4
+ feePayer: 'collector' | string;
5
+ type: 'mercadopago_fee' | 'application_fee' | string;
6
+ constructor(data?: Partial<FeeDetailEntity>);
7
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeeDetailEntity = void 0;
4
+ var FeeDetailEntity = /** @class */ (function () {
5
+ function FeeDetailEntity(data) {
6
+ this.amount = 0;
7
+ this.feePayer = '';
8
+ this.type = '';
9
+ if (data) {
10
+ for (var key in data) {
11
+ if (data.hasOwnProperty(key) && key in this) {
12
+ this[key] = data[key];
13
+ }
14
+ }
15
+ }
16
+ }
17
+ return FeeDetailEntity;
18
+ }());
19
+ exports.FeeDetailEntity = FeeDetailEntity;
@@ -0,0 +1,5 @@
1
+ export { TransactionEntity } from './transaction.entity';
2
+ export { FeeDetailEntity } from './fee-detail.entity';
3
+ export { TransactionBalanceEntity } from './transaction-balance.entity';
4
+ export { TransactionTotalEntity } from './transaction-total.entity';
5
+ export { TransactionPaymentMethodEntity } from './transaction-payment-method.entity';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionPaymentMethodEntity = exports.TransactionTotalEntity = exports.TransactionBalanceEntity = exports.FeeDetailEntity = exports.TransactionEntity = void 0;
4
+ var transaction_entity_1 = require("./transaction.entity");
5
+ Object.defineProperty(exports, "TransactionEntity", { enumerable: true, get: function () { return transaction_entity_1.TransactionEntity; } });
6
+ var fee_detail_entity_1 = require("./fee-detail.entity");
7
+ Object.defineProperty(exports, "FeeDetailEntity", { enumerable: true, get: function () { return fee_detail_entity_1.FeeDetailEntity; } });
8
+ var transaction_balance_entity_1 = require("./transaction-balance.entity");
9
+ Object.defineProperty(exports, "TransactionBalanceEntity", { enumerable: true, get: function () { return transaction_balance_entity_1.TransactionBalanceEntity; } });
10
+ var transaction_total_entity_1 = require("./transaction-total.entity");
11
+ Object.defineProperty(exports, "TransactionTotalEntity", { enumerable: true, get: function () { return transaction_total_entity_1.TransactionTotalEntity; } });
12
+ var transaction_payment_method_entity_1 = require("./transaction-payment-method.entity");
13
+ Object.defineProperty(exports, "TransactionPaymentMethodEntity", { enumerable: true, get: function () { return transaction_payment_method_entity_1.TransactionPaymentMethodEntity; } });
@@ -0,0 +1,6 @@
1
+ import { ITransactionBalance } from '../interfaces';
2
+ export declare class TransactionBalanceEntity implements ITransactionBalance {
3
+ before: number;
4
+ after: number;
5
+ constructor(data?: Partial<TransactionBalanceEntity>);
6
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionBalanceEntity = void 0;
4
+ var TransactionBalanceEntity = /** @class */ (function () {
5
+ function TransactionBalanceEntity(data) {
6
+ this.before = 0;
7
+ this.after = 0;
8
+ if (data) {
9
+ for (var key in data) {
10
+ if (data.hasOwnProperty(key) && key in this) {
11
+ this[key] = data[key];
12
+ }
13
+ }
14
+ }
15
+ }
16
+ return TransactionBalanceEntity;
17
+ }());
18
+ exports.TransactionBalanceEntity = TransactionBalanceEntity;
@@ -0,0 +1,8 @@
1
+ import { EPaymentMethodId, EPaymentTypeId } from '../enums';
2
+ import { ITransactionPaymentMethod } from '../interfaces';
3
+ export declare class TransactionPaymentMethodEntity implements ITransactionPaymentMethod {
4
+ id: EPaymentMethodId;
5
+ issuerId: string;
6
+ type: EPaymentTypeId;
7
+ constructor(data?: Partial<TransactionPaymentMethodEntity>);
8
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionPaymentMethodEntity = void 0;
4
+ var enums_1 = require("../enums");
5
+ var TransactionPaymentMethodEntity = /** @class */ (function () {
6
+ function TransactionPaymentMethodEntity(data) {
7
+ this.id = enums_1.EPaymentMethodId.ACCOUNT_MONEY;
8
+ this.issuerId = '';
9
+ this.type = enums_1.EPaymentTypeId.BANK_TRANSFER;
10
+ if (data) {
11
+ for (var key in data) {
12
+ if (data.hasOwnProperty(key) && key in this) {
13
+ this[key] = data[key];
14
+ }
15
+ }
16
+ }
17
+ }
18
+ return TransactionPaymentMethodEntity;
19
+ }());
20
+ exports.TransactionPaymentMethodEntity = TransactionPaymentMethodEntity;
@@ -0,0 +1,7 @@
1
+ import { ITransactionTotal } from '../interfaces';
2
+ export declare class TransactionTotalEntity implements ITransactionTotal {
3
+ subTotal: number;
4
+ fees: number;
5
+ orderAmount: number;
6
+ constructor(data?: Partial<TransactionTotalEntity>);
7
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionTotalEntity = void 0;
4
+ var TransactionTotalEntity = /** @class */ (function () {
5
+ function TransactionTotalEntity(data) {
6
+ this.subTotal = 0;
7
+ this.fees = 0;
8
+ this.orderAmount = 0;
9
+ if (data) {
10
+ for (var key in data) {
11
+ if (data.hasOwnProperty(key) && key in this) {
12
+ this[key] = data[key];
13
+ }
14
+ }
15
+ }
16
+ }
17
+ return TransactionTotalEntity;
18
+ }());
19
+ exports.TransactionTotalEntity = TransactionTotalEntity;
@@ -0,0 +1,38 @@
1
+ import { EMpStatus, EMpStatusDetail, EOperationType, EPaymentMethodId, EReleaseStatus, ETransactionStatus } from '../enums';
2
+ import { ITransaction } from '../interfaces';
3
+ import { FeeDetailEntity } from './fee-detail.entity';
4
+ import { TransactionBalanceEntity } from './transaction-balance.entity';
5
+ import { TransactionPaymentMethodEntity } from './transaction-payment-method.entity';
6
+ import { TransactionTotalEntity } from './transaction-total.entity';
7
+ export declare class TransactionEntity implements ITransaction {
8
+ id: string;
9
+ referenceId: string;
10
+ card: {};
11
+ merchantId: string;
12
+ containerId: string;
13
+ dateApproved: Date | null;
14
+ dateOfExpiration: Date | null;
15
+ dateCreated: Date;
16
+ dateLastUpdated: Date;
17
+ description: string;
18
+ externalOrderReference: string;
19
+ feeDetails: FeeDetailEntity[];
20
+ installments: number;
21
+ liveMode: boolean;
22
+ moneyReleaseDate: Date | null;
23
+ moneyReleaseStatus: EReleaseStatus;
24
+ operationType: EOperationType;
25
+ paymentMethod: TransactionPaymentMethodEntity | null;
26
+ paymentMethodId: EPaymentMethodId;
27
+ posId: string;
28
+ status: EMpStatus;
29
+ statusDetail: EMpStatusDetail;
30
+ transactionAmount: number;
31
+ transactionAmountRefunded: number;
32
+ total: TransactionTotalEntity | null;
33
+ balance: TransactionBalanceEntity | null;
34
+ transactionStatus: ETransactionStatus;
35
+ createdAt: Date;
36
+ updatedAt: Date;
37
+ constructor(data?: Partial<TransactionEntity>);
38
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionEntity = void 0;
4
+ var enums_1 = require("../enums");
5
+ var TransactionEntity = /** @class */ (function () {
6
+ // #region Properties (14;
7
+ function TransactionEntity(data) {
8
+ this.id = '';
9
+ this.referenceId = '';
10
+ this.card = {};
11
+ this.merchantId = '';
12
+ this.containerId = '';
13
+ this.dateApproved = null;
14
+ this.dateOfExpiration = null;
15
+ this.dateCreated = new Date();
16
+ this.dateLastUpdated = new Date();
17
+ this.description = '';
18
+ this.externalOrderReference = '';
19
+ this.feeDetails = [];
20
+ this.installments = 0;
21
+ this.liveMode = true;
22
+ this.moneyReleaseDate = null;
23
+ this.moneyReleaseStatus = enums_1.EReleaseStatus.PENDING;
24
+ this.operationType = enums_1.EOperationType.REGULAR_PAYMENT;
25
+ this.paymentMethod = null;
26
+ this.paymentMethodId = enums_1.EPaymentMethodId.ACCOUNT_MONEY;
27
+ this.posId = '';
28
+ this.status = enums_1.EMpStatus.PENDING;
29
+ this.statusDetail = enums_1.EMpStatusDetail.ACCREDITED;
30
+ this.transactionAmount = 0;
31
+ this.transactionAmountRefunded = 0;
32
+ this.total = null;
33
+ this.balance = null;
34
+ this.transactionStatus = enums_1.ETransactionStatus.PROCESSING;
35
+ this.createdAt = new Date();
36
+ this.updatedAt = new Date();
37
+ if (data) {
38
+ for (var key in data) {
39
+ if (data.hasOwnProperty(key) && key in this) {
40
+ this[key] = data[key];
41
+ }
42
+ }
43
+ }
44
+ }
45
+ return TransactionEntity;
46
+ }());
47
+ exports.TransactionEntity = TransactionEntity;
@@ -1,2 +1,3 @@
1
1
  export * from './enums';
2
2
  export * from './interfaces';
3
+ export * from './entities';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./enums"), exports);
18
18
  __exportStar(require("./interfaces"), exports);
19
+ __exportStar(require("./entities"), exports);
@@ -1,4 +1,4 @@
1
- export interface IFeeDeatil {
1
+ export interface IFeeDetail {
2
2
  amount: number;
3
3
  feePayer: 'collector' | string;
4
4
  type: 'mercadopago_fee' | 'application_fee' | string;
@@ -1,34 +1,36 @@
1
- import { EReleaseStatus, EOperationType, EPaymentMethodId, EMpStatus, EMpStatusDetail, ETransactionStatus } from "../enums";
2
- import { ITransactionBalance } from "./i-balance";
3
- import { IFeeDeatil } from "./i-fee-detail";
4
- import { ITransactionPaymentMethod } from "./i-payment-method";
5
- import { ITransactionTotal } from "./i-total";
1
+ import { EMpStatus, EMpStatusDetail, EOperationType, EPaymentMethodId, EReleaseStatus, ETransactionStatus } from '../enums';
2
+ import { ITransactionBalance } from './i-balance';
3
+ import { IFeeDetail } from './i-fee-detail';
4
+ import { ITransactionPaymentMethod } from './i-payment-method';
5
+ import { ITransactionTotal } from './i-total';
6
6
  export interface ITransaction {
7
7
  id: string;
8
8
  referenceId: string;
9
9
  card: {};
10
10
  merchantId: string;
11
11
  containerId: string;
12
- dateApproved: Date;
12
+ dateApproved: Date | null;
13
13
  dateCreated: Date;
14
14
  dateLastUpdated: Date;
15
- dateOfExpiration: Date;
15
+ dateOfExpiration: Date | null;
16
16
  description: string;
17
17
  externalOrderReference: string;
18
- feeDetails: IFeeDeatil[];
18
+ feeDetails: IFeeDetail[];
19
19
  installments: number;
20
20
  liveMode: boolean;
21
- moneyReleaseDate: Date;
21
+ moneyReleaseDate: Date | null;
22
22
  moneyReleaseStatus: EReleaseStatus;
23
23
  operationType: EOperationType;
24
- paymentMethod: ITransactionPaymentMethod;
24
+ paymentMethod: ITransactionPaymentMethod | null;
25
25
  paymentMethodId: EPaymentMethodId;
26
26
  posId: string;
27
27
  status: EMpStatus;
28
28
  statusDetail: EMpStatusDetail;
29
29
  transactionAmount: number;
30
30
  transactionAmountRefunded: number;
31
- total: ITransactionTotal;
32
- balance: ITransactionBalance;
31
+ total: ITransactionTotal | null;
32
+ balance: ITransactionBalance | null;
33
33
  transactionStatus: ETransactionStatus;
34
+ createdAt: Date;
35
+ updatedAt: Date;
34
36
  }
@@ -1,5 +1,5 @@
1
- export { ITransaction } from './i-transaction';
2
1
  export { ITransactionBalance } from './i-balance';
3
- export { IFeeDeatil } from './i-fee-detail';
2
+ export { IFeeDetail } from './i-fee-detail';
4
3
  export { ITransactionPaymentMethod } from './i-payment-method';
5
4
  export { ITransactionTotal } from './i-total';
5
+ export { ITransaction } from './i-transaction';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.2.78",
3
+ "version": "1.2.80",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",