cecon-interfaces 1.1.64 → 1.1.66

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/clients/entities/client-aplication-credential.entity.d.ts +8 -0
  2. package/dist/clients/entities/client-aplication-credential.entity.js +23 -0
  3. package/dist/clients/entities/client-aplication.entity.d.ts +8 -0
  4. package/dist/clients/entities/client-aplication.entity.js +23 -0
  5. package/dist/clients/entities/client.entity.d.ts +13 -0
  6. package/dist/clients/entities/client.entity.js +27 -0
  7. package/dist/clients/entities/index.d.ts +3 -0
  8. package/dist/clients/entities/index.js +9 -0
  9. package/dist/clients/index.d.ts +2 -0
  10. package/dist/clients/index.js +18 -0
  11. package/dist/clients/interfaces/i-client-aplication.d.ts +6 -0
  12. package/dist/clients/interfaces/i-client-credential.d.ts +6 -0
  13. package/dist/clients/interfaces/i-client.d.ts +12 -0
  14. package/dist/clients/interfaces/i-client.js +2 -0
  15. package/dist/clients/interfaces/index.d.ts +3 -0
  16. package/dist/clients/interfaces/index.js +2 -0
  17. package/dist/company/entities/company.entity.d.ts +2 -2
  18. package/dist/company/entities/company.entity.js +1 -1
  19. package/dist/company/interfaces/i-company.d.ts +2 -2
  20. package/dist/customer/entities/customer.entity.d.ts +26 -0
  21. package/dist/customer/entities/customer.entity.js +41 -0
  22. package/dist/customer/entities/index.d.ts +1 -0
  23. package/dist/customer/entities/index.js +5 -0
  24. package/dist/customer/enums/index.d.ts +2 -0
  25. package/dist/customer/enums/index.js +7 -0
  26. package/dist/customer/enums/interval.enum.d.ts +5 -0
  27. package/dist/customer/enums/interval.enum.js +9 -0
  28. package/dist/customer/enums/status.enum.d.ts +5 -0
  29. package/dist/customer/enums/status.enum.js +9 -0
  30. package/dist/customer/index.d.ts +3 -0
  31. package/dist/customer/index.js +19 -0
  32. package/dist/customer/interfaces/i-customer.d.ts +24 -0
  33. package/dist/customer/interfaces/i-customer.js +2 -0
  34. package/dist/customer/interfaces/index.d.ts +1 -0
  35. package/dist/customer/interfaces/index.js +2 -0
  36. package/dist/esm2022/clients/entities/client-aplication-credential.entity.mjs +19 -0
  37. package/dist/esm2022/clients/entities/client-aplication.entity.mjs +19 -0
  38. package/dist/esm2022/clients/entities/client.entity.mjs +23 -0
  39. package/dist/esm2022/clients/entities/index.mjs +4 -0
  40. package/dist/esm2022/clients/index.mjs +3 -0
  41. package/dist/esm2022/clients/interfaces/i-client-aplication.mjs +2 -0
  42. package/dist/esm2022/clients/interfaces/i-client-credential.mjs +2 -0
  43. package/dist/esm2022/clients/interfaces/i-client.mjs +2 -0
  44. package/dist/esm2022/clients/interfaces/index.mjs +2 -0
  45. package/dist/esm2022/company/entities/company.entity.mjs +3 -3
  46. package/dist/esm2022/company/interfaces/i-company.mjs +1 -1
  47. package/dist/esm2022/customer/entities/customer.entity.mjs +37 -0
  48. package/dist/esm2022/customer/entities/index.mjs +2 -0
  49. package/dist/esm2022/customer/enums/index.mjs +3 -0
  50. package/dist/esm2022/customer/enums/interval.enum.mjs +7 -0
  51. package/dist/esm2022/customer/enums/status.enum.mjs +7 -0
  52. package/dist/esm2022/customer/index.mjs +4 -0
  53. package/dist/esm2022/customer/interfaces/i-customer.mjs +2 -0
  54. package/dist/esm2022/customer/interfaces/index.mjs +2 -0
  55. package/dist/esm2022/general/enums/doc-type.enum.mjs +6 -6
  56. package/dist/esm2022/general/enums/index.mjs +2 -2
  57. package/dist/esm2022/index.mjs +4 -1
  58. package/dist/esm2022/installation/entities/installation.entity.mjs +2 -2
  59. package/dist/esm2022/installation/interfaces/i-installation.mjs +1 -1
  60. package/dist/esm2022/invite/entities/invite.entity.mjs +3 -3
  61. package/dist/esm2022/invite/interfaces/i-invite.mjs +1 -1
  62. package/dist/esm2022/invoice/entities/invoice-payer.entity.mjs +3 -3
  63. package/dist/esm2022/invoice/interfaces/i-invoice-payer.mjs +1 -1
  64. package/dist/esm2022/lead/entities/lead.entity.mjs +3 -3
  65. package/dist/esm2022/partner/entities/partner.entity.mjs +3 -3
  66. package/dist/esm2022/partner/interfaces/i-partner.mjs +1 -1
  67. package/dist/esm2022/pubsub/entities/subscription-change-status.entity.mjs +1 -1
  68. package/dist/esm2022/pubsub/interfaces/i-subscription-change-status.mjs +1 -1
  69. package/dist/esm2022/subscription/entities/index.mjs +1 -3
  70. package/dist/esm2022/subscription/entities/subscription.entity.mjs +6 -30
  71. package/dist/esm2022/subscription/index.mjs +1 -2
  72. package/dist/esm2022/subscription/interfaces/i-subscription.mjs +1 -1
  73. package/dist/esm2022/subscription/interfaces/index.mjs +1 -1
  74. package/dist/esm2022/subscription-base/entities/index.mjs +5 -0
  75. package/dist/esm2022/subscription-base/entities/subscription-base-customer.entity.mjs +21 -0
  76. package/dist/esm2022/subscription-base/entities/subscription-base-item.entity.mjs +21 -0
  77. package/dist/esm2022/subscription-base/entities/subscription-base-log.entity.mjs +19 -0
  78. package/dist/esm2022/subscription-base/entities/subscription-base.entity.mjs +43 -0
  79. package/dist/esm2022/subscription-base/enums/index.mjs +2 -0
  80. package/dist/esm2022/subscription-base/enums/subscription-status.enum.mjs +12 -0
  81. package/dist/esm2022/subscription-base/index.mjs +4 -0
  82. package/dist/esm2022/subscription-base/interfaces/i-subscription-base-customer.mjs +2 -0
  83. package/dist/esm2022/subscription-base/interfaces/i-subscription-base-item.mjs +2 -0
  84. package/dist/esm2022/subscription-base/interfaces/i-subscription-base-log.mjs +2 -0
  85. package/dist/esm2022/subscription-base/interfaces/i-subscription-base.mjs +2 -0
  86. package/dist/esm2022/subscription-base/interfaces/index.mjs +2 -0
  87. package/dist/fesm2022/cecon-interfaces.mjs +224 -78
  88. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  89. package/dist/general/enums/doc-type.enum.d.ts +1 -1
  90. package/dist/general/enums/doc-type.enum.js +6 -6
  91. package/dist/general/enums/index.d.ts +1 -1
  92. package/dist/general/enums/index.js +2 -2
  93. package/dist/index.d.ts +3 -0
  94. package/dist/index.js +3 -0
  95. package/dist/installation/entities/installation.entity.d.ts +1 -1
  96. package/dist/installation/entities/installation.entity.js +2 -2
  97. package/dist/installation/interfaces/i-installation.d.ts +1 -1
  98. package/dist/invite/entities/invite.entity.d.ts +2 -2
  99. package/dist/invite/entities/invite.entity.js +1 -1
  100. package/dist/invite/interfaces/i-invite.d.ts +2 -2
  101. package/dist/invoice/entities/invoice-payer.entity.d.ts +2 -2
  102. package/dist/invoice/entities/invoice-payer.entity.js +1 -1
  103. package/dist/invoice/interfaces/i-invoice-payer.d.ts +2 -2
  104. package/dist/lead/entities/lead.entity.d.ts +2 -2
  105. package/dist/lead/entities/lead.entity.js +1 -1
  106. package/dist/package.json +1 -1
  107. package/dist/partner/entities/partner.entity.d.ts +2 -2
  108. package/dist/partner/entities/partner.entity.js +1 -1
  109. package/dist/partner/interfaces/i-partner.d.ts +2 -2
  110. package/dist/pubsub/entities/subscription-change-status.entity.d.ts +1 -1
  111. package/dist/pubsub/interfaces/i-subscription-change-status.d.ts +1 -1
  112. package/dist/subscription/entities/index.d.ts +0 -2
  113. package/dist/subscription/entities/index.js +1 -5
  114. package/dist/subscription/entities/subscription.entity.d.ts +2 -30
  115. package/dist/subscription/entities/subscription.entity.js +32 -39
  116. package/dist/subscription/index.d.ts +0 -1
  117. package/dist/subscription/index.js +0 -1
  118. package/dist/subscription/interfaces/i-subscription.d.ts +2 -31
  119. package/dist/subscription/interfaces/index.d.ts +0 -2
  120. package/dist/subscription-base/entities/index.d.ts +4 -0
  121. package/dist/subscription-base/entities/index.js +11 -0
  122. package/dist/subscription-base/entities/subscription-base-customer.entity.d.ts +10 -0
  123. package/dist/subscription-base/entities/subscription-base-customer.entity.js +25 -0
  124. package/dist/subscription-base/entities/subscription-base-item.entity.d.ts +10 -0
  125. package/dist/{subscription/entities/subscription-item.entity.js → subscription-base/entities/subscription-base-item.entity.js} +5 -5
  126. package/dist/subscription-base/entities/subscription-base-log.entity.d.ts +8 -0
  127. package/dist/{subscription/entities/subscription-log.entity.js → subscription-base/entities/subscription-base-log.entity.js} +8 -8
  128. package/dist/subscription-base/entities/subscription-base.entity.d.ts +36 -0
  129. package/dist/subscription-base/entities/subscription-base.entity.js +47 -0
  130. package/dist/subscription-base/index.d.ts +3 -0
  131. package/dist/subscription-base/index.js +19 -0
  132. package/dist/subscription-base/interfaces/i-subscription-base-customer.d.ts +8 -0
  133. package/dist/subscription-base/interfaces/i-subscription-base-customer.js +2 -0
  134. package/dist/{subscription/interfaces/i-subscription-item.d.ts → subscription-base/interfaces/i-subscription-base-item.d.ts} +1 -1
  135. package/dist/subscription-base/interfaces/i-subscription-base-item.js +2 -0
  136. package/dist/{subscription/interfaces/i-subscription-log.d.ts → subscription-base/interfaces/i-subscription-base-log.d.ts} +1 -1
  137. package/dist/subscription-base/interfaces/i-subscription-base-log.js +2 -0
  138. package/dist/subscription-base/interfaces/i-subscription-base.d.ts +32 -0
  139. package/dist/subscription-base/interfaces/i-subscription-base.js +2 -0
  140. package/dist/subscription-base/interfaces/index.d.ts +4 -0
  141. package/dist/subscription-base/interfaces/index.js +2 -0
  142. package/package.json +1 -1
  143. package/dist/esm2022/subscription/entities/subscription-item.entity.mjs +0 -21
  144. package/dist/esm2022/subscription/entities/subscription-log.entity.mjs +0 -19
  145. package/dist/esm2022/subscription/enums/index.mjs +0 -2
  146. package/dist/esm2022/subscription/enums/subscription-status.enum.mjs +0 -12
  147. package/dist/esm2022/subscription/interfaces/i-subscription-item.mjs +0 -2
  148. package/dist/esm2022/subscription/interfaces/i-subscription-log.mjs +0 -2
  149. package/dist/subscription/entities/subscription-item.entity.d.ts +0 -10
  150. package/dist/subscription/entities/subscription-log.entity.d.ts +0 -8
  151. /package/dist/{subscription/interfaces/i-subscription-item.js → clients/interfaces/i-client-aplication.js} +0 -0
  152. /package/dist/{subscription/interfaces/i-subscription-log.js → clients/interfaces/i-client-credential.js} +0 -0
  153. /package/dist/{subscription → subscription-base}/enums/index.d.ts +0 -0
  154. /package/dist/{subscription → subscription-base}/enums/index.js +0 -0
  155. /package/dist/{subscription → subscription-base}/enums/subscription-status.enum.d.ts +0 -0
  156. /package/dist/{subscription → subscription-base}/enums/subscription-status.enum.js +0 -0
@@ -1,4 +1,4 @@
1
- export declare enum DocTypeEnum {
1
+ export declare enum EDocType {
2
2
  CPF = "CPF",
3
3
  CNPJ = "CNPJ"
4
4
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DocTypeEnum = void 0;
4
- var DocTypeEnum;
5
- (function (DocTypeEnum) {
6
- DocTypeEnum["CPF"] = "CPF";
7
- DocTypeEnum["CNPJ"] = "CNPJ";
8
- })(DocTypeEnum || (exports.DocTypeEnum = DocTypeEnum = {}));
3
+ exports.EDocType = void 0;
4
+ var EDocType;
5
+ (function (EDocType) {
6
+ EDocType["CPF"] = "CPF";
7
+ EDocType["CNPJ"] = "CNPJ";
8
+ })(EDocType || (exports.EDocType = EDocType = {}));
@@ -1,6 +1,6 @@
1
1
  export { EBankSlipStatus } from './bank-slip-status.enum';
2
2
  export { BooleanStringEnum } from './boolean-string.enum';
3
- export { DocTypeEnum } from './doc-type.enum';
3
+ export { EDocType } from './doc-type.enum';
4
4
  export { EDiscountType } from './e-discount-type.enum';
5
5
  export { EFiscalDocModelCode } from './fiscal-doc-model-code.enum';
6
6
  export { IntervalTypeEnum } from './interval-type.enum';
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ESponsorshipValues = exports.PaymentProviderEnum = exports.PlatfomrEnum = exports.LegalEntiyEnum = exports.EPaymentType = exports.PaymentStatusEnum = exports.PaymentModeEnum = exports.PaymentChannelEnum = exports.OsEnum = exports.LeadOriginEnum = exports.IntervalTypeEnum = exports.EFiscalDocModelCode = exports.EDiscountType = exports.DocTypeEnum = exports.BooleanStringEnum = exports.EBankSlipStatus = void 0;
3
+ exports.ESponsorshipValues = exports.PaymentProviderEnum = exports.PlatfomrEnum = exports.LegalEntiyEnum = exports.EPaymentType = exports.PaymentStatusEnum = exports.PaymentModeEnum = exports.PaymentChannelEnum = exports.OsEnum = exports.LeadOriginEnum = exports.IntervalTypeEnum = exports.EFiscalDocModelCode = exports.EDiscountType = exports.EDocType = exports.BooleanStringEnum = exports.EBankSlipStatus = void 0;
4
4
  var bank_slip_status_enum_1 = require("./bank-slip-status.enum");
5
5
  Object.defineProperty(exports, "EBankSlipStatus", { enumerable: true, get: function () { return bank_slip_status_enum_1.EBankSlipStatus; } });
6
6
  var boolean_string_enum_1 = require("./boolean-string.enum");
7
7
  Object.defineProperty(exports, "BooleanStringEnum", { enumerable: true, get: function () { return boolean_string_enum_1.BooleanStringEnum; } });
8
8
  var doc_type_enum_1 = require("./doc-type.enum");
9
- Object.defineProperty(exports, "DocTypeEnum", { enumerable: true, get: function () { return doc_type_enum_1.DocTypeEnum; } });
9
+ Object.defineProperty(exports, "EDocType", { enumerable: true, get: function () { return doc_type_enum_1.EDocType; } });
10
10
  var e_discount_type_enum_1 = require("./e-discount-type.enum");
11
11
  Object.defineProperty(exports, "EDiscountType", { enumerable: true, get: function () { return e_discount_type_enum_1.EDiscountType; } });
12
12
  var fiscal_doc_model_code_enum_1 = require("./fiscal-doc-model-code.enum");
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export * from './app';
2
2
  export * from './campaign';
3
+ export * from './clients';
3
4
  export * from './company';
4
5
  export * from './container';
6
+ export * from './customer';
5
7
  export * from './device';
6
8
  export * from './feature';
7
9
  export * from './general';
@@ -20,6 +22,7 @@ export * from './pubsub';
20
22
  export * from './purchases';
21
23
  export * from './resume';
22
24
  export * from './subscription';
25
+ export * from './subscription-base';
23
26
  export * from './token';
24
27
  export * from './viacep';
25
28
  export * from './voucher';
package/dist/index.js CHANGED
@@ -16,8 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./app"), exports);
18
18
  __exportStar(require("./campaign"), exports);
19
+ __exportStar(require("./clients"), exports);
19
20
  __exportStar(require("./company"), exports);
20
21
  __exportStar(require("./container"), exports);
22
+ __exportStar(require("./customer"), exports);
21
23
  __exportStar(require("./device"), exports);
22
24
  __exportStar(require("./feature"), exports);
23
25
  __exportStar(require("./general"), exports);
@@ -36,6 +38,7 @@ __exportStar(require("./pubsub"), exports);
36
38
  __exportStar(require("./purchases"), exports);
37
39
  __exportStar(require("./resume"), exports);
38
40
  __exportStar(require("./subscription"), exports);
41
+ __exportStar(require("./subscription-base"), exports);
39
42
  __exportStar(require("./token"), exports);
40
43
  __exportStar(require("./viacep"), exports);
41
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;
@@ -1,4 +1,4 @@
1
- import { DocTypeEnum } from '../../general';
1
+ import { EDocType } from '../../general';
2
2
  import { InviteStatusEnum } from '../enums';
3
3
  import { IInvite } from '../interfaces';
4
4
  export declare class InviteEntity implements IInvite {
@@ -7,7 +7,7 @@ export declare class InviteEntity implements IInvite {
7
7
  containerId: string;
8
8
  createdAt: Date;
9
9
  doc: string;
10
- docType: DocTypeEnum;
10
+ docType: EDocType;
11
11
  email: string;
12
12
  expireAt: Date;
13
13
  expired: boolean;
@@ -13,7 +13,7 @@ var InviteEntity = /** @class */ (function () {
13
13
  this.containerId = '';
14
14
  this.createdAt = new Date();
15
15
  this.doc = '';
16
- this.docType = general_1.DocTypeEnum.CNPJ;
16
+ this.docType = general_1.EDocType.CNPJ;
17
17
  this.email = '';
18
18
  this.expireAt = new Date(new Date().getTime() + 86400000);
19
19
  this.expired = false;
@@ -1,4 +1,4 @@
1
- import { DocTypeEnum } from '../../general';
1
+ import { EDocType } from '../../general';
2
2
  import { InviteStatusEnum } from '../enums';
3
3
  export interface IInvite {
4
4
  companyId: string;
@@ -6,7 +6,7 @@ export interface IInvite {
6
6
  containerId: string;
7
7
  createdAt: Date;
8
8
  doc: string;
9
- docType: DocTypeEnum;
9
+ docType: EDocType;
10
10
  email: string;
11
11
  expireAt: Date;
12
12
  expired: boolean;
@@ -1,9 +1,9 @@
1
- import { AddressEntity, DocTypeEnum } from '../../general';
1
+ import { AddressEntity, EDocType } from '../../general';
2
2
  import { IInvoicePayer } from '../interfaces/i-invoice-payer';
3
3
  export declare class InvoicePayerEntity implements IInvoicePayer {
4
4
  address: AddressEntity;
5
5
  doc: string;
6
- docType: DocTypeEnum;
6
+ docType: EDocType;
7
7
  email: string;
8
8
  name: string;
9
9
  phoneNumber: string | null;
@@ -9,7 +9,7 @@ var InvoicePayerEntity = /** @class */ (function () {
9
9
  // #region Properties (6)
10
10
  this.address = new general_1.AddressEntity();
11
11
  this.doc = '';
12
- this.docType = general_1.DocTypeEnum.CNPJ;
12
+ this.docType = general_1.EDocType.CNPJ;
13
13
  this.email = '';
14
14
  this.name = '';
15
15
  this.phoneNumber = null;
@@ -1,8 +1,8 @@
1
- import { DocTypeEnum, IAddress } from '../../general';
1
+ import { EDocType, IAddress } from '../../general';
2
2
  export interface IInvoicePayer {
3
3
  address: IAddress;
4
4
  doc: string;
5
- docType: DocTypeEnum;
5
+ docType: EDocType;
6
6
  email: string;
7
7
  name: string;
8
8
  phoneNumber: string | null;
@@ -1,4 +1,4 @@
1
- import { DocTypeEnum, LeadOriginEnum } from '../../general/enums';
1
+ import { EDocType, LeadOriginEnum } from '../../general/enums';
2
2
  import { LeadStatusEnum } from '../enums';
3
3
  import { ILead } from '../interfaces';
4
4
  export declare class LeadEntity implements ILead {
@@ -15,7 +15,7 @@ export declare class LeadEntity implements ILead {
15
15
  /**Tipo de documento (CPF, CNPJ, Passaporte, etc.). */
16
16
  doc: string;
17
17
  /**Identificador único do lead. */
18
- docType: DocTypeEnum;
18
+ docType: EDocType;
19
19
  /**Nome completo ou razão social do lead. */
20
20
  email: string;
21
21
  id: string;
@@ -21,7 +21,7 @@ var LeadEntity = /** @class */ (function () {
21
21
  /**Tipo de documento (CPF, CNPJ, Passaporte, etc.). */
22
22
  this.doc = '';
23
23
  /**Identificador único do lead. */
24
- this.docType = enums_1.DocTypeEnum.CNPJ;
24
+ this.docType = enums_1.EDocType.CNPJ;
25
25
  /**Nome completo ou razão social do lead. */
26
26
  this.email = '';
27
27
  this.id = '';
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.1.64",
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,11 +1,11 @@
1
1
  import { AddressEntity, PaymentProviderEntity } from '../../general';
2
- import { DocTypeEnum } from '../../general/enums';
2
+ import { EDocType } from '../../general/enums';
3
3
  import { IPartner } from '../interfaces';
4
4
  export declare class PartnerEntity implements IPartner {
5
5
  active: boolean;
6
6
  address: AddressEntity;
7
7
  doc: string;
8
- docType: DocTypeEnum;
8
+ docType: EDocType;
9
9
  email: string;
10
10
  fullName: string;
11
11
  id: string;
@@ -11,7 +11,7 @@ var PartnerEntity = /** @class */ (function () {
11
11
  this.active = true;
12
12
  this.address = new general_1.AddressEntity();
13
13
  this.doc = '';
14
- this.docType = enums_1.DocTypeEnum.CNPJ;
14
+ this.docType = enums_1.EDocType.CNPJ;
15
15
  this.email = '';
16
16
  this.fullName = '';
17
17
  this.id = '';
@@ -1,10 +1,10 @@
1
1
  import { IAddress, IPaymentProvider } from '../../general';
2
- import { DocTypeEnum } from '../../general/enums';
2
+ import { EDocType } from '../../general/enums';
3
3
  export interface IPartner {
4
4
  active: boolean;
5
5
  address: IAddress;
6
6
  doc: string;
7
- docType: DocTypeEnum;
7
+ docType: EDocType;
8
8
  email: string;
9
9
  level: number;
10
10
  fullName: string;
@@ -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
+ }