cecon-interfaces 1.9.99 → 2.0.2

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 (25) hide show
  1. package/dist/esm2022/firebank/entities/withdraw/index.mjs +2 -1
  2. package/dist/esm2022/firebank/entities/withdraw/withdraw-event.entity.mjs +36 -0
  3. package/dist/esm2022/firebank/enums/index.mjs +2 -1
  4. package/dist/esm2022/firebank/enums/withdraw-event.enum.mjs +8 -0
  5. package/dist/esm2022/firebank/interfaces/withdraw/i-withdraw-event.mjs +2 -0
  6. package/dist/esm2022/firebank/interfaces/withdraw/index.mjs +1 -1
  7. package/dist/esm2022/general/entities/pix-keys.entity.mjs +3 -1
  8. package/dist/esm2022/general/interfaces/i-pix-key.mjs +1 -1
  9. package/dist/fesm2022/cecon-interfaces.mjs +46 -1
  10. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  11. package/dist/firebank/entities/withdraw/index.d.ts +1 -0
  12. package/dist/firebank/entities/withdraw/index.js +4 -1
  13. package/dist/firebank/entities/withdraw/withdraw-event.entity.d.ts +23 -0
  14. package/dist/firebank/entities/withdraw/withdraw-event.entity.js +42 -0
  15. package/dist/firebank/enums/index.d.ts +1 -0
  16. package/dist/firebank/enums/index.js +3 -1
  17. package/dist/firebank/enums/withdraw-event.enum.d.ts +6 -0
  18. package/dist/firebank/enums/withdraw-event.enum.js +10 -0
  19. package/dist/firebank/interfaces/withdraw/i-withdraw-event.d.ts +20 -0
  20. package/dist/firebank/interfaces/withdraw/i-withdraw-event.js +2 -0
  21. package/dist/firebank/interfaces/withdraw/index.d.ts +1 -0
  22. package/dist/general/entities/pix-keys.entity.d.ts +2 -0
  23. package/dist/general/entities/pix-keys.entity.js +2 -0
  24. package/dist/general/interfaces/i-pix-key.d.ts +2 -0
  25. package/package.json +1 -1
@@ -1 +1,2 @@
1
+ export { FirebankWithdrawEventDataEntity, FirebankWithdrawEventEntity } from './withdraw-event.entity';
1
2
  export { FirebankWithdrawEntity, FirebankWithdrawRecipientEntity } from './withdraw.entity';
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FirebankWithdrawRecipientEntity = exports.FirebankWithdrawEntity = void 0;
3
+ exports.FirebankWithdrawRecipientEntity = exports.FirebankWithdrawEntity = exports.FirebankWithdrawEventEntity = exports.FirebankWithdrawEventDataEntity = void 0;
4
+ var withdraw_event_entity_1 = require("./withdraw-event.entity");
5
+ Object.defineProperty(exports, "FirebankWithdrawEventDataEntity", { enumerable: true, get: function () { return withdraw_event_entity_1.FirebankWithdrawEventDataEntity; } });
6
+ Object.defineProperty(exports, "FirebankWithdrawEventEntity", { enumerable: true, get: function () { return withdraw_event_entity_1.FirebankWithdrawEventEntity; } });
4
7
  var withdraw_entity_1 = require("./withdraw.entity");
5
8
  Object.defineProperty(exports, "FirebankWithdrawEntity", { enumerable: true, get: function () { return withdraw_entity_1.FirebankWithdrawEntity; } });
6
9
  Object.defineProperty(exports, "FirebankWithdrawRecipientEntity", { enumerable: true, get: function () { return withdraw_entity_1.FirebankWithdrawRecipientEntity; } });
@@ -0,0 +1,23 @@
1
+ import { EFirebankWithdrawEvent, EFirebankWithdrawStatus } from '../../enums';
2
+ import { IFirebankWithdrawEvent, IFirebankWithdrawEventData } from '../../interfaces';
3
+ export declare class FirebankWithdrawEventDataEntity implements IFirebankWithdrawEventData {
4
+ amount: number;
5
+ chargeId: string;
6
+ endToEndId: string;
7
+ paidAmount: number;
8
+ paidAt: Date;
9
+ payer: {
10
+ name: string;
11
+ document: string;
12
+ };
13
+ status: EFirebankWithdrawStatus;
14
+ constructor(data?: Partial<FirebankWithdrawEventDataEntity>);
15
+ }
16
+ export declare class FirebankWithdrawEventEntity implements IFirebankWithdrawEvent {
17
+ chargeId: string;
18
+ data: IFirebankWithdrawEventData;
19
+ event: EFirebankWithdrawEvent;
20
+ externalId: string;
21
+ timestamp: Date;
22
+ constructor(data?: Partial<FirebankWithdrawEventEntity>);
23
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FirebankWithdrawEventEntity = exports.FirebankWithdrawEventDataEntity = void 0;
4
+ var enums_1 = require("../../enums");
5
+ var FirebankWithdrawEventDataEntity = /** @class */ (function () {
6
+ function FirebankWithdrawEventDataEntity(data) {
7
+ this.amount = 0;
8
+ this.chargeId = '';
9
+ this.endToEndId = '';
10
+ this.paidAmount = 0;
11
+ this.paidAt = new Date();
12
+ this.payer = { name: '', document: '' };
13
+ this.status = enums_1.EFirebankWithdrawStatus.PROCESSING;
14
+ if (data) {
15
+ for (var key in data) {
16
+ if (data.hasOwnProperty(key) && key in this) {
17
+ this[key] = data[key];
18
+ }
19
+ }
20
+ }
21
+ }
22
+ return FirebankWithdrawEventDataEntity;
23
+ }());
24
+ exports.FirebankWithdrawEventDataEntity = FirebankWithdrawEventDataEntity;
25
+ var FirebankWithdrawEventEntity = /** @class */ (function () {
26
+ function FirebankWithdrawEventEntity(data) {
27
+ this.chargeId = '';
28
+ this.data = new FirebankWithdrawEventDataEntity();
29
+ this.event = enums_1.EFirebankWithdrawEvent.CHARGE_PAID;
30
+ this.externalId = '';
31
+ this.timestamp = new Date();
32
+ if (data) {
33
+ for (var key in data) {
34
+ if (data.hasOwnProperty(key) && key in this) {
35
+ this[key] = data[key];
36
+ }
37
+ }
38
+ }
39
+ }
40
+ return FirebankWithdrawEventEntity;
41
+ }());
42
+ exports.FirebankWithdrawEventEntity = FirebankWithdrawEventEntity;
@@ -1,3 +1,4 @@
1
1
  export { EFirebankTransactionStatus } from './transaction-status.enum';
2
2
  export { EFirebankWithdrawDetailsKey } from './withdraw-detais-key.enum';
3
+ export { EFirebankWithdrawEvent } from './withdraw-event.enum';
3
4
  export { EFirebankWithdrawStatus } from './withdraw-status.enum';
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EFirebankWithdrawStatus = exports.EFirebankWithdrawDetailsKey = exports.EFirebankTransactionStatus = void 0;
3
+ exports.EFirebankWithdrawStatus = exports.EFirebankWithdrawEvent = exports.EFirebankWithdrawDetailsKey = exports.EFirebankTransactionStatus = void 0;
4
4
  var transaction_status_enum_1 = require("./transaction-status.enum");
5
5
  Object.defineProperty(exports, "EFirebankTransactionStatus", { enumerable: true, get: function () { return transaction_status_enum_1.EFirebankTransactionStatus; } });
6
6
  var withdraw_detais_key_enum_1 = require("./withdraw-detais-key.enum");
7
7
  Object.defineProperty(exports, "EFirebankWithdrawDetailsKey", { enumerable: true, get: function () { return withdraw_detais_key_enum_1.EFirebankWithdrawDetailsKey; } });
8
+ var withdraw_event_enum_1 = require("./withdraw-event.enum");
9
+ Object.defineProperty(exports, "EFirebankWithdrawEvent", { enumerable: true, get: function () { return withdraw_event_enum_1.EFirebankWithdrawEvent; } });
8
10
  var withdraw_status_enum_1 = require("./withdraw-status.enum");
9
11
  Object.defineProperty(exports, "EFirebankWithdrawStatus", { enumerable: true, get: function () { return withdraw_status_enum_1.EFirebankWithdrawStatus; } });
@@ -0,0 +1,6 @@
1
+ export declare enum EFirebankWithdrawEvent {
2
+ CHARGE_PAID = "pix.charge.paid",
3
+ CHARGE_EXPIRED = "pix.charge.expired",
4
+ TRANSFER_COMPLETED = "pix.transfer.completed",
5
+ TRANSFER_FAILED = "pix.transfer.failed"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EFirebankWithdrawEvent = void 0;
4
+ var EFirebankWithdrawEvent;
5
+ (function (EFirebankWithdrawEvent) {
6
+ EFirebankWithdrawEvent["CHARGE_PAID"] = "pix.charge.paid";
7
+ EFirebankWithdrawEvent["CHARGE_EXPIRED"] = "pix.charge.expired";
8
+ EFirebankWithdrawEvent["TRANSFER_COMPLETED"] = "pix.transfer.completed";
9
+ EFirebankWithdrawEvent["TRANSFER_FAILED"] = "pix.transfer.failed";
10
+ })(EFirebankWithdrawEvent || (exports.EFirebankWithdrawEvent = EFirebankWithdrawEvent = {}));
@@ -0,0 +1,20 @@
1
+ import { EFirebankWithdrawEvent, EFirebankWithdrawStatus } from '../../enums';
2
+ export interface IFirebankWithdrawEvent {
3
+ chargeId: string;
4
+ data: IFirebankWithdrawEventData;
5
+ event: EFirebankWithdrawEvent;
6
+ externalId: string;
7
+ timestamp: Date;
8
+ }
9
+ export interface IFirebankWithdrawEventData {
10
+ chargeId: string;
11
+ status: EFirebankWithdrawStatus;
12
+ amount: number;
13
+ paidAmount: number;
14
+ paidAt: Date;
15
+ endToEndId: string;
16
+ payer: {
17
+ name: string;
18
+ document: string;
19
+ };
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export { IFirebankWithdraw, IFirebankWithdrawRecipient } from './i-withdraw';
2
+ export { IFirebankWithdrawEvent, IFirebankWithdrawEventData } from './i-withdraw-event';
@@ -2,8 +2,10 @@ import { EPixKeyType } from '../enums';
2
2
  import { IPixKey } from '../interfaces/i-pix-key';
3
3
  export declare class PixKeyEntity implements IPixKey {
4
4
  description: string;
5
+ doc: string;
5
6
  isDefault: boolean;
6
7
  key: string;
8
+ name: string;
7
9
  type: EPixKeyType;
8
10
  constructor(data?: Partial<PixKeyEntity>);
9
11
  }
@@ -6,8 +6,10 @@ var enums_1 = require("../enums");
6
6
  var PixKeyEntity = /** @class */ (function () {
7
7
  function PixKeyEntity(data) {
8
8
  this.description = '';
9
+ this.doc = '';
9
10
  this.isDefault = false;
10
11
  this.key = '';
12
+ this.name = '';
11
13
  this.type = enums_1.EPixKeyType.CPF;
12
14
  if (data) {
13
15
  for (var key in data) {
@@ -2,6 +2,8 @@ import { EPixKeyType } from '../enums';
2
2
  export interface IPixKey {
3
3
  key: string;
4
4
  type: EPixKeyType;
5
+ doc: string;
6
+ name: string;
5
7
  description: string;
6
8
  isDefault: boolean;
7
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.9.99",
3
+ "version": "2.0.2",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",