cecon-interfaces 1.1.13 → 1.1.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/app/interfaces/i-natigo.d.ts +1 -1
- package/dist/campaign/entities/campaign.entity.d.ts +15 -0
- package/dist/campaign/entities/campaign.entity.js +30 -0
- package/dist/campaign/entities/index.d.ts +1 -0
- package/dist/campaign/entities/index.js +5 -0
- package/dist/campaign/enums/e-campaign-status.enum.d.ts +7 -0
- package/dist/campaign/enums/e-campaign-status.enum.js +11 -0
- package/dist/campaign/enums/index.d.ts +1 -0
- package/dist/campaign/enums/index.js +5 -0
- package/dist/campaign/index.d.ts +3 -0
- package/dist/campaign/index.js +19 -0
- package/dist/campaign/interfaces/i-campaign.d.ts +13 -0
- package/dist/campaign/interfaces/index.d.ts +1 -0
- package/dist/campaign/interfaces/index.js +2 -0
- package/dist/esm2022/app/interfaces/i-natigo.mjs +1 -1
- package/dist/esm2022/campaign/entities/campaign.entity.mjs +26 -0
- package/dist/esm2022/campaign/entities/index.mjs +2 -0
- package/dist/esm2022/campaign/enums/e-campaign-status.enum.mjs +9 -0
- package/dist/esm2022/campaign/enums/index.mjs +2 -0
- package/dist/esm2022/campaign/index.mjs +4 -0
- package/dist/esm2022/campaign/interfaces/i-campaign.mjs +2 -0
- package/dist/esm2022/campaign/interfaces/index.mjs +2 -0
- package/dist/esm2022/general/entities/index.mjs +2 -1
- package/dist/esm2022/general/entities/sponsorship-value.entity.mjs +17 -0
- package/dist/esm2022/general/enums/e-discount-type.enum.mjs +6 -0
- package/dist/esm2022/general/enums/index.mjs +3 -1
- package/dist/esm2022/general/enums/sponsorship-values.enum.mjs +8 -0
- package/dist/esm2022/general/interfaces/i-sponsorship-value.mjs +2 -0
- package/dist/esm2022/general/interfaces/index.mjs +1 -1
- package/dist/esm2022/index.mjs +3 -1
- package/dist/esm2022/order/entities/benefits.entity.mjs +1 -1
- package/dist/esm2022/order/entities/index.mjs +1 -2
- package/dist/esm2022/order/interfaces/i-benefits.mjs +1 -1
- package/dist/esm2022/order/interfaces/index.mjs +1 -1
- package/dist/esm2022/subscription/entities/subscription.entity.mjs +2 -1
- package/dist/esm2022/subscription/interfaces/i-subscription.mjs +1 -1
- package/dist/esm2022/voucher/entities/index.mjs +2 -0
- package/dist/esm2022/voucher/entities/voucher.entity.mjs +52 -0
- package/dist/esm2022/voucher/enums/e-voucher-status.enum.mjs +9 -0
- package/dist/esm2022/voucher/enums/index.mjs +2 -0
- package/dist/esm2022/voucher/index.mjs +4 -0
- package/dist/esm2022/voucher/interfaces/i-voucher.mjs +2 -0
- package/dist/esm2022/voucher/interfaces/index.mjs +2 -0
- package/dist/fesm2022/cecon-interfaces.mjs +126 -18
- package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
- package/dist/general/entities/index.d.ts +1 -0
- package/dist/general/entities/index.js +3 -1
- package/dist/general/entities/sponsorship-value.entity.d.ts +5 -0
- package/dist/{order/entities/benefits-sponsor-ship.entity.js → general/entities/sponsorship-value.entity.js} +5 -5
- package/dist/general/enums/e-discount-type.enum.d.ts +4 -0
- package/dist/general/enums/e-discount-type.enum.js +8 -0
- package/dist/general/enums/index.d.ts +2 -0
- package/dist/general/enums/index.js +5 -1
- package/dist/general/enums/sponsorship-values.enum.d.ts +6 -0
- package/dist/general/enums/sponsorship-values.enum.js +10 -0
- package/dist/general/interfaces/i-sponsorship-value.d.ts +5 -0
- package/dist/general/interfaces/i-sponsorship-value.js +2 -0
- package/dist/general/interfaces/index.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/order/entities/benefits.entity.d.ts +2 -2
- package/dist/order/entities/index.d.ts +0 -1
- package/dist/order/entities/index.js +1 -3
- package/dist/order/interfaces/i-benefits.d.ts +2 -2
- package/dist/order/interfaces/index.d.ts +0 -1
- package/dist/package.json +1 -1
- package/dist/subscription/entities/subscription.entity.d.ts +1 -0
- package/dist/subscription/entities/subscription.entity.js +1 -0
- package/dist/subscription/interfaces/i-subscription.d.ts +1 -0
- package/dist/voucher/entities/index.d.ts +1 -0
- package/dist/voucher/entities/index.js +5 -0
- package/dist/voucher/entities/voucher.entity.d.ts +24 -0
- package/dist/voucher/entities/voucher.entity.js +56 -0
- package/dist/voucher/enums/e-voucher-status.enum.d.ts +7 -0
- package/dist/voucher/enums/e-voucher-status.enum.js +11 -0
- package/dist/voucher/enums/index.d.ts +1 -0
- package/dist/voucher/enums/index.js +5 -0
- package/dist/voucher/index.d.ts +3 -0
- package/dist/voucher/index.js +19 -0
- package/dist/voucher/interfaces/i-voucher.d.ts +22 -0
- package/dist/voucher/interfaces/i-voucher.js +2 -0
- package/dist/voucher/interfaces/index.d.ts +1 -0
- package/dist/voucher/interfaces/index.js +2 -0
- package/package.json +1 -1
- package/dist/esm2022/order/entities/benefits-sponsor-ship.entity.mjs +0 -17
- package/dist/esm2022/order/interfaces/i-benefits-sponsor-ship.mjs +0 -2
- package/dist/order/entities/benefits-sponsor-ship.entity.d.ts +0 -5
- package/dist/order/interfaces/i-benefits-sponsor-ship.d.ts +0 -4
- /package/dist/{order/interfaces/i-benefits-sponsor-ship.js → campaign/interfaces/i-campaign.js} +0 -0
@@ -14,3 +14,4 @@ export { PaymentProviderEntity } from './payment-provider.entity';
|
|
14
14
|
export { PaymentTokenDataEntity } from './payment-token-data.entity';
|
15
15
|
export { PaymentTokenEntity } from './payment-token.entity';
|
16
16
|
export { RatingEntity } from './rating.entity';
|
17
|
+
export { SponsorshipValueEntity } from './sponsorship-value.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.CustomVariableEntity = exports.CoordsEntity = exports.CarouselImageEntity = exports.BaseEntity = exports.AddressEntity = void 0;
|
3
|
+
exports.SponsorshipValueEntity = 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");
|
@@ -33,3 +33,5 @@ var payment_token_entity_1 = require("./payment-token.entity");
|
|
33
33
|
Object.defineProperty(exports, "PaymentTokenEntity", { enumerable: true, get: function () { return payment_token_entity_1.PaymentTokenEntity; } });
|
34
34
|
var rating_entity_1 = require("./rating.entity");
|
35
35
|
Object.defineProperty(exports, "RatingEntity", { enumerable: true, get: function () { return rating_entity_1.RatingEntity; } });
|
36
|
+
var sponsorship_value_entity_1 = require("./sponsorship-value.entity");
|
37
|
+
Object.defineProperty(exports, "SponsorshipValueEntity", { enumerable: true, get: function () { return sponsorship_value_entity_1.SponsorshipValueEntity; } });
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
var
|
3
|
+
exports.SponsorshipValueEntity = void 0;
|
4
|
+
var SponsorshipValueEntity = /** @class */ (function () {
|
5
5
|
// #endregion Properties (2)
|
6
6
|
// #region Constructors (1)
|
7
|
-
function
|
7
|
+
function SponsorshipValueEntity(data) {
|
8
8
|
// #region Properties (2)
|
9
9
|
this.name = '';
|
10
10
|
this.value = 0;
|
@@ -16,6 +16,6 @@ var SponsorshipValuesEntity = /** @class */ (function () {
|
|
16
16
|
}
|
17
17
|
}
|
18
18
|
}
|
19
|
-
return
|
19
|
+
return SponsorshipValueEntity;
|
20
20
|
}());
|
21
|
-
exports.
|
21
|
+
exports.SponsorshipValueEntity = SponsorshipValueEntity;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EDiscountType = void 0;
|
4
|
+
var EDiscountType;
|
5
|
+
(function (EDiscountType) {
|
6
|
+
EDiscountType["PERCENT"] = "PERCENT";
|
7
|
+
EDiscountType["FIXED_AMOUNT"] = "FIXED";
|
8
|
+
})(EDiscountType || (exports.EDiscountType = EDiscountType = {}));
|
@@ -1,5 +1,6 @@
|
|
1
1
|
export { BooleanStringEnum } from './boolean-string.enum';
|
2
2
|
export { DocTypeEnum } from './doc-type.enum';
|
3
|
+
export { EDiscountType } from './e-discount-type.enum';
|
3
4
|
export { EFiscalDocModelCode } from './fiscal-doc-model-code.enum';
|
4
5
|
export { IntervalTypeEnum } from './interval-type.enum';
|
5
6
|
export { LeadOriginEnum } from './lead-origin.enum';
|
@@ -11,3 +12,4 @@ export { PaymentTypeEnum } from './payment-type.enum';
|
|
11
12
|
export { LegalEntiyEnum } from './person-type.enum';
|
12
13
|
export { PlatfomrEnum } from './platform.enum';
|
13
14
|
export { PaymentProviderEnum } from './providers.enum';
|
15
|
+
export { ESponsorshipValues } from './sponsorship-values.enum';
|
@@ -1,10 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.PaymentProviderEnum = exports.PlatfomrEnum = exports.LegalEntiyEnum = exports.PaymentTypeEnum = exports.PaymentStatusEnum = exports.PaymentModeEnum = exports.PaymentChannelEnum = exports.OsEnum = exports.LeadOriginEnum = exports.IntervalTypeEnum = exports.EFiscalDocModelCode = exports.DocTypeEnum = exports.BooleanStringEnum = void 0;
|
3
|
+
exports.ESponsorshipValues = exports.PaymentProviderEnum = exports.PlatfomrEnum = exports.LegalEntiyEnum = exports.PaymentTypeEnum = exports.PaymentStatusEnum = exports.PaymentModeEnum = exports.PaymentChannelEnum = exports.OsEnum = exports.LeadOriginEnum = exports.IntervalTypeEnum = exports.EFiscalDocModelCode = exports.EDiscountType = exports.DocTypeEnum = exports.BooleanStringEnum = void 0;
|
4
4
|
var boolean_string_enum_1 = require("./boolean-string.enum");
|
5
5
|
Object.defineProperty(exports, "BooleanStringEnum", { enumerable: true, get: function () { return boolean_string_enum_1.BooleanStringEnum; } });
|
6
6
|
var doc_type_enum_1 = require("./doc-type.enum");
|
7
7
|
Object.defineProperty(exports, "DocTypeEnum", { enumerable: true, get: function () { return doc_type_enum_1.DocTypeEnum; } });
|
8
|
+
var e_discount_type_enum_1 = require("./e-discount-type.enum");
|
9
|
+
Object.defineProperty(exports, "EDiscountType", { enumerable: true, get: function () { return e_discount_type_enum_1.EDiscountType; } });
|
8
10
|
var fiscal_doc_model_code_enum_1 = require("./fiscal-doc-model-code.enum");
|
9
11
|
Object.defineProperty(exports, "EFiscalDocModelCode", { enumerable: true, get: function () { return fiscal_doc_model_code_enum_1.EFiscalDocModelCode; } });
|
10
12
|
var interval_type_enum_1 = require("./interval-type.enum");
|
@@ -27,3 +29,5 @@ var platform_enum_1 = require("./platform.enum");
|
|
27
29
|
Object.defineProperty(exports, "PlatfomrEnum", { enumerable: true, get: function () { return platform_enum_1.PlatfomrEnum; } });
|
28
30
|
var providers_enum_1 = require("./providers.enum");
|
29
31
|
Object.defineProperty(exports, "PaymentProviderEnum", { enumerable: true, get: function () { return providers_enum_1.PaymentProviderEnum; } });
|
32
|
+
var sponsorship_values_enum_1 = require("./sponsorship-values.enum");
|
33
|
+
Object.defineProperty(exports, "ESponsorshipValues", { enumerable: true, get: function () { return sponsorship_values_enum_1.ESponsorshipValues; } });
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ESponsorshipValues = void 0;
|
4
|
+
var ESponsorshipValues;
|
5
|
+
(function (ESponsorshipValues) {
|
6
|
+
ESponsorshipValues["MERCHANT"] = "MERCHANT";
|
7
|
+
ESponsorshipValues["PARTNER"] = "PARTNER";
|
8
|
+
ESponsorshipValues["PROVIDER"] = "PROVIDER";
|
9
|
+
ESponsorshipValues["UNKNOWN"] = "UNKNOWN";
|
10
|
+
})(ESponsorshipValues || (exports.ESponsorshipValues = ESponsorshipValues = {}));
|
@@ -14,3 +14,4 @@ export { IPaymentProviderAgent } from './i-payment-provider-agent';
|
|
14
14
|
export { IPaymentToken } from './i-payment-token';
|
15
15
|
export { IPaymentTokenData } from './i-payment-token-data';
|
16
16
|
export { IRating } from './i-rating';
|
17
|
+
export { ISponsorshipValue } from './i-sponsorship-value';
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from './app';
|
2
|
+
export * from './campaign';
|
2
3
|
export * from './company';
|
3
4
|
export * from './container';
|
4
5
|
export * from './device';
|
@@ -19,3 +20,4 @@ export * from './resume';
|
|
19
20
|
export * from './subscription';
|
20
21
|
export * from './token';
|
21
22
|
export * from './viacep';
|
23
|
+
export * from './voucher';
|
package/dist/index.js
CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./app"), exports);
|
18
|
+
__exportStar(require("./campaign"), exports);
|
18
19
|
__exportStar(require("./company"), exports);
|
19
20
|
__exportStar(require("./container"), exports);
|
20
21
|
__exportStar(require("./device"), exports);
|
@@ -35,3 +36,4 @@ __exportStar(require("./resume"), exports);
|
|
35
36
|
__exportStar(require("./subscription"), exports);
|
36
37
|
__exportStar(require("./token"), exports);
|
37
38
|
__exportStar(require("./viacep"), exports);
|
39
|
+
__exportStar(require("./voucher"), exports);
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { SponsorshipValueEntity } from '../../general/entities/sponsorship-value.entity';
|
2
2
|
export declare class OrderBenefitsEntity {
|
3
3
|
description: string;
|
4
4
|
id: string;
|
5
|
-
sponsorshipValues:
|
5
|
+
sponsorshipValues: SponsorshipValueEntity[];
|
6
6
|
target: string;
|
7
7
|
targetId: string;
|
8
8
|
value: number;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
export { OrderAdditionalFeeEntity } from './additional-fees.entity';
|
2
|
-
export { SponsorshipValuesEntity } from './benefits-sponsor-ship.entity';
|
3
2
|
export { OrderBenefitsEntity } from './benefits.entity';
|
4
3
|
export { OrderCancellationEntity } from './cancellation.entity';
|
5
4
|
export { OrdersCustomerPhoneEntity } from './customer-phone.entity';
|
@@ -1,10 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.OrderTotalEntity = exports.OrderScaleEntity = exports.OrderScaleItemEntity = exports.OrderPaymentEntity = exports.OrderPaymentWalletEntity = exports.OrderPaymentPixEntity = exports.OrderPaymentMethodEntity = exports.OrderPaymentCashEntity = exports.OrderPaymentCardEntity = exports.OrderEntity = exports.OrderItemEntity = exports.OrderItemOptionEntity = exports.OrderItemCompositionEntity = exports.OrderCustomerEntity = exports.OrdersCustomerPhoneEntity = exports.OrderCancellationEntity = exports.OrderBenefitsEntity = exports.
|
3
|
+
exports.OrderTotalEntity = exports.OrderScaleEntity = exports.OrderScaleItemEntity = exports.OrderPaymentEntity = exports.OrderPaymentWalletEntity = exports.OrderPaymentPixEntity = exports.OrderPaymentMethodEntity = exports.OrderPaymentCashEntity = exports.OrderPaymentCardEntity = exports.OrderEntity = exports.OrderItemEntity = exports.OrderItemOptionEntity = exports.OrderItemCompositionEntity = exports.OrderCustomerEntity = exports.OrdersCustomerPhoneEntity = exports.OrderCancellationEntity = exports.OrderBenefitsEntity = exports.OrderAdditionalFeeEntity = void 0;
|
4
4
|
var additional_fees_entity_1 = require("./additional-fees.entity");
|
5
5
|
Object.defineProperty(exports, "OrderAdditionalFeeEntity", { enumerable: true, get: function () { return additional_fees_entity_1.OrderAdditionalFeeEntity; } });
|
6
|
-
var benefits_sponsor_ship_entity_1 = require("./benefits-sponsor-ship.entity");
|
7
|
-
Object.defineProperty(exports, "SponsorshipValuesEntity", { enumerable: true, get: function () { return benefits_sponsor_ship_entity_1.SponsorshipValuesEntity; } });
|
8
6
|
var benefits_entity_1 = require("./benefits.entity");
|
9
7
|
Object.defineProperty(exports, "OrderBenefitsEntity", { enumerable: true, get: function () { return benefits_entity_1.OrderBenefitsEntity; } });
|
10
8
|
var cancellation_entity_1 = require("./cancellation.entity");
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { ISponsorshipValue } from '../../general/interfaces';
|
2
2
|
export interface IOrderBenefits {
|
3
3
|
description: string;
|
4
4
|
id: string;
|
5
|
-
sponsorshipValues:
|
5
|
+
sponsorshipValues: ISponsorshipValue[];
|
6
6
|
target: string;
|
7
7
|
targetId: string;
|
8
8
|
value: number;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
export { IOrderAdditionalFee } from './i-additional-fee';
|
2
2
|
export { IOrderBenefits } from './i-benefits';
|
3
|
-
export { ISponsorshipValues } from './i-benefits-sponsor-ship';
|
4
3
|
export { IOrderCancellation } from './i-cancellation';
|
5
4
|
export { IOrderCustomer } from './i-customer';
|
6
5
|
export { IOrdersCustomerPhone } from './i-customer-phone';
|
package/dist/package.json
CHANGED
@@ -7,6 +7,7 @@ import { SubscriptionItemEntity } from './subscription-item.entity';
|
|
7
7
|
import { SubscriptionLogEntity } from './subscription-log.entity';
|
8
8
|
export declare class SubscriptionEntity implements ISubscription {
|
9
9
|
cancellationReason: string;
|
10
|
+
appId: string;
|
10
11
|
company: SubscriptionCompanyEntity;
|
11
12
|
createdAt: Date;
|
12
13
|
customVariables: CustomVariableEntity[];
|
@@ -10,6 +10,7 @@ var SubscriptionEntity = /** @class */ (function () {
|
|
10
10
|
function SubscriptionEntity(data) {
|
11
11
|
// #region Properties (25)
|
12
12
|
this.cancellationReason = '';
|
13
|
+
this.appId = '';
|
13
14
|
this.company = new subscription_company_entity_1.SubscriptionCompanyEntity();
|
14
15
|
this.createdAt = new Date();
|
15
16
|
this.customVariables = [];
|
@@ -0,0 +1 @@
|
|
1
|
+
export { VoucherEntity } from './voucher.entity';
|
@@ -0,0 +1,5 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.VoucherEntity = void 0;
|
4
|
+
var voucher_entity_1 = require("./voucher.entity");
|
5
|
+
Object.defineProperty(exports, "VoucherEntity", { enumerable: true, get: function () { return voucher_entity_1.VoucherEntity; } });
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { EDiscountType, SponsorshipValueEntity } from '../../general';
|
2
|
+
import { EVoucherStatus } from '../enums';
|
3
|
+
import { IVoucher } from '../interfaces';
|
4
|
+
export declare class VoucherEntity implements IVoucher {
|
5
|
+
allowsKeyChange: boolean;
|
6
|
+
amount: number;
|
7
|
+
campaignId?: string | null;
|
8
|
+
companyId?: string | null;
|
9
|
+
containerId?: string | null;
|
10
|
+
createdAt: Date;
|
11
|
+
description?: string | null;
|
12
|
+
discountType: EDiscountType;
|
13
|
+
expirationDate: Date;
|
14
|
+
id: string;
|
15
|
+
isPublic: boolean;
|
16
|
+
key: string;
|
17
|
+
maxUses: number;
|
18
|
+
partnerId: string | null;
|
19
|
+
sponsorship: SponsorshipValueEntity[];
|
20
|
+
status: EVoucherStatus;
|
21
|
+
updatedAt: Date;
|
22
|
+
usedCount: number;
|
23
|
+
constructor(data?: Partial<VoucherEntity>);
|
24
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.VoucherEntity = void 0;
|
4
|
+
var general_1 = require("../../general");
|
5
|
+
var enums_1 = require("../enums");
|
6
|
+
var VoucherEntity = /** @class */ (function () {
|
7
|
+
// #endregion Properties (18)
|
8
|
+
// #region Constructors (1)
|
9
|
+
function VoucherEntity(data) {
|
10
|
+
// #region Properties (18)
|
11
|
+
// se permite ou não a alteração do nome do cupom pelo parceiro
|
12
|
+
this.allowsKeyChange = false;
|
13
|
+
// valor do desconto (soma do valor de todos os patrocínios - sponsorship)
|
14
|
+
this.amount = 0;
|
15
|
+
// ID da campanha associada (opcional para uso futuro)
|
16
|
+
this.campaignId = null;
|
17
|
+
// ID da empresa associada ao cupom (opcional)
|
18
|
+
this.companyId = null;
|
19
|
+
// ID do recipiente ou contexto onde o cupom é válido (opcional)
|
20
|
+
this.containerId = null;
|
21
|
+
// data de criação do cupom
|
22
|
+
this.createdAt = new Date();
|
23
|
+
// descrição opcional do cupom
|
24
|
+
this.description = null;
|
25
|
+
// tipo de desconto: porcentagem ou valor fixo
|
26
|
+
this.discountType = general_1.EDiscountType.FIXED_AMOUNT;
|
27
|
+
// data de validade do cupom
|
28
|
+
this.expirationDate = new Date(Date.now() + 1000 * 60 * 60 * 24 * 30);
|
29
|
+
this.id = '';
|
30
|
+
// se a chave do cupom é pública ou privada
|
31
|
+
this.isPublic = true;
|
32
|
+
// chave única para o cupom
|
33
|
+
this.key = '';
|
34
|
+
// máximo de utilizações permitidas (-1 para ilimitado)
|
35
|
+
this.maxUses = -1;
|
36
|
+
// ID do parceiro associado ao cupom (opcional)
|
37
|
+
this.partnerId = null;
|
38
|
+
// informação de patrocínio (opcional)
|
39
|
+
this.sponsorship = [];
|
40
|
+
// status do cupom
|
41
|
+
this.status = enums_1.EVoucherStatus.PLACED;
|
42
|
+
// data da última atualização do cupom
|
43
|
+
this.updatedAt = new Date();
|
44
|
+
// contador de quantas vezes o cupom foi usado
|
45
|
+
this.usedCount = 0;
|
46
|
+
if (data) {
|
47
|
+
for (var key in data) {
|
48
|
+
if (data.hasOwnProperty(key) && key in this) {
|
49
|
+
this[key] = data[key];
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
return VoucherEntity;
|
55
|
+
}());
|
56
|
+
exports.VoucherEntity = VoucherEntity;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EVoucherStatus = void 0;
|
4
|
+
var EVoucherStatus;
|
5
|
+
(function (EVoucherStatus) {
|
6
|
+
EVoucherStatus["ACTIVE"] = "ACTIVE";
|
7
|
+
EVoucherStatus["REDEEMED"] = "REDEEMED";
|
8
|
+
EVoucherStatus["EXPIRED"] = "EXPIRED";
|
9
|
+
EVoucherStatus["PLACED"] = "PLACED";
|
10
|
+
EVoucherStatus["PAUSED"] = "PAUSED";
|
11
|
+
})(EVoucherStatus || (exports.EVoucherStatus = EVoucherStatus = {}));
|
@@ -0,0 +1 @@
|
|
1
|
+
export { EVoucherStatus } from './e-voucher-status.enum';
|
@@ -0,0 +1,5 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EVoucherStatus = void 0;
|
4
|
+
var e_voucher_status_enum_1 = require("./e-voucher-status.enum");
|
5
|
+
Object.defineProperty(exports, "EVoucherStatus", { enumerable: true, get: function () { return e_voucher_status_enum_1.EVoucherStatus; } });
|
@@ -0,0 +1,19 @@
|
|
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("./enums"), exports);
|
19
|
+
__exportStar(require("./interfaces"), exports);
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { EDiscountType, ISponsorshipValue } from '../../general';
|
2
|
+
import { EVoucherStatus } from '../enums';
|
3
|
+
export interface IVoucher {
|
4
|
+
allowsKeyChange: boolean;
|
5
|
+
amount: number;
|
6
|
+
campaignId?: string | null;
|
7
|
+
companyId?: string | null;
|
8
|
+
containerId?: string | null;
|
9
|
+
createdAt: Date;
|
10
|
+
description?: string | null;
|
11
|
+
discountType: EDiscountType;
|
12
|
+
expirationDate: Date;
|
13
|
+
id: string;
|
14
|
+
isPublic: boolean;
|
15
|
+
key: string;
|
16
|
+
maxUses: number;
|
17
|
+
partnerId?: string | null;
|
18
|
+
sponsorship: ISponsorshipValue[];
|
19
|
+
status: EVoucherStatus;
|
20
|
+
updatedAt: Date;
|
21
|
+
usedCount: number;
|
22
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { IVoucher } from './i-voucher';
|
package/package.json
CHANGED
@@ -1,17 +0,0 @@
|
|
1
|
-
export class SponsorshipValuesEntity {
|
2
|
-
// #region Properties (2)
|
3
|
-
name = '';
|
4
|
-
value = 0;
|
5
|
-
// #endregion Properties (2)
|
6
|
-
// #region Constructors (1)
|
7
|
-
constructor(data) {
|
8
|
-
if (data) {
|
9
|
-
for (let key in data) {
|
10
|
-
if (data.hasOwnProperty(key) && key in this) {
|
11
|
-
this[key] = data[key];
|
12
|
-
}
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
16
|
-
}
|
17
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVuZWZpdHMtc3BvbnNvci1zaGlwLmVudGl0eS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9vcmRlci9lbnRpdGllcy9iZW5lZml0cy1zcG9uc29yLXNoaXAuZW50aXR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE1BQU0sT0FBTyx1QkFBdUI7SUFDaEMseUJBQXlCO0lBRWxCLElBQUksR0FBVyxFQUFFLENBQUM7SUFDbEIsS0FBSyxHQUFXLENBQUMsQ0FBQztJQUV6Qiw0QkFBNEI7SUFFNUIsMkJBQTJCO0lBRTNCLFlBQVksSUFBdUM7UUFDL0MsSUFBSSxJQUFJLEVBQUU7WUFDTixLQUFLLElBQUksR0FBRyxJQUFJLElBQUksRUFBRTtnQkFDbEIsSUFBSSxJQUFJLENBQUMsY0FBYyxDQUFDLEdBQUcsQ0FBQyxJQUFJLEdBQUcsSUFBSSxJQUFJLEVBQUU7b0JBQ3hDLElBQVksQ0FBQyxHQUFHLENBQUMsR0FBSSxJQUFZLENBQUMsR0FBRyxDQUFDLENBQUM7aUJBQzNDO2FBQ0o7U0FDSjtJQUNMLENBQUM7Q0FHSiIsInNvdXJjZXNDb250ZW50IjpbIlxuZXhwb3J0IGNsYXNzIFNwb25zb3JzaGlwVmFsdWVzRW50aXR5IHtcbiAgICAvLyAjcmVnaW9uIFByb3BlcnRpZXMgKDIpXG5cbiAgICBwdWJsaWMgbmFtZTogc3RyaW5nID0gJyc7XG4gICAgcHVibGljIHZhbHVlOiBudW1iZXIgPSAwO1xuXG4gICAgLy8gI2VuZHJlZ2lvbiBQcm9wZXJ0aWVzICgyKVxuXG4gICAgLy8gI3JlZ2lvbiBDb25zdHJ1Y3RvcnMgKDEpXG5cbiAgICBjb25zdHJ1Y3RvcihkYXRhPzogUGFydGlhbDxTcG9uc29yc2hpcFZhbHVlc0VudGl0eT4pIHtcbiAgICAgICAgaWYgKGRhdGEpIHtcbiAgICAgICAgICAgIGZvciAobGV0IGtleSBpbiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuaGFzT3duUHJvcGVydHkoa2V5KSAmJiBrZXkgaW4gdGhpcykge1xuICAgICAgICAgICAgICAgICAgICAodGhpcyBhcyBhbnkpW2tleV0gPSAoZGF0YSBhcyBhbnkpW2tleV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gI2VuZHJlZ2lvbiBDb25zdHJ1Y3RvcnMgKDEpXG59XG4iXX0=
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export {};
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaS1iZW5lZml0cy1zcG9uc29yLXNoaXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvb3JkZXIvaW50ZXJmYWNlcy9pLWJlbmVmaXRzLXNwb25zb3Itc2hpcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBJU3BvbnNvcnNoaXBWYWx1ZXMge1xyXG4gICAgLy8gI3JlZ2lvbiBQcm9wZXJ0aWVzICgyKVxyXG5cclxuICAgIG5hbWU6IHN0cmluZztcclxuICAgIHZhbHVlOiBudW1iZXI7XHJcblxyXG4gICAgLy8gI2VuZHJlZ2lvbiBQcm9wZXJ0aWVzICgyKVxyXG59Il19
|
/package/dist/{order/interfaces/i-benefits-sponsor-ship.js → campaign/interfaces/i-campaign.js}
RENAMED
File without changes
|