black-diamond-shared 1.0.0
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.d.mts +37 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +175 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +140 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +34 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as mongoose from 'mongoose';
|
|
2
|
+
import { Schema } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
interface League {
|
|
5
|
+
id: number;
|
|
6
|
+
name?: string;
|
|
7
|
+
logo?: string;
|
|
8
|
+
country?: {
|
|
9
|
+
name?: string;
|
|
10
|
+
code?: string;
|
|
11
|
+
flag?: string;
|
|
12
|
+
};
|
|
13
|
+
stats?: any;
|
|
14
|
+
currentSeason?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const leagueSchema: Schema<League, mongoose.Model<League, any, any, any, mongoose.Document<unknown, any, League> & League & {
|
|
18
|
+
_id: mongoose.Types.ObjectId;
|
|
19
|
+
} & {
|
|
20
|
+
__v: number;
|
|
21
|
+
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, League, mongoose.Document<unknown, {}, mongoose.FlatRecord<League>> & mongoose.FlatRecord<League> & {
|
|
22
|
+
_id: mongoose.Types.ObjectId;
|
|
23
|
+
} & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}>;
|
|
26
|
+
|
|
27
|
+
declare const LEAGUE_ID_LIST: number[];
|
|
28
|
+
|
|
29
|
+
declare const API_FOOTBALL_URL_LEAGUES = "https://v3.football.api-sports.io/leagues";
|
|
30
|
+
declare const API_FOOTBALL_URL_TEAMS = "https://v3.football.api-sports.io/teams";
|
|
31
|
+
declare const API_FOOTBALL_URL_FIXTURES = "https://v3.football.api-sports.io/fixtures";
|
|
32
|
+
declare const API_FOOTBALL_URL_TEAM_STATS = "https://v3.football.api-sports.io/teams/statistics";
|
|
33
|
+
declare const API_FOOTBALL_URL_ODDS = "https://v3.football.api-sports.io/odds";
|
|
34
|
+
declare const API_FOOTBALL_URL_STANDINGS = "https://v3.football.api-sports.io/standings";
|
|
35
|
+
declare const API_FOOTBALL_URL_PREDICTIONS = "https://v3.football.api-sports.io/predictions";
|
|
36
|
+
|
|
37
|
+
export { API_FOOTBALL_URL_FIXTURES, API_FOOTBALL_URL_LEAGUES, API_FOOTBALL_URL_ODDS, API_FOOTBALL_URL_PREDICTIONS, API_FOOTBALL_URL_STANDINGS, API_FOOTBALL_URL_TEAMS, API_FOOTBALL_URL_TEAM_STATS, LEAGUE_ID_LIST, type League, leagueSchema };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as mongoose from 'mongoose';
|
|
2
|
+
import { Schema } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
interface League {
|
|
5
|
+
id: number;
|
|
6
|
+
name?: string;
|
|
7
|
+
logo?: string;
|
|
8
|
+
country?: {
|
|
9
|
+
name?: string;
|
|
10
|
+
code?: string;
|
|
11
|
+
flag?: string;
|
|
12
|
+
};
|
|
13
|
+
stats?: any;
|
|
14
|
+
currentSeason?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const leagueSchema: Schema<League, mongoose.Model<League, any, any, any, mongoose.Document<unknown, any, League> & League & {
|
|
18
|
+
_id: mongoose.Types.ObjectId;
|
|
19
|
+
} & {
|
|
20
|
+
__v: number;
|
|
21
|
+
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, League, mongoose.Document<unknown, {}, mongoose.FlatRecord<League>> & mongoose.FlatRecord<League> & {
|
|
22
|
+
_id: mongoose.Types.ObjectId;
|
|
23
|
+
} & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}>;
|
|
26
|
+
|
|
27
|
+
declare const LEAGUE_ID_LIST: number[];
|
|
28
|
+
|
|
29
|
+
declare const API_FOOTBALL_URL_LEAGUES = "https://v3.football.api-sports.io/leagues";
|
|
30
|
+
declare const API_FOOTBALL_URL_TEAMS = "https://v3.football.api-sports.io/teams";
|
|
31
|
+
declare const API_FOOTBALL_URL_FIXTURES = "https://v3.football.api-sports.io/fixtures";
|
|
32
|
+
declare const API_FOOTBALL_URL_TEAM_STATS = "https://v3.football.api-sports.io/teams/statistics";
|
|
33
|
+
declare const API_FOOTBALL_URL_ODDS = "https://v3.football.api-sports.io/odds";
|
|
34
|
+
declare const API_FOOTBALL_URL_STANDINGS = "https://v3.football.api-sports.io/standings";
|
|
35
|
+
declare const API_FOOTBALL_URL_PREDICTIONS = "https://v3.football.api-sports.io/predictions";
|
|
36
|
+
|
|
37
|
+
export { API_FOOTBALL_URL_FIXTURES, API_FOOTBALL_URL_LEAGUES, API_FOOTBALL_URL_ODDS, API_FOOTBALL_URL_PREDICTIONS, API_FOOTBALL_URL_STANDINGS, API_FOOTBALL_URL_TEAMS, API_FOOTBALL_URL_TEAM_STATS, LEAGUE_ID_LIST, type League, leagueSchema };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
API_FOOTBALL_URL_FIXTURES: () => API_FOOTBALL_URL_FIXTURES,
|
|
24
|
+
API_FOOTBALL_URL_LEAGUES: () => API_FOOTBALL_URL_LEAGUES,
|
|
25
|
+
API_FOOTBALL_URL_ODDS: () => API_FOOTBALL_URL_ODDS,
|
|
26
|
+
API_FOOTBALL_URL_PREDICTIONS: () => API_FOOTBALL_URL_PREDICTIONS,
|
|
27
|
+
API_FOOTBALL_URL_STANDINGS: () => API_FOOTBALL_URL_STANDINGS,
|
|
28
|
+
API_FOOTBALL_URL_TEAMS: () => API_FOOTBALL_URL_TEAMS,
|
|
29
|
+
API_FOOTBALL_URL_TEAM_STATS: () => API_FOOTBALL_URL_TEAM_STATS,
|
|
30
|
+
LEAGUE_ID_LIST: () => LEAGUE_ID_LIST,
|
|
31
|
+
leagueSchema: () => leagueSchema
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
|
|
35
|
+
// src/data/league/schema/index.ts
|
|
36
|
+
var import_mongoose = require("mongoose");
|
|
37
|
+
var leagueSchema = new import_mongoose.Schema(
|
|
38
|
+
{
|
|
39
|
+
id: {
|
|
40
|
+
type: Number,
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
name: {
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
46
|
+
logo: {
|
|
47
|
+
type: String
|
|
48
|
+
},
|
|
49
|
+
country: {
|
|
50
|
+
name: {
|
|
51
|
+
type: String
|
|
52
|
+
},
|
|
53
|
+
code: {
|
|
54
|
+
type: String
|
|
55
|
+
},
|
|
56
|
+
flag: {
|
|
57
|
+
type: String
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
stats: {
|
|
61
|
+
type: import_mongoose.Schema.Types.Mixed
|
|
62
|
+
},
|
|
63
|
+
currentSeason: {
|
|
64
|
+
type: Number
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{ timestamps: true }
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
// src/data/league/data/index.ts
|
|
71
|
+
var LEAGUE_ID_LIST = [
|
|
72
|
+
39,
|
|
73
|
+
// premier league
|
|
74
|
+
78,
|
|
75
|
+
//Bundesliga 1
|
|
76
|
+
140,
|
|
77
|
+
// La Liga
|
|
78
|
+
135,
|
|
79
|
+
// Serie A
|
|
80
|
+
61,
|
|
81
|
+
// Ligue 1,
|
|
82
|
+
188,
|
|
83
|
+
// A league australia
|
|
84
|
+
40,
|
|
85
|
+
// Championship
|
|
86
|
+
41,
|
|
87
|
+
// League One
|
|
88
|
+
42,
|
|
89
|
+
// League Two
|
|
90
|
+
43,
|
|
91
|
+
//National League
|
|
92
|
+
141,
|
|
93
|
+
// Segunda Division
|
|
94
|
+
79,
|
|
95
|
+
//Bundesliga 2
|
|
96
|
+
136,
|
|
97
|
+
// Serie B
|
|
98
|
+
62,
|
|
99
|
+
// Ligue 2
|
|
100
|
+
179,
|
|
101
|
+
// Scotland Premiership
|
|
102
|
+
180,
|
|
103
|
+
// Scotland Championship,
|
|
104
|
+
113,
|
|
105
|
+
// Sweden Allsvenskan
|
|
106
|
+
103,
|
|
107
|
+
// Norway Eliteserien
|
|
108
|
+
94,
|
|
109
|
+
// Primeira Liga portugal
|
|
110
|
+
71,
|
|
111
|
+
// Serie A Brazil
|
|
112
|
+
72,
|
|
113
|
+
// Serie B Brazil
|
|
114
|
+
253,
|
|
115
|
+
// Major League Soccer
|
|
116
|
+
197,
|
|
117
|
+
// Greece Super League
|
|
118
|
+
88,
|
|
119
|
+
// Eredivisie Holland
|
|
120
|
+
144,
|
|
121
|
+
// Belgium 1st div A
|
|
122
|
+
345,
|
|
123
|
+
// Czech Liga
|
|
124
|
+
207,
|
|
125
|
+
// Switz super league
|
|
126
|
+
98,
|
|
127
|
+
// J1 League Japan
|
|
128
|
+
292,
|
|
129
|
+
// K League 1
|
|
130
|
+
333,
|
|
131
|
+
// Ukraine premier league
|
|
132
|
+
128,
|
|
133
|
+
// Argentine Primera División
|
|
134
|
+
169,
|
|
135
|
+
// China super league
|
|
136
|
+
233,
|
|
137
|
+
// Egypt premier leaguye
|
|
138
|
+
262,
|
|
139
|
+
// Liga MX Mexico
|
|
140
|
+
244,
|
|
141
|
+
// Veikkausliiga finland
|
|
142
|
+
164,
|
|
143
|
+
// Iceland
|
|
144
|
+
281,
|
|
145
|
+
// Peru Primera División
|
|
146
|
+
203,
|
|
147
|
+
// Turkey Süper Lig
|
|
148
|
+
365,
|
|
149
|
+
// Virsliga Latvia
|
|
150
|
+
357
|
|
151
|
+
// Ireland Premier division
|
|
152
|
+
];
|
|
153
|
+
|
|
154
|
+
// src/utils/apiFootball/data/index.ts
|
|
155
|
+
var API_FOOTBALL_URL = `https://v3.football.api-sports.io`;
|
|
156
|
+
var API_FOOTBALL_URL_LEAGUES = `${API_FOOTBALL_URL}/leagues`;
|
|
157
|
+
var API_FOOTBALL_URL_TEAMS = `${API_FOOTBALL_URL}/teams`;
|
|
158
|
+
var API_FOOTBALL_URL_FIXTURES = `${API_FOOTBALL_URL}/fixtures`;
|
|
159
|
+
var API_FOOTBALL_URL_TEAM_STATS = `${API_FOOTBALL_URL}/teams/statistics`;
|
|
160
|
+
var API_FOOTBALL_URL_ODDS = `${API_FOOTBALL_URL}/odds`;
|
|
161
|
+
var API_FOOTBALL_URL_STANDINGS = `${API_FOOTBALL_URL}/standings`;
|
|
162
|
+
var API_FOOTBALL_URL_PREDICTIONS = `${API_FOOTBALL_URL}/predictions`;
|
|
163
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
164
|
+
0 && (module.exports = {
|
|
165
|
+
API_FOOTBALL_URL_FIXTURES,
|
|
166
|
+
API_FOOTBALL_URL_LEAGUES,
|
|
167
|
+
API_FOOTBALL_URL_ODDS,
|
|
168
|
+
API_FOOTBALL_URL_PREDICTIONS,
|
|
169
|
+
API_FOOTBALL_URL_STANDINGS,
|
|
170
|
+
API_FOOTBALL_URL_TEAMS,
|
|
171
|
+
API_FOOTBALL_URL_TEAM_STATS,
|
|
172
|
+
LEAGUE_ID_LIST,
|
|
173
|
+
leagueSchema
|
|
174
|
+
});
|
|
175
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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":[]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// src/data/league/schema/index.ts
|
|
2
|
+
import { Schema } from "mongoose";
|
|
3
|
+
var leagueSchema = new Schema(
|
|
4
|
+
{
|
|
5
|
+
id: {
|
|
6
|
+
type: Number,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
name: {
|
|
10
|
+
type: String
|
|
11
|
+
},
|
|
12
|
+
logo: {
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
15
|
+
country: {
|
|
16
|
+
name: {
|
|
17
|
+
type: String
|
|
18
|
+
},
|
|
19
|
+
code: {
|
|
20
|
+
type: String
|
|
21
|
+
},
|
|
22
|
+
flag: {
|
|
23
|
+
type: String
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
stats: {
|
|
27
|
+
type: Schema.Types.Mixed
|
|
28
|
+
},
|
|
29
|
+
currentSeason: {
|
|
30
|
+
type: Number
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{ timestamps: true }
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
// src/data/league/data/index.ts
|
|
37
|
+
var LEAGUE_ID_LIST = [
|
|
38
|
+
39,
|
|
39
|
+
// premier league
|
|
40
|
+
78,
|
|
41
|
+
//Bundesliga 1
|
|
42
|
+
140,
|
|
43
|
+
// La Liga
|
|
44
|
+
135,
|
|
45
|
+
// Serie A
|
|
46
|
+
61,
|
|
47
|
+
// Ligue 1,
|
|
48
|
+
188,
|
|
49
|
+
// A league australia
|
|
50
|
+
40,
|
|
51
|
+
// Championship
|
|
52
|
+
41,
|
|
53
|
+
// League One
|
|
54
|
+
42,
|
|
55
|
+
// League Two
|
|
56
|
+
43,
|
|
57
|
+
//National League
|
|
58
|
+
141,
|
|
59
|
+
// Segunda Division
|
|
60
|
+
79,
|
|
61
|
+
//Bundesliga 2
|
|
62
|
+
136,
|
|
63
|
+
// Serie B
|
|
64
|
+
62,
|
|
65
|
+
// Ligue 2
|
|
66
|
+
179,
|
|
67
|
+
// Scotland Premiership
|
|
68
|
+
180,
|
|
69
|
+
// Scotland Championship,
|
|
70
|
+
113,
|
|
71
|
+
// Sweden Allsvenskan
|
|
72
|
+
103,
|
|
73
|
+
// Norway Eliteserien
|
|
74
|
+
94,
|
|
75
|
+
// Primeira Liga portugal
|
|
76
|
+
71,
|
|
77
|
+
// Serie A Brazil
|
|
78
|
+
72,
|
|
79
|
+
// Serie B Brazil
|
|
80
|
+
253,
|
|
81
|
+
// Major League Soccer
|
|
82
|
+
197,
|
|
83
|
+
// Greece Super League
|
|
84
|
+
88,
|
|
85
|
+
// Eredivisie Holland
|
|
86
|
+
144,
|
|
87
|
+
// Belgium 1st div A
|
|
88
|
+
345,
|
|
89
|
+
// Czech Liga
|
|
90
|
+
207,
|
|
91
|
+
// Switz super league
|
|
92
|
+
98,
|
|
93
|
+
// J1 League Japan
|
|
94
|
+
292,
|
|
95
|
+
// K League 1
|
|
96
|
+
333,
|
|
97
|
+
// Ukraine premier league
|
|
98
|
+
128,
|
|
99
|
+
// Argentine Primera División
|
|
100
|
+
169,
|
|
101
|
+
// China super league
|
|
102
|
+
233,
|
|
103
|
+
// Egypt premier leaguye
|
|
104
|
+
262,
|
|
105
|
+
// Liga MX Mexico
|
|
106
|
+
244,
|
|
107
|
+
// Veikkausliiga finland
|
|
108
|
+
164,
|
|
109
|
+
// Iceland
|
|
110
|
+
281,
|
|
111
|
+
// Peru Primera División
|
|
112
|
+
203,
|
|
113
|
+
// Turkey Süper Lig
|
|
114
|
+
365,
|
|
115
|
+
// Virsliga Latvia
|
|
116
|
+
357
|
|
117
|
+
// Ireland Premier division
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
// src/utils/apiFootball/data/index.ts
|
|
121
|
+
var API_FOOTBALL_URL = `https://v3.football.api-sports.io`;
|
|
122
|
+
var API_FOOTBALL_URL_LEAGUES = `${API_FOOTBALL_URL}/leagues`;
|
|
123
|
+
var API_FOOTBALL_URL_TEAMS = `${API_FOOTBALL_URL}/teams`;
|
|
124
|
+
var API_FOOTBALL_URL_FIXTURES = `${API_FOOTBALL_URL}/fixtures`;
|
|
125
|
+
var API_FOOTBALL_URL_TEAM_STATS = `${API_FOOTBALL_URL}/teams/statistics`;
|
|
126
|
+
var API_FOOTBALL_URL_ODDS = `${API_FOOTBALL_URL}/odds`;
|
|
127
|
+
var API_FOOTBALL_URL_STANDINGS = `${API_FOOTBALL_URL}/standings`;
|
|
128
|
+
var API_FOOTBALL_URL_PREDICTIONS = `${API_FOOTBALL_URL}/predictions`;
|
|
129
|
+
export {
|
|
130
|
+
API_FOOTBALL_URL_FIXTURES,
|
|
131
|
+
API_FOOTBALL_URL_LEAGUES,
|
|
132
|
+
API_FOOTBALL_URL_ODDS,
|
|
133
|
+
API_FOOTBALL_URL_PREDICTIONS,
|
|
134
|
+
API_FOOTBALL_URL_STANDINGS,
|
|
135
|
+
API_FOOTBALL_URL_TEAMS,
|
|
136
|
+
API_FOOTBALL_URL_TEAM_STATS,
|
|
137
|
+
LEAGUE_ID_LIST,
|
|
138
|
+
leagueSchema
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/data/league/schema/index.ts","../src/data/league/data/index.ts","../src/utils/apiFootball/data/index.ts"],"sourcesContent":["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":";AACA,SAAS,cAAc;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,OAAO,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":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "black-diamond-shared",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Shared code between Black Diamond repositories",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsup",
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/webknit/black-diamond-shared.git"
|
|
18
|
+
},
|
|
19
|
+
"author": "webknit",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/webknit/black-diamond-shared/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/webknit/black-diamond-shared#readme",
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"babel-plugin-module-resolver": "^5.0.2",
|
|
27
|
+
"ts-node": "^10.9.2",
|
|
28
|
+
"tsup": "^8.3.5",
|
|
29
|
+
"typescript": "^5.6.3"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"mongoose": "^8.8.1"
|
|
33
|
+
}
|
|
34
|
+
}
|