black-diamond-shared 1.0.0 → 1.0.1

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/index.js CHANGED
@@ -28,7 +28,13 @@ __export(src_exports, {
28
28
  API_FOOTBALL_URL_TEAMS: () => API_FOOTBALL_URL_TEAMS,
29
29
  API_FOOTBALL_URL_TEAM_STATS: () => API_FOOTBALL_URL_TEAM_STATS,
30
30
  LEAGUE_ID_LIST: () => LEAGUE_ID_LIST,
31
- leagueSchema: () => leagueSchema
31
+ fixtureSchema: () => fixtureSchema,
32
+ getMeanModeMedian: () => getMeanModeMedian,
33
+ leagueSchema: () => leagueSchema,
34
+ teamSchema: () => teamSchema,
35
+ teamStatSchema: () => teamStatSchema,
36
+ toPercent: () => toPercent,
37
+ toTwoDecimalPlaces: () => toTwoDecimalPlaces
32
38
  });
33
39
  module.exports = __toCommonJS(src_exports);
34
40
 
@@ -151,6 +157,431 @@ var LEAGUE_ID_LIST = [
151
157
  // Ireland Premier division
152
158
  ];
153
159
 
160
+ // src/data/team/schema/index.ts
161
+ var import_mongoose2 = require("mongoose");
162
+ var teamSchema = new import_mongoose2.Schema(
163
+ {
164
+ id: {
165
+ type: Number,
166
+ required: true
167
+ },
168
+ name: {
169
+ type: String,
170
+ required: true
171
+ },
172
+ logo: {
173
+ type: String,
174
+ required: true
175
+ },
176
+ league: {
177
+ type: import_mongoose2.Schema.Types.ObjectId,
178
+ ref: "League"
179
+ },
180
+ stats: {
181
+ type: import_mongoose2.Schema.Types.ObjectId,
182
+ ref: "TeamStat"
183
+ },
184
+ currentSeason: {
185
+ type: Number
186
+ },
187
+ fixtures: [
188
+ {
189
+ type: import_mongoose2.Schema.Types.ObjectId,
190
+ ref: "Fixture"
191
+ }
192
+ ]
193
+ },
194
+ { timestamps: true }
195
+ );
196
+
197
+ // src/data/fixture/schema/index.ts
198
+ var import_mongoose3 = require("mongoose");
199
+ var fixtureSchema = new import_mongoose3.Schema(
200
+ {
201
+ fixture: {
202
+ type: import_mongoose3.Schema.Types.Mixed
203
+ },
204
+ league: {
205
+ type: import_mongoose3.Schema.Types.Mixed
206
+ },
207
+ teams: {
208
+ type: import_mongoose3.Schema.Types.Mixed
209
+ },
210
+ goals: {
211
+ type: import_mongoose3.Schema.Types.Mixed
212
+ },
213
+ score: {
214
+ type: import_mongoose3.Schema.Types.Mixed
215
+ },
216
+ odds: {
217
+ type: import_mongoose3.Schema.Types.Mixed
218
+ },
219
+ apiPredictions: {
220
+ type: import_mongoose3.Schema.Types.Mixed
221
+ },
222
+ teamStats: {
223
+ type: import_mongoose3.Schema.Types.Mixed
224
+ }
225
+ // refs: {
226
+ // refHomeTeamStat: {
227
+ // type: Schema.Types.ObjectId,
228
+ // ref: "Stat",
229
+ // },
230
+ // refAwayTeamStat: {
231
+ // type: Schema.Types.ObjectId,
232
+ // ref: "Stat",
233
+ // },
234
+ // refHomeTeam: {
235
+ // type: Schema.Types.ObjectId,
236
+ // ref: "Team",
237
+ // },
238
+ // refAwayTeam: {
239
+ // type: Schema.Types.ObjectId,
240
+ // ref: "Team",
241
+ // },
242
+ // },
243
+ // odds: {
244
+ // type: Schema.Types.Mixed,
245
+ // },
246
+ // prevFixtures: {
247
+ // home: [
248
+ // {
249
+ // type: Schema.Types.ObjectId,
250
+ // ref: "Fixture",
251
+ // },
252
+ // ],
253
+ // away: [
254
+ // {
255
+ // type: Schema.Types.ObjectId,
256
+ // ref: "Fixture",
257
+ // },
258
+ // ],
259
+ // },
260
+ // apiPredictions: {
261
+ // type: Schema.Types.Mixed,
262
+ // },
263
+ // predictions: {
264
+ // type: Schema.Types.Mixed,
265
+ // },
266
+ // topBets: {
267
+ // type: Schema.Types.Mixed,
268
+ // },
269
+ // keyStats: {
270
+ // type: Schema.Types.Mixed,
271
+ // },
272
+ // info: {
273
+ // type: Schema.Types.Mixed,
274
+ // },
275
+ },
276
+ { timestamps: true }
277
+ );
278
+
279
+ // src/data/teamStat/schema/index.ts
280
+ var import_mongoose4 = require("mongoose");
281
+ var teamStatSchema = new import_mongoose4.Schema(
282
+ {
283
+ leaguePosition: { type: Number },
284
+ team: {
285
+ id: { type: Number, required: true },
286
+ name: { type: String, required: true },
287
+ logo: { type: String, required: true }
288
+ },
289
+ biggest: {
290
+ streak: {
291
+ wins: { type: Number },
292
+ draws: { type: Number },
293
+ loses: { type: Number }
294
+ },
295
+ wins: {
296
+ home: { type: String },
297
+ away: { type: String }
298
+ },
299
+ loses: {
300
+ home: { type: String },
301
+ away: { type: String }
302
+ },
303
+ goals: {
304
+ for: {
305
+ home: { type: Number },
306
+ away: { type: Number }
307
+ },
308
+ against: {
309
+ home: { type: Number },
310
+ away: { type: Number }
311
+ }
312
+ }
313
+ },
314
+ cards: {
315
+ yellow: {
316
+ "0-15": {
317
+ total: { type: Number },
318
+ percentage: { type: String }
319
+ },
320
+ "16-30": {
321
+ total: { type: Number },
322
+ percentage: { type: String }
323
+ },
324
+ "31-45": {
325
+ total: { type: Number },
326
+ percentage: { type: String }
327
+ },
328
+ "46-60": {
329
+ total: { type: Number },
330
+ percentage: { type: String }
331
+ },
332
+ "61-75": {
333
+ total: { type: Number },
334
+ percentage: { type: String }
335
+ },
336
+ "76-90": {
337
+ total: { type: Number },
338
+ percentage: { type: String }
339
+ },
340
+ "91-105": {
341
+ total: { type: Number },
342
+ percentage: { type: String }
343
+ },
344
+ "106-120": {
345
+ total: { type: Number },
346
+ percentage: { type: String }
347
+ }
348
+ },
349
+ red: {
350
+ "0-15": {
351
+ total: { type: Number },
352
+ percentage: { type: String }
353
+ },
354
+ "16-30": {
355
+ total: { type: Number },
356
+ percentage: { type: String }
357
+ },
358
+ "31-45": {
359
+ total: { type: Number },
360
+ percentage: { type: String }
361
+ },
362
+ "46-60": {
363
+ total: { type: Number },
364
+ percentage: { type: String }
365
+ },
366
+ "61-75": {
367
+ total: { type: Number },
368
+ percentage: { type: String }
369
+ },
370
+ "76-90": {
371
+ total: { type: Number },
372
+ percentage: { type: String }
373
+ },
374
+ "91-105": {
375
+ total: { type: Number },
376
+ percentage: { type: String }
377
+ },
378
+ "106-120": {
379
+ total: { type: Number },
380
+ percentage: { type: String }
381
+ }
382
+ }
383
+ },
384
+ clean_sheet: {
385
+ home: { type: Number },
386
+ away: { type: Number },
387
+ total: { type: Number }
388
+ },
389
+ createdAt: { type: Date, default: Date.now },
390
+ failed_to_score: {
391
+ home: { type: Number },
392
+ away: { type: Number },
393
+ total: { type: Number }
394
+ },
395
+ fixtures: {
396
+ played: {
397
+ home: { type: Number },
398
+ away: { type: Number },
399
+ total: { type: Number }
400
+ },
401
+ wins: {
402
+ home: { type: Number },
403
+ away: { type: Number },
404
+ total: { type: Number }
405
+ },
406
+ draws: {
407
+ home: { type: Number },
408
+ away: { type: Number },
409
+ total: { type: Number }
410
+ },
411
+ loses: {
412
+ home: { type: Number },
413
+ away: { type: Number },
414
+ total: { type: Number }
415
+ }
416
+ },
417
+ form: { type: String },
418
+ goals: {
419
+ for: {
420
+ total: {
421
+ home: { type: Number },
422
+ away: { type: Number },
423
+ total: { type: Number }
424
+ },
425
+ average: {
426
+ home: { type: String },
427
+ away: { type: String },
428
+ total: { type: String }
429
+ },
430
+ minute: {
431
+ "0-15": {
432
+ total: { type: Number },
433
+ percentage: { type: String }
434
+ },
435
+ "16-30": {
436
+ total: { type: Number },
437
+ percentage: { type: String }
438
+ },
439
+ "31-45": {
440
+ total: { type: Number },
441
+ percentage: { type: String }
442
+ },
443
+ "46-60": {
444
+ total: { type: Number },
445
+ percentage: { type: String }
446
+ },
447
+ "61-75": {
448
+ total: { type: Number },
449
+ percentage: { type: String }
450
+ },
451
+ "76-90": {
452
+ total: { type: Number },
453
+ percentage: { type: String }
454
+ },
455
+ "91-105": {
456
+ total: { type: Number },
457
+ percentage: { type: String }
458
+ },
459
+ "106-120": {
460
+ total: { type: Number },
461
+ percentage: { type: String }
462
+ }
463
+ },
464
+ under_over: {
465
+ "0.5": {
466
+ over: { type: Number },
467
+ under: { type: Number }
468
+ },
469
+ "1.5": {
470
+ over: { type: Number },
471
+ under: { type: Number }
472
+ },
473
+ "2.5": {
474
+ over: { type: Number },
475
+ under: { type: Number }
476
+ },
477
+ "3.5": {
478
+ over: { type: Number },
479
+ under: { type: Number }
480
+ },
481
+ "4.5": {
482
+ over: { type: Number },
483
+ under: { type: Number }
484
+ }
485
+ }
486
+ },
487
+ against: {
488
+ total: {
489
+ home: { type: Number },
490
+ away: { type: Number },
491
+ total: { type: Number }
492
+ },
493
+ average: {
494
+ home: { type: String },
495
+ away: { type: String },
496
+ total: { type: String }
497
+ },
498
+ minute: {
499
+ "0-15": {
500
+ total: { type: Number },
501
+ percentage: { type: String }
502
+ },
503
+ "16-30": {
504
+ total: { type: Number },
505
+ percentage: { type: String }
506
+ },
507
+ "31-45": {
508
+ total: { type: Number },
509
+ percentage: { type: String }
510
+ },
511
+ "46-60": {
512
+ total: { type: Number },
513
+ percentage: { type: String }
514
+ },
515
+ "61-75": {
516
+ total: { type: Number },
517
+ percentage: { type: String }
518
+ },
519
+ "76-90": {
520
+ total: { type: Number },
521
+ percentage: { type: String }
522
+ },
523
+ "91-105": {
524
+ total: { type: Number },
525
+ percentage: { type: String }
526
+ },
527
+ "106-120": {
528
+ total: { type: Number },
529
+ percentage: { type: String }
530
+ }
531
+ },
532
+ under_over: {
533
+ "0.5": {
534
+ over: { type: Number },
535
+ under: { type: Number }
536
+ },
537
+ "1.5": {
538
+ over: { type: Number },
539
+ under: { type: Number }
540
+ },
541
+ "2.5": {
542
+ over: { type: Number },
543
+ under: { type: Number }
544
+ },
545
+ "3.5": {
546
+ over: { type: Number },
547
+ under: { type: Number }
548
+ },
549
+ "4.5": {
550
+ over: { type: Number },
551
+ under: { type: Number }
552
+ }
553
+ }
554
+ }
555
+ },
556
+ league: {
557
+ id: { type: Number, required: true },
558
+ name: { type: String, required: true },
559
+ country: { type: String, required: true },
560
+ logo: { type: String, required: true },
561
+ flag: { type: String, required: true },
562
+ season: { type: Number, required: true }
563
+ },
564
+ lineups: [
565
+ {
566
+ formation: { type: String },
567
+ played: { type: Number }
568
+ }
569
+ ],
570
+ penalty: {
571
+ scored: {
572
+ total: { type: Number },
573
+ percentage: { type: String }
574
+ },
575
+ missed: {
576
+ total: { type: Number },
577
+ percentage: { type: String }
578
+ },
579
+ total: { type: Number }
580
+ }
581
+ },
582
+ { timestamps: true }
583
+ );
584
+
154
585
  // src/utils/apiFootball/data/index.ts
155
586
  var API_FOOTBALL_URL = `https://v3.football.api-sports.io`;
156
587
  var API_FOOTBALL_URL_LEAGUES = `${API_FOOTBALL_URL}/leagues`;
@@ -160,6 +591,39 @@ var API_FOOTBALL_URL_TEAM_STATS = `${API_FOOTBALL_URL}/teams/statistics`;
160
591
  var API_FOOTBALL_URL_ODDS = `${API_FOOTBALL_URL}/odds`;
161
592
  var API_FOOTBALL_URL_STANDINGS = `${API_FOOTBALL_URL}/standings`;
162
593
  var API_FOOTBALL_URL_PREDICTIONS = `${API_FOOTBALL_URL}/predictions`;
594
+
595
+ // src/utils/numbers/toTwoDecimalPlaces.ts
596
+ function toTwoDecimalPlaces(num) {
597
+ return parseFloat(num.toFixed(2));
598
+ }
599
+
600
+ // src/utils/numbers/toPercent.ts
601
+ function toPercent(value, total) {
602
+ if (total === 0) {
603
+ return 0;
604
+ }
605
+ return value * 100 / total;
606
+ }
607
+
608
+ // src/utils/numbers/getMeanModeMedian.ts
609
+ var getMeanModeMedian = (numbers) => {
610
+ if (numbers.length === 0) return { mean: 0, median: 0, mode: 0 };
611
+ const mean = numbers.reduce((acc, val) => acc + val, 0) / numbers.length;
612
+ const sortedNumbers = [...numbers].sort((a, b) => a - b);
613
+ const mid = Math.floor(sortedNumbers.length / 2);
614
+ const median = sortedNumbers.length % 2 !== 0 ? sortedNumbers[mid] : (sortedNumbers[mid - 1] + sortedNumbers[mid]) / 2;
615
+ const frequency = {};
616
+ let maxFreq = 0;
617
+ let mode = numbers[0];
618
+ numbers.forEach((num) => {
619
+ frequency[num] = (frequency[num] || 0) + 1;
620
+ if (frequency[num] > maxFreq) {
621
+ maxFreq = frequency[num];
622
+ mode = num;
623
+ }
624
+ });
625
+ return { mean, median, mode };
626
+ };
163
627
  // Annotate the CommonJS export names for ESM import in node:
