cecon-interfaces 1.4.30 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/dist/esm2022/mobyo/mobyo-api/interfaces/i-order-v3.mjs +1 -1
  2. package/dist/esm2022/mobyo/mobyo-api/interfaces/index.mjs +1 -1
  3. package/dist/esm2022/mobyo/resumes/vouchers/entities/index.mjs +4 -0
  4. package/dist/esm2022/mobyo/resumes/vouchers/entities/resume-voucher-item-detail.entity.mjs +17 -0
  5. package/dist/esm2022/mobyo/resumes/vouchers/entities/resume-voucher-item.entity.mjs +15 -0
  6. package/dist/esm2022/mobyo/resumes/vouchers/entities/resume-voucher.entity.mjs +21 -0
  7. package/dist/esm2022/mobyo/resumes/vouchers/index.mjs +2 -1
  8. package/dist/esm2022/mobyo/resumes/vouchers/interfaces/i-resume-voucher-item.mjs +1 -1
  9. package/dist/esm2022/mobyo/resumes/vouchers/interfaces/index.mjs +1 -1
  10. package/dist/esm2022/order/entities/benefits.entity.mjs +3 -3
  11. package/dist/esm2022/order/interfaces/i-benefits.mjs +1 -1
  12. package/dist/fesm2022/cecon-interfaces.mjs +168 -119
  13. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  14. package/dist/mobyo/mobyo-api/interfaces/i-order-v3.d.ts +2 -2
  15. package/dist/mobyo/mobyo-api/interfaces/index.d.ts +0 -1
  16. package/dist/mobyo/resumes/vouchers/entities/index.d.ts +3 -0
  17. package/dist/mobyo/resumes/vouchers/entities/index.js +9 -0
  18. package/dist/mobyo/resumes/vouchers/entities/resume-voucher-item-detail.entity.d.ts +10 -0
  19. package/dist/mobyo/resumes/vouchers/entities/resume-voucher-item-detail.entity.js +21 -0
  20. package/dist/mobyo/resumes/vouchers/entities/resume-voucher-item.entity.d.ts +7 -0
  21. package/dist/mobyo/resumes/vouchers/entities/resume-voucher-item.entity.js +19 -0
  22. package/dist/mobyo/resumes/vouchers/entities/resume-voucher.entity.d.ts +20 -0
  23. package/dist/mobyo/resumes/vouchers/entities/resume-voucher.entity.js +25 -0
  24. package/dist/mobyo/resumes/vouchers/index.d.ts +1 -0
  25. package/dist/mobyo/resumes/vouchers/index.js +1 -0
  26. package/dist/order/entities/benefits.entity.d.ts +4 -3
  27. package/dist/order/entities/benefits.entity.js +2 -2
  28. package/dist/order/interfaces/i-benefits.d.ts +4 -4
  29. package/dist/package.json +1 -1
  30. package/package.json +1 -1
  31. package/dist/esm2022/mobyo/mobyo-api/interfaces/i-order-benefits-v3.mjs +0 -2
  32. package/dist/mobyo/mobyo-api/interfaces/i-order-benefits-v3.d.ts +0 -10
  33. package/dist/mobyo/mobyo-api/interfaces/i-order-benefits-v3.js +0 -2
@@ -1,10 +1,10 @@
1
+ import { IOrderBenefits } from '../../../order';
1
2
  import { EOrderStatus } from '../../../order/enums/order-status.enum';
2
3
  import { EEngineType } from '../enum/engine-type.enum';
3
4
  import { EOrderV3SalesChannel } from '../enum/order-v3-sales-channel.enum';
4
5
  import { EOrderV3Timing } from '../enum/order-v3-timing.enum';
5
6
  import { EOrderV3Type } from '../enum/order-v3-type.enum';
6
7
  import { IOrderActionV3 } from './i-order-action-v3';
7
- import { IOrderBenefitsV3 } from './i-order-benefits-v3';
8
8
  import { IOrderCancellationV3 } from './i-order-cancellation-v3';
9
9
  import { IOrderCustomerV3 } from './i-order-customer-v3';
10
10
  import { IOrderDelivererV3 } from './i-order-deliverer-v3';
@@ -19,7 +19,7 @@ import { IOrderTakeoutV3 } from './i-order-takeout-v3';
19
19
  import { IOrderTotalV3 } from './i-order-total-v3';
20
20
  export interface IOrderV3 {
21
21
  actions: IOrderActionV3[];
22
- benefits: IOrderBenefitsV3[];
22
+ benefits: IOrderBenefits[];
23
23
  cancellation: IOrderCancellationV3;
24
24
  companyId: string;
25
25
  containerId: string;
@@ -71,7 +71,6 @@ export { IMerchant as MobyoIMerchant } from './i-merchant';
71
71
  export { IMerchantAddress as MobyoIMerchantAddress } from './i-merchant-address';
72
72
  export { IOrderActionV3 as MobyoIOrderActionV3 } from './i-order-action-v3';
73
73
  export { IOrderAditionalFeeV3 as MobyoIOrderAditionalFeeV3 } from './i-order-additional-fees-v3';
74
- export { IOrderBenefitsV3 as MobyoIOrderBenefitsV3, ISponsorshipValues } from './i-order-benefits-v3';
75
74
  export { IOrderCancellationV3 as MobyoIOrderCancellationV3 } from './i-order-cancellation-v3';
76
75
  export { IOrderCustomerV3 as MobyoIOrderCustomerV3, IOrdersCustomerPhone as MobyoIOrdersCustomerPhone } from './i-order-customer-v3';
77
76
  export { IOrderDelivererV3 as MobyoIOrderDelivererV3 } from './i-order-deliverer-v3';
@@ -0,0 +1,3 @@
1
+ export { ResumeVoucherItemDetailEntity } from './resume-voucher-item-detail.entity';
2
+ export { ResumeVoucherItemEntity } from './resume-voucher-item.entity';
3
+ export { ResumeVoucherEntity } from './resume-voucher.entity';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResumeVoucherEntity = exports.ResumeVoucherItemEntity = exports.ResumeVoucherItemDetailEntity = void 0;
4
+ var resume_voucher_item_detail_entity_1 = require("./resume-voucher-item-detail.entity");
5
+ Object.defineProperty(exports, "ResumeVoucherItemDetailEntity", { enumerable: true, get: function () { return resume_voucher_item_detail_entity_1.ResumeVoucherItemDetailEntity; } });
6
+ var resume_voucher_item_entity_1 = require("./resume-voucher-item.entity");
7
+ Object.defineProperty(exports, "ResumeVoucherItemEntity", { enumerable: true, get: function () { return resume_voucher_item_entity_1.ResumeVoucherItemEntity; } });
8
+ var resume_voucher_entity_1 = require("./resume-voucher.entity");
9
+ Object.defineProperty(exports, "ResumeVoucherEntity", { enumerable: true, get: function () { return resume_voucher_entity_1.ResumeVoucherEntity; } });
@@ -0,0 +1,10 @@
1
+ import { ICoords } from '../../../../general';
2
+ import { IResumeVoucherItemDetail } from '../interfaces';
3
+ export declare class ResumeVoucherItemDetailEntity implements IResumeVoucherItemDetail {
4
+ cords: ICoords[];
5
+ count: number;
6
+ orderItemsCount: number;
7
+ totalAmount: number;
8
+ totalDiscount: number;
9
+ constructor(data?: Partial<ResumeVoucherItemDetailEntity>);
10
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResumeVoucherItemDetailEntity = void 0;
4
+ var ResumeVoucherItemDetailEntity = /** @class */ (function () {
5
+ function ResumeVoucherItemDetailEntity(data) {
6
+ this.cords = [];
7
+ this.count = 0;
8
+ this.orderItemsCount = 0;
9
+ this.totalAmount = 0;
10
+ this.totalDiscount = 0;
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 ResumeVoucherItemDetailEntity;
20
+ }());
21
+ exports.ResumeVoucherItemDetailEntity = ResumeVoucherItemDetailEntity;
@@ -0,0 +1,7 @@
1
+ import { IResumeVoucherItem } from '../interfaces';
2
+ import { ResumeVoucherItemDetailEntity } from './resume-voucher-item-detail.entity';
3
+ export declare class ResumeVoucherItemEntity implements IResumeVoucherItem {
4
+ confirmed: ResumeVoucherItemDetailEntity;
5
+ cancelled: ResumeVoucherItemDetailEntity;
6
+ constructor(data?: Partial<ResumeVoucherItemEntity>);
7
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResumeVoucherItemEntity = void 0;
4
+ var resume_voucher_item_detail_entity_1 = require("./resume-voucher-item-detail.entity");
5
+ var ResumeVoucherItemEntity = /** @class */ (function () {
6
+ function ResumeVoucherItemEntity(data) {
7
+ this.confirmed = new resume_voucher_item_detail_entity_1.ResumeVoucherItemDetailEntity();
8
+ this.cancelled = new resume_voucher_item_detail_entity_1.ResumeVoucherItemDetailEntity();
9
+ if (data) {
10
+ for (var key in data) {
11
+ if (data.hasOwnProperty(key) && key in this) {
12
+ this[key] = data[key];
13
+ }
14
+ }
15
+ }
16
+ }
17
+ return ResumeVoucherItemEntity;
18
+ }());
19
+ exports.ResumeVoucherItemEntity = ResumeVoucherItemEntity;
@@ -0,0 +1,20 @@
1
+ import { IMobyoInfo, INatiInfo } from '../../../../general';
2
+ import { EVoucherTargetTypes } from '../../../../voucher';
3
+ import { IResumeVoucher } from '../interfaces';
4
+ import { ResumeVoucherItemEntity } from './resume-voucher-item.entity';
5
+ export declare class ResumeVoucherEntity implements IResumeVoucher {
6
+ id: string;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ item: ResumeVoucherItemEntity;
10
+ items: {
11
+ id: string;
12
+ item: ResumeVoucherItemEntity;
13
+ }[];
14
+ targetType: {
15
+ id: EVoucherTargetTypes;
16
+ item: ResumeVoucherItemEntity;
17
+ }[];
18
+ info: IMobyoInfo | INatiInfo;
19
+ constructor(data?: Partial<ResumeVoucherEntity>);
20
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResumeVoucherEntity = void 0;
4
+ var general_1 = require("../../../../general");
5
+ var resume_voucher_item_entity_1 = require("./resume-voucher-item.entity");
6
+ var ResumeVoucherEntity = /** @class */ (function () {
7
+ function ResumeVoucherEntity(data) {
8
+ this.id = ''; // padrão AAAAMMDD
9
+ this.createdAt = new Date();
10
+ this.updatedAt = new Date();
11
+ this.item = new resume_voucher_item_entity_1.ResumeVoucherItemEntity();
12
+ this.items = []; // id no padrão MM - DD - HH
13
+ this.targetType = [];
14
+ this.info = new general_1.MobyoInfoEntity();
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 ResumeVoucherEntity;
24
+ }());
25
+ exports.ResumeVoucherEntity = ResumeVoucherEntity;
@@ -1 +1,2 @@
1
+ export * from './entities';
1
2
  export * from './interfaces';
@@ -14,4 +14,5 @@ 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("./entities"), exports);
17
18
  __exportStar(require("./interfaces"), exports);
@@ -1,11 +1,12 @@
1
1
  import { SponsorshipValueEntity } from '../../general/entities/sponsorship-value.entity';
2
- export declare class OrderBenefitsEntity {
2
+ import { EVoucherTargetTypes } from '../../voucher';
3
+ import { IOrderBenefits } from '../interfaces';
4
+ export declare class OrderBenefitsEntity implements IOrderBenefits {
3
5
  description: string;
4
6
  id: string;
5
7
  referenceId: string;
6
8
  sponsorshipValues: SponsorshipValueEntity[];
7
- target: string;
8
- targetId: string;
9
9
  value: number;
10
+ target: EVoucherTargetTypes;
10
11
  constructor(data?: Partial<OrderBenefitsEntity>);
11
12
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrderBenefitsEntity = void 0;
4
+ var voucher_1 = require("../../voucher");
4
5
  var OrderBenefitsEntity = /** @class */ (function () {
5
6
  // #endregion Properties (6)
6
7
  // #region Constructors (1)
@@ -10,9 +11,8 @@ var OrderBenefitsEntity = /** @class */ (function () {
10
11
  this.id = '';
11
12
  this.referenceId = '';
12
13
  this.sponsorshipValues = [];
13
- this.target = '';
14
- this.targetId = '';
15
14
  this.value = 0;
15
+ this.target = voucher_1.EVoucherTargetTypes.CART;
16
16
  if (data) {
17
17
  for (var key in data) {
18
18
  if (data.hasOwnProperty(key) && key in this) {
@@ -1,10 +1,10 @@
1
1
  import { ISponsorshipValue } from '../../general/interfaces';
2
+ import { EVoucherTargetTypes } from '../../voucher';
2
3
  export interface IOrderBenefits {
3
- description: string;
4
4
  id: string;
5
- referenceId: string;
6
5
  sponsorshipValues: ISponsorshipValue[];
7
- target: string;
8
- targetId: string;
6
+ target: EVoucherTargetTypes;
9
7
  value: number;
8
+ description: string;
9
+ referenceId: string;
10
10
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.4.30",
3
+ "version": "1.5.01",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.4.30",
3
+ "version": "1.5.01",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaS1vcmRlci1iZW5lZml0cy12My5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2J5by9tb2J5by1hcGkvaW50ZXJmYWNlcy9pLW9yZGVyLWJlbmVmaXRzLXYzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBFVm91Y2hlclRhcmdldFR5cGVzIH0gZnJvbSAnLi4vLi4vLi4vdm91Y2hlcic7XHJcblxyXG5leHBvcnQgaW50ZXJmYWNlIElTcG9uc29yc2hpcFZhbHVlcyB7XHJcbiAgLy8gI3JlZ2lvbiBQcm9wZXJ0aWVzICgyKVxyXG5cclxuICBuYW1lOiBzdHJpbmc7XHJcblxyXG4gIHZhbHVlOiBudW1iZXI7XHJcblxyXG4gIC8vICNlbmRyZWdpb24gUHJvcGVydGllcyAoMilcclxufVxyXG5leHBvcnQgaW50ZXJmYWNlIElPcmRlckJlbmVmaXRzVjMge1xyXG4gIC8vICNyZWdpb24gUHJvcGVydGllcyAoNilcclxuICBzcG9uc29yc2hpcFZhbHVlcz86IElTcG9uc29yc2hpcFZhbHVlc1tdO1xyXG5cclxuICB0YXJnZXQ6IEVWb3VjaGVyVGFyZ2V0VHlwZXM7XHJcblxyXG4gIHZhbHVlOiBudW1iZXI7XHJcblxyXG4gIC8vICNlbmRyZWdpb24gUHJvcGVydGllcyAoNilcclxufVxyXG4iXX0=
@@ -1,10 +0,0 @@
1
- import { EVoucherTargetTypes } from '../../../voucher';
2
- export interface ISponsorshipValues {
3
- name: string;
4
- value: number;
5
- }
6
- export interface IOrderBenefitsV3 {
7
- sponsorshipValues?: ISponsorshipValues[];
8
- target: EVoucherTargetTypes;
9
- value: number;
10
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });