cecon-interfaces 1.0.85 → 1.0.88

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/dist/esm2022/general/entities/custom-variable.entity.mjs +17 -0
  2. package/dist/esm2022/general/entities/index.mjs +2 -1
  3. package/dist/esm2022/general/interfaces/i-custom-variable.mjs +3 -0
  4. package/dist/esm2022/general/interfaces/index.mjs +1 -1
  5. package/dist/esm2022/invoice/entities/invoice-item.entity.mjs +3 -3
  6. package/dist/esm2022/invoice/entities/invoice.entity.mjs +12 -7
  7. package/dist/esm2022/invoice/interfaces/i-invoice-item.mjs +1 -1
  8. package/dist/esm2022/invoice/interfaces/i-invoice.mjs +1 -1
  9. package/dist/esm2022/plan/interfaces/i-plan.mjs +1 -1
  10. package/dist/esm2022/subscription/entities/index.mjs +3 -2
  11. package/dist/esm2022/subscription/entities/subscription-item.entity.mjs +20 -0
  12. package/dist/esm2022/subscription/entities/subscription.entity.mjs +6 -3
  13. package/dist/esm2022/subscription/interfaces/i-subscription-item.mjs +2 -0
  14. package/dist/esm2022/subscription/interfaces/i-subscription.mjs +1 -1
  15. package/dist/esm2022/subscription/interfaces/index.mjs +1 -1
  16. package/dist/fesm2022/cecon-interfaces.mjs +56 -11
  17. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  18. package/dist/general/entities/custom-variable.entity.d.ts +5 -0
  19. package/dist/general/entities/custom-variable.entity.js +21 -0
  20. package/dist/general/entities/index.d.ts +1 -0
  21. package/dist/general/entities/index.js +3 -1
  22. package/dist/general/interfaces/i-custom-variable.d.ts +4 -0
  23. package/dist/general/interfaces/i-custom-variable.js +3 -0
  24. package/dist/general/interfaces/index.d.ts +1 -0
  25. package/dist/invoice/entities/invoice-item.entity.d.ts +2 -2
  26. package/dist/invoice/entities/invoice-item.entity.js +2 -2
  27. package/dist/invoice/entities/invoice.entity.d.ts +8 -3
  28. package/dist/invoice/entities/invoice.entity.js +11 -6
  29. package/dist/invoice/interfaces/i-invoice-item.d.ts +2 -2
  30. package/dist/invoice/interfaces/i-invoice.d.ts +11 -6
  31. package/dist/package.json +1 -1
  32. package/dist/plan/interfaces/i-plan.d.ts +5 -5
  33. package/dist/subscription/entities/index.d.ts +2 -1
  34. package/dist/subscription/entities/index.js +4 -2
  35. package/dist/subscription/entities/subscription-item.entity.d.ts +9 -0
  36. package/dist/subscription/entities/subscription-item.entity.js +24 -0
  37. package/dist/subscription/entities/subscription.entity.d.ts +5 -1
  38. package/dist/subscription/entities/subscription.entity.js +5 -2
  39. package/dist/subscription/interfaces/i-subscription-item.d.ts +7 -0
  40. package/dist/subscription/interfaces/i-subscription-item.js +2 -0
  41. package/dist/subscription/interfaces/i-subscription.d.ts +5 -1
  42. package/dist/subscription/interfaces/index.d.ts +2 -1
  43. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ export declare class CustomVariableEntity {
2
+ name: string;
3
+ value: string;
4
+ constructor(data?: Partial<CustomVariableEntity>);
5
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomVariableEntity = void 0;
4
+ var CustomVariableEntity = /** @class */ (function () {
5
+ // #endregion Properties (2)
6
+ // #region Constructors (1)
7
+ function CustomVariableEntity(data) {
8
+ // #region Properties (2)
9
+ this.name = "";
10
+ this.value = "";
11
+ if (data) {
12
+ for (var key in data) {
13
+ if (data.hasOwnProperty(key) && key in this) {
14
+ this[key] = data[key];
15
+ }
16
+ }
17
+ }
18
+ }
19
+ return CustomVariableEntity;
20
+ }());
21
+ exports.CustomVariableEntity = CustomVariableEntity;
@@ -2,6 +2,7 @@ export { AddressEntity } from './address.entity';
2
2
  export { BaseEntity } from './base.entity';
3
3
  export { CarouselImageEntity } from './carousel-image.entity';
4
4
  export { CoordsEntity } from './coords.entity';
5
+ export { CustomVariableEntity } from './custom-variable.entity';
5
6
  export { DeliveryAreaEntity } from './delivery-area.entity';
6
7
  export { DeliveryAreaFixedEntity } from './dellivery-area-fixed.entity';
7
8
  export { MessagerChannelEntity } from './messager-channel.entity';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RatingEntity = exports.PaymentTokenEntity = exports.PaymentTokenDataEntity = exports.PaymentProviderEntity = exports.PaymentProviderAgentEntity = exports.PaymentMethodEntity = exports.OriginEntity = exports.MobyoApiConfigEntity = exports.MessagerChannelEntity = exports.DeliveryAreaFixedEntity = exports.DeliveryAreaEntity = exports.CoordsEntity = exports.CarouselImageEntity = exports.BaseEntity = exports.AddressEntity = void 0;
3
+ exports.RatingEntity = exports.PaymentTokenEntity = exports.PaymentTokenDataEntity = exports.PaymentProviderEntity = exports.PaymentProviderAgentEntity = exports.PaymentMethodEntity = exports.OriginEntity = exports.MobyoApiConfigEntity = exports.MessagerChannelEntity = exports.DeliveryAreaFixedEntity = exports.DeliveryAreaEntity = exports.CustomVariableEntity = exports.CoordsEntity = exports.CarouselImageEntity = exports.BaseEntity = exports.AddressEntity = void 0;
4
4
  var address_entity_1 = require("./address.entity");
5
5
  Object.defineProperty(exports, "AddressEntity", { enumerable: true, get: function () { return address_entity_1.AddressEntity; } });
6
6
  var base_entity_1 = require("./base.entity");
@@ -9,6 +9,8 @@ var carousel_image_entity_1 = require("./carousel-image.entity");
9
9
  Object.defineProperty(exports, "CarouselImageEntity", { enumerable: true, get: function () { return carousel_image_entity_1.CarouselImageEntity; } });
10
10
  var coords_entity_1 = require("./coords.entity");
11
11
  Object.defineProperty(exports, "CoordsEntity", { enumerable: true, get: function () { return coords_entity_1.CoordsEntity; } });
12
+ var custom_variable_entity_1 = require("./custom-variable.entity");
13
+ Object.defineProperty(exports, "CustomVariableEntity", { enumerable: true, get: function () { return custom_variable_entity_1.CustomVariableEntity; } });
12
14
  var delivery_area_entity_1 = require("./delivery-area.entity");
13
15
  Object.defineProperty(exports, "DeliveryAreaEntity", { enumerable: true, get: function () { return delivery_area_entity_1.DeliveryAreaEntity; } });
14
16
  var dellivery_area_fixed_entity_1 = require("./dellivery-area-fixed.entity");
@@ -0,0 +1,4 @@
1
+ export interface ICustomVariable {
2
+ name: string;
3
+ value: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // src/models/base.entity.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,6 +2,7 @@ export { IAddress } from './i-address';
2
2
  export { IBase } from './i-base';
3
3
  export { ICarouselImage } from './i-carousel-image';
4
4
  export { ICoords } from './i-coords';
5
+ export { ICustomVariable } from './i-custom-variable';
5
6
  export { IDeliveryArea } from './i-delivery-area';
6
7
  export { IDeliveryAreaFixed } from './i-delivery-area-fixed';
7
8
  export { IMessagerChannel } from './i-messager-channel';
@@ -1,11 +1,11 @@
1
1
  import { IInvoiceItem } from '../interfaces';
2
2
  export declare class InvoiceItemEntity implements IInvoiceItem {
3
+ addition: number;
3
4
  description: string;
4
- discounts: number;
5
+ discount: number;
5
6
  id: string;
6
7
  quantity: number;
7
8
  sku: string;
8
- taxes: number;
9
9
  totalPrice: number;
10
10
  unitPrice: number;
11
11
  constructor(data?: Partial<InvoiceItemEntity>);
@@ -6,12 +6,12 @@ var InvoiceItemEntity = /** @class */ (function () {
6
6
  // #region Constructors (1)
7
7
  function InvoiceItemEntity(data) {
8
8
  // #region Properties (8)
9
+ this.addition = 0;
9
10
  this.description = '';
10
- this.discounts = 0;
11
+ this.discount = 0;
11
12
  this.id = '';
12
13
  this.quantity = 1;
13
14
  this.sku = '';
14
- this.taxes = 0;
15
15
  this.totalPrice = 0;
16
16
  this.unitPrice = 0;
17
17
  if (data) {
@@ -3,18 +3,23 @@ import { IInvoice } from '../interfaces';
3
3
  import { InvoiceItemEntity } from './invoice-item.entity';
4
4
  import { InvoicePaymentMethodEntity } from './invoice-payment-method.entity';
5
5
  export declare class InvoiceEntity implements IInvoice {
6
+ addition: number;
6
7
  companyId: string;
7
8
  containerId: string;
8
9
  createdAt: Date;
9
- discounts: number;
10
+ discount: number;
10
11
  dueDateAt: Date;
12
+ ensureDueOnWorkday: boolean;
13
+ expiresIn: number;
11
14
  id: string;
12
- invoiceNumber: string;
13
15
  items: InvoiceItemEntity[];
14
16
  notes: string;
15
- paidDateAt: Date;
17
+ paidAt: Date;
16
18
  paymentMethod: InvoicePaymentMethodEntity[];
19
+ providerInvoiceNumber: string;
20
+ providerInvoiceUrl: string;
17
21
  status: InvoiceStatusEnum;
22
+ subscriptionId: string;
18
23
  subtotal: number;
19
24
  taxes: number;
20
25
  total: number;
@@ -3,22 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InvoiceEntity = void 0;
4
4
  var enums_1 = require("../enums");
5
5
  var InvoiceEntity = /** @class */ (function () {
6
- // #endregion Properties (16)
6
+ // #endregion Properties (21)
7
7
  // #region Constructors (1)
8
8
  function InvoiceEntity(data) {
9
- // #region Properties (16)
9
+ // #region Properties (21)
10
+ this.addition = 0;
10
11
  this.companyId = '';
11
12
  this.containerId = '';
12
13
  this.createdAt = new Date();
13
- this.discounts = 0;
14
- this.dueDateAt = new Date();
14
+ this.discount = 0;
15
+ this.dueDateAt = new Date(Date.now() + 3 * 24 * 60 * 60 * 1000);
16
+ this.ensureDueOnWorkday = true;
17
+ this.expiresIn = 5;
15
18
  this.id = '';
16
- this.invoiceNumber = '';
17
19
  this.items = [];
18
20
  this.notes = '';
19
- this.paidDateAt = new Date();
21
+ this.paidAt = new Date();
20
22
  this.paymentMethod = [];
23
+ this.providerInvoiceNumber = '';
24
+ this.providerInvoiceUrl = '';
21
25
  this.status = enums_1.InvoiceStatusEnum.PENDING;
26
+ this.subscriptionId = '';
22
27
  this.subtotal = 0;
23
28
  this.taxes = 0;
24
29
  this.total = 0;
@@ -1,10 +1,10 @@
1
1
  export interface IInvoiceItem {
2
+ addition: number;
2
3
  description: string;
3
- discounts: number;
4
+ discount: number;
4
5
  id: string;
5
6
  quantity: number;
6
7
  sku: string;
7
- taxes: number;
8
8
  totalPrice: number;
9
9
  unitPrice: number;
10
10
  }
@@ -1,19 +1,24 @@
1
- import { InvoiceStatusEnum } from '../enums';
2
- import { IInvoiceItem } from './i-invoice-item';
3
- import { IInvoicePaymentMethod } from './i-invoice-payment-method';
1
+ import { InvoiceStatusEnum } from "../enums";
2
+ import { IInvoiceItem } from "./i-invoice-item";
3
+ import { IInvoicePaymentMethod } from "./i-invoice-payment-method";
4
4
  export interface IInvoice {
5
+ addition: number;
5
6
  companyId: string;
6
7
  containerId: string;
7
8
  createdAt: Date;
8
- discounts: number;
9
+ discount: number;
9
10
  dueDateAt: Date;
11
+ ensureDueOnWorkday: boolean;
12
+ expiresIn: number;
10
13
  id: string;
11
- invoiceNumber: string;
12
14
  items: IInvoiceItem[];
13
15
  notes: string;
14
- paidDateAt: Date;
16
+ paidAt: Date;
15
17
  paymentMethod: IInvoicePaymentMethod[];
18
+ providerInvoiceNumber: string;
19
+ providerInvoiceUrl: string;
16
20
  status: InvoiceStatusEnum;
21
+ subscriptionId: string;
17
22
  subtotal: number;
18
23
  taxes: number;
19
24
  total: number;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.0.85",
3
+ "version": "1.0.88",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,14 +2,14 @@ import { IntervalTypeEnum } from '../../general/enums';
2
2
  import { PlanIdentifierEnum } from '../enums/plans-identifier.enum';
3
3
  import { IPlanFeature } from './i-feature';
4
4
  export interface IPlan {
5
+ createdAt: Date;
6
+ features: IPlanFeature[];
5
7
  id: string;
6
- name: string;
7
8
  identifier: PlanIdentifierEnum;
9
+ index: number;
8
10
  interval: number;
9
11
  intervalType: IntervalTypeEnum;
10
- createdAt: Date;
11
- index: number;
12
- updatedAt: Date;
12
+ name: string;
13
13
  price: number;
14
- features: IPlanFeature[];
14
+ updatedAt: Date;
15
15
  }
@@ -1,2 +1,3 @@
1
- export { SubscriptionLogEntity as SubscriptionInvoiceHistoryEntity } from './subscription-log.entity';
1
+ export { SubscriptionItemEntity } from './subscription-item.entity';
2
+ export { SubscriptionLogEntity } from './subscription-log.entity';
2
3
  export { SubscriptionEntity } from './subscription.entity';
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionEntity = exports.SubscriptionInvoiceHistoryEntity = void 0;
3
+ exports.SubscriptionEntity = exports.SubscriptionLogEntity = exports.SubscriptionItemEntity = void 0;
4
+ var subscription_item_entity_1 = require("./subscription-item.entity");
5
+ Object.defineProperty(exports, "SubscriptionItemEntity", { enumerable: true, get: function () { return subscription_item_entity_1.SubscriptionItemEntity; } });
4
6
  var subscription_log_entity_1 = require("./subscription-log.entity");
5
- Object.defineProperty(exports, "SubscriptionInvoiceHistoryEntity", { enumerable: true, get: function () { return subscription_log_entity_1.SubscriptionLogEntity; } });
7
+ Object.defineProperty(exports, "SubscriptionLogEntity", { enumerable: true, get: function () { return subscription_log_entity_1.SubscriptionLogEntity; } });
6
8
  var subscription_entity_1 = require("./subscription.entity");
7
9
  Object.defineProperty(exports, "SubscriptionEntity", { enumerable: true, get: function () { return subscription_entity_1.SubscriptionEntity; } });
@@ -0,0 +1,9 @@
1
+ import { ISubscriptionItem } from "../interfaces";
2
+ export declare class SubscriptionItemEntity implements ISubscriptionItem {
3
+ description: string;
4
+ quantity: number;
5
+ recurrent: boolean;
6
+ totalPrice: number;
7
+ unitPrice: number;
8
+ constructor(data?: Partial<SubscriptionItemEntity>);
9
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionItemEntity = void 0;
4
+ var SubscriptionItemEntity = /** @class */ (function () {
5
+ // #endregion Properties (5)
6
+ // #region Constructors (1)
7
+ function SubscriptionItemEntity(data) {
8
+ // #region Properties (5)
9
+ this.description = "";
10
+ this.quantity = 1;
11
+ this.recurrent = true;
12
+ this.totalPrice = 0;
13
+ this.unitPrice = 0;
14
+ if (data) {
15
+ for (var key in data) {
16
+ if (data.hasOwnProperty(key) && key in this) {
17
+ this[key] = data[key];
18
+ }
19
+ }
20
+ }
21
+ }
22
+ return SubscriptionItemEntity;
23
+ }());
24
+ exports.SubscriptionItemEntity = SubscriptionItemEntity;
@@ -1,18 +1,22 @@
1
1
  import { FeatureEntity } from "../../feature";
2
- import { IntervalTypeEnum } from "../../general";
2
+ import { CustomVariableEntity, IntervalTypeEnum } from "../../general";
3
3
  import { SubscriptionStatusEnum } from "../enums";
4
4
  import { ISubscription } from "../interfaces/i-subscription";
5
+ import { SubscriptionItemEntity } from "./subscription-item.entity";
5
6
  import { SubscriptionLogEntity } from "./subscription-log.entity";
6
7
  export declare class SubscriptionEntity implements ISubscription {
7
8
  cancellationReason: string;
8
9
  companyId: string;
10
+ companyName: string;
9
11
  containerId: string | null;
10
12
  createdAt: Date;
13
+ customVariable: CustomVariableEntity[];
11
14
  expiresAt: Date;
12
15
  features: FeatureEntity[];
13
16
  id: string;
14
17
  interval: number;
15
18
  intervalType: IntervalTypeEnum;
19
+ items: SubscriptionItemEntity[];
16
20
  logs: SubscriptionLogEntity[];
17
21
  notes: string;
18
22
  partnerId: string | null;
@@ -4,19 +4,22 @@ exports.SubscriptionEntity = void 0;
4
4
  var general_1 = require("../../general");
5
5
  var enums_1 = require("../enums");
6
6
  var SubscriptionEntity = /** @class */ (function () {
7
- // #endregion Properties (19)
7
+ // #endregion Properties (22)
8
8
  // #region Constructors (1)
9
9
  function SubscriptionEntity(data) {
10
- // #region Properties (19)
10
+ // #region Properties (22)
11
11
  this.cancellationReason = "";
12
12
  this.companyId = "";
13
+ this.companyName = "";
13
14
  this.containerId = "";
14
15
  this.createdAt = new Date();
16
+ this.customVariable = [];
15
17
  this.expiresAt = new Date();
16
18
  this.features = [];
17
19
  this.id = "";
18
20
  this.interval = 0;
19
21
  this.intervalType = general_1.IntervalTypeEnum.MONTHS;
22
+ this.items = [];
20
23
  this.logs = [];
21
24
  this.notes = "";
22
25
  this.partnerId = "";
@@ -0,0 +1,7 @@
1
+ export interface ISubscriptionItem {
2
+ description: string;
3
+ quantity: number;
4
+ recurrent: boolean;
5
+ totalPrice: number;
6
+ unitPrice: number;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,17 +1,21 @@
1
1
  import { IFeature } from "../../feature";
2
- import { IntervalTypeEnum } from "../../general";
2
+ import { ICustomVariable, IntervalTypeEnum } from "../../general";
3
3
  import { SubscriptionStatusEnum } from "../enums";
4
+ import { ISubscriptionItem } from "./i-subscription-item";
4
5
  import { ISubscriptionLog } from "./i-subscription-log";
5
6
  export interface ISubscription {
6
7
  cancellationReason: string;
7
8
  companyId: string;
9
+ companyName: string;
8
10
  containerId: string | null;
9
11
  createdAt: Date;
12
+ customVariable: ICustomVariable[];
10
13
  expiresAt: Date;
11
14
  features: IFeature[];
12
15
  id: string;
13
16
  interval: number;
14
17
  intervalType: IntervalTypeEnum;
18
+ items: ISubscriptionItem[];
15
19
  logs: ISubscriptionLog[];
16
20
  notes: string;
17
21
  partnerId: string | null;
@@ -1,2 +1,3 @@
1
1
  export { ISubscription } from './i-subscription';
2
- export { ISubscriptionLog as ISubscriptionInvoiceHistory } from './i-subscription-log';
2
+ export { ISubscriptionItem } from './i-subscription-item';
3
+ export { ISubscriptionLog } from './i-subscription-log';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.0.85",
3
+ "version": "1.0.88",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",