@lyxa.ai/core 1.3.217 → 1.3.218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libraries/mongo/models/service-promotion.model.d.ts +2 -0
- package/dist/libraries/mongo/models/service-promotion.model.js +6 -0
- package/dist/libraries/mongo/models/service-promotion.model.js.map +1 -1
- package/dist/libraries/trpc/middlewares/auth.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/createRoleProtectedProcedure.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -3,8 +3,10 @@ import { Vendor } from './vendor.model';
|
|
|
3
3
|
import { MarketingStatus, PromotionType, ValueType } from '../../../utilities/enum';
|
|
4
4
|
import { Duration, SlotRange } from './shared/promotion-duration.model';
|
|
5
5
|
import { ServicePackage } from './service-package.model';
|
|
6
|
+
import { Admin } from './admin.model';
|
|
6
7
|
export declare class ServicePromotion {
|
|
7
8
|
vendor: Ref<Vendor>;
|
|
9
|
+
admin?: Ref<Admin>;
|
|
8
10
|
promotionType: PromotionType;
|
|
9
11
|
duration: Duration;
|
|
10
12
|
isAppliedByCompany: boolean;
|
|
@@ -15,8 +15,10 @@ const vendor_model_1 = require("./vendor.model");
|
|
|
15
15
|
const enum_1 = require("../../../utilities/enum");
|
|
16
16
|
const promotion_duration_model_1 = require("./shared/promotion-duration.model");
|
|
17
17
|
const service_package_model_1 = require("./service-package.model");
|
|
18
|
+
const admin_model_1 = require("./admin.model");
|
|
18
19
|
let ServicePromotion = class ServicePromotion {
|
|
19
20
|
vendor;
|
|
21
|
+
admin;
|
|
20
22
|
promotionType;
|
|
21
23
|
duration;
|
|
22
24
|
isAppliedByCompany;
|
|
@@ -39,6 +41,10 @@ __decorate([
|
|
|
39
41
|
(0, typegoose_1.prop)({ ref: () => vendor_model_1.Vendor, required: true }),
|
|
40
42
|
__metadata("design:type", Object)
|
|
41
43
|
], ServicePromotion.prototype, "vendor", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], ServicePromotion.prototype, "admin", void 0);
|
|
42
48
|
__decorate([
|
|
43
49
|
(0, typegoose_1.prop)({ enum: enum_1.PromotionType, required: true }),
|
|
44
50
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-promotion.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-promotion.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,iDAAwC;AACxC,kDAAoF;AACpF,gFAAwE;AACxE,mEAAyD;
|
|
1
|
+
{"version":3,"file":"service-promotion.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-promotion.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,iDAAwC;AACxC,kDAAoF;AACpF,gFAAwE;AACxE,mEAAyD;AACzD,+CAAsC;AAG/B,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAElB,MAAM,CAAe;IAGrB,KAAK,CAAa;IAGlB,aAAa,CAAiB;IAG9B,QAAQ,CAAW;IAGnB,kBAAkB,CAAW;IAG7B,eAAe,CAAwB;IAGvC,YAAY,CAAW;IAGvB,SAAS,CAAc;IAGvB,4BAA4B,CAAW;IAGvC,mBAAmB,CAAU;IAG7B,mBAAmB,CAAW;IAG9B,UAAU,CAAU;IAGpB,WAAW,CAAU;IAGrB,SAAS,CAAa;IAGtB,KAAK,CAAU;IAGf,kBAAkB,CAAU;IAG5B,WAAW,CAAU;IAOrB,MAAM,CAAkB;CAClC,CAAA;AA1DY,4CAAgB;AAElB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,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ADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,CAAC;;mDACX;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACD;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DACY;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;qDACvB;AAOrB;IALN,IAAA,gBAAI,EAAC;QACF,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,sBAAe;QACrB,OAAO,EAAE,sBAAe,CAAC,MAAM;KAClC,CAAC;;gDAC6B;2BAzDtB,gBAAgB;IAD5B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,EAAE,CAAC;GACxD,gBAAgB,CA0D5B","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { Vendor } from './vendor.model';\nimport { MarketingStatus, PromotionType, ValueType } from '../../../utilities/enum';\nimport { Duration, SlotRange } from './shared/promotion-duration.model';\nimport { ServicePackage } from './service-package.model';\nimport { Admin } from './admin.model';\n\n@modelOptions({ schemaOptions: { collection: 'servicePromotions' } })\nexport class ServicePromotion {\n @prop({ ref: () => Vendor, required: true })\n public vendor!: Ref<Vendor>;\n\n @prop({ref: () => Admin})\n public admin?: Ref<Admin>\n\n @prop({ enum: PromotionType, required: true })\n public promotionType!: PromotionType;\n\n @prop({ required: true, type: Duration })\n public duration!: Duration\n\n @prop({ required: true, type: Boolean })\n public isAppliedByCompany!: boolean;\n\n @prop({ ref: () => ServicePackage, required: true })\n public servicePackages?: Ref<ServicePackage>[]\n\n @prop({ type: Boolean })\n public isEntireMenu?: boolean;\n\n @prop({ type: SlotRange })\n public slotRange?: SlotRange[]\n\n @prop({ type: Boolean, default: false })\n public isMaxDiscountPerOrderEnabled?: boolean;\n\n @prop({ type: Number })\n public maxDiscountPerOrder?: number;\n\n @prop({ type: Boolean, default: false })\n public isSpendLimitEnabled?: boolean;\n \n @prop({ type: Number, min: 0 })\n public spendLimit?: number;\n\n @prop({ type: Number, default: 0, min: 0 })\n public spendAmount?: number;\n\n @prop({ type: String, enum: ValueType })\n public valueType?: ValueType;\n\n @prop({ type: Number })\n public value?: number;\n\n @prop({ type: String })\n public deactivationReason?: string;\n\n @prop({ type: String, trim: true, maxlength: 500 })\n public description?: string;\n\n @prop({\n type: String,\n enum: MarketingStatus,\n default: MarketingStatus.ACTIVE,\n })\n public status: MarketingStatus;\n}\n"]}
|
|
@@ -5,10 +5,10 @@ interface AuthOptions {
|
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
8
|
+
req: import("http").IncomingMessage;
|
|
8
9
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
10
|
tokenType: TokenType | undefined;
|
|
10
11
|
entity: import("../context").EntityContext | undefined;
|
|
11
|
-
req: import("http").IncomingMessage;
|
|
12
12
|
requestId: string | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
|
14
14
|
tokenRenewed: boolean | undefined;
|
|
@@ -4,10 +4,10 @@ interface RoleProtectedOptions {
|
|
|
4
4
|
allowedRoles: string[];
|
|
5
5
|
}
|
|
6
6
|
export declare function createRoleProtectedProcedure(options: RoleProtectedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
7
|
+
req: import("http").IncomingMessage;
|
|
7
8
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
8
9
|
tokenType: import("../../auth").TokenType | undefined;
|
|
9
10
|
entity: import("../context").EntityContext | undefined;
|
|
10
|
-
req: import("http").IncomingMessage;
|
|
11
11
|
requestId: string | undefined;
|
|
12
12
|
usedRefreshToken: boolean | undefined;
|
|
13
13
|
tokenRenewed: boolean | undefined;
|
|
@@ -3,10 +3,10 @@ interface PhoneVerifiedOptions {
|
|
|
3
3
|
entityTypes: AuthEntityType[];
|
|
4
4
|
}
|
|
5
5
|
export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
6
|
+
req: import("http").IncomingMessage;
|
|
6
7
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
7
8
|
tokenType: import("../../auth").TokenType | undefined;
|
|
8
9
|
entity: import("../context").EntityContext | undefined;
|
|
9
|
-
req: import("http").IncomingMessage;
|
|
10
10
|
requestId: string | undefined;
|
|
11
11
|
usedRefreshToken: boolean | undefined;
|
|
12
12
|
tokenRenewed: boolean | undefined;
|
|
@@ -5,10 +5,10 @@ interface AuthOptions {
|
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
8
|
+
req: import("http").IncomingMessage;
|
|
8
9
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
10
|
tokenType: TokenType | undefined;
|
|
10
11
|
entity: import("../context").EntityContext | undefined;
|
|
11
|
-
req: import("http").IncomingMessage;
|
|
12
12
|
requestId: string | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
|
14
14
|
tokenRenewed: boolean | undefined;
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED