cecon-interfaces 1.6.3 → 1.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/esm2022/general/enums/index.mjs +2 -1
  2. package/dist/esm2022/general/enums/subscription-status.enum.mjs +12 -0
  3. package/dist/esm2022/payio/app/entities/app.entity.mjs +26 -0
  4. package/dist/esm2022/payio/app/entities/index.mjs +2 -0
  5. package/dist/esm2022/payio/app/index.mjs +3 -0
  6. package/dist/esm2022/payio/app/interfaces/i-app.mjs +2 -0
  7. package/dist/esm2022/payio/app/interfaces/index.mjs +2 -0
  8. package/dist/esm2022/payio/device/entities/device.entity.mjs +25 -0
  9. package/dist/esm2022/payio/device/entities/index.mjs +2 -0
  10. package/dist/esm2022/payio/device/index.mjs +3 -0
  11. package/dist/esm2022/payio/device/interfaces/i-device.mjs +2 -0
  12. package/dist/esm2022/payio/device/interfaces/index.mjs +2 -0
  13. package/dist/esm2022/payio/index.mjs +4 -1
  14. package/dist/esm2022/payio/payload/entities/payload-app.entity.mjs +3 -3
  15. package/dist/esm2022/payio/payload/entities/payload-device.entity.mjs +2 -3
  16. package/dist/esm2022/payio/payload/entities/payload-subscription.entity.mjs +3 -3
  17. package/dist/esm2022/payio/payload/interfaces/i-payload-app.mjs +1 -1
  18. package/dist/esm2022/payio/payload/interfaces/i-payload-device.mjs +1 -1
  19. package/dist/esm2022/payio/payload/interfaces/i-payload-subscription.mjs +1 -1
  20. package/dist/esm2022/payio/subscriptions/entities/index.mjs +4 -0
  21. package/dist/esm2022/payio/subscriptions/entities/subscription-item.entity.mjs +21 -0
  22. package/dist/esm2022/payio/subscriptions/entities/subscription-log.entity.mjs +19 -0
  23. package/dist/esm2022/payio/subscriptions/entities/subscription.entity.mjs +37 -0
  24. package/dist/esm2022/payio/subscriptions/index.mjs +3 -0
  25. package/dist/esm2022/payio/subscriptions/interfaces/i-subscription-item.mjs +2 -0
  26. package/dist/esm2022/payio/subscriptions/interfaces/i-subscription-log.mjs +2 -0
  27. package/dist/esm2022/payio/subscriptions/interfaces/i-subscription.mjs +2 -0
  28. package/dist/esm2022/payio/subscriptions/interfaces/index.mjs +2 -0
  29. package/dist/fesm2022/cecon-interfaces.mjs +144 -6
  30. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  31. package/dist/general/enums/index.d.ts +1 -0
  32. package/dist/general/enums/index.js +3 -1
  33. package/dist/general/enums/subscription-status.enum.d.ts +10 -0
  34. package/dist/general/enums/subscription-status.enum.js +14 -0
  35. package/dist/package.json +1 -1
  36. package/dist/payio/app/entities/app.entity.d.ts +15 -0
  37. package/dist/payio/app/entities/app.entity.js +30 -0
  38. package/dist/payio/app/entities/index.d.ts +1 -0
  39. package/dist/payio/app/entities/index.js +5 -0
  40. package/dist/payio/app/index.d.ts +2 -0
  41. package/dist/payio/app/index.js +18 -0
  42. package/dist/payio/app/interfaces/i-app.d.ts +13 -0
  43. package/dist/payio/app/interfaces/i-app.js +2 -0
  44. package/dist/payio/app/interfaces/index.d.ts +1 -0
  45. package/dist/payio/app/interfaces/index.js +2 -0
  46. package/dist/payio/device/entities/device.entity.d.ts +14 -0
  47. package/dist/payio/device/entities/device.entity.js +29 -0
  48. package/dist/payio/device/entities/index.d.ts +1 -0
  49. package/dist/payio/device/entities/index.js +5 -0
  50. package/dist/payio/device/index.d.ts +2 -0
  51. package/dist/payio/device/index.js +18 -0
  52. package/dist/payio/device/interfaces/i-device.d.ts +12 -0
  53. package/dist/payio/device/interfaces/i-device.js +2 -0
  54. package/dist/payio/device/interfaces/index.d.ts +1 -0
  55. package/dist/payio/device/interfaces/index.js +2 -0
  56. package/dist/payio/index.d.ts +3 -0
  57. package/dist/payio/index.js +3 -0
  58. package/dist/payio/payload/entities/payload-app.entity.d.ts +2 -2
  59. package/dist/payio/payload/entities/payload-app.entity.js +2 -2
  60. package/dist/payio/payload/entities/payload-device.entity.d.ts +1 -2
  61. package/dist/payio/payload/entities/payload-device.entity.js +1 -2
  62. package/dist/payio/payload/entities/payload-subscription.entity.d.ts +2 -2
  63. package/dist/payio/payload/entities/payload-subscription.entity.js +2 -2
  64. package/dist/payio/payload/interfaces/i-payload-app.d.ts +2 -2
  65. package/dist/payio/payload/interfaces/i-payload-device.d.ts +1 -2
  66. package/dist/payio/payload/interfaces/i-payload-subscription.d.ts +2 -2
  67. package/dist/payio/subscriptions/entities/index.d.ts +3 -0
  68. package/dist/payio/subscriptions/entities/index.js +9 -0
  69. package/dist/payio/subscriptions/entities/subscription-item.entity.d.ts +10 -0
  70. package/dist/payio/subscriptions/entities/subscription-item.entity.js +25 -0
  71. package/dist/payio/subscriptions/entities/subscription-log.entity.d.ts +8 -0
  72. package/dist/payio/subscriptions/entities/subscription-log.entity.js +23 -0
  73. package/dist/payio/subscriptions/entities/subscription.entity.d.ts +28 -0
  74. package/dist/payio/subscriptions/entities/subscription.entity.js +41 -0
  75. package/dist/payio/subscriptions/index.d.ts +2 -0
  76. package/dist/payio/subscriptions/index.js +18 -0
  77. package/dist/payio/subscriptions/interfaces/i-subscription-item.d.ts +8 -0
  78. package/dist/payio/subscriptions/interfaces/i-subscription-item.js +2 -0
  79. package/dist/payio/subscriptions/interfaces/i-subscription-log.d.ts +6 -0
  80. package/dist/payio/subscriptions/interfaces/i-subscription-log.js +2 -0
  81. package/dist/payio/subscriptions/interfaces/i-subscription.d.ts +26 -0
  82. package/dist/payio/subscriptions/interfaces/i-subscription.js +2 -0
  83. package/dist/payio/subscriptions/interfaces/index.d.ts +3 -0
  84. package/dist/payio/subscriptions/interfaces/index.js +2 -0
  85. package/package.json +1 -1
@@ -21,3 +21,4 @@ export { EPaymentProvider } from './providers.enum';
21
21
  export { EPubSub } from './pubsub.enum';
22
22
  export { ERole } from './role.enum';
23
23
  export { ESponsorshipValues } from './sponsorship-values.enum';
24
+ export { ESubsStatus } from './subscription-status.enum';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ESponsorshipValues = exports.ERole = exports.EPubSub = exports.EPaymentProvider = exports.EPlatform = exports.ELegalEntiy = exports.EPaymentType = exports.EPaymentStatus = exports.EPaymentMode = exports.EPaymentChannel = exports.EOs = exports.EOperator = exports.ELeadOrigin = exports.EJwtStatus = exports.EIntervalType = exports.EFiscalDocModelCode = exports.EDiscountType = exports.EDocType = exports.EDesenfilaFrom = exports.ECollectionsTypes = exports.EBooleanString = exports.EBankSlipStatus = exports.EFcmSkill = void 0;
3
+ exports.ESubsStatus = exports.ESponsorshipValues = exports.ERole = exports.EPubSub = exports.EPaymentProvider = exports.EPlatform = exports.ELegalEntiy = exports.EPaymentType = exports.EPaymentStatus = exports.EPaymentMode = exports.EPaymentChannel = exports.EOs = exports.EOperator = exports.ELeadOrigin = exports.EJwtStatus = exports.EIntervalType = exports.EFiscalDocModelCode = exports.EDiscountType = exports.EDocType = exports.EDesenfilaFrom = exports.ECollectionsTypes = exports.EBooleanString = exports.EBankSlipStatus = exports.EFcmSkill = void 0;
4
4
  var skill_enum_1 = require("../../fcm-token-message/enums/skill.enum");
