cecon-interfaces 1.4.26 → 1.4.29
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm2022/index.mjs +2 -3
- package/dist/esm2022/mobyo/index.mjs +2 -1
- package/dist/esm2022/mobyo/mobyo-api/interfaces/i-order-benefits-v3.mjs +1 -1
- package/dist/esm2022/mobyo/mobyo-api/interfaces/i-order-customer-v3.mjs +1 -1
- package/dist/esm2022/mobyo/mobyo-customer-mobyo/entities/customer-mobyo.entity.mjs +1 -2
- package/dist/esm2022/mobyo/mobyo-customer-mobyo/interfaces/i-customer-mobyo.mjs +1 -1
- package/dist/esm2022/mobyo/resumes/index.mjs +2 -0
- package/dist/esm2022/mobyo/resumes/vouchers/index.mjs +2 -0
- package/dist/esm2022/mobyo/resumes/vouchers/interfaces/i-resume-voucher-item.mjs +2 -0
- package/dist/esm2022/mobyo/resumes/vouchers/interfaces/i-resume-voucher.mjs +2 -0
- package/dist/esm2022/mobyo/resumes/vouchers/interfaces/index.mjs +2 -0
- package/dist/esm2022/voucher/entities/index.mjs +3 -1
- package/dist/esm2022/voucher/entities/voucher-rule.entity.mjs +17 -0
- package/dist/esm2022/voucher/entities/voucher-sponsorship.entity.mjs +15 -0
- package/dist/esm2022/voucher/entities/voucher.entity.mjs +17 -39
- package/dist/esm2022/voucher/enums/e-voucher-status.enum.mjs +2 -3
- package/dist/esm2022/voucher/enums/index.mjs +3 -1
- package/dist/esm2022/voucher/enums/rule-types.enum.mjs +14 -0
- package/dist/esm2022/voucher/enums/target-types.enum.mjs +8 -0
- package/dist/esm2022/voucher/interfaces/i-voucher-customer.mjs +2 -0
- package/dist/esm2022/voucher/interfaces/i-voucher-rule.mjs +2 -0
- package/dist/esm2022/voucher/interfaces/i-voucher-sponsorship.mjs +2 -0
- package/dist/esm2022/voucher/interfaces/i-voucher.mjs +1 -1
- package/dist/esm2022/voucher/interfaces/index.mjs +1 -1
- package/dist/fesm2022/cecon-interfaces.mjs +69 -132
- package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/mobyo/index.d.ts +1 -0
- package/dist/mobyo/index.js +1 -0
- package/dist/mobyo/mobyo-api/interfaces/i-order-benefits-v3.d.ts +2 -2
- package/dist/mobyo/mobyo-api/interfaces/i-order-customer-v3.d.ts +0 -2
- package/dist/mobyo/mobyo-customer-mobyo/entities/customer-mobyo.entity.d.ts +0 -2
- package/dist/mobyo/mobyo-customer-mobyo/entities/customer-mobyo.entity.js +0 -1
- package/dist/mobyo/mobyo-customer-mobyo/interfaces/i-customer-mobyo.d.ts +0 -2
- package/dist/mobyo/resumes/index.d.ts +1 -0
- package/dist/mobyo/resumes/index.js +17 -0
- package/dist/mobyo/resumes/vouchers/index.d.ts +1 -0
- package/dist/{campaign → mobyo/resumes/vouchers}/index.js +0 -2
- package/dist/mobyo/resumes/vouchers/interfaces/i-resume-voucher-item.d.ts +12 -0
- package/dist/mobyo/resumes/vouchers/interfaces/i-resume-voucher.d.ts +18 -0
- package/dist/mobyo/resumes/vouchers/interfaces/index.d.ts +2 -0
- package/dist/package.json +1 -1
- package/dist/voucher/entities/index.d.ts +2 -0
- package/dist/voucher/entities/index.js +5 -1
- package/dist/voucher/entities/voucher-rule.entity.d.ts +8 -0
- package/dist/{campaign/entities/campaign-rule.entity.js → voucher/entities/voucher-rule.entity.js} +1 -1
- package/dist/voucher/entities/voucher-sponsorship.entity.d.ts +6 -0
- package/dist/{campaign/entities/campaign-sponsorship.entity.js → voucher/entities/voucher-sponsorship.entity.js} +5 -5
- package/dist/voucher/entities/voucher.entity.d.ts +15 -18
- package/dist/voucher/entities/voucher.entity.js +14 -35
- package/dist/voucher/enums/e-voucher-status.enum.d.ts +2 -3
- package/dist/voucher/enums/e-voucher-status.enum.js +1 -2
- package/dist/voucher/enums/index.d.ts +2 -0
- package/dist/voucher/enums/index.js +5 -1
- package/dist/{campaign → voucher}/enums/rule-types.enum.d.ts +1 -1
- package/dist/voucher/enums/rule-types.enum.js +16 -0
- package/dist/{campaign → voucher}/enums/target-types.enum.d.ts +1 -1
- package/dist/voucher/enums/target-types.enum.js +10 -0
- package/dist/voucher/interfaces/i-voucher-customer.d.ts +15 -0
- package/dist/{campaign/interfaces/i-campaign-rule.d.ts → voucher/interfaces/i-voucher-rule.d.ts} +3 -3
- package/dist/voucher/interfaces/i-voucher-rule.js +2 -0
- package/dist/{campaign/interfaces/i-campaign-sponsorship.d.ts → voucher/interfaces/i-voucher-sponsorship.d.ts} +1 -1
- package/dist/voucher/interfaces/i-voucher-sponsorship.js +2 -0
- package/dist/voucher/interfaces/i-voucher.d.ts +16 -15
- package/dist/voucher/interfaces/index.d.ts +3 -0
- package/package.json +1 -1
- package/dist/campaign/entities/campaign-rule.entity.d.ts +0 -8
- package/dist/campaign/entities/campaign-sponsorship.entity.d.ts +0 -6
- package/dist/campaign/entities/campaign.entity.d.ts +0 -24
- package/dist/campaign/entities/campaign.entity.js +0 -37
- package/dist/campaign/entities/index.d.ts +0 -3
- package/dist/campaign/entities/index.js +0 -9
- package/dist/campaign/enums/e-campaign-status.enum.d.ts +0 -6
- package/dist/campaign/enums/e-campaign-status.enum.js +0 -10
- package/dist/campaign/enums/index.d.ts +0 -3
- package/dist/campaign/enums/index.js +0 -9
- package/dist/campaign/enums/rule-types.enum.js +0 -16
- package/dist/campaign/enums/target-types.enum.js +0 -10
- package/dist/campaign/index.d.ts +0 -3
- package/dist/campaign/interfaces/i-campaign.d.ts +0 -25
- package/dist/campaign/interfaces/index.d.ts +0 -3
- package/dist/esm2022/campaign/entities/campaign-rule.entity.mjs +0 -17
- package/dist/esm2022/campaign/entities/campaign-sponsorship.entity.mjs +0 -15
- package/dist/esm2022/campaign/entities/campaign.entity.mjs +0 -33
- package/dist/esm2022/campaign/entities/index.mjs +0 -4
- package/dist/esm2022/campaign/enums/e-campaign-status.enum.mjs +0 -8
- package/dist/esm2022/campaign/enums/index.mjs +0 -4
- package/dist/esm2022/campaign/enums/rule-types.enum.mjs +0 -14
- package/dist/esm2022/campaign/enums/target-types.enum.mjs +0 -8
- package/dist/esm2022/campaign/index.mjs +0 -4
- package/dist/esm2022/campaign/interfaces/i-campaign-rule.mjs +0 -2
- package/dist/esm2022/campaign/interfaces/i-campaign-sponsorship.mjs +0 -2
- package/dist/esm2022/campaign/interfaces/i-campaign.mjs +0 -2
- package/dist/esm2022/campaign/interfaces/index.mjs +0 -2
- /package/dist/{campaign/interfaces/i-campaign-rule.js → mobyo/resumes/vouchers/interfaces/i-resume-voucher-item.js} +0 -0
- /package/dist/{campaign/interfaces/i-campaign-sponsorship.js → mobyo/resumes/vouchers/interfaces/i-resume-voucher.js} +0 -0
- /package/dist/{campaign → mobyo/resumes/vouchers}/interfaces/index.js +0 -0
- /package/dist/{campaign/interfaces/i-campaign.js → voucher/interfaces/i-voucher-customer.js} +0 -0
package/dist/index.d.ts
CHANGED
@@ -2,7 +2,6 @@ export * from './app';
|
|
2
2
|
export * from './billing';
|
3
3
|
export * from './billing-order';
|
4
4
|
export * from './bluesoft';
|
5
|
-
export * from './campaign';
|
6
5
|
export * from './clients';
|
7
6
|
export * from './company';
|
8
7
|
export * from './container';
|
@@ -24,6 +23,7 @@ export * from './iugu';
|
|
24
23
|
export * from './lead';
|
25
24
|
export * from './logss';
|
26
25
|
export * from './master';
|
26
|
+
export * from './meli';
|
27
27
|
export * from './member';
|
28
28
|
export * from './mobyo';
|
29
29
|
export * from './monitor';
|
@@ -53,4 +53,3 @@ export * from './viacep';
|
|
53
53
|
export * from './voucher';
|
54
54
|
export * from './wa-server';
|
55
55
|
export * from './withdraw';
|
56
|
-
export * from './meli';
|
package/dist/index.js
CHANGED
@@ -18,7 +18,6 @@ __exportStar(require("./app"), exports);
|
|
18
18
|
__exportStar(require("./billing"), exports);
|
19
19
|
__exportStar(require("./billing-order"), exports);
|
20
20
|
__exportStar(require("./bluesoft"), exports);
|
21
|
-
__exportStar(require("./campaign"), exports);
|
22
21
|
__exportStar(require("./clients"), exports);
|
23
22
|
__exportStar(require("./company"), exports);
|
24
23
|
__exportStar(require("./container"), exports);
|
@@ -40,6 +39,7 @@ __exportStar(require("./iugu"), exports);
|
|
40
39
|
__exportStar(require("./lead"), exports);
|
41
40
|
__exportStar(require("./logss"), exports);
|
42
41
|
__exportStar(require("./master"), exports);
|
42
|
+
__exportStar(require("./meli"), exports);
|
43
43
|
__exportStar(require("./member"), exports);
|
44
44
|
__exportStar(require("./mobyo"), exports);
|
45
45
|
__exportStar(require("./monitor"), exports);
|
@@ -69,4 +69,3 @@ __exportStar(require("./viacep"), exports);
|
|
69
69
|
__exportStar(require("./voucher"), exports);
|
70
70
|
__exportStar(require("./wa-server"), exports);
|
71
71
|
__exportStar(require("./withdraw"), exports);
|
72
|
-
__exportStar(require("./meli"), exports);
|
package/dist/mobyo/index.d.ts
CHANGED
package/dist/mobyo/index.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { EVoucherTargetTypes } from '../../../voucher';
|
2
2
|
export interface ISponsorshipValues {
|
3
3
|
name: string;
|
4
4
|
value: number;
|
5
5
|
}
|
6
6
|
export interface IOrderBenefitsV3 {
|
7
7
|
sponsorshipValues?: ISponsorshipValues[];
|
8
|
-
target:
|
8
|
+
target: EVoucherTargetTypes;
|
9
9
|
value: number;
|
10
10
|
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { IUsedVoucher } from "../../mobyo-customer-mobyo";
|
2
1
|
export interface IOrdersCustomerPhone {
|
3
2
|
description: String;
|
4
3
|
localizer: String;
|
@@ -13,6 +12,5 @@ export interface IOrderCustomerV3 {
|
|
13
12
|
ordersCountOnMerchant: number;
|
14
13
|
phone: IOrdersCustomerPhone;
|
15
14
|
picture: string;
|
16
|
-
usedVouchers: IUsedVoucher[];
|
17
15
|
birthday: Date | null;
|
18
16
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { CustomerEntity } from '../../../customer';
|
2
2
|
import { IAddress } from '../../../general';
|
3
|
-
import { IUsedVoucher } from '../interfaces';
|
4
3
|
import { ICustomerMobyo } from '../interfaces/i-customer-mobyo';
|
5
4
|
export declare class CustomerMobyoEntity extends CustomerEntity implements ICustomerMobyo {
|
6
5
|
active: boolean;
|
@@ -12,7 +11,6 @@ export declare class CustomerMobyoEntity extends CustomerEntity implements ICust
|
|
12
11
|
ordersCountOnRestaurant: number;
|
13
12
|
uid: string;
|
14
13
|
version: string;
|
15
|
-
usedVouchers: IUsedVoucher[];
|
16
14
|
birthday: Date | null;
|
17
15
|
constructor(data?: Partial<CustomerMobyoEntity>);
|
18
16
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { ICustomer } from '../../../customer';
|
2
2
|
import { IAddress } from '../../../general';
|
3
|
-
import { IUsedVoucher } from './i-used-voucher';
|
4
3
|
export interface ICustomerMobyo extends ICustomer {
|
5
4
|
active: boolean;
|
6
5
|
addresses: IAddress[];
|
@@ -11,6 +10,5 @@ export interface ICustomerMobyo extends ICustomer {
|
|
11
10
|
ordersCountOnRestaurant: number;
|
12
11
|
uid: string;
|
13
12
|
version: string;
|
14
|
-
usedVouchers: IUsedVoucher[];
|
15
13
|
birthday: Date | null;
|
16
14
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './vouchers';
|
@@ -0,0 +1,17 @@
|
|
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("./vouchers"), exports);
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './interfaces';
|
@@ -14,6 +14,4 @@ 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);
|
18
|
-
__exportStar(require("./enums"), exports);
|
19
17
|
__exportStar(require("./interfaces"), exports);
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { ICoords } from '../../../../general';
|
2
|
+
export interface IResumeVoucherItem {
|
3
|
+
confirmed: IResumeVoucherItemDetail;
|
4
|
+
cancelled: IResumeVoucherItemDetail;
|
5
|
+
}
|
6
|
+
export interface IResumeVoucherItemDetail {
|
7
|
+
cords: ICoords[];
|
8
|
+
count: number;
|
9
|
+
orderItemsCount: number;
|
10
|
+
totalAmount: number;
|
11
|
+
totalDiscount: number;
|
12
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { IMobyoInfo, INatiInfo } from '../../../../general';
|
2
|
+
import { EVoucherTargetTypes } from '../../../../voucher';
|
3
|
+
import { IResumeVoucherItem } from './i-resume-voucher-item';
|
4
|
+
export interface IResumeVoucher {
|
5
|
+
id: string;
|
6
|
+
createdAt: Date;
|
7
|
+
updatedAt: Date;
|
8
|
+
item: IResumeVoucherItem;
|
9
|
+
items: {
|
10
|
+
id: string;
|
11
|
+
item: IResumeVoucherItem;
|
12
|
+
}[];
|
13
|
+
targetType: {
|
14
|
+
id: EVoucherTargetTypes;
|
15
|
+
item: IResumeVoucherItem;
|
16
|
+
}[];
|
17
|
+
info: IMobyoInfo | INatiInfo;
|
18
|
+
}
|
package/dist/package.json
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.VoucherEntity = void 0;
|
3
|
+
exports.VoucherEntity = exports.VoucherSponsorshipEntity = exports.CampaignRuleEntity = void 0;
|
4
|
+
var voucher_rule_entity_1 = require("./voucher-rule.entity");
|
5
|
+
Object.defineProperty(exports, "CampaignRuleEntity", { enumerable: true, get: function () { return voucher_rule_entity_1.CampaignRuleEntity; } });
|
6
|
+
var voucher_sponsorship_entity_1 = require("./voucher-sponsorship.entity");
|
7
|
+
Object.defineProperty(exports, "VoucherSponsorshipEntity", { enumerable: true, get: function () { return voucher_sponsorship_entity_1.VoucherSponsorshipEntity; } });
|
4
8
|
var voucher_entity_1 = require("./voucher.entity");
|
5
9
|
Object.defineProperty(exports, "VoucherEntity", { enumerable: true, get: function () { return voucher_entity_1.VoucherEntity; } });
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { EVoucherRuleType } from '../enums';
|
2
|
+
import { IVoucherRule } from '../interfaces';
|
3
|
+
export declare class CampaignRuleEntity implements IVoucherRule {
|
4
|
+
type: EVoucherRuleType;
|
5
|
+
value?: string | number | Date | boolean;
|
6
|
+
description: string;
|
7
|
+
constructor(data?: Partial<CampaignRuleEntity>);
|
8
|
+
}
|
package/dist/{campaign/entities/campaign-rule.entity.js → voucher/entities/voucher-rule.entity.js}
RENAMED
@@ -5,7 +5,7 @@ var enums_1 = require("../enums");
|
|
5
5
|
var CampaignRuleEntity = /** @class */ (function () {
|
6
6
|
function CampaignRuleEntity(data) {
|
7
7
|
// #region Properties (10)
|
8
|
-
this.type = enums_1.
|
8
|
+
this.type = enums_1.EVoucherRuleType.MIN_VALUE;
|
9
9
|
this.value = 0;
|
10
10
|
this.description = '';
|
11
11
|
if (data) {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
var
|
5
|
-
function
|
3
|
+
exports.VoucherSponsorshipEntity = void 0;
|
4
|
+
var VoucherSponsorshipEntity = /** @class */ (function () {
|
5
|
+
function VoucherSponsorshipEntity(data) {
|
6
6
|
// #region Properties (10)
|
7
7
|
this.name = 'MERCHANT';
|
8
8
|
this.value = 0;
|
@@ -14,6 +14,6 @@ var CampaignSponsorshipEntity = /** @class */ (function () {
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
}
|
17
|
-
return
|
17
|
+
return VoucherSponsorshipEntity;
|
18
18
|
}());
|
19
|
-
exports.
|
19
|
+
exports.VoucherSponsorshipEntity = VoucherSponsorshipEntity;
|
@@ -1,28 +1,25 @@
|
|
1
|
-
import { EDiscountType,
|
2
|
-
import { EVoucherStatus } from '../enums';
|
3
|
-
import { IVoucher } from '../interfaces';
|
1
|
+
import { EDiscountType, IMobyoInfo, INatiInfo } from '../../general';
|
2
|
+
import { EVoucherStatus, EVoucherTargetTypes } from '../enums';
|
3
|
+
import { IVoucher, IVoucherRule, IVoucherSponsorship } from '../interfaces';
|
4
4
|
export declare class VoucherEntity implements IVoucher {
|
5
|
-
|
6
|
-
|
7
|
-
appId: string[];
|
8
|
-
campaignId?: string | null;
|
9
|
-
companyId?: string | null;
|
10
|
-
containerId?: string | null;
|
5
|
+
info: IMobyoInfo | INatiInfo;
|
6
|
+
concludedAt: Date;
|
11
7
|
createdAt: Date;
|
12
|
-
description?: string | null;
|
13
|
-
discountType: EDiscountType;
|
14
|
-
expirationDate: Date;
|
15
8
|
id: string;
|
16
9
|
isPublic: boolean;
|
17
10
|
key: string;
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
name: string;
|
12
|
+
activatedAt: Date;
|
13
|
+
rules: IVoucherRule[];
|
14
|
+
type: EDiscountType;
|
15
|
+
amount: number;
|
16
|
+
sponsorship: IVoucherSponsorship[];
|
22
17
|
status: EVoucherStatus;
|
23
|
-
|
18
|
+
targetsId: string[];
|
19
|
+
targetType: EVoucherTargetTypes;
|
24
20
|
updatedAt: Date;
|
21
|
+
limit: number;
|
22
|
+
isExclusive: boolean;
|
25
23
|
usedCount: number;
|
26
24
|
constructor(data?: Partial<VoucherEntity>);
|
27
|
-
partnerId: string[];
|
28
25
|
}
|
@@ -4,47 +4,26 @@ exports.VoucherEntity = void 0;
|
|
4
4
|
var general_1 = require("../../general");
|
5
5
|
var enums_1 = require("../enums");
|
6
6
|
var VoucherEntity = /** @class */ (function () {
|
7
|
-
// #endregion Properties (21)
|
8
|
-
// #region Constructors (1)
|
9
7
|
function VoucherEntity(data) {
|
10
|
-
// #region Properties (
|
11
|
-
|
12
|
-
this.
|
13
|
-
// valor do desconto (soma do valor de todos os patrocínios - sponsorship)
|
14
|
-
this.amount = 0;
|
15
|
-
this.appId = [];
|
16
|
-
// ID da campanha associada (opcional para uso futuro)
|
17
|
-
this.campaignId = null;
|
18
|
-
// ID da empresa associada ao cupom (opcional)
|
19
|
-
this.companyId = null;
|
20
|
-
// ID do recipiente ou contexto onde o cupom é válido (opcional)
|
21
|
-
this.containerId = null;
|
22
|
-
// data de criação do cupom
|
8
|
+
// #region Properties (10)
|
9
|
+
this.info = new general_1.MobyoInfoEntity();
|
10
|
+
this.concludedAt = new Date();
|
23
11
|
this.createdAt = new Date();
|
24
|
-
// descrição opcional do cupom
|
25
|
-
this.description = null;
|
26
|
-
// tipo de desconto: porcentagem ou valor fixo
|
27
|
-
this.discountType = general_1.EDiscountType.FIXED_AMOUNT;
|
28
|
-
// data de validade do cupom
|
29
|
-
this.expirationDate = new Date(Date.now() + 1000 * 60 * 60 * 24 * 30);
|
30
12
|
this.id = '';
|
31
|
-
|
32
|
-
this.isPublic = true;
|
33
|
-
// chave única para o cupom
|
13
|
+
this.isPublic = false;
|
34
14
|
this.key = '';
|
35
|
-
|
36
|
-
this.
|
37
|
-
|
38
|
-
this.
|
39
|
-
this.
|
40
|
-
// informação de patrocínio (opcional)
|
15
|
+
this.name = '';
|
16
|
+
this.activatedAt = new Date();
|
17
|
+
this.rules = [];
|
18
|
+
this.type = general_1.EDiscountType.PERCENT;
|
19
|
+
this.amount = 0;
|
41
20
|
this.sponsorship = [];
|
42
|
-
|
43
|
-
this.
|
44
|
-
this.
|
45
|
-
// data da última atualização do cupom
|
21
|
+
this.status = enums_1.EVoucherStatus.ACTIVE;
|
22
|
+
this.targetsId = [];
|
23
|
+
this.targetType = enums_1.EVoucherTargetTypes.CART;
|
46
24
|
this.updatedAt = new Date();
|
47
|
-
|
25
|
+
this.limit = 0;
|
26
|
+
this.isExclusive = false;
|
48
27
|
this.usedCount = 0;
|
49
28
|
if (data) {
|
50
29
|
for (var key in data) {
|
@@ -4,8 +4,7 @@ exports.EVoucherStatus = void 0;
|
|
4
4
|
var EVoucherStatus;
|
5
5
|
(function (EVoucherStatus) {
|
6
6
|
EVoucherStatus["ACTIVE"] = "ACTIVE";
|
7
|
-
EVoucherStatus["REDEEMED"] = "REDEEMED";
|
8
|
-
EVoucherStatus["EXPIRED"] = "EXPIRED";
|
9
7
|
EVoucherStatus["PLACED"] = "PLACED";
|
10
8
|
EVoucherStatus["PAUSED"] = "PAUSED";
|
9
|
+
EVoucherStatus["CONCLUDED"] = "CONCLUDED";
|
11
10
|
})(EVoucherStatus || (exports.EVoucherStatus = EVoucherStatus = {}));
|
@@ -1,5 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.EVoucherStatus = void 0;
|
3
|
+
exports.EVoucherTargetTypes = exports.EVoucherRuleType = exports.EVoucherStatus = void 0;
|
4
4
|
var e_voucher_status_enum_1 = require("./e-voucher-status.enum");
|
5
5
|
Object.defineProperty(exports, "EVoucherStatus", { enumerable: true, get: function () { return e_voucher_status_enum_1.EVoucherStatus; } });
|
6
|
+
var rule_types_enum_1 = require("./rule-types.enum");
|
7
|
+
Object.defineProperty(exports, "EVoucherRuleType", { enumerable: true, get: function () { return rule_types_enum_1.EVoucherRuleType; } });
|
8
|
+
var target_types_enum_1 = require("./target-types.enum");
|
9
|
+
Object.defineProperty(exports, "EVoucherTargetTypes", { enumerable: true, get: function () { return target_types_enum_1.EVoucherTargetTypes; } });
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EVoucherRuleType = void 0;
|
4
|
+
var EVoucherRuleType;
|
5
|
+
(function (EVoucherRuleType) {
|
6
|
+
EVoucherRuleType["FIRST_BUY"] = "FIRST_BUY";
|
7
|
+
EVoucherRuleType["BIRTHDAY"] = "BIRTHDAY";
|
8
|
+
EVoucherRuleType["ONE_BY_USER"] = "ONE_BY_USER";
|
9
|
+
EVoucherRuleType["ONE_BY_DAY"] = "ONE_BY_DAY";
|
10
|
+
EVoucherRuleType["IN_PAYMENT_ID"] = "IN_PAYMENT_ID";
|
11
|
+
EVoucherRuleType["MIN_VALUE"] = "MIN_VALUE";
|
12
|
+
EVoucherRuleType["SHIFT_START_AT"] = "SHIFT_START_AT";
|
13
|
+
EVoucherRuleType["SHIFT_END_AT"] = "SHIFT_END_AT";
|
14
|
+
EVoucherRuleType["START_AT"] = "START_AT";
|
15
|
+
EVoucherRuleType["END_AT"] = "END_AT";
|
16
|
+
})(EVoucherRuleType || (exports.EVoucherRuleType = EVoucherRuleType = {}));
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EVoucherTargetTypes = void 0;
|
4
|
+
var EVoucherTargetTypes;
|
5
|
+
(function (EVoucherTargetTypes) {
|
6
|
+
EVoucherTargetTypes["CART"] = "CART";
|
7
|
+
EVoucherTargetTypes["DELIVERY_FEE"] = "DELIVERY_FEE";
|
8
|
+
EVoucherTargetTypes["ITEMS"] = "ITEMS";
|
9
|
+
EVoucherTargetTypes["CATEGORY"] = "CATEGORY";
|
10
|
+
})(EVoucherTargetTypes || (exports.EVoucherTargetTypes = EVoucherTargetTypes = {}));
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IAddress, ICoords } from '../../general';
|
2
|
+
import { IOrderTotal } from '../../order';
|
3
|
+
export interface IVoucherCustomer {
|
4
|
+
customerId: string;
|
5
|
+
cords: ICoords;
|
6
|
+
address: IAddress;
|
7
|
+
phoneNumber: string;
|
8
|
+
meta: string;
|
9
|
+
id: string;
|
10
|
+
itensCount: number;
|
11
|
+
total: IOrderTotal;
|
12
|
+
averageAmount: number;
|
13
|
+
createdAt: Date;
|
14
|
+
updatedAt: Date;
|
15
|
+
}
|
package/dist/{campaign/interfaces/i-campaign-rule.d.ts → voucher/interfaces/i-voucher-rule.d.ts}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { IMenuScheduleV2 } from '../../mobyo/mobyo-api/interfaces/i-menu-schedule-v2';
|
2
|
-
import {
|
3
|
-
export interface
|
4
|
-
type:
|
2
|
+
import { EVoucherRuleType } from '../enums/rule-types.enum';
|
3
|
+
export interface IVoucherRule {
|
4
|
+
type: EVoucherRuleType;
|
5
5
|
value?: string | number | Date | boolean | IMenuScheduleV2;
|
6
6
|
description: string;
|
7
7
|
}
|
@@ -1,25 +1,26 @@
|
|
1
|
-
import { EDiscountType,
|
1
|
+
import { EDiscountType, IMobyoInfo, INatiInfo } from '../../general';
|
2
2
|
import { EVoucherStatus } from '../enums';
|
3
|
+
import { EVoucherTargetTypes } from '../enums/target-types.enum';
|
4
|
+
import { IVoucherRule } from './i-voucher-rule';
|
5
|
+
import { IVoucherSponsorship } from './i-voucher-sponsorship';
|
3
6
|
export interface IVoucher {
|
4
|
-
|
5
|
-
|
6
|
-
appId: string[];
|
7
|
-
campaignId?: string | null;
|
8
|
-
companyId?: string | null;
|
9
|
-
containerId?: string | null;
|
7
|
+
info: IMobyoInfo | INatiInfo;
|
8
|
+
concludedAt: Date;
|
10
9
|
createdAt: Date;
|
11
|
-
description?: string | null;
|
12
|
-
discountType: EDiscountType;
|
13
|
-
expirationDate: Date;
|
14
10
|
id: string;
|
15
11
|
isPublic: boolean;
|
16
12
|
key: string;
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
name: string;
|
14
|
+
activatedAt: Date;
|
15
|
+
rules: IVoucherRule[];
|
16
|
+
type: EDiscountType;
|
17
|
+
amount: number;
|
18
|
+
sponsorship: IVoucherSponsorship[];
|
20
19
|
status: EVoucherStatus;
|
21
|
-
|
20
|
+
targetsId: string[];
|
21
|
+
targetType: EVoucherTargetTypes;
|
22
22
|
updatedAt: Date;
|
23
|
+
limit: number;
|
24
|
+
isExclusive: boolean;
|
23
25
|
usedCount: number;
|
24
|
-
recurrent: boolean;
|
25
26
|
}
|
package/package.json
CHANGED
@@ -1,8 +0,0 @@
|
|
1
|
-
import { ECampaignRuleType } from '../enums';
|
2
|
-
import { ICampaignRule } from '../interfaces';
|
3
|
-
export declare class CampaignRuleEntity implements ICampaignRule {
|
4
|
-
type: ECampaignRuleType;
|
5
|
-
value?: string | number | Date | boolean;
|
6
|
-
description: string;
|
7
|
-
constructor(data?: Partial<CampaignRuleEntity>);
|
8
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import { EDiscountType, IMobyoInfo, INatiInfo } from '../../general';
|
2
|
-
import { ECampaignStatus, ECampaignTargetTypes } from '../enums';
|
3
|
-
import { ICampaign, ICampaignRule, ICampaignSponsorship } from '../interfaces';
|
4
|
-
export declare class CampaignEntity implements ICampaign {
|
5
|
-
info: IMobyoInfo | INatiInfo;
|
6
|
-
concludedAt: Date;
|
7
|
-
createdAt: Date;
|
8
|
-
id: string;
|
9
|
-
isPublic: boolean;
|
10
|
-
key: string;
|
11
|
-
name: string;
|
12
|
-
activatedAt: Date;
|
13
|
-
rules: ICampaignRule[];
|
14
|
-
type: EDiscountType;
|
15
|
-
amount: number;
|
16
|
-
sponsorship: ICampaignSponsorship[];
|
17
|
-
status: ECampaignStatus;
|
18
|
-
targetsId: string[];
|
19
|
-
targetType: ECampaignTargetTypes;
|
20
|
-
updatedAt: Date;
|
21
|
-
limit: number;
|
22
|
-
isExclusive: boolean;
|
23
|
-
constructor(data?: Partial<CampaignEntity>);
|
24
|
-
}
|