@lyxa.ai/core 1.4.142 → 1.4.143

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.
@@ -4,6 +4,10 @@ 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
+ export declare enum TournamentParticipantStatus {
8
+ JOINED = "joined",
9
+ REJECTED = "rejected"
10
+ }
7
11
  export declare class TournamentPredictionEntry {
8
12
  _id: Types.ObjectId;
9
13
  matchId: Types.ObjectId;
@@ -15,6 +19,7 @@ export declare class TournamentPredictionEntry {
15
19
  export declare class TournamentParticipant extends TimeStamps {
16
20
  userId: Ref<User>;
17
21
  tournamentId: Ref<Tournament>;
18
- teamId: Types.ObjectId;
22
+ teamId?: Types.ObjectId;
23
+ status: TournamentParticipantStatus;
19
24
  predictions: TournamentPredictionEntry[];
20
25
  }
@@ -9,13 +9,18 @@ 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.TournamentParticipant = exports.TournamentPredictionEntry = void 0;
12
+ exports.TournamentParticipant = exports.TournamentPredictionEntry = exports.TournamentParticipantStatus = 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");
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
+ var TournamentParticipantStatus;
20
+ (function (TournamentParticipantStatus) {
21
+ TournamentParticipantStatus["JOINED"] = "joined";
22
+ TournamentParticipantStatus["REJECTED"] = "rejected";
23
+ })(TournamentParticipantStatus || (exports.TournamentParticipantStatus = TournamentParticipantStatus = {}));
19
24
  class TournamentPredictionEntry {
20
25
  _id;
21
26
  matchId;
@@ -53,6 +58,7 @@ let TournamentParticipant = class TournamentParticipant extends defaultClasses_1
53
58
  userId;
54
59
  tournamentId;
55
60
  teamId;
61
+ status;
56
62
  predictions;
57
63
  };
58
64
  exports.TournamentParticipant = TournamentParticipant;
@@ -65,9 +71,13 @@ __decorate([
65
71
  __metadata("design:type", Object)
66
72
  ], TournamentParticipant.prototype, "tournamentId", void 0);
67
73
  __decorate([
68
- (0, typegoose_1.prop)({ required: true, type: mongoose_1.Types.ObjectId }),
74
+ (0, typegoose_1.prop)({ type: mongoose_1.Types.ObjectId }),
69
75
  __metadata("design:type", mongoose_1.Types.ObjectId)
70
76
  ], TournamentParticipant.prototype, "teamId", void 0);
77
+ __decorate([
78
+ (0, typegoose_1.prop)({ required: true, enum: TournamentParticipantStatus, default: TournamentParticipantStatus.JOINED }),
79
+ __metadata("design:type", String)
80
+ ], TournamentParticipant.prototype, "status", void 0);
71
81
  __decorate([
72
82
  (0, typegoose_1.prop)({ type: () => [TournamentPredictionEntry], default: [] }),
73
83
  __metadata("design:type", Array)
@@ -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;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,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,gBAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;8BACvD,gBAAK,CAAC,QAAQ;sDAAC;AAGrB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C,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;0DACd;gCAXrC,qBAAqB;IADjC,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,wBAAwB,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GAC/E,qBAAqB,CAYjC","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({ required: true, type: Types.ObjectId })\n\tpublic teamId!: Types.ObjectId;\n\n\t@prop({ type: () => [TournamentPredictionEntry], default: [] })\n\tpublic predictions!: TournamentPredictionEntry[];\n}\n"]}
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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AA+B;CACjD,CAAA;AAfY,sDAAqB;AAE1B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;qDAChB;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,6BAAU,EAAE,CAAC;;2DACV;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,gBAAK,CAAC,QAAQ,EAAE,CAAC;8BACf,gBAAK,CAAC,QAAQ;qDAAC;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,2BAA2B,CAAC,MAAM,EAAE,CAAC;;qDAC7D;AAGrC;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 enum TournamentParticipantStatus {\n\tJOINED = 'joined',\n\tREJECTED = 'rejected',\n}\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({ required: true, enum: TournamentParticipantStatus, default: TournamentParticipantStatus.JOINED })\n\tpublic status!: TournamentParticipantStatus;\n\n\t@prop({ type: () => [TournamentPredictionEntry], default: [] })\n\tpublic predictions!: TournamentPredictionEntry[];\n}\n"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.4.142
25
+ Version: 1.4.143
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.142",
3
+ "version": "1.4.143",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.4.142",
3
+ "version": "1.4.143",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",