cecon-interfaces 1.1.65 → 1.1.66

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. package/dist/esm2022/index.mjs +2 -1
  2. package/dist/esm2022/installation/entities/installation.entity.mjs +2 -2
  3. package/dist/esm2022/installation/interfaces/i-installation.mjs +1 -1
  4. package/dist/esm2022/pubsub/entities/subscription-change-status.entity.mjs +1 -1
  5. package/dist/esm2022/pubsub/interfaces/i-subscription-change-status.mjs +1 -1
  6. package/dist/esm2022/subscription/entities/index.mjs +1 -3
  7. package/dist/esm2022/subscription/entities/subscription.entity.mjs +6 -30
  8. package/dist/esm2022/subscription/index.mjs +1 -2
  9. package/dist/esm2022/subscription/interfaces/i-subscription.mjs +1 -1
  10. package/dist/esm2022/subscription/interfaces/index.mjs +1 -1
  11. package/dist/esm2022/subscription-base/entities/index.mjs +5 -0
  12. package/dist/esm2022/subscription-base/entities/subscription-base-customer.entity.mjs +21 -0
  13. package/dist/esm2022/subscription-base/entities/subscription-base-item.entity.mjs +21 -0
  14. package/dist/esm2022/subscription-base/entities/subscription-base-log.entity.mjs +19 -0
  15. package/dist/esm2022/subscription-base/entities/subscription-base.entity.mjs +43 -0
  16. package/dist/esm2022/subscription-base/enums/index.mjs +2 -0
  17. package/dist/esm2022/subscription-base/enums/subscription-status.enum.mjs +12 -0
  18. package/dist/esm2022/subscription-base/index.mjs +4 -0
  19. package/dist/esm2022/subscription-base/interfaces/i-subscription-base-customer.mjs +2 -0
  20. package/dist/esm2022/subscription-base/interfaces/i-subscription-base-item.mjs +2 -0
  21. package/dist/esm2022/subscription-base/interfaces/i-subscription-base-log.mjs +2 -0
  22. package/dist/esm2022/subscription-base/interfaces/i-subscription-base.mjs +2 -0
  23. package/dist/esm2022/subscription-base/interfaces/index.mjs +2 -0
  24. package/dist/fesm2022/cecon-interfaces.mjs +106 -68
  25. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/installation/entities/installation.entity.d.ts +1 -1
  29. package/dist/installation/entities/installation.entity.js +2 -2
  30. package/dist/installation/interfaces/i-installation.d.ts +1 -1
  31. package/dist/package.json +1 -1
  32. package/dist/pubsub/entities/subscription-change-status.entity.d.ts +1 -1
  33. package/dist/pubsub/interfaces/i-subscription-change-status.d.ts +1 -1
  34. package/dist/subscription/entities/index.d.ts +0 -2
  35. package/dist/subscription/entities/index.js +1 -5
  36. package/dist/subscription/entities/subscription.entity.d.ts +2 -30
  37. package/dist/subscription/entities/subscription.entity.js +32 -39
  38. package/dist/subscription/index.d.ts +0 -1
  39. package/dist/subscription/index.js +0 -1
  40. package/dist/subscription/interfaces/i-subscription.d.ts +2 -31
  41. package/dist/subscription/interfaces/index.d.ts +0 -2
  42. package/dist/subscription-base/entities/index.d.ts +4 -0
  43. package/dist/subscription-base/entities/index.js +11 -0
  44. package/dist/subscription-base/entities/subscription-base-customer.entity.d.ts +10 -0
  45. package/dist/subscription-base/entities/subscription-base-customer.entity.js +25 -0
  46. package/dist/subscription-base/entities/subscription-base-item.entity.d.ts +10 -0
  47. package/dist/{subscription/entities/subscription-item.entity.js → subscription-base/entities/subscription-base-item.entity.js} +5 -5
  48. package/dist/subscription-base/entities/subscription-base-log.entity.d.ts +8 -0
  49. package/dist/{subscription/entities/subscription-log.entity.js → subscription-base/entities/subscription-base-log.entity.js} +8 -8
  50. package/dist/subscription-base/entities/subscription-base.entity.d.ts +36 -0
  51. package/dist/subscription-base/entities/subscription-base.entity.js +47 -0
  52. package/dist/subscription-base/index.d.ts +3 -0
  53. package/dist/subscription-base/index.js +19 -0
  54. package/dist/subscription-base/interfaces/i-subscription-base-customer.d.ts +8 -0
  55. package/dist/{subscription/interfaces/i-subscription-item.d.ts → subscription-base/interfaces/i-subscription-base-item.d.ts} +1 -1
  56. package/dist/{subscription/interfaces/i-subscription-log.d.ts → subscription-base/interfaces/i-subscription-base-log.d.ts} +1 -1
  57. package/dist/subscription-base/interfaces/i-subscription-base-log.js +2 -0
  58. package/dist/subscription-base/interfaces/i-subscription-base.d.ts +32 -0
  59. package/dist/subscription-base/interfaces/i-subscription-base.js +2 -0
  60. package/dist/subscription-base/interfaces/index.d.ts +4 -0
  61. package/dist/subscription-base/interfaces/index.js +2 -0
  62. package/package.json +1 -1
  63. package/dist/esm2022/subscription/entities/subscription-item.entity.mjs +0 -21
  64. package/dist/esm2022/subscription/entities/subscription-log.entity.mjs +0 -19
  65. package/dist/esm2022/subscription/enums/index.mjs +0 -2
  66. package/dist/esm2022/subscription/enums/subscription-status.enum.mjs +0 -12
  67. package/dist/esm2022/subscription/interfaces/i-subscription-item.mjs +0 -2
  68. package/dist/esm2022/subscription/interfaces/i-subscription-log.mjs +0 -2
  69. package/dist/subscription/entities/subscription-item.entity.d.ts +0 -10
  70. package/dist/subscription/entities/subscription-log.entity.d.ts +0 -8
  71. /package/dist/{subscription → subscription-base}/enums/index.d.ts +0 -0
  72. /package/dist/{subscription → subscription-base}/enums/index.js +0 -0
  73. /package/dist/{subscription → subscription-base}/enums/subscription-status.enum.d.ts +0 -0
  74. /package/dist/{subscription → subscription-base}/enums/subscription-status.enum.js +0 -0
  75. /package/dist/{subscription/interfaces/i-subscription-item.js → subscription-base/interfaces/i-subscription-base-customer.js} +0 -0
  76. /package/dist/{subscription/interfaces/i-subscription-log.js → subscription-base/interfaces/i-subscription-base-item.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export * from './pubsub';
22
22
  export * from './purchases';
23
23
  export * from './resume';
24
24
  export * from './subscription';
25
+ export * from './subscription-base';
25
26
  export * from './token';
26
27
  export * from './viacep';
27
28
  export * from './voucher';
package/dist/index.js CHANGED
@@ -38,6 +38,7 @@ __exportStar(require("./pubsub"), exports);
38
38
  __exportStar(require("./purchases"), exports);
39
39
  __exportStar(require("./resume"), exports);
40
40
  __exportStar(require("./subscription"), exports);
41
+ __exportStar(require("./subscription-base"), exports);
41
42
  __exportStar(require("./token"), exports);
42
43
  __exportStar(require("./viacep"), exports);
43
44
  __exportStar(require("./voucher"), exports);
@@ -1,5 +1,5 @@
1
1
  import { AppConfigType } from '../../app';
2
- import { ESubscriptionStatus } from '../../subscription/enums/subscription-status.enum';
2
+ import { ESubscriptionStatus } from '../../subscription-base';
3
3
  import { IInstallation } from '../interfaces/i-installation';
4
4
  import { InstallationAppEntity } from './installation-app.entity';
5
5
  export declare class InstallationEntity implements IInstallation {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InstallationEntity = void 0;
4
- var subscription_status_enum_1 = require("../../subscription/enums/subscription-status.enum");
4
+ var subscription_base_1 = require("../../subscription-base");
5
5
  var installation_app_entity_1 = require("./installation-app.entity");
6
6
  var InstallationEntity = /** @class */ (function () {
7
7
  // #endregion Properties (13)
@@ -15,7 +15,7 @@ var InstallationEntity = /** @class */ (function () {
15
15
  this.featureId = '';
16
16
  this.id = '';
17
17
  this.lastCheckAt = new Date();
18
- this.status = subscription_status_enum_1.ESubscriptionStatus.PLACED;
18
+ this.status = subscription_base_1.ESubscriptionStatus.PLACED;
19
19
  this.subscriptionId = '';
20
20
  this.tags = [];
21
21
  this.trialEndDate = new Date();
@@ -1,5 +1,5 @@
1
1
  import { AppConfigType } from '../../app';
2
- import { ESubscriptionStatus } from '../../subscription/enums/subscription-status.enum';
2
+ import { ESubscriptionStatus } from '../../subscription-base';
3
3
  import { IInstallationApp } from './i-installation-app';
4
4
  export interface IInstallation {
5
5
  app: IInstallationApp;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.1.65",
3
+ "version": "1.1.66",
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 { ESubscriptionStatus } from '../../subscription';
1
+ import { ESubscriptionStatus } from '../../subscription-base';
2
2
  import { EPubSubTopicType } from '../enums';
3
3
  import { IPubsubSubscriptionChangeStatus } from '../interfaces';
4
4
  export declare class PubsubSubscriptionChangeStatusEntity implements IPubsubSubscriptionChangeStatus {
@@ -1,4 +1,4 @@
1
- import { ESubscriptionStatus } from '../../subscription';
1
+ import { ESubscriptionStatus } from '../../subscription-base';
2
2
  import { EPubSubTopicType } from '../enums';
3
3
  export interface IPubsubSubscriptionChangeStatus {
4
4
  afterStatus: ESubscriptionStatus | null;
@@ -1,4 +1,2 @@
1
1
  export { SubscriptionCompanyEntity } from './subscription-company.entity';
2
- export { SubscriptionItemEntity } from './subscription-item.entity';
3
- export { SubscriptionLogEntity } from './subscription-log.entity';
4
2
  export { SubscriptionEntity } from './subscription.entity';
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionEntity = exports.SubscriptionLogEntity = exports.SubscriptionItemEntity = exports.SubscriptionCompanyEntity = void 0;
3
+ exports.SubscriptionEntity = exports.SubscriptionCompanyEntity = void 0;
4
4
  var subscription_company_entity_1 = require("./subscription-company.entity");
5
5
  Object.defineProperty(exports, "SubscriptionCompanyEntity", { enumerable: true, get: function () { return subscription_company_entity_1.SubscriptionCompanyEntity; } });
6
- var subscription_item_entity_1 = require("./subscription-item.entity");
7
- Object.defineProperty(exports, "SubscriptionItemEntity", { enumerable: true, get: function () { return subscription_item_entity_1.SubscriptionItemEntity; } });
8
- var subscription_log_entity_1 = require("./subscription-log.entity");
9
- Object.defineProperty(exports, "SubscriptionLogEntity", { enumerable: true, get: function () { return subscription_log_entity_1.SubscriptionLogEntity; } });
10
6
  var subscription_entity_1 = require("./subscription.entity");
11
7
  Object.defineProperty(exports, "SubscriptionEntity", { enumerable: true, get: function () { return subscription_entity_1.SubscriptionEntity; } });
@@ -1,42 +1,14 @@
1
1
  import { FeatureEntity } from '../../feature';
2
- import { CustomVariableEntity, EPaymentType, IntervalTypeEnum, PaymentEntity } from '../../general';
3
- import { InvoiceEntity } from '../../invoice';
4
- import { ESubscriptionStatus } from '../enums';
2
+ import { SubscriptionBaseEntity } from '../../subscription-base/entities/subscription-base.entity';
5
3
  import { ISubscription } from '../interfaces/i-subscription';
6
4
  import { SubscriptionCompanyEntity } from './subscription-company.entity';
7
- import { SubscriptionItemEntity } from './subscription-item.entity';
8
- import { SubscriptionLogEntity } from './subscription-log.entity';
9
- export declare class SubscriptionEntity implements ISubscription {
10
- amount: number;
5
+ export declare class SubscriptionEntity extends SubscriptionBaseEntity implements ISubscription {
11
6
  appId: string;
12
7
  appName: string;
13
- cancellationReason: string;
14
8
  company: SubscriptionCompanyEntity;
15
- createdAt: Date;
16
- customVariables: CustomVariableEntity[];
17
- cycledAt: Date;
18
- expiresAt: Date;
19
9
  features: FeatureEntity[];
20
- id: string;
21
- interval: number;
22
- intervalType: IntervalTypeEnum;
23
- invoices: InvoiceEntity[];
24
- items: SubscriptionItemEntity[];
25
- logs: SubscriptionLogEntity[];
26
- notes: string;
27
10
  partnerId: string | null;
28
- payment: PaymentEntity;
29
- paymentType: EPaymentType;
30
- phoneNumberNotification: string;
31
11
  planId: string;
32
12
  planName: string;
33
- recentInvoices: InvoiceEntity[];
34
- renewPaymentDate: Date;
35
- renovatedAt: Date;
36
- startsAt: Date;
37
- status: ESubscriptionStatus;
38
- suspendedTimes: number;
39
- tags: string[];
40
- updatedAt: Date;
41
13
  constructor(data?: Partial<SubscriptionEntity>);
42
14
  }
@@ -1,53 +1,46 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
2
17
  Object.defineProperty(exports, "__esModule", { value: true });
3
18
  exports.SubscriptionEntity = void 0;
4
- var general_1 = require("../../general");
5
- var enums_1 = require("../enums");
19
+ var subscription_base_entity_1 = require("../../subscription-base/entities/subscription-base.entity");
6
20
  var subscription_company_entity_1 = require("./subscription-company.entity");
7
- var SubscriptionEntity = /** @class */ (function () {
8
- // #endregion Properties (31)
21
+ var SubscriptionEntity = /** @class */ (function (_super) {
22
+ __extends(SubscriptionEntity, _super);
23
+ // #endregion Properties (7)
9
24
  // #region Constructors (1)
10
25
  function SubscriptionEntity(data) {
11
- // #region Properties (31)
12
- this.amount = 0;
13
- this.appId = '';
14
- this.appName = '';
15
- this.cancellationReason = '';
16
- this.company = new subscription_company_entity_1.SubscriptionCompanyEntity();
17
- this.createdAt = new Date();
18
- this.customVariables = [];
19
- this.cycledAt = new Date();
20
- this.expiresAt = new Date();
21
- this.features = [];
22
- this.id = '';
23
- this.interval = 0;
24
- this.intervalType = general_1.IntervalTypeEnum.MONTHS;
25
- this.invoices = [];
26
- this.items = [];
27
- this.logs = [];
28
- this.notes = '';
29
- this.partnerId = '';
30
- this.payment = new general_1.PaymentEntity();
31
- this.paymentType = general_1.EPaymentType.NONE;
32
- this.phoneNumberNotification = '';
33
- this.planId = '';
34
- this.planName = '';
35
- this.recentInvoices = [];
36
- this.renewPaymentDate = new Date();
37
- this.renovatedAt = new Date();
38
- this.startsAt = new Date();
39
- this.status = enums_1.ESubscriptionStatus.PENDING;
40
- this.suspendedTimes = 0;
41
- this.tags = [];
42
- this.updatedAt = new Date();
26
+ var _this = _super.call(this, data) || this;
27
+ // #region Properties (7)
28
+ _this.appId = '';
29
+ _this.appName = '';
30
+ _this.company = new subscription_company_entity_1.SubscriptionCompanyEntity();
31
+ _this.features = [];
32
+ _this.partnerId = '';
33
+ _this.planId = '';
34
+ _this.planName = '';
43
35
  if (data) {
44
36
  for (var key in data) {
45
- if (data.hasOwnProperty(key) && key in this) {
46
- this[key] = data[key];
37
+ if (data.hasOwnProperty(key) && key in _this) {
38
+ _this[key] = data[key];
47
39
  }
48
40
  }
49
41
  }
42
+ return _this;
50
43
  }
51
44
  return SubscriptionEntity;
52
- }());
45
+ }(subscription_base_entity_1.SubscriptionBaseEntity));
53
46
  exports.SubscriptionEntity = SubscriptionEntity;
@@ -1,3 +1,2 @@
1
1
  export * from './entities';
2
- export * from './enums';
3
2
  export * from './interfaces';
@@ -15,5 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./entities"), exports);
18
- __exportStar(require("./enums"), exports);
19
18
  __exportStar(require("./interfaces"), exports);
@@ -1,41 +1,12 @@
1
1
  import { IFeature } from '../../feature';
2
- import { EPaymentType, ICustomVariable, IntervalTypeEnum } from '../../general';
3
- import { IPayment } from '../../general/interfaces';
4
- import { IInvoice } from '../../invoice';
5
- import { ESubscriptionStatus } from '../enums';
2
+ import { ISubscriptionBase } from '../../subscription-base/interfaces/i-subscription-base';
6
3
  import { ISubscriptionCompany } from './i-subscription-company';
7
- import { ISubscriptionItem } from './i-subscription-item';
8
- import { ISubscriptionLog } from './i-subscription-log';
9
- export interface ISubscription {
10
- amount: number;
4
+ export interface ISubscription extends ISubscriptionBase {
11
5
  appId: string;
12
6
  appName: string;
13
- cancellationReason: string;
14
7
  company: ISubscriptionCompany;
15
- createdAt: Date;
16
- customVariables: ICustomVariable[];
17
- cycledAt: Date;
18
- expiresAt: Date;
19
8
  features: IFeature[];
20
- id: string;
21
- interval: number;
22
- intervalType: IntervalTypeEnum;
23
- invoices: IInvoice[];
24
- items: ISubscriptionItem[];
25
- logs: ISubscriptionLog[];
26
- notes: string;
27
9
  partnerId: string | null;
28
- payment: IPayment;
29
- paymentType: EPaymentType;
30
- phoneNumberNotification: string;
31
10
  planId: string;
32
11
  planName: string;
33
- recentInvoices: IInvoice[];
34
- renewPaymentDate: Date;
35
- renovatedAt: Date;
36
- startsAt: Date;
37
- status: ESubscriptionStatus;
38
- suspendedTimes: number;
39
- tags: string[];
40
- updatedAt: Date;
41
12
  }
@@ -1,4 +1,2 @@
1
1
  export { ISubscription } from './i-subscription';
2
2
  export { ISubscriptionCompany } from './i-subscription-company';
3
- export { ISubscriptionItem } from './i-subscription-item';
4
- export { ISubscriptionLog } from './i-subscription-log';
@@ -0,0 +1,4 @@
1
+ export { SubscriptionBaseCustomerEntity } from './subscription-base-customer.entity';
2
+ export { SubscriptionBaseItemEntity } from './subscription-base-item.entity';
3
+ export { SubscriptionBaseLogEntity } from './subscription-base-log.entity';
4
+ export { SubscriptionBaseEntity } from './subscription-base.entity';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionBaseEntity = exports.SubscriptionBaseLogEntity = exports.SubscriptionBaseItemEntity = exports.SubscriptionBaseCustomerEntity = void 0;
4
+ var subscription_base_customer_entity_1 = require("./subscription-base-customer.entity");
5
+ Object.defineProperty(exports, "SubscriptionBaseCustomerEntity", { enumerable: true, get: function () { return subscription_base_customer_entity_1.SubscriptionBaseCustomerEntity; } });
6
+ var subscription_base_item_entity_1 = require("./subscription-base-item.entity");
7
+ Object.defineProperty(exports, "SubscriptionBaseItemEntity", { enumerable: true, get: function () { return subscription_base_item_entity_1.SubscriptionBaseItemEntity; } });
8
+ var subscription_base_log_entity_1 = require("./subscription-base-log.entity");
9
+ Object.defineProperty(exports, "SubscriptionBaseLogEntity", { enumerable: true, get: function () { return subscription_base_log_entity_1.SubscriptionBaseLogEntity; } });
10
+ var subscription_base_entity_1 = require("./subscription-base.entity");
11
+ Object.defineProperty(exports, "SubscriptionBaseEntity", { enumerable: true, get: function () { return subscription_base_entity_1.SubscriptionBaseEntity; } });
@@ -0,0 +1,10 @@
1
+ import { ISubscriptionBaseCustomer } from '../interfaces/i-subscription-base-customer';
2
+ export declare class SubscriptionBaseCustomerEntity implements ISubscriptionBaseCustomer {
3
+ doc: string | null;
4
+ docType: string | null;
5
+ id: string | null;
6
+ imageUrl: string | null;
7
+ name: string | null;
8
+ uid: string | null;
9
+ constructor(data?: Partial<SubscriptionBaseCustomerEntity>);
10
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionBaseCustomerEntity = void 0;
4
+ var SubscriptionBaseCustomerEntity = /** @class */ (function () {
5
+ // #endregion Properties (6)
6
+ // #region Constructors (1)
7
+ function SubscriptionBaseCustomerEntity(data) {
8
+ // #region Properties (6)
9
+ this.doc = '';
10
+ this.docType = '';
11
+ this.id = '';
12
+ this.imageUrl = '';
13
+ this.name = '';
14
+ this.uid = '';
15
+ if (data) {
16
+ for (var key in data) {
17
+ if (data.hasOwnProperty(key) && key in this) {
18
+ this[key] = data[key];
19
+ }
20
+ }
21
+ }
22
+ }
23
+ return SubscriptionBaseCustomerEntity;
24
+ }());
25
+ exports.SubscriptionBaseCustomerEntity = SubscriptionBaseCustomerEntity;
@@ -0,0 +1,10 @@
1
+ import { ISubscriptionBaseItem } from '../interfaces';
2
+ export declare class SubscriptionBaseItemEntity implements ISubscriptionBaseItem {
3
+ description: string;
4
+ quantity: number;
5
+ recurrent: boolean;
6
+ totalPrice: number;
7
+ unitPrice: number;
8
+ voucherKey: string | null;
9
+ constructor(data?: Partial<SubscriptionBaseItemEntity>);
10
+ }
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionItemEntity = void 0;
4
- var SubscriptionItemEntity = /** @class */ (function () {
3
+ exports.SubscriptionBaseItemEntity = void 0;
4
+ var SubscriptionBaseItemEntity = /** @class */ (function () {
5
5
  // #endregion Properties (6)
6
6
  // #region Constructors (1)
7
- function SubscriptionItemEntity(data) {
7
+ function SubscriptionBaseItemEntity(data) {
8
8
  // #region Properties (6)
9
9
  this.description = '';
10
10
  this.quantity = 1;
@@ -20,6 +20,6 @@ var SubscriptionItemEntity = /** @class */ (function () {
20
20
  }
21
21
  }
22
22
  }
23
- return SubscriptionItemEntity;
23
+ return SubscriptionBaseItemEntity;
24
24
  }());
25
- exports.SubscriptionItemEntity = SubscriptionItemEntity;
25
+ exports.SubscriptionBaseItemEntity = SubscriptionBaseItemEntity;
@@ -0,0 +1,8 @@
1
+ import { ISubscriptionBaseLog } from '../interfaces/i-subscription-base-log';
2
+ export declare class SubscriptionBaseLogEntity implements ISubscriptionBaseLog {
3
+ createdAt: Date;
4
+ description: string;
5
+ id: string;
6
+ notes: string;
7
+ constructor(data?: Partial<SubscriptionBaseLogEntity>);
8
+ }
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionLogEntity = void 0;
4
- var SubscriptionLogEntity = /** @class */ (function () {
3
+ exports.SubscriptionBaseLogEntity = void 0;
4
+ var SubscriptionBaseLogEntity = /** @class */ (function () {
5
5
  // #endregion Properties (4)
6
6
  // #region Constructors (1)
7
- function SubscriptionLogEntity(data) {
7
+ function SubscriptionBaseLogEntity(data) {
8
8
  // #region Properties (4)
9
9
  this.createdAt = new Date();
10
- this.description = "";
11
- this.id = "";
12
- this.notes = "";
10
+ this.description = '';
11
+ this.id = '';
12
+ this.notes = '';
13
13
  if (data) {
14
14
  for (var key in data) {
15
15
  if (data.hasOwnProperty(key) && key in this) {
@@ -18,6 +18,6 @@ var SubscriptionLogEntity = /** @class */ (function () {
18
18
  }
19
19
  }
20
20
  }
21
- return SubscriptionLogEntity;
21
+ return SubscriptionBaseLogEntity;
22
22
  }());
23
- exports.SubscriptionLogEntity = SubscriptionLogEntity;
23
+ exports.SubscriptionBaseLogEntity = SubscriptionBaseLogEntity;
@@ -0,0 +1,36 @@
1
+ import { FeatureEntity } from '../../feature';
2
+ import { CustomVariableEntity, EPaymentType, IntervalTypeEnum, PaymentEntity } from '../../general';
3
+ import { InvoiceEntity } from '../../invoice';
4
+ import { ESubscriptionStatus } from '../enums';
5
+ import { ISubscriptionBase } from '../interfaces/i-subscription-base';
6
+ import { SubscriptionBaseCustomerEntity } from './subscription-base-customer.entity';
7
+ import { SubscriptionBaseItemEntity } from './subscription-base-item.entity';
8
+ import { SubscriptionBaseLogEntity } from './subscription-base-log.entity';
9
+ export declare class SubscriptionBaseEntity implements ISubscriptionBase {
10
+ amount: number;
11
+ cancellationReason: string;
12
+ createdAt: Date;
13
+ customVariables: CustomVariableEntity[];
14
+ customer: SubscriptionBaseCustomerEntity;
15
+ expiresAt: Date;
16
+ features: FeatureEntity[];
17
+ id: string;
18
+ interval: number;
19
+ intervalType: IntervalTypeEnum;
20
+ invoices: InvoiceEntity[];
21
+ items: SubscriptionBaseItemEntity[];
22
+ logs: SubscriptionBaseLogEntity[];
23
+ notes: string;
24
+ payment: PaymentEntity;
25
+ paymentType: EPaymentType;
26
+ phoneNumberNotification: string;
27
+ recentInvoices: InvoiceEntity[];
28
+ renewPaymentDate: Date;
29
+ renovatedAt: Date;
30
+ startsAt: Date;
31
+ status: ESubscriptionStatus;
32
+ suspendedTimes: number;
33
+ tags: string[];
34
+ updatedAt: Date;
35
+ constructor(data?: Partial<SubscriptionBaseEntity>);
36
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionBaseEntity = void 0;
4
+ var general_1 = require("../../general");
5
+ var enums_1 = require("../enums");
6
+ var subscription_base_customer_entity_1 = require("./subscription-base-customer.entity");
7
+ var SubscriptionBaseEntity = /** @class */ (function () {
8
+ // #endregion Properties (25)
9
+ // #region Constructors (1)
10
+ function SubscriptionBaseEntity(data) {
11
+ // #region Properties (25)
12
+ this.amount = 0;
13
+ this.cancellationReason = '';
14
+ this.createdAt = new Date();
15
+ this.customVariables = [];
16
+ this.customer = new subscription_base_customer_entity_1.SubscriptionBaseCustomerEntity();
17
+ this.expiresAt = new Date();
18
+ this.features = [];
19
+ this.id = '';
20
+ this.interval = 0;
21
+ this.intervalType = general_1.IntervalTypeEnum.MONTHS;
22
+ this.invoices = [];
23
+ this.items = [];
24
+ this.logs = [];
25
+ this.notes = '';
26
+ this.payment = new general_1.PaymentEntity();
27
+ this.paymentType = general_1.EPaymentType.NONE;
28
+ this.phoneNumberNotification = '';
29
+ this.recentInvoices = [];
30
+ this.renewPaymentDate = new Date();
31
+ this.renovatedAt = new Date();
32
+ this.startsAt = new Date();
33
+ this.status = enums_1.ESubscriptionStatus.PENDING;
34
+ this.suspendedTimes = 0;
35
+ this.tags = [];
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 SubscriptionBaseEntity;
46
+ }());
47
+ exports.SubscriptionBaseEntity = SubscriptionBaseEntity;
@@ -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,8 @@
1
+ export interface ISubscriptionBaseCustomer {
2
+ doc: string | null;
3
+ docType: string | null;
4
+ id: string | null;
5
+ imageUrl: string | null;
6
+ name: string | null;
7
+ uid: string | null;
8
+ }
@@ -1,4 +1,4 @@
1
- export interface ISubscriptionItem {
1
+ export interface ISubscriptionBaseItem {
2
2
  description: string;
3
3
  quantity: number;
4
4
  recurrent: boolean;
@@ -1,4 +1,4 @@
1
- export interface ISubscriptionLog {
1
+ export interface ISubscriptionBaseLog {
2
2
  createdAt: Date;
3
3
  description: string;
4
4
  id: string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { EPaymentType, ICustomVariable, IPayment, IntervalTypeEnum } from '../../general';
2
+ import { IInvoice } from '../../invoice';
3
+ import { ESubscriptionStatus } from '../enums';
4
+ import { ISubscriptionBaseCustomer } from './i-subscription-base-customer';
5
+ import { ISubscriptionBaseItem } from './i-subscription-base-item';
6
+ import { ISubscriptionBaseLog } from './i-subscription-base-log';
7
+ export interface ISubscriptionBase {
8
+ amount: number;
9
+ cancellationReason: string;
10
+ createdAt: Date;
11
+ customVariables: ICustomVariable[];
12
+ customer: ISubscriptionBaseCustomer;
13
+ expiresAt: Date;
14
+ id: string;
15
+ interval: number;
16
+ intervalType: IntervalTypeEnum;
17
+ invoices: IInvoice[];
18
+ items: ISubscriptionBaseItem[];
19
+ logs: ISubscriptionBaseLog[];
20
+ notes: string;
21
+ payment: IPayment;
22
+ paymentType: EPaymentType;
23
+ phoneNumberNotification: string;
24
+ recentInvoices: IInvoice[];
25
+ renewPaymentDate: Date;
26
+ renovatedAt: Date;
27
+ startsAt: Date;
28
+ status: ESubscriptionStatus;
29
+ suspendedTimes: number;
30
+ tags: string[];
31
+ updatedAt: Date;
32
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export { ISubscriptionBase } from './i-subscription-base';
2
+ export { ISubscriptionBaseCustomer } from './i-subscription-base-customer';
3
+ export { ISubscriptionBaseItem } from './i-subscription-base-item';
4
+ export { ISubscriptionBaseLog } from './i-subscription-base-log';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.1.65",
3
+ "version": "1.1.66",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",