cecon-interfaces 1.1.17 → 1.1.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. package/dist/company/entities/company.entity.d.ts +0 -2
  2. package/dist/company/entities/company.entity.js +0 -1
  3. package/dist/company/interfaces/i-company.d.ts +4 -5
  4. package/dist/esm2022/company/entities/company.entity.mjs +1 -2
  5. package/dist/esm2022/company/interfaces/i-company.mjs +1 -1
  6. package/dist/esm2022/general/entities/index.mjs +7 -1
  7. package/dist/esm2022/general/entities/payment-card.entity.mjs +18 -0
  8. package/dist/esm2022/general/entities/payment-cash.entity.mjs +16 -0
  9. package/dist/esm2022/general/entities/payment-method-option.entity.mjs +31 -0
  10. package/dist/esm2022/general/entities/payment-method.entity.mjs +14 -18
  11. package/dist/esm2022/general/entities/payment-pix.entity.mjs +17 -0
  12. package/dist/esm2022/general/entities/payment-wallet.entity.mjs +16 -0
  13. package/dist/esm2022/general/entities/payment.entity.mjs +25 -0
  14. package/dist/esm2022/general/enums/payment-type.enum.mjs +2 -1
  15. package/dist/esm2022/general/interfaces/i-payment-card.mjs +2 -0
  16. package/dist/esm2022/general/interfaces/i-payment-cash.mjs +2 -0
  17. package/dist/esm2022/general/interfaces/i-payment-method-option.mjs +2 -0
  18. package/dist/esm2022/general/interfaces/i-payment-method.mjs +1 -1
  19. package/dist/esm2022/general/interfaces/i-payment-pix.mjs +2 -0
  20. package/dist/esm2022/general/interfaces/i-payment-wallet.mjs +2 -0
  21. package/dist/esm2022/general/interfaces/i-payment.mjs +2 -0
  22. package/dist/esm2022/general/interfaces/index.mjs +1 -1
  23. package/dist/esm2022/partner/entities/partner.entity.mjs +1 -2
  24. package/dist/esm2022/partner/interfaces/i-partner.mjs +1 -1
  25. package/dist/esm2022/subscription/entities/subscription.entity.mjs +6 -4
  26. package/dist/esm2022/subscription/interfaces/i-subscription.mjs +1 -1
  27. package/dist/fesm2022/cecon-interfaces.mjs +124 -6
  28. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  29. package/dist/general/entities/index.d.ts +6 -0
  30. package/dist/general/entities/index.js +13 -1
  31. package/dist/general/entities/payment-card.entity.d.ts +7 -0
  32. package/dist/general/entities/payment-card.entity.js +22 -0
  33. package/dist/general/entities/payment-cash.entity.d.ts +5 -0
  34. package/dist/general/entities/payment-cash.entity.js +20 -0
  35. package/dist/general/entities/payment-method-option.entity.d.ts +20 -0
  36. package/dist/general/entities/payment-method-option.entity.js +35 -0
  37. package/dist/general/entities/payment-method.entity.d.ts +17 -16
  38. package/dist/general/entities/payment-method.entity.js +13 -17
  39. package/dist/general/entities/payment-pix.entity.d.ts +6 -0
  40. package/dist/general/entities/payment-pix.entity.js +21 -0
  41. package/dist/general/entities/payment-wallet.entity.d.ts +5 -0
  42. package/dist/general/entities/payment-wallet.entity.js +20 -0
  43. package/dist/general/entities/payment.entity.d.ts +8 -0
  44. package/dist/general/entities/payment.entity.js +29 -0
  45. package/dist/general/enums/payment-type.enum.d.ts +2 -1
  46. package/dist/general/enums/payment-type.enum.js +1 -0
  47. package/dist/general/interfaces/i-payment-card.d.ts +5 -0
  48. package/dist/general/interfaces/i-payment-card.js +2 -0
  49. package/dist/general/interfaces/i-payment-cash.d.ts +3 -0
  50. package/dist/general/interfaces/i-payment-cash.js +2 -0
  51. package/dist/general/interfaces/i-payment-method-option.d.ts +18 -0
  52. package/dist/general/interfaces/i-payment-method-option.js +2 -0
  53. package/dist/general/interfaces/i-payment-method.d.ts +15 -15
  54. package/dist/general/interfaces/i-payment-pix.d.ts +4 -0
  55. package/dist/general/interfaces/i-payment-pix.js +2 -0
  56. package/dist/general/interfaces/i-payment-wallet.d.ts +3 -0
  57. package/dist/general/interfaces/i-payment-wallet.js +2 -0
  58. package/dist/general/interfaces/i-payment.d.ts +6 -0
  59. package/dist/general/interfaces/i-payment.js +2 -0
  60. package/dist/general/interfaces/index.d.ts +6 -0
  61. package/dist/package.json +1 -1
  62. package/dist/partner/entities/partner.entity.d.ts +1 -2
  63. package/dist/partner/entities/partner.entity.js +0 -1
  64. package/dist/partner/interfaces/i-partner.d.ts +1 -2
  65. package/dist/subscription/entities/subscription.entity.d.ts +3 -1
  66. package/dist/subscription/entities/subscription.entity.js +4 -2
  67. package/dist/subscription/interfaces/i-subscription.d.ts +3 -0
  68. package/package.json +1 -1
@@ -8,10 +8,16 @@ export { DeliveryAreaFixedEntity } from './dellivery-area-fixed.entity';
8
8
  export { MessagerChannelEntity } from './messager-channel.entity';
9
9
  export { MobyoApiConfigEntity } from './mobyo-apiconfig.entity';
10
10
  export { OriginEntity } from './origin.entity';
11
+ export { PaymentCardEntity } from './payment-card.entity';
12
+ export { PaymentCashEntity } from './payment-cash.entity';
13
+ export { PaymentMethodOptionEntity } from './payment-method-option.entity';
11
14
  export { PaymentMethodEntity } from './payment-method.entity';
15
+ export { PaymentPixEntity } from './payment-pix.entity';
12
16
  export { PaymentProviderAgentEntity } from './payment-provider-agent.entity';
13
17
  export { PaymentProviderEntity } from './payment-provider.entity';
14
18
  export { PaymentTokenDataEntity } from './payment-token-data.entity';
15
19
  export { PaymentTokenEntity } from './payment-token.entity';
20
+ export { PaymentWalletEntity } from './payment-wallet.entity';
21
+ export { PaymentEntity } from './payment.entity';
16
22
  export { RatingEntity } from './rating.entity';
17
23
  export { SponsorshipValueEntity } from './sponsorship-value.entity';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SponsorshipValueEntity = exports.RatingEntity = exports.PaymentTokenEntity = exports.PaymentTokenDataEntity = exports.PaymentProviderEntity = exports.PaymentProviderAgentEntity = exports.PaymentMethodEntity = exports.OriginEntity = exports.MobyoApiConfigEntity = exports.MessagerChannelEntity = exports.DeliveryAreaFixedEntity = exports.DeliveryAreaEntity = exports.CustomVariableEntity = exports.CoordsEntity = exports.CarouselImageEntity = exports.BaseEntity = exports.AddressEntity = void 0;
3
+ exports.SponsorshipValueEntity = exports.RatingEntity = exports.PaymentEntity = exports.PaymentWalletEntity = exports.PaymentTokenEntity = exports.PaymentTokenDataEntity = exports.PaymentProviderEntity = exports.PaymentProviderAgentEntity = exports.PaymentPixEntity = exports.PaymentMethodEntity = exports.PaymentMethodOptionEntity = exports.PaymentCashEntity = exports.PaymentCardEntity = exports.OriginEntity = exports.MobyoApiConfigEntity = exports.MessagerChannelEntity = exports.DeliveryAreaFixedEntity = exports.DeliveryAreaEntity = exports.CustomVariableEntity = exports.CoordsEntity = exports.CarouselImageEntity = exports.BaseEntity = exports.AddressEntity = void 0;
4
4
  var address_entity_1 = require("./address.entity");
5
5
  Object.defineProperty(exports, "AddressEntity", { enumerable: true, get: function () { return address_entity_1.AddressEntity; } });
6
6
  var base_entity_1 = require("./base.entity");
@@ -21,8 +21,16 @@ var mobyo_apiconfig_entity_1 = require("./mobyo-apiconfig.entity");
21
21
  Object.defineProperty(exports, "MobyoApiConfigEntity", { enumerable: true, get: function () { return mobyo_apiconfig_entity_1.MobyoApiConfigEntity; } });
22
22
  var origin_entity_1 = require("./origin.entity");
23
23
  Object.defineProperty(exports, "OriginEntity", { enumerable: true, get: function () { return origin_entity_1.OriginEntity; } });
24
+ var payment_card_entity_1 = require("./payment-card.entity");
25
+ Object.defineProperty(exports, "PaymentCardEntity", { enumerable: true, get: function () { return payment_card_entity_1.PaymentCardEntity; } });
26
+ var payment_cash_entity_1 = require("./payment-cash.entity");
27
+ Object.defineProperty(exports, "PaymentCashEntity", { enumerable: true, get: function () { return payment_cash_entity_1.PaymentCashEntity; } });
28
+ var payment_method_option_entity_1 = require("./payment-method-option.entity");
29
+ Object.defineProperty(exports, "PaymentMethodOptionEntity", { enumerable: true, get: function () { return payment_method_option_entity_1.PaymentMethodOptionEntity; } });
24
30
  var payment_method_entity_1 = require("./payment-method.entity");
25
31
  Object.defineProperty(exports, "PaymentMethodEntity", { enumerable: true, get: function () { return payment_method_entity_1.PaymentMethodEntity; } });
32
+ var payment_pix_entity_1 = require("./payment-pix.entity");
33
+ Object.defineProperty(exports, "PaymentPixEntity", { enumerable: true, get: function () { return payment_pix_entity_1.PaymentPixEntity; } });
26
34
  var payment_provider_agent_entity_1 = require("./payment-provider-agent.entity");
27
35
  Object.defineProperty(exports, "PaymentProviderAgentEntity", { enumerable: true, get: function () { return payment_provider_agent_entity_1.PaymentProviderAgentEntity; } });
28
36
  var payment_provider_entity_1 = require("./payment-provider.entity");
@@ -31,6 +39,10 @@ var payment_token_data_entity_1 = require("./payment-token-data.entity");
31
39
  Object.defineProperty(exports, "PaymentTokenDataEntity", { enumerable: true, get: function () { return payment_token_data_entity_1.PaymentTokenDataEntity; } });
32
40
  var payment_token_entity_1 = require("./payment-token.entity");
33
41
  Object.defineProperty(exports, "PaymentTokenEntity", { enumerable: true, get: function () { return payment_token_entity_1.PaymentTokenEntity; } });
42
+ var payment_wallet_entity_1 = require("./payment-wallet.entity");
43
+ Object.defineProperty(exports, "PaymentWalletEntity", { enumerable: true, get: function () { return payment_wallet_entity_1.PaymentWalletEntity; } });
44
+ var payment_entity_1 = require("./payment.entity");
45
+ Object.defineProperty(exports, "PaymentEntity", { enumerable: true, get: function () { return payment_entity_1.PaymentEntity; } });
34
46
  var rating_entity_1 = require("./rating.entity");
35
47
  Object.defineProperty(exports, "RatingEntity", { enumerable: true, get: function () { return rating_entity_1.RatingEntity; } });
36
48
  var sponsorship_value_entity_1 = require("./sponsorship-value.entity");
@@ -0,0 +1,7 @@
1
+ import { IPaymentCard } from '../interfaces';
2
+ export declare class PaymentCardEntity implements IPaymentCard {
3
+ brand: string;
4
+ maskedNumber: string;
5
+ tokenId: string;
6
+ constructor(data?: Partial<PaymentCardEntity>);
7
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentCardEntity = void 0;
4
+ var PaymentCardEntity = /** @class */ (function () {
5
+ // #endregion Properties (3)
6
+ // #region Constructors (1)
7
+ function PaymentCardEntity(data) {
8
+ // #region Properties (3)
9
+ this.brand = '';
10
+ this.maskedNumber = '';
11
+ this.tokenId = '';
12
+ if (data) {
13
+ for (var key in data) {
14
+ if (data.hasOwnProperty(key) && key in this) {
15
+ this[key] = data[key];
16
+ }
17
+ }
18
+ }
19
+ }
20
+ return PaymentCardEntity;
21
+ }());
22
+ exports.PaymentCardEntity = PaymentCardEntity;
@@ -0,0 +1,5 @@
1
+ import { IPaymentCash } from '../interfaces';
2
+ export declare class PaymentCashEntity implements IPaymentCash {
3
+ changeFor: number;
4
+ constructor(data?: Partial<PaymentCashEntity>);
5
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentCashEntity = void 0;
4
+ var PaymentCashEntity = /** @class */ (function () {
5
+ // #endregion Properties (1)
6
+ // #region Constructors (1)
7
+ function PaymentCashEntity(data) {
8
+ // #region Properties (1)
9
+ this.changeFor = 0;
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 PaymentCashEntity;
19
+ }());
20
+ exports.PaymentCashEntity = PaymentCashEntity;
@@ -0,0 +1,20 @@
1
+ import { PaymentChannelEnum } from '../enums/payment-channel.enum';
2
+ import { PaymentModeEnum } from '../enums/payment-mode.enum';
3
+ import { PaymentTypeEnum } from '../enums/payment-type.enum';
4
+ import { IPaymentMethodOption } from '../interfaces';
5
+ export declare class PaymentMethodOptionEntity implements IPaymentMethodOption {
6
+ active: boolean;
7
+ channel: PaymentChannelEnum;
8
+ createdAt: Date;
9
+ fee: number;
10
+ id: string;
11
+ index: number;
12
+ maxAmount: number;
13
+ minAmount: number;
14
+ mode: PaymentModeEnum;
15
+ name: string;
16
+ token: string;
17
+ type: PaymentTypeEnum;
18
+ updatedAt: Date;
19
+ constructor(data?: Partial<PaymentMethodOptionEntity>);
20
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentMethodOptionEntity = void 0;
4
+ var payment_channel_enum_1 = require("../enums/payment-channel.enum");
5
+ var payment_mode_enum_1 = require("../enums/payment-mode.enum");
6
+ var payment_type_enum_1 = require("../enums/payment-type.enum");
7
+ var PaymentMethodOptionEntity = /** @class */ (function () {
8
+ // #endregion Properties (13)
9
+ // #region Constructors (1)
10
+ function PaymentMethodOptionEntity(data) {
11
+ // #region Properties (13)
12
+ this.active = false;
13
+ this.channel = payment_channel_enum_1.PaymentChannelEnum.AUTOMATION;
14
+ this.createdAt = new Date();
15
+ this.fee = 0;
16
+ this.id = '';
17
+ this.index = 0;
18
+ this.maxAmount = 0;
19
+ this.minAmount = 0;
20
+ this.mode = payment_mode_enum_1.PaymentModeEnum.MANUAL;
21
+ this.name = '';
22
+ this.token = '';
23
+ this.type = payment_type_enum_1.PaymentTypeEnum.CREDIT_CARD;
24
+ this.updatedAt = new Date();
25
+ if (data) {
26
+ for (var key in data) {
27
+ if (data.hasOwnProperty(key) && key in this) {
28
+ this[key] = data[key];
29
+ }
30
+ }
31
+ }
32
+ }
33
+ return PaymentMethodOptionEntity;
34
+ }());
35
+ exports.PaymentMethodOptionEntity = PaymentMethodOptionEntity;
@@ -1,19 +1,20 @@
1
- import { PaymentChannelEnum } from '../enums/payment-channel.enum';
2
- import { PaymentModeEnum } from '../enums/payment-mode.enum';
3
- import { PaymentTypeEnum } from '../enums/payment-type.enum';
4
- export declare class PaymentMethodEntity {
5
- active: boolean;
6
- channel: PaymentChannelEnum;
7
- createdAt: Date;
8
- fee: number;
1
+ import { PaymentTypeEnum } from '..';
2
+ import { IPaymentMethod } from '../interfaces';
3
+ import { PaymentCardEntity } from './payment-card.entity';
4
+ import { PaymentCashEntity } from './payment-cash.entity';
5
+ import { PaymentPixEntity } from './payment-pix.entity';
6
+ import { PaymentWalletEntity } from './payment-wallet.entity';
7
+ export declare class PaymentMethodEntity implements IPaymentMethod {
8
+ card?: PaymentCardEntity | null;
9
+ cash?: PaymentCashEntity | null;
10
+ code: string;
11
+ currency: 'BRL';
9
12
  id: string;
10
- index: number;
11
- maxAmount: number;
12
- minAmount: number;
13
- mode: PaymentModeEnum;
14
- name: string;
15
- token: string;
16
- type: PaymentTypeEnum;
17
- updatedAt: Date;
13
+ method: PaymentTypeEnum;
14
+ pix?: PaymentPixEntity | null;
15
+ prepaid: boolean;
16
+ type: 'ONLINE' | 'OFFLINE';
17
+ value: number;
18
+ wallet?: PaymentWalletEntity | null;
18
19
  constructor(data?: Partial<PaymentMethodEntity>);
19
20
  }
@@ -1,27 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PaymentMethodEntity = void 0;
4
- var payment_channel_enum_1 = require("../enums/payment-channel.enum");
5
- var payment_mode_enum_1 = require("../enums/payment-mode.enum");
6
- var payment_type_enum_1 = require("../enums/payment-type.enum");
4
+ var __1 = require("..");
7
5
  var PaymentMethodEntity = /** @class */ (function () {
8
- // #endregion Properties (13)
6
+ // #endregion Properties (11)
9
7
  // #region Constructors (1)
10
8
  function PaymentMethodEntity(data) {
11
- // #region Properties (13)
12
- this.active = false;
13
- this.channel = payment_channel_enum_1.PaymentChannelEnum.AUTOMATION;
14
- this.createdAt = new Date();
15
- this.fee = 0;
9
+ // #region Properties (11)
10
+ this.card = null;
11
+ this.cash = null;
12
+ this.code = '';
13
+ this.currency = 'BRL';
16
14
  this.id = '';
17
- this.index = 0;
18
- this.maxAmount = 0;
19
- this.minAmount = 0;
20
- this.mode = payment_mode_enum_1.PaymentModeEnum.MANUAL;
21
- this.name = '';
22
- this.token = '';
23
- this.type = payment_type_enum_1.PaymentTypeEnum.CREDIT_CARD;
24
- this.updatedAt = new Date();
15
+ this.method = __1.PaymentTypeEnum.CASH;
16
+ this.pix = null;
17
+ this.prepaid = false;
18
+ this.type = 'OFFLINE';
19
+ this.value = 0;
20
+ this.wallet = null;
25
21
  if (data) {
26
22
  for (var key in data) {
27
23
  if (data.hasOwnProperty(key) && key in this) {
@@ -0,0 +1,6 @@
1
+ import { IPaymentPix } from '../interfaces';
2
+ export declare class PaymentPixEntity implements IPaymentPix {
3
+ pixKey: string;
4
+ urlQrImage: string;
5
+ constructor(data?: Partial<PaymentPixEntity>);
6
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentPixEntity = void 0;
4
+ var PaymentPixEntity = /** @class */ (function () {
5
+ // #endregion Properties (2)
6
+ // #region Constructors (1)
7
+ function PaymentPixEntity(data) {
8
+ // #region Properties (2)
9
+ this.pixKey = '';
10
+ this.urlQrImage = '';
11
+ if (data) {
12
+ for (var key in data) {
13
+ if (data.hasOwnProperty(key) && key in this) {
14
+ this[key] = data[key];
15
+ }
16
+ }
17
+ }
18
+ }
19
+ return PaymentPixEntity;
20
+ }());
21
+ exports.PaymentPixEntity = PaymentPixEntity;
@@ -0,0 +1,5 @@
1
+ import { IPaymentWallet } from '../interfaces';
2
+ export declare class PaymentWalletEntity implements IPaymentWallet {
3
+ name: string;
4
+ constructor(data?: Partial<PaymentWalletEntity>);
5
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentWalletEntity = void 0;
4
+ var PaymentWalletEntity = /** @class */ (function () {
5
+ // #endregion Properties (1)
6
+ // #region Constructors (1)
7
+ function PaymentWalletEntity(data) {
8
+ // #region Properties (1)
9
+ this.name = '';
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 PaymentWalletEntity;
19
+ }());
20
+ exports.PaymentWalletEntity = PaymentWalletEntity;
@@ -0,0 +1,8 @@
1
+ import { IPayment } from '../interfaces';
2
+ import { PaymentMethodEntity } from './payment-method.entity';
3
+ export declare class PaymentEntity implements IPayment {
4
+ methods: PaymentMethodEntity[];
5
+ pending: number;
6
+ prepaid: number;
7
+ constructor(data?: Partial<PaymentEntity>);
8
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentEntity = void 0;
4
+ var payment_method_entity_1 = require("./payment-method.entity");
5
+ var PaymentEntity = /** @class */ (function () {
6
+ // #endregion Properties (3)
7
+ // #region Constructors (1)
8
+ function PaymentEntity(data) {
9
+ // #region Properties (3)
10
+ this.methods = [];
11
+ this.pending = 0;
12
+ this.prepaid = 0;
13
+ if (data) {
14
+ for (var key in data) {
15
+ if (data.hasOwnProperty(key) && key in this) {
16
+ this[key] = data[key];
17
+ }
18
+ }
19
+ if (data.methods) {
20
+ this.methods = data.methods.map(function (method) { return new payment_method_entity_1.PaymentMethodEntity(method); });
21
+ }
22
+ else {
23
+ this.methods = [];
24
+ }
25
+ }
26
+ }
27
+ return PaymentEntity;
28
+ }());
29
+ exports.PaymentEntity = PaymentEntity;
@@ -16,5 +16,6 @@ export declare enum PaymentTypeEnum {
16
16
  WIRE_TRANSFER = "WIRE_TRANSFER",
17
17
  GIFT_CARD = "GIFT_CARD",
18
18
  VOUCHER = "VOUCHER",
19
- BILLING = "BILLING"
19
+ BILLING = "BILLING",
20
+ BANK_SLIP = "BANK_SLIP"
20
21
  }
@@ -21,4 +21,5 @@ var PaymentTypeEnum;
21
21
  PaymentTypeEnum["GIFT_CARD"] = "GIFT_CARD";
22
22
  PaymentTypeEnum["VOUCHER"] = "VOUCHER";
23
23
  PaymentTypeEnum["BILLING"] = "BILLING";
24
+ PaymentTypeEnum["BANK_SLIP"] = "BANK_SLIP";
24
25
  })(PaymentTypeEnum || (exports.PaymentTypeEnum = PaymentTypeEnum = {}));
@@ -0,0 +1,5 @@
1
+ export interface IPaymentCard {
2
+ brand: string;
3
+ maskedNumber: string;
4
+ tokenId: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface IPaymentCash {
2
+ changeFor: Number;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { PaymentChannelEnum } from '../enums/payment-channel.enum';
2
+ import { PaymentModeEnum } from '../enums/payment-mode.enum';
3
+ import { PaymentTypeEnum } from '../enums/payment-type.enum';
4
+ export interface IPaymentMethodOption {
5
+ active: boolean;
6
+ channel: PaymentChannelEnum;
7
+ createdAt: Date;
8
+ fee: number;
9
+ id: string;
10
+ index: number;
11
+ maxAmount: number;
12
+ minAmount: number;
13
+ mode: PaymentModeEnum;
14
+ name: string;
15
+ token: string;
16
+ type: PaymentTypeEnum;
17
+ updatedAt: Date;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +1,18 @@
1
- import { PaymentChannelEnum } from '../enums/payment-channel.enum';
2
- import { PaymentModeEnum } from '../enums/payment-mode.enum';
3
- import { PaymentTypeEnum } from '../enums/payment-type.enum';
1
+ import { PaymentTypeEnum } from '..';
2
+ import { IPaymentCard } from './i-payment-card';
3
+ import { IPaymentCash } from './i-payment-cash';
4
+ import { IPaymentPix } from './i-payment-pix';
5
+ import { IPaymentWallet } from './i-payment-wallet';
4
6
  export interface IPaymentMethod {
5
- active: boolean;
6
- channel: PaymentChannelEnum;
7
- createdAt: Date;
8
- fee: number;
7
+ card?: IPaymentCard | null;
8
+ cash?: IPaymentCash | null;
9
+ code: string;
10
+ currency: 'BRL';
9
11
  id: string;
10
- index: number;
11
- maxAmount: number;
12
- minAmount: number;
13
- mode: PaymentModeEnum;
14
- name: string;
15
- token: string;
16
- type: PaymentTypeEnum;
17
- updatedAt: Date;
12
+ method: PaymentTypeEnum;
13
+ pix?: IPaymentPix | null;
14
+ prepaid: boolean;
15
+ type: 'ONLINE' | 'OFFLINE';
16
+ value: number;
17
+ wallet?: IPaymentWallet | null;
18
18
  }
@@ -0,0 +1,4 @@
1
+ export interface IPaymentPix {
2
+ pixKey: string;
3
+ urlQrImage: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface IPaymentWallet {
2
+ name: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { IPaymentMethod } from '../../general';
2
+ export interface IPayment {
3
+ methods: IPaymentMethod[];
4
+ pending: number;
5
+ prepaid: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,10 +8,16 @@ export { IDeliveryAreaFixed } from './i-delivery-area-fixed';
8
8
  export { IMessagerChannel } from './i-messager-channel';
9
9
  export { IMobyoApiConfig } from './i-mobyo-api-config';
10
10
  export { IOrigin } from './i-origin';
11
+ export { IPayment } from './i-payment';
12
+ export { IPaymentCard } from './i-payment-card';
13
+ export { IPaymentCash } from './i-payment-cash';
11
14
  export { IPaymentMethod } from './i-payment-method';
15
+ export { IPaymentMethodOption } from './i-payment-method-option';
16
+ export { IPaymentPix } from './i-payment-pix';
12
17
  export { IPaymentProvider } from './i-payment-provider';
13
18
  export { IPaymentProviderAgent } from './i-payment-provider-agent';
14
19
  export { IPaymentToken } from './i-payment-token';
15
20
  export { IPaymentTokenData } from './i-payment-token-data';
21
+ export { IPaymentWallet } from './i-payment-wallet';
16
22
  export { IRating } from './i-rating';
17
23
  export { ISponsorshipValue } from './i-sponsorship-value';
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.1.17",
3
+ "version": "1.1.20",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,4 +1,4 @@
1
- import { AddressEntity, PaymentMethodEntity, PaymentProviderEntity } from '../../general';
1
+ import { AddressEntity, PaymentProviderEntity } from '../../general';
2
2
  import { DocTypeEnum } from '../../general/enums';
3
3
  import { IPartner } from '../interfaces';
4
4
  export declare class PartnerEntity implements IPartner {
@@ -14,7 +14,6 @@ export declare class PartnerEntity implements IPartner {
14
14
  logoUrl?: string;
15
15
  name: string;
16
16
  paymentProvider: PaymentProviderEntity;
17
- paymentsMethods: PaymentMethodEntity[];
18
17
  phoneNumber: string;
19
18
  sandbox: boolean;
20
19
  tags: string[];
@@ -20,7 +20,6 @@ var PartnerEntity = /** @class */ (function () {
20
20
  this.logoUrl = '';
21
21
  this.name = '';
22
22
  this.paymentProvider = new general_1.PaymentProviderEntity();
23
- this.paymentsMethods = [];
24
23
  this.phoneNumber = '';
25
24
  this.sandbox = false;
26
25
  this.tags = [];
@@ -1,4 +1,4 @@
1
- import { IAddress, IPaymentMethod, IPaymentProvider } from '../../general';
1
+ import { IAddress, IPaymentProvider } from '../../general';
2
2
  import { DocTypeEnum } from '../../general/enums';
3
3
  export interface IPartner {
4
4
  active: boolean;
@@ -13,7 +13,6 @@ export interface IPartner {
13
13
  logoUrl?: string;
14
14
  name: string;
15
15
  paymentProvider: IPaymentProvider;
16
- paymentsMethods: IPaymentMethod[];
17
16
  phoneNumber: string;
18
17
  sandbox: boolean;
19
18
  tags: string[];
@@ -1,5 +1,5 @@
1
1
  import { FeatureEntity } from '../../feature';
2
- import { CustomVariableEntity, IntervalTypeEnum } from '../../general';
2
+ import { CustomVariableEntity, IntervalTypeEnum, PaymentEntity } from '../../general';
3
3
  import { InvoiceEntity } from '../../invoice';
4
4
  import { SubscriptionStatusEnum } from '../enums';
5
5
  import { ISubscription } from '../interfaces/i-subscription';
@@ -9,6 +9,7 @@ import { SubscriptionLogEntity } from './subscription-log.entity';
9
9
  export declare class SubscriptionEntity implements ISubscription {
10
10
  amount: number;
11
11
  appId: string;
12
+ appName: string;
12
13
  cancellationReason: string;
13
14
  company: SubscriptionCompanyEntity;
14
15
  createdAt: Date;
@@ -32,5 +33,6 @@ export declare class SubscriptionEntity implements ISubscription {
32
33
  status: SubscriptionStatusEnum;
33
34
  tags: string[];
34
35
  updatedAt: Date;
36
+ payment: PaymentEntity;
35
37
  constructor(data?: Partial<SubscriptionEntity>);
36
38
  }
@@ -5,12 +5,13 @@ var general_1 = require("../../general");
5
5
  var enums_1 = require("../enums");
6
6
  var subscription_company_entity_1 = require("./subscription-company.entity");
7
7
  var SubscriptionEntity = /** @class */ (function () {
8
- // #endregion Properties (25)
8
+ // #endregion Properties (27)
9
9
  // #region Constructors (1)
10
10
  function SubscriptionEntity(data) {
11
- // #region Properties (25)
11
+ // #region Properties (27)
12
12
  this.amount = 0;
13
13
  this.appId = '';
14
+ this.appName = '';
14
15
  this.cancellationReason = '';
15
16
  this.company = new subscription_company_entity_1.SubscriptionCompanyEntity();
16
17
  this.createdAt = new Date();
@@ -34,6 +35,7 @@ var SubscriptionEntity = /** @class */ (function () {
34
35
  this.status = enums_1.SubscriptionStatusEnum.PENDING;
35
36
  this.tags = [];
36
37
  this.updatedAt = new Date();
38
+ this.payment = new general_1.PaymentEntity();
37
39
  if (data) {
38
40
  for (var key in data) {
39
41
  if (data.hasOwnProperty(key) && key in this) {
@@ -1,5 +1,6 @@
1
1
  import { IFeature } from '../../feature';
2
2
  import { ICustomVariable, IntervalTypeEnum } from '../../general';
3
+ import { IPayment } from '../../general/interfaces/i-payment';
3
4
  import { IInvoice } from '../../invoice';
4
5
  import { SubscriptionStatusEnum } from '../enums';
5
6
  import { ISubscriptionCompany } from './i-subscription-company';
@@ -8,6 +9,7 @@ import { ISubscriptionLog } from './i-subscription-log';
8
9
  export interface ISubscription {
9
10
  amount: number;
10
11
  appId: string;
12
+ appName: string;
11
13
  cancellationReason: string;
12
14
  company: ISubscriptionCompany;
13
15
  createdAt: Date;
@@ -17,6 +19,7 @@ export interface ISubscription {
17
19
  features: IFeature[];
18
20
  id: string;
19
21
  interval: number;
22
+ payment: IPayment;
20
23
  intervalType: IntervalTypeEnum;
21
24
  invoices: IInvoice[];
22
25
  items: ISubscriptionItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.1.17",
3
+ "version": "1.1.20",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",