cecon-interfaces 1.9.85 → 1.9.87

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.
@@ -0,0 +1,8 @@
1
+ import { ITransactionPayer } from '../interfaces/i-payer';
2
+ export declare class TransactionPayerEntity implements ITransactionPayer {
3
+ account: string | null;
4
+ bank: string | null;
5
+ branch: string | null;
6
+ name: string | null;
7
+ constructor(data?: Partial<TransactionPayerEntity>);
8
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionPayerEntity = void 0;
4
+ var TransactionPayerEntity = /** @class */ (function () {
5
+ function TransactionPayerEntity(data) {
6
+ this.account = null;
7
+ this.bank = null;
8
+ this.branch = null;
9
+ this.name = null;
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 TransactionPayerEntity;
19
+ }());
20
+ exports.TransactionPayerEntity = TransactionPayerEntity;
@@ -1,34 +1,28 @@
1
- import { EFrom, IDesenfilaInfo, IInfo, IMobyoInfo } from '../../general';
1
+ import { EFrom, IInfo } from '../../general';
2
2
  import { ENatipaySaleChannel } from '../../natipay';
3
- import { EFeePayer, EMpStatus, EMpStatusDetail, EOperationType, EPaymentMethodId, EReleaseStatus, ETransactionOperation, ETransactionProvider, ETransactionStatus } from '../enums';
3
+ import { EFeePayer, EMpStatus, EMpStatusDetail, EOperationType, EPaymentMethodId, EReleaseStatus, ETransactionProvider, ETransactionStatus } from '../enums';
4
4
  import { ITransaction } from '../interfaces';
5
5
  import { FeeDetailEntity } from './fee-detail.entity';
6
+ import { TransactionPayerEntity } from './payer.entity';
6
7
  import { TransactionBalanceEntity } from './transaction-balance.entity';
7
8
  import { TransactionPaymentMethodEntity } from './transaction-payment-method.entity';
8
9
  import { TransactionTotalEntity } from './transaction-total.entity';
9
10
  export declare class TransactionEntity implements ITransaction {
10
11
  balance: TransactionBalanceEntity | null;
11
- card: {};
12
12
  createdAt: Date;
13
- dateApproved: Date | null;
14
- dateCreated: Date;
15
- dateLastUpdated: Date;
16
- dateOfExpiration: Date | null;
13
+ data: string;
17
14
  description: string;
18
- desenfilaInfo: IDesenfilaInfo | null;
19
15
  externalOrderReference: string;
20
16
  feeDetails: FeeDetailEntity[];
21
17
  feePayer: EFeePayer;
22
18
  from: EFrom;
23
19
  id: string;
24
- installments: number;
25
- liveMode: boolean;
26
- mobyoInfo: IMobyoInfo | null;
20
+ receipt: string | null;
27
21
  moneyReleaseDate: Date | null;
28
22
  moneyReleaseStatus: EReleaseStatus;
29
23
  natiInfo: IInfo | null;
30
24
  operationType: EOperationType;
31
- payerInfo: IInfo | null;
25
+ payer: TransactionPayerEntity;
32
26
  paymentMethod: TransactionPaymentMethodEntity | null;
33
27
  paymentMethodId: EPaymentMethodId;
34
28
  posId: string;
@@ -40,11 +34,7 @@ export declare class TransactionEntity implements ITransaction {
40
34
  status: EMpStatus;
41
35
  statusDetail: EMpStatusDetail;
42
36
  total: TransactionTotalEntity | null;
43
- transactionAmount: number;
44
- transactionAmountRefunded: number;
45
- transactionOperation: ETransactionOperation;
46
37
  transactionStatus: ETransactionStatus;
47
- transactionTraceIds: string[];
48
38
  updatedAt: Date;
49
39
  constructor(data?: Partial<TransactionEntity>);
50
40
  }
@@ -4,30 +4,24 @@ exports.TransactionEntity = void 0;
4
4
  var general_1 = require("../../general");
5
5
  var natipay_1 = require("../../natipay");
6
6
  var enums_1 = require("../enums");
7
+ var payer_entity_1 = require("./payer.entity");
7
8
  var TransactionEntity = /** @class */ (function () {
8
9
  function TransactionEntity(data) {
9
10
  this.balance = null;
10
- this.card = {};
11
11
  this.createdAt = new Date();
12
- this.dateApproved = null;
13
- this.dateCreated = new Date();
14
- this.dateLastUpdated = new Date();
15
- this.dateOfExpiration = null;
12
+ this.data = '';
16
13
  this.description = '';
17
- this.desenfilaInfo = new general_1.DesenfilaInfoEntity(); // TODO: Verificar se é necessário
18
14
  this.externalOrderReference = '';
19
15
  this.feeDetails = [];
20
16
  this.feePayer = enums_1.EFeePayer.PLATFORM;
21
17
  this.from = general_1.EFrom.NATIPAY;
22
18
  this.id = '';
23
- this.installments = 0;
24
- this.liveMode = true;
25
- this.mobyoInfo = new general_1.MobyoInfoEntity(); // TODO: Verificar se é necessário
19
+ this.receipt = null;
26
20
  this.moneyReleaseDate = null;
27
21
  this.moneyReleaseStatus = enums_1.EReleaseStatus.PENDING;
28
22
  this.natiInfo = new general_1.InfoEntity();
29
23
  this.operationType = enums_1.EOperationType.REGULAR_PAYMENT;
30
- this.payerInfo = new general_1.InfoEntity();
24
+ this.payer = new payer_entity_1.TransactionPayerEntity();
31
25
  this.paymentMethod = null;
32
26
  this.paymentMethodId = enums_1.EPaymentMethodId.ACCOUNT_MONEY;
33
27
  this.posId = '';
@@ -39,11 +33,7 @@ var TransactionEntity = /** @class */ (function () {
39
33
  this.status = enums_1.EMpStatus.PENDING;
40
34
  this.statusDetail = enums_1.EMpStatusDetail.ACCREDITED;
41
35
  this.total = null;
42
- this.transactionAmount = 0;
43
- this.transactionAmountRefunded = 0;
44
- this.transactionOperation = enums_1.ETransactionOperation.STAMP_NEEDED;
45
36
  this.transactionStatus = enums_1.ETransactionStatus.PROCESSING;
46
- this.transactionTraceIds = [];
47
37
  this.updatedAt = new Date();
48
38
  if (data) {
49
39
  for (var key in data) {
@@ -0,0 +1,6 @@
1
+ export interface ITransactionPayer {
2
+ bank: string | null;
3
+ account: string | null;
4
+ branch: string | null;
5
+ name: string | null;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,21 +1,16 @@
1
- import { EFrom, IDesenfilaInfo, IInfo, IMobyoInfo } from '../../general';
1
+ import { EFrom, IInfo } from '../../general';
2
2
  import { ENatipaySaleChannel } from '../../natipay/orders/enums';
3
3
  import { EFeePayer, EMpStatus, EMpStatusDetail, EOperationType, EPaymentMethodId, EReleaseStatus, ETransactionProvider, ETransactionStatus } from '../enums';
4
- import { ETransactionOperation } from '../enums/transaction-operation.enum';
5
4
  import { ITransactionBalance } from './i-balance';
6
5
  import { IFeeDetail } from './i-fee-detail';
6
+ import { ITransactionPayer } from './i-payer';
7
7
  import { ITransactionPaymentMethod } from './i-payment-method';
8
8
  import { ITransactionTotal } from './i-total';
9
9
  export interface ITransaction {
10
10
  balance: ITransactionBalance | null;
11
- card: {};
12
11
  createdAt: Date;
13
- dateApproved: Date | null;
14
- dateCreated: Date;
15
- dateLastUpdated: Date;
16
- dateOfExpiration: Date | null;
12
+ data: string;
17
13
  description: string;
18
- desenfilaInfo: IDesenfilaInfo | null;
19
14
  externalOrderReference: string;
20
15
  feeDetails: IFeeDetail[];
21
16
  /**
@@ -27,41 +22,23 @@ export interface ITransaction {
27
22
  feePayer: EFeePayer;
28
23
  from: EFrom;
29
24
  id: string;
30
- installments: number;
31
- liveMode: boolean;
32
- mobyoInfo: IMobyoInfo | null;
33
25
  moneyReleaseDate: Date | null;
34
26
  moneyReleaseStatus: EReleaseStatus;
35
27
  natiInfo: IInfo | null;
36
28
  operationType: EOperationType;
37
- payerInfo: IInfo | null;
29
+ payer: ITransactionPayer;
38
30
  paymentMethod: ITransactionPaymentMethod | null;
39
31
  paymentMethodId: EPaymentMethodId;
40
32
  posId: string;
41
33
  provider: ETransactionProvider;
42
34
  referenceId: 'goLive' | 'engine_mobyo_fee' | 'withdraw' | string;
43
35
  resumeVersion: string;
36
+ receipt: string | null;
44
37
  saleChannel: ENatipaySaleChannel;
45
38
  stamped: string | null;
46
39
  status: EMpStatus;
47
40
  statusDetail: EMpStatusDetail;
48
41
  total: ITransactionTotal | null;
49
- transactionAmount: number;
50
- transactionAmountRefunded: number;
51
- transactionOperation: ETransactionOperation;
52
42
  transactionStatus: ETransactionStatus;
53
- /**
54
- * @description IDs das transações originais usadas para rastreamento de fees (tarifas).
55
- *
56
- * - Quando o `feePayer` for MERCHANT: utilize `id[0]` para localizar
57
- * a transação original associada à tarifa do lojista.
58
- *
59
- * - Quando o `feePayer` for PLATFORM: utilize `id[1]` para localizar
60
- * a transação original associada à tarifa da plataforma.
61
- *
62
- * @important Esses IDs são cruciais para auditoria e reconciliação,
63
- * mantendo o vínculo com as transações de origem.
64
- */
65
- transactionTraceIds: string[];
66
43
  updatedAt: Date;
67
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.9.85",
3
+ "version": "1.9.87",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",