cecon-interfaces 1.0.74 → 1.0.76

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 (93) hide show
  1. package/dist/esm2022/feature/entities/feature.entity.mjs +25 -0
  2. package/dist/esm2022/feature/entities/index.mjs +2 -0
  3. package/dist/esm2022/feature/index.mjs +3 -0
  4. package/dist/esm2022/feature/interfaces/i-feature.mjs +2 -0
  5. package/dist/esm2022/feature/interfaces/index.mjs +2 -0
  6. package/dist/esm2022/general/enums/index.mjs +2 -1
  7. package/dist/esm2022/general/enums/payment-status.enum.mjs +13 -0
  8. package/dist/esm2022/index.mjs +4 -1
  9. package/dist/esm2022/installation/entities/installation.entity.mjs +7 -9
  10. package/dist/esm2022/installation/interfaces/i-installation.mjs +1 -1
  11. package/dist/esm2022/invoice/entities/index.mjs +4 -0
  12. package/dist/esm2022/invoice/entities/invoice-item.entity.mjs +23 -0
  13. package/dist/esm2022/invoice/entities/invoice-payment-method.entity.mjs +31 -0
  14. package/dist/esm2022/invoice/entities/invoice.entity.mjs +32 -0
  15. package/dist/esm2022/invoice/enums/index.mjs +2 -0
  16. package/dist/esm2022/invoice/enums/invoices-status.enum.mjs +14 -0
  17. package/dist/esm2022/invoice/index.mjs +4 -0
  18. package/dist/esm2022/invoice/interfaces/i-invoice-item.mjs +2 -0
  19. package/dist/esm2022/invoice/interfaces/i-invoice-payment-method.mjs +2 -0
  20. package/dist/esm2022/invoice/interfaces/i-invoice.mjs +2 -0
  21. package/dist/esm2022/invoice/interfaces/index.mjs +2 -0
  22. package/dist/esm2022/subscription/entities/index.mjs +3 -0
  23. package/dist/esm2022/subscription/entities/subscription-invoice-history.entity.mjs +22 -0
  24. package/dist/esm2022/subscription/entities/subscription.entity.mjs +32 -0
  25. package/dist/esm2022/subscription/enums/index.mjs +2 -0
  26. package/dist/esm2022/subscription/enums/subscription-status.enum.mjs +15 -0
  27. package/dist/esm2022/subscription/index.mjs +4 -0
  28. package/dist/esm2022/subscription/interfaces/i-subscription-invoice-history.mjs +2 -0
  29. package/dist/esm2022/subscription/interfaces/i-subscription.mjs +2 -0
  30. package/dist/esm2022/subscription/interfaces/index.mjs +2 -0
  31. package/dist/feature/entities/feature.entity.d.ts +15 -0
  32. package/dist/feature/entities/feature.entity.js +29 -0
  33. package/dist/feature/entities/index.d.ts +1 -0
  34. package/dist/feature/entities/index.js +5 -0
  35. package/dist/feature/index.d.ts +2 -0
  36. package/dist/feature/index.js +18 -0
  37. package/dist/feature/interfaces/i-feature.d.ts +13 -0
  38. package/dist/feature/interfaces/i-feature.js +2 -0
  39. package/dist/feature/interfaces/index.d.ts +1 -0
  40. package/dist/feature/interfaces/index.js +2 -0
  41. package/dist/fesm2022/cecon-interfaces.mjs +209 -9
  42. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  43. package/dist/general/enums/index.d.ts +1 -0
  44. package/dist/general/enums/index.js +3 -1
  45. package/dist/general/enums/payment-status.enum.d.ts +11 -0
  46. package/dist/general/enums/payment-status.enum.js +15 -0
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.js +3 -0
  49. package/dist/installation/entities/installation.entity.d.ts +4 -6
  50. package/dist/installation/entities/installation.entity.js +6 -8
  51. package/dist/installation/interfaces/i-installation.d.ts +4 -6
  52. package/dist/invoice/entities/index.d.ts +3 -0
  53. package/dist/invoice/entities/index.js +9 -0
  54. package/dist/invoice/entities/invoice-item.entity.d.ts +12 -0
  55. package/dist/invoice/entities/invoice-item.entity.js +27 -0
  56. package/dist/invoice/entities/invoice-payment-method.entity.d.ts +20 -0
  57. package/dist/invoice/entities/invoice-payment-method.entity.js +35 -0
  58. package/dist/invoice/entities/invoice.entity.d.ts +23 -0
  59. package/dist/invoice/entities/invoice.entity.js +36 -0
  60. package/dist/invoice/enums/index.d.ts +1 -0
  61. package/dist/invoice/enums/index.js +5 -0
  62. package/dist/invoice/enums/invoices-status.enum.d.ts +12 -0
  63. package/dist/invoice/enums/invoices-status.enum.js +16 -0
  64. package/dist/invoice/index.d.ts +3 -0
  65. package/dist/invoice/index.js +19 -0
  66. package/dist/invoice/interfaces/i-invoice-item.d.ts +10 -0
  67. package/dist/invoice/interfaces/i-invoice-item.js +2 -0
  68. package/dist/invoice/interfaces/i-invoice-payment-method.d.ts +18 -0
  69. package/dist/invoice/interfaces/i-invoice-payment-method.js +2 -0
  70. package/dist/invoice/interfaces/i-invoice.d.ts +21 -0
  71. package/dist/invoice/interfaces/i-invoice.js +2 -0
  72. package/dist/invoice/interfaces/index.d.ts +3 -0
  73. package/dist/invoice/interfaces/index.js +2 -0
  74. package/dist/package.json +1 -1
  75. package/dist/subscription/entities/index.d.ts +2 -0
  76. package/dist/subscription/entities/index.js +7 -0
  77. package/dist/subscription/entities/subscription-invoice-history.entity.d.ts +11 -0
  78. package/dist/subscription/entities/subscription-invoice-history.entity.js +26 -0
  79. package/dist/subscription/entities/subscription.entity.d.ts +22 -0
  80. package/dist/subscription/entities/subscription.entity.js +36 -0
  81. package/dist/subscription/enums/index.d.ts +1 -0
  82. package/dist/subscription/enums/index.js +5 -0
  83. package/dist/subscription/enums/subscription-status.enum.d.ts +13 -0
  84. package/dist/subscription/enums/subscription-status.enum.js +17 -0
  85. package/dist/subscription/index.d.ts +3 -0
  86. package/dist/subscription/index.js +19 -0
  87. package/dist/subscription/interfaces/i-subscription-invoice-history.d.ts +9 -0
  88. package/dist/subscription/interfaces/i-subscription-invoice-history.js +2 -0
  89. package/dist/subscription/interfaces/i-subscription.d.ts +20 -0
  90. package/dist/subscription/interfaces/i-subscription.js +2 -0
  91. package/dist/subscription/interfaces/index.d.ts +2 -0
  92. package/dist/subscription/interfaces/index.js +2 -0
  93. package/package.json +1 -1
@@ -5,6 +5,7 @@ export { LeadOriginEnum } from './lead-origin.enum';
5
5
  export { OsEnum } from './os.enum';
6
6
  export { PaymentChannelEnum } from './payment-channel.enum';
7
7
  export { PaymentModeEnum } from './payment-mode.enum';
8
+ export { PaymentStatusEnum } from './payment-status.enum';
8
9
  export { PaymentTypeEnum } from './payment-type.enum';
9
10
  export { LegalEntiyEnum } from './person-type.enum';
10
11
  export { PlatfomrEnum } from './platform.enum';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentProviderEnum = exports.PlatfomrEnum = exports.LegalEntiyEnum = exports.PaymentTypeEnum = exports.PaymentModeEnum = exports.PaymentChannelEnum = exports.OsEnum = exports.LeadOriginEnum = exports.IntervalTypeEnum = exports.DocTypeEnum = exports.BooleanStringEnum = void 0;
3
+ exports.PaymentProviderEnum = exports.PlatfomrEnum = exports.LegalEntiyEnum = exports.PaymentTypeEnum = exports.PaymentStatusEnum = exports.PaymentModeEnum = exports.PaymentChannelEnum = exports.OsEnum = exports.LeadOriginEnum = exports.IntervalTypeEnum = exports.DocTypeEnum = exports.BooleanStringEnum = void 0;
4
4
  var boolean_string_enum_1 = require("./boolean-string.enum");