164
628
  0 && (module.exports = {
165
629
  API_FOOTBALL_URL_FIXTURES,
@@ -170,6 +634,12 @@ var API_FOOTBALL_URL_PREDICTIONS = `${API_FOOTBALL_URL}/predictions`;
170
634
  API_FOOTBALL_URL_TEAMS,
171
635
  API_FOOTBALL_URL_TEAM_STATS,
172
636
  LEAGUE_ID_LIST,
173
- leagueSchema
637
+ fixtureSchema,
638
+ getMeanModeMedian,
639
+ leagueSchema,
640
+ teamSchema,
641
+ teamStatSchema,
642
+ toPercent,
643
+ toTwoDecimalPlaces
174
644
  });
175
645
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/data/league/schema/index.ts","../src/data/league/data/index.ts","../src/utils/apiFootball/data/index.ts"],"sourcesContent":["export * from \"./data/league\";\nexport * from \"./utils/apiFootball\";\n","import { League } from \"../types\";\nimport { Schema } from \"mongoose\";\n\nexport const leagueSchema = new Schema<League>(\n {\n id: {\n type: Number,\n required: true,\n },\n name: {\n type: String,\n },\n logo: {\n type: String,\n },\n country: {\n name: {\n type: String,\n },\n code: {\n type: String,\n },\n flag: {\n type: String,\n },\n },\n stats: {\n type: Schema.Types.Mixed,\n },\n currentSeason: {\n type: Number,\n },\n },\n { timestamps: true }\n);\n","export const LEAGUE_ID_LIST = [\n 39, // premier league\n 78, //Bundesliga 1\n 140, // La Liga\n 135, // Serie A\n 61, // Ligue 1,\n 188, // A league australia\n 40, // Championship\n 41, // League One\n 42, // League Two\n 43, //National League\n 141, // Segunda Division\n 79, //Bundesliga 2\n 136, // Serie B\n 62, // Ligue 2\n 179, // Scotland Premiership\n 180, // Scotland Championship,\n 113, // Sweden Allsvenskan\n 103, // Norway Eliteserien\n 94, // Primeira Liga portugal\n 71, // Serie A Brazil\n 72, // Serie B Brazil\n 253, // Major League Soccer\n 197, // Greece Super League\n 88, // Eredivisie Holland\n 144, // Belgium 1st div A\n 345, // Czech Liga\n 207, // Switz super league\n 98, // J1 League Japan\n 292, // K League 1\n 333, // Ukraine premier league\n 128, // Argentine Primera División\n 169, // China super league\n 233, // Egypt premier leaguye\n 262, // Liga MX Mexico\n 244, // Veikkausliiga finland\n 164, // Iceland\n 281, // Peru Primera División\n 203, // Turkey Süper Lig\n 365, // Virsliga Latvia\n 357, // Ireland Premier division\n];\n","const API_FOOTBALL_URL = `https://v3.football.api-sports.io`;\nexport const API_FOOTBALL_URL_LEAGUES = `${API_FOOTBALL_URL}/leagues`;\nexport const API_FOOTBALL_URL_TEAMS = `${API_FOOTBALL_URL}/teams`;\nexport const API_FOOTBALL_URL_FIXTURES = `${API_FOOTBALL_URL}/fixtures`;\nexport const API_FOOTBALL_URL_TEAM_STATS = `${API_FOOTBALL_URL}/teams/statistics`;\nexport const API_FOOTBALL_URL_ODDS = `${API_FOOTBALL_URL}/odds`;\nexport const API_FOOTBALL_URL_STANDINGS = `${API_FOOTBALL_URL}/standings`;\nexport const API_FOOTBALL_URL_PREDICTIONS = `${API_FOOTBALL_URL}/predictions`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,sBAAuB;AAEhB,IAAM,eAAe,IAAI;AAAA,EAC9B;AAAA,IACE,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,MAAM,uBAAO,MAAM;AAAA,IACrB;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,EAAE,YAAY,KAAK;AACrB;;;AClCO,IAAM,iBAAiB;AAAA,EAC5B;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF;;;ACzCA,IAAM,mBAAmB;AAClB,IAAM,2BAA2B,GAAG,gBAAgB;AACpD,IAAM,yBAAyB,GAAG,gBAAgB;AAClD,IAAM,4BAA4B,GAAG,gBAAgB;AACrD,IAAM,8BAA8B,GAAG,gBAAgB;AACvD,IAAM,wBAAwB,GAAG,gBAAgB;AACjD,IAAM,6BAA6B,GAAG,gBAAgB;AACtD,IAAM,+BAA+B,GAAG,gBAAgB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/data/league/schema/index.ts","../src/data/league/data/index.ts","../src/data/team/schema/index.ts","../src/data/fixture/schema/index.ts","../src/data/teamStat/schema/index.ts","../src/utils/apiFootball/data/index.ts","../src/utils/numbers/toTwoDecimalPlaces.ts","../src/utils/numbers/toPercent.ts","../src/utils/numbers/getMeanModeMedian.ts"],"sourcesContent":["export * from \"./data/league\";\nexport * from \"./data/team\";\nexport * from \"./data/fixture\";\nexport * from \"./data/teamStat\";\n\nexport * from \"./utils/\";\n","import { League } from \"../types\";\nimport { Schema } from \"mongoose\";\n\nexport const leagueSchema = new Schema<League>(\n {\n id: {\n type: Number,\n required: true,\n },\n name: {\n type: String,\n },\n logo: {\n type: String,\n },\n country: {\n name: {\n type: String,\n },\n code: {\n type: String,\n },\n flag: {\n type: String,\n },\n },\n stats: {\n type: Schema.Types.Mixed,\n },\n currentSeason: {\n type: Number,\n },\n },\n { timestamps: true }\n);\n","export const LEAGUE_ID_LIST = [\n 39, // premier league\n 78, //Bundesliga 1\n 140, // La Liga\n 135, // Serie A\n 61, // Ligue 1,\n 188, // A league australia\n 40, // Championship\n 41, // League One\n 42, // League Two\n 43, //National League\n 141, // Segunda Division\n 79, //Bundesliga 2\n 136, // Serie B\n 62, // Ligue 2\n 179, // Scotland Premiership\n 180, // Scotland Championship,\n 113, // Sweden Allsvenskan\n 103, // Norway Eliteserien\n 94, // Primeira Liga portugal\n 71, // Serie A Brazil\n 72, // Serie B Brazil\n 253, // Major League Soccer\n 197, // Greece Super League\n 88, // Eredivisie Holland\n 144, // Belgium 1st div A\n 345, // Czech Liga\n 207, // Switz super league\n 98, // J1 League Japan\n 292, // K League 1\n 333, // Ukraine premier league\n 128, // Argentine Primera División\n 169, // China super league\n 233, // Egypt premier leaguye\n 262, // Liga MX Mexico\n 244, // Veikkausliiga finland\n 164, // Iceland\n 281, // Peru Primera División\n 203, // Turkey Süper Lig\n 365, // Virsliga Latvia\n 357, // Ireland Premier division\n];\n","import { Schema } from \"mongoose\";\n\nexport const teamSchema = new Schema(\n {\n id: {\n type: Number,\n required: true,\n },\n name: {\n type: String,\n required: true,\n },\n logo: {\n type: String,\n required: true,\n },\n league: {\n type: Schema.Types.ObjectId,\n ref: \"League\",\n },\n stats: {\n type: Schema.Types.ObjectId,\n ref: \"TeamStat\",\n },\n currentSeason: {\n type: Number,\n },\n fixtures: [\n {\n type: Schema.Types.ObjectId,\n ref: \"Fixture\",\n },\n ],\n },\n { timestamps: true }\n);\n","import { Schema } from \"mongoose\";\n\nexport const fixtureSchema = new Schema(\n {\n fixture: {\n type: Schema.Types.Mixed,\n },\n league: {\n type: Schema.Types.Mixed,\n },\n teams: {\n type: Schema.Types.Mixed,\n },\n goals: {\n type: Schema.Types.Mixed,\n },\n score: {\n type: Schema.Types.Mixed,\n },\n odds: {\n type: Schema.Types.Mixed,\n },\n apiPredictions: {\n type: Schema.Types.Mixed,\n },\n teamStats: {\n type: Schema.Types.Mixed,\n },\n // refs: {\n // refHomeTeamStat: {\n // type: Schema.Types.ObjectId,\n // ref: \"Stat\",\n // },\n // refAwayTeamStat: {\n // type: Schema.Types.ObjectId,\n // ref: \"Stat\",\n // },\n // refHomeTeam: {\n // type: Schema.Types.ObjectId,\n // ref: \"Team\",\n // },\n // refAwayTeam: {\n // type: Schema.Types.ObjectId,\n // ref: \"Team\",\n // },\n // },\n // odds: {\n // type: Schema.Types.Mixed,\n // },\n // prevFixtures: {\n // home: [\n // {\n // type: Schema.Types.ObjectId,\n // ref: \"Fixture\",\n // },\n // ],\n // away: [\n // {\n // type: Schema.Types.ObjectId,\n // ref: \"Fixture\",\n // },\n // ],\n // },\n // apiPredictions: {\n // type: Schema.Types.Mixed,\n // },\n // predictions: {\n // type: Schema.Types.Mixed,\n // },\n // topBets: {\n // type: Schema.Types.Mixed,\n // },\n // keyStats: {\n // type: Schema.Types.Mixed,\n // },\n // info: {\n // type: Schema.Types.Mixed,\n // },\n },\n { timestamps: true }\n);\n","import { Schema } from \"mongoose\";\n\nexport const teamStatSchema = new Schema(\n {\n leaguePosition: { type: Number },\n team: {\n id: { type: Number, required: true },\n name: { type: String, required: true },\n logo: { type: String, required: true },\n },\n biggest: {\n streak: {\n wins: { type: Number },\n draws: { type: Number },\n loses: { type: Number },\n },\n wins: {\n home: { type: String },\n away: { type: String },\n },\n loses: {\n home: { type: String },\n away: { type: String },\n },\n goals: {\n for: {\n home: { type: Number },\n away: { type: Number },\n },\n against: {\n home: { type: Number },\n away: { type: Number },\n },\n },\n },\n cards: {\n yellow: {\n \"0-15\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"16-30\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"31-45\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"46-60\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"61-75\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"76-90\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"91-105\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"106-120\": {\n total: { type: Number },\n percentage: { type: String },\n },\n },\n red: {\n \"0-15\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"16-30\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"31-45\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"46-60\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"61-75\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"76-90\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"91-105\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"106-120\": {\n total: { type: Number },\n percentage: { type: String },\n },\n },\n },\n clean_sheet: {\n home: { type: Number },\n away: { type: Number },\n total: { type: Number },\n },\n createdAt: { type: Date, default: Date.now },\n failed_to_score: {\n home: { type: Number },\n away: { type: Number },\n total: { type: Number },\n },\n fixtures: {\n played: {\n home: { type: Number },\n away: { type: Number },\n total: { type: Number },\n },\n wins: {\n home: { type: Number },\n away: { type: Number },\n total: { type: Number },\n },\n draws: {\n home: { type: Number },\n away: { type: Number },\n total: { type: Number },\n },\n loses: {\n home: { type: Number },\n away: { type: Number },\n total: { type: Number },\n },\n },\n form: { type: String },\n goals: {\n for: {\n total: {\n home: { type: Number },\n away: { type: Number },\n total: { type: Number },\n },\n average: {\n home: { type: String },\n away: { type: String },\n total: { type: String },\n },\n minute: {\n \"0-15\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"16-30\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"31-45\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"46-60\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"61-75\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"76-90\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"91-105\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"106-120\": {\n total: { type: Number },\n percentage: { type: String },\n },\n },\n under_over: {\n \"0.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n \"1.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n \"2.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n \"3.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n \"4.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n },\n },\n against: {\n total: {\n home: { type: Number },\n away: { type: Number },\n total: { type: Number },\n },\n average: {\n home: { type: String },\n away: { type: String },\n total: { type: String },\n },\n minute: {\n \"0-15\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"16-30\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"31-45\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"46-60\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"61-75\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"76-90\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"91-105\": {\n total: { type: Number },\n percentage: { type: String },\n },\n \"106-120\": {\n total: { type: Number },\n percentage: { type: String },\n },\n },\n under_over: {\n \"0.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n \"1.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n \"2.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n \"3.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n \"4.5\": {\n over: { type: Number },\n under: { type: Number },\n },\n },\n },\n },\n league: {\n id: { type: Number, required: true },\n name: { type: String, required: true },\n country: { type: String, required: true },\n logo: { type: String, required: true },\n flag: { type: String, required: true },\n season: { type: Number, required: true },\n },\n lineups: [\n {\n formation: { type: String },\n played: { type: Number },\n },\n ],\n penalty: {\n scored: {\n total: { type: Number },\n percentage: { type: String },\n },\n missed: {\n total: { type: Number },\n percentage: { type: String },\n },\n total: { type: Number },\n },\n },\n { timestamps: true }\n);\n","const API_FOOTBALL_URL = `https://v3.football.api-sports.io`;\nexport const API_FOOTBALL_URL_LEAGUES = `${API_FOOTBALL_URL}/leagues`;\nexport const API_FOOTBALL_URL_TEAMS = `${API_FOOTBALL_URL}/teams`;\nexport const API_FOOTBALL_URL_FIXTURES = `${API_FOOTBALL_URL}/fixtures`;\nexport const API_FOOTBALL_URL_TEAM_STATS = `${API_FOOTBALL_URL}/teams/statistics`;\nexport const API_FOOTBALL_URL_ODDS = `${API_FOOTBALL_URL}/odds`;\nexport const API_FOOTBALL_URL_STANDINGS = `${API_FOOTBALL_URL}/standings`;\nexport const API_FOOTBALL_URL_PREDICTIONS = `${API_FOOTBALL_URL}/predictions`;\n","export function toTwoDecimalPlaces(num: number): number {\n return parseFloat(num.toFixed(2));\n}\n","export function toPercent(value: number, total: number): number {\n if (total === 0) {\n return 0;\n }\n return (value * 100) / total;\n}\n","// The four averages are the mean, median, mode, and range.\n// The mean is what you typically think as the average - found by summing all values and dividing the sum by the number of values.\n// The median is the middle value of the set (or the average of the two middle values if the set is even).\n// The mode is the piece of data that occurs the most\n// The range is the difference between the highest and lowest values.\n\nexport const getMeanModeMedian = (numbers: number[]) => {\n if (numbers.length === 0) return { mean: 0, median: 0, mode: 0 };\n\n // Mean\n const mean = numbers.reduce((acc, val) => acc + val, 0) / numbers.length;\n\n // Median\n const sortedNumbers = [...numbers].sort((a, b) => a - b);\n const mid = Math.floor(sortedNumbers.length / 2);\n const median =\n sortedNumbers.length % 2 !== 0\n ? sortedNumbers[mid]\n : (sortedNumbers[mid - 1] + sortedNumbers[mid]) / 2;\n\n // Mode\n const frequency: { [key: number]: number } = {};\n let maxFreq = 0;\n let mode = numbers[0];\n\n numbers.forEach((num) => {\n frequency[num] = (frequency[num] || 0) + 1;\n if (frequency[num] > maxFreq) {\n maxFreq = frequency[num];\n mode = num;\n }\n });\n\n return { mean, median, mode };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,sBAAuB;AAEhB,IAAM,eAAe,IAAI;AAAA,EAC9B;AAAA,IACE,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,MAAM,uBAAO,MAAM;AAAA,IACrB;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,EAAE,YAAY,KAAK;AACrB;;;AClCO,IAAM,iBAAiB;AAAA,EAC5B;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AA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