5
5
  Object.defineProperty(exports, "EFcmSkill", { enumerable: true, get: function () { return skill_enum_1.EFcmSkill; } });
6
6
  var bank_slip_status_enum_1 = require("./bank-slip-status.enum");
@@ -47,3 +47,5 @@ var role_enum_1 = require("./role.enum");
47
47
  Object.defineProperty(exports, "ERole", { enumerable: true, get: function () { return role_enum_1.ERole; } });
48
48
  var sponsorship_values_enum_1 = require("./sponsorship-values.enum");
49
49
  Object.defineProperty(exports, "ESponsorshipValues", { enumerable: true, get: function () { return sponsorship_values_enum_1.ESponsorshipValues; } });
50
+ var subscription_status_enum_1 = require("./subscription-status.enum");
51
+ Object.defineProperty(exports, "ESubsStatus", { enumerable: true, get: function () { return subscription_status_enum_1.ESubsStatus; } });
@@ -0,0 +1,10 @@
1
+ export declare enum ESubsStatus {
2
+ ACTIVE = "ACTIVE",
3
+ CANCELLED = "CANCELLED",
4
+ PLACED = "PLACED",
5
+ EXPIRED = "EXPIRED",
6
+ PENDING = "PENDING",
7
+ TRIAL = "TRIAL",
8
+ FREE = "FREE",
9
+ SUSPENDED = "SUSPENDED"
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ESubsStatus = void 0;
4
+ var ESubsStatus;
5
+ (function (ESubsStatus) {
6
+ ESubsStatus["ACTIVE"] = "ACTIVE";
7
+ ESubsStatus["CANCELLED"] = "CANCELLED";
8
+ ESubsStatus["PLACED"] = "PLACED";
9
+ ESubsStatus["EXPIRED"] = "EXPIRED";
10
+ ESubsStatus["PENDING"] = "PENDING";
11
+ ESubsStatus["TRIAL"] = "TRIAL";
12
+ ESubsStatus["FREE"] = "FREE";
13
+ ESubsStatus["SUSPENDED"] = "SUSPENDED";
14
+ })(ESubsStatus || (exports.ESubsStatus = ESubsStatus = {}));
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.6.03",
3
+ "version": "1.6.06",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,15 @@
1
+ import { IPayioApp } from '../interfaces/i-app';
2
+ export declare class PayioAppEntity implements IPayioApp {
3
+ active: boolean;
4
+ activeInstalls: number;
5
+ description: string;
6
+ downloadUrl: string;
7
+ features: string[];
8
+ id: string;
9
+ name: string;
10
+ price: number;
11
+ secrets: string;
12
+ slug: string;
13
+ tags: string[];
14
+ constructor(data?: Partial<PayioAppEntity>);
15
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayioAppEntity = void 0;
4
+ var PayioAppEntity = /** @class */ (function () {
5
+ // #endregion Properties (11)
6
+ // #region Constructors (1)
7
+ function PayioAppEntity(data) {
8
+ // #region Properties (11)
9
+ this.active = false;
10
+ this.activeInstalls = 0;
11
+ this.description = '';
12
+ this.downloadUrl = '';
13
+ this.features = [];
14
+ this.id = '';
15
+ this.name = '';
16
+ this.price = 0;
17
+ this.secrets = '';
18
+ this.slug = '';
19
+ this.tags = [];
20
+ if (data) {
21
+ for (var key in data) {
22
+ if (data.hasOwnProperty(key) && key in this) {
23
+ this[key] = data[key];
24
+ }
25
+ }
26
+ }
27
+ }
28
+ return PayioAppEntity;
29
+ }());
30
+ exports.PayioAppEntity = PayioAppEntity;
@@ -0,0 +1 @@
1
+ export { PayioAppEntity } from './app.entity';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayioAppEntity = void 0;
4
+ var app_entity_1 = require("./app.entity");
5
+ Object.defineProperty(exports, "PayioAppEntity", { enumerable: true, get: function () { return app_entity_1.PayioAppEntity; } });
@@ -0,0 +1,2 @@
1
+ export * from './entities';
2
+ export * from './interfaces';
@@ -0,0 +1,18 @@
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("./interfaces"), exports);
@@ -0,0 +1,13 @@
1
+ export interface IPayioApp {
2
+ active: boolean;
3
+ activeInstalls: number;
4
+ description: string;
5
+ downloadUrl: string;
6
+ features: string[];
7
+ id: string;
8
+ name: string;
9
+ slug: string;
10
+ price: number;
11
+ secrets: string;
12
+ tags: string[];
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { IPayioApp } from './i-app';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { IPayioDevice } from '../interfaces/i-device';
2
+ export declare class PayioDeviceEntity implements IPayioDevice {
3
+ active: boolean;
4
+ companyId: string;
5
+ containerId: string;
6
+ createdAt: Date;
7
+ deviceId: string;
8
+ id: string;
9
+ lastAccess: Date;
10
+ name: string;
11
+ tags: string[];
12
+ updatedAt: Date;
13
+ constructor(data?: Partial<PayioDeviceEntity>);
14
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayioDeviceEntity = void 0;
4
+ var PayioDeviceEntity = /** @class */ (function () {
5
+ // #endregion Properties (10)
6
+ // #region Constructors (1)
7
+ function PayioDeviceEntity(data) {
8
+ // #region Properties (10)
9
+ this.active = false;
10
+ this.companyId = '';
11
+ this.containerId = '';
12
+ this.createdAt = new Date();
13
+ this.deviceId = '';
14
+ this.id = '';
15
+ this.lastAccess = new Date();
16
+ this.name = '';
17
+ this.tags = [];
18
+ this.updatedAt = new Date();
19
+ if (data) {
20
+ for (var key in data) {
21
+ if (data.hasOwnProperty(key) && key in this) {
22
+ this[key] = data[key];
23
+ }
24
+ }
25
+ }
26
+ }
27
+ return PayioDeviceEntity;
28
+ }());
29
+ exports.PayioDeviceEntity = PayioDeviceEntity;
@@ -0,0 +1 @@
1
+ export { PayioDeviceEntity } from './device.entity';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayioDeviceEntity = void 0;
4
+ var device_entity_1 = require("./device.entity");
5
+ Object.defineProperty(exports, "PayioDeviceEntity", { enumerable: true, get: function () { return device_entity_1.PayioDeviceEntity; } });
@@ -0,0 +1,2 @@
1
+ export * from './entities';
2
+ export * from './interfaces';
@@ -0,0 +1,18 @@
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("./interfaces"), exports);
@@ -0,0 +1,12 @@
1
+ export interface IPayioDevice {
2
+ active: boolean;
3
+ companyId: string;
4
+ containerId: string;
5
+ createdAt: Date;
6
+ deviceId: string;
7
+ id: string;
8
+ lastAccess: Date;
9
+ name: string;
10
+ tags: string[];
11
+ updatedAt: Date;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { IPayioDevice } from './i-device';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,6 @@
1
+ export * from './app';
1
2
  export * from './company';
3
+ export * from './device';
2
4
  export * from './payload';
3
5
  export * from './permissions';
6
+ export * from './subscriptions';
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./app"), exports);
17
18
  __exportStar(require("./company"), exports);
19
+ __exportStar(require("./device"), exports);
18
20
  __exportStar(require("./payload"), exports);
19
21
  __exportStar(require("./permissions"), exports);
22
+ __exportStar(require("./subscriptions"), exports);
@@ -1,7 +1,7 @@
1
1
  import { IPayioJwtPayloadApp } from '../interfaces/i-payload-app';
2
2
  export declare class PayioJwtPayloadAppEntity implements IPayioJwtPayloadApp {
3
3
  id: string;
4
- name: string;
5
- version: string | null;
4
+ slug: string;
5
+ type: string;
6
6
  constructor(data?: Partial<PayioJwtPayloadAppEntity>);
7
7
  }
@@ -7,8 +7,8 @@ var PayioJwtPayloadAppEntity = /** @class */ (function () {
7
7
  function PayioJwtPayloadAppEntity(data) {
8
8
  // #region Properties (3)
9
9
  this.id = '';
10
- this.name = '';
11
- this.version = null;
10
+ this.slug = '';
11
+ this.type = '';
12
12
  if (data) {
13
13
  for (var key in data) {
14
14
  if (data.hasOwnProperty(key) && key in this) {
@@ -1,7 +1,6 @@
1
1
  import { IPayioJwtPayloadDevice } from '../interfaces/i-payload-device';
2
2
  export declare class PayioJwtPayloadDeviceEntity implements IPayioJwtPayloadDevice {
3
3
  id: string;
4
- registeredAt: number;
5
- type: string;
4
+ name: string | null;
6
5
  constructor(data?: Partial<PayioJwtPayloadDeviceEntity>);
7
6
  }
@@ -7,8 +7,7 @@ var PayioJwtPayloadDeviceEntity = /** @class */ (function () {
7
7
  function PayioJwtPayloadDeviceEntity(data) {
8
8
  // #region Properties (3)
9
9
  this.id = '';
10
- this.registeredAt = 0;
11
- this.type = '';
10
+ this.name = '';
12
11
  if (data) {
13
12
  for (var key in data) {
14
13
  if (data.hasOwnProperty(key) && key in this) {
@@ -1,8 +1,8 @@
1
- import { ESubscriptionStatus } from '../../../subscription-base/enums/subscription-status.enum';
1
+ import { ESubsStatus } from '../../../general';
2
2
  import { IPayioJwtPayloadSubscription } from '../interfaces/i-payload-subscription';
3
3
  export declare class PayioJwtPayloadSubscriptionEntity implements IPayioJwtPayloadSubscription {
4
4
  expiresAt: number;
5
5
  plan: string;
6
- status: ESubscriptionStatus;
6
+ status: ESubsStatus;
7
7
  constructor(data?: Partial<PayioJwtPayloadSubscriptionEntity>);
8
8
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PayioJwtPayloadSubscriptionEntity = void 0;
4
- var subscription_status_enum_1 = require("../../../subscription-base/enums/subscription-status.enum");
4
+ var general_1 = require("../../../general");
5
5
  var PayioJwtPayloadSubscriptionEntity = /** @class */ (function () {
6
6
  // #endregion Properties (3)
7
7
  // #region Constructors (1)
@@ -9,7 +9,7 @@ var PayioJwtPayloadSubscriptionEntity = /** @class */ (function () {
9
9
  // #region Properties (3)
10
10
  this.expiresAt = 0;
11
11
  this.plan = '';
12
- this.status = subscription_status_enum_1.ESubscriptionStatus.PENDING;
12
+ this.status = general_1.ESubsStatus.PENDING;
13
13
  if (data) {
14
14
  for (var key in data) {
15
15
  if (data.hasOwnProperty(key) && key in this) {
@@ -1,5 +1,5 @@
1
1
  export interface IPayioJwtPayloadApp {
2
2
  id: string;
3
- name: string;
4
- version: string | null;
3
+ slug: string;
4
+ type: string;
5
5
  }
@@ -1,5 +1,4 @@
1
1
  export interface IPayioJwtPayloadDevice {
2
2
  id: string;
3
- registeredAt: number;
4
- type: string;
3
+ name: string | null;
5
4
  }
@@ -1,6 +1,6 @@
1
- import { ESubscriptionStatus } from '../../../subscription-base/enums/subscription-status.enum';
1
+ import { ESubsStatus } from '../../../general';
2
2
  export interface IPayioJwtPayloadSubscription {
3
3
  expiresAt: number;
4
4
  plan: string;
5
- status: ESubscriptionStatus;
5
+ status: ESubsStatus;
6
6
  }
@@ -0,0 +1,3 @@
1
+ export { PayioSubscriptionItemEntity } from './subscription-item.entity';
2
+ export { PayioSubscriptionLogEntity } from './subscription-log.entity';
3
+ export { PayioSubscriptionEntity } from './subscription.entity';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayioSubscriptionEntity = exports.PayioSubscriptionLogEntity = exports.PayioSubscriptionItemEntity = void 0;
4
+ var subscription_item_entity_1 = require("./subscription-item.entity");
5
+ Object.defineProperty(exports, "PayioSubscriptionItemEntity", { enumerable: true, get: function () { return subscription_item_entity_1.PayioSubscriptionItemEntity; } });
6
+ var subscription_log_entity_1 = require("./subscription-log.entity");
7
+ Object.defineProperty(exports, "PayioSubscriptionLogEntity", { enumerable: true, get: function () { return subscription_log_entity_1.PayioSubscriptionLogEntity; } });
8
+ var subscription_entity_1 = require("./subscription.entity");
9
+ Object.defineProperty(exports, "PayioSubscriptionEntity", { enumerable: true, get: function () { return subscription_entity_1.PayioSubscriptionEntity; } });
@@ -0,0 +1,10 @@
1
+ import { IPayioSubscriptionItem } from '../interfaces';
2
+ export declare class PayioSubscriptionItemEntity implements IPayioSubscriptionItem {
3
+ description: string;
4
+ quantity: number;
5
+ recurrent: boolean;
6
+ totalPrice: number;
7
+ unitPrice: number;
8
+ voucherKey: string | null;
9
+ constructor(data?: Partial<PayioSubscriptionItemEntity>);
10
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayioSubscriptionItemEntity = void 0;
4
+ var PayioSubscriptionItemEntity = /** @class */ (function () {
5
+ // #endregion Properties (6)
6
+ // #region Constructors (1)
7
+ function PayioSubscriptionItemEntity(data) {
8
+ // #region Properties (6)
9
+ this.description = '';
10
+ this.quantity = 1;
11
+ this.recurrent = true;
12
+ this.totalPrice = 0;
13
+ this.unitPrice = 0;
14
+ this.voucherKey = null;
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 PayioSubscriptionItemEntity;
24
+ }());
25
+ exports.PayioSubscriptionItemEntity = PayioSubscriptionItemEntity;
@@ -0,0 +1,8 @@
1
+ import { IPayioSubscriptionLog } from '../interfaces/i-subscription-log';
2
+ export declare class PayioSubscriptionLogEntity implements IPayioSubscriptionLog {
3
+ createdAt: Date;
4
+ description: string;
5
+ id: string;
6
+ notes: string;
7
+ constructor(data?: Partial<PayioSubscriptionLogEntity>);
8
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayioSubscriptionLogEntity = void 0;
4
+ var PayioSubscriptionLogEntity = /** @class */ (function () {
5
+ // #endregion Properties (4)
6
+ // #region Constructors (1)
7
+ function PayioSubscriptionLogEntity(data) {
8
+ // #region Properties (4)
9
+ this.createdAt = new Date();
10
+ this.description = '';
11
+ this.id = '';
12
+ this.notes = '';
13
+ if (data) {
14
+ for (var key in data) {
15
+ if (data.hasOwnProperty(key) && key in this) {
16
+ this[key] = data[key];
17
+ }
18
+ }
19
+ }
20
+ }
21
+ return PayioSubscriptionLogEntity;
22
+ }());
23
+ exports.PayioSubscriptionLogEntity = PayioSubscriptionLogEntity;
@@ -0,0 +1,28 @@
1
+ import { CustomVariableEntity, EIntervalType, ESubsStatus, PaymentMethodEntity } from '../../../general';
2
+ import { IPayioSubscription } from '../interfaces/i-subscription';
3
+ import { PayioSubscriptionItemEntity } from './subscription-item.entity';
4
+ import { PayioSubscriptionLogEntity } from './subscription-log.entity';
5
+ export declare class PayioSubscriptionEntity implements IPayioSubscription {
6
+ amount: number;
7
+ cancellationReason: string;
8
+ createdAt: Date;
9
+ customVariables: CustomVariableEntity[];
10
+ expiresAt: Date;
11
+ id: string;
12
+ interval: number;
13
+ intervalType: EIntervalType;
14
+ items: PayioSubscriptionItemEntity[];
15
+ logs: PayioSubscriptionLogEntity[];
16
+ notes: string;
17
+ payment: PaymentMethodEntity;
18
+ planId: string;
19
+ planName: string;
20
+ renewPaymentDate: Date;
21
+ renovatedAt: Date;
22
+ startsAt: Date;
23
+ status: ESubsStatus;
24
+ suspendedTimes: number;
25
+ tags: string[];
26
+ updatedAt: Date;
27
+ constructor(data?: Partial<PayioSubscriptionEntity>);
28
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayioSubscriptionEntity = void 0;
4
+ var general_1 = require("../../../general");
5
+ var PayioSubscriptionEntity = /** @class */ (function () {
6
+ // #endregion Properties (21)
7
+ // #region Constructors (1)
8
+ function PayioSubscriptionEntity(data) {
9
+ // #region Properties (21)
10
+ this.amount = 0;
11
+ this.cancellationReason = '';
12
+ this.createdAt = new Date();
13
+ this.customVariables = [];
14
+ this.expiresAt = new Date();
15
+ this.id = '';
16
+ this.interval = 0;
17
+ this.intervalType = general_1.EIntervalType.MONTHS;
18
+ this.items = [];
19
+ this.logs = [];
20
+ this.notes = '';
21
+ this.payment = new general_1.PaymentMethodEntity();
22
+ this.planId = '';
23
+ this.planName = '';
24
+ this.renewPaymentDate = new Date();
25
+ this.renovatedAt = new Date();
26
+ this.startsAt = new Date();
27
+ this.status = general_1.ESubsStatus.PENDING;
28
+ this.suspendedTimes = 0;
29
+ this.tags = [];
30
+ this.updatedAt = new Date();
31
+ if (data) {
32
+ for (var key in data) {
33
+ if (data.hasOwnProperty(key) && key in this) {
34
+ this[key] = data[key];
35
+ }
36
+ }
37
+ }
38
+ }
39
+ return PayioSubscriptionEntity;
40
+ }());
41
+ exports.PayioSubscriptionEntity = PayioSubscriptionEntity;
@@ -0,0 +1,2 @@
1
+ export * from './entities';
2
+ export * from './interfaces';
@@ -0,0 +1,18 @@
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("./interfaces"), exports);
@@ -0,0 +1,8 @@
1
+ export interface IPayioSubscriptionItem {
2
+ description: string;
3
+ quantity: number;
4
+ recurrent: boolean;
5
+ voucherKey: string | null;
6
+ totalPrice: number;
7
+ unitPrice: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface IPayioSubscriptionLog {
2
+ createdAt: Date;
3
+ description: string;
4
+ id: string;
5
+ notes: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import { EIntervalType, ESubsStatus, ICustomVariable, IPaymentMethod } from '../../../general';
2
+ import { IPayioSubscriptionItem } from './i-subscription-item';
3
+ import { IPayioSubscriptionLog } from './i-subscription-log';
4
+ export interface IPayioSubscription {
5
+ amount: number;
6
+ cancellationReason: string;
7
+ createdAt: Date;
8
+ customVariables: ICustomVariable[];
9
+ expiresAt: Date;
10
+ id: string;
11
+ interval: number;
12
+ intervalType: EIntervalType;
13
+ items: IPayioSubscriptionItem[];
14
+ logs: IPayioSubscriptionLog[];
15
+ notes: string;
16
+ payment: IPaymentMethod;
17
+ planId: string;
18
+ planName: string;
19
+ renewPaymentDate: Date;
20
+ renovatedAt: Date;
21
+ startsAt: Date;
22
+ status: ESubsStatus;
23
+ suspendedTimes: number;
24
+ tags: string[];
25
+ updatedAt: Date;
26
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });