@lyxa.ai/core 1.4.152-alpha.0 → 1.4.152
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/tournament-participant.model.d.ts +1 -2
- package/dist/libraries/mongo/models/tournament-participant.model.js +1 -2
- package/dist/libraries/mongo/models/tournament-participant.model.js.map +1 -1
- package/dist/libraries/mongo/models/tournament.model.d.ts +7 -8
- package/dist/libraries/mongo/models/tournament.model.js +6 -11
- package/dist/libraries/mongo/models/tournament.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/dist/types/utilities/enum.d.ts +3 -24
- package/dist/types/utilities/enum.js +5 -29
- package/dist/types/utilities/enum.js.map +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +12 -12
- package/dist/utilities/enum.d.ts +3 -24
- package/dist/utilities/enum.js +5 -29
- package/dist/utilities/enum.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ import { Types } from 'mongoose';
|
|
|
4
4
|
import { User } from './user.model';
|
|
5
5
|
import { MatchScore, Tournament } from './tournament.model';
|
|
6
6
|
import { Coupon } from './coupon.model';
|
|
7
|
-
import { TournamentParticipantStatus } from '../../../utilities/enum';
|
|
8
7
|
export declare class TournamentPredictionEntry {
|
|
9
8
|
_id: Types.ObjectId;
|
|
10
9
|
matchId: Types.ObjectId;
|
|
@@ -17,6 +16,6 @@ export declare class TournamentParticipant extends TimeStamps {
|
|
|
17
16
|
userId: Ref<User>;
|
|
18
17
|
tournamentId: Ref<Tournament>;
|
|
19
18
|
teamId?: Types.ObjectId;
|
|
20
|
-
status?:
|
|
19
|
+
status?: string;
|
|
21
20
|
predictions: TournamentPredictionEntry[];
|
|
22
21
|
}
|
|
@@ -16,7 +16,6 @@ const mongoose_1 = require("mongoose");
|
|
|
16
16
|
const user_model_1 = require("./user.model");
|
|
17
17
|
const tournament_model_1 = require("./tournament.model");
|
|
18
18
|
const coupon_model_1 = require("./coupon.model");
|
|
19
|
-
const enum_1 = require("../../../utilities/enum");
|
|
20
19
|
class TournamentPredictionEntry {
|
|
21
20
|
_id;
|
|
22
21
|
matchId;
|
|
@@ -71,7 +70,7 @@ __decorate([
|
|
|
71
70
|
__metadata("design:type", mongoose_1.Types.ObjectId)
|
|
72
71
|
], TournamentParticipant.prototype, "teamId", void 0);
|
|
73
72
|
__decorate([
|
|
74
|
-
(0, typegoose_1.prop)({ type: String
|
|
73
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
75
74
|
__metadata("design:type", String)
|
|
76
75
|
], TournamentParticipant.prototype, "status", void 0);
|
|
77
76
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-participant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tournament-participant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,uCAAiC;AACjC,6CAAoC;AACpC,yDAA4D;AAC5D,iDAAwC;
|
|
1
|
+
{"version":3,"file":"tournament-participant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tournament-participant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,uCAAiC;AACjC,6CAAoC;AACpC,yDAA4D;AAC5D,iDAAwC;AAExC,MAAa,yBAAyB;IAE9B,GAAG,CAAkB;IAGrB,OAAO,CAAkB;IAGzB,KAAK,CAAc;IAGnB,cAAc,CAAQ;IAGtB,SAAS,CAAkB;IAG3B,MAAM,CAAe;CAC5B;AAlBD,8DAkBC;AAhBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,gBAAK,CAA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AC;8BACf,gBAAK,CAAC,QAAQ;qDAAC;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACA;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,yBAAyB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;0DACd;gCAdrC,qBAAqB;IADjC,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,wBAAwB,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GAC/E,qBAAqB,CAejC","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Types } from 'mongoose';\nimport { User } from './user.model';\nimport { MatchScore, Tournament } from './tournament.model';\nimport { Coupon } from './coupon.model';\n\nexport class TournamentPredictionEntry {\n\t@prop({ type: Types.ObjectId, default: () => new Types.ObjectId() })\n\tpublic _id!: Types.ObjectId;\n\n\t@prop({ required: true, type: Types.ObjectId })\n\tpublic matchId!: Types.ObjectId;\n\n\t@prop({ required: true, type: () => MatchScore, _id: false })\n\tpublic score!: MatchScore;\n\n\t@prop({ required: true, type: Date })\n\tpublic predictionTime!: Date;\n\n\t@prop({ type: Boolean, default: null })\n\tpublic succeeded!: boolean | null;\n\n\t@prop({ ref: () => Coupon })\n\tpublic coupon?: Ref<Coupon>;\n}\n\n@modelOptions({ schemaOptions: { collection: 'tournamentParticipants', timestamps: true } })\nexport class TournamentParticipant extends TimeStamps {\n\t@prop({ required: true, ref: () => User })\n\tpublic userId!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Tournament })\n\tpublic tournamentId!: Ref<Tournament>;\n\n\t@prop({ type: Types.ObjectId })\n\tpublic teamId?: Types.ObjectId;\n\n\t@prop({ type: String })\n\tpublic status?: string;\n\n\t@prop({ type: () => [TournamentPredictionEntry], default: [] })\n\tpublic predictions!: TournamentPredictionEntry[];\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
2
2
|
import { Types } from 'mongoose';
|
|
3
|
-
import { Status,
|
|
3
|
+
import { Status, TournamentProvider, TournamentRewardType } from '../../../utilities/enum';
|
|
4
4
|
export declare class MatchScore {
|
|
5
5
|
team1: number | null;
|
|
6
6
|
team2: number | null;
|
|
@@ -27,13 +27,13 @@ export declare class TournamentMatch {
|
|
|
27
27
|
startingDate: Date;
|
|
28
28
|
endDate?: Date;
|
|
29
29
|
matchEnded: boolean;
|
|
30
|
-
matchStatus?:
|
|
31
|
-
notificationFlags: Map<
|
|
30
|
+
matchStatus?: string;
|
|
31
|
+
notificationFlags: Map<string, boolean>;
|
|
32
32
|
}
|
|
33
33
|
export declare class ScheduledNotificationConfig {
|
|
34
|
-
type:
|
|
34
|
+
type: string;
|
|
35
35
|
durationMins: number;
|
|
36
|
-
target:
|
|
36
|
+
target: string;
|
|
37
37
|
}
|
|
38
38
|
export declare class TournamentReward {
|
|
39
39
|
type: TournamentRewardType;
|
|
@@ -53,12 +53,11 @@ export declare class Tournament extends TimeStamps {
|
|
|
53
53
|
startDate: Date;
|
|
54
54
|
endDate: Date;
|
|
55
55
|
status: Status;
|
|
56
|
-
|
|
56
|
+
externalProvider?: TournamentProvider;
|
|
57
57
|
externalApiKey?: string;
|
|
58
58
|
teams: TournamentTeam[];
|
|
59
59
|
matches: TournamentMatch[];
|
|
60
60
|
reward?: TournamentReward;
|
|
61
|
-
notificationTemplates: Map<
|
|
61
|
+
notificationTemplates: Map<string, NotificationMessage>;
|
|
62
62
|
scheduledNotifications: ScheduledNotificationConfig[];
|
|
63
|
-
notificationFlags: Map<TournamentNotificationTag, boolean>;
|
|
64
63
|
}
|
|
@@ -124,7 +124,7 @@ __decorate([
|
|
|
124
124
|
__metadata("design:type", Boolean)
|
|
125
125
|
], TournamentMatch.prototype, "matchEnded", void 0);
|
|
126
126
|
__decorate([
|
|
127
|
-
(0, typegoose_1.prop)({ type: String
|
|
127
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
128
128
|
__metadata("design:type", String)
|
|
129
129
|
], TournamentMatch.prototype, "matchStatus", void 0);
|
|
130
130
|
__decorate([
|
|
@@ -138,7 +138,7 @@ class ScheduledNotificationConfig {
|
|
|
138
138
|
}
|
|
139
139
|
exports.ScheduledNotificationConfig = ScheduledNotificationConfig;
|
|
140
140
|
__decorate([
|
|
141
|
-
(0, typegoose_1.prop)({ required: true, type: String
|
|
141
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
142
142
|
__metadata("design:type", String)
|
|
143
143
|
], ScheduledNotificationConfig.prototype, "type", void 0);
|
|
144
144
|
__decorate([
|
|
@@ -146,7 +146,7 @@ __decorate([
|
|
|
146
146
|
__metadata("design:type", Number)
|
|
147
147
|
], ScheduledNotificationConfig.prototype, "durationMins", void 0);
|
|
148
148
|
__decorate([
|
|
149
|
-
(0, typegoose_1.prop)({ required: true, type: String
|
|
149
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
150
150
|
__metadata("design:type", String)
|
|
151
151
|
], ScheduledNotificationConfig.prototype, "target", void 0);
|
|
152
152
|
let TournamentReward = class TournamentReward {
|
|
@@ -197,14 +197,13 @@ let Tournament = class Tournament extends defaultClasses_1.TimeStamps {
|
|
|
197
197
|
startDate;
|
|
198
198
|
endDate;
|
|
199
199
|
status;
|
|
200
|
-
|
|
200
|
+
externalProvider;
|
|
201
201
|
externalApiKey;
|
|
202
202
|
teams;
|
|
203
203
|
matches;
|
|
204
204
|
reward;
|
|
205
205
|
notificationTemplates;
|
|
206
206
|
scheduledNotifications;
|
|
207
|
-
notificationFlags;
|
|
208
207
|
};
|
|
209
208
|
exports.Tournament = Tournament;
|
|
210
209
|
__decorate([
|
|
@@ -228,9 +227,9 @@ __decorate([
|
|
|
228
227
|
__metadata("design:type", String)
|
|
229
228
|
], Tournament.prototype, "status", void 0);
|
|
230
229
|
__decorate([
|
|
231
|
-
(0, typegoose_1.prop)({ required: false, type: String }),
|
|
230
|
+
(0, typegoose_1.prop)({ required: false, type: String, enum: enum_1.TournamentProvider }),
|
|
232
231
|
__metadata("design:type", String)
|
|
233
|
-
], Tournament.prototype, "
|
|
232
|
+
], Tournament.prototype, "externalProvider", void 0);
|
|
234
233
|
__decorate([
|
|
235
234
|
(0, typegoose_1.prop)({ required: false, type: String }),
|
|
236
235
|
__metadata("design:type", String)
|
|
@@ -258,10 +257,6 @@ __decorate([
|
|
|
258
257
|
(0, typegoose_1.prop)({ type: () => [ScheduledNotificationConfig], default: [], _id: false }),
|
|
259
258
|
__metadata("design:type", Array)
|
|
260
259
|
], Tournament.prototype, "scheduledNotifications", void 0);
|
|
261
|
-
__decorate([
|
|
262
|
-
(0, typegoose_1.prop)({ type: () => Boolean }),
|
|
263
|
-
__metadata("design:type", Map)
|
|
264
|
-
], Tournament.prototype, "notificationFlags", void 0);
|
|
265
260
|
exports.Tournament = Tournament = __decorate([
|
|
266
261
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'tournaments', timestamps: true } })
|
|
267
262
|
], 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,kDAAgK;AAEhK,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,UAAU,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BAA2B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;;0DACf;AAGvD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;8BACH,GAAG;qDAAqC;qBAzCvD,UAAU;IADtB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GACpE,UAAU,CA0CtB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Types } from 'mongoose';\nimport { Status, TournamentMatchStatus, TournamentNotificationTag, TournamentRewardType, TournamentScheduledNotificationTarget } 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({ type: String, default: null })\n\tpublic externalId?: string;\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, default: null })\n\tpublic externalId?: string;\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, default: false })\n\tpublic matchEnded!: boolean;\n\n\t@prop({ type: String, enum: TournamentMatchStatus })\n\tpublic matchStatus?: TournamentMatchStatus;\n\n\t@prop({ type: () => Boolean })\n\tpublic notificationFlags!: Map<TournamentNotificationTag, boolean>;\n}\n\nexport class ScheduledNotificationConfig {\n\t@prop({ required: true, type: String, enum: TournamentNotificationTag })\n\tpublic type!: TournamentNotificationTag;\n\n\t@prop({ required: true, type: Number })\n\tpublic durationMins!: number;\n\n\t@prop({ required: true, type: String, enum: TournamentScheduledNotificationTarget })\n\tpublic target!: TournamentScheduledNotificationTarget;\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({ required: false, type: String })\n\tpublic externalApi?: string;\n\n\t@prop({ required: false, type: String })\n\tpublic externalApiKey?: string;\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<TournamentNotificationTag, NotificationMessage>;\n\n\t@prop({ type: () => [ScheduledNotificationConfig], default: [], _id: false })\n\tpublic scheduledNotifications!: ScheduledNotificationConfig[];\n\n\t@prop({ type: () => Boolean })\n\tpublic notificationFlags!: Map<TournamentNotificationTag, boolean>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tournament.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tournament.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,uCAAiC;AACjC,kDAA2F;AAE3F,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,UAAU,CAAU;IAGpB,IAAI,CAAU;IAGd,OAAO,CAAU;CACxB;AAZD,wCAYC;AAVO;IADN,IAAA,gBAAI,EAAC,E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U,EAAE,IAAI,EAAE,EAAE,CAAC;GACpE,UAAU,CAuCtB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Types } from 'mongoose';\nimport { Status, TournamentProvider, 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({ type: String, default: null })\n\tpublic externalId?: string;\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, default: null })\n\tpublic externalId?: string;\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, default: false })\n\tpublic matchEnded!: boolean;\n\n\t@prop({ type: String })\n\tpublic matchStatus?: string;\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({ required: false, type: String, enum: TournamentProvider })\n\tpublic externalProvider?: TournamentProvider;\n\n\t@prop({ required: false, type: String })\n\tpublic externalApiKey?: string;\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"]}
|
|
@@ -5,9 +5,9 @@ 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;
|
|
9
8
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
9
|
tokenType: TokenType | undefined;
|
|
10
|
+
req: import("http").IncomingMessage;
|
|
11
11
|
requestId: string | undefined;
|
|
12
12
|
entity: import("../context").EntityContext | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
|
@@ -4,9 +4,9 @@ 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;
|
|
8
7
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
8
|
tokenType: import("../../auth").TokenType | undefined;
|
|
9
|
+
req: import("http").IncomingMessage;
|
|
10
10
|
requestId: string | undefined;
|
|
11
11
|
entity: import("../context").EntityContext | undefined;
|
|
12
12
|
usedRefreshToken: boolean | undefined;
|
|
@@ -3,9 +3,9 @@ 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;
|
|
7
6
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
8
7
|
tokenType: import("../../auth").TokenType | undefined;
|
|
8
|
+
req: import("http").IncomingMessage;
|
|
9
9
|
requestId: string | undefined;
|
|
10
10
|
entity: import("../context").EntityContext | undefined;
|
|
11
11
|
usedRefreshToken: boolean | undefined;
|
|
@@ -5,9 +5,9 @@ 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;
|
|
9
8
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
9
|
tokenType: TokenType | undefined;
|
|
10
|
+
req: import("http").IncomingMessage;
|
|
11
11
|
requestId: string | undefined;
|
|
12
12
|
entity: import("../context").EntityContext | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/types",
|
|
3
|
-
"version": "1.4.152
|
|
3
|
+
"version": "1.4.152",
|
|
4
4
|
"description": "Lyxa type definitions and validation schemas for both frontend and backend",
|
|
5
5
|
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -356,8 +356,7 @@ export declare enum ClickType {
|
|
|
356
356
|
CLICKABLE_WALLET = "clickable_wallet",
|
|
357
357
|
CLICKABLE_SETTING = "clickable_setting",
|
|
358
358
|
CLICKABLE_FALLBACK = "clickable_fallback",
|
|
359
|
-
CLICKABLE_BOOKING = "clickable_booking"
|
|
360
|
-
CLICKABLE_TOURNAMENT = "clickable_tournament"
|
|
359
|
+
CLICKABLE_BOOKING = "clickable_booking"
|
|
361
360
|
}
|
|
362
361
|
export declare enum ChargeType {
|
|
363
362
|
CUSTOM = "custom"
|
|
@@ -1250,26 +1249,6 @@ export declare enum TournamentRewardType {
|
|
|
1250
1249
|
COUPON = "coupon",
|
|
1251
1250
|
FREE_DELIVERY = "free_delivery"
|
|
1252
1251
|
}
|
|
1253
|
-
export declare enum
|
|
1254
|
-
|
|
1255
|
-
MATCH_RESULT_WINNER = "match-result-winner",
|
|
1256
|
-
MATCH_RESULT_LOSER = "match-result-loser",
|
|
1257
|
-
TEAM_SELECTION_REMINDER_1_DAY = "team-selection-reminder-1-day",
|
|
1258
|
-
PREDICTION_REMINDER_3_HOURS = "prediction-reminder-3-hours",
|
|
1259
|
-
PREDICTION_REMINDER_15_MINUTES = "prediction-reminder-15-minutes"
|
|
1260
|
-
}
|
|
1261
|
-
export declare enum TournamentScheduledNotificationTarget {
|
|
1262
|
-
GLOBAL = "global",
|
|
1263
|
-
UNPREDICTED_PARTICIPANTS = "unpredicted-participants",
|
|
1264
|
-
NO_TEAM_SELECTED_PARTICIPANTS = "no-team-selected-participants"
|
|
1265
|
-
}
|
|
1266
|
-
export declare enum TournamentMatchStatus {
|
|
1267
|
-
UPCOMING = "upcoming",
|
|
1268
|
-
STARTED = "started",
|
|
1269
|
-
ENDED = "ended"
|
|
1270
|
-
}
|
|
1271
|
-
export declare enum TournamentParticipantStatus {
|
|
1272
|
-
JOINED = "joined",
|
|
1273
|
-
SEEN = "seen",
|
|
1274
|
-
NOT_SEEN = "not_seen"
|
|
1252
|
+
export declare enum TournamentProvider {
|
|
1253
|
+
API_FOOTBALL = "api-football"
|
|
1275
1254
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BobType = exports.BobChannelType = exports.BobModel = exports.BobSettlementStatus = exports.BobSettlementType = exports.BobAccountType = exports.ZoneStatus = exports.FaqAccountType = exports.CounterType = exports.BannerUserType = exports.BannerLinkType = exports.BannerClickType = exports.VendorRole = exports.ShopRole = exports.OnlineStatus = exports.ShopOnlineStatus = exports.ChargeType = exports.ClickType = exports.NotificationAccountType = exports.DishCategory = exports.ProductDietaryType = exports.ShopDietaryType = exports.PriceOption = exports.ProductType = exports.CoreAuthIdentityType = exports.UserAppSectionItemType = exports.UserAppSectionType = exports.AdminLogsUpdatedFieldsType = exports.UpdatedField = exports.GeoLocationType = exports.RatingAccountType = exports.SubscriptionStatus = exports.SubscriptionPackage = exports.PaidCurrency = exports.PaymentStatus = exports.ChangeReturnMethod = exports.PaymentMethod = exports.ValueType = exports.HolidayWorkStatus = exports.WorkStatus = exports.WeekDay = exports.GlobalItemType = exports.AdjustmentStatus = exports.ServiceItemType = exports.ItemType = exports.Status = exports.AppPlatform = exports.AccountType = exports.AgentLiveStatus = exports.AuthEntityType = void 0;
|
|
4
4
|
exports.PayoutStatus = exports.PayoutType = exports.AddRemoveCreditAccountType = exports.SettingsReasonStatus = exports.CancellationReasonTypeEnum = exports.SupportReasonTypeEnum = exports.PlusSettingsPackageType = exports.AddRemoveCreditSettlementType = exports.SettlementType = exports.MediaType = exports.WorkingHourSettingsType = exports.ZoneGeometryType = exports.RiderAssignmentStatus = exports.CourierServiceType = exports.TripLegStatus = exports.DeliveryStatus = exports.CourierOrderPaymentFrom = exports.UserActionReason = exports.UserActionType = exports.ShopCourierOrderStatus = exports.ServiceBookingStatus = exports.CourierOrderStatus = exports.RegularOrderStatus = exports.AdjustmentType = exports.ServiceBookingStatusTimelineType = exports.StatusTimelineType = exports.OrderType = exports.Language = exports.OrderSize = exports.RiderBagSize = exports.RiderType = exports.ShiftType = exports.CreatedBy = exports.LiveStatus = exports.PaymentIntentStatus = exports.CardStatus = exports.CardUserType = exports.PaymentProvider = exports.CardType = exports.PaymentPreference = exports.CartStatus = exports.LimitedTimeOfferCampaignStatus = exports.AdminRole = exports.PunchMarketingStatus = exports.MarketingStatus = exports.ServiceMarketingType = exports.MarketingType = exports.FavouriteType = exports.CouponExpirationReason = exports.CouponType = void 0;
|
|
5
5
|
exports.SyncCacheEnumType = exports.DateFormatType = exports.AppAppearanceType = exports.GraphType = exports.CalendarEventType = exports.CalendarViewType = exports.LyxaTimeZoneEnum = exports.UserOrderCompletionScope = exports.GroupCartNotificationStatus = exports.Currency = exports.RequestFrom = exports.UploadState = exports.SubServiceType = exports.ServiceType = exports.ActionType = exports.DeviceType = exports.PushNotificationEventType = exports.SocketEventType = exports.SocketServiceQueue = exports.OtpMethodType = exports.ReviewType = exports.FoodNutritionType = exports.AdjustmentReason = exports.UrgentOrderReasons = exports.ServiceFlagReasonType = exports.ServiceFlagType = exports.FlagReasonType = exports.FlagType = exports.PromotionType = exports.ServiceBookingCanceledBy = exports.TRPCErrorEnum = exports.ShopFilterSortByEnum = exports.BookingStatus = exports.ProfessionalScheduleType = exports.ServiceBookingRecurrencePattern = exports.ProfessionalRecurrencePattern = exports.ServiceBookingPriority = exports.ProfessionalStatus = exports.Service = exports.ServiceLineItemType = exports.ServiceCartStatus = exports.ChatroomType = exports.UserRef = exports.TicketStatus = exports.TicketType = exports.RewardedToTypeEnum = exports.ReplacementType = exports.ReplacementReason = exports.OrderCanceledBy = exports.LogUser = void 0;
|
|
6
|
-
exports.
|
|
6
|
+
exports.TournamentProvider = exports.TournamentRewardType = exports.OnlinePaymentStatus = exports.BarcodeTypes = exports.RiderScoreEventTag = exports.AreebaPaymentType = exports.HttpStatus = exports.LogTag = exports.LogLevel = void 0;
|
|
7
7
|
var AuthEntityType;
|
|
8
8
|
(function (AuthEntityType) {
|
|
9
9
|
AuthEntityType["USER"] = "USER";
|
|
@@ -396,7 +396,6 @@ var ClickType;
|
|
|
396
396
|
ClickType["CLICKABLE_SETTING"] = "clickable_setting";
|
|
397
397
|
ClickType["CLICKABLE_FALLBACK"] = "clickable_fallback";
|
|
398
398
|
ClickType["CLICKABLE_BOOKING"] = "clickable_booking";
|
|
399
|
-
ClickType["CLICKABLE_TOURNAMENT"] = "clickable_tournament";
|
|
400
399
|
})(ClickType || (exports.ClickType = ClickType = {}));
|
|
401
400
|
var ChargeType;
|
|
402
401
|
(function (ChargeType) {
|
|
@@ -1414,31 +1413,8 @@ var TournamentRewardType;
|
|
|
1414
1413
|
TournamentRewardType["COUPON"] = "coupon";
|
|
1415
1414
|
TournamentRewardType["FREE_DELIVERY"] = "free_delivery";
|
|
1416
1415
|
})(TournamentRewardType || (exports.TournamentRewardType = TournamentRewardType = {}));
|
|
1417
|
-
var
|
|
1418
|
-
(function (
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
TournamentNotificationTag["MATCH_RESULT_LOSER"] = "match-result-loser";
|
|
1422
|
-
TournamentNotificationTag["TEAM_SELECTION_REMINDER_1_DAY"] = "team-selection-reminder-1-day";
|
|
1423
|
-
TournamentNotificationTag["PREDICTION_REMINDER_3_HOURS"] = "prediction-reminder-3-hours";
|
|
1424
|
-
TournamentNotificationTag["PREDICTION_REMINDER_15_MINUTES"] = "prediction-reminder-15-minutes";
|
|
1425
|
-
})(TournamentNotificationTag || (exports.TournamentNotificationTag = TournamentNotificationTag = {}));
|
|
1426
|
-
var TournamentScheduledNotificationTarget;
|
|
1427
|
-
(function (TournamentScheduledNotificationTarget) {
|
|
1428
|
-
TournamentScheduledNotificationTarget["GLOBAL"] = "global";
|
|
1429
|
-
TournamentScheduledNotificationTarget["UNPREDICTED_PARTICIPANTS"] = "unpredicted-participants";
|
|
1430
|
-
TournamentScheduledNotificationTarget["NO_TEAM_SELECTED_PARTICIPANTS"] = "no-team-selected-participants";
|
|
1431
|
-
})(TournamentScheduledNotificationTarget || (exports.TournamentScheduledNotificationTarget = TournamentScheduledNotificationTarget = {}));
|
|
1432
|
-
var TournamentMatchStatus;
|
|
1433
|
-
(function (TournamentMatchStatus) {
|
|
1434
|
-
TournamentMatchStatus["UPCOMING"] = "upcoming";
|
|
1435
|
-
TournamentMatchStatus["STARTED"] = "started";
|
|
1436
|
-
TournamentMatchStatus["ENDED"] = "ended";
|
|
1437
|
-
})(TournamentMatchStatus || (exports.TournamentMatchStatus = TournamentMatchStatus = {}));
|
|
1438
|
-
var TournamentParticipantStatus;
|
|
1439
|
-
(function (TournamentParticipantStatus) {
|
|
1440
|
-
TournamentParticipantStatus["JOINED"] = "joined";
|
|
1441
|
-
TournamentParticipantStatus["SEEN"] = "seen";
|
|
1442
|
-
TournamentParticipantStatus["NOT_SEEN"] = "not_seen";
|
|
1443
|
-
})(TournamentParticipantStatus || (exports.TournamentParticipantStatus = TournamentParticipantStatus = {}));
|
|
1416
|
+
var TournamentProvider;
|
|
1417
|
+
(function (TournamentProvider) {
|
|
1418
|
+
TournamentProvider["API_FOOTBALL"] = "api-football";
|
|
1419
|
+
})(TournamentProvider || (exports.TournamentProvider = TournamentProvider = {}));
|
|
1444
1420
|
//# sourceMappingURL=enum.js.map
|