5
5
  Object.defineProperty(exports, "BooleanStringEnum", { enumerable: true, get: function () { return boolean_string_enum_1.BooleanStringEnum; } });
6
6
  var doc_type_enum_1 = require("./doc-type.enum");
@@ -15,6 +15,8 @@ var payment_channel_enum_1 = require("./payment-channel.enum");
15
15
  Object.defineProperty(exports, "PaymentChannelEnum", { enumerable: true, get: function () { return payment_channel_enum_1.PaymentChannelEnum; } });
16
16
  var payment_mode_enum_1 = require("./payment-mode.enum");
17
17
  Object.defineProperty(exports, "PaymentModeEnum", { enumerable: true, get: function () { return payment_mode_enum_1.PaymentModeEnum; } });
18
+ var payment_status_enum_1 = require("./payment-status.enum");
19
+ Object.defineProperty(exports, "PaymentStatusEnum", { enumerable: true, get: function () { return payment_status_enum_1.PaymentStatusEnum; } });
18
20
  var payment_type_enum_1 = require("./payment-type.enum");
19
21
  Object.defineProperty(exports, "PaymentTypeEnum", { enumerable: true, get: function () { return payment_type_enum_1.PaymentTypeEnum; } });
20
22
  var person_type_enum_1 = require("./person-type.enum");
@@ -0,0 +1,11 @@
1
+ export declare enum PaymentStatusEnum {
2
+ PENDING = "PENDING",
3
+ COMPLETED = "COMPLETED",
4
+ FAILED = "FAILED",
5
+ CANCELED = "CANCELED",
6
+ REFUNDED = "REFUNDED",
7
+ AUTHORIZED = "AUTHORIZED",
8
+ DECLINED = "DECLINED",
9
+ EXPIRED = "EXPIRED",
10
+ DISPUTED = "DISPUTED"
11
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentStatusEnum = void 0;
4
+ var PaymentStatusEnum;
5
+ (function (PaymentStatusEnum) {
6
+ PaymentStatusEnum["PENDING"] = "PENDING";
7
+ PaymentStatusEnum["COMPLETED"] = "COMPLETED";
8
+ PaymentStatusEnum["FAILED"] = "FAILED";
9
+ PaymentStatusEnum["CANCELED"] = "CANCELED";
10
+ PaymentStatusEnum["REFUNDED"] = "REFUNDED";
11
+ PaymentStatusEnum["AUTHORIZED"] = "AUTHORIZED";
12
+ PaymentStatusEnum["DECLINED"] = "DECLINED";
13
+ PaymentStatusEnum["EXPIRED"] = "EXPIRED";
14
+ PaymentStatusEnum["DISPUTED"] = "DISPUTED";
15
+ })(PaymentStatusEnum || (exports.PaymentStatusEnum = PaymentStatusEnum = {}));
package/dist/index.d.ts CHANGED
@@ -2,9 +2,11 @@ export * from './app';
2
2
  export * from './company';
3
3
  export * from './container';
4
4
  export * from './device';
5
+ export * from './feature';
5
6
  export * from './general';
6
7
  export * from './installation';
7
8
  export * from './invite';
9
+ export * from './invoice';
8
10
  export * from './iugu';
9
11
  export * from './lead';
10
12
  export * from './member';
@@ -13,5 +15,6 @@ export * from './order';
13
15
  export * from './partner';
14
16
  export * from './plan';
15
17
  export * from './purchases';
18
+ export * from './subscription';
16
19
  export * from './token';
17
20
  export * from './viacep';
package/dist/index.js CHANGED
@@ -18,9 +18,11 @@ __exportStar(require("./app"), exports);
18
18
  __exportStar(require("./company"), exports);
19
19
  __exportStar(require("./container"), exports);
20
20
  __exportStar(require("./device"), exports);
21
+ __exportStar(require("./feature"), exports);
21
22
  __exportStar(require("./general"), exports);
22
23
  __exportStar(require("./installation"), exports);
23
24
  __exportStar(require("./invite"), exports);
25
+ __exportStar(require("./invoice"), exports);
24
26
  __exportStar(require("./iugu"), exports);
25
27
  __exportStar(require("./lead"), exports);
26
28
  __exportStar(require("./member"), exports);
@@ -29,5 +31,6 @@ __exportStar(require("./order"), exports);
29
31
  __exportStar(require("./partner"), exports);
30
32
  __exportStar(require("./plan"), exports);
31
33
  __exportStar(require("./purchases"), exports);
34
+ __exportStar(require("./subscription"), exports);
32
35
  __exportStar(require("./token"), exports);
33
36
  __exportStar(require("./viacep"), exports);
@@ -1,20 +1,18 @@
1
1
  import { AppConfigType, AppModeEnum } from '../../app';
2
2
  import { IInstallation } from '../interfaces/i-installation';
3
3
  export declare class InstallationEntity implements IInstallation {
4
- activationDate: Date;
5
4
  active: boolean;
5
+ appIconUrl: string;
6
6
  appId: string;
7
+ appName: string;
7
8
  createdAt: Date;
8
9
  customConfig: AppConfigType;
9
10
  expirationDate: Date;
10
- iconUrl: string;
11
+ featureId: string;
11
12
  id: string;
12
- isPaid: boolean;
13
13
  mode: AppModeEnum;
14
- name: string;
15
- orderId: string;
16
- renewPaymentDate: Date;
17
14
  subscriptionId: string;
15
+ suspended: boolean;
18
16
  tags: string[];
19
17
  updatedAt: Date;
20
18
  version: string;
@@ -3,24 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InstallationEntity = void 0;
4
4
  var app_1 = require("../../app");
5
5
  var InstallationEntity = /** @class */ (function () {
6
- // #endregion Properties (17)
6
+ // #endregion Properties (15)
7
7
  // #region Constructors (1)
8
8
  function InstallationEntity(data) {
9
- // #region Properties (17)
10
- this.activationDate = new Date();
9
+ // #region Properties (15)
11
10
  this.active = false;
11
+ this.appIconUrl = '';
12
12
  this.appId = '';
13
+ this.appName = '';
13
14
  this.createdAt = new Date();
14
15
  this.customConfig = null;
15
16
  this.expirationDate = new Date();
16
- this.iconUrl = '';
17
+ this.featureId = '';
17
18
  this.id = '';
18
- this.isPaid = false;
19
19
  this.mode = app_1.AppModeEnum.NATI_GO;
20
- this.name = '';
21
- this.orderId = '';
22
- this.renewPaymentDate = new Date();
23
20
  this.subscriptionId = '';
21
+ this.suspended = false;
24
22
  this.tags = [];
25
23
  this.updatedAt = new Date();
26
24
  this.version = '';
@@ -1,19 +1,17 @@
1
1
  import { AppConfigType, AppModeEnum } from '../../app';
2
2
  export interface IInstallation {
3
- activationDate: Date;
4
3
  active: boolean;
4
+ suspended: boolean;
5
+ appIconUrl: string;
5
6
  appId: string;
7
+ appName: string;
6
8
  createdAt: Date;
7
9
  customConfig: AppConfigType;
8
10
  expirationDate: Date;
9
- iconUrl: string;
10
11
  id: string;
11
- isPaid: boolean;
12
12
  mode: AppModeEnum;
13
- name: string;
14
- orderId: string;
15
- renewPaymentDate: Date;
16
13
  subscriptionId: string;
14
+ featureId: string;
17
15
  tags: string[];
18
16
  updatedAt: Date;
19
17
  version: string;
@@ -0,0 +1,3 @@
1
+ export { InvoiceItemEntity } from './invoice-item.entity';
2
+ export { InvoicePaymentMethodEntity } from './invoice-payment-method.entity';
3
+ export { InvoiceEntity } from './invoice.entity';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceEntity = exports.InvoicePaymentMethodEntity = exports.InvoiceItemEntity = void 0;
4
+ var invoice_item_entity_1 = require("./invoice-item.entity");
5
+ Object.defineProperty(exports, "InvoiceItemEntity", { enumerable: true, get: function () { return invoice_item_entity_1.InvoiceItemEntity; } });
6
+ var invoice_payment_method_entity_1 = require("./invoice-payment-method.entity");
7
+ Object.defineProperty(exports, "InvoicePaymentMethodEntity", { enumerable: true, get: function () { return invoice_payment_method_entity_1.InvoicePaymentMethodEntity; } });
8
+ var invoice_entity_1 = require("./invoice.entity");
9
+ Object.defineProperty(exports, "InvoiceEntity", { enumerable: true, get: function () { return invoice_entity_1.InvoiceEntity; } });
@@ -0,0 +1,12 @@
1
+ import { IInvoiceItem } from '../interfaces';
2
+ export declare class InvoiceItemEntity implements IInvoiceItem {
3
+ description: string;
4
+ discounts: number;
5
+ id: string;
6
+ quantity: number;
7
+ sku: string;
8
+ taxes: number;
9
+ totalPrice: number;
10
+ unitPrice: number;
11
+ constructor(data?: Partial<InvoiceItemEntity>);
12
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceItemEntity = void 0;
4
+ var InvoiceItemEntity = /** @class */ (function () {
5
+ // #endregion Properties (8)
6
+ // #region Constructors (1)
7
+ function InvoiceItemEntity(data) {
8
+ // #region Properties (8)
9
+ this.description = '';
10
+ this.discounts = 0;
11
+ this.id = '';
12
+ this.quantity = 1;
13
+ this.sku = '';
14
+ this.taxes = 0;
15
+ this.totalPrice = 0;
16
+ this.unitPrice = 0;
17
+ if (data) {
18
+ for (var key in data) {
19
+ if (data.hasOwnProperty(key) && key in this) {
20
+ this[key] = data[key];
21
+ }
22
+ }
23
+ }
24
+ }
25
+ return InvoiceItemEntity;
26
+ }());
27
+ exports.InvoiceItemEntity = InvoiceItemEntity;
@@ -0,0 +1,20 @@
1
+ import { PaymentStatusEnum, PaymentTypeEnum } from '../../general';
2
+ import { IInvoicePaymentMethod } from '../interfaces';
3
+ export declare class InvoicePaymentMethodEntity implements IInvoicePaymentMethod {
4
+ amount: number;
5
+ brand: string;
6
+ createdAt: Date;
7
+ currency: string;
8
+ expMonth: number;
9
+ expYear: number;
10
+ id: string;
11
+ last4: string;
12
+ name: string;
13
+ pixQrCode: string;
14
+ pixUrl: string;
15
+ status: PaymentStatusEnum;
16
+ transactionId: string;
17
+ type: PaymentTypeEnum;
18
+ updatedAt: Date;
19
+ constructor(data?: Partial<InvoicePaymentMethodEntity>);
20
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoicePaymentMethodEntity = void 0;
4
+ var general_1 = require("../../general");
5
+ var InvoicePaymentMethodEntity = /** @class */ (function () {
6
+ // #endregion Properties (15)
7
+ // #region Constructors (1)
8
+ function InvoicePaymentMethodEntity(data) {
9
+ // #region Properties (15)
10
+ this.amount = 0;
11
+ this.brand = '';
12
+ this.createdAt = new Date();
13
+ this.currency = '';
14
+ this.expMonth = 0;
15
+ this.expYear = 0;
16
+ this.id = '';
17
+ this.last4 = '';
18
+ this.name = '';
19
+ this.pixQrCode = '';
20
+ this.pixUrl = '';
21
+ this.status = general_1.PaymentStatusEnum.PENDING;
22
+ this.transactionId = '';
23
+ this.type = general_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 InvoicePaymentMethodEntity;
34
+ }());
35
+ exports.InvoicePaymentMethodEntity = InvoicePaymentMethodEntity;
@@ -0,0 +1,23 @@
1
+ import { InvoiceStatusEnum } from '../enums';
2
+ import { IInvoice } from '../interfaces';
3
+ import { InvoiceItemEntity } from './invoice-item.entity';
4
+ import { InvoicePaymentMethodEntity } from './invoice-payment-method.entity';
5
+ export declare class InvoiceEntity implements IInvoice {
6
+ companyId: string;
7
+ containerId: string;
8
+ createdAt: Date;
9
+ discounts: number;
10
+ dueDateAt: Date;
11
+ id: string;
12
+ invoiceNumber: string;
13
+ items: InvoiceItemEntity[];
14
+ notes: string;
15
+ paidDateAt: Date;
16
+ paymentMethod: InvoicePaymentMethodEntity[];
17
+ status: InvoiceStatusEnum;
18
+ subtotal: number;
19
+ taxes: number;
20
+ total: number;
21
+ updatedAt: Date;
22
+ constructor(data?: Partial<InvoiceEntity>);
23
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceEntity = void 0;
4
+ var enums_1 = require("../enums");
5
+ var InvoiceEntity = /** @class */ (function () {
6
+ // #endregion Properties (16)
7
+ // #region Constructors (1)
8
+ function InvoiceEntity(data) {
9
+ // #region Properties (16)
10
+ this.companyId = '';
11
+ this.containerId = '';
12
+ this.createdAt = new Date();
13
+ this.discounts = 0;
14
+ this.dueDateAt = new Date();
15
+ this.id = '';
16
+ this.invoiceNumber = '';
17
+ this.items = [];
18
+ this.notes = '';
19
+ this.paidDateAt = new Date();
20
+ this.paymentMethod = [];
21
+ this.status = enums_1.InvoiceStatusEnum.PENDING;
22
+ this.subtotal = 0;
23
+ this.taxes = 0;
24
+ this.total = 0;
25
+ this.updatedAt = new Date();
26
+ if (data) {
27
+ for (var key in data) {
28
+ if (data.hasOwnProperty(key) && key in this) {
29
+ this[key] = data[key];
30
+ }
31
+ }
32
+ }
33
+ }
34
+ return InvoiceEntity;
35
+ }());
36
+ exports.InvoiceEntity = InvoiceEntity;
@@ -0,0 +1 @@
1
+ export { InvoiceStatusEnum } from './invoices-status.enum';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceStatusEnum = void 0;
4
+ var invoices_status_enum_1 = require("./invoices-status.enum");
5
+ Object.defineProperty(exports, "InvoiceStatusEnum", { enumerable: true, get: function () { return invoices_status_enum_1.InvoiceStatusEnum; } });
@@ -0,0 +1,12 @@
1
+ export declare enum InvoiceStatusEnum {
2
+ ACTIVE = "ACTIVE",
3
+ CANCELLED = "CANCELLED",
4
+ EXPIRED = "EXPIRED",
5
+ PENDING = "PENDING",
6
+ PENDING_PAYMENT = "PENDING_PAYMENT",
7
+ PENDING_RENEWAL = "PENDING_RENEWAL",
8
+ TRIAL = "TRIAL",
9
+ FREE = "FREE",
10
+ FREE_TRIAL = "FREE_TRIAL",
11
+ FREE_TRIAL_EXPIRED = "FREE_TRIAL_EXPIRED"
12
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceStatusEnum = void 0;
4
+ var InvoiceStatusEnum;
5
+ (function (InvoiceStatusEnum) {
6
+ InvoiceStatusEnum["ACTIVE"] = "ACTIVE";
7
+ InvoiceStatusEnum["CANCELLED"] = "CANCELLED";
8
+ InvoiceStatusEnum["EXPIRED"] = "EXPIRED";
9
+ InvoiceStatusEnum["PENDING"] = "PENDING";
10
+ InvoiceStatusEnum["PENDING_PAYMENT"] = "PENDING_PAYMENT";
11
+ InvoiceStatusEnum["PENDING_RENEWAL"] = "PENDING_RENEWAL";
12
+ InvoiceStatusEnum["TRIAL"] = "TRIAL";
13
+ InvoiceStatusEnum["FREE"] = "FREE";
14
+ InvoiceStatusEnum["FREE_TRIAL"] = "FREE_TRIAL";
15
+ InvoiceStatusEnum["FREE_TRIAL_EXPIRED"] = "FREE_TRIAL_EXPIRED";
16
+ })(InvoiceStatusEnum || (exports.InvoiceStatusEnum = InvoiceStatusEnum = {}));
@@ -0,0 +1,3 @@
1
+ export * from './entities';
2
+ export * from './enums';
3
+ export * from './interfaces';
@@ -0,0 +1,19 @@
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("./entities"), exports);
18
+ __exportStar(require("./enums"), exports);
19
+ __exportStar(require("./interfaces"), exports);
@@ -0,0 +1,10 @@
1
+ export interface IInvoiceItem {
2
+ description: string;
3
+ discounts: number;
4
+ id: string;
5
+ quantity: number;
6
+ sku: string;
7
+ taxes: number;
8
+ totalPrice: number;
9
+ unitPrice: number;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { PaymentStatusEnum, PaymentTypeEnum } from '../../general';
2
+ export interface IInvoicePaymentMethod {
3
+ amount: number;
4
+ brand: string;
5
+ createdAt: Date;
6
+ currency: string;
7
+ expMonth: number;
8
+ expYear: number;
9
+ id: string;
10
+ last4: string;
11
+ name: string;
12
+ pixQrCode: string;
13
+ pixUrl: string;
14
+ status: PaymentStatusEnum;
15
+ transactionId: string;
16
+ type: PaymentTypeEnum;
17
+ updatedAt: Date;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ import { InvoiceStatusEnum } from '../enums';
2
+ import { IInvoiceItem } from './i-invoice-item';
3
+ import { IInvoicePaymentMethod } from './i-invoice-payment-method';
4
+ export interface IInvoice {
5
+ companyId: string;
6
+ containerId: string;
7
+ createdAt: Date;
8
+ discounts: number;
9
+ dueDateAt: Date;
10
+ id: string;
11
+ invoiceNumber: string;
12
+ items: IInvoiceItem[];
13
+ notes: string;
14
+ paidDateAt: Date;
15
+ paymentMethod: IInvoicePaymentMethod[];
16
+ status: InvoiceStatusEnum;
17
+ subtotal: number;
18
+ taxes: number;
19
+ total: number;
20
+ updatedAt: Date;
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export { IInvoice } from './i-invoice';
2
+ export { IInvoiceItem } from './i-invoice-item';
3
+ export { IInvoicePaymentMethod } from './i-invoice-payment-method';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
@@ -0,0 +1,2 @@
1
+ export { SubscriptionInvoiceHistoryEntity } from './subscription-invoice-history.entity';
2
+ export { SubscriptionEntity } from './subscription.entity';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionEntity = exports.SubscriptionInvoiceHistoryEntity = void 0;
4
+ var subscription_invoice_history_entity_1 = require("./subscription-invoice-history.entity");
5
+ Object.defineProperty(exports, "SubscriptionInvoiceHistoryEntity", { enumerable: true, get: function () { return subscription_invoice_history_entity_1.SubscriptionInvoiceHistoryEntity; } });
6
+ var subscription_entity_1 = require("./subscription.entity");
7
+ Object.defineProperty(exports, "SubscriptionEntity", { enumerable: true, get: function () { return subscription_entity_1.SubscriptionEntity; } });
@@ -0,0 +1,11 @@
1
+ import { OrderStatusEnum } from '../../order';
2
+ import { ISubscriptionInvoiceHistory } from '../interfaces/i-subscription-invoice-history';
3
+ export declare class SubscriptionInvoiceHistoryEntity implements ISubscriptionInvoiceHistory {
4
+ amount: number;
5
+ createdAt: Date;
6
+ dueDate: Date;
7
+ invoiceId: string;
8
+ paidDate: Date;
9
+ status: OrderStatusEnum;
10
+ constructor(data?: Partial<SubscriptionInvoiceHistoryEntity>);
11
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionInvoiceHistoryEntity = void 0;
4
+ var order_1 = require("../../order");
5
+ var SubscriptionInvoiceHistoryEntity = /** @class */ (function () {
6
+ // #endregion Properties (6)
7
+ // #region Constructors (1)
8
+ function SubscriptionInvoiceHistoryEntity(data) {
9
+ // #region Properties (6)
10
+ this.amount = 0;
11
+ this.createdAt = new Date();
12
+ this.dueDate = new Date();
13
+ this.invoiceId = '';
14
+ this.paidDate = new Date();
15
+ this.status = order_1.OrderStatusEnum.PENDING;
16
+ if (data) {
17
+ for (var key in data) {
18
+ if (data.hasOwnProperty(key) && key in this) {
19
+ this[key] = data[key];
20
+ }
21
+ }
22
+ }
23
+ }
24
+ return SubscriptionInvoiceHistoryEntity;
25
+ }());
26
+ exports.SubscriptionInvoiceHistoryEntity = SubscriptionInvoiceHistoryEntity;
@@ -0,0 +1,22 @@
1
+ import { IntervalTypeEnum } from '../../general';
2
+ import { SubscriptionStatusEnum } from '../enums';
3
+ import { ISubscription } from '../interfaces/i-subscription';
4
+ import { SubscriptionInvoiceHistoryEntity } from './subscription-invoice-history.entity';
5
+ export declare class SubscriptionEntity implements ISubscription {
6
+ cancellationReason: string;
7
+ createdAt: Date;
8
+ customerId: string;
9
+ endDate: Date;
10
+ id: string;
11
+ interval: number;
12
+ intervalType: IntervalTypeEnum;
13
+ invoiceHistory: SubscriptionInvoiceHistoryEntity[];
14
+ notes: string;
15
+ planId: string;
16
+ renewPaymentDate: Date;
17
+ startDate: Date;
18
+ status: SubscriptionStatusEnum;
19
+ trialEndDate: Date;
20
+ updatedAt: Date;
21
+ constructor(data?: Partial<SubscriptionEntity>);
22
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionEntity = void 0;
4
+ var general_1 = require("../../general");
5
+ var enums_1 = require("../enums");
6
+ var SubscriptionEntity = /** @class */ (function () {
7
+ // #endregion Properties (15)
8
+ // #region Constructors (1)
9
+ function SubscriptionEntity(data) {
10
+ // #region Properties (15)
11
+ this.cancellationReason = '';
12
+ this.createdAt = new Date();
13
+ this.customerId = '';
14
+ this.endDate = new Date();
15
+ this.id = '';
16
+ this.interval = 0;
17
+ this.intervalType = general_1.IntervalTypeEnum.MONTHS;
18
+ this.invoiceHistory = [];
19
+ this.notes = '';
20
+ this.planId = '';
21
+ this.renewPaymentDate = new Date();
22
+ this.startDate = new Date();
23
+ this.status = enums_1.SubscriptionStatusEnum.PENDING;
24
+ this.trialEndDate = new Date();
25
+ this.updatedAt = new Date();
26
+ if (data) {
27
+ for (var key in data) {
28
+ if (data.hasOwnProperty(key) && key in this) {
29
+ this[key] = data[key];
30
+ }
31
+ }
32
+ }
33
+ }
34
+ return SubscriptionEntity;
35
+ }());
36
+ exports.SubscriptionEntity = SubscriptionEntity;
@@ -0,0 +1 @@
1
+ export { SubscriptionStatusEnum } from './subscription-status.enum';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionStatusEnum = void 0;
4
+ var subscription_status_enum_1 = require("./subscription-status.enum");
5
+ Object.defineProperty(exports, "SubscriptionStatusEnum", { enumerable: true, get: function () { return subscription_status_enum_1.SubscriptionStatusEnum; } });
@@ -0,0 +1,13 @@
1
+ export declare enum SubscriptionStatusEnum {
2
+ ACTIVE = "ACTIVE",
3
+ CANCELLED = "CANCELLED",
4
+ EXPIRED = "EXPIRED",
5
+ PENDING = "PENDING",
6
+ PENDING_PAYMENT = "PENDING_PAYMENT",
7
+ PENDING_RENEWAL = "PENDING_RENEWAL",
8
+ TRIAL = "TRIAL",
9
+ FREE = "FREE",
10
+ FREE_TRIAL = "FREE_TRIAL",
11
+ FREE_TRIAL_EXPIRED = "FREE_TRIAL_EXPIRED",
12
+ SUSPENDED = "SUSPENDED"
13
+ }