@lyxa.ai/core 1.4.140 → 1.4.141
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.
|
@@ -24,6 +24,12 @@ export declare class TournamentMatch {
|
|
|
24
24
|
winnerId: Types.ObjectId | null;
|
|
25
25
|
startingDate: Date;
|
|
26
26
|
endDate?: Date;
|
|
27
|
+
notificationFlags: Map<string, boolean>;
|
|
28
|
+
}
|
|
29
|
+
export declare class ScheduledNotificationConfig {
|
|
30
|
+
type: string;
|
|
31
|
+
durationMins: number;
|
|
32
|
+
target: string;
|
|
27
33
|
}
|
|
28
34
|
export declare class TournamentReward {
|
|
29
35
|
type: TournamentRewardType;
|
|
@@ -33,8 +39,7 @@ export declare class TournamentCouponReward extends TournamentReward {
|
|
|
33
39
|
percentage: number;
|
|
34
40
|
maxDiscountPerOrder: number | null;
|
|
35
41
|
}
|
|
36
|
-
export declare class
|
|
37
|
-
tag: string;
|
|
42
|
+
export declare class NotificationMessage {
|
|
38
43
|
title: string;
|
|
39
44
|
body: string;
|
|
40
45
|
}
|
|
@@ -47,5 +52,6 @@ export declare class Tournament extends TimeStamps {
|
|
|
47
52
|
teams: TournamentTeam[];
|
|
48
53
|
matches: TournamentMatch[];
|
|
49
54
|
reward?: TournamentReward;
|
|
50
|
-
notificationTemplates:
|
|
55
|
+
notificationTemplates: Map<string, NotificationMessage>;
|
|
56
|
+
scheduledNotifications: ScheduledNotificationConfig[];
|
|
51
57
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Tournament = exports.
|
|
12
|
+
exports.Tournament = exports.NotificationMessage = exports.TournamentCouponReward = exports.TournamentReward = exports.ScheduledNotificationConfig = exports.TournamentMatch = exports.TournamentMatchTeam = exports.TournamentTeam = exports.MatchScore = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
15
|
const mongoose_1 = require("mongoose");
|
|
@@ -68,6 +68,7 @@ class TournamentMatch {
|
|
|
68
68
|
winnerId;
|
|
69
69
|
startingDate;
|
|
70
70
|
endDate;
|
|
71
|
+
notificationFlags;
|
|
71
72
|
}
|
|
72
73
|
exports.TournamentMatch = TournamentMatch;
|
|
73
74
|
__decorate([
|
|
@@ -106,6 +107,28 @@ __decorate([
|
|
|
106
107
|
(0, typegoose_1.prop)({ type: Date }),
|
|
107
108
|
__metadata("design:type", Date)
|
|
108
109
|
], TournamentMatch.prototype, "endDate", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typegoose_1.prop)({ type: () => Boolean }),
|
|
112
|
+
__metadata("design:type", Map)
|
|
113
|
+
], TournamentMatch.prototype, "notificationFlags", void 0);
|
|
114
|
+
class ScheduledNotificationConfig {
|
|
115
|
+
type;
|
|
116
|
+
durationMins;
|
|
117
|
+
target;
|
|
118
|
+
}
|
|
119
|
+
exports.ScheduledNotificationConfig = ScheduledNotificationConfig;
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], ScheduledNotificationConfig.prototype, "type", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
126
|
+
__metadata("design:type", Number)
|
|
127
|
+
], ScheduledNotificationConfig.prototype, "durationMins", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], ScheduledNotificationConfig.prototype, "target", void 0);
|
|
109
132
|
let TournamentReward = class TournamentReward {
|
|
110
133
|
type;
|
|
111
134
|
};
|
|
@@ -135,24 +158,19 @@ __decorate([
|
|
|
135
158
|
(0, typegoose_1.prop)({ type: Number, default: null }),
|
|
136
159
|
__metadata("design:type", Object)
|
|
137
160
|
], TournamentCouponReward.prototype, "maxDiscountPerOrder", void 0);
|
|
138
|
-
class
|
|
139
|
-
tag;
|
|
161
|
+
class NotificationMessage {
|
|
140
162
|
title;
|
|
141
163
|
body;
|
|
142
164
|
}
|
|
143
|
-
exports.
|
|
165
|
+
exports.NotificationMessage = NotificationMessage;
|
|
144
166
|
__decorate([
|
|
145
167
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
146
168
|
__metadata("design:type", String)
|
|
147
|
-
],
|
|
169
|
+
], NotificationMessage.prototype, "title", void 0);
|
|
148
170
|
__decorate([
|
|
149
171
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
150
172
|
__metadata("design:type", String)
|
|
151
|
-
],
|
|
152
|
-
__decorate([
|
|
153
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
154
|
-
__metadata("design:type", String)
|
|
155
|
-
], TournamentNotificationTemplate.prototype, "body", void 0);
|
|
173
|
+
], NotificationMessage.prototype, "body", void 0);
|
|
156
174
|
let Tournament = class Tournament extends defaultClasses_1.TimeStamps {
|
|
157
175
|
name;
|
|
158
176
|
tag;
|
|
@@ -163,6 +181,7 @@ let Tournament = class Tournament extends defaultClasses_1.TimeStamps {
|
|
|
163
181
|
matches;
|
|
164
182
|
reward;
|
|
165
183
|
notificationTemplates;
|
|
184
|
+
scheduledNotifications;
|
|
166
185
|
};
|
|
167
186
|
exports.Tournament = Tournament;
|
|
168
187
|
__decorate([
|
|
@@ -201,9 +220,13 @@ __decorate([
|
|
|
201
220
|
__metadata("design:type", TournamentReward)
|
|
202
221
|
], Tournament.prototype, "reward", void 0);
|
|
203
222
|
__decorate([
|
|
204
|
-
(0, typegoose_1.prop)({ type: () =>
|
|
205
|
-
__metadata("design:type",
|
|
223
|
+
(0, typegoose_1.prop)({ type: () => NotificationMessage }),
|
|
224
|
+
__metadata("design:type", Map)
|
|
206
225
|
], Tournament.prototype, "notificationTemplates", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
(0, typegoose_1.prop)({ type: () => [ScheduledNotificationConfig], default: [], _id: false }),
|
|
228
|
+
__metadata("design:type", Array)
|
|
229
|
+
], Tournament.prototype, "scheduledNotifications", void 0);
|
|
207
230
|
exports.Tournament = Tournament = __decorate([
|
|
208
231
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'tournaments', timestamps: true } })
|
|
209
232
|
], Tournament);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tournament.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,uCAAiC;AACjC,kDAAuE;AAEvE,MAAa,UAAU;IAEf,KAAK,CAAiB;IAGtB,KAAK,CAAiB;CAC7B;AAND,gCAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yCACT;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yCACT;AAG9B,MAAa,cAAc;IAEnB,GAAG,CAAkB;IAGrB,IAAI,CAAU;IAGd,OAAO,CAAU;CACxB;AATD,wCASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,gBAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,gBAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;8BACvD,gBAAK,CAAC,QAAQ;2CAAC;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;4CAC9B;AAGd;IADN,IAAA,gBAAI,EAAC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AAE,sBAAsB,EAAE,KAAK,EAAE,2BAAoB,CAAC,MAAM,EAAE,CAAC;KAC5F,CAAC;8BACc,gBAAgB;0CAAC;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,mBAAmB,EAAE,CAAC;8BACX,GAAG;yDAA8B;AAGzD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,2BAA2B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;;0DACf;qBAhClD,UAAU;IADtB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GACpE,UAAU,CAiCtB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Types } from 'mongoose';\nimport { Status, TournamentRewardType } from '../../../utilities/enum';\n\nexport class MatchScore {\n\t@prop({ type: Number, default: null })\n\tpublic team1!: number | null;\n\n\t@prop({ type: Number, default: null })\n\tpublic team2!: number | null;\n}\n\nexport class TournamentTeam {\n\t@prop({ type: Types.ObjectId, default: () => new Types.ObjectId() })\n\tpublic _id!: Types.ObjectId;\n\n\t@prop({ required: true, type: String, trim: true })\n\tpublic name!: string;\n\n\t@prop({ type: String })\n\tpublic picture?: string;\n}\n\nexport class TournamentMatchTeam {\n\t@prop({ required: true, type: Types.ObjectId })\n\tpublic teamId!: Types.ObjectId;\n\n\t@prop({ required: true, type: String, trim: true })\n\tpublic name!: string;\n}\n\nexport class TournamentMatch {\n\t@prop({ type: Types.ObjectId, default: () => new Types.ObjectId() })\n\tpublic _id!: Types.ObjectId;\n\n\t@prop({ type: String, trim: true })\n\tpublic additionalTag?: string;\n\n\t@prop({ required: true, type: String, trim: true })\n\tpublic stage!: string;\n\n\t@prop({ required: true, type: () => TournamentMatchTeam, _id: false })\n\tpublic team1!: TournamentMatchTeam;\n\n\t@prop({ required: true, type: () => TournamentMatchTeam, _id: false })\n\tpublic team2!: TournamentMatchTeam;\n\n\t@prop({ type: () => MatchScore, _id: false, default: () => ({}) })\n\tpublic score!: MatchScore;\n\n\t@prop({ type: Types.ObjectId, default: null })\n\tpublic winnerId!: Types.ObjectId | null;\n\n\t@prop({ required: true, type: Date })\n\tpublic startingDate!: Date;\n\n\t@prop({ type: Date })\n\tpublic endDate?: Date;\n\n\t@prop({ type: () => Boolean })\n\tpublic notificationFlags!: Map<string, boolean>;\n}\n\nexport class ScheduledNotificationConfig {\n\t@prop({ required: true, type: String })\n\tpublic type!: string;\n\n\t@prop({ required: true, type: Number })\n\tpublic durationMins!: number;\n\n\t@prop({ required: true, type: String })\n\tpublic target!: string;\n}\n\n@modelOptions({ schemaOptions: { discriminatorKey: 'type', _id: false } })\nexport class TournamentReward {\n\t@prop({ required: true, type: String, enum: TournamentRewardType })\n\tpublic type!: TournamentRewardType;\n}\n\nexport class TournamentCouponReward extends TournamentReward {\n\t@prop({ required: true, type: String, trim: true })\n\tpublic couponNamePrefix!: string;\n\n\t@prop({ required: true, type: Number })\n\tpublic percentage!: number;\n\n\t@prop({ type: Number, default: null })\n\tpublic maxDiscountPerOrder!: number | null;\n}\n\nexport class NotificationMessage {\n\t@prop({ required: true, type: String })\n\tpublic title!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic body!: string;\n}\n\n@modelOptions({ schemaOptions: { collection: 'tournaments', timestamps: true } })\nexport class Tournament extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String, trim: true })\n\tpublic tag!: string;\n\n\t@prop({ required: true, type: Date })\n\tpublic startDate!: Date;\n\n\t@prop({ required: true, type: Date })\n\tpublic endDate!: Date;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status!: Status;\n\n\t@prop({ type: () => [TournamentTeam], default: [] })\n\tpublic teams!: TournamentTeam[];\n\n\t@prop({ type: () => [TournamentMatch], default: [] })\n\tpublic matches!: TournamentMatch[];\n\n\t@prop({\n\t\ttype: () => TournamentReward,\n\t\tdiscriminators: () => [{ type: TournamentCouponReward, value: TournamentRewardType.COUPON }],\n\t})\n\tpublic reward?: TournamentReward;\n\n\t@prop({ type: () => NotificationMessage })\n\tpublic notificationTemplates!: Map<string, NotificationMessage>;\n\n\t@prop({ type: () => [ScheduledNotificationConfig], default: [], _id: false })\n\tpublic scheduledNotifications!: ScheduledNotificationConfig[];\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED